:root {
  color-scheme: light;
  --ink: #17212b;
  --muted: #66727d;
  --line: #d9e0e5;
  --surface: #ffffff;
  --panel: #f3f6f7;
  --accent: #006a70;
  --accent-strong: #004d52;
  --accent-soft: #e3f3f2;
  --focus: #f2b134;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  color: var(--ink);
  background: var(--surface);
}

button,
input {
  font: inherit;
}

.app-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 72px;
  padding: 12px 32px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.96);
}

.brand {
  display: inline-flex;
  gap: 12px;
  align-items: center;
  color: inherit;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  border-radius: 6px;
  color: #fff;
  background: var(--accent);
  font-size: 14px;
  font-weight: 800;
}

.brand strong,
.brand small {
  display: block;
}

.brand strong {
  font-size: 16px;
}

.brand small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
}

.draft-status {
  padding: 6px 9px;
  border: 1px solid var(--line);
  border-radius: 4px;
  color: var(--muted);
  background: var(--panel);
  font-size: 12px;
  font-weight: 700;
}

.app-shell {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  min-height: calc(100vh - 72px);
}

.workflow-panel {
  padding: 30px 24px;
  border-right: 1px solid var(--line);
  background: var(--panel);
}

.workflow-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 24px;
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
}

.workflow-heading strong {
  color: var(--ink);
  font-size: 11px;
}

.step-list {
  display: grid;
  gap: 4px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.step-button {
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 10px;
  align-items: center;
  width: 100%;
  min-height: 44px;
  padding: 7px 9px;
  border: 0;
  border-radius: 6px;
  color: var(--muted);
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.step-button:hover {
  background: #e9eeef;
}

.step-button[aria-current="step"] {
  color: var(--accent-strong);
  background: var(--accent-soft);
  font-weight: 750;
}

.step-number {
  display: grid;
  width: 26px;
  height: 26px;
  place-items: center;
  border: 1px solid #bbc6cb;
  border-radius: 50%;
  background: var(--surface);
  font-size: 11px;
  font-weight: 800;
}

.step-button[aria-current="step"] .step-number {
  border-color: var(--accent);
  color: #fff;
  background: var(--accent);
}

.questionnaire {
  width: min(920px, 100%);
  padding: 56px clamp(28px, 7vw, 88px) 40px;
}

.page {
  min-height: 540px;
}

.page-heading {
  max-width: 680px;
  margin-bottom: 44px;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

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

h1 {
  margin-bottom: 14px;
  font-size: clamp(32px, 5vw, 48px);
  line-height: 1.08;
  letter-spacing: 0;
}

.page-heading > p:last-child {
  max-width: 620px;
  margin-bottom: 0;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.6;
}

.question-block {
  margin: 0;
  padding: 28px 0 32px;
  border: 0;
  border-top: 1px solid var(--line);
}

[data-general-questions] .question-block:last-child {
  border-bottom: 1px solid var(--line);
}

.question-block legend {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 0;
  font-size: 19px;
  font-weight: 760;
}

.question-number {
  color: var(--accent);
  font-size: 12px;
}

.question-hint {
  margin: 8px 0 18px 34px;
  color: var(--muted);
  font-size: 13px;
}

.choice-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-left: 34px;
}

.choice {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 52px;
  padding: 12px 14px 12px 45px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  cursor: pointer;
  font-size: 14px;
  font-weight: 700;
}

.choice:hover {
  border-color: #9dacb3;
  background: #f9fbfb;
}

.choice:has(input:checked) {
  border-color: var(--accent);
  color: var(--accent-strong);
  background: var(--accent-soft);
}

.choice input {
  position: absolute;
  left: 15px;
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: var(--accent);
}

.answer-control {
  display: block;
  width: calc(100% - 34px);
  min-height: 48px;
  margin: 18px 0 0 34px;
  padding: 12px 14px;
  border: 1px solid #aebbc1;
  border-radius: 5px;
  color: var(--ink);
  background: var(--surface);
  line-height: 1.5;
  resize: vertical;
}

input.answer-control {
  max-width: 320px;
  resize: none;
}

.answer-control::placeholder {
  color: #849098;
}

.answer-control:hover {
  border-color: #82949c;
}

.answer-control:focus {
  border-color: var(--accent);
  outline: 3px solid rgba(242, 177, 52, 0.45);
  outline-offset: 1px;
}

.form-message {
  min-height: 20px;
  margin: 14px 0 0;
  color: #9b3b25;
  font-size: 13px;
  font-weight: 650;
}

.empty-state {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 22px;
  align-items: center;
  padding: 34px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.empty-index {
  display: grid;
  width: 64px;
  height: 64px;
  place-items: center;
  border-radius: 50%;
  color: var(--accent-strong);
  background: var(--accent-soft);
  font-size: 18px;
  font-weight: 800;
}

.empty-state h2 {
  margin-bottom: 6px;
  font-size: 18px;
}

.empty-state p {
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.6;
}

.review-summary {
  display: grid;
  grid-template-columns: 210px 1fr;
  gap: 42px;
  padding: 30px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.review-count strong,
.review-count span {
  display: block;
}

.review-count strong {
  color: var(--accent);
  font-size: 52px;
}

.review-count span {
  color: var(--muted);
  font-size: 13px;
}

.review-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.review-list li {
  padding: 12px 14px;
  border-left: 3px solid var(--accent);
  background: var(--panel);
  font-size: 14px;
  font-weight: 750;
}

.page-actions {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding-top: 30px;
}

.button {
  min-width: 112px;
  min-height: 44px;
  padding: 10px 18px;
  border-radius: 5px;
  font-weight: 750;
  cursor: pointer;
}

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

.button-primary:hover {
  border-color: var(--accent-strong);
  background: var(--accent-strong);
}

.button-secondary {
  border: 1px solid var(--line);
  color: var(--ink);
  background: var(--surface);
}

.button-secondary:hover {
  background: var(--panel);
}

.button[hidden] {
  display: none;
}

button:focus-visible,
input:focus-visible,
a:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}

@media (max-width: 760px) {
  .app-header {
    padding: 10px 18px;
  }

  .brand small,
  .draft-status {
    display: none;
  }

  .app-shell {
    display: block;
  }

  .workflow-panel {
    overflow-x: auto;
    padding: 14px 18px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .workflow-heading {
    margin-bottom: 10px;
  }

  .step-list {
    display: flex;
    min-width: max-content;
  }

  .step-button {
    width: auto;
    grid-template-columns: 24px auto;
    min-height: 38px;
  }

  .step-number {
    width: 23px;
    height: 23px;
  }

  .questionnaire {
    padding: 36px 20px 28px;
  }

  .page {
    min-height: 480px;
  }

  .page-heading {
    margin-bottom: 30px;
  }

  .choice-grid,
  .review-list {
    grid-template-columns: 1fr 1fr;
  }

  .choice-grid,
  .question-hint,
  .answer-control {
    margin-left: 0;
  }

  .answer-control {
    width: 100%;
  }

  .review-summary {
    grid-template-columns: 1fr;
    gap: 22px;
  }
}

@media (max-width: 440px) {
  .choice-grid,
  .review-list {
    grid-template-columns: 1fr;
  }

  h1 {
    font-size: 32px;
  }
}
