.s54-wrap{max-width:1120px;margin:auto;padding:1rem 1.25rem 4rem;color:#182033}
.s54-intro{margin:1.5rem 0 2rem;padding:clamp(1.25rem,3vw,2rem);border-radius:1.25rem;background:linear-gradient(135deg,#f0f5ff,#f2fbf8);border:1px solid #dce5f3}
.s54-intro .eyebrow{color:#405681;font-weight:700;letter-spacing:.04em}
.s54-intro h1{margin:.45rem 0 .7rem;color:#17213b;line-height:1.15}
.s54-intro p{max-width:75ch;line-height:1.65}
.s54-panel{margin:1.4rem 0;padding:clamp(1rem,2.4vw,1.5rem);background:#fff;border:1px solid #dbe2ed;border-radius:1rem;box-shadow:0 8px 26px #17213b0c}
.s54-panel h2{margin-top:0;color:#1c2d4f}
.s54-panel h3{color:#26395e}
.s54-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,330px),1fr));gap:1rem;align-items:start}
.s54-controls{display:flex;flex-wrap:wrap;gap:.8rem 1rem;align-items:end;margin:1rem 0}
.s54-controls label{display:grid;gap:.35rem;min-width:180px;flex:1;color:#25324a;font-weight:650}
.s54-controls input[type=range]{width:100%;accent-color:#176d67}
.s54-controls select,.s54-controls button,.s54-actions button{font:inherit}
.s54-controls select,.s54-actions button,.s54-controls button{min-height:42px;padding:.55rem .85rem;border:1px solid #97a6ba;border-radius:.6rem;background:#fff;color:#17213b}
.s54-actions{display:flex;flex-wrap:wrap;gap:.6rem;margin:.8rem 0}
.s54-controls button,.s54-actions button{cursor:pointer}
.s54-controls button:hover,.s54-actions button:hover{background:#edf4f5;border-color:#176d67}
.s54-controls button:focus-visible,.s54-actions button:focus-visible,.s54-controls input:focus-visible,.s54-controls select:focus-visible{outline:3px solid #1b82a0;outline-offset:2px}
.s54-output{display:block;margin:.65rem 0;color:#183e45;font-weight:700;line-height:1.55}
.s54-canvas{display:block;width:100%;height:auto;min-height:220px;border-radius:.7rem;background:#101826;border:1px solid #d5deeb}
.s54-canvas-label{font-size:.9rem;color:#40506a;margin:.25rem 0 .55rem}
.s54-note{padding:.9rem 1rem;border-left:4px solid #507f79;background:#f2f8f6;color:#273b39;border-radius:.3rem .65rem .65rem .3rem;line-height:1.6}
.s54-challenges{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,230px),1fr));gap:.8rem}
.s54-challenge{padding:1rem;border:1px solid #dbe2ed;border-radius:.8rem;background:#f8faff}
.s54-challenge strong{display:block;color:#1b5e57;margin-bottom:.35rem}
.s54-formula{overflow-x:auto;padding:.75rem 1rem;background:#f6f8fc;border-radius:.65rem;font-family:ui-monospace,SFMono-Regular,Consolas,monospace;color:#1e3152;line-height:1.7}
.s54-links a{color:#125d79;text-underline-offset:3px}
.s54-links a:hover{color:#0b3d53}
.s54-small{font-size:.92rem;color:#4b5870;line-height:1.6}
.s54-badge{display:inline-block;padding:.25rem .6rem;border-radius:999px;background:#e6f2ef;color:#16554f;font-size:.85rem;font-weight:700}
@media(max-width:600px){.s54-wrap{padding-inline:.8rem}.s54-controls label{min-width:100%}.s54-panel{padding:1rem}.s54-canvas{min-height:190px}}
@media(prefers-reduced-motion:reduce){.s54-canvas{scroll-behavior:auto}}
