/* Trung tâm hướng dẫn (Learn Center): modal 2 cột — nav trái + khung đọc phải. */

.lc-modal { height: min(720px, 88vh); }
.lc-cols { flex: 1; min-height: 0; display: grid; grid-template-columns: 280px 1fr; }

/* Cột trái: tìm + danh sách chủ đề */
.lc-nav {
  display: flex; flex-direction: column; min-height: 0;
  border-right: 1px solid var(--line); background: var(--bg-0);
}
.lc-search { margin: 12px; width: auto; }
.lc-list-wrap { overflow-y: auto; padding: 0 8px 12px; }
.lc-group { padding: 4px 0; }
.lc-group-t {
  font-size: 10px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  color: var(--fg-2); padding: 8px 8px 4px;
}
.lc-item {
  display: flex; gap: 9px; align-items: flex-start; width: 100%; text-align: left;
  padding: 8px; border: 1px solid transparent; border-radius: var(--radius-sm);
  background: transparent; cursor: pointer; color: inherit;
}
.lc-item:hover { background: var(--bg-2); }
.lc-item.on { background: var(--bg-3); border-color: var(--accent); }
.lc-item-i { font-size: 15px; line-height: 1.25; flex: none; width: 18px; text-align: center; }
.lc-item-t { font-size: 12.5px; font-weight: 600; }
.lc-item-d { font-size: 11px; color: var(--fg-2); line-height: 1.4; margin-top: 1px; }

/* Cột phải: khung đọc */
.lc-read { overflow-y: auto; padding: 20px 24px 28px; }
.lc-read-head { display: flex; gap: 12px; align-items: flex-start; padding-bottom: 12px; border-bottom: 1px solid var(--line-soft); margin-bottom: 4px; }
.lc-read-i { font-size: 26px; line-height: 1; flex: none; }
.lc-read-t { margin: 3px 0 4px; font-size: 19px; }
.lc-tag {
  display: inline-block; font-size: 9px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  color: var(--accent); background: color-mix(in srgb, var(--accent) 14%, transparent);
  padding: 2px 7px; border-radius: 99px;
}

/* Nội dung bài */
.lc-body { font-size: 13px; line-height: 1.62; color: var(--fg-1); }
.lc-h { font-size: 13px; font-weight: 700; color: var(--fg-0); margin: 20px 0 6px; }
.lc-p { margin: 8px 0; }
.lc-body strong { color: var(--fg-0); font-weight: 650; }
.lc-body code {
  font-family: var(--mono); font-size: 11.5px; color: var(--fg-0);
  background: var(--bg-0); border: 1px solid var(--line); border-radius: 4px; padding: 1px 5px;
}
.lc-list { margin: 8px 0; padding-left: 20px; }
.lc-list li { margin: 5px 0; }
.lc-list.num { list-style: decimal; }

.lc-kbd { display: flex; gap: 10px; align-items: baseline; padding: 4px 0; }
.lc-kbd kbd {
  flex: none; min-width: 104px; font-family: var(--mono); font-size: 11px; color: var(--fg-0);
  background: var(--bg-0); border: 1px solid var(--line); border-bottom-width: 2px;
  border-radius: 4px; padding: 2px 6px; white-space: nowrap; text-align: center;
}
.lc-kbd span { color: var(--fg-1); line-height: 1.45; }

.lc-note {
  display: flex; gap: 9px; align-items: flex-start; margin: 12px 0;
  padding: 10px 12px; border-radius: var(--radius); font-size: 12.5px; line-height: 1.55;
  background: var(--bg-2); border: 1px solid var(--line); border-left: 3px solid var(--accent);
}
.lc-note.warn { border-left-color: var(--warn); }
.lc-note-i { flex: none; }
.lc-video { width: 100%; border-radius: var(--radius); border: 1px solid var(--line); margin: 12px 0; display: block; }

.lc-related { margin-top: 22px; padding-top: 14px; border-top: 1px solid var(--line-soft); }
.lc-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.lc-chip {
  font-size: 12px; padding: 5px 11px; border-radius: 99px; cursor: pointer;
  background: var(--bg-2); border: 1px solid var(--line); color: var(--fg-1);
}
.lc-chip:hover { background: var(--bg-3); border-color: var(--accent); color: var(--fg-0); }

/* Hình minh hoạ trong bài (features/learn/figures.js) */
.fig { margin: 16px 0; padding: 16px; background: var(--bg-0); border: 1px solid var(--line); border-radius: var(--radius); }
.fig-cap { margin-top: 12px; font-size: 11.5px; color: var(--fg-2); text-align: center; line-height: 1.5; }

/* Anchor demo — "màn" tự co giãn, phần tử neo theo cạnh */
.fig-anchor-stage { display: flex; justify-content: center; align-items: center; min-height: 188px; }
.fig-phone {
  position: relative; width: 150px; height: 168px; border: 2px solid var(--fg-2); border-radius: 14px;
  background: var(--bg-2); animation: fig-resize 5s ease-in-out infinite alternate;
}
.fig-el { position: absolute; display: flex; align-items: center; justify-content: center; font-size: 10px; color: var(--fg-0); }
.fig-el.tl { top: 8px; left: 8px; width: 20px; height: 20px; border-radius: 50%; background: var(--accent); color: #fff; }
.fig-el.tr {
  top: 8px; right: 8px; height: 20px; padding: 0 8px; border-radius: 99px; font-weight: 700; white-space: nowrap;
  background: color-mix(in srgb, var(--warn) 24%, var(--bg-3)); border: 1px solid var(--warn); color: var(--warn);
}
.fig-el.nav {
  left: 8px; right: 8px; bottom: 8px; height: 22px; border-radius: 7px; gap: 10px;
  background: var(--bg-3); border: 1px solid var(--line);
}
.fig-el.nav i { width: 10px; height: 10px; border-radius: 3px; background: var(--fg-2); display: block; }
.fig-el.nav i.on { background: var(--accent); }
@keyframes fig-resize { from { width: 116px; } to { width: 210px; } }

/* Pattern vs Block — 1 khối ↔ cụm nhiều khối */
.fig-pb { display: flex; align-items: center; justify-content: center; gap: 22px; padding: 8px 0; }
.fig-pb-col { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.fig-pb-lbl { font-size: 11px; color: var(--fg-2); }
.fig-arrow { font-size: 22px; color: var(--fg-2); }
.fig-chip { border-radius: 6px; }
.fig-chip.solo { width: 62px; height: 62px; background: var(--bg-3); border: 1px solid var(--line); }
.fig-pattern {
  width: 96px; padding: 9px; border-radius: 9px; display: flex; flex-direction: column; gap: 7px;
  background: var(--bg-2); border: 1px dashed var(--line);
}
.fig-chip.mini { height: 15px; background: var(--accent); animation: fig-assemble 3.4s ease-in-out infinite; }
.fig-chip.mini:nth-child(2) { background: color-mix(in srgb, var(--warn) 60%, var(--bg-3)); }
.fig-chip.mini:nth-child(3) { background: var(--bg-3); border: 1px solid var(--line); }
@keyframes fig-assemble {
  0% { opacity: .1; transform: translateY(9px); }
  22%, 82% { opacity: 1; transform: none; }
  100% { opacity: .1; transform: translateY(9px); }
}

@media (prefers-reduced-motion: reduce) {
  .fig-phone { animation: none; width: 162px; }
  .fig-chip.mini { animation: none; opacity: 1; transform: none; }
}

@media (max-width: 720px) {
  .lc-cols { grid-template-columns: 1fr; }
  .lc-nav { border-right: none; border-bottom: 1px solid var(--line); max-height: 40%; }
}
