* {box-sizing:border-box}
body {margin:0;background:#f3f7fb;color:#152d42;font:16px/1.55 system-ui,sans-serif}
a {color:#214f79;text-underline-offset:4px}
header,main {max-width:1120px;margin:auto;padding:22px}
header {display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:12px;border-bottom:1px solid #cbdbe8}
nav {display:flex;flex-wrap:wrap;gap:15px;font-size:14px}
.brand {display:flex;align-items:center;gap:9px;color:inherit;text-decoration:none;font-size:23px;font-weight:750}
.brand img {width:34px}
.skip {position:absolute;left:-9999px}
.skip:focus {left:10px;top:10px;background:white;padding:10px;z-index:2}
.eyebrow {font-size:12px;color:#3d607d;font-weight:700;letter-spacing:1.3px;margin:10px 0 8px}
h1 {font-size:clamp(29px,4.5vw,48px);line-height:1.15;margin:10px 0 12px}
h2 {font-size:19px;margin:0}
.lead {max-width:660px;color:#3d607d}
.lab {display:grid;grid-template-columns:minmax(0,1fr) minmax(245px,310px);gap:18px;margin-top:24px;align-items:start}
.panel {background:#fff;border:1px solid #cbdbe8;border-radius:14px;min-width:0;padding:18px}
#plot-area {position:relative;max-width:420px;margin:8px auto}
#plot {display:block;width:100%;background:#f5f8fb;border-radius:8px;font-size:15px;font-weight:600;fill:#29475f}
.axes,#run-rise {fill:none;stroke-width:1.5}
.axes {stroke:#45617a}
#line {stroke:#285d8e;stroke-width:2.6}
#run-rise {stroke:#816022;stroke-dasharray:4 3;stroke-width:2}
.drag-target {position:absolute;width:min(32px,10%);aspect-ratio:1;transform:translate(-50%,-50%);touch-action:none;cursor:grab}
.drag-target:active {cursor:grabbing}
.dot {stroke:white;stroke-width:2;fill:#285d8e}
#handle-b .dot {fill:#a05622}
#handle-b text,#handle-p text {pointer-events:none;paint-order:stroke;stroke:#f5f8fb;stroke-width:3px}
.readings {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin:12px 0}
.readings div {border-top:1px solid #cbdbe8;padding-top:5px}
dt {font-size:14px;font-weight:650}
dd {margin:0;color:#152d42;font-weight:650;font-variant-numeric:tabular-nums}
.result {background:#eaf2fa;border-radius:7px;padding:8px 12px;margin-bottom:6px}
.equation {background:#eaf2fa;border-radius:7px;padding:8px 12px;margin:12px 0;font-size:21px;font-weight:680;font-variant-numeric:tabular-nums}
.hint {font-size:14px;color:#3d607d}
.controls label {display:flex;flex-wrap:wrap;justify-content:space-between;gap:2px 8px;margin-top:14px;font-size:14px;font-weight:650}
output {white-space:nowrap;font-variant-numeric:tabular-nums}
input[type=range] {display:block;width:100%;min-height:44px;margin:0;accent-color:#245987}
button {width:100%;min-height:44px;border:1px solid #c2d6e6;border-radius:7px;background:#eaf2fa;color:#214f79;font:inherit;padding:5px 10px;cursor:pointer}
.investigation {margin:24px 0;padding:6px 16px;border-left:3px solid #8bb0cd}
:focus-visible {outline:3px solid #285d8e;outline-offset:3px}
@media(max-width:690px) {
  header,main {padding:15px}
  .lab {grid-template-columns:minmax(0,1fr);gap:12px}
  .panel {padding:13px}
}
