/* Hand-built figures for lesson 28, Vector indexes. */

/* shared: two columns that stack on a phone, maps, charts, cards, the draggable question */
.vx-two { display: grid; gap: 22px; grid-template-columns: 1fr; align-items: start; }
@media (min-width: 760px) {
  .vx-two { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .vx-two.wide-left { grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); }
}
.vx-ctl { display: flex; flex-wrap: wrap; gap: 12px 28px; align-items: center; margin: 4px 0 18px; font-size: 0.85rem; }
.vx-ctl .slider input { width: 160px; }
.vx-ctl-row { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; }
.vx-ctl-lbl { color: var(--ink-3); }
.vx-map, .vx-chart, .vx-tower { width: 100%; height: auto; display: block; margin: 0 auto; }
.vx-map { max-width: 420px; touch-action: none; }
.vx-chart { max-width: 520px; }
.vx-grid { stroke: var(--line); stroke-width: 1; }
.vx-grid.flat { stroke: var(--ink-3); stroke-dasharray: 5 4; }
.vx-tick { font: 12px var(--f-mono); fill: var(--ink-3); }
.vx-axis-lbl { font: 12.5px var(--f-ui); fill: var(--ink-3); }
@media (max-width: 600px) {
  .vx-chart .vx-tick, .vx-tower .vx-tick { font-size: 17px; }
  .vx-chart .vx-axis-lbl, .vx-tower .vx-axis-lbl, .vx-chart .vx-zone-lbl { font-size: 16px; }
  .vx-chart .vx-curve-lbl { font-size: 17px; }
}
.vx-q { cursor: grab; outline: none; }
.vx-q-hit { fill: transparent; }
.vx-q-star { fill: var(--gold); stroke: var(--bg); stroke-width: 1.5; stroke-linejoin: round; }
.vx-q:focus-visible .vx-q-hit { fill: none; stroke: var(--gold); stroke-width: 2.5; stroke-dasharray: 4 3; }
.vx-side .kicker { margin-bottom: 8px; }
.vx-lead { font-size: 0.92rem; color: var(--ink-2); margin: 0 0 10px; }
.vx-lead b { color: var(--ink); }
.vx-card { display: flex; flex-direction: column; gap: 2px; padding: 10px 14px; margin: 0 0 10px; border-radius: var(--r-1); background: var(--surface-2); border: 1px solid var(--line-2); }
.vx-card-n { font: 500 1.45rem/1.2 var(--f-mono); color: var(--gold); font-variant-numeric: tabular-nums; }
.vx-card-l { font-size: 0.85rem; color: var(--ink-2); }
.vx-card.hnsw .vx-card-n { color: var(--accent-ink); }
.vx-note { font-size: 0.85rem; color: var(--ink-2); margin: 0 0 12px; overflow-wrap: anywhere; }
.vx-note b { color: var(--ink); font-variant-numeric: tabular-nums; }
.vx-scroll { overflow-x: auto; }

/* hero */
.hvx { display: block; width: 100%; max-width: 900px; height: auto; margin: 0 auto; }
.hvx-street { stroke: var(--ink-3); stroke-width: 1; opacity: 0.45; }
.hvx-highway { stroke: var(--accent); stroke-width: 3; opacity: 0.55; stroke-linecap: round; }
.hvx-pt { fill: var(--ink-3); }
.hvx-hub { fill: var(--accent); stroke: var(--bg); stroke-width: 1.5; }
.hvx-run, .hvx-hop, .hvx-star { transition: opacity 0.45s var(--ease, ease); }
.hvx-hop { stroke-linecap: round; }
.hvx-hop.hw { stroke: var(--gold); stroke-width: 5; }
.hvx-hop.st { stroke: var(--gold); stroke-width: 2.5; stroke-dasharray: 5 4; }
.hvx-star { fill: var(--gold); stroke: var(--bg); stroke-width: 1.5; }

/* the eight houses */
.vx-house circle { fill: var(--surface-2); stroke: var(--ink-3); stroke-width: 1.5; }
.vx-house-lbl { font: 600 13px var(--f-ui); fill: var(--ink); pointer-events: none; }
.vx-house.best circle { fill: var(--gold-soft); stroke: var(--gold); stroke-width: 2.5; }
.vx-link { stroke: var(--gold); stroke-width: 2; stroke-dasharray: 5 4; }
.vx-table { border-collapse: collapse; width: 100%; font: 0.85rem var(--f-mono); font-variant-numeric: tabular-nums; }
.vx-table th, .vx-table td { padding: 4px 8px; text-align: right; border-bottom: 1px solid var(--line); color: var(--ink-2); white-space: nowrap; }
.vx-table thead th { font: 500 0.72rem var(--f-ui); color: var(--ink-3); border-bottom-color: var(--line-2); white-space: normal; }
.vx-table th:first-child, .vx-table td:first-child { text-align: left; }
.vx-table tbody th { font: 600 0.85rem var(--f-ui); color: var(--ink); }
.vx-table tr.best td, .vx-table tr.best th { background: var(--gold-soft); color: var(--ink); }

/* flat search */
.vx-zone-lbl { font: 12.5px var(--f-ui); fill: var(--ink-2); }
.vx-line { stroke: var(--ink-3); stroke-width: 1.5; opacity: 0.45; }
.vx-line.on { stroke: var(--accent); stroke-width: 3; opacity: 1; }
.vx-dot { fill: var(--gold); stroke: var(--bg); stroke-width: 2; }

/* IVF */
.vx-cell { fill: oklch(var(--field-l) var(--field-c) calc(var(--h) * 1deg) / 0.12); stroke: var(--bg); stroke-width: 1.5; }
.vx-cell.open { fill: oklch(var(--field-l) var(--field-c) calc(var(--h) * 1deg) / 0.4); stroke: var(--ink); stroke-width: 2; }
.vx-pt { fill: var(--ink-3); opacity: 0.35; }
.vx-pt.scanned { fill: var(--ink); opacity: 1; }
.vx-cent { stroke: var(--ink-2); stroke-width: 2.5; stroke-linecap: round; }
.vx-cent.open { stroke: var(--ink); stroke-width: 3.5; }
.vx-ring { fill: none; stroke-width: 2.5; }
.vx-ring.found { stroke: var(--gold); fill: var(--gold); fill-opacity: 0.35; }
.vx-ring.missed { stroke: var(--bad); stroke-dasharray: 3 3; }
.vx-key { font-size: 0.8rem; color: var(--ink-3); display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; margin: 4px 0 0; }
.vx-sw { display: inline-block; width: 14px; height: 14px; border-radius: 50%; border: 2.5px solid; }
.vx-sw.found { border-color: var(--gold); background: color-mix(in oklab, var(--gold) 35%, transparent); }
.vx-sw.missed { border-color: var(--bad); border-style: dashed; margin-left: 8px; }

/* PQ */
.vx-pads { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 22px; max-width: 640px; margin: 0 auto; }
@media (max-width: 560px) { .vx-pads { grid-template-columns: minmax(0, 300px); justify-content: center; } }
.vx-pad-t { font-size: 0.8rem; color: var(--ink-3); text-align: center; margin: 0 0 2px; }
.vx-pad { width: 100%; height: auto; display: block; touch-action: none; }
.vx-circle { fill: none; stroke: var(--line-2); stroke-width: 1.5; }
.vx-qarrow { stroke: var(--ink-3); stroke-width: 3; stroke-linecap: round; opacity: 0.7; }
.vx-entry { fill: var(--surface-2); stroke: var(--ink-3); stroke-width: 1.5; }
.vx-entry.on { fill: var(--gold); stroke: var(--gold); }
.vx-entry-lbl { font: 12px var(--f-mono); fill: var(--ink-3); }
.vx-entry-lbl.on { fill: var(--ink); font-weight: 700; }
.vx-x-dot { fill: var(--ink); stroke: var(--bg); stroke-width: 2; }
.vx-q:focus-visible .vx-x-dot { stroke: var(--gold); stroke-width: 3; }
.vx-q-lbl { font: italic 600 15px var(--f-body); fill: var(--ink-3); }
.vx-snap { stroke: var(--gold); stroke-width: 2; stroke-dasharray: 4 3; }
.vx-pq-out { margin-top: 14px; font-size: 0.9rem; color: var(--ink-2); }
.vx-pq-out > p { margin: 0 0 8px; }
.vx-pq-out b { color: var(--ink); }
.vx-tables { border-collapse: collapse; font: 0.85rem var(--f-mono); font-variant-numeric: tabular-nums; margin: 0 0 12px; }
.vx-tables th { font: italic 600 1rem var(--f-body); color: var(--ink); padding: 4px 10px 4px 0; text-align: left; }
.vx-tables td { padding: 3px 6px; text-align: center; border: 1px solid var(--line); color: var(--ink-2); min-width: 3.4em; }
.vx-tables td span { display: block; font-size: 0.68rem; color: var(--ink-3); }
.vx-tables td.on { background: var(--gold-soft); color: var(--ink); font-weight: 600; border-color: var(--gold); }
.vx-scores { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 0 12px; }

/* HNSW layers */
.vx-work { font: 0.9rem/1.7 var(--f-mono); color: var(--ink-2); margin: 0 0 10px; overflow-wrap: anywhere; }
.vx-work b { color: var(--ink); }
.vx-tower-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 6px; }
.vx-tower-head .kicker { margin: 0; }
.vx-tower { max-width: 480px; }
.vx-row-lbl { font: 13px var(--f-mono); fill: var(--ink-3); }
.vx-row-lbl.on { fill: var(--ink); font-weight: 700; }
.vx-bar { fill: var(--accent); opacity: 0.55; }
.vx-bar.on { fill: var(--gold); opacity: 1; }
.vx-expect { stroke: var(--ink); stroke-width: 2.5; }
.vx-count { font: 12px var(--f-mono); fill: var(--ink-2); }
@media (max-width: 600px) { .vx-row-lbl, .vx-count { font-size: 17px; } }

/* the dial */
.vx-target { stroke: var(--ink); stroke-width: 1.5; stroke-dasharray: 6 4; }
.vx-curve { fill: none; stroke-width: 2.5; }
.vx-curve.hnsw { stroke: var(--accent); } .vx-curve.ivf { stroke: var(--gold); }
.vx-mark.hnsw { fill: var(--accent); } .vx-mark.ivf { fill: var(--gold); }
.vx-pick { fill: none; stroke-width: 2.5; }
.vx-pick.hnsw { stroke: var(--accent); } .vx-pick.ivf { stroke: var(--gold); }
.vx-curve-lbl { font: 600 13px var(--f-ui); paint-order: stroke; stroke: var(--surface); stroke-width: 4px; stroke-linejoin: round; }
.vx-curve-lbl.hnsw { fill: var(--accent-ink); } .vx-curve-lbl.ivf { fill: var(--gold); }
