/* Google AI Overview — glass gradient card (page 1, AJAX-injected) */
.ai-overview-mount{
  margin:0 0 1.5rem;
  opacity:0;
  transform:translateY(10px) scale(.99);
  transition:opacity .5s cubic-bezier(.22,1,.36,1),transform .5s cubic-bezier(.22,1,.36,1);
}
.ai-overview-mount--visible{
  opacity:1;
  transform:none;
}

.ai-overview-card{
  position:relative;
  border-radius:22px;
  overflow:hidden;
  isolation:isolate;
  background:
    radial-gradient(120% 130% at 0% 0%,rgba(66,133,244,.12),transparent 58%),
    radial-gradient(100% 120% at 100% 100%,rgba(52,168,83,.1),transparent 52%),
    radial-gradient(80% 90% at 50% 0%,rgba(251,188,5,.08),transparent 60%),
    linear-gradient(155deg,rgba(255,255,255,.95),rgba(248,250,252,.9));
  border:1px solid rgba(148,163,184,.22);
  box-shadow:
    0 16px 40px rgba(15,23,42,.08),
    inset 0 1px 0 rgba(255,255,255,.85);
  backdrop-filter:blur(16px);
  -webkit-backdrop-filter:blur(16px);
  color:#334155;
}

.ai-overview-glow{
  position:absolute;
  inset:-30%;
  background:conic-gradient(from 180deg at 50% 50%,rgba(66,133,244,.28),rgba(234,67,53,.16),rgba(251,188,5,.18),rgba(52,168,83,.2),rgba(66,133,244,.28));
  animation:ai-overview-glow 16s linear infinite;
  opacity:.18;
  pointer-events:none;
}
@keyframes ai-overview-glow{
  to{transform:rotate(360deg)}
}

.ai-overview-shimmer{
  position:absolute;
  inset:0;
  background:linear-gradient(105deg,transparent 35%,rgba(255,255,255,.08) 50%,transparent 65%);
  animation:ai-overview-shimmer 7s ease-in-out infinite;
  pointer-events:none;
}
@keyframes ai-overview-shimmer{
  0%,100%{transform:translateX(-120%)}
  50%{transform:translateX(120%)}
}

.ai-overview-inner{
  position:relative;
  z-index:1;
  padding:1.15rem 1.25rem 1.2rem;
}

.ai-overview-kicker{
  display:flex;
  align-items:center;
  gap:.45rem;
  margin-bottom:.55rem;
  font-size:.72rem;
  letter-spacing:.08em;
  text-transform:uppercase;
  color:#475569;
}
.ai-overview-sparkle{
  width:16px;
  height:16px;
  color:#2563eb;
  filter:drop-shadow(0 0 6px rgba(37,99,235,.35));
}
.ai-overview-label{font-weight:600}
.ai-overview-badge{
  margin-left:auto;
  padding:.15rem .5rem;
  border-radius:999px;
  font-size:.62rem;
  font-weight:700;
  letter-spacing:.06em;
  color:#0f172a;
  background:linear-gradient(135deg,#bfdbfe,#86efac 55%,#fde68a);
  box-shadow:0 4px 14px rgba(59,130,246,.25);
}

.ai-overview-title{
  margin:0 0 .55rem;
  font-family:'Space Grotesk',system-ui,sans-serif;
  font-size:clamp(1.15rem,2.2vw,1.45rem);
  line-height:1.25;
  font-weight:700;
  color:#f8fafc;
}

.ai-overview-summary{
  margin:0 0 .75rem;
  font-size:.92rem;
  line-height:1.6;
  color:rgba(226,232,240,.88);
}
.ai-overview-summary p{
  margin:0 0 .55rem;
}
.ai-overview-summary p:last-child{margin-bottom:0}

.ai-overview-sections{
  margin:0 0 .85rem;
}
.ai-overview-section{
  margin:0 0 .95rem;
}
.ai-overview-section:last-child{margin-bottom:0}
.ai-overview-section-title{
  margin:0 0 .45rem;
  font-family:'Space Grotesk',system-ui,sans-serif;
  font-size:1rem;
  line-height:1.35;
  font-weight:700;
  color:#1e293b;
}
.ai-overview-paragraph{
  margin:0 0 .55rem;
  font-size:.9rem;
  line-height:1.58;
  color:#334155;
}
.ai-overview-closing{
  margin:0 0 .85rem;
  font-size:.9rem;
  line-height:1.58;
  color:#334155;
}
.ai-overview-closing a{
  color:#2563eb;
  text-decoration:none;
  border-bottom:1px solid rgba(37,99,235,.25);
  transition:color .18s ease,border-color .18s ease;
}
.ai-overview-closing a:hover{
  color:#1d4ed8;
  border-bottom-color:rgba(29,78,216,.45);
}

.ai-overview-bullets{
  margin:0 0 .85rem;
  padding-left:1.15rem;
  color:#334155;
}
.ai-overview-bullets li{
  margin:.35rem 0;
  line-height:1.55;
  font-size:.9rem;
}
.ai-overview-bullet-label{
  font-weight:600;
  color:inherit;
}
.ai-overview-section .ai-overview-bullets{
  margin-top:.25rem;
}

.ai-overview-references-label{
  display:block;
  margin-bottom:.45rem;
  font-size:.68rem;
  letter-spacing:.08em;
  text-transform:uppercase;
  color:#64748b;
}
.ai-overview-reference-links{
  margin:0 0 .85rem;
  padding-left:1.15rem;
  list-style:disc;
}
.ai-overview-reference-links li{
  margin:.3rem 0;
  line-height:1.5;
  font-size:.86rem;
}
.ai-overview-reference-links a{
  color:#2563eb;
  text-decoration:none;
  border-bottom:1px solid rgba(37,99,235,.25);
  transition:color .18s ease,border-color .18s ease;
}
.ai-overview-reference-links a:hover{
  color:#1d4ed8;
  border-bottom-color:rgba(29,78,216,.45);
}

.ai-overview-sources-label{
  display:block;
  margin-bottom:.45rem;
  font-size:.68rem;
  letter-spacing:.08em;
  text-transform:uppercase;
  color:#64748b;
}
.ai-overview-source-chips{
  display:flex;
  flex-wrap:wrap;
  gap:.45rem;
}
.ai-overview-source-chip{
  display:inline-flex;
  align-items:center;
  gap:.35rem;
  max-width:100%;
  padding:.35rem .65rem;
  border-radius:999px;
  font-size:.74rem;
  font-weight:500;
  text-decoration:none;
  color:#1e293b;
  background:rgba(255,255,255,.75);
  border:1px solid rgba(148,163,184,.28);
  transition:transform .18s ease,border-color .18s ease,background .18s ease;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
.ai-overview-source-chip:hover{
  transform:translateY(-1px);
  border-color:rgba(37,99,235,.35);
  background:rgba(248,250,252,.95);
}
.ai-overview-source-dot{
  width:6px;
  height:6px;
  border-radius:50%;
  background:linear-gradient(135deg,#60a5fa,#34d399);
  flex-shrink:0;
}

/* Dark page surfaces — explicit theme, JS class, or OS dark preference */
html[data-theme="dark"] .ai-overview-card:not(.ai-overview-card--light),
.ai-overview-card--dark{
  background:
    radial-gradient(120% 130% at 0% 0%,rgba(66,133,244,.18),transparent 58%),
    radial-gradient(100% 120% at 100% 100%,rgba(52,168,83,.14),transparent 52%),
    radial-gradient(80% 90% at 50% 0%,rgba(251,188,5,.12),transparent 60%),
    linear-gradient(155deg,rgba(255,255,255,.08),rgba(255,255,255,.02));
  border-color:rgba(255,255,255,.16);
  box-shadow:
    0 20px 50px rgba(15,23,42,.28),
    inset 0 1px 0 rgba(255,255,255,.12);
  color:rgba(226,232,240,.88);
}
html[data-theme="dark"] .ai-overview-card:not(.ai-overview-card--light) .ai-overview-glow,
.ai-overview-card--dark .ai-overview-glow{opacity:.45}
html[data-theme="dark"] .ai-overview-card:not(.ai-overview-card--light) .ai-overview-kicker,
.ai-overview-card--dark .ai-overview-kicker{color:rgba(226,232,255,.82)}
html[data-theme="dark"] .ai-overview-card:not(.ai-overview-card--light) .ai-overview-sparkle,
.ai-overview-card--dark .ai-overview-sparkle{color:#93c5fd;filter:drop-shadow(0 0 8px rgba(147,197,253,.55))}
html[data-theme="dark"] .ai-overview-card:not(.ai-overview-card--light) .ai-overview-title,
.ai-overview-card--dark .ai-overview-title{color:#f8fafc}
html[data-theme="dark"] .ai-overview-card:not(.ai-overview-card--light) .ai-overview-summary,
html[data-theme="dark"] .ai-overview-card:not(.ai-overview-card--light) .ai-overview-summary p,
html[data-theme="dark"] .ai-overview-card:not(.ai-overview-card--light) .ai-overview-bullets,
html[data-theme="dark"] .ai-overview-card:not(.ai-overview-card--light) .ai-overview-bullets li,
html[data-theme="dark"] .ai-overview-card:not(.ai-overview-card--light) .ai-overview-paragraph,
html[data-theme="dark"] .ai-overview-card:not(.ai-overview-card--light) .ai-overview-closing,
.ai-overview-card--dark .ai-overview-summary,
.ai-overview-card--dark .ai-overview-summary p,
.ai-overview-card--dark .ai-overview-bullets,
.ai-overview-card--dark .ai-overview-bullets li,
.ai-overview-card--dark .ai-overview-paragraph,
.ai-overview-card--dark .ai-overview-closing{color:rgba(226,232,240,.88)}
html[data-theme="dark"] .ai-overview-card:not(.ai-overview-card--light) .ai-overview-section-title,
.ai-overview-card--dark .ai-overview-section-title{color:#e2e8f0}
html[data-theme="dark"] .ai-overview-card:not(.ai-overview-card--light) .ai-overview-references-label,
html[data-theme="dark"] .ai-overview-card:not(.ai-overview-card--light) .ai-overview-sources-label,
.ai-overview-card--dark .ai-overview-references-label,
.ai-overview-card--dark .ai-overview-sources-label{color:rgba(191,219,254,.75)}
html[data-theme="dark"] .ai-overview-card:not(.ai-overview-card--light) .ai-overview-reference-links li,
.ai-overview-card--dark .ai-overview-reference-links li{color:rgba(226,232,240,.88)}
html[data-theme="dark"] .ai-overview-card:not(.ai-overview-card--light) .ai-overview-closing a,
html[data-theme="dark"] .ai-overview-card:not(.ai-overview-card--light) .ai-overview-reference-links a,
.ai-overview-card--dark .ai-overview-closing a,
.ai-overview-card--dark .ai-overview-reference-links a{
  color:#bfdbfe;
  border-bottom-color:rgba(147,197,253,.35);
}
html[data-theme="dark"] .ai-overview-card:not(.ai-overview-card--light) .ai-overview-closing a:hover,
html[data-theme="dark"] .ai-overview-card:not(.ai-overview-card--light) .ai-overview-reference-links a:hover,
.ai-overview-card--dark .ai-overview-closing a:hover,
.ai-overview-card--dark .ai-overview-reference-links a:hover{
  color:#e0f2fe;
  border-bottom-color:rgba(224,242,254,.65);
}
html[data-theme="dark"] .ai-overview-card:not(.ai-overview-card--light) .ai-overview-source-chip,
.ai-overview-card--dark .ai-overview-source-chip{
  color:#e2e8f0;
  background:rgba(15,23,42,.35);
  border-color:rgba(148,163,184,.22);
}
html[data-theme="dark"] .ai-overview-card:not(.ai-overview-card--light) .ai-overview-source-chip:hover,
.ai-overview-card--dark .ai-overview-source-chip:hover{
  border-color:rgba(147,197,253,.45);
  background:rgba(30,41,59,.55);
}

@media(prefers-color-scheme:dark){
  html[data-theme="auto"] .ai-overview-card:not(.ai-overview-card--light),
  html:not([data-theme]) .ai-overview-card:not(.ai-overview-card--light){
    background:
      radial-gradient(120% 130% at 0% 0%,rgba(66,133,244,.18),transparent 58%),
      radial-gradient(100% 120% at 100% 100%,rgba(52,168,83,.14),transparent 52%),
      radial-gradient(80% 90% at 50% 0%,rgba(251,188,5,.12),transparent 60%),
      linear-gradient(155deg,rgba(255,255,255,.08),rgba(255,255,255,.02));
    border-color:rgba(255,255,255,.16);
    box-shadow:0 20px 50px rgba(15,23,42,.28),inset 0 1px 0 rgba(255,255,255,.12);
    color:rgba(226,232,240,.88);
  }
  html[data-theme="auto"] .ai-overview-card:not(.ai-overview-card--light) .ai-overview-glow,
  html:not([data-theme]) .ai-overview-card:not(.ai-overview-card--light) .ai-overview-glow{opacity:.45}
  html[data-theme="auto"] .ai-overview-card:not(.ai-overview-card--light) .ai-overview-kicker,
  html:not([data-theme]) .ai-overview-card:not(.ai-overview-card--light) .ai-overview-kicker{color:rgba(226,232,255,.82)}
  html[data-theme="auto"] .ai-overview-card:not(.ai-overview-card--light) .ai-overview-sparkle,
  html:not([data-theme]) .ai-overview-card:not(.ai-overview-card--light) .ai-overview-sparkle{color:#93c5fd;filter:drop-shadow(0 0 8px rgba(147,197,253,.55))}
  html[data-theme="auto"] .ai-overview-card:not(.ai-overview-card--light) .ai-overview-title,
  html:not([data-theme]) .ai-overview-card:not(.ai-overview-card--light) .ai-overview-title{color:#f8fafc}
  html[data-theme="auto"] .ai-overview-card:not(.ai-overview-card--light) .ai-overview-summary,
  html[data-theme="auto"] .ai-overview-card:not(.ai-overview-card--light) .ai-overview-summary p,
  html[data-theme="auto"] .ai-overview-card:not(.ai-overview-card--light) .ai-overview-bullets,
  html[data-theme="auto"] .ai-overview-card:not(.ai-overview-card--light) .ai-overview-bullets li,
  html[data-theme="auto"] .ai-overview-card:not(.ai-overview-card--light) .ai-overview-paragraph,
  html[data-theme="auto"] .ai-overview-card:not(.ai-overview-card--light) .ai-overview-closing,
  html:not([data-theme]) .ai-overview-card:not(.ai-overview-card--light) .ai-overview-summary,
  html:not([data-theme]) .ai-overview-card:not(.ai-overview-card--light) .ai-overview-summary p,
  html:not([data-theme]) .ai-overview-card:not(.ai-overview-card--light) .ai-overview-bullets,
  html:not([data-theme]) .ai-overview-card:not(.ai-overview-card--light) .ai-overview-bullets li,
  html:not([data-theme]) .ai-overview-card:not(.ai-overview-card--light) .ai-overview-paragraph,
  html:not([data-theme]) .ai-overview-card:not(.ai-overview-card--light) .ai-overview-closing{color:rgba(226,232,240,.88)}
  html[data-theme="auto"] .ai-overview-card:not(.ai-overview-card--light) .ai-overview-section-title,
  html:not([data-theme]) .ai-overview-card:not(.ai-overview-card--light) .ai-overview-section-title{color:#e2e8f0}
  html[data-theme="auto"] .ai-overview-card:not(.ai-overview-card--light) .ai-overview-references-label,
  html[data-theme="auto"] .ai-overview-card:not(.ai-overview-card--light) .ai-overview-sources-label,
  html:not([data-theme]) .ai-overview-card:not(.ai-overview-card--light) .ai-overview-references-label,
  html:not([data-theme]) .ai-overview-card:not(.ai-overview-card--light) .ai-overview-sources-label{color:rgba(191,219,254,.75)}
  html[data-theme="auto"] .ai-overview-card:not(.ai-overview-card--light) .ai-overview-reference-links li,
  html:not([data-theme]) .ai-overview-card:not(.ai-overview-card--light) .ai-overview-reference-links li{color:rgba(226,232,240,.88)}
  html[data-theme="auto"] .ai-overview-card:not(.ai-overview-card--light) .ai-overview-closing a,
  html[data-theme="auto"] .ai-overview-card:not(.ai-overview-card--light) .ai-overview-reference-links a,
  html:not([data-theme]) .ai-overview-card:not(.ai-overview-card--light) .ai-overview-closing a,
  html:not([data-theme]) .ai-overview-card:not(.ai-overview-card--light) .ai-overview-reference-links a{
    color:#bfdbfe;
    border-bottom-color:rgba(147,197,253,.35);
  }
  html[data-theme="auto"] .ai-overview-card:not(.ai-overview-card--light) .ai-overview-closing a:hover,
  html[data-theme="auto"] .ai-overview-card:not(.ai-overview-card--light) .ai-overview-reference-links a:hover,
  html:not([data-theme]) .ai-overview-card:not(.ai-overview-card--light) .ai-overview-closing a:hover,
  html:not([data-theme]) .ai-overview-card:not(.ai-overview-card--light) .ai-overview-reference-links a:hover{
    color:#e0f2fe;
    border-bottom-color:rgba(224,242,254,.65);
  }
  html[data-theme="auto"] .ai-overview-card:not(.ai-overview-card--light) .ai-overview-source-chip,
  html:not([data-theme]) .ai-overview-card:not(.ai-overview-card--light) .ai-overview-source-chip{
    color:#e2e8f0;
    background:rgba(15,23,42,.35);
    border-color:rgba(148,163,184,.22);
  }
  html[data-theme="auto"] .ai-overview-card:not(.ai-overview-card--light) .ai-overview-source-chip:hover,
  html:not([data-theme]) .ai-overview-card:not(.ai-overview-card--light) .ai-overview-source-chip:hover{
    border-color:rgba(147,197,253,.45);
    background:rgba(30,41,59,.55);
  }
}

.lite-results ~ .ai-overview-mount,
.main .ai-overview-mount{margin-top:.25rem}
