/* Simulador "Paro secuencial y enclavamiento" (publicación 148). Prefijo ej12- */
.ej12 { background: var(--card, #fff); color: var(--navy, #0b1f33); border: 1px solid var(--line, #cfdae6); border-radius: 8px; padding: 16px; margin: 26px 0; display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.ej12 * { box-sizing: border-box; }
.ej12-head { display: flex; flex-direction: column; gap: 2px; }
.ej12-head strong { font-size: 1.1rem; color: var(--navy, #0b1f33); }
.ej12-head span { color: var(--muted, #4a5d70); font-size: .92rem; line-height: 1.5; }
.ej12-tabs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
@media (max-width: 760px) { .ej12-tabs { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.ej12 button { font: inherit; font-weight: 600; font-size: .9rem; padding: 9px 12px; border-radius: 4px; border: 1px solid var(--navy, #0b1f33); background: var(--navy, #0b1f33); color: #fff; cursor: pointer; min-height: 42px; line-height: 1.25; }
.ej12 button.ghost { background: transparent; color: var(--navy, #0b1f33); }
.ej12 button:disabled { opacity: .45; cursor: not-allowed; }
.ej12 button[hidden], .ej12 [hidden] { display: none !important; }
.ej12 button:focus-visible, .ej12 input:focus-visible, .ej12 select:focus-visible, .ej12 summary:focus-visible { outline: 3px solid var(--accent, #e0731a); outline-offset: 2px; }
.ej12-tabs button { background: #eef2f6; color: #0b1f33; border-color: #cfdae6; font-size: .86rem; }
.ej12-tabs button[aria-pressed="true"] { background: var(--navy, #0b1f33); color: #fff; border-color: var(--navy, #0b1f33); }
.ej12-now { border: 1px solid #cfdae6; border-left: 5px solid #e0731a; border-radius: 4px; background: #fff7ef; color: #0b1f33; padding: 10px 14px; }
.ej12-ct { font-size: .88rem; font-weight: 700; color: var(--navy, #0b1f33); margin-bottom: 6px; }
.ej12-now .ej12-ct { color: #7a3d08; text-transform: uppercase; letter-spacing: .04em; font-size: .78rem; }
.ej12-now-main { margin: 0; font-size: 1rem; line-height: 1.55; font-weight: 600; color: #0b1f33; min-height: 3.1em; }
.ej12-now-last { margin: 6px 0 0; font-size: .84rem; color: #4a5d70; min-height: 1.2em; }
.ej12-demo { display: flex; flex-direction: column; gap: 8px; }
.ej12-btns { display: flex; flex-wrap: wrap; gap: 8px; }
.ej12-demo-b, .ej12-next { background: #1a7f4b !important; border-color: #1a7f4b !important; color: #fff !important; }
.ej12-demostep { margin: 0; padding: 10px 14px; border-radius: 4px; background: #eaf3fc; border-left: 5px solid #2a6fb0; color: #0b1f33; font-size: .95rem; line-height: 1.55; }
.ej12-hl { outline: 4px solid #e0731a; outline-offset: 3px; border-radius: 4px; animation: ej12-pulse 1.1s ease-in-out infinite; }
svg .ej12-hl { outline: none; filter: drop-shadow(0 0 5px #e0731a) drop-shadow(0 0 2px #e0731a); }
@keyframes ej12-pulse { 50% { outline-color: #f6c28b; } }
.ej12-grid { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 6fr); gap: 16px; align-items: start; }
@media (max-width: 860px) { .ej12-grid { grid-template-columns: minmax(0, 1fr); } }
.ej12-left, .ej12-right { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.ej12-ctl { display: flex; flex-direction: column; gap: 12px; }
.ej12-grp { border: 1px solid var(--line, #cfdae6); border-radius: 6px; padding: 10px 12px; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.ej12-gt { font-size: .86rem; font-weight: 700; color: var(--navy, #0b1f33); }
.ej12-seg { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.ej12-seg button { background: #eef2f6; color: #0b1f33; border-color: #cfdae6; text-align: left; font-size: .84rem; }
.ej12-seg button small { display: block; font-weight: 500; font-size: .74rem; color: #4a5d70; }
.ej12-seg button[aria-pressed="true"] { background: #fff3e4; border: 2px solid #e0731a; color: #0b1f33; }
.ej12-seg button[aria-pressed="true"] small { color: #7a3d08; }
.ej12-big { flex: 1 1 auto; background: #1a7f4b !important; border-color: #1a7f4b !important; }
.ej12-big[aria-pressed="true"] { background: #b42318 !important; border-color: #b42318 !important; }
.ej12-stop { background: #b42318 !important; border-color: #b42318 !important; }
.ej12-row { display: flex; flex-direction: column; gap: 3px; }
.ej12-row label { font-size: .86rem; font-weight: 600; color: var(--navy, #0b1f33); }
.ej12-in { display: flex; align-items: center; gap: 10px; }
.ej12-in input[type=range] { flex: 1 1 auto; min-width: 0; height: 30px; accent-color: var(--accent, #e0731a); }
.ej12-in output { flex: 0 0 auto; min-width: 5.6em; text-align: right; font-variant-numeric: tabular-nums; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .82rem; font-weight: 600; color: var(--navy, #0b1f33); }
.ej12 select { font: inherit; font-size: .9rem; padding: 7px 8px; border: 1px solid var(--line, #cfdae6); border-radius: 4px; background: #fff; color: #0b1f33; width: 100%; max-width: 100%; min-height: 40px; }
.ej12-chk { display: flex; align-items: flex-start; gap: 8px; font-size: .86rem; font-weight: 600; color: var(--navy, #0b1f33); padding: 4px 0; line-height: 1.4; }
.ej12-chk input { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--accent, #e0731a); flex: 0 0 auto; }
.ej12-hint { margin: 4px 0 0; font-size: .82rem; line-height: 1.5; color: var(--muted, #4a5d70); }
.ej12-adv { border: 1px solid var(--line, #cfdae6); border-radius: 6px; padding: 8px 12px; }
.ej12-adv summary { cursor: pointer; font-weight: 700; font-size: .88rem; color: var(--navy, #0b1f33); min-height: 32px; display: flex; align-items: center; }
.ej12-adv > div { display: flex; flex-direction: column; gap: 10px; margin-top: 8px; }
.ej12-card { border: 1px solid var(--line-soft, #e1e8ef); border-radius: 6px; background: #fff; padding: 10px; min-width: 0; color: #0b1f33; }
.ej12-card .ej12-ct { color: #0b1f33; }
.ej12 svg { display: block; width: 100%; height: auto; max-width: 100%; font-family: inherit; }
.ej12-stage { max-width: 520px; margin: 0 auto; background: #fff; border-radius: 4px; }
.ej12-tl { background: #fff; border-radius: 4px; }
.ej12-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 8px; margin-bottom: 8px; }
.ej12-tile { position: relative; border: 2px solid #cfdae6; border-radius: 6px; padding: 8px 8px 8px 26px; background: #f3f6f9; color: #0b1f33; display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.ej12-tile i { position: absolute; left: 8px; top: 12px; width: 11px; height: 11px; border-radius: 50%; background: #9fb0c2; border: 1px solid #0b1f33; }
.ej12-tile b { font-size: .95rem; }
.ej12-tile span { font-size: .74rem; color: #4a5d70; line-height: 1.25; }
.ej12-tile em { font-style: normal; font-size: .76rem; font-weight: 700; color: #4a5d70; margin-top: 2px; }
.ej12-tile.on { border-color: #1a7f4b; background: #effaf2; }
.ej12-tile.on i { background: #3ddc84; }
.ej12-tile.on em { color: #14532d; }
.ej12-read { display: grid; grid-template-columns: repeat(auto-fit, minmax(135px, 1fr)); gap: 8px; border: 1px solid var(--line, #cfdae6); border-left: 4px solid var(--accent, #e0731a); border-radius: 4px; padding: 10px 12px; background: #fff7ef; color: #0b1f33; }
.ej12-read div { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.ej12-read span { font-size: .74rem; color: #4a5d70; }
.ej12-read b { font-size: .92rem; color: #0b1f33; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.ej12-steps ol { margin: 0; padding-left: 0; list-style: none; counter-reset: ej12s; display: flex; flex-direction: column; gap: 8px; }
.ej12-steps li { counter-increment: ej12s; position: relative; padding: 9px 12px 9px 40px; border-radius: 4px; border-left: 4px solid #cfdae6; background: #f3f6f9; color: #0b1f33; font-size: .9rem; line-height: 1.55; }
.ej12-steps li::before { content: counter(ej12s); position: absolute; left: 10px; top: 9px; width: 22px; height: 22px; border-radius: 50%; background: #0b1f33; color: #fff; font-size: .78rem; font-weight: 700; display: flex; align-items: center; justify-content: center; }
.ej12-steps li.on { border-color: #e0731a; background: #fff3e4; font-weight: 600; }
.ej12-note { margin: 0; font-size: .8rem; color: var(--muted, #4a5d70); line-height: 1.5; }
@media (prefers-reduced-motion: reduce) { .ej12 *, .ej12-hl { animation: none !important; transition: none !important; } }
.ej12-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.ej12 .ej12-bstop { background: #b42318; border-color: #b42318; }
.ej12 .ej12-bstart { background: #1a7f4b; border-color: #1a7f4b; }
.ej12 .ej12-bstop.dn, .ej12 .ej12-bstart.dn { filter: brightness(.8); box-shadow: inset 0 3px 6px rgba(0,0,0,.45); }
.ej12-st { font-size: .8rem; font-weight: 700; color: #4a5d70; }
.ej12-pan { background: #f7f9fb; }
.ej12-bar { position: relative; height: 26px; background: #eef2f6; border: 1px solid #cfdae6; border-radius: 4px; overflow: hidden; }
.ej12-bar i { position: absolute; left: 0; top: 0; bottom: 0; background: #1a7f4b; }
.ej12-bar i.bad { background: #b42318; }
.ej12-bar b { position: absolute; top: 0; bottom: 0; width: 3px; background: #0b1f33; }
.ej12-scale { display: flex; justify-content: space-between; font-size: .74rem; color: #4a5d70; margin-top: 2px; }
.ej12-verdict { margin: 0; padding: 10px 12px; border-radius: 4px; font-weight: 600; font-size: .92rem; line-height: 1.5; color: #0b1f33; }
.ej12-verdict.ok { background: #effaf2; border-left: 5px solid #1a7f4b; }
.ej12-verdict.mid { background: #fff7ef; border-left: 5px solid #e0731a; }
.ej12-verdict.bad { background: #fdeceb; border-left: 5px solid #b42318; }
.ej12-faultbadge { fill: #b42318; font-weight: 700; }
.ej12-plant { background: #fff; border-radius: 4px; }
.ej12-flag { margin: 0; padding: 8px 12px; border-radius: 4px; font-size: .88rem; font-weight: 600; line-height: 1.45; background: #effaf2; border-left: 5px solid #1a7f4b; color: #0b1f33; }
.ej12-flag.warn { background: #fff7ef; border-left-color: #e0731a; }
.ej12-flag.bad { background: #fdeceb; border-left-color: #b42318; }
.ej12-grp[hidden] { display: none !important; }
.ej12-bbig { width: 100%; }
