/* Simulador "Borna con fusible" (publicacion 115). Prefijo bfs- */
.bfs { 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; }
.bfs * { box-sizing: border-box; }
.bfs-head { display: flex; flex-direction: column; gap: 2px; }
.bfs-head strong { font-size: 1.1rem; color: var(--navy, #0b1f33); }
.bfs-head span { color: var(--muted, #4a5d70); font-size: .92rem; line-height: 1.5; }
.bfs-tabs { display: flex; flex-wrap: wrap; gap: 6px; }
.bfs .bfs-tabs button { background: transparent; color: var(--navy, #0b1f33); border: 1px solid var(--line, #cfdae6); border-radius: 4px; padding: 9px 12px; min-height: 40px; font: inherit; font-weight: 600; font-size: .88rem; cursor: pointer; }
.bfs .bfs-tabs button[aria-selected="true"] { background: var(--navy, #0b1f33); color: #fff; border-color: var(--navy, #0b1f33); }
.bfs-grid { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 4fr); grid-template-areas: "main side" "expl side"; gap: 16px; align-items: start; align-content: start; grid-template-rows: min-content min-content; }
.bfs-grid.bfs-one { grid-template-columns: minmax(0, 1fr); grid-template-areas: "main" "expl"; grid-template-rows: auto; }
.bfs-main { grid-area: main; } .bfs-side { grid-area: side; } .bfs-expl-wrap { grid-area: expl; }
@media (max-width: 860px) { .bfs-grid { grid-template-columns: minmax(0, 1fr); grid-template-areas: "main" "side" "expl"; grid-template-rows: auto; } }
.bfs-main, .bfs-side, .bfs-expl-wrap { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.bfs-card { border: 1px solid var(--line-soft, #e1e8ef); border-radius: 6px; background: #fff; padding: 10px; min-width: 0; color: #0b1f33; }
.bfs-ct { font-size: .88rem; font-weight: 700; color: var(--navy, #0b1f33); margin-bottom: 6px; }
.bfs-card .bfs-ct { color: #0b1f33; }
.bfs svg { display: block; width: 100%; height: auto; max-width: 100%; font-family: inherit; }
.bfs-legend { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: .78rem; color: #4a5d70; }
.bfs-legend li { display: inline-flex; align-items: center; gap: 5px; }
.bfs-legend i { display: inline-block; width: 20px; height: 4px; border-radius: 2px; }
.bfs-legend i.r { background: #c0392b; } .bfs-legend i.g { background: #8b98a6; } .bfs-legend i.b { background: #1d4f91; height: 5px; } .bfs-legend i.b2 { background: #7aa5d2; }
.bfs-legend i.sq { background: #ff3b3b; width: 14px; height: 14px; border-radius: 50%; }
.bfs-legend i.dash { height: 0; background: none; border-top: 3px dashed #b42318; border-radius: 0; }
.bfs-legend i.dot { background: #e0731a; border: 2px solid #0b1f33; border-radius: 50%; width: 14px; height: 14px; }
@keyframes bfs-flow { to { stroke-dashoffset: -36; } }
.bfs-flow { animation: bfs-flow .9s linear infinite; }
.bfs-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; }
.bfs-status.ok { background: #effaf2; border-color: #1a7f4b; color: #14532d; }
.bfs-status.warn { background: #fff6e0; border-color: #b7791f; color: #6b4b00; }
.bfs-status.bad { background: #fdecec; border-color: #b42318; color: #721c24; }
.bfs-btns { display: flex; flex-wrap: wrap; gap: 8px; padding-top: 6px; }
.bfs button { font: inherit; font-weight: 600; font-size: .88rem; padding: 9px 12px; border-radius: 4px; border: 1px solid var(--navy, #0b1f33); background: var(--navy, #0b1f33); color: #fff; cursor: pointer; min-height: 40px; }
.bfs button.ghost { background: transparent; color: var(--navy, #0b1f33); }
.bfs button.warn { background: #b42318; border-color: #b42318; color: #fff; }
.bfs button[aria-pressed="true"]:not(.ghost) { background: #1a7f4b; border-color: #1a7f4b; }
.bfs button:disabled { opacity: .45; cursor: not-allowed; }
.bfs input:focus-visible, .bfs button:focus-visible, .bfs select:focus-visible, .bfs g:focus-visible { outline: 3px solid var(--accent, #e0731a); outline-offset: 2px; }
.bfs fieldset { border: 1px solid var(--line, #cfdae6); border-radius: 6px; margin: 0; padding: 6px 12px 10px; min-width: 0; }
.bfs legend { font-size: .85rem; font-weight: 700; color: var(--navy, #0b1f33); padding: 0 6px; }
.bfs-row { display: flex; flex-direction: column; gap: 2px; padding: 4px 0; }
.bfs-row label { font-size: .86rem; font-weight: 600; color: var(--navy, #0b1f33); }
.bfs-two { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.bfs-in { display: flex; align-items: center; gap: 10px; }
.bfs-in input[type=range] { flex: 1 1 auto; min-width: 0; height: 30px; accent-color: var(--accent, #e0731a); }
.bfs-in output { flex: 0 0 auto; min-width: 5.4em; 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); }
.bfs 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; }
.bfs-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; }
.bfs-read div { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.bfs-read span { font-size: .74rem; color: #4a5d70; }
.bfs-read b { font-size: .9rem; color: #0b1f33; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.bfs-meter { margin-top: 6px; padding: 12px; border-radius: 6px; background: #1c2a1c; color: #9dff9d; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 1.5rem; font-weight: 700; text-align: right; letter-spacing: .04em; min-height: 52px; overflow-wrap: anywhere; }
.bfs-note { font-size: .84rem; line-height: 1.55; color: #4a5d70; margin: 6px 0; }
.bfs-note b { color: #0b1f33; }
.bfs-data { margin: 6px 0 10px; padding-left: 1.2em; font-size: .88rem; line-height: 1.55; color: #0b1f33; }
.bfs fieldset.bfs-opts { margin-top: 6px; }
.bfs-opt { display: flex; gap: 10px; align-items: flex-start; padding: 8px 4px; border-bottom: 1px solid var(--line-soft, #e1e8ef); font-size: .9rem; line-height: 1.45; color: #0b1f33; cursor: pointer; }
.bfs-opt:last-child { border-bottom: 0; }
.bfs-opt input { width: 20px; height: 20px; flex: 0 0 auto; margin-top: 2px; accent-color: var(--accent, #e0731a); }
.bfs-expl { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.bfs-expl li { padding: 9px 12px; border-radius: 4px; border-left: 4px solid #2a6fb0; background: #eef5fc; color: #0b1f33; font-size: .9rem; line-height: 1.55; }
.bfs-expl li.ok { border-color: #1a7f4b; background: #effaf2; color: #14532d; }
.bfs-expl li.warn { border-color: #b7791f; background: #fff6e0; color: #6b4b00; }
.bfs-expl li.bad { border-color: #b42318; background: #fdecec; color: #721c24; }
.bfs-score { margin-top: 8px; padding: 10px 12px; border-radius: 4px; font-weight: 700; border-left: 4px solid #7d8fa2; background: #eef2f6; color: #0b1f33; }
.bfs-score.ok { background: #effaf2; border-color: #1a7f4b; color: #14532d; }
.bfs [hidden] { display: none !important; }
@media (prefers-reduced-motion: reduce) { .bfs * { animation: none !important; transition: none !important; } }

.bfs [data-g] { overflow-x: auto; max-width: 100%; }
.bfs [data-g="schem"] svg, .bfs [data-g="dschem"] svg { min-width: 560px; }
.bfs [data-g="curve"] svg { min-width: 500px; }
