/* ============================================
   LESSON 9 — SPECIFIC STYLES
   Understanding Speaker Functions
   ============================================ */

/* ── Part 1: Extract List ── */
.l9-ext-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 8px;
}

/* Block wraps row + script box + explanation */
.l9-ext-block {
  display: flex;
  flex-direction: column;
}

.l9-ext-row {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 14px 16px;
  background: var(--bg-card-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
}

/* Block wraps row + explanation for Part 2 */
.l9-match-block {
  display: flex;
  flex-direction: column;
}

/* ── Inline reveal / explanation ── */
.l9-reveal-badge {
  padding: 10px 14px;
  background: rgba(255,100,100,.07);
  border: 1px solid rgba(255,100,100,.2);
  border-top: none;
  border-bottom-left-radius: var(--radius);
  border-bottom-right-radius: var(--radius);
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.l9-reveal-answer {
  font-size: .97rem;
  color: var(--text-muted);
}

.l9-reveal-answer strong {
  color: var(--success);
}

.l9-reveal-label {
  color: var(--text-muted);
}

.l9-reveal-explain {
  font-size: 1rem;
  color: var(--text-muted);
  line-height: 1.6;
}

.l9-exp-ok {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 10px 14px;
  background: rgba(72,199,116,.07);
  border: 1px solid rgba(72,199,116,.2);
  border-top: none;
  border-bottom-left-radius: var(--radius);
  border-bottom-right-radius: var(--radius);
  font-size: 1rem;
  color: var(--text-muted);
  line-height: 1.6;
}

.l9-exp-check {
  color: var(--success);
  font-size: 1rem;
  flex-shrink: 0;
  margin-top: 1px;
}

.l9-ext-num {
  font-weight: 800;
  color: var(--gold);
  font-size: 1rem;
  min-width: 18px;
  padding-top: 7px;
  flex-shrink: 0;
}

.l9-ext-body {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  flex: 1;
  line-height: 1.8;
}

.l9-ext-context {
  font-size: 1rem;
  color: var(--text-muted);
}

/* ── Text Input ── */
.l9-inp {
  background: var(--bg-card);
  border: 1.5px solid var(--border);
  border-radius: 6px;
  color: var(--text);
  font-size: 1rem;
  padding: 5px 10px;
  width: 220px;
  transition: border-color .2s, box-shadow .2s;
  outline: none;
}
.l9-inp:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(201,168,76,.15);
}
.l9-inp.l9-correct {
  border-color: var(--success) !important;
  background: rgba(72,199,116,.1) !important;
  color: var(--success) !important;
}
.l9-inp.l9-wrong {
  border-color: var(--error) !important;
  background: rgba(255,100,100,.08) !important;
  color: var(--error) !important;
}

/* ── Part 2: Functions Box ── */
.l9-fn-box {
  background: var(--bg-card-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  margin-bottom: 20px;
}

.l9-fn-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--gold);
  text-transform: uppercase;
  letter-spacing: .07em;
  margin-bottom: 10px;
}

.l9-fn-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 4px 0;
  font-size: 1rem;
}

.l9-fn-letter {
  font-weight: 800;
  color: var(--gold);
  min-width: 18px;
}

.l9-fn-text {
  color: var(--text-muted);
  text-transform: capitalize;
}

/* ── Part 2: Match List ── */
.l9-match-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 8px;
}

.l9-match-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 16px;
  background: var(--bg-card-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
  flex-wrap: wrap;
}

.l9-match-num {
  font-weight: 800;
  color: var(--gold);
  font-size: 1rem;
  min-width: 18px;
  flex-shrink: 0;
}

.l9-match-extract {
  flex: 1;
  font-size: 1rem;
  color: var(--text-muted);
  min-width: 140px;
}
.l9-match-extract em {
  font-style: normal;
  color: var(--text);
  font-weight: 600;
}

/* ── Select / Dropdown ── */
.l9-sel {
  background: var(--bg-card);
  border: 1.5px solid var(--border);
  border-radius: 6px;
  color: var(--text);
  font-size: 1rem;
  font-family: var(--font);
  padding: 6px 10px;
  cursor: pointer;
  outline: none;
  transition: border-color .2s, box-shadow .2s;
  min-width: 180px;
}
.l9-sel:focus { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(201,168,76,.15); }
.l9-sel option { background: var(--bg-card); color: var(--text); }

.l9-sel-correct {
  border-color: var(--success) !important;
  background: rgba(72,199,116,.1) !important;
  color: var(--success) !important;
}
.l9-sel-wrong {
  border-color: var(--error) !important;
  background: rgba(255,100,100,.08) !important;
  color: var(--error) !important;
}

/* ── Shake ── */
@keyframes l9shake {
  0%,100% { transform: translateX(0); }
  20%     { transform: translateX(-6px); }
  40%     { transform: translateX(6px); }
  60%     { transform: translateX(-4px); }
  80%     { transform: translateX(4px); }
}
.l9-shake { animation: l9shake .45s ease; }

/* ── Explanation Cards ── */
.l9-exp-card {
  background: var(--bg-card-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  margin-bottom: 10px;
}
.l9-exp-top {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 6px;
  flex-wrap: wrap;
}
.l9-exp-num {
  font-weight: 800;
  color: var(--gold);
  font-size: 1rem;
  min-width: 18px;
}
.l9-exp-fn {
  font-weight: 700;
  color: var(--success);
  font-size: 1rem;
}
.l9-exp-quote {
  font-size: .97rem;
  color: var(--text);
  font-style: italic;
  border-left: 2px solid var(--gold);
  padding-left: 10px;
  margin-bottom: 8px;
}
.l9-exp-why {
  font-size: .97rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin: 0;
}

/* ── Study Tip ── */
.l9-tip-alert {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  background: rgba(201,168,76,.08);
  border: 1px solid rgba(201,168,76,.3);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 20px;
}

.l9-tip-rules {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.l9-tr-item {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 14px 16px;
  background: var(--bg-card-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.l9-tr-icon  { color: var(--success); font-size: 1.25rem; margin-top: 2px; flex-shrink: 0; }
.l9-tr-title { font-weight: 600; color: var(--text); margin-bottom: 4px; font-size: 1rem; }
.l9-tr-body  { font-size: .97rem; color: var(--text-muted); line-height: 1.6; margin: 0; }

/* ── Responsive ── */
@media (max-width: 560px) {
  .l9-ext-body { flex-direction: column; align-items: flex-start; }
  .l9-inp      { width: 100%; }
  .l9-match-row { flex-direction: column; align-items: flex-start; }
  .l9-sel      { width: 100%; }
}
