.math{--m1:#b85c50;--m2:#5e8f5f;--m3:#5877a8;--m4:#8a6aa8;--m5:#b8913a;--m6:#4f8f8f;--ink:#4a4530}.math .stage{border:1px solid var(--color-border-light);background:var(--color-surface-light);border-radius:1rem;margin:0;position:relative;overflow:hidden}.math .stage svg{touch-action:none;-webkit-user-select:none;user-select:none;width:100%;display:block}.math .stage canvas{touch-action:none;width:100%;display:block}.math .piece{stroke:var(--ink);stroke-width:1.5px;stroke-linejoin:round;fill-opacity:.45}.math .f1{fill:var(--m1)}.math .f2{fill:var(--m2)}.math .f3{fill:var(--m3)}.math .f4{fill:var(--m4)}.math .f5{fill:var(--m5)}.math .f6{fill:var(--m6)}.math .s1{stroke:var(--m1)}.math .s2{stroke:var(--m2)}.math .s3{stroke:var(--m3)}.math .s4{stroke:var(--m4)}.math .s5{stroke:var(--m5)}.math .s6{stroke:var(--m6)}.math .c1{color:var(--m1)}.math .c2{color:var(--m2)}.math .c3{color:var(--m3)}.math .c4{color:var(--m4)}.math .c5{color:var(--m5)}.math .c6{color:var(--m6)}.math .guide{fill:none;stroke:#9a9480;stroke-width:1.2px}.math .guide.dashed{stroke-dasharray:6 6}.math .rail{stroke:#9a9480;stroke-width:5px;stroke-linecap:round}.math .gridline{stroke:#e2ddc6;stroke-width:1px}.math .label{text-anchor:middle;dominant-baseline:middle;fill:var(--ink);pointer-events:none;font-variant-numeric:tabular-nums;font:600 15px Space Grotesk,sans-serif}.math .label.small{font-size:12px}.math .label.big{font-size:19px}.math .label.muted{fill:var(--color-muted-light);font-weight:500}.math .label.halo{paint-order:stroke;stroke:var(--color-surface-light);stroke-width:4px;stroke-linejoin:round}.math .vertex{text-anchor:middle;dominant-baseline:middle;fill:var(--ink);pointer-events:none;font:italic 600 17px Georgia,Times New Roman,serif}.math .grab{cursor:var(--cursor-grab);outline:none}.math .grab.dragging{cursor:var(--cursor-grabbing)}.math .grab .handle{fill:var(--color-primary);stroke:var(--color-text-light);stroke-width:2px}.math .grab:focus-visible .handle{stroke-width:4px}@media (prefers-reduced-motion:no-preference){.math .grab .handle{transition:r .15s}}.math .readout{font-variant-numeric:tabular-nums;gap:.75rem;margin-top:1rem;display:grid}.math .what{font-size:1.05rem;line-height:1.5;display:grid}.math .what>p{visibility:hidden;grid-area:1/1;margin:0}.math .what>p.shown{visibility:visible}.math .readout dl{grid-template-columns:repeat(var(--cols,3), minmax(0, 1fr));gap:.5rem 1.5rem;margin:0;display:grid}.math .readout dl div{flex-direction:column;min-width:0;display:flex}.math .readout dt{color:var(--color-muted-light);font-size:.85rem}.math .readout dd{white-space:nowrap;margin:0;font-weight:700}.math .readout dd.total{color:var(--m1)}@media (width<=640px){.math .readout dl{grid-template-columns:1fr;gap:.35rem}.math .readout dl div{flex-flow:wrap;align-items:baseline;column-gap:.5rem}}.math .setting{gap:.25rem;max-width:34rem;font-size:.95rem;display:grid}.math .setting .hint{color:var(--color-muted-light);font-size:.85rem;display:inline-block}.math .setting input[type=range]{accent-color:var(--color-primary);width:100%}.math .settings{grid-template-columns:repeat(auto-fit,minmax(14rem,1fr));gap:.75rem 2rem;display:grid}.math .value{font-variant-numeric:tabular-nums;min-width:3.5em;font-weight:700;display:inline-block}.math .buttons{flex-wrap:wrap;align-items:center;gap:.5rem;display:flex}.math .btn{border:1px solid var(--color-border-light);background:var(--color-surface-light);cursor:pointer;border-radius:999px;padding:.4rem 1rem;font-size:.95rem;font-weight:600}.math .btn:hover:not(:disabled){border-color:var(--color-text-light)}.math .btn:disabled{opacity:.45;cursor:default}.math .btn.go{background:var(--color-primary);border-color:var(--color-primary);color:var(--color-text-light)}.math .btn.go:hover:not(:disabled){background:var(--color-primary-hover);border-color:var(--color-primary-hover)}.math .btn[aria-pressed=true]{border-color:var(--color-text-light);background:var(--color-bg-light)}.math .btn:focus-visible{outline:2px solid var(--color-text-light);outline-offset:2px}.math .pills{border:0;flex-wrap:wrap;align-items:center;gap:.35rem;margin:0;padding:0;font-size:.95rem;display:flex}.math .pills legend{float:left;color:var(--color-muted-light);margin-right:.4rem;font-size:.85rem}.math .pills label{border:1px solid var(--color-border-light);background:var(--color-surface-light);cursor:pointer;border-radius:999px;padding:.25rem .75rem}.math .pills label.on{border-color:var(--color-text-light);font-weight:600}.math .pills label:has(input:focus-visible){outline:2px solid var(--color-text-light);outline-offset:2px}.math .pills input{opacity:0;pointer-events:none;position:absolute}.math .mtext p+p,.math .mtext p+ul,.math .mtext ul+p{margin-top:.75rem}.math .mtext ul{padding-left:1.25rem;list-style:outside}.math .mtext ol{padding-left:1.25rem;list-style:decimal}.math .mtext li+li{margin-top:.25rem}.math .mtext{min-width:0}.math .mtext .katex-display{margin:.6rem 0;padding-bottom:2px;font-size:1.1rem;overflow:auto hidden}.math .mtext a{text-decoration:underline}.math .more summary{cursor:pointer;font-weight:700}.math .exhibit{border:1px solid var(--color-border-light);background:var(--color-surface-light);border-radius:999px;padding:.4rem .9rem;font-size:.9rem;font-weight:600;display:inline-block}.math .exhibit:hover{border-color:var(--color-text-light)}.math .status{font-size:1.1rem;font-weight:600;display:grid}.math .status>*{grid-area:1/1}.math .win{color:var(--m2)}
