/*
  Styles for the interactive passages practice page.
  Keep lesson-specific layout here so the main landing page stylesheet stays simple.
*/

.passages-body {
  background:
    radial-gradient(circle at top left, rgba(15, 157, 143, 0.16), transparent 28%),
    radial-gradient(circle at right center, rgba(255, 182, 72, 0.18), transparent 24%),
    linear-gradient(180deg, #eef6ff 0%, #f8fbff 100%);
}

.practice-page {
  max-width: 1300px;
  margin: 0 auto;
}

.practice-topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.practice-title-block {
  flex: 1;
  min-width: 280px;
}

.practice-title-block h1 {
  margin: 0 0 8px;
  font-size: clamp(2rem, 4vw, 3.2rem);
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.practice-title-block p:last-child {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.practice-progress-card {
  min-width: 280px;
  padding: 16px 18px;
  border: 1px solid var(--border);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.84);
  box-shadow: var(--shadow);
}

.practice-progress-label {
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 0.95rem;
}

.practice-progress-bar {
  width: 100%;
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: #dbe6f5;
}

.practice-progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--primary), #14b8a6);
  transition: width 0.3s ease;
}

.practice-layout {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 20px;
  align-items: start;
}

.practice-panel,
.question-card {
  border: 1px solid var(--border);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: var(--shadow);
}

.practice-panel {
  overflow: hidden;
}

.practice-panel-header {
  padding: 18px 20px;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
}

.practice-panel-header h2,
.practice-panel-header h3 {
  margin: 0 0 8px;
  font-size: 1.2rem;
}

.practice-meta {
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.5;
}

.practice-panel-body {
  padding: 20px;
}

.passage-topic {
  margin: 0 0 12px;
  font-size: 1.15rem;
}

.passage-text {
  font-size: 1rem;
  line-height: 1.8;
  white-space: pre-wrap;
  color: var(--text);
}

.diagram {
  margin-top: 18px;
  padding: 12px 14px;
  border: 1px dashed #94a3b8;
  border-radius: 14px;
  background: #f8fafc;
  color: #334155;
  font-size: 0.95rem;
}

.question-card {
  padding: 16px;
  margin-bottom: 16px;
  transition: 0.2s ease;
}

.question-card.correct {
  background: #ecfdf3;
  border-color: #22c55e;
}

.question-card.wrong {
  background: #fef2f2;
  border-color: #ef4444;
}

.question-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 10px;
}

.q-number {
  margin-bottom: 5px;
  color: var(--muted);
  font-size: 0.85rem;
}

.q-text {
  font-weight: 700;
  line-height: 1.45;
}

.status-pill {
  padding: 6px 10px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 700;
  white-space: nowrap;
}

.status-pill.pending {
  border-color: #bfdbfe;
  background: #eff6ff;
  color: #1d4ed8;
}

.status-pill.correct {
  border-color: #86efac;
  background: #dcfce7;
  color: #166534;
}

.status-pill.wrong {
  border-color: #fca5a5;
  background: #fee2e2;
  color: #991b1b;
}

.options {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.option-btn,
.action-btn,
.next-btn {
  appearance: none;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: white;
  color: var(--text);
  cursor: pointer;
  font-size: 0.96rem;
  transition: 0.2s ease;
}

.option-btn:hover,
.action-btn:hover,
.next-btn:hover {
  border-color: #93c5fd;
  transform: translateY(-1px);
}

.option-btn:disabled,
.action-btn:disabled {
  cursor: not-allowed;
  opacity: 0.85;
  transform: none;
}

.option-btn.correct-choice {
  border-color: #22c55e;
  background: #dcfce7;
  font-weight: 700;
}

.option-btn.wrong-choice {
  border-color: #ef4444;
  background: #fee2e2;
  font-weight: 700;
}

.fib-wrap {
  margin-top: 12px;
}

.fib-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.fib-input {
  flex: 1;
  min-width: 220px;
  padding: 12px 14px;
  border: 1px solid #cbd5e1;
  border-radius: 12px;
  font-size: 0.96rem;
  outline: none;
}

.fib-input:focus {
  border-color: #60a5fa;
  box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.15);
}

.feedback {
  margin-top: 10px;
  font-size: 0.93rem;
  line-height: 1.5;
}

.feedback.correct {
  color: #166534;
  font-weight: 700;
}

.feedback.wrong {
  color: #991b1b;
}

.correct-answer-inline {
  display: block;
  margin-top: 8px;
  padding: 8px 10px;
  border-left: 4px solid #ef4444;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
  font-weight: 700;
}

.summary-box {
  margin-top: 18px;
  padding: 16px;
  border: 1px solid #fb923c;
  border-radius: 16px;
  background: #fff7ed;
}

.summary-box h4 {
  margin: 0 0 8px;
  font-size: 1.05rem;
}

.summary-box p {
  margin: 0 0 10px;
  line-height: 1.5;
}

.summary-list {
  margin: 10px 0 0;
  padding-left: 18px;
  line-height: 1.6;
}

.summary-list li {
  margin-bottom: 10px;
}

.next-wrap {
  display: flex;
  justify-content: flex-end;
  margin-top: 14px;
}

.next-btn {
  padding: 12px 18px;
  border-color: var(--primary);
  background: var(--primary);
  color: white;
  font-weight: 700;
}

.complete-screen {
  padding: 48px 20px;
  text-align: center;
}

@media (max-width: 950px) {
  .practice-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .practice-progress-card {
    min-width: unset;
    width: 100%;
  }

  .practice-panel-header,
  .practice-panel-body,
  .question-card {
    padding: 16px;
  }
}
