/* Looking Into an LLM: set in the site's broadsheet style (ink on paper, the yellow highlighter), with motion that explains. */
:root {
    /* aronfrishberg.com broadsheet: #2f2f2f ink on #f9f7f1 paper, the site's yellow highlighter as the one accent,
       and two muted print inks (brick, slate) where a chart needs to tell + from -. */
    --ink: #2f2f2f; --ink2: #3a3a3a; --mute: #6b6b6b; --faint: #9a9a9a; --line: #d8d2c2; --wash: #efebdf; --bg: #f9f7f1; --paper-ink: #2f2f2f;
    --hl: rgba(255, 225, 0, .7); --hl-soft: rgba(255, 225, 0, .32);
    --brick: #a8432a; --slate: #3d5a80;
    --coral: #2f2f2f; --coral2: #2f2f2f; --coral-soft: rgba(255, 225, 0, .38); --teal: #3d5a80;
    --grad: #2f2f2f;
    --r: 0; --r-sm: 2px;
    --sh1: none; --sh2: 0 2px 0 rgba(47,47,47,.12);
    --ease: cubic-bezier(.2,.8,.2,1);
    --sans: "Libre Franklin", Helvetica, Arial, sans-serif;
    --serif: Georgia, "Droid Serif", serif;
    --display: "Playfair Display", serif;
    --mono: "Libre Franklin", Helvetica, Arial, sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body.xr { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.55 var(--sans); -webkit-font-smoothing: antialiased; padding-bottom: 120px; }
button { font: inherit; color: inherit; cursor: pointer; background: none; border: 0; padding: 0; }
a { color: inherit; }
main { max-width: 1180px; margin: 0 auto; padding: 0 40px; }

/* ---------- site integration: masthead, article header, imprint ---------- */
/* the site's masthead and imprint are sized content-box; keep them identical to every other page */
.masthead, .imprint { box-sizing: content-box; }
/* the site sets old-style figures on body; the app's numbers should line up */
main, .xr-player, .xr-drawer, .xr-tip { font-feature-settings: normal; }
.xr-head { margin: 36px 0 26px; font-feature-settings: "onum"; }
.xr-head .article-deck { max-width: 720px; }
.xr-head .article-byline { margin-bottom: 0; }

/* ---------- prompt + story ---------- */
.xr-story-card { max-width: 920px; margin: 0 auto 18px; }
.xr-prompt { display: flex; align-items: center; gap: 10px; background: var(--bg); border: 1px solid #2f2f2f; border-radius: 0; padding: 8px 8px 8px 28px; box-shadow: var(--sh1); transition: box-shadow .25s var(--ease), border-color .25s; }
.xr-prompt:focus-within { box-shadow: var(--sh2); border-color: transparent; }
#xr-prompt { flex: 1; border: 0; outline: 0; resize: none; font: 500 17px/1.45 var(--sans); color: var(--ink); background: none; padding: 10px 0; max-height: 120px; overflow: auto; }
.xr-go { flex: none; width: 52px; height: 52px; border-radius: 50%; background: var(--grad); display: grid; place-items: center; transition: transform .2s var(--ease), box-shadow .2s; box-shadow: none; }
.xr-go svg { width: 20px; height: 20px; fill: #fff; margin-left: 3px; }
.xr-go:hover { transform: scale(1.06); }
.xr-go:active { transform: scale(.96); }
.xr-examples { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; align-items: center; margin: 14px 0 18px; font-size: 13px; }
.xr-examples span { color: var(--mute); font-weight: 600; margin-right: 2px; }
.xr-examples button { border: 1px solid var(--line); border-radius: 0; padding: 7px 14px; font-weight: 500; transition: border-color .2s, background .2s, transform .2s var(--ease); }
.xr-examples button:hover { border-color: var(--ink); transform: translateY(-1px); }
.xr-examples button:active { transform: scale(.97); }

.xr-story-wrap { position: relative; border-radius: var(--r); background: var(--bg); border: 1px solid var(--line); }
.xr-arcs { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; overflow: visible; z-index: 2; }
.xr-arcs path { fill: none; stroke-linecap: round; stroke-dasharray: 1; stroke-dashoffset: 1; animation: xr-draw .9s var(--ease) forwards; mix-blend-mode: multiply; }
.xr-arcs circle { opacity: 0; animation: xr-pop .35s var(--ease) forwards; }
@keyframes xr-draw { to { stroke-dashoffset: 0; } }
@keyframes xr-pop { from { opacity: 0; transform-box: fill-box; transform-origin: center; transform: scale(0); } to { opacity: 1; transform-box: fill-box; transform-origin: center; transform: scale(1); } }
.xr-story { position: relative; z-index: 1; min-height: 112px; padding: 36px 34px 24px; font: 500 clamp(19px, 2.2vw, 25px)/1.85 var(--sans); letter-spacing: -.01em; white-space: pre-wrap; word-wrap: break-word; }
.tk { border-radius: 0; cursor: pointer; transition: background .35s, color .35s, box-shadow .35s; }
.tk-p { color: var(--mute); }
.tk-g { color: var(--ink); }
.tk-f { box-shadow: inset 0 -2px 0 var(--teal); }
.tk:hover { background: rgba(0,0,0,.06); }
.tk-future { opacity: .28; }
.xr-story.show-tokens .tk:nth-child(odd) { background: rgba(47,47,47,.08); }
.xr-story.show-tokens .tk:nth-child(even) { background: rgba(61,90,128,.12); }
.xr-story.attending .tk { color: var(--faint); }
.xr-story.attending .tk-att { color: var(--ink); background: var(--tint); }
.tk-cur, .xr-story .tk-cur, .xr-story.attending .tk-cur { color: #fff !important; background: var(--ink) !important; box-shadow: 0 0 0 3px var(--ink); }
.xr-story.show-tokens .tk-cur { animation: xr-breathe 1.6s var(--ease) infinite; }
@keyframes xr-breathe { 50% { box-shadow: 0 0 0 7px rgba(34,34,34,.18); } }
.tk-start { font-size: .62em; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; padding: 2px 8px; vertical-align: .25em; }
.tk-next { color: var(--coral) !important; opacity: 1; background: var(--coral-soft); }
.tk-enter { opacity: 0; }
.tk-enter.tk-in { opacity: 1; animation: xr-land .55s var(--ease); }
@keyframes xr-land { 0% { background: var(--coral); color: #fff; } 100% { background: transparent; } }
.tk-ghost { display: inline-block; width: 1.5em; height: 1.1em; margin-left: 6px; vertical-align: -.18em; border-radius: 0; border: 2px dashed #bdb6a4; position: relative; }
.tk-ghost.rolling { border-color: var(--coral); background: var(--coral-soft); animation: xr-wiggle .5s ease-in-out infinite; }
.tk-ghost .die { position: absolute; inset: 2px; width: calc(100% - 4px); height: calc(100% - 4px); fill: none; stroke: var(--coral); stroke-width: 1.6; }
.tk-ghost .die circle { fill: var(--coral); stroke: none; }
@keyframes xr-wiggle { 25% { transform: rotate(-8deg); } 75% { transform: rotate(8deg); } }
.tk-end { display: inline-block; margin-left: 12px; font-size: 12px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: #fff; background: var(--grad); border-radius: 0; padding: 4px 12px; vertical-align: .3em; animation: xr-rise .5s var(--ease); }
.xr-fly { position: fixed; z-index: 60; pointer-events: none; font: 700 18px var(--sans); color: #fff; background: var(--coral); padding: 4px 12px; border-radius: 0; box-shadow: var(--sh2); white-space: pre; }
.xr-skel { display: block; height: 22px; border-radius: 0; margin: 10px 0; background: linear-gradient(90deg, #ebe6d8 0%, #f4f0e6 50%, #ebe6d8 100%); background-size: 200% 100%; animation: xr-shimmer 1.2s linear infinite; }
.xr-skel.short { width: 55%; }
@keyframes xr-shimmer { to { background-position: -200% 0; } }
.xr-story-foot { display: flex; justify-content: space-between; align-items: center; min-height: 34px; padding: 8px 6px 0; font-size: 13px; color: var(--mute); }
.xr-live { font-weight: 700; color: var(--ink); border-radius: 0; padding: 6px 12px; background: var(--wash); transition: background .2s; }
.xr-live:hover { background: var(--line); }

/* ---------- the machine ---------- */
.xr-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 24px; align-items: start; }
.xr-machine, .xr-odds { background: var(--bg); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--sh1); }
.xr-machine { padding: 22px 26px 22px; min-width: 0; }

.xr-rail { position: relative; display: grid; grid-template-columns: repeat(var(--n, 8), 1fr); margin: 0 0 20px; }
.rail-line { position: absolute; top: 19px; left: calc(50% / var(--n)); right: calc(50% / var(--n)); height: 3px; background: var(--line); border-radius: 1px; }
.rail-line i { position: absolute; left: 0; top: 0; bottom: 0; width: 0; background: var(--grad); border-radius: 1px; transition: width .7s var(--ease); }
.rail-line i::after { content: ""; position: absolute; right: -5px; top: -4px; width: 11px; height: 11px; border-radius: 50%; background: var(--coral); box-shadow: 0 0 0 0 rgba(47,47,47,.5); animation: xr-ping 1.6s infinite; }
@keyframes xr-ping { 0% { box-shadow: 0 0 0 0 rgba(47,47,47,.45); } 80%, 100% { box-shadow: 0 0 0 12px rgba(47,47,47,0); } }
.st { position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 0 2px; z-index: 1; }
.st-dot { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; font: 700 13px var(--sans); background: var(--bg); border: 2px solid var(--line); color: var(--mute); transition: all .45s var(--ease); }
.st-dot .die { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.st-dot .die circle { fill: currentColor; stroke: none; }
.st-n { font-size: 12px; font-weight: 600; color: var(--mute); white-space: nowrap; transition: color .3s; }
.st-sub { display: flex; gap: 4px; height: 6px; }
.st-sub i { width: 6px; height: 6px; border-radius: 50%; background: var(--line); transition: background .3s; }
.st-sub i.on { background: var(--coral); }
.st:hover .st-dot { border-color: var(--ink); color: var(--ink); }
.st.done .st-dot { border-color: var(--coral); color: var(--coral); }
.st.on .st-dot { background: var(--ink); border-color: var(--ink); color: #fff; transform: scale(1.12); box-shadow: 0 6px 16px rgba(0,0,0,.2); }
.st.on .st-n { color: var(--ink); }

.xr-view { } /* no fixed height: each step takes what it needs, and renderView eases between heights */
.sv { animation: xr-rise .55s var(--ease); }
@keyframes xr-rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.sv-kicker { font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--coral); }
.sv-head h2 { font-size: clamp(22px, 2.6vw, 30px); line-height: 1.15; letter-spacing: -.025em; font-weight: 800; margin: 6px 0 18px; }
.sv-body { min-height: 230px; display: flex; flex-direction: column; justify-content: center; gap: 16px; }
.sv-foot { display: flex; gap: 24px; align-items: flex-end; justify-content: space-between; margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); }
.sv-foot p { margin: 0; color: var(--ink2); font-size: 15px; max-width: 640px; }
.sv-math { flex: none; font-size: 14px; font-weight: 700; padding: 10px 16px; border-radius: 0; border: 1px solid var(--ink); transition: background .2s, color .2s; white-space: nowrap; }
.sv-math span { display: inline-block; transition: transform .2s var(--ease); }
.sv-math:hover span { transform: translateX(3px); }

/* read */
.tok-flow { display: flex; flex-wrap: wrap; gap: 8px; }
.tc { display: inline-flex; flex-direction: column; align-items: center; padding: 8px 12px 6px; border-radius: var(--r-sm); background: var(--wash); border: 1px solid var(--line); opacity: 0; animation: xr-chip .5s var(--ease) forwards; }
.tc b { font-weight: 700; font-size: 16px; white-space: pre; }
.tc em { font: 500 11px var(--mono); color: var(--mute); font-style: normal; }
.tc-last { background: var(--ink); border-color: var(--ink); color: #fff; }
.tc-last em { color: #cfc9b8; }
.tc-more { opacity: 1; animation: none; justify-content: center; color: var(--mute); }
@keyframes xr-chip { from { opacity: 0; transform: translateY(10px) scale(.9); } to { opacity: 1; transform: none; } }
.read-big { display: flex; align-items: center; justify-content: center; gap: 22px; }
.rb-word { font-size: 40px; font-weight: 800; letter-spacing: -.02em; padding: 12px 26px; border-radius: 0; background: var(--ink); color: #fff; white-space: pre; animation: xr-chip .5s var(--ease); }
.rb-arrow { width: 56px; height: 28px; fill: none; stroke: var(--faint); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 80; stroke-dashoffset: 80; animation: xr-dash .6s .3s var(--ease) forwards; }
@keyframes xr-dash { to { stroke-dashoffset: 0; } }
.rb-id { display: flex; flex-direction: column; align-items: center; font: 600 40px var(--mono); color: var(--coral); opacity: 0; animation: xr-chip .5s .5s var(--ease) forwards; }
.rb-id small { font: 700 11px var(--sans); letter-spacing: .08em; text-transform: uppercase; color: var(--mute); }
.bpe2 { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.bpe2-row { display: flex; gap: 4px; opacity: 0; animation: xr-chip .45s var(--ease) forwards; }
.bpe2-row span { font: 500 13px var(--mono); padding: 3px 8px; border-radius: 0; background: var(--wash); border: 1px solid var(--line); white-space: pre; }
.bpe2-row:last-child span { background: var(--coral-soft); border-color: var(--ink); color: var(--coral2); }

/* embed */
.emb2 { display: grid; grid-template-columns: 150px 1fr; gap: 30px; align-items: center; }
.emb2-table { position: relative; }
canvas.emb2-canvas { display: block; width: 150px; height: 220px; border-radius: 0; image-rendering: auto; filter: saturate(.8); opacity: .9; }
.emb2-row { position: absolute; left: -6px; right: -6px; top: 0; height: 6px; margin-top: -3px; border-radius: 1px; border: 2px solid var(--ink); background: rgba(255,255,255,.3); box-shadow: 0 2px 10px rgba(0,0,0,.25); transition: top 1s var(--ease); }
.emb2-cap { display: block; margin-top: 8px; text-align: center; font-size: 11px; color: var(--mute); font-weight: 600; }
.emb2-rows { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.vrow { display: flex; flex-direction: column; gap: 5px; opacity: 0; animation: xr-rise .5s var(--ease) forwards; animation-delay: var(--d); }
.vrow-l { font-size: 13px; font-weight: 600; color: var(--ink2); }
.vcells { display: grid; grid-template-columns: repeat(64, 1fr); gap: 2px; }
.vcells i { aspect-ratio: 1; border-radius: 1px; opacity: 0; animation: xr-cell .35s var(--ease) forwards; }
@keyframes xr-cell { from { opacity: 0; transform: scale(.2); } to { opacity: 1; transform: none; } }

/* attention */
.heads2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.head2 { border: 1px solid var(--line); border-radius: 0; padding: 14px 16px; transition: box-shadow .25s, border-color .25s, transform .25s var(--ease); animation: xr-rise .5s var(--ease) backwards; }
.head2:nth-child(2) { animation-delay: .08s; } .head2:nth-child(3) { animation-delay: .16s; } .head2:nth-child(4) { animation-delay: .24s; }
.head2:hover { border-color: var(--c); box-shadow: var(--sh1); transform: translateY(-2px); }
.head2-t { display: flex; align-items: center; gap: 8px; font-weight: 800; font-size: 14px; margin-bottom: 8px; }
.head2-t i { width: 10px; height: 10px; border-radius: 50%; background: var(--c); }
.head2-r { display: grid; grid-template-columns: minmax(0, 92px) 1fr 44px; gap: 10px; align-items: center; font-size: 14px; padding: 3px 0; }
.head2-r span:first-child { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.head2-b { height: 8px; border-radius: 1px; background: var(--wash); overflow: hidden; }
.head2-b i { display: block; height: 100%; width: 0; border-radius: 1px; background: var(--c); animation: xr-grow .8s var(--ease) forwards; }
@keyframes xr-grow { to { width: var(--w); } }
.head2-r em { font: 500 12px var(--mono); font-style: normal; color: var(--mute); text-align: right; }

/* neurons */
.mlp2 { display: grid; grid-template-columns: minmax(0, 1fr) 230px; gap: 26px; align-items: center; }
.neur { display: grid; grid-template-columns: repeat(32, 1fr); gap: 3px; }
.neur i { aspect-ratio: 1; border-radius: 50%; background: #e6e1d3; transition: background .5s, transform .5s var(--ease), box-shadow .5s; }
.neur.lit i.on { background: rgba(47,47,47,var(--a)); transform: scale(calc(.75 + .45 * var(--a))); }
.neur.lit i.on[style*="--a: 0.9"], .neur.lit i.on[style*="--a: 1"] { box-shadow: 0 0 0 2px var(--hl); }
.mlp2-h { font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--mute); margin-bottom: 8px; }
.mlp2-r { display: flex; flex-direction: column; gap: 4px; padding: 10px 0; border-top: 1px solid var(--line); font-size: 13px; color: var(--ink2); opacity: 0; animation: xr-rise .45s var(--ease) forwards; }
.mlp2-r b { font: 600 13px var(--mono); color: var(--coral); }
.neur.lit i.top { background: var(--ink); transform: scale(1.5); box-shadow: 0 0 0 3px rgba(34,34,34,.18); transition-delay: 0s !important; }
.mlp2-r em { font-style: normal; font-weight: 700; color: var(--ink); background: var(--wash); border-radius: 0; padding: 1px 6px; margin-right: 2px; white-space: pre; }

/* scores */
.scores-wrap { animation: xr-wipe 1.2s var(--ease); }
@keyframes xr-wipe { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } }
canvas.scores { display: block; width: 100%; max-width: 640px; aspect-ratio: 640 / 190; margin: 0 auto; }
.soft2 { display: flex; align-items: center; justify-content: center; gap: 10px; flex-wrap: wrap; font-size: 14px; font-weight: 600; color: var(--ink2); opacity: 0; animation: xr-rise .5s .9s var(--ease) forwards; }
.soft2 svg { width: 34px; height: 18px; fill: none; stroke: var(--faint); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.soft2-op { display: inline-flex; flex-direction: column; align-items: center; background: var(--ink); color: #fff; border-radius: 0; padding: 6px 14px; font-family: var(--mono); }
.soft2-op small { font-size: 11px; color: #cfc9b8; }

/* dice */
.roll { display: flex; flex-direction: column; gap: 18px; }
.roll-top { display: flex; align-items: baseline; justify-content: center; gap: 14px; }
.roll-top span { font-size: 13px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--mute); }
.rn { font: 600 34px var(--mono); letter-spacing: -.02em; color: var(--ink); min-width: 4.6em; text-align: center; transition: color .3s; }
.rn.set { color: var(--coral); animation: xr-thump .4s var(--ease); }
@keyframes xr-thump { 40% { transform: scale(1.15); } }
.seg-wrap { position: relative; padding-top: 30px; }
.seg-strip { display: flex; height: 64px; border-radius: 0; overflow: hidden; background: var(--wash); }
.seg { position: relative; min-width: 0; display: flex; flex-direction: column; justify-content: center; align-items: center; background: #ebe6d8; border-right: 1px solid #fff; transition: background .4s, color .4s, flex-grow .4s; overflow: hidden; }
.seg.alt { background: #e2dccc; }
.seg:first-child { background: rgba(255,225,0,.55); } .seg:nth-child(2) { background: rgba(255,225,0,.28); }
.seg-l { font-weight: 700; font-size: 14px; white-space: pre; overflow: hidden; text-overflow: ellipsis; max-width: 100%; padding: 0 4px; }
.seg em { font: 500 11px var(--mono); font-style: normal; color: var(--mute); }
.seg.win { background: var(--coral) !important; color: #fff; animation: xr-win .6s var(--ease); }
.seg.win em { color: rgba(255,255,255,.85); }
@keyframes xr-win { 0% { filter: brightness(1.6); } 100% { filter: none; } }
.marker { position: absolute; top: 0; left: 0; width: 0; height: 100%; opacity: 0; transition: opacity .3s; pointer-events: none; }
.marker.in { opacity: 1; }
.marker.go { transition: left 1.4s cubic-bezier(.25,.9,.3,1.04), opacity .3s; }
.marker::before { content: ""; position: absolute; left: -9px; top: 4px; border: 9px solid transparent; border-top: 14px solid var(--ink); border-bottom: 0; }
.marker i { position: absolute; left: -1.5px; top: 22px; bottom: -6px; width: 3px; border-radius: 1px; background: var(--ink); box-shadow: 0 0 0 2px #fff; }
.roll-res { text-align: center; font-size: 17px; margin: 0; min-height: 1.6em; opacity: 0; transform: translateY(6px); transition: opacity .4s, transform .4s var(--ease); }
.roll-res.in { opacity: 1; transform: none; }
.roll-res b { color: var(--coral); }

/* the travelling vector */
.xr-vec-wrap { margin-top: 20px; padding: 14px 16px; border-radius: 0; background: var(--wash); }
.xr-vec-label { display: flex; justify-content: space-between; gap: 12px; font-size: 12px; font-weight: 700; color: var(--ink2); margin-bottom: 8px; }
.xr-vec-label em { font-style: normal; font-weight: 500; color: var(--mute); }
.xr-vec { display: grid; grid-template-columns: repeat(128, 1fr); gap: 1px; height: 22px; cursor: crosshair; }
.xr-vec i { border-radius: 1px; background: #e6e1d3; transition: background .6s ease; }

/* ---------- odds panel ---------- */
.xr-odds { position: sticky; top: 20px; padding: 22px 22px 20px; transition: box-shadow .4s; }
.xr-odds.final { box-shadow: 0 0 0 2px var(--coral), var(--sh1); }
.xr-odds-head h2 { margin: 0; font-size: 20px; font-weight: 800; letter-spacing: -.02em; }
.xr-odds-head p { margin: 2px 0 14px; font-size: 13px; color: var(--mute); min-height: 20px; }
.xr-odds-list { position: relative; transition: height .4s; }
.orow { position: absolute; left: 0; right: 0; top: 0; height: 40px; display: grid; grid-template-columns: minmax(0, 88px) 1fr 50px; gap: 10px; align-items: center; padding: 0 8px; border-radius: 0; text-align: left; transition: transform .75s var(--ease), opacity .5s, background .25s; }
.orow:hover { background: var(--wash); }
.orow.leaving { transition: opacity .25s, transform .4s; z-index: 0; }
.orow:not(.leaving) { z-index: 1; }
.ow { font-weight: 700; font-size: 15px; white-space: pre; overflow: hidden; text-overflow: ellipsis; }
.ob { height: 10px; border-radius: 1px; background: var(--wash); overflow: hidden; }
.orow:hover .ob { background: #e2dccc; }
.ob i { display: block; height: 100%; width: 0; border-radius: 1px; background: #a9a395; transition: width .8s var(--ease), background .4s; }
.orow.top .ob i { background: var(--ink); }
.xr-odds.final .orow.top .ob i { background: var(--grad); }
.orow.win { background: var(--coral-soft); }
.orow.win .ow { color: var(--coral2); }
.orow.win .ob i { background: var(--grad) !important; }
.op { font: 500 13px var(--mono); text-align: right; color: var(--ink2); }
.xr-odds-list::before { content: ""; position: absolute; inset: 0; border-radius: 0; background: repeating-linear-gradient(180deg, var(--wash) 0 40px, transparent 40px 46px); opacity: 0; transition: opacity .5s; }
.xr-odds.empty .xr-odds-list::before { opacity: 1; }
.xr-odds-hint { font-size: 12px; color: var(--mute); margin: 10px 0 16px; }
.xr-temp { display: grid; grid-template-columns: 1fr auto; gap: 6px 12px; align-items: center; padding-top: 16px; border-top: 1px solid var(--line); font-size: 14px; font-weight: 700; }
.xr-temp em { font-style: normal; font-weight: 500; color: var(--mute); font-size: 12px; margin-left: 4px; }
.xr-temp b { font: 600 14px var(--mono); }
.xr-temp input { grid-column: 1 / -1; grid-row: 2; width: 100%; accent-color: var(--coral); height: 22px; }

/* ---------- explainer ---------- */
.xr-explain { padding: 72px 0 10px; }
.xr-explain h2 { font: 700 32px/1.1 "Playfair Display", serif; letter-spacing: -.015em; color: var(--paper-ink); margin: 0 0 22px; padding-top: 14px; border-top: 1px solid var(--paper-ink); }
.xr-cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.xr-cards > div { border-radius: var(--r); background: var(--bg); border: 1px solid var(--line); padding: 22px; }
.xr-cards b { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--coral-soft); color: var(--coral2); font-weight: 800; font-size: 14px; }
.xr-cards h3 { font: 700 19px/1.2 "Playfair Display", serif; color: var(--paper-ink); margin: 16px 0 6px; }
.xr-cards p { margin: 0; font-size: 14px; color: var(--ink2); }
.xr-made { max-width: 680px; margin-top: 64px; font: 17px/1.65 Georgia, serif; color: var(--paper-ink); font-feature-settings: "onum"; }
.xr-made p { margin: 0 0 16px; }
.xr-made a { text-decoration: underline; text-decoration-color: #bbb; text-underline-offset: 3px; }
.xr-made a:hover { color: var(--paper-ink); text-decoration-color: var(--coral); }
.xr-foot { margin: 40px 0 0; font: 500 12px var(--mono); color: var(--mute); min-height: 1em; }

/* ---------- player ---------- */
.xr-player { position: fixed; z-index: 40; left: 50%; bottom: max(18px, env(safe-area-inset-bottom)); transform: translateX(-50%); width: min(640px, calc(100% - 28px)); display: flex; align-items: center; gap: 10px; padding: 6px 14px 6px 6px; background: rgba(249,247,241,.96); -webkit-backdrop-filter: blur(16px) saturate(1.4); backdrop-filter: blur(16px) saturate(1.4); border: 1px solid var(--line); border-radius: 0; box-shadow: 0 10px 34px rgba(0,0,0,.16); transition: transform .4s var(--ease), opacity .3s; }
body.loading .xr-player { opacity: .5; pointer-events: none; }
body.sheet-open .xr-player { transform: translateX(-50%) translateY(140%); }
.xr-pb { flex: none; height: 44px; min-width: 44px; border-radius: 0; display: inline-flex; align-items: center; justify-content: center; gap: 6px; transition: background .2s, transform .15s; }
.xr-pb:hover { background: var(--wash); }
.xr-pb:active { transform: scale(.94); }
.xr-pb svg { width: 20px; height: 20px; fill: none; stroke: var(--ink); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.xr-play { flex: none; width: 44px; height: 44px; border-radius: 50%; background: var(--grad); display: grid; place-items: center; box-shadow: none; transition: transform .2s var(--ease); }
.xr-play:hover { transform: scale(1.06); }
.xr-play:active { transform: scale(.95); }
.xr-play svg { width: 22px; height: 22px; fill: #fff; grid-area: 1 / 1; transition: opacity .2s, transform .3s var(--ease); }
.xr-play .i-play { margin-left: 0; } /* the triangle's path is already drawn 1.5px right of centre, which is the optical nudge it needs */
.xr-play .i-pause, body.playing .xr-play .i-play { opacity: 0; transform: scale(.5); }
body.playing .xr-play .i-pause { opacity: 1; transform: none; }
.xr-track-wrap { flex: 1; min-width: 0; padding: 0 10px; }
.xr-now { display: flex; gap: 8px; align-items: baseline; font-size: 14px; white-space: nowrap; overflow: hidden; }
.xr-now b { font-weight: 800; }
.xr-now span { color: var(--mute); font-size: 13px; overflow: hidden; text-overflow: ellipsis; }
.xr-track { display: flex; gap: 3px; margin-top: 7px; }
.tseg { flex: 1; height: 14px; display: flex; align-items: center; }
.tseg b { display: block; width: 100%; height: 5px; border-radius: 1px; background: var(--line); position: relative; overflow: hidden; transition: height .2s; }
.tseg-pair { margin-left: -2px; }
.tseg:hover b { height: 8px; }
.tseg.done b { background: var(--ink); }
.tseg b::after { content: none; }
.tseg b[style*="xr-fill"] { background: linear-gradient(90deg, var(--coral) 0 var(--p, 0%), var(--line) var(--p, 0%)); }
@property --p { syntax: "<percentage>"; inherits: false; initial-value: 0%; }
@keyframes xr-fill { from { --p: 0%; } to { --p: 100%; } }
.xr-speed { flex: none; display: flex; align-items: center; gap: 8px; height: 32px; cursor: pointer; }
.xr-speed input { width: 72px; accent-color: var(--coral); }
.xr-speed b { font: 600 13px var(--mono); min-width: 38px; text-align: right; }
.xr-word span { font-size: 13px; font-weight: 700; padding-left: 10px; }
.xr-word { padding-right: 10px; }
.xr-keys-pop { position: absolute; right: 6px; bottom: calc(100% + 12px); background: var(--bg); border-radius: 0; box-shadow: var(--sh2); padding: 14px 16px; display: grid; gap: 8px; font-size: 13px; min-width: 240px; animation: xr-rise .25s var(--ease); }
.xr-keys-pop[hidden] { display: none; }
.xr-keys-pop div { display: flex; align-items: center; gap: 6px; }
kbd { font: 600 11px var(--mono); min-width: 24px; text-align: center; padding: 3px 6px; border-radius: 0; border: 1px solid var(--line); border-bottom-width: 2px; background: var(--wash); }
.xr-keys-pop kbd:last-of-type { margin-right: 6px; }

/* ---------- deep dive sheet ---------- */
.xr-drawer { position: fixed; inset: 0; z-index: 80; pointer-events: none; }
.xr-drawer-scrim { position: absolute; inset: 0; background: rgba(0,0,0,.28); opacity: 0; transition: opacity .35s; }
.xr-sheet { position: absolute; top: 12px; right: 12px; bottom: 12px; width: min(760px, calc(100% - 24px)); background: var(--bg); border-radius: 0; box-shadow: 0 20px 60px rgba(0,0,0,.25); display: flex; flex-direction: column; transform: translateX(calc(100% + 30px)); transition: transform .5s var(--ease); }
.xr-drawer.open { pointer-events: auto; }
.xr-drawer.open .xr-drawer-scrim { opacity: 1; }
.xr-drawer.open .xr-sheet { transform: none; }
.xr-sheet-head { display: flex; gap: 10px; align-items: center; padding: 14px 14px 12px 20px; border-bottom: 1px solid var(--line); }
.xr-sheet-nav { flex: 1; display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; }
.xr-sheet-nav button { flex: none; font-size: 13px; font-weight: 600; padding: 8px 14px; border-radius: 0; border: 1px solid var(--line); transition: all .2s; }
.xr-sheet-nav button:hover { border-color: var(--ink); }
.xr-sheet-nav button.on { background: var(--ink); color: #fff; border-color: var(--ink); }
.xr-close { flex: none; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; transition: background .2s; }
.xr-close:hover { background: var(--wash); }
.xr-close svg { width: 18px; height: 18px; stroke: var(--ink); stroke-width: 2.2; stroke-linecap: round; }
.xr-detail { flex: 1; overflow-y: auto; padding: 8px 26px 40px; overscroll-behavior: contain; }

.xr-detail h3 { font-size: 26px; font-weight: 800; letter-spacing: -.025em; line-height: 1.15; margin: 8px 0 10px; }
.dt-reading { font-size: 12px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--coral); margin: 14px 0 4px; }
.dt-lede { font-size: 15.5px; color: var(--ink2); margin: 0 0 16px; }
.dt-note { font-size: 13.5px; color: var(--mute); margin: 8px 0; }
.dt-sec { padding: 16px 0 18px; border-top: 1px solid var(--line); }
.dt-sec h4 { font-size: 15px; font-weight: 800; margin: 0 0 12px; }
.dt-sec h4 span { font-weight: 500; color: var(--mute); font-size: 13px; margin-left: 6px; }
.dt-tabs { display: flex; flex-wrap: wrap; gap: 4px; margin: 4px 0 14px; padding: 4px; border-radius: 0; background: var(--wash); width: fit-content; }
.dt-tab { padding: 7px 14px; border-radius: 0; font-size: 13px; font-weight: 600; color: var(--ink2); transition: background .2s, box-shadow .2s; }
.dt-tab.on { background: var(--bg); color: var(--ink); box-shadow: 0 1px 4px rgba(0,0,0,.12); }
.dt-tabs.small .dt-tab { padding: 5px 12px; font-size: 12px; }
canvas.hm { display: block; width: 100%; image-rendering: pixelated; border-radius: 1px; }
.eq-row { display: grid; grid-template-columns: 150px 1fr 86px; gap: 12px; align-items: center; margin: 8px 0; }
.eq-label { font-size: 13px; text-align: right; color: var(--ink2); }
.eq-dims { font: 11px var(--mono); color: var(--mute); }
.formula { font: 16px var(--mono); padding: 12px 16px; background: var(--wash); border-radius: 0; margin: 4px 0 10px; }
.prob-list { display: flex; flex-direction: column; gap: 2px; }
.prob { display: grid; grid-template-columns: 120px 1fr 54px 74px; gap: 10px; align-items: center; padding: 6px 8px; border-radius: 0; text-align: left; font-size: 14px; transition: background .2s; }
.prob:hover { background: var(--wash); }
.prob.chosen { background: var(--coral-soft); }
.prob.chosen .prob-tok::after { content: " \2713"; color: var(--coral); }
.prob-tok { font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.prob-bar { height: 10px; border-radius: 1px; background: var(--wash); position: relative; overflow: hidden; }
.prob-bar i { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 1px; background: var(--ink); }
.prob.chosen .prob-bar i { background: var(--grad); }
.prob-p { text-align: right; font: 500 13px var(--mono); }
.prob-z { font: 11px var(--mono); color: var(--mute); }
.prob-note { font-size: 13px; color: var(--mute); padding: 4px 8px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { display: inline-block; border-radius: 0; background: var(--wash); padding: 3px 10px; font-size: 13px; font-weight: 600; white-space: nowrap; }
.chip em { font: 500 11px var(--mono); font-style: normal; color: var(--mute); }
.chip-top { background: var(--ink); color: #fff; }
.chip-top em { color: #cfc9b8; }
.chip-dim { color: var(--mute); font-weight: 500; }
.head-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.head-card { border: 1px solid var(--line); border-radius: 0; padding: 14px; min-width: 0; }
.head-title { font-weight: 800; font-size: 14px; margin-bottom: 6px; }
.head-title span { display: block; font-weight: 500; color: var(--mute); font-size: 12px; }
.attn-text { font-size: 13px; line-height: 1.75; white-space: pre-wrap; margin-bottom: 10px; max-height: 150px; overflow: auto; }
.at { border-radius: 1px; }
.at-self { outline: 1.5px dashed var(--ink); }
.at-max { font-weight: 800; }
.attn-matrix { max-width: 220px; cursor: crosshair; margin-bottom: 8px; border-radius: 0; }
.link-btn { font-size: 13px; font-weight: 700; color: var(--coral2); }
.link-btn:hover { text-decoration: underline; }
.score-list { max-height: 300px; overflow: auto; border-radius: 0; border: 1px solid var(--line); }
.score-row { display: grid; grid-template-columns: 110px 90px 1fr; gap: 10px; align-items: center; padding: 4px 10px; font-size: 13px; border-bottom: 1px solid var(--wash); }
.score-headrow { position: sticky; top: 0; background: var(--bg); font-size: 11px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--mute); }
.sr-tok { font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sr-z { font: 12px var(--mono); }
.sr-bar { position: relative; height: 14px; border-radius: 1px; background: var(--wash); overflow: hidden; }
.sr-bar i { position: absolute; left: 0; top: 0; bottom: 0; background: var(--coral); }
.sr-bar em { position: absolute; right: 6px; top: -1px; font: 500 11px var(--mono); font-style: normal; }
.mlp-bend { display: flex; gap: 16px; align-items: center; }
.mlp-bend .dt-note { flex: 1; }
canvas.gelu { width: 300px; height: 140px; border-radius: 0; background: var(--wash); flex: none; }
canvas.neuron-grid { max-width: 320px; }
.neuron-list { display: flex; flex-direction: column; gap: 6px; }
.neuron-row { display: grid; grid-template-columns: 54px 50px 1fr; gap: 8px; align-items: center; font-size: 13px; }
.nr-id { font: 12px var(--mono); }
.nr-a { font-weight: 800; color: var(--coral); }
.lens-table { display: flex; flex-direction: column; gap: 4px; }
.lens-row { display: grid; grid-template-columns: 130px 1fr; gap: 10px; align-items: center; padding: 6px 8px; border-radius: 0; font-size: 13px; }
.lens-row.on { background: var(--coral-soft); }
.lr-n { font-weight: 700; }
canvas.emb-map { width: 100%; max-width: 620px; aspect-ratio: 620 / 440; border-radius: 0; background: var(--wash); cursor: crosshair; display: block; }
.tok-grid { display: flex; flex-wrap: wrap; gap: 5px; }
.tok-cell { display: inline-flex; flex-direction: column; align-items: center; border-radius: 0; background: var(--wash); padding: 4px 8px; font-size: 14px; transition: background .2s; }
.tok-cell:hover { background: var(--line); }
.tok-cell sub { font: 10px var(--mono); color: var(--mute); }
.tok-cell.on { background: var(--ink); color: #fff; }
.tok-cell.on sub { color: #cfc9b8; }
.bpe { display: flex; flex-direction: column; gap: 5px; }
.bpe-row { display: flex; gap: 4px; align-items: center; flex-wrap: wrap; }
.bpe-n { width: 70px; font-size: 12px; color: var(--mute); }
.bpe-piece { border-radius: 0; background: var(--wash); padding: 2px 7px; font: 13px var(--mono); }

.xr-tip { position: fixed; z-index: 1000; display: none; pointer-events: none; background: var(--ink); color: #fff; font: 500 12px/1.45 var(--sans); padding: 7px 10px; border-radius: 0; max-width: 260px; box-shadow: var(--sh2); }

/* ---------- broadsheet skin: make the machine read like the rest of aronfrishberg.com ---------- */
/* type: Georgia for reading, Playfair for headlines and big numerals, Libre Franklin small caps for labels */
body.xr { font: 16px/1.55 var(--serif); color: var(--ink); }
.sv-kicker, .st-n, .mlp2-h, .roll-top span, .xr-vec-label, .xr-temp > span, .xr-now b, .score-headrow, .tk-start, .tk-end, .sv-math, .xr-sheet-nav button, .dt-tab, .xr-examples span {
    font-family: var(--sans); font-size: 10.5px; font-weight: 700; letter-spacing: .2em; text-transform: uppercase; color: var(--ink);
}
.sv-head h2, .xr-odds-head h2, .xr-detail h3, .dt-sec h4 { font-family: var(--display); font-weight: 700; letter-spacing: -.01em; color: var(--ink); }
.sv-head h2 { font-size: clamp(24px, 2.6vw, 32px); }
.xr-odds-head h2 { font-size: 24px; }
.sv-foot p, .dt-lede, .dt-note, .xr-odds-head p, .xr-odds-hint, .roll-res, .xr-cards p { font-family: var(--serif); }
.sv-foot p { font-size: 16px; line-height: 1.6; color: var(--ink); }
.xr-odds-head p, .xr-odds-hint { font-style: italic; }

/* prompt: a plain ruled box, not a search pill */
.xr-prompt { border: 1px solid var(--ink); border-radius: 0; box-shadow: none; background: #fffdf8; padding: 5px 5px 5px 18px; }
.xr-prompt:focus-within { border-color: var(--ink); box-shadow: 0 0 0 3px var(--hl-soft); }
#xr-prompt { font: italic 19px/1.45 var(--serif); color: var(--ink); }
.xr-go { width: 46px; height: 46px; border-radius: 0; background: var(--ink); }
.xr-go:hover { transform: none; background: #000; }
.xr-examples { gap: 6px 18px; margin: 14px 0 22px; }
.xr-examples button { border: 0; border-radius: 0; padding: 1px 3px; font: italic 15px var(--serif); color: var(--ink);
    background-image: linear-gradient(to right, rgba(255,225,0,.1), rgba(255,225,0,.7) 5%, rgba(255,225,0,.3)); background-repeat: no-repeat; background-position: 0 60%; background-size: 0 70%;
    transition: background-size var(--hover-dur, .5s) var(--hover-ease, ease); }
.xr-examples button:hover { transform: none; background-size: 100% 70%; }

/* the story: set like a column of type between two rules */
.xr-story-wrap { background: transparent; border: 0; border-top: 1px solid var(--ink); border-bottom: 1px solid var(--ink); border-radius: 0; }
.xr-story { font: 400 clamp(20px, 2.3vw, 27px)/1.75 var(--serif); letter-spacing: 0; padding: 26px 2px 20px; }
.tk { border-radius: 0; }
.tk-p { color: #77736a; }
.tk:hover { background: var(--hl-soft); }
.tk-cur, .xr-story .tk-cur, .xr-story.attending .tk-cur { color: var(--ink) !important; background: var(--hl) !important; box-shadow: 0 0 0 2px var(--hl); }
.xr-story.show-tokens .tk-cur { animation: none; }
.xr-story.show-tokens .tk:nth-child(odd) { background: rgba(255,225,0,.22); }
.xr-story.show-tokens .tk:nth-child(even) { background: rgba(61,90,128,.10); }
.tk-next { color: #fff !important; background: var(--ink); }
@keyframes xr-land { 0% { background: var(--hl); } 100% { background: transparent; } }
.tk-ghost { border-radius: 0; border: 1px dashed var(--faint); }
.tk-ghost.rolling { border: 1px solid var(--ink); background: var(--hl-soft); }
.tk-ghost .die { stroke: var(--ink); } .tk-ghost .die circle { fill: var(--ink); }
.tk-end { background: var(--ink); color: #fff; border-radius: 0; padding: 4px 10px; }
.xr-fly { font: 400 22px var(--serif); color: var(--ink); background: var(--hl); border-radius: 0; box-shadow: none; padding: 2px 8px; }
.xr-story-foot { font: italic 13px var(--serif); color: var(--mute); }
.xr-live { font: 700 10.5px var(--sans); letter-spacing: .16em; text-transform: uppercase; background: none; border-bottom: 1px solid var(--ink); border-radius: 0; padding: 4px 2px; }
.xr-live:hover { background: var(--hl-soft); }

/* the machine and the odds: newspaper columns under a double rule, no cards */
.xr-grid { gap: 40px; }
.xr-machine, .xr-odds { background: transparent; border: 0; border-top: 3px double var(--ink); border-radius: 0; box-shadow: none; }
.xr-machine { padding: 22px 0 10px; }
.xr-odds { padding: 18px 0 0; top: 16px; }
.xr-odds.final { box-shadow: none; }
.xr-odds.final .xr-odds-head h2 { background: none; }

/* stage rail */
.rail-line { background: var(--line); height: 1px; top: 19px; }
.rail-line i { background: var(--ink); }
.rail-line i::after { background: var(--ink); top: -5px; }
.st-dot { background: var(--bg); border: 1px solid var(--faint); color: var(--mute); font: 700 15px var(--display); }
.st.done .st-dot { border-color: var(--ink); color: var(--ink); }
.st.on .st-dot { background: var(--ink); border-color: var(--ink); color: #fff; box-shadow: 0 0 0 4px var(--hl); transform: none; }
.st:hover .st-dot { border-color: var(--ink); color: var(--ink); }
.st-n { font-size: 9.5px; letter-spacing: .14em; color: var(--mute); }
.st.on .st-n { color: var(--ink); }
.st-sub i.on { background: var(--ink); }

.sv-foot { border-top: 1px solid var(--ink); }
.sv-math { border: 1px solid var(--ink); border-radius: 0; padding: 9px 14px; }

/* read + embed */
.tc { background: transparent; border: 1px solid var(--line); border-radius: 0; }
.tc b { font: 400 17px var(--serif); }
.tc-last { background: var(--ink); border-color: var(--ink); }
.rb-word { font: 400 40px var(--serif); border-radius: 0; }
.rb-id { font: 700 44px var(--display); color: var(--ink); }
.bpe2-row span { border-radius: 0; background: transparent; font-family: var(--serif); }
.bpe2-row:last-child span { background: var(--hl); border-color: var(--ink); color: var(--ink); }
.vrow-l { font: italic 14px var(--serif); color: var(--ink); }

/* attention */
.head2 { border: 0; border-top: 1px solid var(--ink); border-radius: 0; padding: 12px 2px 10px; }
.head2:hover { box-shadow: none; transform: none; border-color: var(--c); }
.head2-t { font: 700 10.5px var(--sans); letter-spacing: .18em; text-transform: uppercase; }
.head2-t i { border-radius: 0; }
.head2-r span:first-child { font-family: var(--serif); font-weight: 400; }
.head2-b, .head2-b i { border-radius: 0; height: 6px; }

/* neurons */
.neur i { background: #e3ddce; }
.neur.lit i.top { background: var(--ink); box-shadow: 0 0 0 3px var(--hl); }
.mlp2-r { border-top: 1px solid var(--ink); font-family: var(--serif); font-size: 14px; color: var(--ink); }
.mlp2-r b { font: 700 18px var(--display); color: var(--ink); }
.mlp2-r em { background: var(--hl-soft); border-radius: 0; font-weight: 400; font-style: italic; }

/* scores + softmax */
.soft2 { font-family: var(--serif); font-style: italic; font-weight: 400; }
.soft2-op { font: normal 700 11px var(--sans); letter-spacing: .16em; text-transform: uppercase; border-radius: 0; }

/* the dice */
.rn { font: 700 44px var(--display); letter-spacing: 0; font-variant-numeric: lining-nums tabular-nums; }
/* the random number: plain bold figure, no highlight; it simply fades in once */
.rn.set { color: var(--ink); background: none; animation: none; }
.rn.wait { opacity: 0; transition: opacity .4s ease; }
.rn.wait.set { opacity: 1; }
.seg-strip { border-radius: 0; border: 1px solid var(--ink); background: var(--bg); }
.seg { border-right: 1px solid var(--bg); }
.seg-l { font: 400 15px var(--serif); }
.seg.win { background: var(--hl) !important; color: var(--ink); }
.seg.win em { color: var(--ink); }
.marker i { box-shadow: 0 0 0 2px var(--bg); }
.roll-res { font-size: 19px; font-style: italic; }
.roll-res b { color: var(--ink); font-style: normal; background: var(--hl); padding: 0 3px; }

/* the travelling vector */
.xr-vec-wrap { background: transparent; border-top: 1px solid var(--line); border-radius: 0; padding: 14px 0 0; }
.xr-vec-label em { font: italic 13px var(--serif); letter-spacing: 0; text-transform: none; color: var(--mute); }
.xr-vec i { border-radius: 0; }

/* odds list */
.orow { border-radius: 0; border-bottom: 1px solid var(--line); }
.orow:hover { background: var(--hl-soft); }
.ow { font: 400 17px var(--serif); }
.ob, .ob i { border-radius: 0; height: 7px; }
.ob { background: #e6e1d3; }
.ob i { background: #b3ad9e; }
.orow.top .ob i, .xr-odds.final .orow.top .ob i { background: var(--ink); }
.orow.win { background: var(--hl-soft); }
.orow.win .ow { color: var(--ink); }
.orow.win .ob i { background: var(--ink) !important; }
.op { font: 400 14px var(--serif); font-variant-numeric: lining-nums tabular-nums; color: var(--ink); }
.xr-odds-list::before { border-radius: 0; }
.xr-temp { border-top: 1px solid var(--ink); }
.xr-temp > span em { font: italic 13px var(--serif); letter-spacing: 0; text-transform: none; }
.xr-temp b, .xr-speed b { font: 700 16px var(--display); font-variant-numeric: lining-nums; }

/* player: a ruled strip, square controls */
.xr-player { border: 1px solid var(--ink); border-radius: 0; box-shadow: 0 6px 24px rgba(47,47,47,.12); padding: 6px 12px 6px 6px; gap: 6px; }
.xr-play { width: 42px; height: 42px; border-radius: 0; background: var(--ink); }
.xr-play:hover { transform: none; background: #000; }
.xr-pb { border-radius: 0; height: 42px; min-width: 38px; }
.xr-pb:hover { background: var(--hl-soft); }
.xr-pb svg { stroke-width: 1.8; }
.xr-now span { font: italic 13px var(--serif); color: var(--mute); }
.tseg b { border-radius: 0; height: 4px; }
.tseg:hover b { height: 6px; }

/* the math sheet */
.xr-sheet { background: var(--bg); border-radius: 0; border-left: 3px double var(--ink); box-shadow: -10px 0 40px rgba(47,47,47,.15); top: 0; right: 0; bottom: 0; }
.xr-sheet-head { border-bottom: 1px solid var(--ink); }
.xr-sheet-nav button { border-radius: 0; border: 1px solid var(--line); padding: 8px 12px; }
.xr-sheet-nav button.on { background: var(--ink); color: #fff; border-color: var(--ink); }
.xr-close { border-radius: 0; }
.xr-close:hover { background: var(--hl-soft); }
.dt-sec { border-top: 1px solid var(--ink); }
.dt-tabs { border-radius: 0; background: transparent; border-bottom: 1px solid var(--ink); padding: 0; gap: 0; }
.dt-tab { border-radius: 0; padding: 8px 12px; }
.dt-tab.on { background: var(--ink); color: #fff; box-shadow: none; }
.formula { font: italic 17px var(--serif); background: transparent; border-left: 3px solid var(--hl); border-radius: 0; }
.prob.chosen .prob-bar i { background: var(--ink); }
.prob-tok, .sr-tok, .lr-n, .head-title { font-family: var(--serif); }
.chip { border-radius: 0; background: transparent; border: 1px solid var(--line); font: 400 14px var(--serif); }
.chip-top { background: var(--ink); border-color: var(--ink); color: #fff; }
.head-card, .score-list { border-radius: 0; border-color: var(--line); }
.link-btn { color: var(--ink); text-decoration: underline; text-decoration-color: var(--hl); text-decoration-thickness: 3px; text-underline-offset: 2px; }
.xr-tip { border-radius: 0; font: 400 13px/1.45 var(--serif); }
kbd { border-radius: 0; background: transparent; }

/* explainer: four short columns under rules */
.xr-cards { gap: 28px; }
.xr-cards > div { background: transparent; border: 0; border-top: 1px solid var(--ink); border-radius: 0; padding: 14px 0 0; }
.xr-cards b { display: block; width: auto; height: auto; background: none; border-radius: 0; box-shadow: none; color: var(--ink); font: 700 34px/1 var(--display); }
.xr-cards h3 { margin-top: 10px; }
.xr-cards p { font-size: 15px; line-height: 1.55; color: var(--ink); }
.xr-foot { font: italic 13px var(--serif); }

/* finishing touches */
.dt-reading { font: italic 14px/1.5 var(--serif); color: var(--mute); letter-spacing: 0; text-transform: none; }
.emb2-cap { font: italic 12px var(--serif); color: var(--mute); }
/* dice strip: every slice is plain paper; only the winner gets the highlighter */
.seg:first-child { background: #ddd6c4; } .seg:nth-child(2) { background: #e6e0d0; }
/* neurons: even a quiet one should read as lit against the unlit paper dots */
.neur.lit i.on { background: rgba(47,47,47, calc(.18 + .82 * var(--a))); }

/* the player waits below the screen until the machine scrolls into view (see watchPlayer) */
.xr-player { opacity: 0; pointer-events: none; transform: translateX(-50%) translateY(calc(100% + 30px)); transition: transform .45s var(--ease), opacity .3s ease; }
body.player-on .xr-player { opacity: 1; pointer-events: auto; transform: translateX(-50%); }
body.player-on.sheet-open .xr-player, body.sheet-open .xr-player { opacity: 0; pointer-events: none; transform: translateX(-50%) translateY(calc(100% + 30px)); }
body.loading.player-on .xr-player { opacity: .5; pointer-events: none; }
.xr-go svg { margin-left: 0; fill: none; stroke: #fff; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* plain-English "Read more" under each step: opens in place, stays open as you step */
.sv-btns { flex: none; display: flex; flex-direction: column; align-items: stretch; gap: 8px; }
.sv-more-btn { font: 700 10.5px var(--sans); letter-spacing: .2em; text-transform: uppercase; color: var(--ink); padding: 9px 14px; border: 1px solid var(--line); text-align: center; white-space: nowrap; transition: border-color .2s, background .2s; }
.sv-more { display: none; max-width: 680px; padding: 16px 0 4px; font: 16px/1.65 var(--serif); color: var(--ink); }
.sv.more-open .sv-more { display: block; } /* opening and closing are animated in JS (foldMore), both directions */
.sv-more p { margin: 0 0 12px; }

/* sideways strips: a soft fade on whichever edge has more to scroll to */
.xr-sheet-nav.more-r, .xr-rail.more-r { -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 48px), transparent); mask-image: linear-gradient(90deg, #000 calc(100% - 48px), transparent); }
.xr-sheet-nav.more-l, .xr-rail.more-l { -webkit-mask-image: linear-gradient(90deg, transparent, #000 48px); mask-image: linear-gradient(90deg, transparent, #000 48px); }
.xr-sheet-nav.more-l.more-r, .xr-rail.more-l.more-r { -webkit-mask-image: linear-gradient(90deg, transparent, #000 48px, #000 calc(100% - 48px), transparent); mask-image: linear-gradient(90deg, transparent, #000 48px, #000 calc(100% - 48px), transparent); }

/* ---------- NYT graphics-desk conventions ----------
   explanation first, then the graphic; chart titles, labels and numbers in Franklin; notes as quiet text links */
.sv-chatter { margin: 10px 0 0; max-width: 680px; font: 17px/1.6 var(--serif); color: var(--ink); }
.sv-head h2 { margin-bottom: 14px; }
.sv-body { min-height: 0; justify-content: flex-start; }
/* notes section under the graphic: the summary on top, the links under it */
.sv-foot { flex-direction: column; justify-content: flex-start; align-items: flex-start; gap: 0; margin-top: 20px; padding-top: 14px; border-top: 1px solid var(--line); }
.sv-btns { flex-direction: row; align-items: center; gap: 22px; }
.sv-more-btn, .sv-math { border: 0; padding: 4px 0; background: none; font: 700 12px var(--sans); letter-spacing: .02em; text-transform: none; color: var(--ink);
    background-image: linear-gradient(var(--hl), var(--hl)); background-repeat: no-repeat; background-position: 0 88%; background-size: 0 35%;
    transition: background-size .35s var(--ease); }
/* hover: the highlighter swipes in under the words (image restated so no older shorthand can blank it mid-hover) */
.sv-more-btn:hover, .sv-math:hover { background-color: transparent; background-image: linear-gradient(var(--hl), var(--hl)); background-size: 100% 35%; color: var(--ink); border-color: transparent; }
.sv-more { padding-top: 10px; }

/* chart typography */
.head2-r span:first-child, .ow, .seg-l, .vrow-l, .mlp2-r, .roll-res { font-family: var(--sans); }
.ow { font-size: 15px; font-weight: 500; }
.op, .head2-r em, .seg em { font: 500 13px var(--sans); font-variant-numeric: tabular-nums; }
.vrow-l { font-style: normal; font-size: 13px; color: var(--mute); }
.xr-odds-head h2 { font: 700 17px var(--sans); letter-spacing: 0; }
.xr-odds.final .xr-odds-head h2 { display: inline; }
.xr-odds-head p, .xr-odds-hint { font: 13px/1.4 var(--sans); font-style: normal; color: var(--mute); }
.rn { font: 700 42px var(--sans); }
.roll-res { font-size: 17px; font-style: normal; }
.roll-res b { font-weight: 700; }
.xr-temp b, .xr-speed b { font: 700 14px var(--sans); font-variant-numeric: tabular-nums; }

/* neuron step: two small charts */
.mlp3 { display: grid; grid-template-columns: 1fr 1fr; gap: 36px; align-items: start; }
.nf { margin: 0; min-width: 0; }
.nf-h { display: flex; flex-direction: column; gap: 3px; margin-bottom: 14px; font-family: var(--sans); }
.nf-h b { font-size: 15px; font-weight: 700; color: var(--ink); }
.nf-h span { font-size: 13px; line-height: 1.4; color: var(--mute); }
.nstrip { display: flex; height: 34px; gap: 0; cursor: crosshair; border-bottom: 1px solid var(--ink); }
.nstrip i { flex: 1; min-width: 0; align-self: flex-end; height: 22%; background: #ddd6c4; animation: xr-tick .5s var(--ease) both; }
.nstrip i.on { height: calc(30% + 70% * var(--a)); background: rgba(47,47,47, calc(.25 + .75 * var(--a))); }
.nstrip i.top { background: var(--ink); box-shadow: 0 0 0 2px var(--hl); position: relative; z-index: 1; }
@keyframes xr-tick { from { transform: scaleY(0); transform-origin: bottom; } to { transform: none; } }
.nrows { margin-top: 14px; display: flex; flex-direction: column; }
.nrow { display: grid; grid-template-columns: 86px 70px 1fr; gap: 10px; align-items: center; padding: 7px 0; border-bottom: 1px solid var(--line); font: 13px var(--sans); color: var(--ink); opacity: 0; animation: xr-rise .45s var(--ease) forwards; }
.nr-name { font-weight: 700; white-space: nowrap; }
/* chart numbers: a small inked square, like a graphics desk's step markers */
.nf-h b i { display: inline-grid; place-items: center; width: 18px; height: 18px; margin-right: 8px; background: var(--ink); color: #fff; font: normal 700 11px var(--sans); vertical-align: 1px; }
.nrow-h { opacity: 1; animation: none; padding: 0 0 5px; border-bottom: 1px solid var(--ink); font-size: 10.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--mute); }
/* replay banner: a quiet ruled note above the explanation */
.sv-replay { margin: -6px 0 14px; padding: 7px 0 7px 12px; border-left: 3px solid var(--hl); font: 13px/1.45 var(--sans); color: var(--ink2); }
.sv-replay b { margin-right: 8px; font-size: 10.5px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--ink); }
/* chart 2 waits its turn */
.nf-2 { opacity: 0; animation: xr-rise .5s var(--ease) var(--reveal, 0ms) forwards; }
.nr-bar { height: 6px; background: #e6e1d3; }
.nr-bar i { display: block; height: 100%; width: var(--w); background: var(--ink); }
.nr-votes { color: var(--mute); }
.nr-votes em { font-style: normal; font-weight: 600; color: var(--ink); background: var(--hl-soft); padding: 0 3px; }
/* dumbbell: hollow dot = before the neurons, filled dot slides to after */
.dbell { font-family: var(--sans); }
.db-row.db-axis { height: 22px; border-bottom: 1px solid var(--ink); }
.db-axis .db-track { background: none; }
.db-axis em { position: absolute; bottom: 3px; transform: translateX(-50%); font: normal 11px var(--sans); color: var(--mute); }
.db-axis em:first-child { transform: none; } .db-axis em:last-child { transform: translateX(-100%); }
.nf-note { margin: 10px 0 0; font: 12px/1.45 var(--sans); color: var(--mute); }
.db-row { display: grid; grid-template-columns: 76px 1fr 102px; gap: 10px; align-items: center; height: 40px; border-bottom: 1px solid var(--line); }
.db-w { font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.db-track { position: relative; height: 100%; background: linear-gradient(90deg, transparent calc(50% - .5px), var(--line) calc(50% - .5px), var(--line) calc(50% + .5px), transparent calc(50% + .5px)); }
.db-line { position: absolute; top: 50%; height: 2px; margin-top: -1px; background: var(--faint); opacity: 0; animation: xr-fade .4s var(--d) forwards; }
.db-row.up .db-line { background: var(--ink); }
.db-from, .db-to { position: absolute; top: 50%; width: 11px; height: 11px; margin: -5.5px 0 0 -5.5px; border-radius: 50%; }
.db-from { border: 1.5px solid var(--ink); background: var(--bg); }
.db-to { background: var(--ink); left: var(--from); animation: xr-slide .9s var(--ease) var(--d) forwards; }
.db-row.up .db-to { box-shadow: 0 0 0 3px var(--hl); }
@keyframes xr-slide { from { left: var(--from); } to { left: var(--to); } }
@keyframes xr-fade { to { opacity: 1; } }
.db-n { font-size: 12px; color: var(--mute); text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.db-n b { color: var(--ink); }
.db-n small { display: block; font-size: 11px; }
.db-row.up .db-n small { color: var(--ink); font-weight: 700; }
@media (max-width: 1100px) { .mlp3 { grid-template-columns: 1fr; gap: 28px; } }

/* one column grid for the whole page: header, story and machine share the same left and right edges */
.xr-story-card { max-width: none; }
.xr-head .article-headline { max-width: 900px; }

/* ---------- small screens ---------- */
@media (max-width: 1020px) {
    .xr-grid { grid-template-columns: 1fr; }
    .xr-odds { position: static; }
    .xr-cards { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 720px) {
    main { padding: 0 16px; }
    .xr-head { margin-top: 26px; }
    .xr-explain h2 { font-size: 26px; }
    .xr-prompt { padding-left: 18px; }
    .xr-story { padding: 22px 2px 18px; }
    .xr-machine { padding: 18px 16px; }
    .xr-rail { overflow-x: auto; grid-template-columns: repeat(var(--n), 64px); padding-bottom: 4px; scrollbar-width: none; }
    .rail-line { left: 32px; right: auto; width: calc(64px * (var(--n) - 1)); }
    .st-dot { width: 34px; height: 34px; font-size: 12px; }
    .rail-line { top: 16px; }
    .emb2 { grid-template-columns: 1fr; }
    .emb2-table { display: none; }
    .heads2 { grid-template-columns: 1fr; }
    .mlp2 { grid-template-columns: 1fr; }
    .sv-foot { flex-direction: column; align-items: stretch; }
    .sv-btns { flex-direction: row; } .sv-btns > * { flex: 1; }
    .read-big { gap: 12px; } .rb-word, .rb-id { font-size: 28px; }
    .xr-cards { grid-template-columns: 1fr; }
    .xr-player { gap: 2px; padding: 6px; }
    .xr-speed { padding: 0 4px; gap: 4px; border: 0; }
    .xr-speed input { width: 56px; }
    .xr-speed b { min-width: 30px; font-size: 12px; }
    .xr-now { display: none; }
    .xr-track { margin-top: 0; }
    .eq-row { grid-template-columns: 1fr; gap: 3px; }
    .eq-label { text-align: left; }
    .head-grid { grid-template-columns: 1fr; }
    .mlp-bend { flex-direction: column; align-items: stretch; }
    .prob { grid-template-columns: 96px 1fr 48px; }
    .prob-z { display: none; }
    .xr-detail { padding: 8px 16px 40px; }
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: .01ms !important; animation-delay: 0ms !important; transition-duration: .01ms !important; }
}

/* an empty result line (nothing was rolled) takes no space */
.roll-res:empty { display: none; }

/* attention step: the heads (1) on top, what they did to the guess (2) underneath */
.attn3 { display: flex; flex-direction: column; gap: 28px; }
.attn3 .nf-2 { max-width: 560px; }

/* dice step captions while it plays (the final result replaces them) */
.roll-res.step { color: var(--mute); }
.roll-res.step b { background: none; padding: 0; color: var(--ink); }

/* neuron strip: a single highlight band that glides between the called-out neurons */
.nstrip { position: relative; }
.nband { position: absolute; top: -6px; bottom: -1px; left: 0; width: 3px; margin-left: -1.5px; background: var(--hl); z-index: 0; opacity: 0;
    transition: left .6s cubic-bezier(.2,.8,.2,1), opacity .3s ease; pointer-events: none; }
.nband.on { opacity: 1; }
.nstrip i { position: relative; z-index: 1; }

/* attention curves: solid colours, no blending (blended overlaps turn muddy) */
.xr-arcs path { mix-blend-mode: normal; }

/* dice: the winning slice simply fills with the highlighter, no flash */
.seg.win { animation: none; }
.seg { transition: background .5s ease, color .5s ease; }
/* the marker: a plain ink rule and pointer, no paper halo cutting gaps into the slice */
.marker i { box-shadow: none; width: 2px; left: -1px; border-radius: 0; }

/* dice: a 0-to-1 scale under the strip (hidden when nothing was rolled) */
.seg-axis { position: relative; height: 18px; margin-top: 6px; font: 500 11px var(--sans); color: var(--mute); font-variant-numeric: tabular-nums; }
.seg-axis span { position: absolute; top: 0; }
.seg-axis span:nth-child(1) { left: 0; } .seg-axis span:nth-child(2) { left: 50%; transform: translateX(-50%); } .seg-axis span:nth-child(3) { right: 0; }

/* rail: layer numbers in Franklin figures; Aa keeps the serif; filled icons for Numbers and Score */
.st-dot { font: 700 14px var(--sans); font-variant-numeric: lining-nums tabular-nums; }
.st-aa { font: 700 15px var(--display); }
.st-dot .ic { width: 21px; height: 21px; fill: currentColor; }

/* track: steps autoplay skips at the current speed show as a thin dotted line, so it's honest about what you'll see */
.tseg.skip b { height: 2px; background: repeating-linear-gradient(90deg, var(--faint) 0 2px, transparent 2px 5px); }
.tseg.skip.done b { background: repeating-linear-gradient(90deg, var(--ink) 0 2px, transparent 2px 5px); }

/* rail: # and % as type, in Franklin (not Playfair) */
.st-sym { font: 700 16px var(--sans); }
/* the called-out neuron: its own tick inked, full strength, on top of the band */
.nstrip i.hit { background: var(--ink) !important; z-index: 2; }

/* the title block matches every other article on the site: a centred 680px column */
.xr-head { max-width: 680px; margin: 36px auto 30px; padding: 0 20px; box-sizing: content-box; }
.xr-head .article-headline, .xr-head .article-deck { max-width: none; }

/* dice marker: the rule overhangs the strip by the same 8px above and below (strip spans 30-94px of the wrapper) */
.marker i { top: 22px; bottom: auto; height: 80px; }
/* read step: the token ID sits in fixed-width figures so nothing beside it moves */
.rb-id b { font-variant-numeric: tabular-nums lining-nums; }
