/* Graphics for the Google & Meta Ads page. Uses the page tokens (--bg, --surface, --border, --text, --muted, --accent). */
.ag-lead { margin: -16px 0 40px; max-width: 640px; color: var(--muted); font-size: 1.02rem; line-height: 1.65; }
.ag-demos { display: grid; grid-template-columns: 1.35fr 1fr; gap: 22px; align-items: stretch; }
.ag-fig { margin: 0; background: color-mix(in srgb, var(--surface) 70%, transparent); border: 1px solid var(--border); border-radius: 22px; padding: 26px; display: flex; flex-direction: column; gap: 18px; overflow: hidden; position: relative; }
.ag-fig figcaption { font-size: .78rem; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); display: flex; align-items: center; gap: 10px; }
.ag-fig figcaption::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 22%, transparent); }

/* 1. Google */
.ag-g { flex: 1; background: var(--bg); border: 1px solid var(--border); border-radius: 16px; padding: 18px; min-height: 380px; font-family: Arial, 'Inter', sans-serif; }
.ag-g-top { display: flex; align-items: center; gap: 14px; }
.ag-g-logo { font-weight: 700; font-size: 1.25rem; letter-spacing: -.02em; color: var(--text); }
.ag-g-in { flex: 1; display: flex; align-items: center; gap: 10px; border: 1px solid var(--border); border-radius: 100px; padding: 9px 16px; font-size: .92rem; color: var(--text); background: var(--surface); min-width: 0; }
.ag-g-in svg { width: 16px; height: 16px; color: var(--muted); flex: none; }
.ag-g-q { white-space: nowrap; overflow: hidden; }
.ag-caret { width: 1.5px; height: 1.1em; background: var(--accent); animation: agBlink 1s steps(1) infinite; flex: none; margin-left: -8px; }
@keyframes agBlink { 50% { opacity: 0; } }
.ag-g-tabs { display: flex; gap: 18px; font-size: .78rem; color: var(--muted); margin: 14px 0 0 4px; border-bottom: 1px solid var(--border); }
.ag-g-tabs span { padding-bottom: 8px; }
.ag-g-tabs .on { color: var(--text); border-bottom: 2px solid var(--accent); }
.ag-g-res { padding-top: 16px; display: flex; flex-direction: column; gap: 16px; }
.ag-g-ad { border-radius: 12px; padding: 14px; border: 1px solid transparent; opacity: 0; transform: translateY(14px); transition: opacity .6s var(--ease), transform .6s var(--ease), border-color .5s, box-shadow .5s; }
.ag-g.done .ag-g-ad { opacity: 1; transform: none; }
.ag-g.hit .ag-g-ad { border-color: color-mix(in srgb, var(--accent) 55%, transparent); box-shadow: 0 0 0 6px color-mix(in srgb, var(--accent) 10%, transparent), 0 24px 60px -30px color-mix(in srgb, var(--accent) 60%, transparent); }
.ag-g-meta { display: flex; gap: 10px; align-items: center; font-size: .74rem; line-height: 1.35; color: var(--muted); }
.ag-g-meta b { color: var(--text); font-weight: 700; }
.ag-fav { width: 26px; height: 26px; border-radius: 50%; background: var(--accent); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: .78rem; flex: none; }
.ag-g-title { margin-top: 8px; font-size: 1.12rem; line-height: 1.3; color: #8ab4f8; }
[data-theme="light"] .ag-g-title { color: #1a0dab; }
.ag-g-desc { margin-top: 4px; font-size: .84rem; line-height: 1.5; color: var(--muted); }
.ag-g-links { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.ag-g-links span { display: inline-flex; align-items: center; gap: 6px; font-size: .76rem; border: 1px solid var(--border); border-radius: 100px; padding: 5px 11px; color: var(--text); }
.ag-g-links .wa { background: #25d366; border-color: #25d366; color: #fff; font-weight: 600; }
.ag-g-links svg { width: 13px; height: 13px; }
.ag-g.hit .ag-g-links .wa { animation: agPop .6s var(--ease); }
@keyframes agPop { 40% { transform: scale(1.12); } }
.ag-g-org { display: flex; flex-direction: column; gap: 7px; padding: 0 14px; opacity: 0; transition: opacity .6s .3s; }
.ag-g.done .ag-g-org { opacity: .55; }
.ag-g-org i { display: block; height: 9px; border-radius: 6px; background: var(--border); }
.ag-g-org i:nth-child(1) { width: 34%; } .ag-g-org i:nth-child(2) { width: 72%; height: 12px; } .ag-g-org i:nth-child(3) { width: 90%; }

/* 2. Phone */
.ag-ph { flex: 1; display: grid; place-items: center; min-height: 380px; }
.ag-ph-scr { position: relative; width: 236px; height: 440px; border-radius: 38px; background: var(--bg); border: 8px solid #1d1d1b; box-shadow: 0 0 0 1px var(--border), 0 40px 80px -40px rgba(0,0,0,.6); overflow: hidden; display: flex; flex-direction: column; }
[data-theme="light"] .ag-ph-scr { border-color: #26261f; }
.ag-ph-bar { display: flex; justify-content: space-between; align-items: center; padding: 8px 18px 4px; font-size: .66rem; font-weight: 600; color: var(--text); }
.ag-notch { width: 64px; height: 18px; border-radius: 12px; background: #1d1d1b; }
.ag-sig { display: flex; gap: 2px; align-items: flex-end; }
.ag-sig i { width: 3px; background: var(--text); border-radius: 1px; } .ag-sig i:nth-child(1) { height: 4px; } .ag-sig i:nth-child(2) { height: 6px; } .ag-sig i:nth-child(3) { height: 8px; }
.ag-ph-app { display: flex; justify-content: space-between; align-items: center; padding: 6px 14px 8px; border-bottom: 1px solid var(--border); font-size: .84rem; }
.ag-ph-ic { display: flex; gap: 8px; } .ag-ph-ic i { width: 14px; height: 14px; border: 1.5px solid var(--text); border-radius: 4px; } .ag-ph-ic i:first-child { border-radius: 50%; }
.ag-ph-feed { flex: 1; overflow: hidden; position: relative; }
.ag-ph-track { padding: 10px 0; transition: transform 1.8s cubic-bezier(.65,0,.25,1); }
.ag-ph-track.jump { transition: none; }
.ag-post { padding: 0 0 14px; }
.ag-post-h { display: flex; align-items: center; gap: 8px; padding: 0 12px 8px; font-size: .7rem; line-height: 1.2; }
.ag-post-h small { display: block; color: var(--muted); font-size: .62rem; }
.ag-av { width: 26px; height: 26px; border-radius: 50%; background: var(--border); flex: none; display: grid; place-items: center; font-style: normal; font-weight: 700; font-size: .7rem; color: #fff; }
.ag-av-ad { background: linear-gradient(135deg, var(--accent), #7d55ff); box-shadow: 0 0 0 2px var(--bg), 0 0 0 3.5px var(--accent); }
.ag-ln { display: block; height: 8px; width: 46%; border-radius: 5px; background: var(--border); margin: 6px 12px 0; }
.ag-post-h .ag-ln { margin: 0; }
.ag-ln.w70 { width: 70%; } .ag-ln.w40 { width: 40%; }
.ag-post-m { height: 168px; background: color-mix(in srgb, var(--border) 70%, transparent); }
.ag-ad-m { position: relative; height: 230px; overflow: hidden; display: flex; align-items: flex-end; padding: 14px; color: #fff; font-weight: 700; font-size: 1.02rem; line-height: 1.2; letter-spacing: -.01em; }
.ag-ad-m span { position: relative; text-shadow: 0 2px 14px rgba(0,0,0,.45); }
.ag-ad-m.bg-r { background: linear-gradient(170deg, #ffb35c 0%, #e2622a 45%, #5a1a0e 100%); }
.ag-ad-m.bg-s { background: linear-gradient(170deg, #e9d8c2 0%, #a07a5a 50%, #2b211b 100%); }
.ag-ad-m.bg-d { background: linear-gradient(170deg, #7fe3d2 0%, #13806f 50%, #062b25 100%); }
.ag-sun { position: absolute; width: 90px; height: 90px; border-radius: 50%; top: 28px; right: 26px; background: radial-gradient(circle, rgba(255,247,220,.95), rgba(255,247,220,0) 70%); animation: agSun 5s ease-in-out infinite; }
@keyframes agSun { 50% { transform: translateY(8px) scale(1.06); } }
.ag-arch { position: absolute; bottom: 0; left: 22px; width: 70px; height: 120px; border-radius: 35px 35px 0 0; background: rgba(0,0,0,.28); }
.ag-arch.a2 { left: 104px; width: 50px; height: 86px; background: rgba(0,0,0,.18); }
.ag-ad-cta { display: flex; align-items: center; gap: 8px; padding: 10px 12px; background: #25d366; color: #fff; font-size: .74rem; font-weight: 600; position: relative; overflow: hidden; }
.ag-ad-cta svg { width: 14px; height: 14px; flex: none; } .ag-ad-cta span { flex: 1; }
.ag-ad-cta::after { content: ''; position: absolute; left: 50%; top: 50%; width: 16px; height: 16px; border-radius: 50%; background: rgba(255,255,255,.55); transform: translate(-50%,-50%) scale(0); opacity: 0; }
.ag-ph.tap .ag-ad-cta::after { animation: agTap .7s ease-out; }
@keyframes agTap { 0% { transform: translate(-50%,-50%) scale(0); opacity: 1; } 100% { transform: translate(-50%,-50%) scale(16); opacity: 0; } }
.ag-ad-cap { font-size: .7rem; padding: 8px 12px 0; color: var(--muted); line-height: 1.4; }
.ag-ad-cap b { color: var(--text); }
.ag-toast { position: absolute; left: 10px; right: 10px; top: 34px; display: flex; gap: 10px; align-items: center; background: color-mix(in srgb, var(--surface) 92%, transparent); backdrop-filter: blur(10px); border: 1px solid var(--border); border-radius: 16px; padding: 10px 12px; font-size: .68rem; line-height: 1.35; transform: translateY(-140%); transition: transform .6s var(--ease); box-shadow: 0 18px 40px -18px rgba(0,0,0,.6); }
.ag-toast > svg { width: 26px; height: 26px; color: #25d366; flex: none; }
.ag-toast b { display: block; } .ag-toast em { font-style: normal; color: var(--muted); }
.ag-ph.msg .ag-toast { transform: none; }

/* 3. Globe */
.ag-reach { display: grid; grid-template-columns: 1fr 1.25fr; gap: 40px; align-items: center; }
.ag-reach ul { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; margin-top: 26px; }
.ag-reach li { font-size: .82rem; border: 1px solid var(--border); border-radius: 100px; padding: 6px 13px; color: var(--muted); }
.ag-globe { position: relative; width: 100%; border-radius: 22px; overflow: hidden; -webkit-mask-image: radial-gradient(ellipse 80% 75% at 50% 50%, #000 62%, transparent 100%); mask-image: radial-gradient(ellipse 80% 75% at 50% 50%, #000 62%, transparent 100%); }
.ag-globe canvas { display: block; width: 100%; }

/* 4. Funnel */
.ag-fun { display: flex; flex-direction: column; gap: 14px; }
.ag-f-row { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 24px; align-items: center; }
.ag-f-bar { position: relative; height: 62px; width: 0; border-radius: 14px; background: linear-gradient(90deg, color-mix(in srgb, var(--accent) 85%, #000 0%), color-mix(in srgb, var(--accent) 55%, #7d55ff)); overflow: hidden; transition: width 1.2s var(--ease) var(--d); }
.ag-fun.in .ag-f-bar { width: var(--w); }
.ag-f-n { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); font-size: .8rem; font-weight: 700; letter-spacing: .1em; color: #fff; z-index: 1; }
.ag-f-flow { position: absolute; inset: 0; background: repeating-linear-gradient(110deg, transparent 0 22px, rgba(255,255,255,.14) 22px 30px); animation: agFlow 1.6s linear infinite; }
@keyframes agFlow { to { background-position: 60px 0; } }
.ag-f-t b { display: block; font-size: 1.05rem; font-weight: 600; letter-spacing: -.01em; }
.ag-f-t span { color: var(--muted); font-size: .9rem; line-height: 1.5; }

/* 5. Simulator */
.ag-sim { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr); gap: 22px 36px; align-items: start; background: color-mix(in srgb, var(--surface) 70%, transparent); border: 1px solid var(--border); border-radius: 22px; padding: 30px; }
.ag-seg { display: inline-flex; padding: 4px; border: 1px solid var(--border); border-radius: 100px; gap: 2px; margin-bottom: 26px; }
.ag-seg button { font: inherit; font-size: .84rem; font-weight: 500; border: 0; background: transparent; color: var(--muted); padding: 8px 16px; border-radius: 100px; transition: background .2s, color .2s; }
.ag-seg button[aria-pressed="true"] { background: var(--text); color: var(--bg); }
.ag-sim-l { display: block; font-size: .78rem; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.ag-sim-val { margin: 6px 0 14px; }
.ag-sim-val output { font-size: clamp(2.4rem, 6vw, 3.4rem); font-weight: 700; letter-spacing: -.04em; line-height: 1; }
.ag-sim-val span { color: var(--muted); font-size: .95rem; }
.ag-sim input[type=range] { -webkit-appearance: none; appearance: none; width: 100%; height: 6px; border-radius: 6px; background: linear-gradient(90deg, var(--accent) var(--p, 10%), var(--border) var(--p, 10%)); outline: none; }
.ag-sim input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 24px; height: 24px; border-radius: 50%; background: var(--text); border: 4px solid var(--accent); box-shadow: 0 4px 14px rgba(0,0,0,.3); }
.ag-sim input[type=range]::-moz-range-thumb { width: 18px; height: 18px; border-radius: 50%; background: var(--text); border: 4px solid var(--accent); }
.ag-sim input[type=range]:focus-visible { box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 40%, transparent); }
.ag-sim-sc { display: flex; justify-content: space-between; font-size: .74rem; color: var(--muted); margin-top: 8px; }
.ag-sim-out { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.ag-tile { border: 1px solid var(--border); border-radius: 16px; padding: 16px 18px; background: var(--bg); min-width: 0; }
.ag-tile span { display: block; font-size: .74rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); line-height: 1.4; }
.ag-tile b { display: block; margin-top: 6px; font-size: clamp(1.2rem, 2.6vw, 1.6rem); font-weight: 700; letter-spacing: -.03em; line-height: 1.15; font-variant-numeric: tabular-nums; }
.ag-tile small { display: block; margin-top: 4px; font-size: .74rem; color: var(--muted); }
.ag-tile.hi { border-color: color-mix(in srgb, var(--accent) 60%, transparent); background: color-mix(in srgb, var(--accent) 9%, var(--bg)); }
.ag-tile.hi b { color: var(--accent); }
.ag-note { grid-column: 1 / -1; font-size: .8rem; color: var(--muted); line-height: 1.6; max-width: 80ch; }
.ag-sim-wa { grid-column: 1 / -1; justify-self: start; }

/* 6. Report */
.ag-rep { background: color-mix(in srgb, var(--surface) 70%, transparent); border: 1px solid var(--border); border-radius: 22px; padding: 28px; }
.ag-rep-h { display: flex; justify-content: space-between; align-items: flex-start; gap: 14px; flex-wrap: wrap; margin-bottom: 22px; }
.ag-rep-h b { display: block; font-size: 1.15rem; } .ag-rep-h div span { color: var(--muted); font-size: .86rem; }
.ag-badge { font-size: .72rem; letter-spacing: .06em; border: 1px dashed var(--muted); color: var(--muted); border-radius: 100px; padding: 5px 12px; }
.ag-rep-k { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.ag-rep-b { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: 22px; margin-top: 22px; }
.ag-rep-c, .ag-rep-t { border: 1px solid var(--border); border-radius: 16px; padding: 18px; background: var(--bg); min-width: 0; }
.ag-k { display: block; font-size: .74rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-bottom: 12px; }
.ag-chart { position: relative; }
.ag-chart svg { width: 100%; height: auto; display: block; overflow: visible; }
.ag-chart .base { stroke: var(--border); stroke-width: 1; }
.ag-bar path { fill: var(--accent); transform-origin: 0 140px; transform: scaleY(0); transition: transform .9s var(--ease), opacity .2s; transition-delay: calc(var(--i) * .12s), 0s; }
.ag-rep.in .ag-bar path { transform: none; }
.ag-chart:hover .ag-bar path { opacity: .55; } .ag-chart .ag-bar.on path { opacity: 1; }
.ag-bar text { font-size: 9px; text-anchor: middle; fill: var(--muted); font-family: inherit; }
.ag-bar .vl { fill: var(--text); font-weight: 600; font-size: 10px; }
.ag-tip { position: absolute; transform: translate(-50%, -100%); background: var(--text); color: var(--bg); font-size: .76rem; padding: 6px 10px; border-radius: 8px; white-space: nowrap; pointer-events: none; }
.ag-rep table { width: 100%; border-collapse: collapse; font-size: .84rem; }
.ag-rep th { text-align: left; font-weight: 500; color: var(--muted); font-size: .74rem; padding: 0 8px 8px 0; border-bottom: 1px solid var(--border); }
.ag-rep td { padding: 11px 8px 11px 0; border-bottom: 1px solid var(--border); vertical-align: top; }
.ag-rep tr:last-child td { border-bottom: 0; }
.ag-rep th:not(:first-child), .ag-rep td:not(:first-child) { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }

@media (max-width: 960px) {
  .ag-demos, .ag-reach, .ag-sim, .ag-rep-b { grid-template-columns: 1fr; }
  .ag-rep-k { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 680px) {
  .ag-fig, .ag-sim, .ag-rep { padding: 18px; border-radius: 18px; }
  .ag-g { min-height: 340px; padding: 14px; }
  .ag-g-logo { display: none; }
  .ag-f-row { grid-template-columns: 1fr; gap: 8px; }
  .ag-f-bar { height: 48px; }
  .ag-sim-out { grid-template-columns: 1fr 1fr; gap: 10px; }
  .ag-tile { padding: 13px 14px; }
  .ag-reach { gap: 10px; }
}
@media (prefers-reduced-motion: reduce) {
  .ag-f-bar { transition: none; } .ag-f-flow, .ag-sun, .ag-caret { animation: none; }
}
