.fx-stack { display: grid; }
.fx-stack .fx-stack-body { --fx-s0: visible; --fx-s1: hidden; --fx-s2: hidden; --fx-s3: hidden; --fx-s4: hidden; --fx-b1: 0; --fx-b2: 0; --fx-b3: 0; --fx-b4: 0; display: grid; gap: 16px; min-width: 0; color: var(--fx-ink); }
.fx-stack:has(.fx-stack-choices > :nth-child(1 of :has(input:checked))) .fx-stack-body { --fx-s0: hidden; --fx-s1: visible; --fx-b1: 1; }
.fx-stack:has(.fx-stack-choices > :nth-child(2 of :has(input:checked))) .fx-stack-body { --fx-s1: hidden; --fx-s2: visible; --fx-b2: 1; }
.fx-stack:has(.fx-stack-choices > :nth-child(3 of :has(input:checked))) .fx-stack-body { --fx-s2: hidden; --fx-s3: visible; --fx-b3: 1; }
.fx-stack:has(.fx-stack-choices > :nth-child(4 of :has(input:checked))) .fx-stack-body { --fx-s3: hidden; --fx-s4: visible; --fx-b4: 1; }
.fx-stack .fx-stack-steps { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.fx-stack .fx-stack-goal, .fx-stack .fx-stack-read-label { margin: 0; }
.fx-stack .fx-stack-controls { min-width: 0; border: 0; padding: 0; margin: 0; }
.fx-stack .fx-stack-controls legend { padding: 0; font-weight: 800; }
.fx-stack .fx-stack-help { font-size: 14px; line-height: 1.5; margin: 10px 0 12px; }
.fx-stack .fx-stack-choices { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; align-items: stretch; }
.fx-stack .fx-stack-choice { display: block; box-sizing: border-box; min-width: 0; min-height: 80px; padding: 12px; text-align: left; white-space: normal; color: var(--fx-ink); background: var(--fx-paper); border: 2px solid var(--fx-ink); border-radius: 10px; cursor: pointer; }
.fx-stack .fx-stack-choice b { display: block; font-size: 14px; line-height: 1.4; margin-bottom: 6px; }
.fx-stack .fx-stack-choice span { font-size: 14px; }
.fx-stack .fx-stack-choice:has(input:checked) { color: var(--fx-ink); background: var(--fx-sun-pale); }
.fx-stack .fx-stack-choice:has(input:focus-visible) { outline: 3px solid var(--fx-grape); outline-offset: 3px; }
.fx-stack .fx-stack-c1 { box-shadow: 0 0 0 3px var(--fx-sun-pale); }
.fx-stack .fx-stack-c2, .fx-stack .fx-stack-c3, .fx-stack .fx-stack-c4 { visibility: hidden; }
.fx-stack:has(#fx-stack-b1:checked) .fx-stack-c2, .fx-stack:has(#fx-stack-b2:checked) .fx-stack-c2, .fx-stack:has(#fx-stack-b2:checked) .fx-stack-c3, .fx-stack:has(#fx-stack-b3:checked) .fx-stack-c3, .fx-stack:has(#fx-stack-b3:checked) .fx-stack-c4, .fx-stack:has(#fx-stack-b4:checked) .fx-stack-c4 { visibility: visible; }
.fx-stack .fx-stack-prompt { display: block; margin-top: 6px; font-size: 12px; font-weight: 800; }
.fx-stack:has(#fx-stack-b1:checked) .fx-stack-prompt { visibility: hidden; }
.fx-stack .fx-stack-stage { position: relative; box-sizing: border-box; height: 510px; min-width: 0; padding: 0; overflow: hidden; }
.fx-stack .fx-stack-key { position: absolute; top: 10px; left: 12px; right: 12px; margin: 0; font-size: 14px; line-height: 1.4; }
.fx-stack .fx-stack-shelf { position: absolute; bottom: 24px; left: 12px; right: 12px; height: 10px; background: var(--fx-sky-pale); border: 1px solid var(--fx-ink); }
.fx-stack .fx-stack-shelf-label { position: absolute; bottom: 3px; left: 12px; font-size: 12px; }
.fx-stack .fx-stack-space { position: absolute; inset: 0; perspective: 900px; }
.fx-stack .fx-stack-tower { position: absolute; bottom: 38px; left: calc(50% - 100px); width: 132px; height: 384px; transform-style: preserve-3d; transform-origin: 50% 100%; transform: rotateX(-10deg) rotateY(-15deg); }
.fx-stack .fx-stack-cube { position: absolute; left: 0; width: 132px; transform-style: preserve-3d; }
.fx-stack .fx-stack-savings { bottom: 0; height: 320px; }
.fx-stack .fx-stack-front, .fx-stack .fx-stack-side, .fx-stack .fx-stack-top { position: absolute; box-sizing: border-box; border: 1px solid var(--fx-ink); }
.fx-stack .fx-stack-front { inset: 0; display: grid; place-items: center; transform: translateZ(12px); background: var(--fx-sky); text-align: center; font-size: 12px; line-height: 14px; }
.fx-stack .fx-stack-side { right: -12px; top: 0; width: 24px; height: 100%; transform: rotateY(90deg); background: var(--fx-sky-pale); }
.fx-stack .fx-stack-top { left: 0; top: -12px; width: 100%; height: 24px; transform: rotateX(90deg); background: var(--fx-sky-pale); }
.fx-stack .fx-stack-savings .fx-stack-front { padding: 10px; font-size: 18px; font-weight: 800; line-height: 1.4; }
.fx-stack .fx-stack-ghost { position: absolute; left: 0; bottom: calc(320px + var(--fx-level) * 16px); box-sizing: border-box; width: 132px; height: 16px; border: 1px dashed var(--fx-ink); background: var(--fx-paper); transform: translateZ(11px); text-align: center; font-size: 12px; line-height: 14px; }
.fx-stack .fx-stack-ghost1 { box-shadow: 0 0 0 2px var(--fx-sun); }
.fx-stack:has(.fx-stack-choices input:checked) .fx-stack-ghost1 { box-shadow: none; }
.fx-stack .fx-stack-interest { bottom: calc(320px + var(--fx-level) * 16px); height: 16px; transform-origin: 50% 100%; transform: translateY(calc((1 - var(--fx-show)) * -30px)) translateZ(0px) scale(var(--fx-show)); transition: transform 0.45s; }
.fx-stack .fx-stack-block1 { --fx-show: var(--fx-b1); }
.fx-stack .fx-stack-block2 { --fx-show: var(--fx-b2); }
.fx-stack .fx-stack-block3 { --fx-show: var(--fx-b3); }
.fx-stack .fx-stack-block4 { --fx-show: var(--fx-b4); }
.fx-stack .fx-stack-interest .fx-stack-front { background: var(--fx-sun); }
.fx-stack .fx-stack-interest .fx-stack-side, .fx-stack .fx-stack-interest .fx-stack-top { background: var(--fx-sun-pale); }
.fx-stack .fx-stack-ruler { position: absolute; left: 142px; bottom: 0; width: 50px; height: 384px; border-left: 2px solid var(--fx-ink); transform: translateZ(12px); }
.fx-stack .fx-stack-ruler span { position: absolute; left: 0; bottom: calc(320px + var(--fx-level) * 16px); height: 16px; margin-bottom: -8px; padding-left: 8px; font-size: 12px; line-height: 16px; }
.fx-stack .fx-stack-ruler span::before { content: ""; position: absolute; left: 0; top: 7px; width: 6px; border-top: 1px solid var(--fx-ink); }
.fx-stack .fx-stack-readouts, .fx-stack .fx-stack-messages { display: grid; min-width: 0; }
.fx-stack .fx-stack-state { grid-area: 1 / 1; margin: 0; min-width: 0; }
.fx-stack .fx-stack-s0 { visibility: var(--fx-s0); }
.fx-stack .fx-stack-s1 { visibility: var(--fx-s1); }
.fx-stack .fx-stack-s2 { visibility: var(--fx-s2); }
.fx-stack .fx-stack-s3 { visibility: var(--fx-s3); }
.fx-stack .fx-stack-s4 { visibility: var(--fx-s4); }
.fx-stack .fx-stack-values { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.fx-stack .fx-stack-total, .fx-stack .fx-stack-multiplier { min-width: 0; padding: 12px; border: 1px solid var(--fx-ink); border-radius: 10px; background: var(--fx-sky-pale); }
.fx-stack .fx-stack-multiplier { background: var(--fx-sun-pale); }
.fx-stack .fx-stack-values b { font-size: 14px; }
.fx-stack .fx-stack-values .fx-score { display: block; margin-top: 6px; font-size: 20px; line-height: 1.3; }
@container (max-width: 480px) { .fx-stack .fx-stack-choices, .fx-stack .fx-stack-values { grid-template-columns: minmax(0, 1fr); } }
@media (prefers-reduced-motion: reduce) { .fx-stack .fx-stack-interest { transition: none; } }