/* Styles for Lesson 09: Harmonizers vs. Physical Shielding */

:root {
  --ink: #152239;
  --muted: #586579;
  --blue: #235ad3;
  --lime: #a8f074;
  --line: #dce2e9;
  --paper: #f5f7f9;
  --accent-red: #ef4444;
  --accent-green: #10b981;
  --accent-amber: #f59e0b;
  --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: Scenario Grid */
.scenario-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
  margin-bottom: 24px;
}

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

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

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

.scen-icon {
  font-size: 24px;
}

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

.scen-btn small {
  font-size: 12px;
  color: var(--muted);
}

.scenario-result-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 24px;
}

.res-header {
  border-bottom: 1px solid var(--line);
  padding-bottom: 14px;
  margin-bottom: 16px;
}

.res-badge {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--blue);
  background: #edf2fc;
  padding: 3px 8px;
  border-radius: 4px;
}

.res-header h3 {
  margin: 8px 0 0;
  font-size: 19px;
  color: var(--ink);
}

.res-body {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.res-col {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.col-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--muted);
  letter-spacing: 0.05em;
}

.res-col p {
  margin: 0;
  font-size: 14px;
  line-height: 1.6;
  color: var(--ink);
}

/* Chapter 1: Pitfall Stage */
.pitfall-demo-stage {
  background: #0f172a;
  border-radius: 12px;
  padding: 24px;
  color: #fff;
  margin-bottom: 20px;
}

.pitfall-visualizer {
  display: grid;
  grid-template-columns: 180px 1fr 180px;
  align-items: center;
  gap: 16px;
  min-height: 160px;
}

.phone-emitter, .tower-receiver {
  background: #1e293b;
  border: 1px solid #334155;
  border-radius: 8px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 6px;
}

.phone-screen {
  font-weight: 700;
  font-size: 13px;
}

.tx-power-meter {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-top: 6px;
}

.tx-label {
  font-size: 10px;
  color: #94a3b8;
  font-weight: 700;
}

.tx-stat.high {
  color: #f87171;
  font-weight: 800;
  font-size: 12px;
  background: rgba(239, 68, 68, 0.2);
  padding: 2px 6px;
  border-radius: 4px;
}

.shield-barrier {
  background: #334155;
  border: 2px dashed #94a3b8;
  border-radius: 8px;
  padding: 16px;
  text-align: center;
  position: relative;
}

.barrier-surface {
  font-size: 12px;
  font-weight: 700;
  color: #f1f5f9;
}

.reflect-arrow {
  font-size: 11px;
  color: #f87171;
  margin-top: 6px;
  font-weight: 700;
}

.signal-bars {
  font-size: 11px;
  color: #f59e0b;
  font-weight: 700;
  background: rgba(245, 158, 11, 0.2);
  padding: 2px 6px;
  border-radius: 4px;
}

.pitfall-explanation {
  background: #1e293b;
  border-radius: 8px;
  padding: 16px;
  margin-top: 16px;
  border-left: 4px solid var(--accent-red);
}

.pitfall-explanation h4 {
  margin: 0 0 6px;
  color: #fca5a5;
  font-size: 14px;
}

.pitfall-explanation p {
  margin: 0;
  color: #cbd5e1;
  font-size: 13px;
  line-height: 1.6;
}

.rules-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px 22px;
}

.rules-card h4 {
  margin: 0 0 10px;
  font-size: 15px;
  color: var(--ink);
}

.rules-card ul {
  margin: 0;
  padding-left: 20px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}

/* Chapter 2: Strengths & Limits */
.strengths-limits-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  margin-bottom: 20px;
}

.sl-box {
  border-radius: 10px;
  padding: 22px;
  border: 1px solid var(--line);
}

.green-box {
  background: #f0fdf4;
  border-color: #bbf7d0;
}

.red-box {
  background: #fef2f2;
  border-color: #fecaca;
}

.sl-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.sl-icon {
  font-size: 20px;
}

.sl-header h3 {
  margin: 0;
  font-size: 16px;
  color: var(--ink);
}

.sl-box ul {
  margin: 0;
  padding-left: 20px;
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--ink);
}

.note {
  background: #edf2fc;
  border-left: 4px solid var(--blue);
  padding: 14px 18px;
  border-radius: 6px;
  font-size: 14px;
  color: #1e3a8a;
  line-height: 1.6;
}

/* Chapter 3: Strategy Matrix */
.matrix-table-wrapper {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 10px;
}

.strategy-matrix {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  text-align: left;
}

.strategy-matrix th {
  background: var(--paper);
  padding: 14px 16px;
  font-weight: 700;
  color: var(--ink);
  border-bottom: 1px solid var(--line);
}

.strategy-matrix td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  line-height: 1.5;
}

.strategy-matrix tr:last-child td {
  border-bottom: none;
}

.strategy-matrix td strong {
  color: var(--ink);
}

/* 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;
  }
  .scenario-grid, .res-body, .strengths-limits-grid {
    grid-template-columns: 1fr;
  }
  .pitfall-visualizer {
    grid-template-columns: 1fr;
    gap: 12px;
  }
}
