/* Simulador de carga y descarga RC y RL (usa las variables de styles.css) */
.rl-layout { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 16px; align-items: center; }
@media (max-width: 760px) { .rl-layout { grid-template-columns: minmax(0, 1fr); } }
.rl-schem { background: var(--bg); border: 1px solid var(--border); border-radius: 12px; padding: 6px; }
.rl-schem svg { display: block; width: 100%; max-width: 440px; height: auto; margin: 0 auto; }
.rl-inputs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 16px; }
@media (max-width: 420px) { .rl-inputs { grid-template-columns: minmax(0, 1fr); } }
.rl-inputs { align-items: end; }
.rl-inputs .field { min-width: 0; }
#outputs .label { text-transform: none; letter-spacing: 0; font-size: .85rem; }

.sc-w { fill: none; stroke: var(--wire); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.sc-thick { stroke-width: 3.5; }
.sc-off { opacity: .35; }
.sc-lever { stroke: var(--accent); stroke-width: 3; }
.sc-pin { fill: var(--panel); stroke: var(--wire); stroke-width: 2; }
.sc-dot { fill: var(--wire); }
.sc-arrow { fill: var(--accent); }
.sc-t { font: 700 15px Georgia, "Times New Roman", serif; fill: var(--text); }
.sc-v { font: 600 13px system-ui, sans-serif; fill: var(--muted); }
.sc-s { font: 500 12px system-ui, sans-serif; fill: var(--muted); }
.sc-acc { fill: var(--accent); font-size: 14px; }
.sc-mid { text-anchor: middle; }
.sc-end { text-anchor: middle; }

.rl-chart-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; margin-bottom: 4px; }
.rl-chart-head .seg button { font-family: Georgia, "Times New Roman", serif; font-weight: 700; padding: 4px 14px; }
.rl-chart svg { display: block; width: 100%; height: auto; touch-action: pan-y; user-select: none; -webkit-user-select: none; }
.rl-empty { padding: 60px 0; text-align: center; }
.ch-grid { stroke: var(--border); stroke-width: 1; }
.ch-zero { stroke: var(--muted); stroke-width: 1; opacity: .6; }
.ch-lbl { font: 500 12px system-ui, sans-serif; fill: var(--muted); font-variant-numeric: tabular-nums; }
.ch-tau { font: 700 13px Georgia, "Times New Roman", serif; fill: var(--text); }
.ch-end { text-anchor: end; }
.ch-mid { text-anchor: middle; }
.ch-note { fill: var(--text); }
.ch-line { fill: none; stroke: var(--accent); stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round; }
.ch-asym { stroke: var(--muted); stroke-width: 1.2; stroke-dasharray: 6 5; }
.ch-guide { fill: none; stroke: var(--muted); stroke-width: 1.2; stroke-dasharray: 3 4; }
.ch-tdot { fill: var(--panel); stroke: var(--accent); stroke-width: 2; }
.ch-mark { stroke: var(--accent); stroke-width: 1.5; opacity: .7; }
.ch-dot { fill: var(--accent); stroke: var(--panel); stroke-width: 2.5; }
.ch-tip { fill: var(--text); }
.ch-tiptxt { font: 600 13px system-ui, sans-serif; fill: var(--panel); }
.ch-hover { stroke: var(--muted); stroke-width: 1; stroke-dasharray: 2 3; pointer-events: none; }
.ch-hdot { fill: var(--muted); pointer-events: none; }
.ch-htxt { fill: var(--text); }
.ch-hit { fill: transparent; cursor: crosshair; }

.rl-time { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px 14px; margin-top: 10px; }
.rl-time input[type=range] { flex: 1 1 200px; accent-color: var(--accent); min-height: 32px; margin: 0; }
.rl-t { display: flex; flex-direction: column; gap: 6px; width: 150px; }
.rl-play { white-space: nowrap; min-width: 110px; }
.rl-obj { margin-top: 14px; }

.rl-formula { font: 700 1.2rem Georgia, "Times New Roman", serif; text-align: center; background: var(--panel); border: 1px solid var(--border); border-radius: 10px; padding: 12px; overflow-x: auto; }
.rl-ftable td, .rl-ftable th { text-align: left; font-family: Georgia, "Times New Roman", serif; line-height: 1.7; }
.rl-ftable thead th { font-family: system-ui, sans-serif; font-size: .85rem; color: var(--muted); }
.rl-table td { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; white-space: nowrap; }
.rl-table td:first-child { font-family: Georgia, serif !important; }
.rl-table th { white-space: nowrap; }
.step sub, .rl-table sub, .rl-ftable sub { font-size: .75em; }
#outputs { grid-template-columns: repeat(auto-fill, minmax(155px, 1fr)); }
#outputs .out-val { font-size: 1rem; }
#outputs .out-card.main .out-val { font-size: 1.2rem; }
.rl-t .label { text-transform: none; letter-spacing: 0; font-size: .85rem; }
.rl-obj .label { text-transform: none; letter-spacing: 0; font-size: .85rem; }
