/* Deployment Patterns for LLM Applications: the figures on its slides. Boxes,
   chips, tables and the shared colours are in ../llmops.css. */

/* Boxes drawn in SVG, in the shared colours. */
.sb { stroke-width: 2; fill: #fff; stroke: var(--sv-line); }
.sb.model { fill: #f7f3ff; stroke: var(--model); }
.sb.code { fill: #f0f8fd; stroke: var(--code); }
.sb.data { fill: #effaf5; stroke: var(--data); }
.sb.tool { fill: #fffaf0; stroke: var(--tool); }
.sb.user { fill: #fdf2f8; stroke: var(--user); }
.sb.ops { fill: #f5f7fa; stroke: var(--ops); }
.sb.big { stroke-width: 3.2; }
.dp-cluster { fill: none; stroke: #94a3b8; stroke-width: 1.6; stroke-dasharray: 7 5; }
.d-arrow.dp-trace { stroke: #94a3b8; stroke-dasharray: 5 4; }

.stack { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.sv-fig > .src { margin-top: 10px; }

/* The gateway. */
.gw { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1.25fr) auto minmax(0, 1fr); gap: 8px; align-items: center; }
.gw-col { display: flex; flex-direction: column; gap: 10px; }
.gw-mid { align-items: stretch; text-align: left; padding: 12px 14px; }
.gw-mid b { text-align: center; font-size: 16px; }
.gw-mid ul { margin: 6px 0 0; padding-left: 18px; font-size: 13.5px; }
.gw-mid li { margin: 4px 0; }

/* Routing. */
.rt-lab { font-family: var(--mono); font-weight: 600; fill: var(--model); }

/* Fallbacks. */
.fb-lane { stroke: #e1e5ea; stroke-width: 1.4; }
.fb-bar.no { fill: #fde8e8; stroke: var(--no); stroke-width: 1.6; }
.fb-bar.ok { fill: #e6f6ec; stroke: var(--ok); stroke-width: 1.6; }
.fb-res.no { fill: var(--no); font-weight: 600; }
.fb-res.ok { fill: var(--ok); font-weight: 600; }
.fb-wait { stroke: var(--ops); stroke-width: 2; stroke-dasharray: 3 4; }

/* Streaming. */
.st-wait { fill: #eef0f3; }
.st-all { fill: var(--model); }
.st-tok { stroke: var(--model); stroke-width: 2.2; }
.st-mark { stroke: var(--model); stroke-width: 1.6; }
.st-ttft { fill: var(--model); font-weight: 600; }
.st-limit { stroke: var(--no); stroke-width: 1.8; stroke-dasharray: 6 4; }
.st-lim { fill: var(--no); font-weight: 600; }

/* Caching. */
.tbl.ca th:first-child { white-space: nowrap; }

/* Rate limits. */
.rl-bar { fill: #c4b5fd; }
.rl-over { fill: var(--no); opacity: .8; }
.rl-limit { stroke: var(--no); stroke-width: 2; stroke-dasharray: 7 5; }
.rl-lt, .rl-ot { fill: var(--no); font-weight: 600; }
.sv-fig > .flow { margin-top: 8px; }

/* Rollout. */
.ro-old { fill: #d7dce2; }
.ro-new { fill: var(--model); }
.ro-shadow { fill: #fff; stroke: var(--model); stroke-width: 1.6; stroke-dasharray: 4 3; }
.ro-gate { fill: #e6f6ec; stroke: var(--ok); stroke-width: 1.6; }
.ro-gt { font-size: 13px; font-weight: 700; fill: var(--ok); }
.d-arrow.ro-back { stroke: var(--no); }
.ro-bt { fill: var(--no); font-weight: 600; }

/* The canary comparison. */
.tbl.rc tr:not(:first-child) th { white-space: nowrap; }

/* Self-hosting. */
.sh-node { fill: #f5f7fa; stroke: #94a3b8; stroke-width: 1.4; }
.sh-gpu { fill: #ede9fe; stroke: var(--model); stroke-width: 1.2; }
.sb.model.sh-start { stroke-dasharray: 6 4; fill: #fff; }
.sh-step.s0 { fill: #e2e8f0; } .sh-step.s1 { fill: #cbd5e1; } .sh-step.s2 { fill: #c4b5fd; }
.sh-sl { fill: var(--sv-ink); font-weight: 600; }

/* The deployment as code. */
.ac { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: 14px; align-items: start; }

@media (max-width: 860px) {
  .gw, .ac { grid-template-columns: 1fr; }
  .gw > .ar i { transform: rotate(90deg); }
}
