/* Rangkaian Listrik: diagram SVG, panel soal dan kontrol */
.rl-wrap { flex: 1; min-height: 0; display: flex; padding: clamp(4px, 1vw, 12px); background: #134e4a; }
.rl-stage { position: relative; flex: 1; min-height: 0; border-radius: 16px; overflow: hidden; border: 3px solid #fff; background: linear-gradient(180deg, #ecfeff, #fefce8); display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(250px, 1fr); }
.rl-left { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.rl-hud { display: flex; flex-wrap: wrap; gap: 5px; padding: 5px 8px; font-weight: 800; font-size: clamp(11px, 1.45vw, 16px); }
.rl-hud span { background: rgba(15,23,42,.75); color: #fff; border-radius: 999px; padding: 1px 10px; white-space: nowrap; }
.rl-hud .k { background: #0d9488; }
.rl-dia { flex: 1; min-height: 0; padding: 0 6px; display: flex; }
.rl-dia svg { flex: 1; width: 100%; height: 100%; min-height: 0; }
.rl-chips { display: flex; flex-wrap: wrap; gap: 5px; padding: 4px 8px 8px; font-weight: 800; font-size: clamp(11px, 1.45vw, 16px); }
.rl-chips span { background: #fff; border: 2px solid #99f6e4; border-radius: 999px; padding: 1px 10px; white-space: nowrap; }
.rl-panel { display: flex; flex-direction: column; gap: clamp(5px, 1.3vh, 10px); padding: clamp(6px, 1.4vh, 12px); background: rgba(255,255,255,.88); border-left: 3px solid #fff; overflow-y: auto; justify-content: center; }
.rl-q { margin: 0; font-weight: 800; font-size: clamp(13px, 1.9vw, 21px); line-height: 1.3; }
.rl-opts { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.rl-opt { min-height: clamp(38px, 7vh, 54px); border: 3px solid #0d9488; border-radius: 14px; background: #fff; font: inherit; font-weight: 900; font-size: clamp(15px, 2.2vw, 24px); color: var(--ink); cursor: pointer; }
.rl-opt.ok { background: #bbf7d0; border-color: var(--ok); } .rl-opt.bad { background: var(--rose-100); border-color: var(--bad); }
.rl-opt:disabled { cursor: default; }
.rl-ctl { display: flex; align-items: center; justify-content: center; gap: 12px; }
.rl-ctl button { width: clamp(36px, 6vh, 48px); height: clamp(36px, 6vh, 48px); border: 0; border-radius: 50%; background: #ccfbf1; color: #134e4a; font: inherit; font-weight: 900; font-size: 1.3rem; cursor: pointer; padding: 0; box-shadow: 0 3px 0 rgba(15,23,42,.25); }
.rl-ctl b { min-width: 7ch; text-align: center; font-size: clamp(15px, 2.3vw, 24px); }
.rl-seg { display: flex; gap: 4px; background: #ccfbf1; border-radius: 999px; padding: 3px; }
.rl-seg button { flex: 1; min-height: clamp(30px, 5.4vh, 42px); border: 0; border-radius: 999px; background: transparent; font: inherit; font-weight: 800; font-size: clamp(12px, 1.6vw, 17px); color: var(--ink); cursor: pointer; }
.rl-seg button[aria-pressed="true"] { background: #0d9488; color: #fff; }
.rl-go { min-height: clamp(40px, 7vh, 52px); border: 0; border-radius: 999px; background: #16a34a; color: #fff; font: inherit; font-weight: 900; font-size: clamp(15px, 2.1vw, 22px); cursor: pointer; box-shadow: 0 4px 0 rgba(15,23,42,.3); }
.rl-go.alt { background: #0284c7; } .rl-go:active { transform: translateY(2px); } .rl-go:disabled { opacity: .45; cursor: default; }
.rl-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.rl-sec { min-height: clamp(30px, 5.2vh, 40px); border: 2px solid #0d9488; border-radius: 999px; background: #fff; color: #0f766e; font: inherit; font-weight: 800; font-size: clamp(11px, 1.4vw, 15px); cursor: pointer; padding: 0 4px; }
.rl-sec:disabled { opacity: .4; cursor: default; }
.rl-info { margin: 0; background: #f0fdfa; border: 2px solid #99f6e4; border-radius: 12px; padding: 5px 10px; font-weight: 700; font-size: clamp(11px, 1.45vw, 16px); line-height: 1.4; }
.rl-info[hidden] { display: none; }
.rl-res { margin: 0; font-weight: 800; font-size: clamp(12px, 1.6vw, 18px); line-height: 1.35; color: #134e4a; }
.rl-fb { position: absolute; left: 36%; top: 12%; transform: translate(-50%, -6px); background: var(--ink); color: #fff; padding: 6px 16px; border-radius: 14px; font-weight: 800; font-size: clamp(13px, 1.8vw, 22px); opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; text-align: center; max-width: 60%; z-index: 4; }
.rl-fb.show { opacity: 1; transform: translate(-50%, 0); } .rl-fb.ok { background: var(--ok); } .rl-fb.bad { background: var(--bad); }
.rl-stars { font-size: clamp(32px, 7vh, 60px); color: #f59e0b; letter-spacing: 6px; line-height: 1; } .rl-stars .off { color: #cbd5e1; }
.flow { stroke-dasharray: 2 14; stroke-linecap: round; animation: rl-flow var(--d, 1s) linear infinite; }
@keyframes rl-flow { to { stroke-dashoffset: -32; } }
@media (max-height: 520px) { .rl-wrap { padding: 3px 6px; } .rl-stage { border-width: 2px; border-radius: 12px; } .rl-panel { gap: 4px; padding: 4px 8px; } .rl-hud { padding: 3px 6px; } .rl-chips { padding: 2px 6px 4px; } .rl-opt { min-height: 34px; } .rl-go { min-height: 36px; } .rl-sec { min-height: 28px; } }
@media (max-width: 700px) and (orientation: portrait) { .rl-stage { grid-template-columns: 1fr; grid-template-rows: minmax(0, 1fr) auto; } .rl-panel { border-left: 0; border-top: 3px solid #fff; } .rl-fb { left: 50%; } }
@media (prefers-reduced-motion: reduce) { .flow { animation: none; } .rl-fb { transition: none; } }
