/* Styles for Lesson 15: Dirty Electricity */

:root {
  --ink: #152239;
  --muted: #586579;
  --blue: #235ad3;
  --lime: #a8f074;
  --line: #dce2e9;
  --paper: #f5f7f9;
  --accent-green: #10b981;
  --accent-amber: #f59e0b;
  --accent-red: #ef4444;
  --radius: 12px;
}

/* Tabs */
.lesson-tabs {
  display: flex;
  gap: 10px;
  margin: 24px 0 16px;
  overflow-x: auto;
  padding-bottom: 6px;
}

.tab-btn {
  background: var(--paper);
  border: 1px solid var(--line);
  color: var(--ink);
  font-weight: 600;
  font-size: 14px;
  padding: 10px 18px;
  border-radius: 8px;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
}

.tab-btn:hover {
  border-color: var(--blue);
  color: var(--blue);
}

.tab-btn.active {
  background: var(--ink);
  color: #fff;
  border-color: var(--ink);
}

.lesson-panel {
  margin-top: 10px;
  padding: 32px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.panel-subtitle {
  color: var(--muted);
  font-size: 15px;
  margin-top: -6px;
  margin-bottom: 24px;
  line-height: 1.6;
}

/* Chapter 0: DE Concepts */
.de-concept-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}

.de-concept-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 20px;
}

.de-icon {
  font-size: 26px;
  margin-bottom: 8px;
  display: block;
}

.de-concept-card h3 {
  margin: 0 0 6px;
  font-size: 16px;
  color: var(--ink);
}

.de-concept-card p {
  margin: 0;
  font-size: 13.5px;
  color: var(--muted);
  line-height: 1.5;
}

/* Chapter 1: Oscilloscope */
.scope-nav-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 20px;
}

.scope-btn {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px 10px;
  text-align: left;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 4px;
  transition: all 0.2s ease;
}

.scope-btn:hover {
  border-color: var(--blue);
}

.scope-btn.active {
  background: #edf2fc;
  border-color: var(--blue);
  outline: 2px solid var(--blue);
}

.scope-btn strong {
  font-size: 13px;
  color: var(--ink);
}

.scope-btn span {
  font-size: 11px;
  color: var(--muted);
}

.scope-stage-card {
  background: #0f172a;
  border-radius: 12px;
  padding: 24px;
  color: #fff;
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 24px;
  align-items: center;
}

.scope-screen-wrapper {
  background: #090d16;
  border: 2px solid #334155;
  border-radius: 10px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.8);
}

.scope-header {
  display: flex;
  justify-content: space-between;
  font-size: 9px;
  font-weight: 700;
  color: #94a3b8;
  letter-spacing: 0.05em;
}

.scope-mode-tag {
  color: #60a5fa;
}

.scope-display-grid {
  height: 160px;
  width: 100%;
}

.scope-display-grid svg {
  width: 100%;
  height: 100%;
}

.scope-readout-panel {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.scope-meter-val {
  background: #1e293b;
  border-radius: 8px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.m-sub {
  font-size: 10px;
  font-weight: 700;
  color: #94a3b8;
  letter-spacing: 0.05em;
}

.m-val-stat {
  font-size: 22px;
  font-weight: 800;
  font-family: monospace;
}

.m-val-stat.green { color: #34d399; }
.m-val-stat.amber { color: #fbbf24; }
.m-val-stat.red { color: #f87171; }

.m-verdict {
  font-size: 11px;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 4px;
  width: fit-content;
  margin-top: 4px;
  letter-spacing: 0.05em;
}

.m-verdict.green {
  background: rgba(16, 185, 129, 0.2);
  color: #6ee7b7;
}

.m-verdict.amber {
  background: rgba(245, 158, 11, 0.2);
  color: #fde68a;
}

.m-verdict.red {
  background: rgba(239, 68, 68, 0.2);
  color: #fca5a5;
}

.scope-explanation {
  margin: 0;
  color: #cbd5e1;
  font-size: 13.5px;
  line-height: 1.6;
}

/* Chapter 2: Benchmarks */
.meters-benchmark-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.m-explainer-card, .benchmark-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 24px;
}

.m-explainer-card h3, .benchmark-card h3 {
  margin: 0 0 10px;
  font-size: 18px;
  color: var(--ink);
}

.m-explainer-card p {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}

.meter-note {
  background: #edf2fc;
  border-left: 3px solid var(--blue);
  padding: 10px 12px;
  border-radius: 0 6px 6px 0;
  font-size: 13px;
  color: #1e3a8a;
  margin-top: 14px;
}

.b-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.b-item {
  padding: 10px 14px;
  border-radius: 6px;
  font-size: 13px;
  line-height: 1.4;
}

.b-green {
  background: #f0fdf4;
  color: #166534;
  border: 1px solid #bbf7d0;
}

.b-yellow {
  background: #fefce8;
  color: #854d0e;
  border: 1px solid #fef08a;
}

.b-orange {
  background: #fff7ed;
  color: #9a3412;
  border: 1px solid #fed7aa;
}

.b-red {
  background: #fef2f2;
  color: #991b1b;
  border: 1px solid #fecaca;
}

/* Chapter 3: Filters */
.filter-steps-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.f-step-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 20px;
}

.f-step-badge {
  font-size: 10px;
  font-weight: 700;
  color: var(--blue);
  background: #edf2fc;
  padding: 2px 6px;
  border-radius: 4px;
  letter-spacing: 0.05em;
  display: inline-block;
  margin-bottom: 6px;
}

.f-step-card h3 {
  margin: 0 0 6px;
  font-size: 16px;
  color: var(--ink);
}

.f-step-card p {
  margin: 0;
  font-size: 13.5px;
  color: var(--muted);
  line-height: 1.5;
}

/* Chapter 4: Quiz */
.quiz-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.quiz-fieldset {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px 20px;
  background: var(--paper);
}

.quiz-question {
  font-weight: 700;
  font-size: 15px;
  color: var(--ink);
  margin-bottom: 12px;
  padding: 0 6px;
}

.check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 10px;
  font-size: 14px;
  cursor: pointer;
  color: var(--ink);
}

.check input {
  margin-top: 4px;
}

.quiz-feedback {
  margin-top: 20px;
  padding: 16px 20px;
  border-radius: 8px;
  font-size: 14px;
  line-height: 1.6;
}

.quiz-feedback.success {
  background: #e6f7df;
  border: 1px solid #a3e635;
  color: #1b6321;
}

.quiz-feedback.retry {
  background: #fffbeb;
  border: 1px solid #fde68a;
  color: #92400e;
}

.complete-card {
  background: #f0f7ff;
  border: 1px solid #bfdbfe;
  border-radius: 10px;
  padding: 24px;
  margin-top: 20px;
}

.complete-card h3 {
  margin: 0 0 8px;
  color: var(--blue);
}

.next-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 16px;
}

.lesson-nav-controls {
  display: flex;
  justify-content: space-between;
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

.transcript-details {
  margin-top: 30px;
}

.transcript-content {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.7;
}

@media (max-width: 800px) {
  .lesson-panel {
    padding: 20px 16px;
  }
  .de-concept-grid, .scope-nav-grid, .scope-stage-card, .meters-benchmark-grid, .filter-steps-grid {
    grid-template-columns: 1fr;
  }
}
