/* ============================================================
   CPC-4 ZEV Myths — Course Stylesheet
   Edit freely. No external dependencies.
   ============================================================ */

:root {
  --primary:        #1a5276;
  --primary-dark:   #154360;
  --primary-light:  #eaf2f8;
  --success:        #1e8449;
  --success-light:  #d5f5e3;
  --error:          #922b21;
  --error-light:    #fadbd8;
  --concern-bg:     #fef9e7;
  --concern-border: #e67e22;
  --bg:             #f4f6f8;
  --card-bg:        #ffffff;
  --border:         #dde1e6;
  --text:           #1a1a1a;
  --muted:          #666;
  --radius:         8px;
}

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

/* ---- Base ---- */
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.75;
  font-size: 17px;
}

a { color: var(--primary); }

/* ---- Page wrapper ---- */
#app {
  max-width: 860px;
  margin: 0 auto;
  padding: 24px 20px 60px;
}

/* ---- Site header (shown on every view) ---- */
.site-header {
  display: flex;
  align-items: baseline;
  gap: 12px;
  padding-bottom: 14px;
  margin-bottom: 28px;
  border-bottom: 3px solid var(--primary);
}
.site-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--primary);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.site-subtitle {
  font-size: 0.85rem;
  color: var(--muted);
}

/* ---- Breadcrumb ---- */
.breadcrumb {
  font-size: 0.88rem;
  color: var(--muted);
  margin-bottom: 20px;
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  align-items: center;
}
.breadcrumb .crumb {
  color: var(--primary);
  cursor: pointer;
  text-decoration: underline;
  background: none;
  border: none;
  font: inherit;
  font-size: 0.88rem;
  padding: 0;
}
.breadcrumb .crumb:hover { color: var(--primary-dark); }
.breadcrumb .sep { color: var(--muted); }

/* ---- Page headings ---- */
h1 {
  font-size: 2rem;
  color: var(--primary);
  margin-bottom: 8px;
  line-height: 1.25;
}
h2 {
  font-size: 1.35rem;
  color: var(--text);
  margin-bottom: 12px;
}
h3 {
  font-size: 1.1rem;
  margin-bottom: 8px;
}

/* ---- Cards (generic) ---- */
.card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 32px;
  margin-bottom: 20px;
}

/* ---- Intro view ---- */
.intro-body p { margin-bottom: 16px; }
.intro-body p:last-child { margin-bottom: 0; }

/* ---- Outcome list ---- */
.outcome-list { display: grid; gap: 14px; }

.outcome-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-left: 5px solid var(--primary);
  border-radius: var(--radius);
  padding: 20px 24px;
  cursor: pointer;
  transition: box-shadow 0.15s ease, transform 0.12s ease;
  display: flex;
  align-items: center;
  gap: 16px;
  text-align: left;
  width: 100%;
  font: inherit;
}
.outcome-card:hover {
  box-shadow: 0 4px 18px rgba(0,0,0,0.09);
  transform: translateY(-2px);
}
.outcome-number {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--primary);
  opacity: 0.35;
  min-width: 36px;
  line-height: 1;
}
.outcome-card-body { flex: 1; }
.outcome-card h3 {
  font-size: 1.1rem;
  color: var(--primary);
  margin-bottom: 4px;
}
.outcome-tasks {
  font-size: 0.85rem;
  color: var(--muted);
  line-height: 1.4;
}
.outcome-arrow {
  font-size: 1.4rem;
  color: var(--primary);
  opacity: 0.5;
}

/* ---- Progress bar ---- */
.progress-wrap {
  margin-bottom: 24px;
}
.progress-label {
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.progress-bar {
  background: var(--border);
  height: 6px;
  border-radius: 3px;
  overflow: hidden;
}
.progress-fill {
  background: var(--primary);
  height: 100%;
  border-radius: 3px;
  transition: width 0.35s ease;
}

/* ---- Learning task content ---- */
.task-meta {
  font-size: 0.85rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 6px;
}

.concern-box {
  background: var(--concern-bg);
  border-left: 4px solid var(--concern-border);
  border-radius: 4px;
  padding: 18px 22px;
  margin: 20px 0 24px;
}
.concern-label {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #935116;
  margin-bottom: 6px;
}
.concern-box p {
  margin: 0;
  font-style: italic;
  color: #5d3a1a;
  line-height: 1.65;
}

.task-body p { margin-bottom: 16px; }
.task-body p:last-child { margin-bottom: 0; }

.sources-section {
  margin-top: 28px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
}
.sources-label {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin-bottom: 8px;
}
.sources-section ul { list-style: none; }
.sources-section li { font-size: 0.88rem; margin-bottom: 4px; }

/* ---- Buttons ---- */
.btn {
  display: inline-block;
  padding: 14px 30px;
  border: none;
  border-radius: 6px;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.14s, box-shadow 0.14s, transform 0.1s;
  line-height: 1.2;
  text-decoration: none;
  font-family: inherit;
}
.btn:active { transform: scale(0.97); }

.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); box-shadow: 0 3px 10px rgba(0,0,0,0.15); }

.btn-secondary { background: #e0e4e9; color: var(--text); }
.btn-secondary:hover { background: #cdd2d9; }

.btn-success { background: var(--success); color: #fff; }
.btn-success:hover { background: #166a38; box-shadow: 0 3px 10px rgba(0,0,0,0.15); }

.btn-outline {
  background: transparent;
  color: var(--primary);
  border: 2px solid var(--primary);
}
.btn-outline:hover { background: var(--primary-light); }

.btn-muted {
  background: transparent;
  color: var(--muted);
  border: 2px solid var(--border);
}
.btn-muted:hover { background: var(--border); color: var(--text); }

.nav-row {
  display: flex;
  gap: 12px;
  margin-top: 32px;
  flex-wrap: wrap;
  align-items: center;
}
.nav-row .spacer { flex: 1; }

/* ---- Quiz ---- */
.quiz-label {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin-bottom: 4px;
}
.quiz-task-title {
  font-size: 0.9rem;
  color: var(--muted);
  font-style: italic;
  margin-bottom: 18px;
}

.question-text {
  font-size: 1.1rem;
  font-weight: 600;
  line-height: 1.5;
  margin-bottom: 22px;
}

.answer-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 20px;
}

.answer-btn {
  text-align: left;
  padding: 14px 20px;
  background: var(--card-bg);
  border: 2px solid var(--border);
  border-radius: 6px;
  font-size: 0.97rem;
  font-family: inherit;
  cursor: pointer;
  transition: border-color 0.14s, background 0.14s;
  line-height: 1.45;
}
.answer-btn:hover:not(:disabled) {
  border-color: var(--primary);
  background: var(--primary-light);
}
.answer-btn:disabled { cursor: default; }

.answer-btn.state-correct {
  border-color: var(--success);
  background: var(--success-light);
  color: #145a32;
  font-weight: 700;
}
.answer-btn.state-wrong {
  border-color: var(--error);
  background: var(--error-light);
  color: #7b241c;
}
.answer-btn.state-show-correct {
  border-color: var(--success);
  background: var(--success-light);
  color: #145a32;
  font-weight: 700;
}

.feedback {
  padding: 14px 18px;
  border-radius: 6px;
  margin-bottom: 18px;
  font-size: 0.95rem;
  line-height: 1.5;
}
.feedback-correct {
  background: var(--success-light);
  border-left: 4px solid var(--success);
  color: #145a32;
}
.feedback-wrong {
  background: var(--error-light);
  border-left: 4px solid var(--error);
  color: #7b241c;
}

.skip-btn {
  background: none;
  border: none;
  color: var(--muted);
  font-size: 0.88rem;
  font-family: inherit;
  cursor: pointer;
  text-decoration: underline;
  padding: 0;
}
.skip-btn:hover { color: var(--text); }

/* ---- Quiz complete / score ---- */
.score-card {
  text-align: center;
  padding: 36px 32px;
}
.score-number {
  font-size: 3.5rem;
  font-weight: 700;
  color: var(--primary);
  line-height: 1;
  margin-bottom: 6px;
}
.score-caption {
  font-size: 1rem;
  color: var(--muted);
  margin-bottom: 6px;
}
.score-note {
  font-size: 0.9rem;
  color: var(--muted);
  margin-bottom: 24px;
}
.complete-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 16px;
}

/* ---- Outcome intro page ---- */
.outcome-intro-badge {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--primary);
  background: var(--primary-light);
  border-radius: 4px;
  padding: 4px 10px;
  margin-bottom: 14px;
}
.outcome-intro-text {
  font-size: 1.08rem;
  line-height: 1.75;
  color: var(--text);
  margin-bottom: 28px;
}
.task-list-preview {
  list-style: none;
  padding: 0;
  margin: 0;
}
.task-list-preview li {
  display: flex;
  align-items: baseline;
  gap: 12px;
  padding: 11px 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.97rem;
}
.task-list-preview li:first-child { border-top: 1px solid var(--border); }
.task-list-num {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--primary);
  opacity: 0.6;
  min-width: 28px;
}

/* ---- Responsive ---- */
@media (max-width: 600px) {
  #app { padding: 16px 14px 40px; }
  h1 { font-size: 1.5rem; }
  .card { padding: 20px 18px; }
  .outcome-card { padding: 16px 18px; }
  .btn { padding: 13px 22px; font-size: 0.95rem; }
  .score-number { font-size: 2.8rem; }
}
