/* Laboratorio de magnitudes «mag-lab» (prefijo ml- / .mlab). Colores fijos legibles. */
.mlab { --ml-navy: var(--navy, #0b1f33); --ml-line: var(--line, #cfdae6); --ml-acc: var(--accent, #e0731a);
  background: var(--card, #fff); color: #0b1f33; border: 1px solid var(--ml-line); border-radius: 8px; padding: 16px; margin: 26px 0; display: flex; flex-direction: column; gap: 12px; min-width: 0; font-size: 16px; line-height: 1.5; }
.mlab *, .mlab *::before, .mlab *::after { box-sizing: border-box; }
.mlab [hidden] { display: none !important; }
.ml-head { display: flex; flex-direction: column; gap: 2px; }
.ml-head strong { font-size: 1.15rem; }
.ml-head span, .ml-desc, .ml-foot { color: #4a5d70; font-size: .92rem; margin: 0; }
.ml-foot { font-size: .8rem; }
.ml-tabs { display: flex; flex-wrap: wrap; gap: 6px; }
.ml-tab { font: inherit; font-size: .88rem; font-weight: 700; min-height: 42px; padding: 6px 12px; border: 1px solid var(--ml-line); border-radius: 6px; background: #f3f6f9; color: #0b1f33; cursor: pointer; }
.ml-tab[aria-selected="true"] { background: #0b1f33; border-color: #0b1f33; color: #fff; }
.ml-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; }
.ml-col { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
@media (max-width: 760px) { .ml-grid { grid-template-columns: minmax(0, 1fr); } .mlab { padding: 12px; } }
.ml-fld { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.ml-lab { font-size: .84rem; font-weight: 700; color: #0b1f33; }
.ml-frow { display: flex; align-items: center; gap: 8px; min-width: 0; }
.ml-rng { flex: 1 1 auto; min-width: 0; min-height: 40px; accent-color: #e0731a; }
.ml-num { width: 84px; flex: 0 0 auto; font: inherit; font-size: .92rem; min-height: 40px; padding: 4px 6px; border: 1px solid var(--ml-line); border-radius: 4px; background: #fff; color: #0b1f33; }
.ml-unit { font-size: .82rem; color: #4a5d70; min-width: 36px; }
.ml-sel { font: inherit; font-size: .9rem; min-height: 42px; padding: 6px 8px; border: 1px solid var(--ml-line); border-radius: 4px; background: #fff; color: #0b1f33; max-width: 100%; }
.ml-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.ml-chip, .ml-btn { font: inherit; font-size: .84rem; font-weight: 600; min-height: 40px; padding: 4px 12px; border: 1px solid var(--ml-line); border-radius: 999px; background: #f3f6f9; color: #0b1f33; cursor: pointer; }
.ml-btn { border-radius: 6px; background: #0b1f33; border-color: #0b1f33; color: #fff; }
.ml-btn2 { background: #f3f6f9; color: #0b1f33; border-color: #9fb4c9; }
.ml-btn2[aria-pressed="true"] { background: #fdf0e3; border-color: #e0731a; }
.ml-seg { display: flex; flex-wrap: wrap; }
.ml-seg button { font: inherit; font-size: .84rem; font-weight: 600; min-height: 40px; padding: 4px 12px; border: 1px solid var(--ml-line); background: #f3f6f9; color: #0b1f33; cursor: pointer; }
.ml-seg button:first-child { border-radius: 4px 0 0 4px; } .ml-seg button:last-child { border-radius: 0 4px 4px 0; }
.ml-seg button + button { border-left: 0; }
.ml-seg button[aria-pressed="true"] { background: #0b1f33; border-color: #0b1f33; color: #fff; }
.mlab button:focus-visible, .mlab input:focus-visible, .mlab select:focus-visible { outline: 3px solid var(--ml-acc); outline-offset: 2px; }
.ml-mrow { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.ml-fig { background: #f7fafc; border: 1px solid var(--ml-line); border-radius: 6px; padding: 8px; min-width: 0; }
.ml-svg { display: block; width: 100%; height: auto; max-height: 300px; }
.ml-t { font: 600 12px Arial, Helvetica, sans-serif; fill: #0b1f33; }
.ml-big { font-size: 20px; font-weight: 700; } .ml-huge { font-size: 46px; font-weight: 700; fill: #0b1f33; }
.ml-q { fill: #b42318; } .ml-red { fill: #b42318; } .ml-org { fill: #b4560b; } .ml-blue { fill: #1f5a96; } .ml-grn { fill: #14663c; }
.ml-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(135px, 1fr)); gap: 8px; }
.ml-stat { background: #f3f6f9; border: 1px solid var(--ml-line); border-radius: 6px; padding: 6px 10px; display: flex; flex-direction: column; min-width: 0; }
.ml-sl { font-size: .74rem; color: #4a5d70; } .ml-sv { font-size: 1.02rem; overflow-wrap: anywhere; }
.ml-note { font-size: .9rem; padding: 10px 12px; border-radius: 6px; border: 1px solid var(--ml-line); background: #f7fafc; color: #0b1f33; }
.ml-note:empty { display: none; }
.ml-warn.ok { background: #e7f6ec; border-color: #7bc596; color: #14532d; }
.ml-warn.mid { background: #fdf3dc; border-color: #e6b94f; color: #6b4a06; }
.ml-warn.bad { background: #fdeceb; border-color: #e07a72; color: #7a1a12; font-weight: 600; }
.ml-med { border: 1px dashed #9fb4c9; border-radius: 6px; padding: 10px; display: flex; flex-direction: column; gap: 8px; }
.ml-cards { display: grid; gap: 8px; }
.ml-card { border: 2px solid var(--ml-line); border-left: 6px solid var(--mlc, #0b1f33); border-radius: 6px; padding: 8px 10px; display: flex; flex-direction: column; gap: 6px; background: #fff; }
.ml-card.ml-known { background: #f7fafc; }
.ml-ctog { font: inherit; font-size: .8rem; font-weight: 700; text-align: left; min-height: 40px; padding: 4px 8px; border: 1px solid var(--ml-line); border-radius: 4px; background: #f3f6f9; color: #0b1f33; cursor: pointer; }
.ml-cres { font-size: 1.2rem; font-weight: 700; color: #0b1f33; }
.ml-lcd { background: #cfe3d1; color: #0d2410; font: 700 2rem/1.2 "Courier New", monospace; text-align: center; padding: 10px; border: 3px solid #0b1f33; border-radius: 8px; min-height: 3.2rem; overflow-wrap: anywhere; }
.ml-lcdsub { font-size: .78rem; color: #4a5d70; text-align: center; }
.ml-ctl { display: flex; flex-direction: column; gap: 8px; }
@media (prefers-reduced-motion: reduce) { .mlab * { animation: none !important; transition: none !important; } }
