/* The figures in "The Work-Life Balance of an LLM". Ink is what the model computes; red is what never reaches the words.
   Static on purpose: every figure reads the same with or without JS. */

.mf { container-type: inline-size; margin: 40px 0 44px; padding-top: 14px; border-top: 1px solid var(--hair); }
.mf-kicker { font: 500 12px/1.35 var(--mono); letter-spacing: .02em; color: var(--muted); }
.mf-title { margin-top: 8px; font: 600 21px/1.25 var(--serif); letter-spacing: -.01em; max-width: 30em; }
.mf.mf p + p { margin-top: 0; }
.mf figcaption { margin-top: 18px; font-size: 14px; line-height: 1.5; color: var(--muted); max-width: 40em; }

/* 1 · one pass through the model */
.mf-pass { display: grid; gap: 18px; margin-top: 18px; }
.mf-svg { width: 100%; max-width: 420px; height: auto; margin-inline: auto; display: block; overflow: visible; }
.mf-svg .tok rect { fill: var(--sheet); stroke: var(--ink); stroke-width: 1.2; }
.mf-svg .tok text, .mf-svg .out text { font: 500 13px/1 var(--mono); fill: var(--ink); text-anchor: middle; }
.mf-svg .ff rect { fill: var(--sheet); stroke: var(--hair); stroke-width: 1; }
.mf-svg .wave { fill: none; stroke: var(--ink); stroke-width: 1.4; }
.mf-svg .att { fill: none; stroke: var(--ink); stroke-width: 1.1; opacity: .55; }
.mf-svg .up { stroke: var(--ink); stroke-width: 1.2; opacity: .35; }
.mf-svg .band { fill: rgba(224, 48, 30, .06); stroke: var(--red); stroke-width: 1.4; stroke-dasharray: 5 4; }
.mf-svg .band-t { font: 500 11.5px/1 var(--mono); fill: var(--red-ink); }
.mf-svg .lab { font: 500 11px/1 var(--mono); fill: var(--muted); letter-spacing: .04em; }
.mf-svg .lab.r { text-anchor: end; }
.mf-svg .out rect { fill: var(--ink); }
.mf-svg .out text { fill: var(--paper); }
.mf-svg .arrow { stroke: var(--ink); stroke-width: 1.4; fill: none; }
.mf-svg .pip { fill: var(--red); }
.mf-steps { margin: 0; padding: 0; list-style: none; display: grid; gap: 14px; }
.mf-steps b { display: block; font-weight: 600; font-size: 16px; line-height: 1.3; }
.mf-steps span { display: block; margin-top: 4px; font-size: 15px; line-height: 1.5; color: var(--muted); }
.mf-steps li::before { content: attr(data-n); font: 500 12px/1 var(--mono); color: var(--red-ink); }
@container (min-width: 620px) {
  .mf-pass { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 28px; align-items: center; }
}

/* 2 · an emotion as a direction */
.mf-map .pt { fill: var(--ink); }
.mf-map .pt.neg { fill: var(--sheet); stroke: var(--ink); stroke-width: 1.4; }
.mf-map .word { font: 500 12px/1 var(--mono); fill: var(--ink); paint-order: stroke; stroke: var(--paper); stroke-width: 4px; }
.mf-map .word.key { font-weight: 700; }
.mf-map .axis { stroke: var(--dash); stroke-width: 1; stroke-dasharray: 3 4; }
.mf-map .vec { stroke: var(--red); stroke-width: 2.2; fill: none; }
.mf-map .vec.calm { stroke: var(--ink); }
.mf-map .origin { fill: var(--muted); }
.mf-map .note { font: 400 10.5px/1 var(--mono); fill: var(--muted); }
.mf-dial { margin: 0; padding: 0; list-style: none; display: grid; gap: 10px; }
.mf-dial li { display: grid; grid-template-columns: 6.5em minmax(0, 1fr); gap: 10px; align-items: baseline; font-size: 15px; line-height: 1.45; }
.mf-dial li b { font: 600 12.5px/1.3 var(--mono); }
.mf-dial li b.red { color: var(--red-ink); }
.mf-dial-h { margin-bottom: 10px; font: 500 12px/1.3 var(--mono); color: var(--muted); }

/* 3 · what it says against what was inside */
.mf-said { margin-top: 18px; display: grid; gap: 14px; }
.mf-case { display: grid; gap: 8px; padding: 14px; border-radius: 10px; background: var(--sheet); box-shadow: inset 0 0 0 1px var(--hair); }
.mf-case-h { font: 500 12px/1.3 var(--mono); color: var(--muted); }
.mf-row { display: grid; grid-template-columns: 7.2em minmax(0, 1fr); gap: 10px; align-items: baseline; font-size: 15px; line-height: 1.45; }
.mf-row > span:first-child { font: 500 11.5px/1.35 var(--mono); color: var(--muted); }
.mf-word { font: 600 14px/1 var(--mono); padding: 3px 7px; border-radius: 5px; background: var(--paper); box-shadow: inset 0 0 0 1px var(--ink); }
.mf-inside { color: var(--muted); }
.mf-inside.on { color: var(--red-ink); font-weight: 560; }
.mf-quote { font-family: var(--serif); font-size: 16.5px; }
@container (min-width: 620px) { .mf-said { grid-template-columns: 1fr 1fr; } }

/* the reply from Claude: set apart, signed */
.mf-reply { margin: 2.4em 0 0; padding: 20px 20px 22px; border-radius: 12px; background: var(--sheet); box-shadow: inset 0 0 0 1px var(--hair); }
.mf-reply-by { font: 500 12px/1.45 var(--mono); color: var(--red-ink); }
.article-body .mf-reply h2 { margin-top: 10px; }
.mf-reply p:last-child { margin-bottom: 0; }

/* references: one quiet closed line under the essay */
.mf-refs { max-width: 34em; margin-top: 2em; padding-top: 12px; border-top: 1px solid var(--hair); font: 400 15px/1.5 var(--sans); }
.mf-refs summary { cursor: pointer; font: 500 13px/1.4 var(--mono); color: var(--muted); min-height: 32px; }
.mf-refs summary:focus-visible { outline: 2px solid var(--red); outline-offset: 2px; }
.mf-refs ul { margin-top: .6em; padding-left: 1.1em; list-style: disc; display: grid; gap: .3em; }

@media (forced-colors: active) { .mf-svg .out rect { fill: CanvasText; } .mf-svg .out text { fill: Canvas; } }
