.prose .softmax-figure { margin: 30px 0; padding: 22px; border: 1px solid var(--line); border-radius: 4px; background: #fff; }
.softmax-figure img { display: block; width: 100%; height: auto; }
.softmax-figure figcaption { margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--line); color: var(--secondary); font-size: .82rem; line-height: 1.7; }
.softmax-controls { margin-top: 20px; }
.softmax-controls label { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; font-size: .88rem; }
.softmax-controls input { display: block; width: 100%; min-height: 44px; accent-color: var(--accent); cursor: pointer; }
.softmax-controls input:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.softmax-figure output, .softmax-figure td { font-family: 'B612 Mono', ui-monospace, monospace; font-variant-numeric: tabular-nums; }
.prose .softmax-figure table { display: table; width: 100%; table-layout: fixed; font-size: .78rem; margin-block: 12px; }
.prose .softmax-figure th, .prose .softmax-figure td { padding: 10px; }
.prose .softmax-figure th { overflow-wrap: normal; }
.prose .softmax-figure td { white-space: nowrap; }
.softmax-figure .standard { color: #9a5600; }
.softmax-figure .reformulated { color: #00356b; }
.prose .softmax-status { font-size: .84rem; margin: 14px 0 0; }
.softmax-controls[hidden] { display: none; }
.classifier-figure svg { display: block; width: 100%; max-width: 650px; margin-inline: auto; }
.network-edges path { fill: none; stroke: #00356b; stroke-width: 2; }
.network-edges .zero-weight { stroke: #b5c0cc; stroke-dasharray: 5 5; stroke-width: 1.5; }
.network-nodes circle { fill: #edf3f9; stroke: #00356b; stroke-width: 2; }
.network-nodes text { font: 20px 'B612 Mono', monospace; fill: #00356b; text-anchor: middle; }
.network-labels text { font: 18px var(--sans); fill: #334155; text-anchor: middle; }
.network-labels .network-note { font-size: 13px; fill: #596779; }
.network-product { font: 18px var(--sans); fill: #334155; }
.network-backward { fill: none; stroke: #9a5600; stroke-width: 2; }
.network-backward-label { font: 15px var(--sans); fill: #9a5600; text-anchor: middle; }
.classifier-outcomes { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 20px; margin-top: 20px; }
.classifier-outcomes > div { display: flex; flex-direction: column; gap: 6px; padding: 14px; background: #f6f8fb; font-size: .86rem; }
.classifier-outcomes strong { font-weight: 500; }
.classifier-outcomes code { white-space: nowrap; }
.classifier-flow-arrow { color: #596779; }
.prose .classifier-gradient { margin: 18px 0 0; font-size: .86rem; color: #9a5600; }
.prose .slingshot-stages { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; list-style: none; margin: 0 0 28px; padding: 0; }
.prose .slingshot-stages li { position: relative; margin: 0; padding: 12px; background: #f6f8fb; font-size: .8rem; line-height: 1.6; }
.slingshot-stages li:not(:last-child)::after { content: '→'; position: absolute; right: -19px; top: 50%; transform: translateY(-50%); color: #596779; }
.slingshot-figure .slingshot-legend { max-width: 580px; margin: 0 auto 22px; }
.slingshot-figure .slingshot-trace { width: 100%; max-width: 500px; margin-inline: auto; }
.writing-page mjx-container[display='true'] { max-width: 100%; overflow-x: auto; overflow-y: hidden; padding-block: 8px; }
@media (max-width: 600px) {
  .prose .softmax-figure { padding: 12px; margin-inline: -4px; }
  .prose .softmax-figure th, .prose .softmax-figure td { padding: 8px 4px; font-size: .73rem; }
  .classifier-outcomes { grid-template-columns: 1fr; gap: 8px; }
  .classifier-flow-arrow { transform: rotate(90deg); justify-self: center; }
  .network-labels .network-note { font-size: 16px; }
  .network-backward-label { font-size: 18px; }
  .prose .slingshot-stages { grid-template-columns: 1fr; gap: 24px; }
  .slingshot-stages li:not(:last-child)::after { right: 50%; top: auto; bottom: -23px; transform: translateX(50%) rotate(90deg); }
}
@media print {
  .softmax-controls { display: none; }
  .softmax-figure { break-inside: avoid; }
}
