:root {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #241b2f;
  background: #faf9fc;
}

* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; }
button, input { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .55; }
.shell { max-width: 760px; margin: 0 auto; padding: 0 24px; }
h1, p { margin-top: 0; }
h1 { letter-spacing: -.04em; line-height: 1.2; }

.entry { max-width: 640px; margin: 0 auto; padding: clamp(64px, 14vh, 130px) 0 70px; }
.entry-intro { text-align: center; margin-bottom: 32px; }
.entry-intro h1 { font-size: clamp(32px, 5vw, 42px); margin-bottom: 14px; }
.description { color: #6d6277; line-height: 1.6; text-align: left; white-space: pre-line; }
.description p { margin: 0 0 12px; }
.description p:last-child { margin-bottom: 0; }
.description ul, .description ol { text-align: left; margin: 12px 0; padding-left: 24px; }
.description a { color: #6d28d9; }
.entry-card { width: 100%; }
.entry-card label { display: block; font-size: 14px; font-weight: 600; margin-bottom: 9px; }
.entry-card input {
  display: block; width: 100%; height: 48px; padding: 0 14px;
  color: #241b2f; background: #fff; border: 1px solid #d8cce8; border-radius: 8px;
}
.entry-card input:focus-visible, .option:has(input:focus-visible), .submit-confirm summary:focus-visible {
  outline: 3px solid #b69af1; outline-offset: 2px;
}
.entry-card button, .submit-confirm summary, .confirm-panel button {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 46px; padding: 0 20px; border: 0; border-radius: 8px;
  background: #6d28d9; color: #fff; font-weight: 600;
}
.entry-card button { width: 100%; margin-top: 14px; }
.entry-card button:hover:not(:disabled), .submit-confirm summary:hover, .confirm-panel button:hover:not(:disabled) {
  background: #5b21b6;
}
.entry-help { margin: 14px 0 0; color: #756982; font-size: 13px; }
.alert {
  margin: 0 0 22px; padding: 12px 14px; border: 1px solid #efb8ac;
  border-radius: 8px; background: #fff1ef; color: #9b3528; line-height: 1.5;
}

.quiz-heading { padding: 66px 0 28px; }
.quiz-heading h1 { font-size: clamp(32px, 5vw, 42px); margin-bottom: 10px; }
.quiz-heading p { margin-bottom: 0; color: #6d6277; line-height: 1.5; }
.quiz-meta {
  display: flex; justify-content: space-between; gap: 20px; align-items: center;
  padding: 13px 0; border-top: 1px solid #e7def2; border-bottom: 1px solid #e7def2;
  color: #5d5069; font-size: 14px;
}
.timer strong { margin-left: 6px; color: #6d28d9; font-variant-numeric: tabular-nums; }
.timer-urgent strong { color: #a0392d; }
.save-state { min-height: 20px; margin: 8px 0 0; color: #756982; font-size: 12px; }
.question-card { min-width: 0; margin: 0; padding: 28px 0; border: 0; border-bottom: 1px solid #e7def2; }
.question-card legend {
  float: left; display: flex; gap: 8px; width: 100%; padding: 0; margin-bottom: 16px;
  font-size: 18px; font-weight: 600; line-height: 1.4;
}
.question-card legend + .options { clear: both; }
.question-number { flex: none; color: #6d28d9; }
.options { display: grid; gap: 8px; }
.option {
  display: flex; align-items: center; gap: 12px; min-height: 48px;
  padding: 11px 14px; border: 1px solid #e7def2; border-radius: 8px;
  background: #fff; color: #4b3c58; cursor: pointer; line-height: 1.4;
}
.option:hover { border-color: #aa83e9; }
.option:has(input:checked) { border-color: #8b5cf6; background: #f5efff; color: #4c1d95; }
.option input { flex: none; width: 16px; height: 16px; margin: 0; accent-color: #6d28d9; }

.submit-confirm { margin: 28px 0 75px; }
.submit-confirm summary { width: 190px; list-style: none; cursor: pointer; }
.submit-confirm summary::-webkit-details-marker { display: none; }
.submit-confirm .when-open { display: none; }
.submit-confirm[open] .when-open { display: inline; }
.submit-confirm[open] .when-closed { display: none; }
.submit-confirm[open] summary { background: #ebe3f7; color: #5b21b6; }
.submit-confirm[open] summary:hover { background: #e1d2f6; }
.confirm-panel {
  max-width: 460px; margin-top: 14px; padding: 18px;
  border: 1px solid #e7def2; border-radius: 8px; background: #fff;
}
.confirm-panel p { margin-bottom: 16px; color: #4b3c58; line-height: 1.5; }
.confirm-panel p strong { color: #241b2f; }

.complete { max-width: 520px; margin: clamp(90px, 19vh, 180px) auto 80px; text-align: center; }
.complete h1 { font-size: clamp(36px, 6vw, 48px); margin-bottom: 16px; }
.complete p { color: #6d6277; font-size: 17px; line-height: 1.6; }

@media (max-width: 540px) {
  .shell { padding: 0 18px; }
  .entry { padding-top: 60px; }
  .quiz-heading { padding-top: 42px; }
  .question-card legend { font-size: 17px; }
  .submit-confirm summary, .confirm-panel button { width: 100%; }
}
