:root {
  color-scheme: light;
  --bg: #f4f7f5;
  --text: #19211d;
  --muted: #647067;
  --panel: #ffffff;
  --line: #dce5df;
  --brand: #096b5a;
  --brand-strong: #06483d;
  --accent: #f0b429;
  --error: #b42318;
  --shadow: 0 18px 45px rgba(25, 33, 29, 0.1);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
}

.shell {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding: 28px 0 40px;
}

.topbar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.eyebrow {
  margin: 0 0 6px;
  color: var(--brand);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

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

h1 {
  margin-bottom: 0;
  font-size: clamp(2rem, 4vw, 3.5rem);
  line-height: 1;
}

h2 {
  font-size: 1.55rem;
  line-height: 1.15;
}

.progress-pill {
  flex: 0 0 auto;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 999px;
  padding: 9px 14px;
  color: var(--muted);
  font-weight: 700;
}

.progress {
  height: 9px;
  border-radius: 999px;
  background: #d8e2dc;
  overflow: hidden;
  margin-bottom: 20px;
}

#progressBar {
  width: 10%;
  height: 100%;
  background: linear-gradient(90deg, var(--brand), var(--accent));
  transition: width 180ms ease;
}

.step {
  display: none;
}

.step.active {
  display: block;
}

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  padding: clamp(20px, 4vw, 34px);
}

.instruction {
  border-left: 5px solid var(--brand);
  background: #eff8f4;
  border-radius: 8px;
  padding: 18px 20px;
  margin-bottom: 20px;
}

.live-note {
  border: 1px solid #a7d7cc;
  border-radius: 8px;
  background: #eff8f4;
  padding: 16px 18px;
  margin: 18px 0;
}

.live-note strong {
  display: block;
  margin-bottom: 6px;
  color: var(--brand-strong);
  font-size: 1.05rem;
}

.live-note p {
  margin-bottom: 0;
}

.instruction h2 {
  margin-bottom: 12px;
}

.instruction p:last-child,
.panel p:last-child {
  margin-bottom: 0;
}

ol,
ul {
  padding-left: 1.35rem;
}

li + li {
  margin-top: 6px;
}

.grid {
  display: grid;
  gap: 16px;
}

.two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

label,
legend {
  color: var(--text);
  font-weight: 800;
}

input,
textarea,
select {
  display: block;
  width: 100%;
  margin-top: 8px;
  border: 1px solid #bdc9c1;
  border-radius: 8px;
  padding: 12px 13px;
  color: var(--text);
  background: #fff;
  font: inherit;
}

textarea {
  resize: vertical;
}

input:focus,
textarea:focus {
  outline: 3px solid rgba(9, 107, 90, 0.18);
  border-color: var(--brand);
}

fieldset {
  margin: 22px 0 0;
  padding: 0;
  border: 0;
}

.choice-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 10px;
}

.choice-row label,
.checkline {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px 14px;
  background: #fff;
}

.choice-row input,
.checkline input {
  width: auto;
  margin: 0;
}

.scale-note {
  margin: 18px 0;
  border-radius: 8px;
  background: #fff7df;
  border: 1px solid #efd790;
  padding: 12px 14px;
  color: #624800;
  font-weight: 800;
}

.question {
  border-top: 1px solid var(--line);
  padding: 20px 0;
}

.question-title {
  margin-bottom: 12px;
  font-size: 1rem;
  font-weight: 900;
}

.question-scale {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: -2px 0 14px;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 750;
}

.question-scale span {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 7px 9px;
}

.platforms {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.rating-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: #fbfdfc;
}

.rating-card strong {
  display: block;
  margin-bottom: 10px;
}

.rating-options {
  display: grid;
  grid-template-columns: repeat(5, minmax(38px, 1fr));
  gap: 8px;
}

.rating-options.scale-10 {
  grid-template-columns: repeat(10, minmax(32px, 1fr));
}

.rating-options label {
  display: grid;
  place-items: center;
  min-height: 42px;
  border: 1px solid #c7d1ca;
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
  font-weight: 900;
}

.rating-options input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.rating-options label:has(input:checked) {
  border-color: var(--brand);
  background: var(--brand);
  color: #fff;
}

.actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 18px;
}

button {
  min-height: 46px;
  border: 0;
  border-radius: 8px;
  padding: 0 18px;
  color: #fff;
  background: var(--brand);
  font: inherit;
  font-weight: 900;
  cursor: pointer;
}

button:hover {
  background: var(--brand-strong);
}

button.secondary {
  border: 1px solid var(--line);
  color: var(--text);
  background: #fff;
}

button.secondary:hover {
  background: #edf3ef;
}

button[disabled] {
  cursor: wait;
  opacity: 0.7;
}

.error {
  min-height: 24px;
  margin-top: 16px;
  color: var(--error);
  font-weight: 800;
}

.success {
  text-align: center;
}

.success h2 {
  color: var(--brand);
}

#submitBtn {
  display: none;
}

@media (max-width: 780px) {
  .shell {
    width: min(100% - 22px, 680px);
    padding-top: 18px;
  }

  .topbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .two,
  .three,
  .platforms {
    grid-template-columns: 1fr;
  }

  .panel {
    padding: 18px;
  }

  .actions {
    position: sticky;
    bottom: 0;
    z-index: 2;
    margin: 18px -11px -16px;
    padding: 12px 11px 16px;
    background: rgba(244, 247, 245, 0.94);
    backdrop-filter: blur(10px);
  }

  .actions button {
    flex: 1 1 0;
    padding: 0 10px;
  }

  .rating-options.scale-10 {
    grid-template-columns: repeat(5, minmax(38px, 1fr));
  }
}
