.reading-article main { margin-top: 64px; }
.research-plot, .research-diagram { --plot-border: #a59b9e38; margin: 34px 0 42px; padding: 24px 24px 20px; border: 1px solid var(--plot-border); border-radius: 7px; background: rgba(31,27,29,.92); color: #ded9d7; overflow: visible; }
.research-plot [hidden], .research-diagram [hidden] { display: none !important; }
.plot-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 18px; margin-bottom: 20px; }
.plot-header h3 { font: 500 15px/1.6 var(--font); letter-spacing: -.02em; margin: 0; color: #ece5e2; }
.plot-meta, .article-body .plot-meta { margin: 5px 0 0; font-size: 11px; line-height: 1.65; color: #b0a5a9; }
.research-plot button, .research-diagram button { appearance: none; font-family: inherit; color: #b8adaf; background: transparent; border: 0; cursor: pointer; transition: color .15s, background .15s; }
.research-plot button:hover, .research-diagram button:hover { color: #fff; }
.research-plot button:focus-visible, .research-diagram button:focus-visible, .plot-stage:focus-visible { outline: 1px solid #d89b86; outline-offset: 4px; border-radius: 2px; }
.plot-tabs { display: flex; flex-wrap: wrap; gap: 5px 18px; border-bottom: 1px solid var(--plot-border); margin-bottom: 20px; }
.plot-tabs button { position: relative; font-size: 11px; line-height: 1.55; padding: 5px 0 10px; }
.plot-tabs button[aria-selected='true'] { color: #e4b5a5; }
.plot-tabs button[aria-selected='true']::after { content: ''; position: absolute; height: 1px; background: #d89b86; left: 0; right: 0; bottom: -1px; }
.plot-legend { display: flex; flex-wrap: wrap; gap: 7px 19px; min-height: 23px; margin: 4px 0 16px; }
.plot-legend button { display: inline-flex; align-items: center; gap: 7px; font-size: 11px; line-height: 1.5; padding: 3px 0; text-align: left; }
.plot-swatch { display: inline-block; width: 15px; height: 2px; background: var(--series-color); flex: 0 0 15px; position: relative; }
.plot-swatch::after { content: ''; position: absolute; width: 4px; height: 4px; border-radius: 50%; background: var(--series-color); left: 6px; top: -1px; }
.plot-legend button[aria-pressed='false'] { opacity: .4; text-decoration: line-through; }
.plot-legend button[aria-disabled='true'] { cursor: default; }
.plot-axis-header { display: flex; justify-content: space-between; gap: 10px; min-height: 22px; margin-top: 5px; }
.plot-y-title, .plot-x-title { color: #b8adaf; font-size: 10px; line-height: 1.6; }
.plot-range { font-size: 10px; padding: 0; color: #cfaaa0 !important; }
.plot-stage { position: relative; min-width: 0; touch-action: pan-y pinch-zoom; }
.plot-svg { display: block; width: 100%; height: auto; overflow: visible; }
.plot-grid { stroke: #a59b9e1c; stroke-width: 1; }
.plot-baseline { stroke: #a59b9e45; stroke-width: 1; }
.plot-tick { font: 11px var(--font); fill: #b4aaad; }
.plot-reference { stroke: #a59b9e75; stroke-dasharray: 3 5; stroke-width: 1; }
.plot-line { fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.plot-bar { opacity: .85; }
.plot-hairline { stroke: #d9cfcd80; stroke-width: 1; stroke-dasharray: 3 4; }
.plot-x-title { text-align: center; margin: 0 0 2px; }
.plot-tooltip { position: absolute; z-index: 4; pointer-events: none; width: max-content; max-width: min(345px, calc(100% - 8px)); padding: 12px 13px; background: #211d1ffa; border: 1px solid #756166; border-radius: 5px; box-shadow: 0 9px 28px #0004; font-size: 10px; line-height: 1.55; }
.plot-tooltip > strong { display: block; margin-bottom: 8px; font-weight: 500; color: #eee5e1; max-width: 300px; }
.plot-tip-row { display: flex; justify-content: space-between; gap: 18px; margin-top: 5px; }
.plot-tip-row > span { min-width: 0; }
.plot-tip-row i { display: inline-block; width: 5px; height: 5px; border-radius: 50%; margin-right: 6px; }
.plot-tip-row b { font-weight: 400; color: #fff0e8; flex: 0 0 auto; font-variant-numeric: tabular-nums; }
.plot-tip-at { display: block; color: #a99ba1; font-size: 9px; text-align: right; margin: -1px 0 4px; }
.plot-a11y { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.plot-load-error, .plot-loading { font-size: 12px; color: #b0a5a9; padding: 32px 0; text-align: center; }
.plot-load-error button { color: #e4b5a5; text-decoration: underline; }
.diagram-controls { display: flex; gap: 22px; flex-wrap: wrap; justify-content: space-between; align-items: flex-start; }
.diagram-controls .plot-tabs { flex: 1 1 310px; }
.diagram-focus { display: flex; gap: 6px; align-items: center; font-size: 10px; margin-top: 3px; }
.diagram-focus > span { color: #a99da2; margin-right: 3px; }
.diagram-focus button { border: 1px solid #a59b9e38; border-radius: 3px; height: 28px; width: 28px; }
.diagram-focus button[aria-pressed='true'] { border-color: #d89b86; color: #e4b5a5; }
.article-body .diagram-explanation { font-size: 12px; color: #c2b5b9; min-height: 44px; max-width: 670px; margin: 0 0 24px; }
.two-pass-canvas { padding: 12px 20px 20px; min-height: 246px; display: flex; flex-direction: column; justify-content: center; gap: 8px; }
.token-row { display: grid; align-items: center; gap: 10px; max-width: 640px; width: 100%; margin: 0 auto; }
.three-tokens { grid-template-columns: repeat(3,1fr); }
.six-tokens { grid-template-columns: repeat(6,1fr); }
.token-node { display: flex; align-items: center; justify-content: center; height: 42px; border: 1px solid #9bb9ce6e; background: #9bb9ce0a; color: #b5cddc; border-radius: 4px; font-size: 16px; white-space: nowrap; transition: opacity .15s; }
.token-node sub { font-size: 10px; align-self: center; transform: translateY(4px); }
.latent-node { color: #e2b3a2; border-color: #d89b866e; background: #d89b860b; }
.token-selected { box-shadow: inset 0 0 0 1px currentColor; }
.token-muted { opacity: .24; }
.diagram-row-label { color: #ad9fa5; text-align: center; font-size: 10px; margin-bottom: 5px; }
.diagram-arrow { text-align: center; color: #a99da2; font-size: 12px; line-height: 1.6; }
.shared-block { text-align: center; border: 1px solid #a59b9e50; color: #ded9d7; border-radius: 4px; padding: 14px; font-size: 12px; max-width: 440px; width: 100%; margin: 0 auto; }
.shared-block > span { color: #b5a0a8; display: block; font-size: 10px; margin-top: 3px; }
.interleave-source { display: grid; gap: 12px; }
.position-row { display: grid; grid-template-columns: repeat(3,1fr); max-width: 640px; width: 100%; margin: 2px auto; text-align: center; font-size: 9px; color: #a2939a; }
.prediction-node { display: flex; justify-content: center; align-items: baseline; gap: 14px; font-size: 20px; color: #e2b3a2; padding: 8px; }
.prediction-node > span { color: #9c8e95; }
.prediction-node strong { font-size: 16px; font-weight: 400; }
.budget-slider { display: grid; grid-template-columns: 1fr auto; gap: 14px; font-size: 12px; color: #bcaeb3; }
.budget-slider output { font-size: 18px; color: #ece5e2; font-variant-numeric: tabular-nums; }
.budget-slider input { grid-column: 1/-1; width: 100%; accent-color: #d89b86; cursor: pointer; margin: 0; }
.budget-preset { display: flex; flex-wrap: wrap; gap: 16px; margin: 14px 0 26px; }
.budget-preset button { font-size: 10px; padding: 4px 0; }
.budget-preset button[aria-pressed='true'] { color: #e4b5a5; text-decoration: underline; text-underline-offset: 5px; }
.budget-bar { height: 12px; background: #ffffff0d; border-radius: 3px; overflow: hidden; }
.budget-bar span { display: block; height: 100%; background: #9bb9ce; transition: width .15s; }
.budget-over .budget-bar span { background: #d89b86; }
.budget-numbers { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin: 22px 0 4px; }
.budget-numbers strong { display: block; font-size: 21px; font-weight: 400; color: #e5dcda; font-variant-numeric: tabular-nums; }
.budget-numbers span { display: block; font-size: 10px; color: #ab9ca4; margin-top: 5px; }
.budget-over .budget-numbers > div:last-child strong { color: #e4b5a5; }
.architecture-schedule { display: grid; grid-template-columns: repeat(8,minmax(0,1fr)); gap: 8px; margin: 28px 0; }
.architecture-schedule span { padding: 9px 0; border: 1px solid var(--block-color); border-color: color-mix(in srgb, var(--block-color) 55%, transparent); color: var(--block-color); text-align: center; font-size: 14px; border-radius: 3px; }
.architecture-specs { display: grid; grid-template-columns: 1fr 1fr; gap: 13px 32px; margin: 0; }
.architecture-specs > div { border-top: 1px solid #a59b9e28; padding-top: 10px; }
.architecture-specs dt { font-size: 10px; color: #aa9ba3; }
.architecture-specs dd { margin: 4px 0 0; font-size: 12px; color: #ded4d1; }
@media (max-width:620px) {
  .reading-article main { margin-top: 42px; }
  .research-plot, .research-diagram { padding: 17px 12px; margin: 28px -8px 34px; }
  .plot-header { flex-direction: column; gap: 9px; margin-bottom: 16px; }
  .plot-header h3 { font-size: 14px; }
  .plot-tabs { gap: 6px 14px; }
  .plot-tabs button { font-size: 10px; }
  .plot-legend { gap: 7px 13px; }
  .plot-legend button { font-size: 10px; }
  .plot-tick { font-size: 10px; }
  .plot-y-title, .plot-x-title { font-size: 10px; }
  .plot-tooltip { font-size: 10px; }
  .plot-tip-row { gap: 10px; }
  .diagram-controls { gap: 0; margin-bottom: 18px; }
  .diagram-controls .plot-tabs { flex-basis: 100%; margin-bottom: 10px; }
  .two-pass-canvas { padding: 8px 2px 12px; }
  .token-row { gap: 5px; }
  .token-node { height: 38px; font-size: 14px; }
  .budget-numbers { gap: 12px; }
  .budget-numbers strong { font-size: 17px; }
  .architecture-schedule { grid-template-columns: repeat(8,minmax(0,1fr)); gap: 4px; }
  .architecture-specs { gap: 12px; }
}
@media (prefers-reduced-motion:reduce) { .research-plot *, .research-diagram * { transition: none !important; } }

/* Fixed score order for the pinned comparison snapshot. */
.leader-header { display: flex; justify-content: space-between; gap: 16px; align-items: start; }
.leader-header h3 { margin: 0; font: 500 16px/1.5 var(--font); color: #ece5e2; }
.article-body .leader-qualification { margin: 20px 0 22px; color: #c8b3aa; font-size: 11px; line-height: 1.7; }
.leader-rows { --leader-row-height: 74px; display: grid; gap: 6px; margin: 0; padding: 0; list-style: none; }
.leader-row { position: relative; width: 100%; min-height: var(--leader-row-height); padding: 11px 12px 10px; display: grid; grid-template-columns: 28px minmax(0,1fr) 58px; grid-template-rows: auto 3px; gap: 8px 12px; align-items: center; border-radius: 4px; }
.leader-rank { font-size: 11px; color: #9f9298; grid-row: 1 / 3; }
.leader-name { min-width: 0; font-size: 13px; line-height: 1.5; }
.article-body .leader-name a { text-decoration: none; }
.article-body .leader-name a:hover { text-decoration: underline; }
.leader-name small { display: block; font-size: 10px; color: #a99da2; }
.leader-name strong { font-weight: 500; }
.leader-score { font-size: 18px; text-align: right; font-variant-numeric: tabular-nums; color: #d7cccd; }
.leader-track { grid-column: 2 / 4; height: 3px; background: #ffffff0a; }
.leader-track span { display: block; width: var(--leader-score); height: 100%; background: #8d9aa3; }
.leader-local { background: #d89b860c; outline: 1px solid #d89b8645; z-index: 1; }
.leader-local .leader-rank, .leader-local .leader-score, .leader-local .leader-name strong { color: #e4b5a5; }
.leader-local .leader-track span { background: #d89b86; }
.leader-footer { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 7px 20px; border-top: 1px solid #a59b9e26; padding-top: 16px; margin-top: 18px; color: #a99da2; font-size: 10px; line-height: 1.7; }
@media (max-width:620px) {
  .leader-header { flex-wrap: wrap; gap: 8px; }
  .leader-row { padding-inline: 8px; gap: 8px; grid-template-columns: 23px minmax(0,1fr) 55px; }
  .leader-name { font-size: 12px; }
}
@media print { .plot-legend button, .plot-range, .diagram-focus { display: none; } .research-plot, .research-diagram { break-inside: avoid; } }
