/* ===== NEXO ROBOTICS — Estilos compartidos de artículos del blog ===== */
:root{
  --bg:#ffffff;--bg-soft:#f6f9fd;--bg-soft-2:#eef3fb;
  --ink:#0f172a;--ink-2:#475569;--muted:#5b6880;--muted-2:#94a3b8;
  --line:rgba(15,23,42,.09);--line-strong:rgba(15,23,42,.16);
  --primary:#1d50b8;--primary-hover:#163f93;--primary-soft:rgba(30,91,209,.07);--primary-soft-2:rgba(30,91,209,.12);
  --accent:#0ea5e9;--success:#0f9d6b;--blog-blue:#2563eb;
  --maxw:1180px;
  --font:'Inter',-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,Helvetica,Arial,sans-serif;
}
*{box-sizing:border-box;margin:0;padding:0}
html{scroll-behavior:smooth;-webkit-text-size-adjust:100%;overflow-x:hidden}
body{font-family:var(--font);background:var(--bg);color:var(--ink-2);line-height:1.65;overflow-x:hidden;-webkit-font-smoothing:antialiased;font-size:17px}
img,svg,video{max-width:100%;display:block}
a{color:inherit;text-decoration:none}
.wrap{max-width:var(--maxw);margin:0 auto;padding:0 24px}

/* Header */
header{position:sticky;top:0;z-index:60;background:rgba(255,255,255,.85);backdrop-filter:saturate(160%) blur(14px);border-bottom:1px solid var(--line)}
.nav{display:flex;align-items:center;justify-content:space-between;height:72px;gap:24px}
.brand{display:flex;align-items:center;gap:11px;font-size:19px;letter-spacing:-.01em}
.brand .mark{width:34px;height:34px;border-radius:9px;flex-shrink:0;background:linear-gradient(150deg,var(--primary),#2a60cc);display:grid;place-items:center;box-shadow:0 6px 16px -7px rgba(30,91,209,.75)}
.brand .mark svg{width:19px;height:19px}
.brand .wm{display:flex;align-items:baseline;gap:7px;line-height:1}
.brand .wm b{font-weight:800;color:var(--ink);letter-spacing:.02em}
.brand .wm span{font-weight:500;color:var(--muted);letter-spacing:.01em}
.nav-links{display:flex;gap:24px;align-items:center}
.nav-links a{color:var(--muted);font-size:15px;font-weight:500;transition:color .2s}
.nav-links a:hover{color:var(--ink)}
.nav-links a.btn-primary{color:#fff;font-weight:700}
.btn{display:inline-flex;align-items:center;gap:9px;font-weight:700;font-size:15px;padding:12px 22px;border-radius:10px;border:1px solid transparent;cursor:pointer;transition:transform .15s,box-shadow .2s,background .2s,color .2s;white-space:nowrap}
.btn-primary{background:linear-gradient(135deg,var(--primary),#2a60cc);color:#fff;box-shadow:0 10px 24px -12px rgba(30,91,209,.8)}
.btn-primary,.btn-primary *{color:#fff}
.btn-primary:hover{transform:translateY(-1px);box-shadow:0 16px 30px -12px rgba(30,91,209,.9)}
.nav .btn{padding:10px 18px}
.nav-toggle{display:none;background:#fff;border:1px solid var(--line-strong);border-radius:8px;padding:9px 11px;cursor:pointer}
.nav-toggle svg{width:20px;height:20px;stroke:var(--ink);fill:none;stroke-width:2}

/* Breadcrumb */
.crumb{max-width:760px;margin:0 auto;padding:24px 0 0;font-size:13px;color:var(--muted-2)}
.crumb a{color:var(--muted);font-weight:500}
.crumb a:hover{color:var(--primary)}
.crumb span{margin:0 6px}

/* Article */
main{display:block}
.article{max-width:760px;margin:0 auto;padding:26px 0 56px}
.article .a-cat{display:inline-flex;align-items:center;gap:7px;font-size:11.5px;font-weight:700;letter-spacing:.08em;text-transform:uppercase;color:var(--blog-blue);background:rgba(37,99,235,.08);border:1px solid rgba(37,99,235,.2);border-radius:999px;padding:6px 12px;margin-bottom:18px}
.article .a-title{font-size:clamp(27px,3.4vw,38px);line-height:1.14;letter-spacing:-.02em;color:var(--ink);font-weight:800;margin-bottom:14px}
.article .a-lead{font-size:18.5px;line-height:1.6;color:var(--ink-2);font-weight:500;margin-bottom:8px}
.article h3{font-size:20px;line-height:1.3;color:var(--ink);font-weight:700;letter-spacing:-.01em;margin:34px 0 12px}
.article p{font-size:16.5px;line-height:1.74;color:var(--ink-2);margin-bottom:15px}
.article ul,.article ol{margin:6px 0 18px;padding-left:22px}
.article li{font-size:16.5px;line-height:1.7;color:var(--ink-2);margin-bottom:8px}
.article strong{color:var(--ink);font-weight:700}
.formula{background:#0c1322;color:#dbe6f7;border:1px solid rgba(255,255,255,.08);border-radius:12px;padding:18px 20px;font-family:'SFMono-Regular',Consolas,'Liberation Mono',Menlo,monospace;font-size:14px;line-height:1.7;overflow-x:auto;margin:8px 0 20px}
.formula .c{color:#5fa8e0}
.callout{background:var(--bg-soft);border-left:3px solid var(--accent);border-radius:0 12px 12px 0;padding:16px 20px;margin:8px 0 20px}
.callout p{margin:0;font-size:15.5px;color:var(--ink-2)}
.a-figure{display:block;max-width:100%;height:auto;border-radius:16px;margin:32px 0}
.a-figure img{width:100%;height:auto;display:block;border-radius:16px}
.a-figure figcaption{margin-top:10px;font-size:13px;color:var(--muted-2);text-align:center}
.a-back{display:inline-flex;align-items:center;gap:7px;font-size:13.5px;font-weight:600;color:var(--primary);margin-top:26px}
.a-back svg{width:15px;height:15px;stroke:var(--primary);fill:none;stroke-width:2}
/* Enlaces internos del cuerpo */
.article a:not(.a-back){color:var(--blog-blue);font-weight:600;border-bottom:1px solid rgba(37,99,235,.3)}
.article a:not(.a-back):hover{border-bottom-color:var(--blog-blue)}

/* Simulación de grid */
.a-sim{position:relative;margin:32px 0;border-radius:16px;overflow:hidden;background:#0c1322;border:1px solid rgba(255,255,255,.08);padding:22px 22px 20px}
.a-sim .a-sim-bar{display:flex;align-items:center;justify-content:space-between;margin-bottom:16px}
.a-sim .a-sim-bar .lbl{display:inline-flex;align-items:center;gap:9px;color:#c6d2e6;font-size:12px;font-weight:600;letter-spacing:.06em;text-transform:uppercase}
.a-sim .a-sim-bar .lbl::before{content:"";width:9px;height:9px;border-radius:50%;background:#ef4444;box-shadow:0 0 0 4px rgba(239,68,68,.25);animation:simPulse 1.6s ease-in-out infinite}
.a-sim .a-sim-bar .t{color:#5fa8e0;font-size:12px;font-family:'SFMono-Regular',Consolas,Menlo,monospace}
.a-sim .a-sim-grid{display:grid;grid-template-columns:repeat(10,1fr);gap:7px}
.a-sim .cell{aspect-ratio:1/1;border-radius:5px;background:rgba(95,168,224,.14);border:1px solid rgba(95,168,224,.18)}
.a-sim .cell.robot{background:rgba(95,168,224,.55);border-color:rgba(95,168,224,.7)}
.a-sim .cell.stalled{background:rgba(239,68,68,.16);border-color:rgba(239,68,68,.35)}
.a-sim .cell.blocked{background:#ef4444;border-color:#ef4444;animation:simPulse 1.4s ease-in-out infinite}
@keyframes simPulse{0%,100%{box-shadow:0 0 0 0 rgba(239,68,68,.55)}50%{box-shadow:0 0 0 7px rgba(239,68,68,0)}}
.a-sim .a-sim-cap{margin-top:16px;color:#c6d2e6;font-size:13.5px;line-height:1.55}
.a-sim .a-sim-legend{display:flex;flex-wrap:wrap;gap:16px;margin-top:12px;font-size:12px;color:#94a3b8}
.a-sim .a-sim-legend span{display:inline-flex;align-items:center;gap:7px}
.a-sim .a-sim-legend i{width:11px;height:11px;border-radius:3px;display:inline-block}

/* Tabla comparativa */
.a-table-wrap{margin:28px 0;overflow-x:auto;border:1px solid var(--line);border-radius:14px}
.a-table{width:100%;border-collapse:collapse;font-size:14.5px;min-width:560px}
.a-table th,.a-table td{text-align:left;padding:13px 16px;border-bottom:1px solid var(--line);vertical-align:top;line-height:1.5}
.a-table thead th{background:var(--bg-soft);color:var(--ink);font-weight:700;font-size:12.5px;letter-spacing:.04em;text-transform:uppercase}
.a-table thead th:first-child{background:#fff}
.a-table tbody th{font-weight:600;color:var(--muted);width:24%}
.a-table td{color:var(--ink-2)}
.a-table tbody tr:last-child td,.a-table tbody tr:last-child th{border-bottom:none}

/* Diagnóstico de bus */
.a-busdiag{margin:28px 0;background:#0c1322;border:1px solid rgba(255,255,255,.08);border-radius:14px;padding:16px 20px 18px;font-family:'SFMono-Regular',Consolas,Menlo,monospace;font-size:13px;color:#dbe6f7}
.a-busdiag .bd-head{display:flex;justify-content:space-between;color:#94a3b8;font-size:11px;letter-spacing:.05em;text-transform:uppercase;border-bottom:1px solid rgba(255,255,255,.08);padding-bottom:10px;margin-bottom:8px}
.a-busdiag .bd-row{display:flex;justify-content:space-between;gap:14px;padding:6px 0;border-bottom:1px dashed rgba(255,255,255,.05)}
.a-busdiag .bd-row:last-child{border-bottom:none}
.a-busdiag .nd{color:#c6d2e6}
.a-busdiag .ok{color:#34d399}
.a-busdiag .warn{color:#fbbf24}
.a-busdiag .err{color:#f87171}
.a-busdiag .bd-cap{margin-top:10px;color:#94a3b8;font-size:11.5px;font-family:var(--font)}

/* Enlaces internos relacionados */
.related{max-width:760px;margin:0 auto 10px;padding:22px 0 0;border-top:1px solid var(--line)}
.related h2{font-size:14px;text-transform:uppercase;letter-spacing:.08em;color:var(--muted);font-weight:800;margin-bottom:12px}
.related ul{list-style:none;display:flex;flex-direction:column;gap:8px}
.related a{color:var(--blog-blue);font-weight:600;font-size:15px}
.related a:hover{text-decoration:underline}

/* CTA */
.cta-strip{background:var(--bg-soft);border-top:1px solid var(--line);border-bottom:1px solid var(--line);padding:62px 0;margin-top:30px}
.cta-strip .box{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:24px}
.cta-strip h2{font-size:clamp(22px,2.6vw,30px);color:var(--ink);font-weight:800;letter-spacing:-.018em}
.cta-strip p{color:var(--muted);margin-top:8px;max-width:52ch}

/* Footer */
footer{border-top:1px solid var(--line);background:var(--bg-soft);padding:46px 0 34px}
.foot-top{display:flex;flex-wrap:wrap;justify-content:space-between;gap:24px;align-items:flex-start}
.foot-tag{color:var(--muted);font-size:14.5px;max-width:42ch;margin-top:14px}
.foot-links{display:flex;gap:24px;flex-wrap:wrap}
.foot-links a{color:var(--muted);font-size:14px}
.foot-links a:hover{color:var(--ink)}
.foot-bottom{margin-top:32px;padding-top:22px;border-top:1px solid var(--line);display:flex;flex-wrap:wrap;justify-content:space-between;gap:12px;color:var(--muted-2);font-size:13px}
.pending{font-style:italic;color:var(--muted-2)}

@media (max-width:1023px){
  .nav-links{display:none}
  .nav-links.open{display:flex;position:absolute;top:72px;left:0;right:0;flex-direction:column;background:#fff;border-bottom:1px solid var(--line);padding:18px 22px;gap:16px;box-shadow:0 18px 30px -18px rgba(15,23,42,.3)}
  .nav-links.open a.btn-primary{justify-content:center;padding:13px 18px;margin-top:4px}
  .nav-toggle{display:flex}
}
@media (max-width:767px){
  body{font-size:16px}
  .wrap{padding:0 18px}
  .article{padding:20px 0 44px}
  .article .a-title{font-size:clamp(25px,7vw,34px)}
  .cta-strip{padding:46px 0}
}
@media (max-width:480px){
  .nav{height:64px}
  .nav-links.open{top:64px}
}
@media (prefers-reduced-motion:reduce){.a-sim .a-sim-bar .lbl::before,.a-sim .cell.blocked{animation:none}}
