:root {
  color-scheme: light dark;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.5;
  background: #f7f7f5;
  color: #1c1c1a;
}

@media (prefers-color-scheme: dark) {
  body {
    background: #171716;
    color: #e8e8e4;
  }
}

main {
  max-width: 44rem;
  margin: 0 auto;
  padding: 2rem 1.25rem 4rem;
}

h1 {
  font-size: 1.5rem;
  margin: 0 0 0.25rem;
}

h2 {
  font-size: 1rem;
  margin: 0 0 0.5rem;
}

.purpose {
  font-size: 1.05rem;
  margin: 0 0 1.5rem;
  padding: 0.75rem 1rem;
  border-left: 3px solid #6b6b66;
  background: rgba(127, 127, 120, 0.08);
}

section {
  margin: 0 0 1.75rem;
}

.challenge code {
  display: block;
  padding: 0.6rem 0.75rem;
  background: rgba(127, 127, 120, 0.12);
  border-radius: 6px;
  word-break: break-all;
  font-size: 0.85rem;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

button {
  font: inherit;
  padding: 0.55rem 1rem;
  border: 1px solid #555550;
  border-radius: 6px;
  background: #1c1c1a;
  color: #f7f7f5;
  cursor: pointer;
}

button.link {
  background: transparent;
  color: inherit;
  text-decoration: underline;
  border-color: transparent;
}

button:disabled {
  opacity: 0.5;
  cursor: wait;
}

@media (prefers-color-scheme: dark) {
  button {
    background: #e8e8e4;
    color: #171716;
  }
  button.link {
    background: transparent;
    color: #e8e8e4;
  }
}

.note {
  min-height: 1.5rem;
  font-style: italic;
  margin: 0.5rem 0 1.25rem;
}

#checklist {
  list-style: none;
  margin: 0;
  padding: 0;
}

.check {
  position: relative;
  padding: 0.55rem 0.75rem 0.55rem 2.1rem;
  border-bottom: 1px solid rgba(127, 127, 120, 0.25);
}

.check::before {
  content: "?";
  position: absolute;
  left: 0.4rem;
  top: 0.55rem;
  width: 1.1rem;
  height: 1.1rem;
  border-radius: 50%;
  text-align: center;
  font-size: 0.75rem;
  line-height: 1.1rem;
  font-weight: 700;
  background: #9a9a92;
  color: #fff;
}

.check.pass::before {
  content: "✓";
  background: #2e7d32;
}

.check.fail::before {
  content: "✗";
  background: #b3261e;
}

.check strong {
  display: block;
  font-size: 0.95rem;
}

.check .detail {
  font-size: 0.9rem;
}

.report {
  white-space: pre-wrap;
  word-break: break-all;
  background: rgba(127, 127, 120, 0.12);
  border-radius: 6px;
  padding: 0.75rem;
  font-size: 0.8rem;
  max-height: 20rem;
  overflow: auto;
}

.report:empty {
  display: none;
}
