.attention-figure { margin:2.2rem auto 2.8rem; max-width:640px; color:#333; }
.attention-figure,.attention-figure * { user-select:none; -webkit-user-select:none; }
.attention-scroll { overflow-x:auto; overscroll-behavior-x:contain; }
.attention-svg { display:block; width:100%; height:auto; font-family:"DejaVu Sans",sans-serif; }
.attention-svg text { pointer-events:none; }
.attention-svg .att-math { font-family:Georgia,"Times New Roman",serif; font-size:21px; }
.attention-svg .att-label { font-size:12px; fill:#68716e; }
.attention-svg .att-operation { font-size:13px; fill:#68716e; }
.attention-svg .att-cell { cursor:default; outline:none; }
.attention-svg .att-editable { cursor:ns-resize; touch-action:none; }
.attention-svg .att-cell rect { stroke:transparent; stroke-width:2; }
.attention-svg .att-cell.is-active rect { stroke:#44aa99; }
.attention-svg .att-cell.is-selected rect { stroke:#176958; stroke-width:2.7; }
.attention-svg .att-cell:focus-visible rect { stroke:#176958; stroke-width:3; }
.attention-svg .att-bracket { fill:none; stroke:#666; stroke-width:1.2; }
.attention-svg .att-arrow { fill:none; stroke:#939d99; stroke-width:1.3; }
@media(prefers-reduced-motion:no-preference) {
  .attention-svg .att-cell { transition:opacity 90ms ease; }
}

.attention-svg .att-output { cursor:crosshair; }

.attention-figure { --heatmap-side:252px; }
.attention-scaling-panels { display:grid; gap:24px; justify-content:center; grid-template-columns:repeat(2,minmax(0,calc(var(--heatmap-side) * 1.1))); }
.attention-scaling-formula { display:grid; place-items:center; min-height:2.4em; text-align:center; font-family:Georgia,"Times New Roman",serif; font-size:13px; white-space:nowrap; margin-top:3px; }
.attention-scaling-controls { display:flex; align-items:center; justify-content:center; gap:20px; margin:28px auto 14px; }
.attention-scaling-controls label { min-width:70px; margin:0; color:#333; font-size:16px; font-variant-numeric:tabular-nums; }
.attention-scaling .attention-scaling-controls label {
  display:inline-flex;
  align-items:baseline;
  gap:.3em;
  min-width:0;
  font-size:14px;
  line-height:1;
  white-space:nowrap;
}
.attention-scaling .attention-scaling-controls output { min-width:3ch; }
.attention-scaling #attention-dimension { margin:0; }
.attention-scaling-controls input { width:200px; max-width:50%; accent-color:#337cad; cursor:pointer; }
.attention-scaling:not([data-ready]) .attention-scaling-panels,
.attention-scaling:not([data-ready]) .attention-scaling-controls,
.attention-scaling[data-ready] .attention-scaling-fallback { display:none; }

.attention-svg .att-token { font-family:Georgia,"Times New Roman",serif; font-weight:700; font-style:italic; font-size:14px; fill:#68716e; }
/* Match the colored squares, allowing extra room for the causal axes. */
.attention-causal svg { width:min(100%,calc(var(--heatmap-side) * 394 / 330)); margin-inline:auto; }
.attention-svg .att-token { font-size:17px; }
.attention-svg .att-token tspan { font-size:72%; font-style:normal; font-weight:400; }
@media (max-width:620px) {
  .attention-scaling-panels { grid-template-columns:minmax(0,calc(var(--heatmap-side) * 1.1)); gap:18px; }
}
.attention-causal-tokens { text-align:center; margin:0 auto 22px; line-height:1.9; font-size:17px; }
.attention-causal-tokens span { color:#c8cccf; white-space:pre-wrap; }
.attention-causal-tokens .is-revealed { color:#414c52; }
.attention-causal-tokens .is-current { color:#176958; background:#edf6f3; border-radius:3px; }
.attention-causal-current { fill:none; stroke:#44aa99; stroke-width:1.6; pointer-events:none; }
.attention-causal-tokens .is-source { text-decoration:underline; text-decoration-color:#337cad; text-underline-offset:4px; }
.attention-causal-tokens .is-query { background:#edf6f3; color:#176958; border-radius:3px; }
.attention-causal .att-token.is-source { fill:#337cad; }
.attention-causal .att-token.is-query { fill:#176958; }
.attention-causal rect[data-visible=true] { cursor:crosshair; }
.attention-causal rect.is-hovered { stroke:#176958; stroke-width:1.5; }
.attention-causal:not([data-ready]) .attention-causal-tokens,
.attention-causal:not([data-ready]) svg,
.attention-causal:not([data-ready]) .attention-scaling-controls,
.attention-causal[data-ready] .attention-causal-fallback { display:none; }

.att-score-caption { pointer-events:none; }
.att-fraction { font:16px Georgia,"Times New Roman",serif; }
.att-variable { font-style:italic; }

[data-attention] { max-width:940px; }
[data-attention] .attention-svg { min-width:790px; }

.value-mixture { max-width:590px; }
.mix-sentence { display:flex; justify-content:center; flex-wrap:wrap; gap:5px 12px; margin:0; padding:0; list-style:none; }
.mix-sentence li { display:grid; grid-template-rows:40px auto; justify-items:center; min-width:1em; color:#53626b; font-size:15px; }
.mix-sentence .mix-weight { display:block; align-self:end; width:10px; border-radius:2px 2px 0 0; background:#337cad; }
.mix-sentence .mix-target { font-weight:700; color:#176958; }
.mix-sentence .mix-active { text-decoration:underline; }
.mix-plane { max-width:420px; margin:12px auto 5px; }
.mix-axes { stroke:#e0e5e7; fill:none; }
.mix-value { fill:#83acc6; }
.mix-value.mix-active { stroke:#337cad; stroke-width:2; }
.mix-name { font-size:13px; fill:#465864; }
.mix-vector { stroke:#176958; stroke-width:2; }
.mix-end { fill:#176958; stroke:white; stroke-width:1.5; }
.mix-plane .att-token { fill:#176958; }
.mix-control { display:flex; flex-wrap:wrap; justify-content:center; align-items:center; gap:12px; font-size:15px; }
.mix-control input { width:min(36%,175px); accent-color:#337cad; }
.mix-control output { min-width:4ch; font-variant-numeric:tabular-nums; }
.value-mixture:not([data-ready]) > :not(.mix-fallback), .value-mixture[data-ready] .mix-fallback { display:none; }
