:root {
  color-scheme: light;
  --ink: #17202a;
  --muted: #5c6875;
  --line: #d8dee6;
  --surface: #ffffff;
  --band: #eef4f7;
  --primary: #0f766e;
  --primary-dark: #0b5f59;
  --accent: #b45309;
  --danger: #b42318;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Arial, Helvetica, sans-serif;
  color: var(--ink);
  background: linear-gradient(180deg, #f7fafb 0%, #e8f0f3 100%);
}

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

.intro {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 180px;
  gap: 24px;
  align-items: end;
  padding: 28px 0 24px;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--primary-dark);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2 {
  margin: 0;
  line-height: 1.1;
}

h1 {
  font-size: clamp(2.1rem, 5vw, 4.5rem);
}

h2 {
  font-size: 1.55rem;
}

.lede {
  max-width: 640px;
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.55;
}

.stat {
  min-height: 132px;
  border-left: 4px solid var(--accent);
  padding: 18px 0 18px 22px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.stat span {
  font-size: 3.6rem;
  font-weight: 800;
  line-height: 1;
}

.stat small {
  color: var(--muted);
  font-weight: 700;
}

.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 28px;
  box-shadow: 0 18px 45px rgba(23, 32, 42, 0.08);
}

.hidden {
  display: none !important;
}

.honeypot {
  position: absolute;
  left: -10000px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

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

label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-weight: 700;
}

.wide {
  grid-column: 1 / -1;
}

input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 13px 14px;
  color: var(--ink);
  font: inherit;
}

input:focus,
button:focus-visible {
  outline: 3px solid rgba(15, 118, 110, 0.22);
  outline-offset: 2px;
}

button {
  min-height: 46px;
  border: 0;
  border-radius: 6px;
  padding: 0 18px;
  cursor: pointer;
  font: inherit;
  font-weight: 800;
}

.primary {
  margin-top: 24px;
  background: var(--primary);
  color: #fff;
}

.primary:hover {
  background: var(--primary-dark);
}

.secondary {
  background: #e6ecef;
  color: var(--ink);
}

.secondary:hover {
  background: #d5dee3;
}

.message {
  min-height: 1.4em;
  margin: 14px 0 0;
  color: var(--muted);
}

.message.error {
  color: var(--danger);
}

.quiz-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 260px;
  gap: 24px;
  align-items: center;
  margin-bottom: 22px;
}

.progress-shell {
  height: 10px;
  border-radius: 999px;
  background: var(--band);
  overflow: hidden;
}

#progress-bar {
  height: 100%;
  width: 0;
  background: var(--primary);
  transition: width 180ms ease;
}

.choices {
  display: grid;
  gap: 12px;
}

.choice {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 15px;
  color: var(--ink);
  font-weight: 600;
}

.choice:has(input:checked) {
  border-color: var(--primary);
  background: #edf8f6;
}

.actions {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 24px;
}

.result-panel {
  text-align: center;
}

.result-panel h2 {
  font-size: clamp(2rem, 7vw, 4.8rem);
}

.result-panel p {
  color: var(--muted);
  line-height: 1.5;
}

@media (max-width: 760px) {
  .intro,
  .quiz-header,
  .field-grid {
    grid-template-columns: 1fr;
  }

  .stat {
    min-height: 0;
  }

  .panel {
    padding: 20px;
  }

  .actions {
    flex-direction: column-reverse;
  }

  button {
    width: 100%;
  }
}
