* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: 'Work Sans', system-ui, sans-serif;
  background: #f7f8fb;
  color: #1f2937;
}
.wrap {
  max-width: 760px;
  margin: 0 auto;
  padding: 32px 16px 64px;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.header {
  width: 100%;
  max-width: 680px;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 24px;
}
.header h1 {
  font-family: 'Baloo 2', system-ui, sans-serif;
  font-size: 26px;
  font-weight: 700;
  color: #6d28d9;
  margin: 0;
}
.screen { width: 100%; display: flex; flex-direction: column; align-items: center; }
.screen[hidden] { display: none; }

.tabs {
  width: 100%;
  max-width: 680px;
  display: flex;
  flex-wrap: wrap;
  border-bottom: 2px solid #e5e7eb;
  margin-bottom: 20px;
}
.tab-btn {
  flex: 1;
  min-width: 100px;
  padding: 12px 8px;
  background: none;
  border: none;
  border-bottom: 3px solid transparent;
  cursor: pointer;
  font-weight: 600;
  font-size: 13.5px;
  color: #6b7280;
  font-family: inherit;
}
.tab-btn.active { color: #6d28d9; border-bottom-color: #6d28d9; }

.card {
  width: 100%;
  max-width: 680px;
  background: #fff;
  border: 1px solid #eee;
  border-radius: 14px;
  padding: 20px 22px;
  margin-bottom: 24px;
}
.tab-panel[hidden] { display: none; }
.tab-panel p { margin: 0 0 10px; font-size: 14px; line-height: 1.7; color: #374151; }
.tab-panel ol { margin: 0 0 10px; padding-left: 20px; font-size: 14px; line-height: 1.9; color: #374151; }
.benefits-title { font-family: 'Baloo 2', system-ui, sans-serif; font-size: 15px; font-weight: 700; margin: 14px 0 8px; color: #111827; }
.benefits-title:first-child { margin-top: 0; }
.source-note { font-size: 11px; color: #9ca3af; margin-top: 12px; }
.source-note a { color: #6d28d9; }

.disclaimer-box {
  margin-top: 16px;
  padding: 14px 16px;
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: 10px;
  font-size: 12.5px;
  line-height: 1.7;
  color: #78350f;
}
.disclaimer-box strong { color: #92400e; }

.field-group {
  width: 100%;
  max-width: 380px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 26px;
}
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 13px; font-weight: 600; color: #374151; }
.field input, .field select {
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid #d1d5db;
  font-size: 14px;
  font-family: inherit;
  width: 100%;
}
.field .hint { font-size: 11px; color: #9ca3af; }

.amount { font-family: 'Baloo 2', system-ui, sans-serif; font-size: 22px; font-weight: 700; margin-bottom: 20px; text-align: center; }
.amount .sub { font-size: 14px; font-weight: 500; color: #6b7280; }

.primary-btn {
  padding: 14px 28px;
  border-radius: 12px;
  border: none;
  background: #6d28d9;
  color: #fff;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  font-family: inherit;
}
.primary-btn:disabled { background: #d1d5db; cursor: not-allowed; }
.primary-btn:not(:disabled):hover { background: #5b21b6; }

.secondary-btn {
  padding: 10px 20px;
  border-radius: 12px;
  border: 1px solid #d1d5db;
  background: #fff;
  color: #6b7280;
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
  font-family: inherit;
}
.secondary-btn:hover { color: #b91c1c; border-color: #fca5a5; }
.secondary-btn.confirm-pending { color: #fff; background: #b91c1c; border-color: #b91c1c; }
.secondary-btn:disabled { cursor: not-allowed; opacity: 0.7; }

.privacy-note {
  width: 100%;
  max-width: 420px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-size: 11px;
  color: #9ca3af;
  text-align: center;
  line-height: 1.6;
}

.error-banner {
  width: 100%;
  max-width: 680px;
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #991b1b;
  border-radius: 10px;
  padding: 10px 14px;
  font-size: 13px;
  margin-bottom: 16px;
}
.error-banner[hidden] { display: none; }

.center-card { text-align: center; margin-top: 40px; padding: 36px 26px; }
.status-line { display: flex; align-items: center; justify-content: center; gap: 6px; color: #059669; font-weight: 700; font-size: 14px; margin-bottom: 10px; }
.center-card h2 { font-family: 'Baloo 2', system-ui, sans-serif; font-size: 19px; margin: 0 0 8px; }
.center-card .desc { font-size: 13px; color: #6b7280; margin-bottom: 22px; }

.practice-top {
  width: 100%;
  max-width: 760px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
}
.practice-top h2 { font-family: 'Baloo 2', system-ui, sans-serif; font-size: 18px; margin: 0; }
.practice-top-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}
.timer {
  display: flex;
  align-items: center;
  gap: 6px;
  background: #111827;
  color: #fff;
  padding: 8px 14px;
  border-radius: 20px;
  font-family: 'Baloo 2', system-ui, sans-serif;
  font-size: 15px;
  font-weight: 700;
  white-space: nowrap;
}
.timer.low { background: #b45309; }

.stop-btn-top {
  padding: 8px 14px;
  font-size: 12.5px;
  max-width: 220px;
}

.sample-note { width: 100%; max-width: 760px; font-size: 11px; color: #9ca3af; margin-bottom: 14px; }

#practiceContent { width: 100%; display: flex; flex-direction: column; align-items: center; }
#practiceContent[hidden] { display: none; }

/* ---- Question cards (replaces BAPractice's separate question-list/answer-list
   split — passages and multi-part TOEFL items read better with the answer
   revealed right under their own question than in a separate section far below) ---- */
.q-list { width: 100%; max-width: 760px; display: flex; flex-direction: column; gap: 18px; margin: 0 0 16px; }
.q-card {
  background: #fff;
  border: 1px solid #eee;
  border-radius: 14px;
  padding: 18px 20px;
}
.passage-box {
  background: #f9fafb;
  border-radius: 10px;
  padding: 14px 16px;
  margin-bottom: 12px;
  font-size: 13.5px;
  line-height: 1.8;
  color: #374151;
  white-space: pre-wrap;
}
.q-stem { font-size: 15px; margin-bottom: 8px; }
.q-stem .num { font-weight: 700; color: #6d28d9; }
.opt-group { margin: 0 0 10px 20px; display: flex; flex-direction: column; gap: 4px; }
.opt { font-size: 14px; color: #374151; }
.opt-letter { font-weight: 600; color: #1f2937; }

.blank-block { margin: 6px 0 10px 20px; }
.blank-label { font-size: 12.5px; font-weight: 700; color: #6b7280; margin-bottom: 4px; }
.hint-line { font-size: 13px; color: #6b7280; margin: 0 0 10px; }
.hint-line code { background: #f3f4f6; padding: 2px 6px; border-radius: 6px; font-family: 'Courier New', monospace; }

.sub-q { margin-top: 16px; padding-top: 14px; border-top: 1px solid #f3f4f6; }
.sub-q:first-of-type { margin-top: 12px; }

.reveal-btn {
  font-size: 12.5px;
  font-weight: 700;
  color: #fff;
  background: #6d28d9;
  border: none;
  border-radius: 8px;
  padding: 7px 14px;
  cursor: pointer;
  font-family: inherit;
}
.reveal-btn:hover { background: #5b21b6; }
.solution {
  margin-top: 10px;
  padding: 12px 14px;
  background: #f5f3ff;
  border-radius: 10px;
  font-size: 13px;
  color: #374151;
  line-height: 1.7;
}
.solution[hidden] { display: none; }
.solution-answer { font-weight: 700; color: #4c1d95; margin-bottom: 4px; }

.section-title { font-weight: 700; margin-bottom: 14px; font-size: 14px; width: 100%; max-width: 760px; }

.site-footer {
  width: 100%;
  max-width: 680px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
  justify-content: center;
  margin-top: 12px;
  padding-top: 20px;
  border-top: 1px solid #eee;
  font-size: 12px;
}
.site-footer a { color: #6b7280; text-decoration: none; }
.site-footer a:hover { color: #6d28d9; text-decoration: underline; }
