*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

button, label { touch-action: manipulation; }

body {
  font-family: Georgia, 'Times New Roman', serif;
  background: #f5f3ee;
  color: #222;
  min-height: 100vh;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 2rem 1rem;
}

.container {
  width: 100%;
  max-width: 640px;
}

.card {
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 6px;
  padding: 2rem;
}

.meta-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
}

.meta-right {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.rank-pill {
  display: inline-block;
  padding: 0.15rem 0.45rem;
  border-radius: 10px;
  font-size: 0.7rem;
  font-weight: 700;
  background: #2c3e7a;
  color: #fff;
  text-decoration: none;
  white-space: nowrap;
}

.rank-pill:hover { background: #1e2d5e; }

.meta {
  font-size: 0.8rem;
  color: #888;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.daily-label {
  font-size: 0.75rem;
  color: #aaa;
  white-space: nowrap;
}

.progress-bar {
  height: 3px;
  background: #e8e5df;
  border-radius: 2px;
  margin-bottom: 1.25rem;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: #3a7d44;
  border-radius: 2px;
  transition: width 0.3s ease;
}

.question-text {
  font-size: 1.15rem;
  line-height: 1.6;
  margin-bottom: 1.75rem;
}

.select-all-hint {
  font-size: 0.85em;
  color: #999;
  font-style: italic;
  margin-left: 0.25rem;
}

.choices {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.choices form {
  width: 100%;
}

.choice-btn {
  width: 100%;
  text-align: left;
  padding: 0.75rem 1rem;
  font-size: 1rem;
  font-family: inherit;
  color: #222;
  background: #fafafa;
  border: 1px solid #ccc;
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.15s;
  -webkit-appearance: none;
}

.choice-btn:hover {
  background: #eef2ff;
  border-color: #99a;
}

/* Feedback card */
.feedback {
  border-left: 5px solid #ccc;
}

.feedback.correct {
  border-left-color: #3a7d44;
}

.feedback.incorrect {
  border-left-color: #b94040;
}

.result-label {
  font-size: 1.3rem;
  font-weight: bold;
  margin-bottom: 0.75rem;
}

.feedback.correct .result-label { color: #3a7d44; }
.feedback.incorrect .result-label { color: #b94040; }

.correct-answer {
  font-size: 1rem;
  line-height: 1.5;
  margin-bottom: 0.5rem;
}

.your-answer {
  font-size: 0.9rem;
  color: #888;
  margin-bottom: 1.25rem;
}

.next-btn {
  margin-top: 1.5rem;
  padding: 0.7rem 1.6rem;
  font-size: 1rem;
  font-family: inherit;
  background: #2c3e7a;
  color: #fff;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}

.next-btn:hover {
  background: #1e2d5e;
}

.done-msg {
  color: #666;
  font-style: italic;
  margin-top: 0.5rem;
}

.quota-done {
  margin-top: 1.25rem;
  padding: 0.85rem 1rem;
  background: #f0f7f1;
  border: 1px solid #b2d9b8;
  border-radius: 4px;
  color: #2d6235;
  font-size: 0.95rem;
}

.next-btn.secondary {
  background: #888;
}

.next-btn.secondary:hover {
  background: #666;
}

/* Speak button */
.speak-btn {
  display: inline;
  background: none;
  border: none;
  padding: 0 0 0 0.3rem;
  font-size: 0.9em;
  cursor: pointer;
  opacity: 0.4;
  vertical-align: middle;
  line-height: 1;
}

.speak-btn:hover {
  opacity: 0.9;
}

/* Multi-select checkboxes */
.check-label {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  padding: 0.6rem 0.75rem;
  border: 1px solid #ccc;
  border-radius: 4px;
  background: #fafafa;
  cursor: pointer;
  font-size: 1rem;
  line-height: 1.4;
}

.check-label:hover {
  background: #eef2ff;
  border-color: #99a;
}

.check-label input[type="checkbox"] {
  margin-top: 0.15rem;
  flex-shrink: 0;
  width: 1.1em;
  height: 1.1em;
  cursor: pointer;
}

.selection-count {
  font-size: 0.85rem;
  color: #aaa;
  margin-top: 0.5rem;
}

.submit-btn {
  margin-top: 1rem;
  padding: 0.7rem 1.6rem;
  font-size: 1rem;
  font-family: inherit;
  background: #3a7d44;
  color: #fff;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}

.submit-btn:hover {
  background: #2d6235;
}

/* Answer bullets (no native list markers) */
.answer-bullets {
  list-style: none;
  margin: 0.5rem 0 0.75rem 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.answer-bullets li {
  padding: 0.3rem 0;
  border-bottom: 1px solid #eee;
  font-size: 0.95rem;
  line-height: 1.45;
}

.answer-bullets li:last-child {
  border-bottom: none;
}

.your-selected li {
  color: #b94040;
}

.answer-hit {
  color: #3a7d44;
  font-weight: 500;
}

.answer-hit::before {
  content: '✓ ';
}

.answer-miss {
  color: #999;
}

.answer-wrong {
  color: #b94040;
}

/* Full answer block shown on wrong answers */
.full-answer {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid #ddd;
  font-size: 0.95rem;
  line-height: 1.6;
  color: #333;
}

/* Name entry */
.name-entry-title {
  font-size: 1.4rem;
  font-weight: bold;
  margin-bottom: 0.4rem;
}

.name-entry-subtitle {
  color: #666;
  margin-bottom: 1.25rem;
}

.name-input {
  width: 100%;
  padding: 0.75rem 1rem;
  font-size: 1rem;
  font-family: inherit;
  border: 1px solid #ccc;
  border-radius: 4px;
  background: #fafafa;
  margin-bottom: 1rem;
  outline: none;
}

.name-input:focus {
  border-color: #2c3e7a;
  background: #fff;
}

.feedback-label,
.your-answer-label {
  font-size: 0.85rem;
  font-weight: bold;
  color: #555;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-top: 0.75rem;
  margin-bottom: 0.25rem;
}
