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