:root {
  --ink: #17212b;
  --muted: #687684;
  --line: #dce3e8;
  --surface: #ffffff;
  --canvas: #f2f5f4;
  --accent: #0f766e;
  --accent-dark: #0b5f59;
  --required: #c2413b;
}
* { box-sizing: border-box; }
body { margin: 0; color: var(--ink); background: var(--canvas); font: 15px/1.6 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; letter-spacing: 0; }
button, input, textarea, select { font: inherit; }
.page-shell { width: min(760px, calc(100% - 32px)); margin: 38px auto; }
.survey { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; overflow: hidden; box-shadow: 0 12px 34px rgba(23, 33, 43, .06); }
.survey-header { display: flex; gap: 18px; padding: 34px 38px 28px; align-items: flex-start; }
.brand-mark { flex: 0 0 46px; height: 46px; display: grid; place-items: center; background: var(--accent); color: white; border-radius: 6px; font-size: 23px; font-weight: 700; }
h1 { margin: -4px 0 5px; font-size: clamp(25px, 4vw, 34px); line-height: 1.35; letter-spacing: 0; }
.survey-header p { margin: 0; color: var(--muted); }
.autosave-state { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; margin: -1px !important; overflow: hidden !important; clip: rect(0, 0, 0, 0) !important; white-space: nowrap !important; border: 0 !important; }
.save-dot { width: 8px; height: 8px; border-radius: 50%; background: #94a3ad; margin-right: 8px; }
.save-dot.saved { background: #168b62; }
.save-dot.saving { background: #d59428; }
.save-dot.error { background: #c2413b; }
.progress-text { margin-left: auto; color: var(--ink); font-variant-numeric: tabular-nums; }
.progress-track { height: 3px; background: #e8eeeb; }
.progress-track span { display: block; height: 100%; width: 0; background: var(--accent); transition: width .25s ease; }
.step-bar { display: flex; align-items: center; gap: 12px; padding: 14px 38px 0; }
.step-bar #step-label { flex: 0 0 auto; color: var(--muted); font-size: 13px; font-variant-numeric: tabular-nums; }
.step-track { flex: 1; height: 4px; border-radius: 2px; background: #e8eeeb; overflow: hidden; }
.step-track span { display: block; height: 100%; width: 0; background: var(--accent); transition: width .25s ease; }
#survey-form { padding: 8px 38px 22px; }
.question { padding: 27px 0 29px; border-bottom: 1px solid var(--line); }
.question:last-child { border-bottom: 0; }
.question-title { display: flex; gap: 9px; align-items: center; margin-bottom: 13px; font-weight: 650; font-size: 16px; }
.question-title > span { display: grid; place-items: center; width: 25px; height: 25px; border-radius: 4px; color: var(--accent); background: #e8f4f1; font-size: 13px; }
.question-title b { color: var(--required); font-size: 11px; font-weight: 600; margin-left: 2px; }
input[type="text"], textarea, select { width: 100%; border: 1px solid #cbd5db; border-radius: 5px; color: var(--ink); background: white; padding: 11px 13px; outline: 0; transition: border-color .15s, box-shadow .15s; }
.fill-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.fill-list label { display: grid; gap: 6px; color: var(--muted); font-size: 13px; }
textarea { resize: vertical; min-height: 108px; }
input[type="text"]:focus, textarea:focus, select:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(15, 118, 110, .1); }
.choice-list { display: grid; gap: 8px; }
.choice { display: flex; align-items: center; gap: 10px; min-height: 44px; border: 1px solid #d5dde2; border-radius: 5px; padding: 8px 12px; cursor: pointer; transition: background .15s, border-color .15s; }
.choice:hover { border-color: #99aaa8; background: #fafcfc; }
.choice input { position: absolute; opacity: 0; pointer-events: none; }
.choice-control { width: 18px; height: 18px; border: 1.5px solid #93a2aa; border-radius: 50%; position: relative; flex: 0 0 auto; }
input[type="checkbox"] + .choice-control { border-radius: 4px; }
.choice input:checked + .choice-control { border-color: var(--accent); background: var(--accent); }
.choice input:checked + .choice-control::after { content: ""; position: absolute; inset: 4px; background: white; border-radius: 50%; }
.choice input[type="checkbox"]:checked + .choice-control::after { inset: 3px 5px 5px; background: none; border: solid white; border-width: 0 2px 2px 0; border-radius: 0; transform: rotate(45deg); }
.submit-btn { appearance: none; background: var(--accent); color: white; border: 0; border-radius: 6px; padding: 12px 32px; font-weight: 600; font-size: 15px; cursor: pointer; transition: background .2s, opacity .2s; }
.submit-btn:hover:not(:disabled) { background: var(--accent-dark); }
.submit-btn:disabled { opacity: 0.6; cursor: not-allowed; }
.other-input { margin-top: 10px; }
.step-nav { padding: 0 38px 22px; display: flex; gap: 12px; justify-content: center; }
.nav-btn { appearance: none; background: white; color: var(--ink); border: 1px solid #cbd5db; border-radius: 6px; padding: 12px 32px; font-weight: 600; font-size: 15px; cursor: pointer; transition: background .2s, opacity .2s, border-color .2s; }
.nav-btn:hover:not(:disabled) { border-color: #99aaa8; background: #fafcfc; }
.nav-btn.primary { background: var(--accent); color: white; border-color: var(--accent); }
.nav-btn.primary:hover:not(:disabled) { background: var(--accent-dark); }
.nav-btn:disabled { opacity: 0.6; cursor: not-allowed; }
footer { padding: 18px 38px; color: var(--muted); text-align: center; font-size: 12px; border-top: 1px solid var(--line); background: #fafbfb; }
.load-error { padding: 35px 0; color: var(--required); text-align: center; }
.directory-item { display: block; padding: 16px 18px; border: 1px solid var(--line); border-radius: 6px; margin-bottom: 10px; cursor: pointer; transition: border-color .15s, background .15s; text-decoration: none; color: inherit; }
.directory-item:hover { border-color: var(--accent); background: #f6fbfa; }
.directory-item h3 { margin: 0 0 4px; font-size: 16px; }
.directory-item p { margin: 0; color: var(--muted); font-size: 13px; }
.directory-empty { padding: 20px 0; color: var(--muted); text-align: center; }
@media (max-width: 600px) {
  .page-shell { width: 100%; margin: 0; }
  .survey { min-height: 100vh; border: 0; border-radius: 0; }
  .survey-header { padding: 25px 20px 22px; }
  .brand-mark { flex-basis: 40px; height: 40px; font-size: 20px; }
  h1 { font-size: 24px; }
  #survey-form { padding: 4px 20px 18px; }
  .question { padding: 23px 0 25px; }
  footer { padding: 17px 20px; }
  .fill-list { grid-template-columns: 1fr; }
}
