.paper-chart-scroll { width: 100%; overflow-x: auto; overscroll-behavior-x: contain; }
.paper-chart-panels { display: grid; align-items: start; gap: 2%; width: 100%; }
.paper-chart-panels-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); min-width: 800px; }
.paper-chart-panels-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); min-width: 1000px; }
.paper-chart-svg { display: block; width: 100%; height: auto; overflow: visible; }
.paper-value-canvas { min-width: 900px; }
.paper-tsne-canvas { min-width: 700px; }
.paper-tsne-image { display: block; width: 100%; height: auto; }
.paper-chart-hit, .paper-value-hit { fill: transparent; stroke: none; pointer-events: all; cursor: crosshair; }
.paper-chart-hit:focus { stroke: #333; stroke-width: 1; outline: none; }
.paper-value-hit:focus { stroke: #777; stroke-width: .4; outline: none; }
.paper-value-marker { fill: white; stroke: #222; stroke-width: .8; pointer-events: none; }
.paper-chart-tooltip[hidden] { display: none; }
.paper-result-table { width: 100%; min-width: 850px; border-collapse: collapse; font: 15px/1.6 Georgia, 'Times New Roman', serif; text-align: center; border-top: 2px solid #222; border-bottom: 2px solid #222; }
.paper-result-table th, .paper-result-table td { padding: .22rem .3rem; white-space: nowrap; font-weight: 400; }
.paper-result-table thead { border-bottom: 1px solid #222; }
.paper-result-table thead tr:first-child th[colspan] { border-bottom: 1px solid #666; }
.paper-result-table th:first-child { text-align: center; }
.paper-result-table code { font: .92em ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; color: inherit; background: none; padding: 0; }
.paper-result-table .paper-highlight { background: #e6e6e6; }
.paper-result-table strong { font-weight: 700; }
.result-data-table { width: 100%; min-width: 700px; border-collapse: collapse; font: 13px/1.5 system-ui, sans-serif; text-align: left; margin-top: .7rem; }
.result-data-table th, .result-data-table td { padding: .4rem .6rem; border-bottom: 1px solid #ddd; white-space: nowrap; }
.paper-chart-values { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.paper-chart-tooltip { box-sizing: border-box; position: fixed; z-index: 30; pointer-events: none; max-width: min(360px, calc(100vw - 16px)); padding: .85rem 1rem; background: #fffefb; color: #222; border: 1px solid #e2e0db; border-radius: 14px; box-shadow: 0 8px 28px #2222; font: 13px/1.5 system-ui, sans-serif; }
.paper-tooltip-title { font-weight: 650; font-size: .9rem; }
.paper-tooltip-context { color: #626262; margin-top: .1rem; }
.paper-tooltip-value { font-size: 1rem; font-weight: 650; padding: .5rem 0; }
.paper-tooltip-range { color: #626262; font-size: .76rem; }
.result-equations { box-sizing: border-box; max-width: 760px; margin: 1.4rem auto 2rem; padding: 1.2rem 1.4rem; border: 1px solid #e6e8eb; border-radius: 14px; background: #fafbfc; }
.result-equations .equation-scroll { overflow-x: auto; padding: .6rem 0; }
.result-equations math { width: max-content; min-width: 100%; font-size: 1.08rem; }
.result-equations p { font-size: .92rem; line-height: 1.6; margin: .7rem 0 0; }
.result-equations .equation-symbols { color: #62666b; font-size: .82rem; }
@media (max-width: 600px) { .result-equations { padding: 1rem; } }

/* Fixed LaTeX output is rendered at development time, including semantic MathML. */
.result-equations { width: min(var(--prose), 100%); max-width: none; padding: 20px 24px; border: 0; border-radius: 16px; background: #f4f7f2; }
.result-group:nth-child(2) .result-equations { background: #fcf4f4; }
.result-group:nth-child(3) .result-equations { background: #f4f5f4; }
.result-equations .equation-scroll { max-width: 100%; overscroll-behavior-inline: contain; }
.result-equations .katex-display { margin: .7em 0; }
.result-equations .katex-display > .katex { display: block; width: max-content; min-width: 100%; text-align: center; font-size: 1.07em; }
.result-equations .equation-symbols { color: #666e66; line-height: 1.8; }
.result-equations .equation-symbols .katex { font-size: 1.12em; }
@media (max-width: 600px) { .result-equations { padding: 14px 12px; } }
