:root{--sb:#1e293b;--sbh:#334155;--pr:#2563eb}
*{box-sizing:border-box}
body{background:#f1f5f9;font-family:'Segoe UI',sans-serif;margin:0;display:flex;min-height:100vh}
#sb{width:220px;background:var(--sb);display:flex;flex-direction:column;padding:1rem;flex-shrink:0;min-height:100vh;transition:width .25s ease,padding .25s ease;overflow:hidden}
#sb.sb-collapsed{width:0;padding:0}
#sb-toggle{position:fixed;top:50%;transform:translateY(-50%);z-index:200;background:#1e293b;border:1px solid #334155;border-left:none;border-radius:0 6px 6px 0;padding:10px 4px;cursor:pointer;color:#60a5fa;font-size:12px;writing-mode:vertical-rl;line-height:1;transition:left .25s ease}
#main{flex:1;padding:1.5rem;overflow-y:auto;min-width:0}
.nav-link{color:#94a3b8!important;border-radius:6px;padding:.4rem .75rem;cursor:pointer;display:block;text-decoration:none;transition:.15s;font-size:.9rem}
.nav-link:hover,.nav-link.active{background:var(--sbh);color:#f8fafc!important}
.card{border:none;box-shadow:0 1px 4px rgba(0,0,0,.08);border-radius:8px}
.badge-n{font-size:.68rem;float:right;margin-top:1px}
.r-unread{background:#e2e8f0;color:#475569}
.r-title{background:#dbeafe;color:#1d4ed8}
.r-abstract{background:#fef9c3;color:#a16207}
.r-full{background:#dcfce7;color:#15803d}
.s-pending{color:#94a3b8}.s-include{color:#16a34a}.s-exclude{color:#dc2626}.s-review{color:#d97706}
.row-include>td{background-color:#dcfce7!important}
.row-exclude>td{background-color:#fee2e2!important}
.row-review>td{background-color:#fef9c3!important}
.row-eligible>td{background-color:#dcfce7!important}
.row-not-eligible>td{background-color:#fee2e2!important}
.rob-dot{font-size:1.1rem;cursor:help}
.rob-bajo{color:#22c55e}
.rob-moderado{color:#f59e0b}
.rob-alto{color:#ef4444}
.rob-critico{color:#7c3aed}
.rob-na{color:#94a3b8}
.slide-down-enter-active,.slide-down-leave-active{transition:all .2s ease}
.slide-down-enter-from,.slide-down-leave-to{opacity:0;transform:translateY(-8px)}
.tbl-t{max-width:340px;white-space:normal;word-break:normal}
.prog-bar{height:6px;border-radius:3px;background:#e2e8f0;overflow:hidden}
.prog-fill{height:100%;background:var(--pr);transition:width .4s}
.drop-zone{border:2px dashed #cbd5e1;border-radius:8px;padding:2rem;text-align:center;cursor:pointer;transition:.15s}
.drop-zone:hover,.drop-zone.drag{border-color:var(--pr);background:#eff6ff}
.modal-xl{max-width:96vw}
.quick-cite{background:#f8fafc;border:1px solid #e2e8f0;border-radius:6px;padding:.6rem .8rem;font-size:.84rem;line-height:1.7}
.std-status-dot{width:10px;height:10px;border-radius:50%;display:inline-block;flex-shrink:0}
.std-rules-box{background:#f8fafc;border:1px solid #e2e8f0;border-radius:6px;padding:.75rem;font-size:.82rem;font-family:monospace;max-height:280px;overflow-y:auto}
.std-fmt-row{display:flex;align-items:flex-start;gap:.5rem;padding:.35rem 0;border-bottom:1px solid #f1f5f9}
.std-fmt-row:last-child{border-bottom:none}
@keyframes pulse{0%,100%{opacity:1}50%{opacity:.4}}
@keyframes blink{0%,100%{opacity:1}50%{opacity:0}}.assistant-cursor{animation:blink 1s step-end infinite;font-size:.8em;color:#60a5fa}
.ro-field{background:#f8fafc;border:1px solid #e2e8f0;border-radius:6px;padding:5px 10px;font-size:.85rem;color:#1e293b;min-height:32px;line-height:1.5;word-break:break-word}
.ro-field a{color:#2563eb}.ref-modal-label{font-size:.78rem;font-weight:600;color:#6b7280;margin-bottom:3px;display:block}

/* ── Audit markdown rendering ─────────────────────────── */
.audit-result table{width:100%;border-collapse:collapse;font-size:11px;margin:12px 0}
.audit-result th{background:#f1f5f9;font-weight:700;padding:8px 10px;border:1px solid #cbd5e1;text-align:left}
.audit-result td{padding:7px 10px;border:1px solid #e2e8f0;vertical-align:top;line-height:1.5}
.audit-result tr:nth-child(even) td{background:#f8fafc}
.audit-result h1,.audit-result h2,.audit-result h3,.audit-result h4{font-weight:700;margin:14px 0 6px;color:#1e293b}
.audit-result h1{font-size:15px}.audit-result h2{font-size:14px}.audit-result h3{font-size:13px}.audit-result h4{font-size:12px}
.audit-result p{margin:6px 0;line-height:1.7}
.audit-result ul,.audit-result ol{margin:6px 0 6px 20px;line-height:1.7}
.audit-result strong{font-weight:700;color:#0f172a}
.audit-result hr{border:none;border-top:1px solid #e2e8f0;margin:12px 0}

/* Consensus / Líneas de Investigación animations */
.slide-in-enter-active{animation:slideInUp .35s cubic-bezier(.22,.61,.36,1) both}
@keyframes slideInUp{from{opacity:0;transform:translateY(10px)}to{opacity:1;transform:translateY(0)}}
.explainer-fade-enter-active{animation:explainerIn .6s ease both}
.explainer-fade-leave-active{animation:explainerOut .4s ease both;position:absolute}
@keyframes explainerIn{from{opacity:0;transform:translateY(6px)}to{opacity:1;transform:translateY(0)}}
@keyframes explainerOut{from{opacity:1}to{opacity:0}}
.onto-panel-enter-active{animation:ontoPanelIn .25s cubic-bezier(.22,.61,.36,1) both}
.onto-panel-leave-active{animation:ontoPanelOut .2s ease both}
@keyframes ontoPanelIn{from{opacity:0;transform:translateX(24px)}to{opacity:1;transform:translateX(0)}}
@keyframes ontoPanelOut{from{opacity:1;transform:translateX(0)}to{opacity:0;transform:translateX(24px)}}