/* Simulador "Monitor de fase y motor" (publicación 116). Prefijo ffs- */
.ffs { background: var(--card, #fff); color: var(--navy, #0b1f33); border: 1px solid var(--line, #cfdae6); border-radius: 8px; padding: 18px; margin: 26px 0; display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.ffs * { box-sizing: border-box; }
.ffs-head { display: flex; flex-direction: column; gap: 2px; }
.ffs-head strong { font-size: 1.1rem; color: var(--navy, #0b1f33); }
.ffs-head span { color: var(--muted, #4a5d70); font-size: .92rem; line-height: 1.5; }
.ffs-grid { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 4fr); grid-template-areas: "main side" "extra side" "expl side"; gap: 16px; align-items: start; align-content: start; grid-template-rows: min-content min-content min-content; }
.ffs-main { grid-area: main; } .ffs-side { grid-area: side; } .ffs-extra { grid-area: extra; } .ffs-expl-wrap { grid-area: expl; }
@media (max-width: 860px) { .ffs-grid { grid-template-columns: minmax(0, 1fr); grid-template-areas: "main" "side" "extra" "expl"; grid-template-rows: auto; } }
.ffs-main, .ffs-side, .ffs-extra, .ffs-expl-wrap { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.ffs-card { border: 1px solid var(--line-soft, #e1e8ef); border-radius: 6px; background: #fff; padding: 10px; min-width: 0; color: #0b1f33; }
.ffs-ct { font-size: .88rem; font-weight: 700; color: var(--navy, #0b1f33); margin-bottom: 6px; }
.ffs-card .ffs-ct { color: #0b1f33; }
.ffs svg { display: block; width: 100%; height: auto; max-width: 100%; font-family: inherit; }
.ffs-motor { max-width: 420px; margin: 0 auto; }
.ffs-legend { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: .8rem; color: #4a5d70; }
.ffs-legend li { display: inline-flex; align-items: center; gap: 5px; }
.ffs-legend i { display: inline-block; width: 14px; height: 14px; border-radius: 3px; }
.ffs-legend i.ln { width: 20px; height: 4px; border-radius: 2px; }
.ffs-legend i.dash { height: 0; background: none; border-top: 3px dashed; border-radius: 0; }
.ffs-legend i.dot { width: 14px; height: 14px; border-radius: 50%; } .ffs-legend i.dia { width: 12px; height: 12px; transform: rotate(45deg); border-radius: 2px; } .ffs-legend i.pole { width: 18px; height: 18px; border-radius: 50%; color: #fff; font-style: normal; font-weight: 700; font-size: .68rem; line-height: 18px; text-align: center; }
.ffs-legend i.dot { width: 14px; height: 14px; border-radius: 50%; } .ffs-legend i.dia { width: 12px; height: 12px; transform: rotate(45deg); border-radius: 2px; } .ffs-legend i.pole.n { background: #c0392b; } .ffs-legend i.dot { width: 14px; height: 14px; border-radius: 50%; } .ffs-legend i.dia { width: 12px; height: 12px; transform: rotate(45deg); border-radius: 2px; } .ffs-legend i.pole.s { background: #1e6bb8; margin-left: -8px; }
.ffs-status { padding: 10px 12px; border-radius: 4px; font-size: .92rem; font-weight: 600; line-height: 1.5; border-left: 4px solid #7d8fa2; background: #eef2f6; color: #0b1f33; }
.ffs-status.ok { background: #effaf2; border-color: #1a7f4b; color: #14532d; }
.ffs-status.warn { background: #fff6e0; border-color: #b7791f; color: #6b4b00; }
.ffs-status.bad { background: #fdecec; border-color: #b42318; color: #721c24; }
.ffs-btns { display: flex; flex-wrap: wrap; gap: 8px; }
.ffs button { font: inherit; font-weight: 600; font-size: .9rem; padding: 9px 14px; border-radius: 4px; border: 1px solid var(--navy, #0b1f33); background: var(--navy, #0b1f33); color: #fff; cursor: pointer; min-height: 40px; }
.ffs button.ghost { background: transparent; color: var(--navy, #0b1f33); }
.ffs button.warn { background: #b42318; border-color: #b42318; }
.ffs button:disabled { opacity: .45; cursor: not-allowed; }
.ffs button[hidden] { display: none; }
.ffs input:focus-visible, .ffs button:focus-visible, .ffs select:focus-visible { outline: 3px solid var(--accent, #e0731a); outline-offset: 2px; }
.ffs fieldset { border: 1px solid var(--line, #cfdae6); border-radius: 6px; margin: 0; padding: 6px 12px 8px; min-width: 0; }
.ffs legend { font-size: .85rem; font-weight: 700; color: var(--navy, #0b1f33); padding: 0 6px; }
.ffs-row { display: flex; flex-direction: column; gap: 2px; padding: 4px 0; }
.ffs-row label { font-size: .86rem; font-weight: 600; color: var(--navy, #0b1f33); }
.ffs-in { display: flex; align-items: center; gap: 10px; }
.ffs-in input[type=range] { flex: 1 1 auto; min-width: 0; height: 30px; accent-color: var(--accent, #e0731a); }
.ffs-in output { flex: 0 0 auto; min-width: 6.2em; 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); }
.ffs 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; }
.ffs-chk { display: flex; align-items: center; gap: 8px; font-size: .88rem; font-weight: 600; padding: 6px 0 2px; color: var(--navy, #0b1f33); }
.ffs-chk input { width: 18px; height: 18px; accent-color: var(--accent, #e0731a); }
.ffs-read { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 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; }
.ffs-read div { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.ffs-read div.wide { grid-column: 1 / -1; }
.ffs-read span { font-size: .74rem; color: #4a5d70; }
.ffs-read b { font-size: .92rem; color: #0b1f33; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.ffs-heat i { display: block; height: 10px; border-radius: 5px; background: linear-gradient(90deg, #b42318 var(--h, 0%), #e3e9f0 var(--h, 0%)); border: 1px solid #cfdae6; margin: 2px 0; }
.ffs-boxtxt { font-size: .82rem; line-height: 1.5; color: #4a5d70; margin-top: 4px; }
.ffs-boxtxt b { color: #0b1f33; } .ffs-boxtxt span { display: block; }
.ffs-expl { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.ffs-expl li { padding: 9px 12px; border-radius: 4px; border-left: 4px solid #2a6fb0; background: #eef5fc; color: #0b1f33; font-size: .9rem; line-height: 1.55; }
.ffs-expl li.ok { border-color: #1a7f4b; background: #effaf2; color: #14532d; }
.ffs-expl li.warn { border-color: #b7791f; background: #fff6e0; color: #6b4b00; }
.ffs-expl li.bad { border-color: #b42318; background: #fdecec; color: #721c24; }
@media (prefers-reduced-motion: reduce) { .ffs * { animation: none !important; transition: none !important; } }

.ffs-ph, .ffs-wf, .ffs-sc, .ffs-ch { background: #fff; border-radius: 4px; }
.ffs-ph { max-width: 420px; margin: 0 auto; }
.ffs-sc { max-width: 460px; margin: 0 auto; }
.ffs-wf, .ffs-ch { max-width: 460px; margin: 0 auto; }
.ffs-seqline { font-size: .84rem; font-weight: 700; text-align: center; color: #14532d; padding: 4px 6px; }
.ffs-seqline.bad { color: #b42318; }
.ffs-legend i { border-radius: 50%; }
.ffs-legend i.ffs-dash { width: 18px; height: 0; border-radius: 0; border-top: 3px dashed #9fb0c2; background: none; }
.ffs-legend i.ffs-tri { width: 18px; height: 0; border-radius: 0; border-top: 3px dashed #5b7ea3; background: none; }
.ffs-btns button.small { font-size: .8rem; padding: 7px 10px; min-height: 36px; }
.ffs-btns button.on { background: #b42318; border-color: #b42318; color: #fff; }
.ffs-note { font-size: .78rem; color: var(--muted, #4a5d70); line-height: 1.45; padding: 2px 2px 4px; }
.ffs-read { grid-template-columns: repeat(auto-fit, minmax(135px, 1fr)); }
.ffs-bar { display: grid; grid-template-columns: 22px minmax(0, 1fr) 58px; grid-template-areas: "n t b" ". e e"; gap: 2px 8px; align-items: center; padding: 4px 0; color: #0b1f33; }
.ffs-bn { grid-area: n; font-weight: 700; } .ffs-bar b { grid-area: b; text-align: right; font-variant-numeric: tabular-nums; font-size: .85rem; } .ffs-bar em { grid-area: e; font-style: normal; font-size: .74rem; color: #4a5d70; }
.ffs-bt { grid-area: t; position: relative; display: block; height: 14px; background: #e3e9f0; border-radius: 7px; overflow: hidden; border: 1px solid #cfdae6; }
.ffs-bt i { position: absolute; left: 0; top: 0; bottom: 0; background: #1a7f4b; transition: width .15s linear; }
.ffs-bt i.warn { background: #b7791f; } .ffs-bt i.bad { background: #b42318; }
.ffs-bt u { position: absolute; top: -1px; bottom: -1px; width: 2px; background: #0b1f33; }
.ffs-log { list-style: none; margin: 6px 0 0; padding: 0; display: flex; flex-direction: column; gap: 4px; font-size: .82rem; color: #0b1f33; }
.ffs-log li { padding: 5px 8px; border-left: 3px solid #7d8fa2; background: #f3f6f9; border-radius: 3px; line-height: 1.4; }
.ffs-log li.bad { border-color: #b42318; background: #fdecec; } .ffs-log li.warn { border-color: #b7791f; background: #fff6e0; } .ffs-log li.ok { border-color: #1a7f4b; background: #effaf2; }
.ffs-log b { font-variant-numeric: tabular-nums; margin-right: 4px; }
.ffs-pnote { font-size: .82rem; color: #4a5d70; line-height: 1.5; margin-bottom: 6px; }
.ffs .tbl-wrap { overflow-x: auto; margin: 6px 0 0; }
.ffs-tb { border-collapse: collapse; width: 100%; font-size: .8rem; color: #0b1f33; }
.ffs-tb th, .ffs-tb td { border: 1px solid #cfdae6; padding: 5px 7px; text-align: left; vertical-align: top; white-space: normal; background: #fff; color: #0b1f33; }
.ffs-tb th { background: #eef2f6; }
.ffs-tb tr.on td { background: #fff6e0; font-weight: 600; }
.ffs-expl-wrap .ffs-ct { color: var(--navy, #0b1f33); }
.ffs-expl li { text-align: left; }
.ffs-status { min-height: 2.8em; }
.ffs-side fieldset { background: transparent; }
.ffs-side legend { color: var(--navy, #0b1f33); }
.ffs-chk { color: var(--navy, #0b1f33); }
