/* JEF Explorer 0.5.0 · ficha de consulta rápida y explorador */
.jef5{--j5-navy:var(--jf-navy,#071a3d);--j5-blue:var(--jf-blue,#1769e0);--j5-orange:#a94308;--j5-line:var(--jf-line,#dfe6f1);--j5-bg:var(--jf-bg,#f4f7fc);--j5-muted:var(--jf-muted,#4a5672);--j5-radius:18px}
.jef5 h2{font-size:clamp(1.3rem,2.4vw,1.65rem);line-height:1.2;color:var(--j5-navy);margin:0 0 14px}
.jef5 h3{font-size:1.08rem;color:var(--j5-navy);margin:0 0 10px}

/* Cabecera: esquema + título + resumen */
.jef5 .jef5-hero{display:grid;grid-template-columns:minmax(0,1.15fr) minmax(0,1fr);gap:28px;align-items:start}
.jef5 .jef5-hero h1{margin:8px 0 12px;font-size:clamp(1.7rem,4vw,2.5rem);line-height:1.1}
.jef5-summary p{margin:0 0 10px;font-size:1.02rem;line-height:1.6}
.jef5-summary p:last-child{margin-bottom:0}
.jef5-figure{margin:0}
.jef5-zoom{display:block;position:relative;border-radius:var(--j5-radius);overflow:hidden;background:#fff;border:1px solid var(--j5-line);cursor:zoom-in}
.jef5-zoom img{display:block;width:100%;height:auto}
.jef5-zoom-label{position:absolute;right:10px;bottom:10px;background:rgba(7,26,61,.88);color:#fff;font-weight:700;font-size:13px;padding:6px 12px;border-radius:999px}
.jef5-zoom:focus-visible{outline:3px solid var(--j5-blue);outline-offset:3px}
.jef5 .jef5-chips{list-style:none;padding:0;margin:14px 0 0;display:flex;flex-wrap:wrap;gap:8px}
.jef5 .jef5-chips li{margin:0}

/* Datos clave */
.jef5-facts{display:grid;grid-template-columns:repeat(auto-fit,minmax(190px,1fr));gap:12px;margin:22px 0;padding:0}
.jef5-fact{display:flex;gap:12px;align-items:flex-start;background:#fff;border:1px solid var(--j5-line);border-radius:14px;padding:14px 16px}
.jef5-fact-icon{font-size:22px;line-height:1}
.jef5-fact dt{font-size:12px;font-weight:800;letter-spacing:.06em;text-transform:uppercase;color:var(--j5-muted);margin:0 0 2px}
.jef5-fact dd{margin:0;line-height:1.4}
.jef5-fact dd strong{display:block;color:var(--j5-navy)}
.jef5-fact dd span{display:block;font-size:14px;color:var(--j5-muted);margin-top:2px}
.jef5-fact dd .jef5-sim{color:#0f6e3d;font-weight:600}

/* Navegación interna */
.jef5 .jef5-tabs{display:flex;flex-wrap:wrap;gap:8px;margin:0 0 22px;position:static}
.jef5 .jef5-tabs a{display:inline-block;padding:8px 14px;border-radius:999px;border:1px solid var(--j5-line);background:#fff;color:var(--j5-navy);font-weight:700;text-decoration:none;font-size:14px}
.jef5 .jef5-tabs a:hover,.jef5 .jef5-tabs a:focus-visible{background:var(--j5-navy);color:#fff}

/* Cómo se juega */
.jef5-how{background:#fff;border:1px solid var(--j5-line);border-radius:var(--j5-radius);padding:22px;margin:0 0 22px}
.jef5-how-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(280px,1fr));gap:22px}
.jef5-step-block ol{margin:0;padding:0;list-style:none;counter-reset:jef5}
.jef5-step-block ol li{counter-increment:jef5;position:relative;padding:0 0 10px 40px;margin:0;line-height:1.55}
.jef5-step-block ol li::before{content:counter(jef5);position:absolute;left:0;top:0;width:28px;height:28px;border-radius:50%;background:var(--j5-navy);color:#fff;font-weight:800;font-size:14px;display:flex;align-items:center;justify-content:center}
.jef5-step-block p{margin:0;line-height:1.55}
.jef5-tip{margin:16px 0 0;padding:12px 16px;border-radius:12px;background:#fff7e0;border:1px solid #f5d27a;line-height:1.5}

/* Seguridad, variantes, adaptaciones */
.jef5-cards{display:grid;grid-template-columns:repeat(auto-fit,minmax(260px,1fr));gap:16px;margin:0 0 22px}
.jef5 .jef5-card h2{font-size:1.15rem;margin:0 0 8px}
.jef5 .jef5-card ul{margin:0;padding-left:18px}
.jef5 .jef5-card li{margin:0 0 6px;line-height:1.5}
.jef5 .jef5-card p{margin:0;line-height:1.5}

/* Indicadores */
.jef5-radar{margin:0 0 22px}
.jef5 .jef-radar-row.is-pending strong{color:var(--j5-muted);font-weight:600;font-style:italic}
.jef5-help{margin-top:12px;font-size:14px;line-height:1.5}
.jef5-help summary{cursor:pointer;font-weight:700;color:var(--j5-blue)}
.jef5-help p{margin:8px 0 0}

/* Para profundizar */
.jef5-deep{border-top:3px solid var(--j5-line);padding-top:20px}
.jef5-deep-kicker{font-size:13px;font-weight:800;letter-spacing:.06em;text-transform:uppercase;color:var(--j5-muted);margin:0 0 12px}
.jef5-source{margin-top:22px;padding:14px 16px;border-radius:12px;background:var(--j5-bg);font-size:14px}
.jef5-source h2{font-size:1rem;margin:0 0 6px}
.jef5-print-foot{display:none}

/* Esquema ampliado */
.jef5-lightbox{border:0;padding:0;max-width:min(96vw,1400px);max-height:94vh;background:#fff;border-radius:14px;overflow:auto}
.jef5-lightbox::backdrop{background:rgba(7,26,61,.82)}
.jef5-lightbox img{display:block;width:100%;height:auto;min-width:min(1100px,94vw)}
.jef5-lightbox-close{position:sticky;top:8px;left:calc(100% - 52px);margin:8px 8px -52px auto;display:block;width:44px;height:44px;border-radius:50%;border:0;background:var(--jf-navy,#071a3d);color:#fff;font-size:20px;cursor:pointer;z-index:2}

/* Explorador */
.jef5-explorer .jef5-field{display:flex;flex-direction:column;gap:6px;min-width:0}
.jef5-explorer .jef5-field label{font-weight:700;font-size:14px;color:var(--jf-navy,#071a3d)}
.jef5-explorer .jef5-field select{width:100%}
.jef5-filter-help{margin:12px 0 0;font-size:14px;line-height:1.5;color:var(--jf-muted,#4a5672)}
.jef5-sort{display:flex;align-items:center;gap:8px}
.jef5-sort label{font-size:14px;font-weight:700}
.jef5-active{display:flex;flex-wrap:wrap;gap:8px;align-items:center;margin:0 0 16px}
.jef5-active[hidden]{display:none}
.jef5-active-label{font-size:14px;font-weight:700;color:var(--jf-muted,#4a5672)}
.jef5-chip,.jef5-suggest-btn{display:inline-flex;align-items:center;gap:6px;min-height:40px;padding:6px 14px;border-radius:999px;border:1px solid var(--jf-line,#dfe6f1);background:#fff;color:var(--jf-navy,#071a3d);font:inherit;font-size:14px;font-weight:700;cursor:pointer}
.jef5-chip span{font-weight:500;color:var(--jf-muted,#4a5672)}
.jef5-chip b{font-size:12px;margin-left:2px}
.jef5-chip:hover,.jef5-suggest-btn:hover{background:var(--jf-navy,#071a3d);color:#fff}
.jef5-chip:hover span{color:#fff}
.jef5-suggest{display:flex;flex-wrap:wrap;gap:8px;justify-content:center;margin-top:10px}
.jef5-suggest-btn span{font-weight:500}
.jef5-explorer .jef-metric.is-pending strong{font-style:italic;font-weight:600}
.jef5-explorer .jef-card-image img{aspect-ratio:3/2;object-fit:cover;width:100%;height:auto}
.jef5-explorer :is(button,select,input,a):focus-visible,.jef5 :is(button,a,summary):focus-visible{outline:3px solid var(--jf-blue,#1769e0);outline-offset:2px}

@media (max-width:860px){
  .jef5 .jef5-hero{grid-template-columns:1fr;gap:18px}
}
@media (max-width:480px){
  .jef5-facts{grid-template-columns:1fr 1fr;gap:8px}
  .jef5-fact{padding:10px 12px;gap:8px}
  .jef5-fact-icon{font-size:18px}
  .jef5-how{padding:16px}
  .jef5-zoom-label{font-size:12px;padding:5px 10px}
}
@media (max-width:360px){.jef5-facts{grid-template-columns:1fr}}
@media (prefers-reduced-motion:reduce){.jef5 *,.jef5-explorer *{transition:none!important;animation:none!important}}

/* Impresión: ficha para llevar a clase */
@media print{
  @page{margin:12mm}
  body.jef-game-page header.site-header,body.jef-game-page footer,body.jef-game-page .site-footer,body.jef-game-page #secondary,body.jef-game-page .ast-breadcrumbs-wrapper,body.jef-game-page .rank-math-breadcrumb,body.jef-game-page .comments-area,body.jef-game-page .post-navigation,.jef5-noprint,.jef5-deep,.jef5-tabs,.jef5-zoom-label,.jef5-help,.jef5-lightbox{display:none!important}
  .jef5{font-size:11pt;color:#000}
  .jef5 .jef5-hero{grid-template-columns:42% 1fr;gap:14px;box-shadow:none!important;border:0!important;padding:0!important;background:none!important}
  .jef5 .jef5-hero h1{font-size:20pt;margin:0 0 6px;color:#000!important}
  .jef5-summary p{font-size:10.5pt;margin:0 0 4px}
  .jef5-zoom{border:1px solid #999}
  .jef5-facts{grid-template-columns:repeat(3,1fr);gap:6px;margin:10px 0}
  .jef5-fact{padding:6px 8px;border:1px solid #999;break-inside:avoid}
  .jef5-how,.jef5 .jef5-card,.jef5-radar{border:1px solid #999!important;box-shadow:none!important;padding:10px!important;break-inside:avoid;background:#fff!important}
  .jef5-how-grid{grid-template-columns:1fr 1fr;gap:12px}
  .jef5-step-block ol li{padding-left:26px;padding-bottom:4px}
  .jef5-step-block ol li::before{width:18px;height:18px;font-size:9pt;background:#000!important;-webkit-print-color-adjust:exact;print-color-adjust:exact}
  .jef5-cards{grid-template-columns:repeat(3,1fr);gap:8px}
  .jef5 .jef5-card .jef-detail-icon{display:none}
  .jef5-print-foot{display:block;margin-top:8px;font-size:9pt;color:#444}
  .jef5 a{color:#000!important;text-decoration:none!important}
}

/* Buscador rápido (portada) */
.jef5-mini{background:#fff;border:1px solid var(--jf-line,#dfe6f1);border-radius:20px;padding:22px;box-shadow:var(--jf-shadow,0 10px 30px rgba(7,26,61,.08))}
.jef5-mini-title{margin:0 0 14px;font-size:clamp(1.25rem,2.6vw,1.6rem);color:var(--jf-navy,#071a3d)}
.jef5-mini-form{display:grid;grid-template-columns:1.4fr repeat(3,minmax(0,1fr)) auto;gap:12px;align-items:end}
.jef5-mini-field{display:flex;flex-direction:column;gap:6px;min-width:0}
.jef5-mini-field label{font-weight:700;font-size:14px;color:var(--jf-navy,#071a3d)}
.jef5-mini-field input,.jef5-mini-field select{width:100%;min-height:46px;border-radius:12px;border:1px solid #b9c4d6;padding:8px 12px;font:inherit;background:#fff;color:#14213d}
.jef5-mini-submit{min-height:46px;border:0;border-radius:12px;padding:0 20px;background:#a94308;color:#fff;font:inherit;font-weight:800;cursor:pointer;white-space:nowrap}
.jef5-mini-submit:hover{background:#8a3606}
.jef5-mini :is(input,select,button,a):focus-visible{outline:3px solid var(--jf-blue,#1769e0);outline-offset:2px}
.jef5-mini-foot{margin:12px 0 0;font-size:14px;color:var(--jf-muted,#4a5672)}
.jef5-mini-foot a{font-weight:700}
.jef5-mini--hero{margin-top:22px;background:rgba(255,255,255,.96);color:#14213d}
.jef5-mini--hero .jef5-mini-form{grid-template-columns:1fr 1fr}
.jef5-mini--hero .jef5-mini-q{grid-column:1/-1}
.jef5-mini--hero .jef5-mini-submit{grid-column:1/-1}
@media (max-width:980px){.jef5-mini-form{grid-template-columns:1fr 1fr}.jef5-mini-q,.jef5-mini-submit{grid-column:1/-1}}
@media (max-width:480px){.jef5-mini{padding:16px}.jef5-mini-form,.jef5-mini--hero .jef5-mini-form{grid-template-columns:1fr}}

/* Ajustes 0.5.0 */
.jef5-fact-icon{flex-shrink:0;width:26px;text-align:center}
.jef5-fact--wide{grid-column:1/-1}
.jef5 .jef5-card p,.jef5 .jef5-card li{color:#2b3550}
@media print{
  .jef5 .jef5-card{display:block!important;padding:8px!important}
  .jef5-zoom img{max-height:290px;object-fit:contain}
  .jef5-step-block ol li,.jef5 .jef5-card li,.jef5-tip{font-size:10pt;line-height:1.35}
  .jef5 h2{font-size:13pt;margin:0 0 6px}
  .jef5 h3{font-size:11pt;margin:0 0 4px}
  .jef5-radar{padding:8px!important}
  .jef5-radar .jef-radar-row{padding:2px 0;min-height:0}
  .jef5-fact dd span{font-size:9.5pt}
}

/* ===== v4 · Unificación con la portada: acción naranja, iconos de línea, filtros alineados ===== */
:root{--jef-green:#a94308;--jef-green-dark:#8e3606;--jef-green-soft:#fdf1e9;--jef-orange:#f26b1d;--jef-purple:#1769e0}
.jf-svg{width:1.15em;height:1.15em;flex:none;vertical-align:-.18em;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.jef-eyebrow{color:#a94308!important}
.jef-hero h2 span{color:#a94308!important}
.jef-search-row button,.jef-primary,.jef-card-cta,.jef5-mini-submit{background:#a94308!important;color:#fff!important;border-radius:999px!important;font-weight:800}
.jef-search-row button:hover,.jef-primary:hover,.jef-card-cta:hover,.jef5-mini-submit:hover{background:#8e3606!important}
.jef-card-cta .jf-svg{width:18px;height:18px}
.jef5-mini-submit{display:inline-flex;align-items:center;justify-content:center;gap:8px}
.jef-search-icon{display:grid;place-items:center;color:#0d2b63}
.jef-search-icon .jf-svg{width:20px;height:20px}
.jef-stat-icon{display:grid!important;place-items:center;color:#fff}
.jef-stat-icon .jf-svg{width:20px;height:20px}
.jef-stat-blue{background:#0d2b63!important}
.jef-stat-green{background:#a94308!important}
.jef-link{display:inline-flex!important;align-items:center;gap:6px}
.jef-metric-dots i.is-on,.jef-radar-track.green i.is-on{background:#1769e0!important}
.jef-metric.intensity .jef-metric-dots i.is-on,.jef-radar-track.orange i.is-on{background:#f26b1d!important}
.jef-card-tag,.jef-card-tag.blue,.jef-card-tag.orange,.jef-game-badge,.jef-game-badge.green,.jef-game-badge.blue,.jef-game-badge.orange{background:#ffc233!important;color:#071a3d!important}
.jef-game-tabs a:hover,.jef-game-tabs a.is-active{color:#a94308!important;border-bottom-color:#a94308}
.jef-game-back a{gap:8px}
.jef-game-back a .jf-svg{width:18px;height:18px}

/* Iconos en tarjetas y fichas */
.jef-card-topline span{display:inline-flex;align-items:center;gap:5px}
.jef-card-topline .jf-svg{width:15px;height:15px;color:#0d2b63}
.jef-card-fact>.jf-svg{width:16px;height:16px;color:#1769e0;margin-top:2px}
.jef5-fact-icon{display:grid!important;place-items:center;width:38px!important;height:38px;border-radius:12px;background:#eef3fc;color:#0d2b63}
.jef5-fact-icon .jf-svg{width:20px;height:20px}
.jef-detail-icon{display:grid!important;place-items:center;color:#0d2b63;background:#eef3fc!important}
.jef-detail-icon .jf-svg{width:22px;height:22px}
.jef5-step-block h3{display:flex;align-items:center;gap:8px}
.jef5-step-block h3 .jf-svg{width:20px;height:20px;color:#a94308}
.jef5-tip .jf-svg{color:#a94308}
.jef5-zoom-label{display:inline-flex;align-items:center;gap:6px}
.jef5-zoom-label .jf-svg{width:15px;height:15px}
.jef5-empty-ico{display:grid;place-items:center;width:56px;height:56px;margin:0 auto 6px;border-radius:50%;background:#eef3fc;color:#0d2b63}
.jef5-empty-ico .jf-svg{width:26px;height:26px}
.jef5-chip .jf-svg{width:14px;height:14px}

/* Botones secundarios de la ficha: mismo estilo que los chips de la portada */
.jef-favorite-btn,.jef-print-btn{display:inline-flex!important;align-items:center;justify-content:center;gap:8px;min-height:44px;border-radius:999px!important;border:2px solid #dfe6f1!important;background:#fff!important;color:#071a3d!important;font-weight:700}
.jef-favorite-btn:hover,.jef-print-btn:hover{border-color:#071a3d!important}
.jef-favorite-btn.is-saved{border-color:#a94308!important;color:#a94308!important}
.jef-favorite-btn.is-saved .jf-svg{fill:currentColor}
.jef5 .jef-game-actions{display:flex;flex-wrap:wrap;gap:10px}
.jef5 .jef-game-actions button{flex:1 1 180px}

/* Filtros del Explorador alineados */
.jef5-explorer .jef-filters{display:grid!important;grid-template-columns:repeat(6,minmax(0,1fr));gap:14px 12px;align-items:end}
.jef5-explorer .jef5-field{min-width:0;margin:0}
.jef5-explorer .jef5-field label{display:flex!important;align-items:center;gap:6px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-size:13px!important;letter-spacing:.02em;text-transform:uppercase;color:#071a3d;margin:0}
.jef5-explorer .jef5-field label .jf-svg{width:16px;height:16px;color:#1769e0}
.jef5-explorer .jef5-field select{width:100%!important;max-width:100%;min-width:0;height:46px;box-sizing:border-box;margin:0}
.jef5-explorer .jef-filter-panel{padding:20px 22px!important}
.jef5-explorer .jef-filter-actions{justify-content:flex-start!important;margin-top:4px}
@media (max-width:1100px){.jef5-explorer .jef-filters{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media (max-width:600px){.jef5-explorer .jef-filters{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px 10px}}

/* Tarjetas: el esquema completo (4:3) */
.jef5-explorer .jef-card-image{height:auto!important;aspect-ratio:4/3;background:#fff}
.jef5-explorer .jef-card-image img{aspect-ratio:4/3!important;height:100%!important;object-fit:cover}
