/* Types of Models and Semantic Search: the figures on its slides. Boxes,
   chips, tables and the shared colours are in ../llmops.css. */

/* Points of meaning, as in lesson 1. */
.em-g1 { fill: var(--code); } .em-g2 { fill: var(--no); } .em-g3 { fill: var(--data); }

/* Other types of models: tiles (an icon over its name), a model box, arrows. */
.io { display: flex; flex-direction: column; gap: 14px; }
.io-row { display: flex; align-items: center; gap: 12px; }
.io-ts { display: flex; gap: 8px; flex-wrap: wrap; }
.io-t { display: flex; flex-direction: column; align-items: center; gap: 2px; width: 64px; padding: 6px 4px 4px; background: #fff; border: 1.5px solid var(--c); border-radius: 10px; color: var(--c); font-size: 12.5px; font-weight: 600; flex: none; }
.io-t svg { width: 34px; height: 34px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.io-t svg .f { fill: currentColor; stroke: none; }
.io-t.text { --c: var(--code); } .io-t.image { --c: var(--data); } .io-t.voice { --c: var(--tool); }
.io-t.video { --c: var(--user); } .io-t.vector { --c: var(--ops); }
.io-ar { font-size: 26px; line-height: 1; color: #545b64; flex: none; }
.io-ar.sm { font-size: 20px; }
.io-m { flex: none; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; min-height: 52px; padding: 6px 14px; background: #f7f3ff; border: 2px solid var(--model); border-radius: 10px; font-size: 14.5px; }
.io-m small { font-size: 12.5px; color: var(--sv-ink2); }
.io svg.pic { border-radius: 8px; border: 1px solid var(--sv-line); display: block; }

/* The overview: seven rows on one grid, the model's name in the middle. */
.io-all { gap: 7px; }
.io-all .io-row { display: grid; grid-template-columns: minmax(0, 1fr) 26px 210px 26px minmax(0, 1fr); gap: 10px; }
.io-all .io-row > .io-ts:first-child { justify-content: flex-end; }
.io-all .io-t { width: 58px; padding: 3px 4px 2px; font-size: 11.5px; }
.io-all .io-t svg { width: 26px; height: 26px; }
.io-all .io-m { min-height: 0; padding: 8px 10px; }
.io-hd { font-size: 12.5px; text-transform: uppercase; letter-spacing: .04em; color: var(--sv-ink2); }
.io-hd span:first-child { text-align: right; } .io-hd span:nth-child(3) { text-align: center; }

/* A multimodal LLM. */
.mm { flex-direction: row; align-items: center; gap: 14px; }
.mm-in { display: flex; flex-direction: column; gap: 8px; flex: 1.3 1 0; min-width: 0; }
.mm-shot { flex: 1 1 0; min-width: 0; height: auto; }
.mm-win { fill: #fff; stroke: var(--sv-line); stroke-width: 1.5; } .mm-bar { fill: #e5e7eb; }
.mm-ttl { font-size: 10px; font-weight: 700; fill: #374151; } .mm-ax { font-size: 9.5px; fill: var(--sv-ink2); }
.mm-q, .mm-a, .sp-say { display: flex; align-items: center; gap: 10px; background: #fff; border: 1px solid var(--sv-line); border-radius: 10px; padding: 8px 12px; font-size: 15px; }
.mm-q p, .mm-a p, .sp-say p { margin: 0; }
.mm-a { flex: 1 1 0; min-width: 0; }
.mm-also { font-size: 14px; color: var(--sv-ink2); }

/* Speech models. */
.io-row.sp > .sp-say, .io-row.iv > .sp-say { flex: 1 1 0; min-width: 0; }
.sp-chain, .iv-diff { display: flex; flex-direction: column; gap: 8px; border: 1.5px dashed var(--model); border-radius: 12px; padding: 10px 12px; background: #fff; }
.sp-chain b, .iv-diff b { font-size: 14px; }
.sp-chain .io-row { gap: 6px; flex-wrap: wrap; justify-content: center; }
.sp-chain .io-m { padding: 6px 8px; font-size: 13px; } .sp-chain .io-ar { font-size: 20px; }
.sp-chain .io-t { width: 54px; } .sp-chain .io-t svg { width: 28px; height: 28px; }

/* Image and video generation. */
.iv-out .pic { width: 150px; }
.iv-film { display: flex; gap: 4px; padding: 5px; background: #1f2937; border-radius: 8px; }
.iv-frame, .iv-step { display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 12px; }
.iv-frame .pic { width: 86px; border: 0; border-radius: 3px; } .iv-frame span { color: #e5e7eb; }
.iv-step .pic { width: 96px; } .iv-step span { color: var(--sv-ink2); }
.iv-diff .io-row { justify-content: center; }

/* Embedding models. */
.eb { flex-direction: row; align-items: center; gap: 18px; }
.eb-list { display: flex; flex-direction: column; gap: 10px; flex: 1 1 0; min-width: 0; }
.eb-row { display: flex; align-items: center; gap: 8px; }
.eb-in { width: 132px; flex: none; display: flex; justify-content: flex-end; font-size: 15px; font-weight: 600; text-align: right; }
.eb-in .pic { width: 84px; }
.eb-v { font: 13px var(--mono); background: #fff; border: 1.5px solid var(--c); color: var(--c); border-radius: 8px; padding: 5px 8px; white-space: nowrap; }
.eb-v.g1 { --c: var(--code); } .eb-v.g2 { --c: var(--no); }
.eb-map { flex: 1 1 0; min-width: 0; max-height: 100%; }
.eb-near { fill: none; stroke: var(--code); stroke-width: 1.5; stroke-dasharray: 5 5; }
.eb-nt { font-size: 12.5px; fill: var(--code); font-weight: 600; }

@media (max-width: 860px) {
  .mm, .eb { flex-direction: column; align-items: stretch; }
  .mm > .io-ar, .eb .io-ar { align-self: center; }
  .io-all .io-row { grid-template-columns: minmax(0, 1fr) 16px 120px 16px minmax(0, 1fr); gap: 4px; }
  .io-row.sp, .io-row.iv { flex-wrap: wrap; }
}

/* How heavy: a bar of five, filled from the left. */
.mw-m { display: flex; gap: 3px; margin-top: 6px; } .mw-m i { width: 14px; height: 8px; border-radius: 2px; background: #e5e7eb; } .mw-m i.on { background: var(--ops); }
.tbl.mw, .tbl.ep, .tbl.vp { font-size: 13.5px; }
.tbl.ep td:nth-child(3), .tbl.ep td:nth-child(4), .tbl.ex td, .tbl.vm td, .tbl.so td:nth-child(2) b, .tbl.so td:nth-child(3) b { font-family: var(--mono); }
.sp-unit, .vm-n { font-size: 14px; color: var(--sv-ink2); margin: 8px 0; }
.sp-unit { text-align: right; }

/* Cosine similarity. */
.sm-v { stroke-width: 3; }
.sm-v.q, .sm-h.q { stroke: var(--user); fill: var(--user); } .sm-t.q, .sm-c.q { fill: var(--user); }
.sm-v.a, .sm-h.a { stroke: var(--code); fill: var(--code); } .sm-t.a, .sm-c.a { fill: var(--code); }
.sm-v.b, .sm-h.b { stroke: var(--no); fill: var(--no); } .sm-t.b, .sm-c.b { fill: var(--no); }
.sm-c { font-family: var(--mono); font-size: 14px; }

/* Semantic search: by words and by meaning. */
.ss { display: flex; flex-direction: column; gap: 14px; }
.ss-q { font-size: 18px; font-weight: 600; color: var(--user); }
.ss-cols { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: 14px; }
.ss-col { background: #fff; border: 1px solid var(--sv-line); border-radius: 10px; padding: 10px 14px; font-size: 14.5px; }
.ss-col ol { margin: 8px 0 0; padding-left: 22px; }
.ss-col li { padding: 3px 0; } .ss-col li span { margin-right: 10px; }
.ss-col li b { font-family: var(--mono); float: right; }
.ss-col li.hit { color: var(--data); font-weight: 700; }
.ss-col p { margin: 6px 0 0; font-size: 13px; color: var(--sv-ink2); }

/* HNSW. */
.hn-band { fill: #f8fafc; stroke: var(--sv-line); }
.hn-e { stroke: #94a3b8; stroke-width: 1.2; }
.hn-n { fill: var(--data); } .hn-n.found { fill: var(--data); stroke: #b91c1c; stroke-width: 3; }
.hn-q { fill: none; stroke: var(--user); stroke-width: 1.6; }
.hn-p { stroke: #b91c1c; stroke-width: 3.2; stroke-linecap: round; }
.hn-drop { stroke: #b91c1c; stroke-width: 2; stroke-dasharray: 4 4; }
.hn-tl { fill: #b91c1c; font-weight: 600; }

/* A vector database. */
.vd { display: flex; flex-direction: column; gap: 12px; }
.tbl.vd { font-size: 13px; } .tbl.vd td:nth-child(3) { min-width: 180px; }
.vd-q { align-self: flex-start; font: 14px var(--mono); background: #fdf2f8; border: 1.5px solid var(--user); border-radius: 8px; padding: 8px 12px; }

@media (max-width: 860px) {
  .ss-cols { grid-template-columns: 1fr; }
}
.hn-q-t { fill: var(--user); font-weight: 600; }
