/* Simulador "Estrella-triángulo automático con temporizador" (Ejemplo 6, publicación 142). Prefijo ej6- */
.ej6 { 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; }
.ej6 * { box-sizing: border-box; }
.ej6-head { display: flex; flex-direction: column; gap: 2px; }
.ej6-head strong { font-size: 1.1rem; color: #0b1f33; }
.ej6-head span { color: #4a5d70; font-size: .92rem; line-height: 1.5; }
.ej6 button, .ej6 select { font: inherit; font-weight: 600; font-size: .9rem; padding: 9px 12px; border-radius: 4px; border: 1px solid #0b1f33; background: #0b1f33; color: #fff; cursor: pointer; min-height: 42px; line-height: 1.25; }
.ej6 select { background: #fff; color: #0b1f33; font-weight: 500; }
.ej6 button.ghost { background: transparent; color: #0b1f33; }
.ej6 button:disabled { opacity: .45; cursor: not-allowed; }
.ej6 [hidden] { display: none !important; }
.ej6 button:focus-visible, .ej6 input:focus-visible, .ej6 select:focus-visible, .ej6 summary:focus-visible { outline: 3px solid #e0731a; outline-offset: 2px; }
.ej6-esc { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
@media (max-width: 760px) { .ej6-esc { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.ej6-esc button { background: #eef2f6; color: #0b1f33; border-color: #cfdae6; font-size: .84rem; }
.ej6-esc button[aria-pressed="true"] { background: #0b1f33; color: #fff; border-color: #0b1f33; }
.ej6-now { border: 1px solid #cfdae6; border-left: 5px solid #e0731a; border-radius: 4px; background: #fff7ef; color: #0b1f33; padding: 10px 14px; }
.ej6-ct { font-weight: 700; color: #7a3d08; text-transform: uppercase; letter-spacing: .04em; font-size: .78rem; margin-bottom: 6px; }
.ej6-now-main { margin: 0; font-size: 1rem; line-height: 1.55; font-weight: 600; color: #0b1f33; min-height: 3.1em; }
.ej6-now-last { margin: 6px 0 0; font-size: .84rem; color: #4a5d70; min-height: 1.2em; }
.ej6-demo { display: flex; flex-direction: column; gap: 8px; }
.ej6-btns { display: flex; flex-wrap: wrap; gap: 8px; }
.ej6-demo-b, .ej6-next { background: #1a7f4b !important; border-color: #1a7f4b !important; color: #fff !important; }
.ej6-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; }
.ej6-hl { outline: 4px solid #e0731a; outline-offset: 3px; border-radius: 4px; animation: ej6-pulse 1.1s ease-in-out infinite; }
svg .ej6-hl { outline: none; filter: drop-shadow(0 0 5px #e0731a) drop-shadow(0 0 2px #e0731a); }
@keyframes ej6-pulse { 50% { outline-color: #f6c28b; } }
@media (prefers-reduced-motion: reduce) { .ej6-hl { animation: none; } }
.ej6-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; align-items: start; }
.ej6-fig { background: #f4f9ff; border: 1px solid #cfdae6; border-radius: 6px; padding: 6px; min-width: 0; }
.ej6-fig svg { display: block; width: 100%; height: auto; }
.ej6-panel { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; min-width: 0; }
@media (min-width: 720px) { .ej6-panel { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } .ej6-pbs, .ej6-rearm { grid-column: 1 / -1; } .ej6-chart { align-self: stretch; } }
.ej6-pbs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.ej6-pbs button { min-height: 58px; font-size: .95rem; }
.ej6-s0 { background: #b42318 !important; border-color: #b42318 !important; }
.ej6-s1 { background: #1a7f4b !important; border-color: #1a7f4b !important; }
.ej6-s2 { background: #2a6fb0 !important; border-color: #2a6fb0 !important; }
.ej6-rearm { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.ej6-rearm button { background: #eef2f6; color: #0b1f33; border-color: #cfdae6; font-size: .82rem; }
.ej6-read { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.ej6-tile { border: 1px solid #cfdae6; border-radius: 6px; padding: 8px 10px; background: #eef2f6; color: #0b1f33; min-width: 0; }
.ej6-tile small { display: block; color: #4a5d70; font-size: .74rem; text-transform: uppercase; letter-spacing: .03em; }
.ej6-tile b { font-size: 1.05rem; overflow-wrap: anywhere; }
.ej6-tile.on { background: #fff7ef; border-color: #e0731a; }
.ej6-tile.bad { background: #fdecea; border-color: #b42318; color: #b42318; }
.ej6-chart { background: #fff; border: 1px solid #cfdae6; border-radius: 6px; padding: 4px; }
.ej6-chart svg { display: block; width: 100%; height: auto; }
.ej6-adv { border: 1px solid #cfdae6; border-radius: 6px; padding: 8px 12px; background: #fff; }
.ej6-adv summary { cursor: pointer; font-weight: 700; color: #0b1f33; min-height: 32px; }
.ej6-adv-in { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 16px; margin-top: 10px; }
@media (max-width: 700px) { .ej6-adv-in { grid-template-columns: minmax(0, 1fr); } }
.ej6-adv label { display: flex; align-items: center; gap: 8px; font-size: .92rem; color: #0b1f33; line-height: 1.35; min-height: 32px; }
.ej6-adv label.col { flex-direction: column; align-items: stretch; gap: 4px; }
.ej6-adv input[type=checkbox] { width: 20px; height: 20px; flex: none; }
.ej6-adv select { min-height: 38px; width: 100%; }
.ej6-adv p { grid-column: 1 / -1; margin: 0; font-size: .85rem; color: #4a5d70; }
.ej6-fig { overflow-x: auto; }
.ej6-fig svg { min-width: 620px; }

.ej6-ctl { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 16px; border: 1px solid #cfdae6; border-radius: 6px; padding: 10px 12px; background: #fff; }
@media (max-width: 700px) { .ej6-ctl { grid-template-columns: minmax(0, 1fr); } }
.ej6-ctl label { display: flex; flex-direction: column; gap: 4px; font-size: .9rem; font-weight: 600; color: #0b1f33; }
.ej6-ctl input[type=range] { width: 100%; min-height: 34px; accent-color: #e0731a; }
.ej6-ctl select { width: 100%; min-height: 40px; }
.ej6-read { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.ej6-fig svg { min-width: 560px; }
.ej6-ctl { align-self: start; }
