/* Laboratorio de causa raíz (prefijo rca). Tarjeta clara autocontenida: colores fijos legibles en modo claro y oscuro. */
.rca-host, [data-sim="rca-lab"] { min-width: 0; }
.rca { --r-acc: #d98a0b; --r-soft: #fff4de; --r-line: #cfdae6; --r-muted: #4a5d70; --r-ink: #0b1f33;
  background: #fff; color: var(--r-ink); color-scheme: light; border: 1px solid var(--r-line); border-radius: 8px; padding: 18px; margin: 26px 0; display: flex; flex-direction: column; gap: 12px; min-width: 0; font-size: 1rem; line-height: 1.5; }
.rca *, .rca *::before, .rca *::after { box-sizing: border-box; }
.rca-ttl { display: block; text-align: left; }
.rca-ttl b { display: block; font-size: 1.15rem; }
.rca-ttl span { display: block; color: var(--r-muted); font-size: .92rem; }
.rca button { font: inherit; cursor: pointer; color: var(--r-ink); }
.rca button:disabled { cursor: default; opacity: .55; }
.rca button:focus-visible, .rca select:focus-visible, .rca input:focus-visible { outline: 3px solid var(--r-acc); outline-offset: 2px; }
.rca-cases, .rca-steps, .rca-vtabs, .rca-btns { display: flex; flex-wrap: wrap; gap: 6px; }
.rca-case, .rca-stepb, .rca-vt, .rca-btn { font-size: .88rem; font-weight: 600; padding: 7px 12px; min-height: 40px; border-radius: 4px; border: 1px solid var(--r-line); background: #f3f6f9; }
.rca-case[aria-pressed="true"], .rca-vt[aria-pressed="true"] { background: #0b1f33; border-color: #0b1f33; color: #fff; }
.rca-stepb.on { background: var(--r-soft); border-color: var(--r-acc); }
.rca-btn.pri { background: #0b1f33; border-color: #0b1f33; color: #fff; }
.rca-btn.sm { min-height: 36px; padding: 5px 10px; }
.rca-top { display: grid; grid-template-columns: minmax(0, 280px) minmax(0, 1fr); gap: 14px; align-items: start; }
.rca-scene { display: block; width: 100%; height: auto; border: 1px solid #e1e8ef; border-radius: 6px; }
.rca-sym strong { display: block; margin-bottom: 4px; }
.rca-sym p { margin: 0 0 8px; font-size: .94rem; }
.rca-meters { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.rca-meter { position: relative; border: 1px solid var(--r-line); border-radius: 6px; padding: 6px 8px 10px; background: #f8fafc; overflow: hidden; }
.rca-meter span { display: block; font-size: .78rem; color: var(--r-muted); }
.rca-meter strong { font-size: .88rem; display: block; }
.rca-meter i { position: absolute; left: 0; bottom: 0; height: 4px; background: #1a7f4b; }
.rca-meter.over i { background: #b42318; }
.rca-meter.over strong { color: #b42318; }
.rca-main { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 14px; min-width: 0; }
.rca-pane, .rca-vw { min-width: 0; display: flex; flex-direction: column; gap: 10px; }
.rca-vw { border: 1px solid var(--r-line); border-radius: 6px; padding: 10px; background: #fbfcfd; align-self: start; }
.rca-help { margin: 0; padding: 10px 12px; border-radius: 4px; border-left: 4px solid #1f5fa8; background: #eef4fb; font-size: .9rem; }
.rca-msg { margin: 0; padding: 10px 12px; border-radius: 4px; border-left: 4px solid #1f5fa8; background: #eef4fb; font-size: .92rem; }
.rca-msg.ok { border-left-color: #1a7f4b; background: #e9f6ef; }
.rca-msg.bad { border-left-color: #b42318; background: #fdecea; }
.rca-msg.warn { border-left-color: #d98a0b; background: #fff4de; }
.rca-q { margin: 0; }
.rca-def { margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.rca-def div { border: 1px solid var(--r-line); border-radius: 4px; padding: 6px 8px; background: #f8fafc; }
.rca-def dt { font-size: .76rem; font-weight: 700; color: var(--r-muted); text-transform: uppercase; }
.rca-def dd { margin: 0; font-size: .88rem; }
.rca-cls { display: flex; flex-direction: column; gap: 6px; }
.rca-clsrow { display: flex; flex-direction: column; gap: 3px; border: 1px solid var(--r-line); border-radius: 4px; padding: 6px 8px; }
.rca-clsrow.ok { border-color: #1a7f4b; background: #e9f6ef; }
.rca-clsrow.bad { border-color: #b42318; background: #fdecea; }
.rca-clsrow label { font-size: .9rem; font-weight: 600; }
.rca select { width: 100%; min-height: 40px; font: inherit; padding: 6px 8px; border: 1px solid var(--r-line); border-radius: 4px; background: #fff; color: var(--r-ink); }
.rca-tests { display: flex; flex-direction: column; gap: 6px; }
.rca-test { display: flex; gap: 8px; align-items: center; justify-content: space-between; border: 1px solid var(--r-line); border-radius: 4px; padding: 6px 8px; background: #fff; }
.rca-test.done { background: #f1f5f9; }
.rca-tn { display: flex; flex-direction: column; min-width: 0; font-size: .9rem; }
.rca-tm { font-size: .8rem; color: var(--r-muted); }
.rca-log { border: 1px solid var(--r-line); border-radius: 6px; padding: 8px 10px; background: #f8fafc; font-size: .88rem; }
.rca-log ul { margin: 4px 0 0; padding-left: 18px; }
.rca-none { margin: 4px 0 0; color: var(--r-muted); }
.rca-chain { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 5px; }
.rca-chain li { border: 1px solid var(--r-line); border-left-width: 5px; border-radius: 4px; padding: 6px 8px; font-size: .9rem; background: #fff; }
.rca-cn.sup { border-left-color: #1a7f4b; } .rca-cn.ref { border-left-color: #b42318; } .rca-cn.uns { border-left-color: #d98a0b; }
.rca-c0 { border-left-color: #0b1f33 !important; background: #f1f5f9 !important; }
.rca-ln { display: inline-block; font-size: .74rem; font-weight: 700; text-transform: uppercase; color: var(--r-muted); margin-right: 4px; }
.rca-opts { display: flex; flex-direction: column; gap: 6px; }
.rca-opt { text-align: left; display: flex; flex-direction: column; gap: 4px; padding: 8px 10px; border: 1px solid var(--r-line); border-radius: 4px; background: #fff; font-size: .9rem; }
.rca-opt:hover { background: var(--r-soft); border-color: var(--r-acc); }
.rca-chip { align-self: flex-start; display: inline-block; font-size: .74rem; font-weight: 700; padding: 1px 7px; border-radius: 10px; margin-left: 2px; }
.rca-chip.sup { background: #d9f0e3; color: #0f5a33; } .rca-chip.ref { background: #fbdcd8; color: #8a1a10; } .rca-chip.uns { background: #fdeccb; color: #7a4a00; }
.rca-acts { display: flex; flex-direction: column; gap: 6px; }
.rca-act { display: flex; gap: 8px; align-items: flex-start; border: 1px solid var(--r-line); border-radius: 4px; padding: 7px 9px; font-size: .9rem; background: #fff; cursor: pointer; }
.rca-act.on { background: var(--r-soft); border-color: var(--r-acc); }
.rca-act input { margin-top: 4px; width: 18px; height: 18px; flex: none; }
.rca-cat { display: inline-block; font-size: .72rem; font-weight: 700; padding: 1px 6px; border-radius: 3px; background: #0b1f33; color: #fff; text-transform: uppercase; }
.rca-sum { margin: 0; font-size: .92rem; }
.rca-chart, .rca-ish { display: block; width: 100%; height: auto; background: #f8fafc; border: 1px solid #e1e8ef; border-radius: 4px; }
.rca-kpi { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.rca-kpi div { border: 1px solid var(--r-line); border-radius: 4px; padding: 6px 8px; background: #f8fafc; display: flex; flex-direction: column; }
.rca-kpi span { font-size: .76rem; color: var(--r-muted); } .rca-kpi strong { font-size: 1rem; } .rca-kpi em { font-size: .74rem; color: var(--r-muted); font-style: normal; }
.rca-score { border: 1px solid var(--r-line); border-radius: 6px; padding: 8px 10px; background: #f8fafc; }
.rca-tb { border-collapse: collapse; width: 100%; font-size: .86rem; margin-top: 4px; }
.rca-tb th, .rca-tb td { border: 1px solid var(--r-line); padding: 5px 6px; text-align: left; vertical-align: top; }
.rca-tb th { background: #eef2f6; }
.rca-score .rca-tb td:last-child { text-align: right; white-space: nowrap; }
.rca-tb.hip tr.sup td:last-child { color: #0f5a33; font-weight: 700; } .rca-tb.hip tr.ref td:last-child { color: #8a1a10; font-weight: 700; } .rca-tb.hip tr.uns td:last-child { color: #7a4a00; font-weight: 700; }
.rca-tb.hip tr.inchain td:first-child { box-shadow: inset 4px 0 0 #1f5fa8; }
.rca-scroll { overflow-x: auto; }
.rca-tips { margin: 6px 0 0; padding-left: 18px; font-size: .9rem; }
.rca-vh { margin: 6px 0; font-size: .86rem; color: var(--r-muted); }
.rca-fh { font-size: 16px; font-weight: 700; color: #0b1f33; text-align: center; line-height: 1.2; display: flex; align-items: center; justify-content: center; height: 100%; }
.rca-ishl { margin: 6px 0 0; padding-left: 0; list-style: none; font-size: .86rem; display: flex; flex-direction: column; gap: 3px; }
.rca-tree, .rca-tree ul { list-style: none; margin: 0; padding-left: 16px; border-left: 2px solid #cfdae6; }
.rca-tree { border-left: 0; padding-left: 0; font-size: .85rem; }
.rca-tn2 { margin: 4px 0; }
.rca-nd { display: inline-block; padding: 3px 8px; border-radius: 4px; border: 1px solid var(--r-line); background: #fff; }
.rca-tn2.top > .rca-nd { background: #0b1f33; color: #fff; border-color: #0b1f33; font-weight: 700; }
.rca-tn2.inchain > .rca-nd { background: #e2eefb; border-color: #1f5fa8; font-weight: 700; }
.rca-tn2.ref > .rca-nd { color: #6b7a8a; text-decoration: line-through; background: #f1f1f1; }
.rca-tn2.uns > .rca-nd { border-style: dashed; }
.rca-tn2.sup > .rca-nd { border-color: #1a7f4b; }
.rca-tn2.unex > .rca-nd { border: 2px dashed #d98a0b; background: var(--r-soft); }
.rca-nd small { color: var(--r-muted); }
@media (max-width: 860px) { .rca-main { grid-template-columns: minmax(0, 1fr); } .rca-top { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 520px) { .rca { padding: 12px; } .rca-def { grid-template-columns: 1fr; } .rca-kpi { grid-template-columns: 1fr; } .rca-meters { grid-template-columns: 1fr; } .rca-tb { font-size: .78rem; } }
@media (prefers-reduced-motion: reduce) { .rca * { transition: none !important; animation: none !important; } }
