/* Simulador del funcionamiento del cilindro neumático — prefijo cfn */
.cfn { background: var(--card, #fff); color: #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; font-size: 16px; }
.cfn * { box-sizing: border-box; }
.cfn-head { display: flex; flex-direction: column; gap: 2px; }
.cfn-head strong { font-size: 1.1rem; color: var(--navy, #0b1f33); }
.cfn-head span { color: var(--muted, #4a5d70); font-size: .92rem; line-height: 1.5; }
.cfn-tabs { display: flex; flex-wrap: wrap; gap: 6px; }
.cfn-tab { font: inherit; font-size: .86rem; font-weight: 600; padding: 8px 12px; min-height: 40px; border: 1px solid var(--line, #cfdae6); border-radius: 6px; background: #f3f6f9; color: #0b1f33; cursor: pointer; }
.cfn-tab.on { background: #0b1f33; color: #fff; border-color: #0b1f33; }
.cfn-princ { display: grid; grid-template-columns: 210px minmax(0, 1fr); gap: 14px; align-items: center; padding: 10px 12px; border-left: 4px solid var(--accent, #e0731a); background: #fff7ef; border-radius: 4px; }
@media (max-width: 640px) { .cfn-princ { grid-template-columns: minmax(0, 1fr); } .cfn-symbox { max-width: 260px; } }
.cfn-sym { width: 100%; height: auto; display: block; }
.cfn-pt p { margin: 0 0 4px; font-size: .92rem; line-height: 1.55; color: #0b1f33; }
.cfn-pt p:last-child { margin: 0; }
.cfn-pp { font-size: .84rem !important; color: #4a5d70 !important; }
.cfn-stagecard { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.cfn-cap { font-size: .88rem; color: #0b1f33; line-height: 1.5; }
.cfn-lg { display: inline-block; padding: 1px 8px; border-radius: 10px; font-size: .78rem; font-weight: 700; }
.cfn-lg.b { background: #cfe3f7; color: #0b4a8a; }
.cfn-lg.o { background: #fbdcc0; color: #8a3f05; }
.cfn-view { width: 100%; min-width: 0; border: 1px solid var(--line, #cfdae6); border-radius: 6px; background: #f3f6fa; overflow: hidden; }
.cfn-svg { display: block; width: 100%; height: auto; max-width: 100%; }
.cfn-status { min-height: 2.9em; padding: 8px 10px; border-radius: 4px; background: #eef4fb; border-left: 4px solid #2a6fb0; font-size: .88rem; line-height: 1.45; color: #0b1f33; }
.cfn-btns { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.cfn button { font: inherit; font-weight: 600; font-size: .9rem; padding: 9px 14px; border-radius: 4px; border: 1px solid #0b1f33; background: #0b1f33; color: #fff; cursor: pointer; min-height: 40px; }
.cfn button.ghost { background: transparent; color: #0b1f33; }
.cfn button.ghost.on { background: var(--accent, #e0731a); color: #fff; border-color: var(--accent, #e0731a); }
.cfn button:focus-visible, .cfn input:focus-visible, .cfn select:focus-visible, .cfn summary:focus-visible { outline: 3px solid var(--accent, #e0731a); outline-offset: 2px; }
.cfn-sel { display: flex; align-items: center; gap: 6px; font-size: .85rem; font-weight: 600; flex-wrap: wrap; }
.cfn select { font: inherit; font-size: .9rem; padding: 7px 8px; border: 1px solid var(--line, #cfdae6); border-radius: 4px; background: #fff; color: #0b1f33; min-height: 38px; max-width: 100%; }
.cfn-scrub { display: flex; align-items: center; gap: 10px; font-size: .86rem; font-weight: 600; flex-wrap: wrap; }
.cfn-scrub input { flex: 1 1 200px; min-width: 0; accent-color: var(--accent, #e0731a); height: 30px; }
.cfn-scrub output { font-family: ui-monospace, Menlo, Consolas, monospace; min-width: 3.4em; text-align: right; }
.cfn-scope { border: 1px solid var(--line, #cfdae6); border-radius: 6px; overflow: hidden; background: #fff; }
.cfn-scope svg { display: block; width: 100%; height: auto; }
.cfn-presets { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.cfn-presets > span { font-size: .85rem; font-weight: 700; margin-right: 4px; }
.cfn-pre { min-height: 34px !important; padding: 5px 10px !important; font-size: .82rem !important; }
.cfn-grid { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 6fr); gap: 18px; align-items: start; }
@media (max-width: 900px) { .cfn-grid { grid-template-columns: minmax(0, 1fr); } }
.cfn-ctl, .cfn-out { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.cfn fieldset { margin: 0; padding: 8px 12px 12px; border: 1px solid var(--line, #cfdae6); border-radius: 6px; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.cfn legend { font-size: .82rem; font-weight: 700; padding: 0 6px; color: #a84f08; text-transform: uppercase; letter-spacing: .04em; }
.cfn-row { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.cfn-row > label { font-size: .84rem; font-weight: 600; line-height: 1.3; }
.cfn-in { display: flex; align-items: center; gap: 10px; }
.cfn-in input[type=range] { flex: 1 1 auto; min-width: 0; height: 30px; accent-color: var(--accent, #e0731a); }
.cfn-in output { flex: 0 0 auto; min-width: 5.2em; text-align: right; font-family: ui-monospace, Menlo, Consolas, monospace; font-size: .85rem; font-weight: 600; }
.cfn-chk label { display: flex; gap: 8px; align-items: center; font-weight: 600; font-size: .86rem; }
.cfn-chk input { width: 20px; height: 20px; accent-color: var(--accent, #e0731a); }
.cfn-mini { min-height: 32px !important; padding: 4px 10px !important; font-size: .78rem !important; align-self: flex-start; }
.cfn-adv { border: 1px solid var(--line, #cfdae6); border-radius: 6px; padding: 8px 12px 12px; }
.cfn-adv > summary, .cfn-steps > summary { cursor: pointer; font-weight: 700; font-size: .9rem; }
.cfn-adv .cfn-row { margin-top: 10px; }
.cfn-read { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.cfn-card { border: 1px solid var(--line, #cfdae6); border-radius: 6px; padding: 8px 10px; background: #f6f9fc; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.cfn-card span { font-size: .74rem; color: #4a5d70; line-height: 1.25; }
.cfn-card b { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 1.15rem; color: #0b1f33; overflow-wrap: anywhere; }
.cfn-card i { font-style: normal; font-size: .72rem; color: #4a5d70; line-height: 1.3; }
.cfn-card.bad { background: #fbe9eb; border-color: #c0392b; } .cfn-card.warn { background: #fff4e0; border-color: #e0a030; }
.cfn-msgs { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.cfn-m { padding: 8px 12px; border-radius: 4px; font-size: .86rem; line-height: 1.45; border-left: 4px solid; }
.cfn-m.ok { background: #e6f5ec; border-color: #1a7f4b; color: #11522f; } .cfn-m.err { background: #fbe9eb; border-color: #c0392b; color: #721c24; }
.cfn-m.warn { background: #fff4e0; border-color: #e0a030; color: #6b4a00; } .cfn-m.info { background: #eef4fb; border-color: #2a6fb0; color: #0b3a6a; }
.cfn-steps { border: 1px solid var(--line, #cfdae6); border-radius: 6px; padding: 10px 14px; background: #fbfcfe; }
.cfn-ol { margin: 8px 0 0; padding-left: 20px; font-size: .88rem; line-height: 1.6; } .cfn-ol li { margin-bottom: 6px; } .cfn-ol .r { color: #c0392b; }
.cfn-note { margin: 0; font-size: .82rem; color: #4a5d70; line-height: 1.5; }
@media (prefers-reduced-motion: reduce) { .cfn * { transition: none !important; animation: none !important; } }
@media (max-width: 640px) { .cfn-view { overflow-x: auto; } .cfn-svg { min-width: 520px; } }
