.fx-jug { --fx-jug-level: 0; --fx-jug-colour: var(--fx-sun); --fx-jug-top: var(--fx-sun-pale); display: grid; gap: 14px; }
.fx-jug:has(#fx-jug-water:checked) { --fx-jug-colour: var(--fx-sky); --fx-jug-top: var(--fx-sky-pale); }
.fx-jug:has(#fx-jug-v20:checked) { --fx-jug-level: 1; }
.fx-jug:has(#fx-jug-v40:checked) { --fx-jug-level: 2; }
.fx-jug:has(#fx-jug-v60:checked) { --fx-jug-level: 3; }
.fx-jug:has(#fx-jug-v80:checked) { --fx-jug-level: 4; }
.fx-jug .fx-jug-steps { list-style: none; margin: 0; padding: 0; }
.fx-jug .fx-jug-steps li + li { margin-top: 6px; }
.fx-jug .fx-jug-goal, .fx-jug .fx-jug-tare { margin: 0; color: var(--fx-ink); }
.fx-jug .fx-jug-tare { font-size: 14px; }
.fx-jug .fx-jug-choices { min-width: 0; margin: 0; padding: 0; border: 0; }
.fx-jug .fx-jug-choices legend { padding: 0; font-weight: 800; }
.fx-jug .fx-jug-density { margin: 6px 0 18px; font-size: 14px; }
.fx-jug .fx-jug-bottles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.fx-jug .fx-jug-bottle { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; min-width: 0; min-height: 76px; padding: 10px; box-sizing: border-box; border: 3px solid var(--fx-ink); border-radius: 16px 16px 9px 9px; color: var(--fx-ink); text-align: center; }
.fx-jug .fx-jug-bottle::before { content: ""; position: absolute; top: -10px; left: calc(50% - 18px); width: 36px; height: 8px; border: 2px solid var(--fx-ink); border-radius: 3px; background: var(--fx-paper); box-sizing: border-box; }
.fx-jug .fx-jug-bottle span { font-size: 14px; }
.fx-jug .fx-jug-oil-bottle { background: var(--fx-sun-pale); }
.fx-jug .fx-jug-water-bottle { background: var(--fx-sky-pale); }
.fx-jug .fx-jug-oil-bottle:has(input:checked) { background: var(--fx-sun); color: var(--fx-ink); }
.fx-jug .fx-jug-water-bottle:has(input:checked) { background: var(--fx-sky); color: var(--fx-ink); }
.fx-jug .fx-btn:has(input:focus-visible) { outline: 3px solid var(--fx-ink); outline-offset: 3px; }
.fx-jug .fx-jug-bench { position: relative; height: 420px; padding: 0; box-sizing: border-box; }
.fx-jug .fx-jug-fill-controls { position: absolute; inset: 0; z-index: 2; }
.fx-jug .fx-jug-control-title { position: absolute; top: 10px; left: 10px; right: 10px; margin: 0; font-size: 16px; font-weight: 800; color: var(--fx-ink); }
.fx-jug .fx-jug-line { position: absolute; left: calc(50% - 70px); width: 140px; height: 32px; min-height: 32px; margin: 0; padding: 0; display: flex; align-items: flex-end; justify-content: flex-end; border: 0; border-bottom: 2px solid var(--fx-ink); border-radius: 0; box-sizing: border-box; background: none; color: var(--fx-ink); }
.fx-jug .fx-jug-line span { padding: 1px 5px; background: var(--fx-paper); color: var(--fx-ink); border-radius: 4px 4px 0 0; font-size: 14px; line-height: 20px; }
.fx-jug .fx-jug-fill-controls .fx-jug-line:has(input:checked) { background: none; color: var(--fx-ink); border-bottom: 3px solid var(--fx-ink); }
.fx-jug .fx-jug-line:has(input:checked) span { background: var(--fx-mint); font-weight: 800; }
.fx-jug .fx-jug-line80 { top: 101px; }
.fx-jug .fx-jug-line60 { top: 141px; }
.fx-jug .fx-jug-line40 { top: 181px; }
.fx-jug .fx-jug-line20 { top: 221px; }
.fx-jug .fx-jug-line0 { top: 261px; }
.fx-jug .fx-jug-scene { position: absolute; inset: 0; pointer-events: none; color: var(--fx-ink); }
.fx-jug .fx-jug-part { position: absolute; left: 0; right: 0; text-align: center; font-size: 14px; line-height: 20px; }
.fx-jug .fx-jug-jug-label { top: 48px; }
.fx-jug .fx-jug-lines-label { top: 76px; }
.fx-jug .fx-jug-perspective { position: absolute; top: 110px; left: calc(50% - 70px); width: 140px; height: 186px; perspective: 700px; perspective-origin: 50% 0%; }
.fx-jug .fx-jug-vessel { position: relative; width: 100%; height: 100%; transform-style: preserve-3d; }
.fx-jug .fx-jug-glass { position: absolute; inset: 0; border: 3px solid var(--fx-ink); border-radius: 0 0 12px 12px; box-sizing: border-box; }
.fx-jug .fx-jug-handle { position: absolute; top: 28px; right: -29px; width: 29px; height: 87px; border: 4px solid var(--fx-ink); border-left: 0; border-radius: 0 18px 18px 0; box-sizing: border-box; }
.fx-jug .fx-jug-spout { position: absolute; top: 0; left: -16px; width: 20px; border-top: 3px solid var(--fx-ink); transform: rotate(22deg); transform-origin: right center; }
.fx-jug .fx-jug-liquid { position: absolute; left: 3px; bottom: 3px; width: 134px; height: calc(var(--fx-jug-level) * 40px); transform-style: preserve-3d; transform: rotateY(-8deg); transition: height 0.45s, transform 0.45s; }
.fx-jug .fx-jug-front { position: absolute; inset: 0; background: var(--fx-jug-colour); transform: translateZ(9px); }
.fx-jug .fx-jug-surface { position: absolute; top: 0; left: 0; width: 100%; height: 18px; background: var(--fx-jug-top); transform-origin: center top; transform: translateZ(-9px) rotateX(90deg); }
.fx-jug .fx-jug-side { position: absolute; top: 0; left: 100%; width: 18px; height: 100%; background: var(--fx-jug-colour); transform-origin: left center; transform: translateZ(9px) rotateY(90deg); }
.fx-jug:has(#fx-jug-v0:checked) .fx-jug-liquid { opacity: 0; }
.fx-jug .fx-jug-hint { position: absolute; top: 237px; left: calc(50% - 107px); width: 32px; font-size: 28px; line-height: 32px; font-weight: 800; }
.fx-jug .fx-jug-platform { position: absolute; top: 296px; left: 50%; width: min(92%, 200px); height: 9px; transform: translateX(-50%); border: 3px solid var(--fx-ink); background: var(--fx-paper); box-sizing: border-box; }
.fx-jug .fx-jug-scale-body { position: absolute; top: 305px; left: 50%; width: min(96%, 220px); height: 105px; transform: translateX(-50%); border: 3px solid var(--fx-ink); border-radius: 16px 16px 10px 10px; background: var(--fx-sky-pale); box-sizing: border-box; }
.fx-jug .fx-jug-scale-label { top: 312px; }
.fx-jug .fx-jug-mass-label { top: 337px; }
.fx-jug .fx-jug-display { position: absolute; top: 360px; left: calc(50% - 60px); width: 120px; height: 40px; border: 2px solid var(--fx-ink); border-radius: 6px; background: var(--fx-paper); color: var(--fx-ink); place-items: center; box-sizing: border-box; font-size: 26px; line-height: 32px; }
.fx-jug:has(#fx-jug-oil:checked):has(#fx-jug-v80:checked) .fx-jug-display { background: var(--fx-mint); }
.fx-jug .fx-jug-swap { display: grid; }
.fx-jug .fx-jug-swap > * { grid-area: 1 / 1; min-width: 0; margin: 0; }
.fx-jug .fx-jug-state { visibility: hidden; }
.fx-jug:has(#fx-jug-v0:checked) .fx-jug-s0, .fx-jug:has(#fx-jug-oil:checked):has(#fx-jug-v20:checked) .fx-jug-o20, .fx-jug:has(#fx-jug-oil:checked):has(#fx-jug-v40:checked) .fx-jug-o40, .fx-jug:has(#fx-jug-oil:checked):has(#fx-jug-v60:checked) .fx-jug-o60, .fx-jug:has(#fx-jug-oil:checked):has(#fx-jug-v80:checked) .fx-jug-o80, .fx-jug:has(#fx-jug-water:checked):has(#fx-jug-v20:checked) .fx-jug-w20, .fx-jug:has(#fx-jug-water:checked):has(#fx-jug-v40:checked) .fx-jug-w40, .fx-jug:has(#fx-jug-water:checked):has(#fx-jug-v60:checked) .fx-jug-w60, .fx-jug:has(#fx-jug-water:checked):has(#fx-jug-v80:checked) .fx-jug-w80 { visibility: visible; }
@container (max-width: 480px) { .fx-jug .fx-jug-bottles { grid-template-columns: 1fr; } .fx-jug .fx-jug-bottle { min-height: 70px; } }
@media (prefers-reduced-motion: reduce) { .fx-jug .fx-jug-liquid { transition: none; } }