.transformer-figure {
  --tx-ink:#31474f; --tx-muted:#607379; --tx-line:#dce5e7;
  -webkit-user-select:none; user-select:none; -webkit-tap-highlight-color:transparent;
  width:min(100%, 600px); margin:2.2rem auto 2.6rem; color:var(--tx-ink);
  font:14px/1.4 "Source Sans 3",system-ui,sans-serif; font-variant-numeric:tabular-nums;
}
.transformer-figure * { box-sizing:border-box; }
.transformer-figure svg { display:block; width:100%; overflow:visible; user-select:none; }
.transformer-figure svg text { fill:var(--tx-muted); font:12px system-ui,sans-serif; }
.transformer-figure button, .transformer-figure select { font:inherit; color:inherit; }
.tx-choices { display:flex; align-items:center; justify-content:center; flex-wrap:wrap; gap:3px; }
.tx-choices { margin:0 auto 14px; }
.tx-choices button { cursor:pointer; padding:.25rem .52rem; border:1px solid transparent; border-radius:5px; background:transparent; }
.tx-choices button:hover { color:#175e52; }
.tx-choices button[aria-pressed=true] { color:#175e52; border-color:#a7d4cb; }
.tx-heads { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:16px; max-width:480px; margin:auto; }
.tx-heads figure { margin:0; }
.tx-heads figcaption { text-align:center; font-size:13px; color:var(--tx-muted); margin-top:4px; }
.tx-heads svg .token { font:12px Georgia,serif; }
.tx-heads svg .chosen { fill:#166352; font-weight:bold; }
.tx-predictions { display:grid; grid-template-columns: minmax(70px,auto) 1fr auto; align-items:center; gap:9px 10px; max-width:410px; margin:22px auto; }
.tx-predictions .tx-word { text-align:right; font-family:Georgia,serif; font-size:16px; }
.tx-predictions .tx-track { background:#eef3f5; height:10px; border-radius:3px; overflow:hidden; }
.tx-track > div { background:#4887b1; height:100%; border-radius:3px; }
.tx-predictions .tx-value { min-width:44px; font-size:12px; }
.tx-predictions [data-target=true] { color:#176958; font-weight:650; }
.tx-predictions [data-target=true] + .tx-track > div { background:#218272; }
.tx-prefix .tx-future { opacity:.55; }
.tx-probe-grid { display:grid; grid-template-columns:minmax(0,265px) minmax(0,220px); gap:20px; justify-content:center; align-items:center; }
.tx-probe-grid .accuracy { font-size:14px; fill:#175e52; font-weight:600; }
@media(max-width:550px) {
  .tx-heads { gap:3px; }
  .tx-probe-grid { grid-template-columns:minmax(0,255px); gap:4px; }
  .tx-probe-grid svg:nth-child(2) { max-width:205px; margin:auto; }
  .tx-choices { gap:1px; }
  .tx-choices button { padding:.25rem .36rem; }
}
@media(max-width:440px) {
  .tx-heads { grid-template-columns:minmax(0,215px); justify-content:center; gap:12px; }
}

.tx-backbone { max-width:458px; }
.tx-backbone .tx-circuit { max-width:420px; margin:auto; }
.tx-circuit .tx-variable { font:italic 18px Georgia,serif; fill:#31474f; }
.tx-circuit .tx-block-name { font-size:15px; font-weight:600; fill:#31474f; }
.tx-circuit .tx-number { font-size:10px; }
.tx-circuit-control { outline:none; cursor:pointer; color:#9badb2; }
.tx-block-hit { fill:transparent; }
.tx-circuit-control[aria-pressed=true] { color:#17685b; }
.tx-circuit-control[aria-pressed=true] .tx-number { fill:#17685b; font-weight:650; }
.tx-module { fill:#fff; stroke-width:1.1; }
.tx-circuit-control[aria-pressed=true] .tx-module { fill:#edf5f7; stroke-width:1.8; }
.tx-circuit-control:focus-visible .tx-block-hit, .tx-circuit-control:focus-visible .tx-module { stroke:#304b56; stroke-width:2; }
.tx-addition { margin:10px auto 0; width:min(100%,390px); display:grid; grid-template-columns:1fr auto 1fr auto 1fr; align-items:start; gap:9px; }
.tx-vector { min-width:0; text-align:center; font-size:12px; }
.tx-sign { align-self:start; margin-top:10px; font:18px Georgia,serif; color:#788b91; }
@media(max-width:440px) { .tx-addition { gap:5px; } .tx-sign { margin-top:6px; } }
.tx-heads .tx-same-pair { stroke:#176658; stroke-width:2; }
.tx-heads figcaption { min-height:1.5em; }
.tx-predictions [data-target=true] { text-decoration:underline; text-underline-offset:3px; }

[data-transformer="steer"] { width:min(100%,900px); container-type:inline-size; }
[data-transformer="steer"] .tx-choices { flex-wrap:nowrap; }
[data-transformer="steer"] .tx-choices button { white-space:nowrap; }
.tx-short-prompt { display:none; }
@container (max-width:850px) {
  .tx-full-prompt { display:none; }
  .tx-short-prompt { display:inline; }
}
@container (max-width:300px) {
  [data-transformer="steer"] .tx-choices button { padding-inline:.18rem; }
}
.tx-interview-question { text-align:center; margin:12px 0 0; }
.tx-completions { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:24px; margin-top:18px; }
.tx-completion { border-top:2px solid #a5b4b9; padding:10px 2px 0; }
.tx-completion + .tx-completion { border-color:#218272; }
.tx-model-name { font-size:13px; color:#4e646d; }
.tx-completion + .tx-completion .tx-model-name { color:#176658; }
.tx-completion p { margin:7px 0; font:16px/1.55 Georgia,serif; white-space:pre-wrap; overflow-wrap:anywhere; }
.tx-given-prompt { color:#68787e; }
.tx-probe-details { display:flex; align-items:baseline; justify-content:center; gap:6px 15px; flex-wrap:wrap; }
.tx-probe-details strong { color:#176658; }
[data-arithmetic-probe] { max-width:490px; }
[data-arithmetic-probe] svg { cursor:crosshair; touch-action:pan-y; }
@media(max-width:550px) { .tx-completions { grid-template-columns:minmax(0,1fr); gap:10px; } }
.tx-probe-key { display:flex; justify-content:center; gap:22px; margin-bottom:7px; font-size:12px; }
.tx-probe-key span::before { content:""; display:inline-block; width:17px; margin:0 6px 3px 0; border-top:2px solid #218272; }
.tx-probe-key span + span::before { border-top:2px dashed #337cad; }

.tx-mix { max-width:480px; container-type:inline-size; }
.tx-mix-diagram { --tile:clamp(12px,4.45cqw,21px); --gap:2px; }
.tx-mix-row {
  display:grid; grid-template-columns:minmax(0,1.1fr) 1em minmax(0,1fr) 1em minmax(0,1fr);
  justify-items:center; align-items:center;
}
.tx-mix-titles { margin-bottom:20px; font-size:clamp(11px,3.1cqw,14px); font-weight:600; }
.tx-mix-titles span:nth-child(2) { grid-column:3; }
.tx-mix-titles span:last-child,.tx-mix-plus span { grid-column:5; }
.tx-mix-head-1 { --ink:#316e9d; --pale:#dae7f1; }
.tx-mix-head-2 { --ink:#207c69; --pale:#d7eae4; }
.tx-mix-grid { display:grid; grid-template-columns:repeat(var(--cols),var(--tile)); gap:var(--gap); }
.tx-mix .tx-mix-cell { width:var(--tile); height:var(--tile); border:0; border-radius:3px; padding:0; background:var(--pale); }
.tx-mix .tx-mix-cell.lit { background:var(--ink); }
.tx-mix-op { color:#718087; font:21px/1 Georgia,serif; }
.tx-head-output { position:relative; }
.tx-mix-name { display:block; position:absolute; top:calc(100% + 3px); width:100%; text-align:center; white-space:nowrap; color:var(--ink); font-size:clamp(10px,2.8cqw,12px); }
.tx-mix-tokens { position:absolute; right:calc(100% + 5px); display:grid; gap:var(--gap); font:italic clamp(10px,2.8cqw,13px)/var(--tile) Georgia,serif; text-align:right; color:#65767d; }
.tx-mix-tokens .lit { color:var(--ink); font-weight:bold; }
.tx-mix-plus { margin:8px 0; }
.tx-mix-total { --pale:#e4e9ec; margin-top:12px; padding-top:9px; }
.tx-mix-total .tx-mix-grid { position:relative; grid-column:5; }
.tx-mix-total .tx-mix-grid::before { content:""; position:absolute; inset:-10px 0 auto; height:1px; background:#8ba0a5; }
.tx-update-label { grid-column:1 / 5; justify-self:end; font-size:clamp(11px,3.1cqw,14px); font-weight:600; }
.tx-mix-total button { cursor:crosshair; }
.tx-mix-total button[aria-pressed=true] { background:linear-gradient(135deg,#316e9d 48%,white 48% 52%,#207c69 52%); }
.tx-mix-total button:focus-visible { outline:2px solid #354b57; outline-offset:1px; }

[data-arithmetic-probe] { width:min(100%,720px); max-width:none; }
.tx-probe-panels { display:grid; grid-template-columns:minmax(0,420fr) minmax(0,245fr); gap:clamp(14px,3vw,32px); align-items:start; }
.tx-probe-panel { min-width:0; text-align:center; font-size:12px; }
.tx-probe-panel .tx-probe-key,.tx-score-title { min-height:19px; margin:0 0 4px; }
.tx-score-title { font-weight:600; }
.tx-probe-panel .tx-probe-details { margin:0; }
.tx-probe-panel + .tx-probe-panel svg { cursor:default; }
@media (max-width:660px) {
  .tx-probe-panels { grid-template-columns:minmax(0,420px); justify-content:center; gap:20px; }
  .tx-probe-panel + .tx-probe-panel { width:min(100%,245px); justify-self:center; }
}
