/* #models: where each shot's app sits (app px in a 700 x 438 canvas, 380 x 475 on phones) and the
   parts the rows add. Settings panes and the wiring diagrams are styled in anywhere.css. */

/* Models and routing: the tab strip, rules, providers, usage and preview as the app draws them */
.set-tabs { max-width: 310px; margin: 14px 0 6px; }
.set-range { max-width: 260px; margin: 12px 0 10px; }
.set-lbl { font-size: 12px; color: var(--fg-3); padding: 12px 0 6px; }
.set-rules { display: flex; flex-direction: column; }
.set-rule { display: flex; flex-direction: column; gap: 9px; padding: 11px 0 12px; border-top: 1px solid var(--line); transition: background-color 400ms var(--ease); }
.set-rule.moved { background: color-mix(in srgb, var(--accent) 8%, transparent); }
.set-rule-h { display: flex; align-items: flex-start; gap: 10px; }
.set-grip { color: var(--fg-3); font-size: 11px; padding-top: 2px; letter-spacing: -1px; }
.set-rule-t { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.set-rule-t .n { color: var(--fg); display: flex; align-items: center; }
.set-rule-t .w { color: var(--fg-3); }
.set-rule-b { display: flex; gap: 8px; }
.set-prov { display: flex; flex-direction: column; gap: 9px; padding: 13px 0 14px; border-top: 1px solid var(--line); }
.set-ph { display: flex; justify-content: space-between; align-items: center; color: var(--fg); }
.set-ph i { font-style: normal; color: var(--fg-3); margin-left: 3px; }
.set-nk { display: flex; align-items: center; gap: 8px; color: var(--fg-3); white-space: nowrap; }
.set-nk .pui-tag { margin: 0; }
.set-nk .set-ok { color: var(--fg-2); }
.set-ms { font: 400 12px var(--font-mono); color: var(--fg-3); }
.set-keyrow { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 8px; }
.set-keyrow .pui-field { display: flex; align-items: center; font: 400 12.5px var(--font-mono); letter-spacing: 0.08em; overflow: hidden; white-space: nowrap; }
.set-keyrow .pui-field .ph { font-family: var(--font-ui); letter-spacing: 0; }
.set-table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.set-table th { text-align: right; font-weight: 400; color: var(--fg-3); padding: 7px 0; border-bottom: 1px solid var(--line); }
.set-table td { text-align: right; padding: 9px 0; border-bottom: 1px solid var(--line); color: var(--fg-2); font-variant-numeric: tabular-nums; }
.set-table th:first-child, .set-table td:first-child { text-align: left; color: var(--fg); }
.set-table th:first-child { color: var(--fg-3); }
.set-bud { display: flex; flex-direction: column; gap: 8px; padding: 10px 0 12px; border-bottom: 1px solid var(--line); }
.set-bl { display: flex; justify-content: space-between; color: var(--fg); }
.set-bl .dev-mono { color: var(--fg-2); font-size: 12px; font-variant-numeric: tabular-nums; }
.set-bar { height: 5px; border-radius: 3px; background: var(--line-2); overflow: hidden; }
.set-bar i { display: block; height: 100%; width: 84%; border-radius: 3px; background: var(--fg-2); transition: width 1600ms var(--ease), background-color 400ms var(--ease); }
.set-bar.over i { width: 100%; background: #d96d6d; }
.set-bar--36 i { width: 36%; }
.set-form { display: grid; grid-template-columns: 90px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 14px 0 4px; }
.set-fl { color: var(--fg-3); }
.set-form .pui-field { display: flex; align-items: center; min-height: 32px; overflow: hidden; white-space: nowrap; }
.set-form .pui-field.mono { font: 400 12.5px var(--font-mono); }
.set-res { display: grid; grid-template-columns: 90px 1fr; gap: 9px 12px; margin: 10px 0 0; padding-top: 12px; border-top: 1px solid var(--line); }
.set-res dt { color: var(--fg-3); }
.set-res dd { margin: 0; color: var(--fg); }
.set-res dd.mono { font: 400 12px var(--font-mono); }
.set-res > * { opacity: 0; transition: opacity 420ms var(--ease); }
.set-res > .in { opacity: 1; }

/* 1 one gateway: the board cut on both sides, the gateway at the centre */
.shot[data-shot='gateway'] .shot-light { --lx: 50%; --ly: 48%; }
.mdl-gw .dg-chip { left: 240px; top: 84px; }
.dg-sm.mdl-gw .dg-chip { left: 108px; top: 94px; }

/* 2 first match wins (Settings panes are placed in anywhere.css: the nav whole, cut right and bottom) */
.mdl-set-rules { --y: 24px; }
.shot[data-shot='rules'] .shot-light { --lx: 48%; --ly: 46%; }

/* 3 private stays private */
.shot[data-shot='strict'] .shot-light { --lx: 52%; --ly: 48%; }
.mdl-strict .dg-chip--rule { left: 222px; top: 82px; }
.mdl-strict .dg-chip--no { left: 500px; top: 34px; border-color: rgba(217, 109, 109, 0.6); }
.dg-sm.mdl-strict .dg-chip--rule { left: 92px; top: 96px; }
.dg-sm.mdl-strict .dg-chip--no { left: 14px; top: 290px; }
.mdl-strict .dg-repo b { color: var(--fg); }

/* 4 providers and keys */
.mdl-set-prov { --y: 14px; }
.shot[data-shot='keys'] .shot-light { --lx: 50%; --ly: 30%; }

/* 5 usage and budgets */
.mdl-set-use { --y: 10px; }
.shot[data-shot='budgets'] .shot-light { --lx: 58%; --ly: 62%; }

/* 6 preview */
.mdl-set-prev { --y: 36px; }
.shot[data-shot='preview'] .shot-light { --lx: 50%; --ly: 58%; }

/* 7 the Polias agent: its tile, cut by the panel at the right and bottom */
.mdl-agent { --x: 64px; --y: 44px; --w: 780px; --h: 470px; }
.mdl-agent .pui-pend .row { flex-wrap: wrap; }
.shot[data-shot='agent'] .shot-light { --lx: 40%; --ly: 46%; }
.sm > #models-agent .mdl-agent { --x: 12px; --y: 30px; --w: 356px; --h: 520px; }
.sm > #models-agent .pui-term { white-space: pre-wrap; }

@media (prefers-reduced-motion: reduce) { .set-bar i, .set-res > *, .set-rule { transition: none; } }

/* diagram node positions (generated with the page markup) */
#models-gateway .dg-lg [data-n="claude"] { left: 14px; top: 70px; width: 170px; height: 44px; }
#models-gateway .dg-lg [data-n="codex"] { left: 14px; top: 128px; width: 170px; height: 44px; }
#models-gateway .dg-lg [data-n="open"] { left: 14px; top: 186px; width: 170px; height: 44px; }
#models-gateway .dg-lg [data-n="aider"] { left: 14px; top: 244px; width: 170px; height: 44px; }
#models-gateway .dg-lg [data-n="agent"] { left: 14px; top: 302px; width: 170px; height: 44px; }
#models-gateway .dg-lg [data-n="gw"] { left: 254px; top: 132px; width: 192px; height: 156px; }
#models-gateway .dg-lg [data-n="anth"] { left: 516px; top: 70px; width: 170px; height: 44px; }
#models-gateway .dg-lg [data-n="openai"] { left: 516px; top: 128px; width: 170px; height: 44px; }
#models-gateway .dg-lg [data-n="google"] { left: 516px; top: 186px; width: 170px; height: 44px; }
#models-gateway .dg-lg [data-n="router"] { left: 516px; top: 244px; width: 170px; height: 44px; }
#models-gateway .dg-lg [data-n="local"] { left: 516px; top: 302px; width: 170px; height: 58px; }
#models-gateway .dg-sm [data-n="claude"] { left: 14px; top: 28px; width: 168px; height: 42px; }
#models-gateway .dg-sm [data-n="codex"] { left: 198px; top: 28px; width: 168px; height: 42px; }
#models-gateway .dg-sm [data-n="gw"] { left: 70px; top: 132px; width: 240px; height: 150px; }
#models-gateway .dg-sm [data-n="anth"] { left: 14px; top: 346px; width: 168px; height: 42px; }
#models-gateway .dg-sm [data-n="openai"] { left: 198px; top: 346px; width: 168px; height: 42px; }
#models-gateway .dg-sm [data-n="local"] { left: 14px; top: 402px; width: 352px; height: 50px; }
#models-strict .dg-lg [data-n="repo"] { left: 30px; top: 168px; width: 170px; height: 70px; }
#models-strict .dg-lg [data-n="gw"] { left: 246px; top: 132px; width: 190px; height: 142px; }
#models-strict .dg-lg [data-n="anth"] { left: 500px; top: 84px; width: 180px; height: 48px; }
#models-strict .dg-lg [data-n="local"] { left: 500px; top: 276px; width: 180px; height: 60px; }
#models-strict .dg-sm [data-n="repo"] { left: 105px; top: 24px; width: 170px; height: 62px; }
#models-strict .dg-sm [data-n="gw"] { left: 85px; top: 136px; width: 210px; height: 128px; }
#models-strict .dg-sm [data-n="anth"] { left: 14px; top: 330px; width: 160px; height: 52px; }
#models-strict .dg-sm [data-n="local"] { left: 190px; top: 330px; width: 176px; height: 62px; }
