:root {
  --bg-1: linear-gradient(149.54deg, #eff6ff 0%, #e0e7ff 100%);
  --bg-2: linear-gradient(135deg, #f9f3ee 0%, #f6ece5 100%);
  --bg-3: linear-gradient(135deg, #f6f0fb 0%, #efe5f8 100%);
  --bg-step: linear-gradient(135deg, #e2f2f9 0%, #cce9f3 100%);
  --card: #f3f4f6;
  --text: #1f2937;
  --muted: #4b5563;
  --line: #d1d5db;
  --brand: #2563eb;
  --danger: #ef4444;
  --violet: #a420f0;
  --button-shadow: 0 10px 15px rgba(0, 0, 0, 0.1), 0 4px 6px rgba(0, 0, 0, 0.1);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Inter", sans-serif;
  color: var(--text);
}

.app-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px 14px;
  transition: background 250ms ease;
}

.training-screen {
  width: min(100%, 672px);
}

.card {
  background: var(--card);
  border-radius: 16px;
  box-shadow: 0 20px 35px rgba(0, 0, 0, 0.2);
  padding: 22px;
}

.header-row {
  font-size: 11px;
  color: #475467;
  margin-bottom: 14px;
}

.back-link {
  appearance: none;
  border: 1px solid #cbd5e1;
  background: #f8fafc;
  border-radius: 8px;
  padding: 6px 10px;
  font: inherit;
  color: #334155;
  cursor: pointer;
}

.back-link:hover {
  background: #f1f5f9;
}

.topline {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-bottom: 10px;
}

.topline .badge {
  background: #dbeafe;
  color: #2563eb;
  border-radius: 999px;
  font-size: 10px;
  padding: 4px 8px;
  font-weight: 700;
}

.topline .phase {
  color: #16a34a;
  font-size: 10px;
  font-weight: 600;
}

.title {
  margin: 0 0 10px;
  font-size: clamp(30px, 4vw, 48px);
  line-height: 1.05;
  text-align: center;
  font-weight: 800;
  color: #111827;
}

.subtitle {
  margin: 0;
  text-align: center;
  font-size: 20px;
  color: #4f39f6;
}

.icon-wrap {
  width: 112px;
  height: 112px;
  border-radius: 999px;
  margin: 0 auto 18px;
  background: #ffe2e2;
  display: grid;
  place-items: center;
  color: #e11d48;
  font-size: 38px;
}

.content-box {
  background: #f9fafb;
  border-radius: 10px;
  padding: 16px;
  margin-top: 20px;
  color: #374151;
  font-size: 14px;
  line-height: 1.6;
}

.alert {
  margin-top: 16px;
  padding: 12px 14px;
  border-left: 4px solid #fe9a00;
  background: #fffbeb;
  color: #973c00;
  font-size: 12px;
  line-height: 1.4;
}

.alert.red {
  border-left-color: #ef4444;
  background: #fef2f2;
  color: #7f1d1d;
}

.alert.blue {
  border-left-color: #3b82f6;
  background: #eff6ff;
  color: #1f2937;
}

.btn {
  width: 100%;
  border: 0;
  border-radius: 8px;
  height: 48px;
  margin-top: 14px;
  color: #fff;
  font-weight: 600;
  cursor: pointer;
  transition: transform 180ms ease, opacity 180ms ease;
}

.btn:active {
  transform: translateY(1px);
}

.btn.primary {
  background: #4f39f6;
  box-shadow: var(--button-shadow);
}

.btn.blue {
  background: #2563eb;
  box-shadow: var(--button-shadow);
}

.btn.red {
  background: #e7000b;
  box-shadow: var(--button-shadow);
}

.btn.violet {
  background: #a020f0;
  box-shadow: var(--button-shadow);
}

.btn.submit {
  background: #98a2b3;
}

.btn.submit.enabled {
  background: #2563eb;
  box-shadow: var(--button-shadow);
}

.topic-title {
  margin: 6px 0 8px;
  font-size: 40px;
  line-height: 1.1;
}

.topic-title.small {
  font-size: clamp(28px, 4vw, 42px);
  text-align: left;
  margin-top: 0;
}

.progress {
  height: 4px;
  border-radius: 999px;
  background: #d1d5db;
  overflow: hidden;
  margin-bottom: 14px;
}

.progress > span {
  display: block;
  height: 100%;
  background: #2563eb;
}

.list-box {
  margin-top: 12px;
  background: #f7f8fa;
  border-radius: 8px;
  padding: 12px;
}

.list-title {
  margin: 0 0 8px;
  font-weight: 700;
}

.bullets {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 8px;
}

.bullets li {
  font-size: 12px;
  color: #374151;
  line-height: 1.35;
  display: flex;
  gap: 7px;
  align-items: flex-start;
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #ef4444;
  margin-top: 4px;
  flex-shrink: 0;
}

.dot.blue {
  background: #2563eb;
}

.dot.green {
  background: #16a34a;
}

.quiz-head {
  background: #eaf0fa;
  border-left: 3px solid #3b82f6;
  border-radius: 2px;
  padding: 10px;
  margin-bottom: 10px;
}

.quiz-title {
  margin: 0;
  font-weight: 700;
  font-size: 18px;
}

.quiz-question {
  margin: 6px 0 0;
  font-size: 12px;
  color: #4b5563;
}

.option {
  border: 1px solid #bfc7d4;
  border-radius: 7px;
  padding: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 7px;
  font-size: 13px;
  cursor: pointer;
  background: #f3f4f6;
}

.option:hover {
  background: #eef2f7;
}

.option input {
  margin: 0;
}

.feedback {
  margin-top: 8px;
  border-radius: 8px;
  padding: 10px;
  font-size: 12px;
  display: none;
}

.feedback.correct {
  display: block;
  background: #dcfce7;
  color: #166534;
}

.feedback.incorrect {
  display: block;
  background: #fee2e2;
  color: #991b1b;
}

.video {
  margin-top: 8px;
  height: 205px;
  border-radius: 6px;
  background: #000;
  overflow: hidden;
}

.video iframe {
  width: 100%;
  height: 100%;
  border: 0;
}

.play {
  width: 70px;
  height: 70px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  border: 0;
  color: #fff;
  font-size: 34px;
}

.video p {
  margin: 10px 0 0;
  font-size: 12px;
}

.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 16px;
}

.center {
  text-align: center;
}

@media (max-width: 720px) {
  .card {
    padding: 16px;
  }

  .grid-2 {
    grid-template-columns: 1fr;
  }

  .icon-wrap {
    width: 92px;
    height: 92px;
    font-size: 28px;
  }

  .subtitle {
    font-size: 16px;
  }
}

/* ── Assessment ── */
.assess-card .topline {
  margin-bottom: 6px;
}

.assess-q {
  margin-bottom: 14px;
}

.q-badge {
  display: inline-block;
  background: #ede9fe;
  color: #7c3aed;
  font-size: 10px;
  font-weight: 700;
  border-radius: 999px;
  padding: 3px 10px;
  margin-bottom: 6px;
}

.q-text {
  font-size: 13px;
  font-weight: 600;
  margin: 0 0 8px;
}

.btn.assess-submit {
  background: #9810fa;
  box-shadow: var(--button-shadow);
}

/* Drag list */
.drag-list {
  display: grid;
  gap: 6px;
}

.drag-item {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #f3f4f6;
  border: 1px solid #d1d5db;
  border-radius: 7px;
  padding: 10px;
  font-size: 13px;
  cursor: grab;
  user-select: none;
}

.drag-item.dragging {
  opacity: 0.4;
}

.drag-item.drag-over {
  border-color: #7c3aed;
  background: #f5f3ff;
}

.drag-item.drag-selected {
  border-color: #7c3aed;
  background: #ede9fe;
}

.drag-handle {
  color: #9ca3af;
  font-size: 14px;
}

/* ── Completion ── */
.complete-card .list-box {
  margin-bottom: 4px;
}
