/* Simulador de la línea neumática (publicación 65). Prefijo: linea / lineasim */
.lineasim { --l-ink: var(--navy, #0b1f33); --l-mut: var(--muted, #4a5d70); --l-line: var(--line, #cfdae6); --l-acc: var(--accent, #e0731a); --l-bg: var(--card, #fff); --l-soft: #f1f5f9;
  background: var(--l-bg); color: var(--l-ink); border: 1px solid var(--l-line); border-radius: 8px; padding: 18px; margin: 26px 0; display: flex; flex-direction: column; gap: 14px; min-width: 0; font-size: 16px; line-height: 1.5; }
.lineasim * { box-sizing: border-box; }
.lineasim [hidden] { display: none !important; }
.linea-head { display: flex; flex-direction: column; gap: 2px; }
.linea-head strong { font-size: 1.12rem; }
.linea-head span { color: var(--l-mut); font-size: .92rem; }
.linea-bar, .linea-chips, .linea-presets { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.linea-chips > span, .linea-presets > span { font-size: .85rem; font-weight: 700; }
.lineasim button { font: inherit; font-weight: 600; font-size: .9rem; padding: 8px 13px; border-radius: 4px; border: 1px solid #0b1f33; background: #0b1f33; color: #fff; cursor: pointer; min-height: 40px; }
.lineasim button.ghost { background: transparent; color: var(--l-ink); }
.lineasim button.ghost.on, .lineasim button.lc-chip[aria-pressed="true"] { background: var(--l-acc); border-color: var(--l-acc); color: #fff; }
.lineasim button.lc-chip { min-height: 34px; padding: 4px 10px; font-size: .82rem; }
.lineasim button:focus-visible, .lineasim input:focus-visible, .lineasim select:focus-visible, .lineasim summary:focus-visible, .lineasim .linea-comp:focus-visible { outline: 3px solid var(--l-acc); outline-offset: 2px; }
.linea-sel { font-size: .85rem; display: inline-flex; gap: 6px; align-items: center; }
.lineasim select { font: inherit; font-size: .9rem; padding: 7px 8px; border: 1px solid var(--l-line); border-radius: 4px; background: #fff; color: #0b1f33; max-width: 100%; min-width: 0; }
.linea-stage { border: 1px solid var(--l-line); border-radius: 6px; background: #f7fafd; overflow: hidden; }
.linea-svg { display: block; width: 100%; height: auto; max-width: 100%; }
.linea-pipe { fill: none; stroke: #dbe7f5; stroke-width: 8; stroke-linejoin: round; stroke-linecap: butt; }
.linea-flow { fill: none; stroke: #1d6fd8; stroke-width: 4; stroke-dasharray: 8 7; stroke-linejoin: round; }
.linea-wetpath { fill: none; stroke: #4d9fcf; stroke-width: 6; stroke-dasharray: 1 26; stroke-linecap: round; opacity: 0; pointer-events: none; }
.linea-svg .ls { fill: #fff; stroke: #0b1f33; stroke-width: 2; stroke-linejoin: round; }
.linea-symsvg .ls { fill: #fff; stroke: #0b1f33; stroke-width: 2; stroke-linejoin: round; }
.linea-svg .ls.on { fill: #cfe3fb; }
.linea-symsvg .ls.on { fill: #cfe3fb; }
.linea-svg .ls.dash { stroke-dasharray: 5 4; fill: none; }
.linea-symsvg .ls.dash { stroke-dasharray: 5 4; fill: none; }
.linea-svg .ls.dashdot { stroke-dasharray: 10 4 2 4; fill: none; stroke: #4a5d70; stroke-width: 1.5; }
.linea-symsvg .ls.dashdot { stroke-dasharray: 10 4 2 4; fill: none; stroke: #4a5d70; stroke-width: 1.5; }
.linea-svg .ls.thick { fill: none; stroke-width: 3; }
.linea-symsvg .ls.thick { fill: none; stroke-width: 3; }
.linea-svg path.ls, .linea-svg path.ls[d*="M0 45"] { fill: none; }
.linea-symsvg path.ls, .linea-symsvg path.ls[d*="M0 45"] { fill: none; }
.linea-svg .lsf { fill: #0b1f33; stroke: #0b1f33; stroke-width: 1; }
.linea-symsvg .lsf { fill: #0b1f33; stroke: #0b1f33; stroke-width: 1; }
.linea-svg .lsf2 { fill: #0b1f33; stroke: #0b1f33; }
.linea-symsvg .lsf2 { fill: #0b1f33; stroke: #0b1f33; }
.linea-svg .lt { font: 700 13px system-ui, sans-serif; fill: #0b1f33; }
.linea-symsvg .lt { font: 700 13px system-ui, sans-serif; fill: #0b1f33; }
.linea-svg .lt.sm { font-size: 10px; }
.linea-symsvg .lt.sm { font-size: 10px; }
.linea-lbl { font: 600 12px system-ui, -apple-system, sans-serif; fill: #4a5d70; }
.linea-lbl.b { fill: #0b1f33; font-weight: 700; }
.linea-lbl.warn { fill: #b42318; font-weight: 700; }
.linea-comp { cursor: pointer; }
.linea-comp:hover .ls, .linea-comp:focus .ls { stroke: #e0731a; }
.linea-comp:focus { outline: none; }
.linea-comp:focus-visible { outline: none; }
.linea-comp:focus-visible .ls { stroke: #e0731a; stroke-width: 3; }
.linea-tick { stroke: #7a8fa3; stroke-width: 1.2; fill: none; }
.linea-gg { cursor: pointer; }
.linea-gg rect { fill: #fff; stroke: #0b1f33; stroke-width: 1.5; }
.linea-gg .gk { font: 700 11px system-ui, sans-serif; fill: #4a5d70; }
.linea-gg .gv { font: 700 13px ui-monospace, Menlo, Consolas, monospace; fill: #0b1f33; }
.linea-gg:hover rect { stroke: #e0731a; }
.linea-puff circle { fill: #b7c3cf; opacity: .8; animation: linea-puff 1.2s ease-out infinite; }
.linea-puff circle:nth-child(2) { animation-delay: .3s; } .linea-puff circle:nth-child(3) { animation-delay: .6s; }
@keyframes linea-puff { 0% { opacity: .9; transform: translateY(8px); } 100% { opacity: 0; transform: translateY(-10px); } }
.linea-live { background: #fff7ef; border: 1px solid #f0d3b5; border-left: 4px solid var(--l-acc); border-radius: 4px; padding: 10px 12px; font-size: .92rem; }
.linea-live p { margin: 4px 0 6px; }
.linea-msgs { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.linea-msgs li { padding: 7px 10px; border-radius: 4px; font-size: .86rem; line-height: 1.45; background: var(--l-soft); border-left: 4px solid #7a8fa3; }
.linea-msgs li.lm-err { background: #fdecec; color: #721c24; border-left-color: #b42318; font-weight: 600; }
.linea-msgs li.lm-warn { background: #fff6e0; color: #6b4b00; border-left-color: #b7791f; }
.linea-msgs li.lm-ok { background: #e7f6ec; color: #155724; border-left-color: #1a7f4b; }
.linea-card { display: grid; grid-template-columns: 170px minmax(0, 1fr); gap: 14px; border: 1px solid var(--l-line); border-radius: 6px; padding: 12px; background: var(--l-soft); }
.linea-card:focus { outline: 3px solid var(--l-acc); }
@media (max-width: 560px) { .linea-card { grid-template-columns: minmax(0, 1fr); } }
.lc-sym { display: flex; flex-direction: column; align-items: center; gap: 4px; background: #fff; border: 1px solid var(--l-line); border-radius: 6px; padding: 8px; font-size: .72rem; color: var(--l-mut); text-align: center; }
.linea-symsvg { width: 100%; max-width: 280px; height: auto; }
.lc-txt h4 { margin: 0 0 6px; font-size: 1.02rem; }
.lc-txt p { margin: 0 0 6px; font-size: .88rem; }
.lc-now { background: #fff; border-left: 3px solid #2a6fb0; padding: 6px 8px; }
.lc-txt a { color: #1d5fb8; font-weight: 600; }
.linea-free { display: flex; flex-direction: column; gap: 10px; }
.linea-ctl { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 10px; align-items: start; }
.linea-ctl details, .linea-diag details { border: 1px solid var(--l-line); border-radius: 6px; padding: 6px 12px 10px; background: #fff; }
.linea-ctl summary, .linea-diag summary { cursor: pointer; font-weight: 700; font-size: .92rem; padding: 6px 0; }
.linea-row { display: flex; flex-direction: column; gap: 2px; padding: 5px 0; min-width: 0; }
.linea-row label { font-size: .86rem; font-weight: 600; }
.linea-row.chk label { display: flex; gap: 8px; align-items: center; }
.linea-row input[type=checkbox] { width: 20px; height: 20px; accent-color: var(--l-acc); }
.linea-in { display: flex; align-items: center; gap: 10px; min-width: 0; }
.linea-in input[type=range] { flex: 1 1 auto; min-width: 0; height: 30px; accent-color: var(--l-acc); }
.linea-in output { flex: 0 0 auto; min-width: 6.2em; text-align: right; font: 600 .84rem ui-monospace, Menlo, Consolas, monospace; }
.linea-h { margin: 6px 0 0; font-size: 1rem; }
.linea-tw { overflow-x: auto; border: 1px solid var(--l-line); border-radius: 6px; }
.linea-tab { width: 100%; border-collapse: collapse; font-size: .84rem; min-width: 0; }
.linea-tab th, .linea-tab td { padding: 5px 8px; border-bottom: 1px solid #e1e8ef; text-align: left; vertical-align: top; white-space: normal; }
.linea-tab th { background: var(--l-soft); font-size: .78rem; }
.linea-tab td.num { text-align: right; font-family: ui-monospace, Menlo, Consolas, monospace; white-space: nowrap; }
@media (max-width: 520px) { .linea-tab { font-size: .76rem; } .linea-tab th, .linea-tab td { padding: 4px 5px; } }
.linea-read { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 8px; }
.linea-read .rc { border: 1px solid var(--l-line); border-radius: 6px; padding: 8px 10px; background: var(--l-soft); display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.linea-read .rc span { font-size: .76rem; color: var(--l-mut); }
.linea-read .rc b { font: 700 1.08rem ui-monospace, Menlo, Consolas, monospace; overflow-wrap: anywhere; }
.linea-read .rc i { font-style: normal; font-size: .74rem; color: var(--l-mut); overflow-wrap: anywhere; }
.linea-read .rc.warn { background: #fff6e0; border-color: #e3c36a; }
.linea-read .rc.bad { background: #fdecec; border-color: #e1a1a1; }
.linea-wf { display: flex; flex-direction: column; gap: 4px; }
.wf-row { display: grid; grid-template-columns: minmax(0, 15em) minmax(0, 1fr) 6.2em; gap: 8px; align-items: center; font-size: .82rem; }
.wf-row .wf-l { overflow-wrap: anywhere; }
.wf-row.tot { font-weight: 700; }
.wf-tr { position: relative; height: 16px; background: #e8eef4; border-radius: 4px; overflow: hidden; }
.wf-b { position: absolute; top: 0; bottom: 0; background: #1a7f4b; border-radius: 3px; }
.wf-b.navy { background: #0b1f33; } .wf-b.grn { background: #1a7f4b; } .wf-b.ok { background: #5aa469; } .wf-b.warn { background: #d99a1d; } .wf-b.bad { background: #c0392b; } .wf-b.reg { background: #7fa3c9; }
.wf-v { text-align: right; font: 600 .8rem ui-monospace, Menlo, Consolas, monospace; white-space: nowrap; }
@media (max-width: 520px) { .wf-row { grid-template-columns: minmax(0, 1fr) 6em; } .wf-row .wf-tr { grid-column: 1 / -1; order: 3; } }
.linea-note { margin: 0; font-size: .8rem; color: var(--l-mut); line-height: 1.5; }
.linea-diag { border: 1px solid #e3c36a; background: #fffbef; border-radius: 6px; padding: 12px; display: flex; flex-direction: column; gap: 8px; }
.linea-diag h4 { margin: 0; }
.linea-diag p { margin: 0; font-size: .9rem; }
.linea-diag ul { margin: 6px 0 0; padding-left: 20px; font-size: .86rem; }
.ld-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.ld-row label { font-weight: 600; font-size: .88rem; }
.ld-row select { flex: 1 1 220px; }
.ld-fb { min-height: 1.4em; font-weight: 600; }
@media (prefers-reduced-motion: reduce) { .lineasim * { animation: none !important; transition: none !important; } }
@media (max-width: 700px) { .linea-stage { overflow-x: auto; } .linea-stage .linea-svg { min-width: 640px; } }
