/* entia-home-preview.css — gemelo del template v8 forense, scopeado bajo .ehp-root
   para no colisionar con el funnel. Tokens del v8 redefinidos localmente (fidelidad). */

.ehp-overlay {
  position: fixed; inset: 0; z-index: 9999;
  background: rgba(1, 4, 9, .82); backdrop-filter: blur(6px);
  display: flex; align-items: flex-start; justify-content: center;
  padding: 28px 16px; overflow-y: auto;
  animation: ehp-fade .25s ease;
}
@keyframes ehp-fade { from { opacity: 0; } to { opacity: 1; } }

.ehp-modal {
  position: relative; width: 100%; max-width: 1100px;
  background: #010409; border: 1px solid rgba(59,130,246,.30);
  border-radius: 16px; overflow: hidden;
  box-shadow: 0 30px 90px rgba(0,0,0,.6);
  animation: ehp-rise .3s cubic-bezier(.22,.61,.36,1);
}
@keyframes ehp-rise { from { transform: translateY(18px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

/* tokens v8 (scoped) */
.ehp-root {
  --eh-blue: #3B82F6; --eh-blue-400: #60A5FA; --eh-blue-300: #93C5FD; --eh-blue-600: #2563EB;
  --eh-surface-2: #0d1117;
  --eh-border: rgba(255,255,255,.08); --eh-border-blue: rgba(59,130,246,.30); --eh-border-blue-soft: rgba(59,130,246,.15);
  --eh-t1: #F0F0F8; --eh-t1-pure: #FFFFFF; --eh-t2: #A0A0C0; --eh-t-body: #c9d1d9; --eh-t-muted: #8b949e; --eh-t-soft: #e0e0e8;
  --eh-success: #60A5FA; --eh-warning: #FBBF24;
  --eh-sans: 'DM Sans','Inter',system-ui,sans-serif; --eh-mono: 'JetBrains Mono',ui-monospace,monospace;
}

/* topbar */
.ehp-topbar { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: 14px;
  padding: 12px 20px; background: rgba(6,8,18,.92); border-bottom: 1px solid var(--eh-border-blue); flex-wrap: wrap; }
.ehp-badge { font-family: var(--eh-mono); font-size: 10px; letter-spacing: 1.6px; text-transform: uppercase;
  color: var(--eh-warning); display: inline-flex; align-items: center; gap: 8px;
  border: 1px solid var(--eh-warning); border-radius: 100px; padding: 5px 12px; }
.ehp-bdot { width: 6px; height: 6px; border-radius: 50%; background: var(--eh-warning); box-shadow: 0 0 7px var(--eh-warning); }
.ehp-badge.verified { color: var(--eh-success); border-color: var(--eh-border-blue); background: rgba(96,165,250,.07); }
.ehp-badge.verified .ehp-bdot { background: var(--eh-success); box-shadow: 0 0 7px var(--eh-success); }
.ehp-badge-sub { font-family: var(--eh-mono); font-size: 10.5px; color: var(--eh-t2); letter-spacing: .5px; }
.ehp-ft-verif.ok { color: var(--eh-t-soft); }
.ehp-ftd.ok { background: var(--eh-success); box-shadow: 0 0 6px var(--eh-success); }
.ehp-close { margin-left: auto; background: rgba(255,255,255,.04); border: 1px solid var(--eh-border);
  color: var(--eh-t-soft); border-radius: 8px; width: 34px; height: 34px; cursor: pointer; font-size: 15px; transition: .15s; }
.ehp-close:hover { background: var(--eh-blue); color: #fff; border-color: var(--eh-blue); }

/* building state */
.ehp-building { padding: 90px 20px; text-align: center; }
.ehp-spin { width: 38px; height: 38px; margin: 0 auto 22px; border: 3px solid rgba(59,130,246,.18);
  border-top-color: var(--eh-blue); border-radius: 50%; animation: ehp-rot .8s linear infinite; }
@keyframes ehp-rot { to { transform: rotate(360deg); } }
.ehp-building-t { font-family: var(--eh-sans); font-size: 19px; font-weight: 700; color: var(--eh-t1-pure); letter-spacing: -.3px; }
.ehp-building-s { font-family: var(--eh-mono); font-size: 12px; color: var(--eh-t2); margin-top: 9px; letter-spacing: .5px; }

/* doc */
.ehp-doc { position: relative; max-height: calc(100vh - 130px); overflow-y: auto; }
.ehp-bg { position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background: radial-gradient(ellipse 90% 60% at 8% 0%, rgba(59,130,246,.06), transparent 55%),
    radial-gradient(ellipse 70% 50% at 100% 30%, rgba(59,130,246,.03), transparent 60%); }
.ehp-page { position: relative; z-index: 1; max-width: 980px; margin: 0 auto; padding: 28px 32px; }

.ehp-eyebrow { font-family: var(--eh-mono); font-size: 12px; color: var(--eh-blue); letter-spacing: 2.2px;
  text-transform: uppercase; display: flex; align-items: center; gap: 10px; margin-bottom: 13px; }
.ehp-eyebrow::before { content: ''; width: 24px; height: 1px; background: var(--eh-blue); opacity: .5; }

.ehp-hdr { display: grid; grid-template-columns: 1fr 290px; gap: 40px; align-items: start;
  border-bottom: 1px solid var(--eh-border); padding-bottom: 26px; }
.ehp-h1 { font-family: var(--eh-sans); font-weight: 800; font-size: 42px; line-height: .98; letter-spacing: -1.4px;
  color: var(--eh-blue); margin-bottom: 6px; display: flex; align-items: center; gap: 15px; flex-wrap: wrap; }
.ehp-fav { width: 44px; height: 44px; border-radius: 11px; object-fit: contain; background: #fff; padding: 5px; flex-shrink: 0; }
.ehp-fav.mono { display: inline-flex; align-items: center; justify-content: center; padding: 0;
  background: linear-gradient(135deg, var(--eh-blue), var(--eh-blue-600)); color: #fff;
  font-family: var(--eh-sans); font-weight: 800; font-size: 22px; letter-spacing: -1px; }
.ehp-ids { margin-top: 15px; display: flex; flex-wrap: wrap; gap: 7px; }
.ehp-id { font-family: var(--eh-mono); font-size: 10px; color: var(--eh-blue); background: rgba(59,130,246,.06);
  border: 1px solid var(--eh-border-blue-soft); padding: 6px 11px; border-radius: 4px; letter-spacing: .6px; }
.ehp-id b { color: var(--eh-t2); font-weight: 400; margin-right: 6px; opacity: .8; }
.ehp-dom-big { display: inline-flex; align-items: center; gap: 12px; margin-top: 17px;
  font-family: var(--eh-mono); font-weight: 500; font-size: 24px; letter-spacing: -1px; color: var(--eh-blue); }
.ehp-dom-big::before { content: '⌖'; font-size: 20px; opacity: .65; }
.ehp-ext { font-family: var(--eh-sans); font-size: 11px; letter-spacing: 1px; text-transform: uppercase;
  color: var(--eh-t2); border: 1px solid var(--eh-border); border-radius: 100px; padding: 4px 11px; }
.ehp-blurb { margin-top: 16px; font-size: 14px; line-height: 1.65; color: var(--eh-t-soft); max-width: 560px; font-weight: 300; }

.ehp-contact-card { background: var(--eh-surface-2); border: 1px solid var(--eh-border-blue); border-radius: 14px; overflow: hidden; }
.ehp-cc-head { display: flex; align-items: center; gap: 9px; padding: 15px 20px; border-bottom: 1px solid var(--eh-border-blue-soft);
  font-family: var(--eh-mono); font-size: 10px; letter-spacing: 2px; text-transform: uppercase; color: var(--eh-blue); }
.ehp-ccd { width: 6px; height: 6px; border-radius: 50%; background: var(--eh-success); box-shadow: 0 0 7px var(--eh-success); }
.ehp-cc-body { padding: 4px 20px 16px; }
.ehp-cc-item { padding: 11px 0; border-bottom: 1px solid rgba(255,255,255,.05); }
.ehp-cc-item:last-child { border-bottom: none; }
.ehp-cc-k { font-family: var(--eh-mono); font-size: 9.5px; letter-spacing: 1.4px; text-transform: uppercase; color: var(--eh-t2); margin-bottom: 7px; }
.ehp-cc-v { font-size: 15px; color: var(--eh-t1-pure); line-height: 1.5; font-weight: 500; }
.ehp-cc-v.na { color: var(--eh-t2); font-style: italic; opacity: .7; font-size: 13px; font-weight: 400; }
.ehp-ln { display: block; font-family: var(--eh-mono); font-size: 14px; font-weight: 400; color: var(--eh-t-body); }
.ehp-ln.addr { font-family: var(--eh-sans); font-size: 15px; font-weight: 600; color: var(--eh-t1-pure); }

.ehp-section { padding: 26px 0; border-bottom: 1px solid var(--eh-border); }
.ehp-h2 { font-family: var(--eh-sans); font-weight: 800; font-size: 21px; color: var(--eh-t1-pure); letter-spacing: -.6px; margin-bottom: 17px; }

.ehp-drows { border: 1px solid var(--eh-border); border-radius: 12px; overflow: hidden; background: var(--eh-surface-2); }
.ehp-drow { display: grid; grid-template-columns: 210px 1fr auto; gap: 18px; padding: 14px 20px;
  border-bottom: 1px solid rgba(255,255,255,.04); align-items: center; }
.ehp-drow:last-child { border-bottom: none; }
.ehp-k { font-family: var(--eh-mono); font-size: 10px; letter-spacing: 1.2px; text-transform: uppercase; color: var(--eh-t2); }
.ehp-v { font-size: 14px; color: var(--eh-t1); line-height: 1.5; }
.ehp-v.mono { font-family: var(--eh-mono); font-size: 12.5px; color: var(--eh-t-body); word-break: break-word; }
.ehp-v.na { color: var(--eh-t2); font-style: italic; opacity: .6; font-size: 12.5px; }
.ehp-tag { font-family: var(--eh-mono); font-size: 9px; letter-spacing: 1px; text-transform: uppercase;
  color: var(--eh-success); display: flex; align-items: center; gap: 6px; white-space: nowrap; }
.ehp-tag::before { content: ''; width: 5px; height: 5px; border-radius: 50%; background: var(--eh-success); box-shadow: 0 0 6px var(--eh-success); }
.ehp-tag.na { color: var(--eh-t2); } .ehp-tag.na::before { background: var(--eh-t2); box-shadow: none; }
.ehp-h2list { display: flex; flex-wrap: wrap; gap: 7px; }
.ehp-hh { font-family: var(--eh-mono); font-size: 11px; color: var(--eh-t-soft); background: rgba(255,255,255,.03);
  border: 1px solid var(--eh-border); border-radius: 4px; padding: 5px 11px; }
.ehp-hh b { color: var(--eh-t2); font-weight: 400; margin-right: 7px; }

/* brechas del Risk Score → resueltas (el corazón) */
.ehp-fix { background: rgba(96,165,250,.035); border-radius: 14px; padding: 24px 22px; border: 1px solid var(--eh-border-blue-soft); }
.ehp-sec-note { font-size: 13px; color: var(--eh-t-muted); line-height: 1.6; margin: -8px 0 16px; max-width: 640px; }
.ehp-fixgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.ehp-fixrow { display: flex; align-items: flex-start; gap: 11px; padding: 12px 14px;
  background: var(--eh-surface-2); border: 1px solid var(--eh-border); border-radius: 10px; }
.ehp-fixcheck { flex-shrink: 0; width: 20px; height: 20px; border-radius: 50%;
  background: rgba(96,165,250,.14); color: var(--eh-success); font-size: 12px; font-weight: 700;
  display: inline-flex; align-items: center; justify-content: center; box-shadow: 0 0 10px rgba(96,165,250,.25); }
.ehp-fixtxt { display: flex; flex-direction: column; gap: 3px; }
.ehp-fixitem { font-size: 13.5px; color: var(--eh-t-soft); line-height: 1.45; font-weight: 500; }
.ehp-fixcat { font-family: var(--eh-mono); font-size: 8.5px; letter-spacing: 1.2px; text-transform: uppercase; color: var(--eh-blue); opacity: .85; }

/* contexto de mercado (economic_profile por CP) */
.ehp-zgrid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.ehp-zc { background: rgba(96,165,250,.04); border: 1px solid var(--eh-border-blue-soft); border-radius: 9px; padding: 15px; }
.ehp-zk { font-family: var(--eh-mono); font-size: 8.5px; letter-spacing: 1.2px; text-transform: uppercase; color: var(--eh-t2); margin-bottom: 7px; line-height: 1.3; }
.ehp-zv { font-family: var(--eh-sans); font-weight: 800; font-size: 21px; color: var(--eh-t1-pure); letter-spacing: -.5px; line-height: 1.1; }
.ehp-zv.blue { color: var(--eh-blue); } .ehp-zv.alto { color: var(--eh-success); }
.ehp-zsource { font-family: var(--eh-mono); font-size: 9.5px; color: var(--eh-t2); letter-spacing: .5px; margin-top: 14px; }
@media (max-width: 820px) { .ehp-zgrid { grid-template-columns: 1fr 1fr; } }

/* servicios estructurados (H2 → Service) */
.ehp-svcs { display: flex; flex-direction: column; gap: 8px; }
.ehp-svc { display: flex; align-items: center; gap: 14px; padding: 12px 16px;
  background: var(--eh-surface-2); border: 1px solid var(--eh-border); border-radius: 9px; }
.ehp-svc-k { flex-shrink: 0; font-family: var(--eh-mono); font-size: 9px; letter-spacing: 1.3px; text-transform: uppercase;
  color: var(--eh-success); border: 1px solid var(--eh-border-blue-soft); border-radius: 4px; padding: 4px 9px; background: rgba(96,165,250,.06); }
.ehp-svc-n { font-size: 14.5px; color: var(--eh-t1-pure); font-weight: 500; line-height: 1.4; }

/* before → after */
.ehp-beforeafter { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.ehp-ba-chip { font-family: var(--eh-mono); font-size: 11px; letter-spacing: .4px; padding: 8px 13px; border-radius: 7px; }
.ehp-ba-chip.before { color: var(--eh-warning); border: 1px solid var(--eh-warning); background: rgba(251,191,36,.05); }
.ehp-ba-chip.after { color: var(--eh-success); border: 1px solid var(--eh-border-blue); background: rgba(96,165,250,.07); flex: 1; min-width: 200px; }
.ehp-ba-arrow { color: var(--eh-blue); font-size: 17px; font-weight: 700; }

.ehp-ld { background: #05050B; border: 1px solid var(--eh-border); border-radius: 10px; padding: 18px 20px;
  font-family: var(--eh-mono); font-size: 11px; line-height: 1.7; color: var(--eh-t-muted); overflow-x: auto; white-space: pre-wrap; }
.ehp-ld-note { font-family: var(--eh-mono); font-size: 10px; color: var(--eh-t2); letter-spacing: .4px; margin-top: 12px; line-height: 1.5; }

.ehp-ref { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap;
  padding: 22px 24px; margin-top: 22px; background: rgba(59,130,246,.05); border: 1px solid var(--eh-border-blue); border-radius: 14px; }
.ehp-rx { font-size: 13px; color: var(--eh-t-muted); line-height: 1.6; max-width: 540px; }
.ehp-rx b { color: var(--eh-t-soft); font-weight: 600; }
.ehp-ref-actions { display: flex; flex-direction: column; gap: 9px; }
.ehp-refbtn { white-space: nowrap; text-align: center; font-family: var(--eh-sans); font-size: 13.5px; font-weight: 600;
  border-radius: 8px; padding: 12px 20px; cursor: pointer; transition: .2s cubic-bezier(.22,.61,.36,1); border: 1px solid var(--eh-blue); }
.ehp-refbtn.primary { background: var(--eh-blue); color: #fff; }
.ehp-refbtn.primary:hover { background: #fff; color: #061018; border-color: #fff; }

.ehp-ft { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  padding: 22px 0 6px; margin-top: 8px; }
.ehp-ft-brand { font-family: var(--eh-sans); font-weight: 800; font-size: 15px; color: var(--eh-t1-pure); letter-spacing: .04em; }
.ehp-ft-brand .ehp-ia { color: var(--eh-blue); }
.ehp-ft-brand sup { font-size: 9px; }
.ehp-ft-verif { font-family: var(--eh-mono); font-size: 9.5px; color: var(--eh-t2); letter-spacing: .5px;
  display: flex; align-items: center; gap: 7px; max-width: 380px; line-height: 1.5; }
.ehp-ftd { width: 5px; height: 5px; border-radius: 50%; background: var(--eh-warning); box-shadow: 0 0 6px var(--eh-warning); flex-shrink: 0; }

@media (max-width: 820px) {
  .ehp-hdr { grid-template-columns: 1fr; gap: 28px; }
  .ehp-h1 { font-size: 33px; }
  .ehp-drow { grid-template-columns: 1fr; gap: 6px; }
  .ehp-ref { flex-direction: column; align-items: stretch; }
}

/* CTA en el paso Solución (debajo de p6_infra_close) */
.eh-cta-wrap { margin-top: 18px; }
.eh-cta {
  display: inline-flex; align-items: center; gap: 10px; cursor: pointer;
  font-family: var(--entia-font-body, 'DM Sans', sans-serif); font-size: 14.5px; font-weight: 600;
  color: #fff; background: linear-gradient(135deg, var(--entia-blue, #3B82F6), var(--entia-blue-600, #2563EB));
  border: 1px solid var(--entia-blue, #3B82F6); border-radius: 10px; padding: 13px 20px;
  transition: .2s cubic-bezier(.22,.61,.36,1); box-shadow: 0 0 0 rgba(59,130,246,0);
}
.eh-cta:hover { box-shadow: 0 8px 28px rgba(59,130,246,.35); transform: translateY(-1px); }
.eh-cta .eh-cta-ic { font-size: 15px; }
.eh-cta-sub { display: block; margin-top: 8px; font-family: var(--entia-font-mono, monospace);
  font-size: 11px; color: var(--entia-text-tertiary, #8b949e); letter-spacing: .4px; }
