/* ============================================================
   Lecture · 인터페이스 설계 — slide layout extensions
   Builds on /colors_and_type.css and /slides/_slide.css
   ─ 코어(_slide.css)에 이미 승격된 컴포넌트는 재정의하지 않음:
     def-box · metaphor · mnemonic · real · pass-tip
     · cmp-tbl · trap-row · q-source · tbl.compact · callout.compact
   ─ 여기에는 8강 신규/특수 컴포넌트만 정의.
   ============================================================ */

/* ---------- 4-objective grid (학습 목표) — 4강에서 가져온 패턴 ---------- */
.obj-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}
.obj-item {
  display: grid;
  grid-template-columns: 52px 1fr;
  gap: 16px;
  align-items: center;
  padding: 16px 20px;
  background: var(--ink-50);
  border: 1.5px solid var(--ink-200);
  border-radius: 12px;
}
.obj-item .badge {
  width: 52px;
  height: 52px;
  background: var(--eduwill-yellow);
  color: var(--ink-1000);
  display: grid;
  place-items: center;
  font: 800 26px/1 var(--font-sans);
  border-radius: 12px;
}
.obj-item h3 {
  margin: 0;
  font: 800 18px/1.15 var(--font-sans);
  color: var(--ink-1000);
}
.obj-item p {
  margin: 4px 0 0;
  font-size: 13px;
  color: var(--ink-700);
  line-height: 1.4;
}

/* ============================================================
   EAI 4유형 토폴로지 미니 다이어그램 (신규 · 8강 핵심)
   ─ Point-to-Point · Hub & Spoke · Message Bus · Hybrid
   ─ .topo-card 프레임 + 내부 inline SVG 다이어그램
   ============================================================ */
.topo-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.topo-card {
  background: white;
  border: 1.5px solid var(--ink-200);
  border-radius: 12px;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.topo-card.hi {
  border-color: var(--eduwill-yellow);
  background: var(--eduwill-yellow-50);
}
.topo-card .topo-head {
  display: flex;
  align-items: center;
  gap: 10px;
}
.topo-card .topo-head .ix {
  width: 26px;
  height: 26px;
  flex-shrink: 0;
  background: var(--ink-1000);
  color: var(--eduwill-yellow);
  display: grid;
  place-items: center;
  border-radius: 6px;
  font: 800 14px/1 var(--font-sans);
}
.topo-card .topo-head .name {
  font: 800 18px/1.1 var(--font-sans);
  color: var(--ink-1000);
  letter-spacing: -0.01em;
}
.topo-card .topo-head .en {
  font-size: 11px;
  font-weight: 700;
  color: var(--ink-500);
  letter-spacing: 0.02em;
}
.topo-card .diagram {
  height: 116px;
  display: grid;
  place-items: center;
  background: var(--ink-50);
  border-radius: 8px;
}
.topo-card.hi .diagram { background: rgba(255,255,255,0.65); }
.topo-card .diagram svg { width: 100%; height: 100%; }
.topo-card .note {
  font-size: 12.5px;
  line-height: 1.45;
  color: var(--ink-700);
}
.topo-card .note b { color: var(--ink-1000); }
.topo-card .note .bad { color: var(--err-700); font-weight: 800; }

/* SVG diagram primitives (shared color hooks) */
.dg-line   { stroke: var(--ink-300); stroke-width: 2; }
.dg-line-y { stroke: var(--eduwill-yellow-600); stroke-width: 2.5; }
.dg-bus    { stroke: var(--ink-1000); stroke-width: 6; stroke-linecap: round; }
.dg-node   { fill: var(--ink-1000); }
.dg-node-t { fill: white; font: 800 11px var(--font-sans); text-anchor: middle; }
.dg-hub    { fill: var(--eduwill-yellow); stroke: var(--ink-1000); stroke-width: 2; }
.dg-hub-t  { fill: var(--ink-1000); font: 800 11px var(--font-sans); text-anchor: middle; }

/* ============================================================
   흐름 노드 행 — 송신 → [매개체] → 수신 같은 inline 플로우
   (직접/간접 개념, ESB 흐름 등에 재사용)
   ============================================================ */
.flow {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}
.flow .box {
  padding: 12px 18px;
  border-radius: 10px;
  background: white;
  border: 1.5px solid var(--ink-300);
  font: 700 15px/1.2 var(--font-sans);
  color: var(--ink-900);
  text-align: center;
}
.flow .box.dark { background: var(--ink-1000); color: white; border-color: var(--ink-1000); }
.flow .box.mid  { background: var(--eduwill-yellow); color: var(--ink-1000); border-color: var(--eduwill-yellow); font-weight: 800; }
.flow .box small { display: block; font-size: 11px; font-weight: 600; opacity: 0.7; margin-top: 2px; }
.flow .arw { color: var(--ink-500); font-size: 22px; font-weight: 800; }

/* ============================================================
   미들웨어 결정적 키워드 행 — 약어 + 풀네임 + 한 줄 키워드
   (def-box보다 가벼운 6종 한눈 정리용)
   ============================================================ */
.kw-row {
  display: grid;
  grid-template-columns: 92px 1fr;
  gap: 0;
  border: 1.5px solid var(--ink-200);
  border-radius: 10px;
  overflow: hidden;
}
.kw-row + .kw-row { margin-top: 8px; }
.kw-row.hi { border-color: var(--eduwill-yellow); }
.kw-row .abbr {
  background: var(--ink-1000);
  color: var(--eduwill-yellow);
  display: grid;
  place-items: center;
  font: 800 20px/1 var(--font-sans);
  letter-spacing: -0.01em;
}
.kw-row .rhs {
  padding: 10px 16px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  background: white;
}
.kw-row .full { font-size: 12px; font-weight: 700; color: var(--ink-500); letter-spacing: 0.01em; }
.kw-row .key  { font-size: 16px; font-weight: 700; color: var(--ink-900); }
.kw-row .key b { color: var(--eduwill-yellow-700); }

/* ---------- 동기/비동기 시그니처 칩 (RPC/MOM 대비) ---------- */
.sig {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.02em;
}
.sig.sync  { background: var(--info-50);  color: var(--info-700); }
.sig.async { background: var(--ok-50);     color: var(--ok-700); }

/* ---------- utility: small caption ---------- */
.cap { font-size: 12px; color: var(--ink-500); }
