/* Wikipedia knowledge entity — cosmic infinity card (page 1, AJAX-injected) */
.wiki-entity-mount{
  margin:0 0 1.75rem;
  opacity:0;
  transform:translateY(12px) scale(.985);
  transition:opacity .55s cubic-bezier(.22,1,.36,1),transform .55s cubic-bezier(.22,1,.36,1);
}
.wiki-entity-mount--visible{
  opacity:1;
  transform:none;
}

.wiki-entity-card{
  position:relative;
  border-radius:20px;
  overflow:hidden;
  isolation:isolate;
  background:
    radial-gradient(120% 140% at 0% 0%,rgba(120,90,255,.22),transparent 55%),
    radial-gradient(90% 120% at 100% 100%,rgba(0,210,255,.16),transparent 50%),
    linear-gradient(145deg,rgba(18,22,42,.92),rgba(8,10,24,.88));
  border:1px solid rgba(180,200,255,.18);
  box-shadow:
    0 24px 60px rgba(8,12,40,.35),
    inset 0 1px 0 rgba(255,255,255,.08);
  backdrop-filter:blur(14px);
  -webkit-backdrop-filter:blur(14px);
}

.wiki-entity-aurora{
  position:absolute;
  inset:-40%;
  background:conic-gradient(from 210deg at 50% 50%,rgba(99,102,241,.35),rgba(14,165,233,.2),rgba(168,85,247,.28),rgba(99,102,241,.35));
  animation:wiki-entity-aurora 14s linear infinite;
  opacity:.55;
  pointer-events:none;
  z-index:0;
}
@keyframes wiki-entity-aurora{
  to{transform:rotate(360deg)}
}

.wiki-entity-orbit{
  position:absolute;
  inset:0;
  pointer-events:none;
  z-index:1;
}
.wiki-entity-orbit span{
  position:absolute;
  width:6px;height:6px;border-radius:50%;
  background:radial-gradient(circle,#fff 0%,rgba(147,197,253,.2) 70%,transparent 100%);
  box-shadow:0 0 18px rgba(147,197,253,.75);
  animation:wiki-entity-orbit 9s ease-in-out infinite;
}
.wiki-entity-orbit span:nth-child(1){top:14%;right:12%;animation-delay:0s}
.wiki-entity-orbit span:nth-child(2){bottom:18%;left:10%;animation-delay:-3s;width:4px;height:4px}
.wiki-entity-orbit span:nth-child(3){top:42%;right:28%;animation-delay:-6s;width:3px;height:3px;opacity:.7}
@keyframes wiki-entity-orbit{
  0%,100%{transform:translate(0,0) scale(1);opacity:.55}
  50%{transform:translate(-8px,6px) scale(1.25);opacity:1}
}

.wiki-entity-inner{
  position:relative;
  z-index:2;
  display:grid;
  grid-template-columns:minmax(0,1fr);
  gap:1rem;
  padding:1.15rem 1.2rem 1.25rem;
}
@media(min-width:640px){
  .wiki-entity-inner{
    grid-template-columns:132px minmax(0,1fr);
    align-items:center;
    padding:1.25rem 1.35rem 1.35rem;
  }
}

.wiki-entity-thumb-wrap{
  position:relative;
  width:100%;
  max-width:132px;
  margin:0 auto;
  aspect-ratio:1;
  border-radius:16px;
  overflow:hidden;
}
.wiki-entity-thumb-glow{
  position:absolute;
  inset:-20%;
  background:radial-gradient(circle,rgba(129,140,248,.45),transparent 68%);
  animation:wiki-entity-pulse 4.5s ease-in-out infinite;
}
@keyframes wiki-entity-pulse{
  0%,100%{opacity:.45;transform:scale(.95)}
  50%{opacity:.9;transform:scale(1.05)}
}
.wiki-entity-thumb{
  position:relative;
  z-index:1;
  width:100%;
  height:100%;
  object-fit:cover;
  border-radius:16px;
  border:1px solid rgba(255,255,255,.22);
  box-shadow:0 10px 28px rgba(0,0,0,.35);
}

.wiki-entity-body{min-width:0}
.wiki-entity-kicker{
  display:flex;
  align-items:center;
  gap:.45rem;
  margin-bottom:.45rem;
  font-size:.72rem;
  letter-spacing:.08em;
  text-transform:uppercase;
  color:rgba(226,232,255,.78);
}
.wiki-entity-w-icon{width:15px;height:15px;opacity:.9}
.wiki-entity-source{font-weight:600}
.wiki-entity-infinity{
  margin-left:auto;
  font-size:1rem;
  line-height:1;
  background:linear-gradient(90deg,#a5b4fc,#67e8f9,#c4b5fd);
  -webkit-background-clip:text;
  background-clip:text;
  color:transparent;
  animation:wiki-entity-shimmer 3s ease-in-out infinite;
}
@keyframes wiki-entity-shimmer{
  0%,100%{filter:brightness(1)}
  50%{filter:brightness(1.35)}
}

.wiki-entity-title{
  margin:0 0 .35rem;
  font-family:'Space Grotesk',system-ui,sans-serif;
  font-size:clamp(1.2rem,2.4vw,1.55rem);
  line-height:1.2;
  font-weight:700;
}
.wiki-entity-title a{
  color:#f8fafc;
  text-decoration:none;
  background:linear-gradient(120deg,#fff 0%,#dbeafe 45%,#e9d5ff 100%);
  -webkit-background-clip:text;
  background-clip:text;
  color:transparent;
}
.wiki-entity-title a:hover{
  filter:brightness(1.08);
  text-decoration:underline;
  text-decoration-color:rgba(199,210,254,.55);
}

.wiki-entity-subtitle{
  margin:0 0 .5rem;
  font-size:.92rem;
  font-weight:500;
  color:rgba(191,219,254,.92);
  font-style:italic;
}
.wiki-entity-desc{
  margin:0 0 .85rem;
  font-size:.9rem;
  line-height:1.55;
  color:rgba(226,232,240,.86);
  display:-webkit-box;
  -webkit-line-clamp:4;
  -webkit-box-orient:vertical;
  overflow:hidden;
}

.wiki-entity-cta{
  display:inline-flex;
  align-items:center;
  gap:.35rem;
  padding:.45rem .85rem;
  border-radius:999px;
  font-size:.78rem;
  font-weight:600;
  letter-spacing:.03em;
  text-decoration:none;
  color:#0b1020;
  background:linear-gradient(135deg,#c7d2fe,#93c5fd 45%,#67e8f9);
  box-shadow:0 8px 22px rgba(56,189,248,.28);
  transition:transform .2s ease,box-shadow .2s ease;
}
.wiki-entity-cta:hover{
  transform:translateY(-1px);
  box-shadow:0 12px 28px rgba(56,189,248,.38);
}

/* Light theme surfaces (domain pages without dark results chrome) */
@media(prefers-color-scheme:light){
  .wiki-entity-card{
    background:
      radial-gradient(120% 140% at 0% 0%,rgba(99,102,241,.14),transparent 55%),
      radial-gradient(90% 120% at 100% 100%,rgba(14,165,233,.12),transparent 50%),
      linear-gradient(145deg,rgba(255,255,255,.92),rgba(248,250,252,.88));
    border-color:rgba(99,102,241,.18);
    box-shadow:0 18px 44px rgba(30,41,59,.12),inset 0 1px 0 rgba(255,255,255,.9);
  }
  .wiki-entity-kicker{color:#475569}
  .wiki-entity-title a{
    background:linear-gradient(120deg,#1e293b 0%,#4338ca 55%,#0e7490 100%);
    -webkit-background-clip:text;
    background-clip:text;
    color:transparent;
  }
  .wiki-entity-subtitle{color:#334155}
  .wiki-entity-desc{color:#475569}
}

/* Lite / minimal layouts */
.lite-results ~ .wiki-entity-mount,
.main .wiki-entity-mount{margin-top:.25rem}
