/* hoa-12-chuong-3-lab.css — CSS riêng cho tools/hoa-12-chuong-3.php.
   Khối .theory-* / .chain-* / .flow-* giữ đúng quy ước dùng chung giữa
   các chương để đồng bộ giao diện — KHÔNG đổi tên class, chỉ thêm mới
   nếu chương này cần kiểu minh họa đặc thù riêng. */

.theory-toc { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 24px; }
.theory-toc-item { font-size: 13px; padding: 6px 12px; border-radius: 20px; background: #eef0fa; color: var(--blue-dark); text-decoration: none; font-weight: 600; }
.theory-toc-item:hover { background: var(--blue); color: #fff; }
.theory-lesson { margin-bottom: 36px; scroll-margin-top: 16px; }
.theory-lesson-title { font-size: 19px; font-weight: 700; margin-bottom: 12px; border-bottom: 2px solid var(--line); padding-bottom: 8px; }
.theory-body p { line-height: 1.7; margin: 0 0 12px; font-size: 15px; }
.theory-body ul { margin: 0 0 14px; padding-left: 20px; line-height: 1.7; font-size: 15px; }
.theory-body li { margin-bottom: 6px; }
.theory-callout { background: #eef0fa; border-radius: var(--radius); padding: 16px 18px; margin: 16px 0; }
.theory-callout-title { font-weight: 700; margin-bottom: 8px; color: var(--blue-dark); }
.theory-callout p:last-child { margin-bottom: 0; }
.theory-table { width: 100%; border-collapse: collapse; margin: 16px 0; font-size: 13.5px; }
.theory-table th, .theory-table td { border: 1px solid var(--line); padding: 10px 12px; text-align: left; vertical-align: top; }
.theory-table th { background: #f5f6fb; font-weight: 700; }
.theory-note { font-size: 13px; color: var(--ink-soft); font-style: italic; }
.theory-link-tab { color: var(--blue); font-weight: 600; text-decoration: none; }
.theory-link-tab:hover { text-decoration: underline; }

/* ===== Sơ đồ dạng chuỗi (chain) — dùng cho phản ứng/chuyển hóa nối tiếp ===== */
.chain-title { font-size: 16px; font-weight: 700; margin: 28px 0 12px; color: var(--ink); }
.chain-title:first-child { margin-top: 0; }
.chain-diagram { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; background: #f8f9fd; border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 16px; margin-bottom: 22px; }
.chain-box { background: var(--blue); color: #fff; font-weight: 700; font-size: 14px; padding: 8px 14px; border-radius: 10px; white-space: nowrap; }
.chain-arrow { display: flex; flex-direction: column; align-items: center; justify-content: center; font-size: 11.5px; color: var(--ink-soft); padding: 0 6px; min-width: 60px; text-align: center; }
.chain-arrow .arrow-symbol { font-size: 18px; color: var(--blue-dark); line-height: 1; }
@media (max-width: 640px) {
  .chain-diagram { flex-direction: column; align-items: stretch; }
  .chain-box { text-align: center; }
  .chain-arrow { flex-direction: row; gap: 6px; min-width: 0; }
}

/* ===== Sơ đồ dạng luồng bước (flow) — dùng cho quy trình giải bài tập ===== */
.flow-title { font-size: 16px; font-weight: 700; margin: 28px 0 12px; color: var(--ink); }
.flow-title:first-child { margin-top: 0; }
.flow-diagram { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; background: #f8f9fd; border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 16px; margin-bottom: 22px; }
.flow-step { background: var(--blue); color: #fff; font-weight: 700; font-size: 13.5px; padding: 8px 14px; border-radius: 10px; white-space: nowrap; }
.flow-step.alt { background: #64748b; }
.flow-arrow { font-size: 18px; color: var(--blue-dark); padding: 0 4px; }
@media (max-width: 640px) {
  .flow-diagram { flex-direction: column; align-items: stretch; }
  .flow-step { text-align: center; }
  .flow-arrow { transform: rotate(90deg); text-align: center; padding: 2px 0; }
}

/* ===== Bảng tra cứu nhanh ===== */
.formula-box { font-family: 'IBM Plex Mono', monospace; font-size: 15px; font-weight: 700; color: var(--blue-dark); background: #eef0fa; border-radius: var(--radius); padding: 14px 16px; margin: 10px 0 20px; text-align: center; }
.mistake-item { background: #fff7ed; border-left: 4px solid #f59e0b; border-radius: 8px; padding: 10px 14px; margin-bottom: 10px; font-size: 14px; line-height: 1.6; }
.mistake-item strong { color: #9a3412; }
