:root{
  --gg-blue:#0070ba;
  --gg-blue-dark:#005c94;
  --gg-border:rgba(0,0,0,.10);
  --gg-text:#222;
  --gg-muted:#5a6575;
  --night-bg:#1f1f1f;
  --night-topbar:#171717;
  --night-card:#242424;
  --night-border:#444;
  --night-text:#f2f2f2;
  --night-muted:#b5b5b5;
  --night-link:#8ab4f8;
}

*{box-sizing:border-box}
html{height:100%}

body{
  margin:0;
  min-height:100svh;
  min-height:100dvh;
  display:flex;
  flex-direction:column;
  font-family:system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Helvetica,Arial,sans-serif;
  font-size:16px;
  line-height:1.6;
  color:var(--gg-text);
  background:
    radial-gradient(900px 520px at 18% 0%,rgba(124,58,237,.10),transparent 55%),
    radial-gradient(900px 520px at 82% 0%,rgba(34,197,94,.07),transparent 55%),
    linear-gradient(180deg,#f6f7fb,#eef1f7);
  background-attachment:fixed;
}

a{color:#0067a8}

header.topnav{
  display:flex;
  align-items:center;
  justify-content:space-between;
  height:56px;
  padding:0 14px;
  border-bottom:1px solid #ddd;
  position:sticky;
  top:0;
  background:rgba(255,255,255,.96);
  z-index:50;
}

.brand-logo a{
  display:flex;
  flex-direction:column;
  align-items:center;
  text-decoration:none;
}

.brand-logo img{height:36px;display:block}

.gg-logo-wrap{
  display:inline-block;
  transform-origin:50% 50%;
  will-change:transform;
}

#ggLogoShimmer{
  height:2px;
  margin-top:4px;
  border-radius:2px;
  background:linear-gradient(90deg,transparent,#0070ba,transparent);
  background-size:200% 100%;
  opacity:0;
  width:0;
}

body.gg-loading #ggLogoShimmer{
  opacity:1;
  animation:ggShimmer .85s linear infinite;
}

@keyframes ggShimmer{
  from{background-position:-40px 0}
  to{background-position:40px 0}
}

@keyframes ggLogoBrandCycle{
  0%{filter:saturate(1.2) brightness(1.05) drop-shadow(0 0 6px rgba(42,123,42,.55))}
  25%{filter:saturate(1.6) brightness(1.12) drop-shadow(0 0 7px rgba(255,235,59,.60))}
  50%{filter:hue-rotate(95deg) saturate(1.35) brightness(1.05) drop-shadow(0 0 6px rgba(0,112,186,.55))}
  75%{filter:hue-rotate(-125deg) saturate(1.30) brightness(1.03) drop-shadow(0 0 6px rgba(200,50,50,.55))}
  100%{filter:saturate(1.2) brightness(1.05) drop-shadow(0 0 6px rgba(42,123,42,.55))}
}

body.gg-loading:not(.gg-night) .brand-logo img{
  animation:ggLogoBrandCycle 2.4s ease-in-out infinite;
}

body.gg-night .brand-logo img{
  filter:brightness(0) invert(1)!important;
  animation:none!important;
}

.top-actions{display:flex;gap:10px;align-items:center}

.btn{
  padding:7px 11px;
  border-radius:999px;
  font-size:14px;
  text-decoration:none;
  border:1px solid transparent;
  cursor:pointer;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  white-space:nowrap;
}

.btn-primary{background:var(--gg-blue);color:#fff;font-weight:800}
.btn-primary:hover{background:var(--gg-blue-dark)}

.btn-ghost{
  background:transparent;
  color:var(--gg-blue);
  border-color:var(--gg-blue);
}

.btn-ghost:hover{background:rgba(0,112,186,.08)}

.gg-page{
  width:100%;
  max-width:1040px;
  margin:0 auto;
  padding:18px 14px 28px;
  flex:1;
}

.gg-hero,.gg-card{
  background:rgba(255,255,255,.90);
  border:1px solid var(--gg-border);
  border-radius:16px;
  box-shadow:0 10px 28px rgba(0,0,0,.06);
}

.gg-hero{padding:24px;margin-bottom:18px}
.gg-card{padding:20px;margin:0 0 16px}

.gg-pill{
  display:inline-block;
  padding:5px 10px;
  border-radius:999px;
  background:rgba(0,112,186,.10);
  border:1px solid rgba(0,112,186,.22);
  color:#0b5d91;
  font-size:12px;
  font-weight:850;
}

.gg-hero h1{
  margin:8px 0 10px;
  font-size:clamp(30px,5vw,48px);
  line-height:1.08;
}

.gg-card h2{
  margin:0 0 10px;
  font-size:clamp(21px,3vw,29px);
  line-height:1.2;
}

.gg-card h3{margin:18px 0 7px}

.gg-lede{
  font-size:1.08rem;
  color:#394657;
  max-width:900px;
}

.gg-muted{color:var(--gg-muted)}

.gg-grid{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(245px,1fr));
  gap:14px;
}

.gg-mini{
  border:1px solid var(--gg-border);
  background:rgba(255,255,255,.72);
  border-radius:14px;
  padding:15px;
}

.gg-mini h3{margin:0 0 7px;font-size:1rem}
.gg-mini p{margin:0}

.gg-actions{
  display:flex;
  flex-wrap:wrap;
  gap:9px;
  margin-top:15px;
}

.gg-code{
  overflow:auto;
  white-space:pre;
  font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;
  background:#111827;
  color:#f8fafc;
  border-radius:12px;
  padding:15px;
  line-height:1.45;
}

.gg-callout{
  border-left:4px solid var(--gg-blue);
  background:rgba(0,112,186,.08);
  border-radius:10px;
  padding:12px 14px;
  margin:14px 0;
}

.gg-warning{
  border-left-color:#b7791f;
  background:rgba(183,121,31,.09);
}

.gg-footer{
  width:100%;
  text-align:center;
  padding:24px 14px 28px;
  font-size:13px;
  color:#687384;
}

.gg-footer-links{
  display:flex;
  justify-content:center;
  flex-wrap:wrap;
  gap:12px;
  margin-bottom:7px;
}

.gg-footer a{text-decoration:none}

#ggToggle{
  position:fixed;
  right:12px;
  bottom:12px;
  background:#fff;
  border:1px solid #ddd;
  border-radius:12px;
  padding:9px 11px;
  box-shadow:0 6px 18px rgba(0,0,0,.15);
  z-index:9999;
}

#ggToggle label{cursor:pointer;user-select:none}

body.gg-night{background:var(--night-bg);color:var(--night-text)}

body.gg-night header.topnav{
  background:var(--night-topbar);
  border-bottom-color:var(--night-border);
}

body.gg-night a{color:var(--night-link)}

body.gg-night .gg-muted,
body.gg-night .gg-lede,
body.gg-night .gg-footer{color:var(--night-muted)}

body.gg-night .gg-hero,
body.gg-night .gg-card,
body.gg-night .gg-mini{
  background:var(--night-card);
  border-color:var(--night-border);
  box-shadow:none;
}

body.gg-night .gg-callout{background:#203447}
body.gg-night .gg-warning{background:#3a2d1e}

body.gg-night #ggToggle{
  background:var(--night-card);
  border-color:var(--night-border);
}

@media(max-width:700px){
  header.topnav{padding:0 9px}
  .top-actions{gap:6px}
  .btn{font-size:13px;padding:6px 8px}
  .gg-page{padding:12px 10px 24px}
  .gg-hero{padding:18px 15px}
  .gg-card{padding:16px 14px}
}

/* GG_AI_DISCOVERY_CARDS_RESTORED_V1 */
.feed-grid{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(280px,1fr));
  gap:12px;
  margin-top:18px;
}
.feed-card{
  background:rgba(255,255,255,.90);
  border:1px solid var(--gg-border);
  border-radius:14px;
  padding:14px;
}
.feed-rank{
  font-size:13px;
  font-weight:800;
}
.feed-title{
  font-size:16px;
  font-weight:850;
  margin:4px 0 6px;
}
.feed-url{
  font-size:13px;
  color:var(--gg-muted);
  word-break:break-all;
}
.feed-links{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
  margin-top:10px;
}
.feed-links a{
  font-size:13px;
  text-decoration:none;
  border-bottom:1px solid rgba(0,112,186,.28);
}
body.gg-night .feed-card{
  background:var(--night-card);
  border-color:var(--night-border);
}
body.gg-night .feed-url{
  color:var(--night-muted);
}
