/* Simulador de engranajes rectos */
.egsim { background: var(--card, #fff); border: 1px solid var(--line, #cfdae6); border-radius: 8px; padding: 18px; margin: 26px 0; display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.egsim * { box-sizing: border-box; }
.eg-head { display: flex; flex-direction: column; gap: 2px; }
.eg-head strong { font-size: 1.1rem; color: var(--navy, #0b1f33); }
.eg-head span { color: var(--muted, #4a5d70); font-size: .92rem; line-height: 1.5; }
.eg-ctl { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.eg-f { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.eg-f.eg-wide { grid-column: 1 / -1; }
.eg-f label { font-size: .85rem; font-weight: 600; color: var(--navy, #0b1f33); }
.egsim input[type=number], .egsim select { font: inherit; font-size: .95rem; padding: 8px 10px; border: 1px solid var(--line, #cfdae6); border-radius: 4px; background: #fff; color: var(--navy, #0b1f33); width: 100%; min-width: 0; }
.egsim input.bad { border-color: #b91c1c; background: #fdf3f3; }
.eg-rr { display: flex; gap: 10px; align-items: center; }
.eg-rr input[type=number] { width: 6.5em; flex: none; }
.eg-rr input[type=range] { flex: 1 1 auto; min-width: 0; accent-color: var(--accent, #e0731a); height: 28px; }
.eg-bar { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; }
.eg-b { font: inherit; font-weight: 600; font-size: .92rem; padding: 9px 14px; border-radius: 4px; border: 1px solid var(--navy, #0b1f33); background: var(--navy, #0b1f33); color: #fff; cursor: pointer; }
.eg-b.ghost { background: transparent; color: var(--navy, #0b1f33); }
.eg-chk { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: .88rem; color: var(--navy, #0b1f33); }
.eg-chk label { display: inline-flex; align-items: center; gap: 4px; cursor: pointer; }
.egsim button:focus-visible, .egsim input:focus-visible, .egsim select:focus-visible, .eg-tab:focus-visible { outline: 3px solid var(--accent, #e0731a); outline-offset: 2px; }
.eg-cv { display: block; max-width: 100%; border: 1px solid var(--line-soft, #e1e8ef); border-radius: 6px; background: #fff; }
.eg-note { font-size: .82rem; color: var(--muted, #4a5d70); margin: 0; line-height: 1.5; }
.eg-msgs { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.eg-msg { padding: 8px 10px; border-radius: 4px; font-size: .88rem; line-height: 1.45; background: #f3f6f9; color: var(--navy, #0b1f33); }
.eg-msg.error { background: #fdecec; color: #721c24; font-weight: 600; }
.eg-msg.warn { background: #fff6e0; color: #6b4b00; }
.eg-msg.ok { background: #effaf2; color: #155724; }
.eg-tab { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.eg-t { width: 100%; border-collapse: collapse; font-size: .88rem; background: #fff; border: 1px solid var(--line, #cfdae6); }
.eg-t th, .eg-t td { padding: 7px 9px; border-bottom: 1px solid #e6ecf3; text-align: right; font-variant-numeric: tabular-nums; }
.eg-t thead th { background: var(--navy, #0b1f33); color: #fff; font-weight: 600; }
.eg-t th[scope=row] { text-align: left; font-weight: 600; color: var(--navy, #0b1f33); }
.eg-dl { margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 6px 14px; }
.eg-dl div { display: flex; justify-content: space-between; gap: 8px; border-bottom: 1px dashed var(--line, #cfdae6); padding: 4px 0; font-size: .88rem; }
.eg-dl dt { color: var(--muted, #4a5d70); } .eg-dl dd { margin: 0; font-weight: 700; color: var(--navy, #0b1f33); font-variant-numeric: tabular-nums; white-space: nowrap; }
@media (max-width: 520px) { .egsim { padding: 12px; } .eg-t { font-size: .8rem; } .eg-t th, .eg-t td { padding: 6px 5px; } }

.eg-legend { display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: .8rem; color: var(--muted, #4a5d70); margin: 0; }
.eg-legend span { display: inline-flex; align-items: center; gap: 6px; }
.eg-legend i { display: inline-block; width: 22px; height: 0; border-top: 2px solid; }
.eg-legend .lg-pc { border-top: 2px dashed #e0731a; } .eg-legend .lg-bc { border-top: 2px dotted #2a6fb0; } .eg-legend .lg-loa { border-top: 2px solid #0b1f33; opacity: .6; }
.eg-legend .lg-zone { border-top: 5px solid #e0731a; border-radius: 3px; } .eg-legend .lg-dot { width: 9px; height: 9px; border: 2px solid #e0731a; border-radius: 50%; background: #fff; }
.eg-t thead th:first-child { text-align: left; }
