html, body { margin: 0; background: #fff; color: #292524; font: 15px system-ui, sans-serif; }
.cr3bp-potential { box-sizing: border-box; padding: 8px; }
.potential-view { position: relative; width: 100%; height: clamp(260px, 58vh, 500px); }
.potential-view canvas { display: block; cursor: grab; touch-action: none; }
.potential-view canvas:active { cursor: grabbing; }
.potential-view canvas:focus-visible { outline: 3px solid #2563eb; outline-offset: -3px; }
.potential-labels { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.potential-point-label { color: #991b1b; font: 19px "Orbital KaTeX Main", serif; background: #ffffffe8; border-radius: 3px; padding: 0 3px; }
.potential-axis-label { font: 17px "Orbital KaTeX Main", serif; background: #ffffffde; padding: 2px; }
.potential-variable { font-family: "Orbital KaTeX Math", serif; }
.potential-math, .potential-scale, tbody th { font-family: "Orbital KaTeX Main", serif; }
.potential-point-label sub { font-size: 70%; }
.potential-scale { display: flex; justify-content: center; align-items: center; gap: 8px; margin: 10px auto; font-size: 13px; }
.potential-gradient { width: 140px; height: 10px; background: linear-gradient(to right, #00224e, #35456c, #666970, #969179, #c9bc65, #fee838); }
.potential-controls { display: flex; justify-content: center; align-items: center; flex-wrap: wrap; gap: 10px 18px; }
.potential-controls label { display: flex; align-items: center; gap: 5px; }
.potential-controls input[type=range] { width: clamp(90px, 20vw, 180px); }
.potential-controls output { font-variant-numeric: tabular-nums; min-width: 3.2em; }
.potential-controls button { padding: 6px 10px; }
.potential-help { margin: 10px auto; max-width: 65ch; font-size: 13px; }
details { max-width: 560px; margin: 8px auto; }
summary { cursor: pointer; }
table { border-collapse: collapse; width: 100%; margin: 8px 0; }
caption { font-size: 13px; text-align: left; padding-bottom: 5px; }
th, td { padding: 4px 8px; border-bottom: 1px solid #d6d3d1; text-align: right; font-variant-numeric: tabular-nums; }
th:first-child { text-align: left; }
@media (max-width: 420px) { .potential-controls { font-size: 13px; gap: 8px; } .potential-view { height: 290px; } .potential-point-label { font-size: 15px; } }
