* { box-sizing: border-box; }
html, body {
  margin: 0; padding: 0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
  background: #f6f7f9;
  color: #222;
  line-height: 1.5;
}
.topbar {
  background: #1f2937;
  color: #fff;
  padding: 0.75rem 1.25rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 10;
}
.topbar .title { font-weight: 600; }
.topbar-logout { margin: 0; margin-left: 1rem; }
.topbar-logout button {
  font-size: 0.85rem;
  padding: 0.35rem 0.75rem;
  background: transparent;
  color: #e5e7eb;
  border: 1px solid #4b5563;
}
.topbar-logout button:hover { background: #374151; color: #fff; }
.container {
  max-width: 760px;
  margin: 1.5rem auto;
  padding: 0 1rem;
}
.card {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  padding: 1.5rem;
  box-shadow: 0 1px 2px rgba(0,0,0,0.04);
  margin-bottom: 1rem;
}
h1 { margin-top: 0; font-size: 1.4rem; }
.meta { list-style: none; padding: 0; }
.meta li { padding: 0.25rem 0; }
button {
  font: inherit;
  padding: 0.6rem 1.1rem;
  border-radius: 5px;
  border: 1px solid #374151;
  background: #374151;
  color: #fff;
  cursor: pointer;
}
button.secondary { background: #fff; color: #374151; }
button.danger { background: #b91c1c; border-color: #b91c1c; }
button:disabled { opacity: 0.5; cursor: not-allowed; }
input[type=text], input[type=number], textarea, select {
  width: 100%;
  padding: 0.5rem 0.7rem;
  border: 1px solid #d1d5db;
  border-radius: 4px;
  font: inherit;
}
textarea { resize: vertical; min-height: 6em; }
label { display: block; margin: 0.5rem 0 0.25rem; font-weight: 500; }
.error { color: #b91c1c; margin: 0.5rem 0; }
.question-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 0.5rem;
  color: #6b7280;
  font-size: 0.9rem;
  margin-bottom: 0.75rem;
}
.timers { display: flex; gap: 1rem; }
.timers .countdown { font-variant-numeric: tabular-nums; font-weight: 600; color: #111827; }
.section-intro {
  white-space: pre-line;
  margin: 0.75rem 0 1.25rem;
  font-size: 0.98rem;
  line-height: 1.55;
  color: #1f2937;
}
.context {
  font-size: 0.95rem;
  color: #374151;
  margin: 1rem 0 0.5rem;
  padding: 0.75rem 1rem;
  background: #eef2ff;
  border-left: 3px solid #6366f1;
  border-radius: 3px;
  white-space: pre-line;
}
.prompt {
  font-size: 1.1rem;
  margin: 1rem 0 1.25rem;
  padding: 0.75rem 1rem;
  background: #f3f4f6;
  border-left: 3px solid #374151;
  border-radius: 3px;
}
.no-select {
  user-select: none;
  -webkit-user-select: none;
  -moz-user-select: none;
}
.answer .option {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.5rem 0.25rem;
  cursor: pointer;
  border-bottom: 1px solid #f1f5f9;
}
.answer .option:last-child { border-bottom: none; }
.answer .option input { width: auto; }
.controls {
  display: flex;
  gap: 0.6rem;
  margin-top: 1.25rem;
  flex-wrap: wrap;
}
.form-row { margin-bottom: 0.8rem; }
.char-counter { color: #6b7280; text-align: right; font-size: 0.85rem; margin-top: 0.25rem; }
fieldset.answer { border: none; padding: 0; margin: 0; }
code { background: #e5e7eb; padding: 0.1em 0.3em; border-radius: 3px; }
