/* Simulador "Mando de jog y marcha permanente" (Ejemplo 2, publicación 138). Prefijo ej2- */
.ej2 { background: #fff; color: #0b1f33; border: 1px solid #cfdae6; border-radius: 8px; padding: 16px; margin: 26px 0; display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.ej2 * { box-sizing: border-box; }
.ej2-head { display: flex; flex-direction: column; gap: 2px; }
.ej2-head strong { font-size: 1.1rem; color: #0b1f33; }
.ej2-head span { color: #4a5d70; font-size: .92rem; line-height: 1.5; }
.ej2 button { font: inherit; font-weight: 600; font-size: .92rem; padding: 9px 12px; border-radius: 4px; border: 1px solid #0b1f33; background: #0b1f33; color: #fff; cursor: pointer; min-height: 44px; line-height: 1.25; touch-action: manipulation; -webkit-user-select: none; user-select: none; }
.ej2 button.ghost { background: #fff; color: #0b1f33; }
.ej2 button:disabled { opacity: .45; cursor: not-allowed; }
.ej2 [hidden] { display: none !important; }
.ej2 button:focus-visible, .ej2 select:focus-visible, .ej2 input:focus-visible, .ej2 summary:focus-visible { outline: 3px solid #e0731a; outline-offset: 2px; }
.ej2-now { border: 1px solid #cfdae6; border-left: 5px solid #e0731a; border-radius: 4px; background: #fff7ef; color: #0b1f33; padding: 10px 14px; }
.ej2-ct { font-size: .78rem; font-weight: 700; color: #7a3d08; text-transform: uppercase; letter-spacing: .04em; margin-bottom: 4px; }
.ej2-now-main { margin: 0; font-size: 1rem; line-height: 1.55; font-weight: 600; color: #0b1f33; min-height: 4.6em; }
.ej2-now-last { margin: 6px 0 0; font-size: .85rem; color: #4a5d70; min-height: 1.3em; }
.ej2-demo { display: flex; flex-direction: column; gap: 8px; }
.ej2-btns { display: flex; flex-wrap: wrap; gap: 8px; }
.ej2-demo-b, .ej2-next { background: #1a7f4b !important; border-color: #1a7f4b !important; color: #fff !important; }
.ej2-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; }
.ej2-hl { outline: 4px solid #e0731a; outline-offset: 3px; border-radius: 4px; animation: ej2-pulse 1.1s ease-in-out infinite; }
@keyframes ej2-pulse { 50% { outline-color: #f6c28b; } }
@media (prefers-reduced-motion: reduce) { .ej2-hl { animation: none; } }
.ej2-grid { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 6fr); gap: 16px; align-items: start; }
@media (max-width: 860px) { .ej2-grid { grid-template-columns: minmax(0, 1fr); } }
.ej2-left, .ej2-right { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.ej2-grp { border: 1px solid #cfdae6; border-radius: 6px; padding: 10px 12px; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.ej2-gt { font-size: .86rem; font-weight: 700; color: #0b1f33; }
.ej2-row { display: flex; flex-direction: column; gap: 3px; }
.ej2-row label { font-size: .86rem; font-weight: 600; }
.ej2 select { font: inherit; font-size: .9rem; padding: 7px 8px; border: 1px solid #cfdae6; border-radius: 4px; background: #fff; color: #0b1f33; width: 100%; max-width: 100%; min-height: 42px; }
.ej2-seg { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.ej2-seg button { background: #eef2f6; color: #0b1f33; border-color: #cfdae6; font-size: .84rem; }
.ej2-seg button[aria-pressed="true"] { background: #fff3e4; border: 2px solid #e0731a; }
.ej2-push { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 8px; }
.ej2-go { background: #1a7f4b !important; border-color: #1a7f4b !important; }
.ej2-jog { background: #222 !important; border-color: #222 !important; }
.ej2-stop { background: #b42318 !important; border-color: #b42318 !important; }
.ej2-push button.on { box-shadow: inset 0 0 0 3px #f6c28b; transform: translateY(1px); }
.ej2-hint { margin: 0; font-size: .82rem; line-height: 1.5; color: #4a5d70; }
.ej2-adv { border: 1px solid #cfdae6; border-radius: 6px; padding: 8px 12px; }
.ej2-adv summary { cursor: pointer; font-weight: 700; font-size: .88rem; min-height: 34px; display: flex; align-items: center; }
.ej2-adv > div { display: flex; flex-direction: column; gap: 10px; margin-top: 8px; }
.ej2-chk { display: flex; align-items: flex-start; gap: 8px; font-size: .86rem; font-weight: 600; line-height: 1.4; }
.ej2-chk input { width: 18px; height: 18px; margin-top: 2px; accent-color: #e0731a; flex: 0 0 auto; }
.ej2-card { border: 1px solid #e1e8ef; border-radius: 6px; background: #fff; padding: 10px; min-width: 0; }
.ej2-card .ej2-ct { color: #0b1f33; text-transform: none; font-size: .88rem; letter-spacing: 0; }
.ej2 svg { display: block; width: 100%; height: auto; max-width: 100%; font-family: inherit; }
.ej2-stage { max-width: 520px; margin: 0 auto; }
.ej2-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 8px; }
.ej2-tile { border: 2px solid #cfdae6; border-radius: 6px; padding: 8px 10px; background: #f3f6f9; color: #0b1f33; display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.ej2-tile b { font-size: .74rem; font-weight: 700; color: #4a5d70; text-transform: uppercase; letter-spacing: .03em; }
.ej2-tile span { font-size: 1.05rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.ej2-tile.on { border-color: #1a7f4b; background: #eaf7f0; }
.ej2-tile.bad { border-color: #b42318; background: #fdeceb; }
.ej2-tile.warn { border-color: #b7791f; background: #fff6e0; }
