/* Styles for Lesson 10: The 4 Types of EMF */

:root {
  --ink: #152239;
  --muted: #586579;
  --blue: #235ad3;
  --lime: #a8f074;
  --line: #dce2e9;
  --paper: #f5f7f9;
  --accent-cyan: #06b6d4;
  --accent-amber: #f59e0b;
  --accent-purple: #8b5cf6;
  --accent-green: #10b981;
  --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: 4 Fields Grid */
.field-nav-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 24px;
}

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

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

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

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

.field-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
}

.field-desc {
  font-size: 11px;
  color: var(--muted);
  line-height: 1.4;
}

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

.f-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  border-bottom: 1px solid var(--line);
  padding-bottom: 14px;
  margin-bottom: 18px;
}

.f-badge {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--blue);
}

.f-header h3 {
  margin: 4px 0 0;
  font-size: 20px;
  color: var(--ink);
}

.f-unit-badge {
  background: #e6f7df;
  color: #1b6321;
  font-size: 12px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 20px;
}

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

.f-col {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

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

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

/* Chapter 1: House Map */
.house-blueprint-interactive {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 20px;
  background: #0f172a;
  border-radius: 12px;
  padding: 24px;
  color: #fff;
}

.blueprint-canvas {
  height: 260px;
  background: #1e293b;
  border: 2px dashed #475569;
  border-radius: 8px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  grid-template-rows: repeat(2, 1fr);
  gap: 6px;
  padding: 6px;
}

.house-zone {
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid #334155;
  border-radius: 6px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.zone-label {
  position: absolute;
  top: 8px;
  left: 8px;
  font-size: 10px;
  font-weight: 700;
  color: #64748b;
  text-transform: uppercase;
}

.hotspot-btn {
  background: #1e293b;
  border: 1px solid #475569;
  color: #fff;
  border-radius: 20px;
  padding: 8px 14px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  position: relative;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
}

.hotspot-btn:hover {
  border-color: var(--blue);
  background: #2563eb;
}

.hotspot-btn.active {
  background: var(--blue);
  border-color: #60a5fa;
  box-shadow: 0 0 15px rgba(37, 99, 235, 0.7);
}

.hp-pulse {
  width: 8px;
  height: 8px;
  background: #a8f074;
  border-radius: 50%;
  display: inline-block;
}

.hotspot-inspector {
  background: #1e293b;
  border-radius: 8px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 12px;
}

.hp-badge {
  font-size: 10px;
  font-weight: 700;
  color: #93c5fd;
  letter-spacing: 0.05em;
}

.hp-header h3 {
  margin: 4px 0 0;
  font-size: 17px;
  color: #fff;
}

.hotspot-inspector p {
  margin: 0;
  color: #cbd5e1;
  font-size: 13.5px;
  line-height: 1.5;
}

.hp-solution-box {
  background: #0f172a;
  border-left: 3px solid var(--blue);
  padding: 10px 14px;
  border-radius: 0 6px 6px 0;
  font-size: 13px;
  color: #93c5fd;
  line-height: 1.5;
}

/* Chapter 2: Meter Matrix */
.meter-matrix-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.m-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 20px;
  display: flex;
  flex-direction: column;
}

.m-tag {
  font-size: 10px;
  font-weight: 700;
  color: var(--blue);
  letter-spacing: 0.05em;
}

.m-head h3 {
  margin: 4px 0 10px;
  font-size: 17px;
  color: var(--ink);
}

.m-desc {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
  margin-bottom: 16px;
  flex-grow: 1;
}

.m-capabilities {
  display: flex;
  flex-direction: column;
  gap: 6px;
  border-top: 1px solid var(--line);
  padding-top: 12px;
  font-size: 12px;
  font-weight: 600;
}

.cap-yes {
  color: #166534;
}

.cap-no {
  color: #991b1b;
}

/* Chapter 3: Protocol Steps */
.protocol-steps-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.proto-step {
  display: flex;
  align-items: flex-start;
  gap: 18px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 18px 22px;
}

.step-num {
  font-size: 20px;
  font-weight: 800;
  color: #fff;
  background: var(--blue);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

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

.step-content p {
  margin: 0;
  font-size: 14px;
  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;
  }
  .field-nav-grid, .f-grid, .meter-matrix-grid, .house-blueprint-interactive {
    grid-template-columns: 1fr;
  }
}
