/* System Design deck theme — teal accent (đồng bộ màu ByteByteGo).
   Token override on top of deck-styles.css. Load AFTER deck-styles.css. */
:root {
  --accent:       #2f8f86;
  --accent-dk:    #1d6b63;
  --accent-soft:  rgba(47, 143, 134, 0.12);
  --paper:        #F3FAF8;
  --bg-panel:     #E4F1EE;
  --rule:         #1d6b63;
  --rule-soft:    rgba(29, 107, 99, 0.20);
  --amber:        #c97a16;
  --amber-soft:   rgba(201, 122, 22, 0.12);
  --rose:         #b5354f;
  --rose-soft:    rgba(181, 53, 79, 0.10);
}

/* ── Title slide ─────────────────────────────────────────── */
.title-slide .left  { background: var(--accent); color: #fff; }
.title-slide .left .mark { color: rgba(255,255,255,0.82); }
.title-slide .main em { color: #d9f2ee; font-style: italic; font-weight: 400; }
.title-slide .right { background: var(--paper); }

/* ── Concept slide: diagram + essentials ─────────────────── */
.concept { margin-top: 40px; height: calc(100% - 40px); display: flex; flex-direction: column; }
.concept-grid {
  display: grid; grid-template-columns: 800px 1fr; gap: 60px; flex: 1; min-height: 0; margin-top: 8px;
}
.fig-card {
  background: #fff; border: 1px solid var(--rule-soft); border-radius: 18px;
  display: flex; align-items: center; justify-content: center; padding: 26px; overflow: hidden;
}
.fig-card img { max-width: 100%; max-height: 760px; object-fit: contain; border-radius: 8px; }
.fig-credit { font-family: var(--mono); font-size: 18px; color: var(--ink-muted); margin-top: 10px; letter-spacing: 0.04em; }
.concept-body { display: flex; flex-direction: column; overflow: hidden; }
.essentials { list-style: none; padding: 0; margin: 0 0 4px; display: grid; gap: 14px; }
.essentials li {
  font-size: 28px; line-height: 1.4; color: var(--ink); padding-left: 34px; position: relative;
}
.essentials li::before {
  content: ''; position: absolute; left: 0; top: 13px; width: 14px; height: 14px;
  background: var(--accent); border-radius: 4px;
}
.essentials li b { color: var(--accent-dk); font-weight: 700; }
.essentials code {
  font-family: var(--mono); font-size: 24px; background: var(--accent-soft);
  padding: 1px 8px; border-radius: 5px; color: var(--accent-dk);
}

/* ── Callouts (trade-off / interviewer / trap) ───────────── */
.callout { border-radius: 12px; padding: 20px 26px; margin-top: 18px; font-size: 26px; line-height: 1.45; }
.callout .tag { display: block; font-family: var(--mono); font-size: 19px; letter-spacing: 0.12em;
  text-transform: uppercase; font-weight: 700; margin-bottom: 8px; }
.callout b { font-weight: 700; }
.c-trade { background: var(--amber-soft); border-left: 6px solid var(--amber); }
.c-trade .tag { color: var(--amber); }
.c-ask   { background: var(--accent-soft); border-left: 6px solid var(--accent); }
.c-ask .tag { color: var(--accent-dk); }
.c-trap  { background: var(--rose-soft); border-left: 6px solid var(--rose); }
.c-trap .tag { color: var(--rose); }
.c-trade b { color: #9c5e10; } .c-trap b { color: var(--rose); } .c-ask b { color: var(--accent-dk); }

/* ── Deep-prose tweaks (reuse base .deep-prose) ──────────── */
.deep-prose { font-size: 25px; line-height: 1.6; column-gap: 80px; max-width: 1780px; }
.deep-prose strong { color: var(--accent-dk); }
.deep-prose em { background: var(--accent-soft); color: var(--ink); }
.deep-head { display: flex; align-items: baseline; gap: 20px; margin-bottom: 20px; }

/* ── Cheat-sheet table ───────────────────────────────────── */
.cheat { width: 100%; border-collapse: collapse; margin-top: 20px; font-size: 26px; }
.cheat th, .cheat td { border: 1px solid var(--rule-soft); padding: 16px 22px; text-align: left; vertical-align: top; }
.cheat th { background: var(--accent); color: #fff; font-weight: 700; font-family: var(--sans); }
.cheat td { color: var(--ink); line-height: 1.4; }
.cheat td b { color: var(--accent-dk); }
.cheat tr:nth-child(even) td { background: var(--paper); }

/* ── LECTURE slide: ảnh trái cố định + bài giảng phải ────── */
.lecture { margin-top: 36px; height: calc(100% - 36px); display: flex; flex-direction: column; }
.lecture-grid { display: grid; grid-template-columns: 44% 1fr; gap: 56px; flex: 1; min-height: 0; }
.lec-fig {
  background: #fff; border: 1px solid var(--rule-soft); border-radius: 18px;
  display: flex; align-items: center; justify-content: center; padding: 24px; overflow: hidden;
  position: relative; cursor: zoom-in; align-self: stretch;
}
.lec-fig img { max-width: 100%; max-height: 820px; object-fit: contain; border-radius: 8px; }
/* Code card (Shiki) — thay cho ảnh ở beat có code */
.lec-code { display: flex; align-self: stretch; min-height: 0; }
.lec-code pre.shiki { flex: 1; margin: 0; overflow: auto; border: 1px solid var(--rule-soft);
  border-radius: 16px; padding: 32px 34px; font-size: 25px; line-height: 1.6; }
.lec-code pre.shiki code { font-family: var(--mono); white-space: pre; }
.lec-fig .zoom-badge {
  position: absolute; top: 16px; right: 16px; background: var(--accent); color: #fff;
  font-family: var(--mono); font-size: 18px; padding: 6px 14px; border-radius: 20px;
  letter-spacing: 0.04em; opacity: 0.92; pointer-events: none;
}
.lec-body { display: flex; flex-direction: column; min-height: 0; overflow-y: auto; padding-right: 10px; }
.lec-eyebrow { font-family: var(--mono); font-size: 22px; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--accent-dk); font-weight: 600; margin-bottom: 10px; }
.lec-eyebrow .beat { color: var(--ink-muted); }
.lec-h { font-family: var(--display); font-size: 40px; font-weight: 700; line-height: 1.1;
  color: var(--ink); margin: 0 0 4px; letter-spacing: -0.01em; text-wrap: balance; }
.lec-h-en { font-family: var(--display); font-style: italic; font-weight: 400; font-size: 25px;
  color: var(--ink-muted); margin: 0 0 18px; }
.lec-prose { font-size: 23px; line-height: 1.48; color: var(--ink); }
.lec-prose p { margin: 0 0 12px; }
.lec-prose p:last-child { margin-bottom: 0; }
.lec-prose strong { color: var(--accent-dk); font-weight: 700; }
.lec-prose em { font-style: normal; background: var(--accent-soft); color: var(--ink); padding: 0 6px; border-radius: 4px; font-weight: 500; }
.lec-prose .term { font-family: var(--mono); font-size: 21px; background: var(--bg-panel); padding: 1px 8px; border-radius: 5px; color: var(--accent-dk); }

/* Bản tiếng Anh ở dưới, UI giống phần tiếng Việt nhưng nhỏ hơn + nhạt hơn */
.lec-en { margin-top: 14px; padding-top: 12px; border-top: 1px dashed var(--rule-soft);
  font-size: 21px; line-height: 1.46; color: var(--ink-soft); }
.lec-en .en-label { display: inline-block; font-family: var(--mono); font-size: 15px; letter-spacing: 0.12em;
  color: var(--accent-dk); background: var(--accent-soft); padding: 2px 11px; border-radius: 12px; margin-bottom: 10px; }
.lec-en p { margin: 0 0 12px; }
.lec-en p:last-child { margin-bottom: 0; }
.lec-en strong { color: var(--accent-dk); font-weight: 700; }
.lec-en .term { font-family: var(--mono); font-size: 19px; background: var(--bg-panel); padding: 1px 7px; border-radius: 5px; color: var(--accent-dk); }
/* "vocab hay" — từ vựng đáng học, highlight kiểu bút dạ để dễ nhặt */
.vocab { background: var(--amber-soft); border-bottom: 1.5px solid var(--amber);
  padding: 0 3px; border-radius: 3px; color: var(--ink); font-weight: 600; }
.lec-note { margin-top: 14px; background: var(--amber-soft); border-left: 6px solid var(--amber);
  border-radius: 12px; padding: 18px 24px; font-size: 26px; line-height: 1.45; }
.lec-note .tag { display:block; font-family: var(--mono); font-size: 18px; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--amber); font-weight: 700; margin-bottom: 6px; }
.lec-note b { color: #9c5e10; }
.lec-note.ask { background: var(--accent-soft); border-left-color: var(--accent); }
.lec-note.ask .tag { color: var(--accent-dk); } .lec-note.ask b { color: var(--accent-dk); }

/* ── Lightbox (xem ảnh full) ─────────────────────────────── */
#lightbox { position: fixed; inset: 0; z-index: 2147483600; display: none;
  align-items: center; justify-content: center; background: rgba(8,20,16,0.92);
  cursor: zoom-out; padding: 28px; }
#lightbox.open { display: flex; }
#lightbox img { max-width: 96vw; max-height: 94vh; object-fit: contain;
  border-radius: 10px; box-shadow: 0 20px 80px rgba(0,0,0,0.5); background: #fff; }
#lightbox .lb-hint { position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%);
  font-family: var(--mono, monospace); font-size: 14px; color: rgba(255,255,255,0.7);
  letter-spacing: 0.06em; }

/* ── Traps list ──────────────────────────────────────────── */
.traps { list-style: none; padding: 0; margin-top: 18px; display: grid; grid-template-columns: 1fr 1fr; gap: 20px 48px; }
.traps li { border-left: 6px solid var(--rose); background: var(--rose-soft); padding: 18px 24px; border-radius: 0 12px 12px 0; }
.traps .t { font-family: var(--display); font-size: 28px; font-weight: 700; color: var(--ink); margin-bottom: 6px; }
.traps .d { font-size: 23px; line-height: 1.42; color: var(--ink-soft); }
