/* /knowledge-base-software only: page-level overrides on top of the shared artifact-page styles. */

/* Product captures inside <picture> (phone focus crop + desktop full window). */
.ba-page .kb-pic picture{ display:block; width:100%; }
.ba-page .kb-pic picture > img{ display:block; width:100%; height:auto; margin:0; border:0; box-shadow:none; background:none; }
.ba-page .pic-frame--stroke.kb-pic picture > img{ border-radius:12px; }

/* Full-window captures stay readable: stack the row so the capture runs the full content width. */
.ba-page .ba-prompt__grid.kb-stack{ grid-template-columns:minmax(0, 1fr) !important; gap:32px; }
.ba-page .ba-prompt__grid.kb-stack .ba-prompt__run{ max-width:760px; width:100%; justify-self:start; }
.ba-page .dw-split.kb-split,
section.ba-page#import-export .dw-split.kb-split{ grid-template-columns:minmax(0, 1fr) !important; row-gap:40px; }
.ba-page .dw-split.kb-split > div{ width:100%; max-width:1120px; }
.ba-page .dw-split.kb-split .dw-list{ display:grid; grid-template-columns:repeat(2, minmax(0, 1fr)); gap:20px 32px; }
.ba-page .dw-split.kb-split .dw-fig{ order:2; }

@media (max-width:1279.98px){
  .ba-page .kb-pic:not(.pic-frame--bd){ padding:16px !important; }
}
@media (max-width:900px){
  .ba-page .dw-split.kb-split .dw-list{ grid-template-columns:minmax(0, 1fr); }
}
@media (max-width:700px){
  /* the reader-view focus crop is a narrow page rail: keep it at a natural size */
  section.ba-page#publish .kb-pic picture{ max-width:280px; margin-inline:auto; }
  .ba-page .kb-pic{ padding:12px !important; }
}

/* split sections run full width now: let the headings use it */
.ba-page .dw-split.kb-split .ba-head, .ba-page .dw-split.kb-split .ba-title{ max-width:1120px; }

/* ----- review fixes (2026-12-01) ----- */
/* Hero product window: the demo stays readable (>= 900px wide on laptops). */
@media (min-width: 1024px){
  .ag-hero__product{ width: min(max(calc(1140 * var(--u)), 960px), 100% - 32px); }
}
/* Phones: the hero shows a focus crop of the Welcome page (760x342), not the whole window. */
@media (max-width: 700px){
  .ah-hero .ag-win__screens{ aspect-ratio: 760 / 342; }
  .ag-hero h1.ag-hero__title{ font-size: clamp(26px, 7.8vw, 32px); }
  .ag-hero h1.ag-hero__title span{ display: inline; }
}
/* Hero bar, eyebrow and window URL: never under 12px; the bar link gets a 40px hit area. */
.ag-hero__bar{ font-size: max(12px, calc(14 * var(--u))); }
.ag-hero .ag-hero__bar-link{ position: relative; }
.ag-hero .ag-hero__bar-link::after{ content: ""; position: absolute; inset: -14px -4px; }
.ah-hero__eyebrow{ font-size: max(12px, calc(14 * var(--u))); }
.ag-win__url{ font-size: max(12px, calc(10.69 * var(--u))); }

/* Pricing (plan-cards.css untouched): 40px billing toggle, 12px floor on the small labels. */
.plan-cards .toggle button{ min-height: 40px; }
.plan-cards .toggle .save{ font-size: 12px; }
.plan-cards .gtag, .plan-cards .pill, .plan-cards .inc, .plan-cards .ribbon, .plan-cards .mbg, .plan-cards .save, .plan-cards .gtag span, .plan-cards .pill span{ font-size: 12px; }

/* Headlines: no one-word last lines; inline links in an intro look like links. */
.ba-page .ba-title, .ah-page .ah-services .ag-services__title{ text-wrap: balance; }
.ba-page .ba-intro a{ color: #5a55f0; text-decoration: underline; text-underline-offset: 2px; }

/* Template cards: the /template gallery grid, at real size (the section is zoomed 1280-1919px,
   so the grid undoes that zoom), box = min(1240px, 100vw - 2 * gutter), gutter 24px / 16px. */
.ba-page .kb-tpl{ zoom: calc(1 / var(--ag-z, 1)); background: transparent; padding: 28px var(--tp-gut) 0; }
.ba-page .kb-tpl .tp-wrap{ max-width: 1240px; margin: 0 auto; }
.ba-page .kb-tpl .tp-gcard__title a{ min-height: 40px; padding-block: 8px; margin-block: -8px; }

/* ----- final pass (2026-12-02) ----- */
/* Hero window tab: 12px text floor where the hero scales down, and an invisible 40px hit area. */
.ag-hero .ag-win__tabs [data-screen]{ font-size: max(12px, calc(12px / var(--ag-z, 1))) !important; position: relative; }
.ag-hero .ag-win__tabs [data-screen]::after{ content: ""; position: absolute; top: -16px; bottom: -16px; left: -4px; right: -4px; }
.ag-hero .ag-win__tabs{ overflow: visible; }   /* one tab only: nothing to scroll */

/* FAQ: the +/- icon is centred on the summary, so tap checks read the summary's own box. */
.ba-page details > summary{ min-height: 44px; }
.ba-page details > summary::after, .ba-page details > summary::before{ top: 0; bottom: 0; margin-block: auto; }

/* 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; }
