:root{color-scheme:light dark;font-family:system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;line-height:1.5;background:#f5f8fc;color:#162b40}*{box-sizing:border-box}body{margin:0}.lab{max-width:1100px;margin:auto;padding:clamp(.7rem,2vw,1.5rem);background:#f5f8fc;color:#162b40}.lab-header{padding:.4rem 0 1rem}.eyebrow{text-transform:uppercase;letter-spacing:.07em;font-size:.75rem;font-weight:700;color:#255780}.lab h1{font-size:clamp(1.35rem,3vw,2rem);line-height:1.2;margin:.2rem 0}.lab h2{font-size:1.25rem;margin:1rem 0 .3rem}.lab h3{font-size:1.1rem}.lab p{margin:.6rem 0}.modes{display:flex;flex-wrap:wrap;gap:.4rem;border-bottom:2px solid #b8cee2;margin-bottom:1rem;padding-bottom:.5rem}.lab button,.lab select,.lab input{font:inherit}.lab button,.lab select{min-height:44px;border:1px solid #386588;border-radius:.55rem;padding:.48rem .7rem;background:#fff;color:#18314b}.lab button{cursor:pointer;font-weight:600}.lab button:hover:not(:disabled){background:#e3f0fb}.lab button:disabled{opacity:.55;cursor:not-allowed}.lab button:focus-visible,.lab input:focus-visible,.lab select:focus-visible,.lab a:focus-visible{outline:3px solid #b45c00;outline-offset:3px}.modes [aria-selected=true]{background:#194c75;color:white;border-color:#194c75}.layout{display:grid;grid-template-columns:minmax(0,1.5fr) minmax(220px,1fr);gap:1rem;align-items:start}.visual,.controls,.results,.prediction,.proof,.transfer{background:#fff;border:1px solid #b9cada;border-radius:.8rem;padding:clamp(.6rem,1.6vw,1rem)}.visual svg{display:block;width:100%;height:auto;border:1px solid #b9cada;border-radius:.5rem;background:#fcfdff;touch-action:none}.visual .legend{font-size:.84rem;line-height:1.6}.key{font-weight:900;margin-left:.5rem}.direct-key{color:#174f83}.route-key{color:#b44c27}.controls{display:flex;flex-direction:column;gap:.55rem}.controls label:not(.check){font-weight:600}.controls select{max-width:100%;width:100%}.coords{border:1px solid #abc3d9;border-radius:.45rem;display:flex;flex-wrap:wrap;gap:.65rem;padding:.6rem}.coords legend{font-size:.85rem}.coords label{flex:1 1 100px;display:flex;flex-direction:column}.coords input{min-height:44px;max-width:100%;border:1px solid #537693;border-radius:.35rem;padding:.35rem}.check{display:flex;gap:.5rem;align-items:center}.check input{width:21px;height:21px}.actions{display:flex;flex-wrap:wrap;gap:.4rem}.actions button{flex:1 1 auto}.results{margin:.8rem 0;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:.3rem .7rem}.results p{margin:.2rem 0;min-width:0}.results .equation,.results p:last-child{grid-column:1/-1}.equation{font-size:1.15rem;font-weight:700;color:#124c7a}.prediction{margin:.8rem 0}.prediction label{display:inline-flex;gap:.35rem;align-items:center;margin:.35rem .65rem .3rem 0;min-height:44px}.prediction legend{font-weight:700}.prediction input{width:19px;height:19px}.note{border-left:4px solid #587fa1;padding:.4rem .7rem;background:#e8f0f7;font-size:.92rem}.error{color:#9a1818;font-weight:700}.lab a{color:#14517f;text-decoration:underline;text-underline-offset:2px}.lab .to-proof{background:#194c75;color:#fff}.lab footer{margin-top:1.2rem;padding-top:1rem;border-top:1px solid #b9cada;font-size:.86rem}.real-controls label{display:flex;flex-direction:column;gap:.2rem}.real-controls input{width:100%;height:44px}.real-controls output{font-variant-numeric:tabular-nums}.proof{margin:1rem 0}.proof #proof-content{min-height:5.5rem;font-size:1.06rem}.proof .reason{padding:.6rem;background:#e8f0f7;border-radius:.4rem}.transfer{border-left:4px solid #477b4d}.fallback{border:2px solid #b44c27;padding:1rem}.direct{stroke:#174f83;stroke-width:4;fill:none}.route{stroke:#b44c27;stroke-width:4;stroke-dasharray:10 6;fill:none}.gridline{stroke:#d9e3ed;stroke-width:1}.axis{stroke:#8097ac;stroke-width:1.5}.point-halo{fill:#fff;stroke:#174f83;stroke-width:2}.point-b{fill:#ffd18a;stroke:#8a4600;stroke-width:2;cursor:grab}.point-b:active{cursor:grabbing}.point-label{font:700 20px system-ui,sans-serif;fill:#132b42;paint-order:stroke;stroke:#fff;stroke-width:4;stroke-linejoin:round}.tiny-label{font:13px system-ui,sans-serif;fill:#243d55;paint-order:stroke;stroke:white;stroke-width:3}.direct-arrow{stroke:#174f83;stroke-width:4;fill:none}.route-arrow{stroke:#b44c27;stroke-width:4;stroke-dasharray:8 4;fill:none}.lab [hidden]{display:none!important}@media(max-width:700px){.layout{grid-template-columns:1fr}.results{grid-template-columns:1fr}.modes button{flex:1 1 100%}.visual svg{max-height:400px}.lab{padding:.6rem}}@media(prefers-color-scheme:dark){:root{background:#101e2d;color:#edf3fa}.lab{background:#101e2d;color:#edf3fa}.eyebrow{color:#a1c9ea}.visual,.controls,.results,.prediction,.proof,.transfer{background:#192b3c;border-color:#526d84}.visual svg{background:#f7faff}.lab button,.lab select,.coords input{background:#22394f;border-color:#94b1c8;color:#f4f8fd}.lab button:hover:not(:disabled){background:#315774}.modes [aria-selected=true],.lab .to-proof{background:#84b8e4;color:#102438}.equation,.lab a{color:#a7d8ff}.note,.proof .reason{background:#284154;color:#f0f6fb}.error{color:#ffadad}.lab footer{border-color:#526d84}}
/* Keep the active tab readable when a pointer hovers over it. */
.modes [aria-selected="true"]:hover:not(:disabled){background:#194c75;color:#fff}
@media(prefers-color-scheme:dark){.modes [aria-selected="true"]:hover:not(:disabled){background:#84b8e4;color:#102438}}
