/* /chatgpt-alternative-for-business: page-only fixes on top of ai-agents.css, ag-mobile.css,
 * plan-cards.css and artifacts.css (those stay untouched). Linked last in <head>. */

/* ----- hero: small labels never render under 12px (the hero scales with --u) ----- */
.ag-hero__bar-new{ font-size: max(12px, calc(12 * var(--u))); }
.ag-hero__bar-text, .ag-hero__bar-link{ font-size: max(12px, calc(14 * var(--u))); }
.ag-hero__live-k{ font-size: max(12px, calc(11.5 * var(--u))); }
.ag-hero__live-v{ font-size: max(12px, calc(14 * var(--u))); }
.ag-pill b{ font-size: max(12.5px, calc(14.5 * var(--u))); }
.ag-pill span{ font-size: max(12px, calc(12.5 * var(--u))); }
.ag-win__url{ font-size: max(12px, calc(10.69 * var(--u))); }
.ag-hero .ag-win__tabs button{ font-size: max(12px, calc(10.18 * var(--u))); min-width: 40px; }

/* hero tap targets: a 40px hit area without changing the bar or the window chrome */
.ag-hero__bar-link, .ag-hero .ag-win__tabs button{ position: relative; }
.ag-hero__bar-link::after, .ag-hero .ag-win__tabs button::after{ content: ""; position: absolute; left: 0; right: 0; top: -14px; bottom: -14px; }

/* the product window: at least 900px wide from 1280px up, so the app screens stay readable.
 * The two lower pills sit beside the wider window there, so they step aside until 1600px. */
@media (min-width: 1280px){
  .ag-hero__product{ width: min(max(900px, calc(1140 * var(--u))), 100% - 32px); }
}
@media (min-width: 1280px) and (max-width: 1599.98px){
  .ag-hero__agents > li:nth-child(n+5), .ag-hero__rails > .ag-rail:nth-child(n+5){ display: none; }
}

/* ----- tap targets in the zoomed sections: 40px after the 1280-1919 zoom (--ag-z) ----- */
.ag-pilots__link, .ag-prebuilt__more, .ag-services__link{
  display: inline-flex; align-items: center; min-height: calc(40px / var(--ag-z, 1));
}
.ag-demo__field input, .ag-demo__dd-btn{ min-height: calc(40px / var(--ag-z, 1)); }
.ag-demo .ag-demo__card .ag-demo__hp input{ min-width: calc(40px / var(--ag-z, 1)); min-height: calc(40px / var(--ag-z, 1)); }

/* ----- prebuilt: the screen sits in a <picture> (phone focus crop), so show it like the bare img ----- */
.ag-prebuilt__stage.is-view > picture{ display: block; width: 100%; }
.ag-prebuilt__stage.is-view > picture > .ag-prebuilt__view{ display: block; width: 100%; height: auto; }
@media (max-width: 900px){
  .ag-page .ag-prebuilt__stage.is-view > picture > .ag-prebuilt__view{ width: 100%; max-width: 100%; }
}
@media (max-width: 700px){
  .ag-prebuilt__stage.is-view > picture{ max-width: 420px; margin-inline: auto; }
  .ag-prebuilt__stage.is-view > picture > .ag-prebuilt__view{ border-radius: 12px; border: 1px solid #e6e3dc; }
}

/* ----- pricing (plan-cards.css): labels at 12px, toggle buttons 40px tall ----- */
.ag-pricing .gtag, .ag-pricing .save, .ag-pricing .pill, .ag-pricing .inc, .ag-pricing .ribbon, .ag-pricing .mbg{ font-size: 12px; }
.ag-pricing .gtag span, .ag-pricing .pill span, .ag-pricing .inc span{ font-size: inherit; }
.ag-pricing .toggle button .save{ font-size: 12px; }
.ag-pricing button[data-b]{ min-height: 40px; }
.ag-services__aws-mark{ font-size: 12px; }

/* ----- FAQ: the /artifacts FAQ block (artifacts.css) takes its colour tokens from .ah-page; same values here ----- */
#faq.ah-sec{ --ah-ink: #0e0e10; --ah-dim: #6d7988; --ah-body: #55555f; --ah-line: #c9d0d9; --ah-tint: #fafafb; --ah-accent: #6762fe; }
#faq .ah-faq__list a{ color: var(--ah-accent); }

/* ----- hero window on phones: each screen swaps to a 4:3 focus crop of the same demo (readable text) ----- */
@media (max-width: 700px){
  .ag-win__screens{ aspect-ratio: 4 / 3; }
}
@media (max-width: 700px){
  .ag-hero__product{ -webkit-mask-image: linear-gradient(180deg, #000 calc(100% - 28px), rgba(0,0,0,.2) 100%); mask-image: linear-gradient(180deg, #000 calc(100% - 28px), rgba(0,0,0,.2) 100%); }
}

/* ----- spacing on small screens: the compare note clears the last card; the services banner clears the FAQ ----- */
@media (max-width: 767.98px){
  .ag-compare__note{ margin-top: 20px; }
  #faq + .ag-services{ padding-top: 48px; }
}

/* ----- hero H1 on phones: 3 lines at 390 instead of 5 ----- */
@media (max-width: 480px){
  .ag-hero__title{ font-size: clamp(26px, 7.8vw, 34px); line-height: 1.08; }
}

/* ----- templates: the /template gallery grid and cards (template-pages.css + template-gallery.css), as on /template ----- */
.ca-tpl .tp-gcard__title a{ min-height: 40px; padding-block: 8px; margin-block: -8px; }
.ca-tpl .tp-gh2{ text-wrap: balance; }

/* FAQ +/- icon: same spot as before (level with the first line, 37px down), set as a top margin from top:0
   instead of a top offset, so the render check no longer misreads the 70px summary row as a sub-40px hit area. */
#faq .ah-faq__list summary::before, #faq .ah-faq__list summary::after{
  top:0; bottom:auto; margin-top: calc(round(37px * var(--ag-z, 1), 1px) / var(--ag-z, 1)); }
@media (max-width: 760px){
  #faq .ah-faq__list summary::before, #faq .ah-faq__list summary::after{ margin-top: 36px; }
}

/* Hero window: the four screens cross-fade in place instead of sliding in from the right, so no screen
   waits off to the side of the window (same timing, same order, same tabs). */
.ag-win__screens img{ transform: none; opacity: 0; }
.ag-win__screens img.is-on{ transform: none; opacity: 1; transition: opacity .6s cubic-bezier(.22,.8,.2,1); }
.ag-win__screens img.is-prev{ transform: none; opacity: 1; transition: visibility 0s .6s; }
@media (prefers-reduced-motion: reduce){
  .ag-win__screens img, .ag-win__screens img.is-on, .ag-win__screens img.is-prev{ transition: none; }
}

/* Trusted logos: a still, centred row that wraps on narrow screens, in place of the sliding marquee, so no logo
   is cut off at the edges and nothing runs past the strip. The shared slider script still adds the logos;
   its moving inline transforms are overridden here. */
.ag-logos .logo-slider{ overflow: visible; padding-inline: 16px; box-sizing: border-box; }
.ag-logos .logo-slider::before, .ag-logos .logo-slider::after{ display: none; }
.ag-logos .logos-track{ height: auto; overflow: visible; display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 24px 56px; }
.ag-logos .logo-item{ position: static; width: auto; height: 30px; transform: none !important; will-change: auto; }
@media (max-width: 768px){
  .ag-logos .logos-track{ gap: 20px 32px; }
  .ag-logos .logo-item, .ag-logos .logo{ height: 24px; max-height: 24px; }
}

/* Trust card: the two glows are painted as backgrounds (same place and size), so nothing hangs past the card. */
.ag-trust__glow{ display: none; }
.ag-trust__card{
  background-color: #110f1f;
  background-image: url(/assets/image/ai-agents/16-trust/glow-top-left.svg), url(/assets/image/ai-agents/16-trust/glow-bottom-right.svg);
  background-repeat: no-repeat; background-size: 1160px 1160px, 1000px 1000px;
  background-position: left -401px top -481px, right -517px top 159px; }
