/* ============================================================
   site.css — the framework-rendered member-facing styles, layered
   on top of common.css (the shared Businerds theme: tokens, nav,
   footer, buttons). This sheet styles the parts the PHP app emits
   that the static template never had:

     · the page shell + flash bar          (.bn-main / .bn-flash)
     · CMS page hero + rendered prose       (.bn-page-hero / .bn-prose)
     · the P6 access gate (teaser + modal)  (.bn-teaser / .bn-gate)
     · the auth-form card                    (.bn-auth)

   Loads after common.css, so it inherits every --cx-* design token.
   ============================================================ */

/* ---------- page shell ---------- */
.bn-main{ min-height:62vh; padding-block:clamp(2rem,5vw,3.75rem); }
/* Full-bleed pages (blog list / article) own their top spacing — drop the shell's
   top padding so the hero butts against the nav (no gap the size of the menu). */
.bn-main--bleed{ padding-top:0; }
/* App/member pages (anything wrapping its content in .ag-page) start near the top —
   tighter than the airy marketing top padding — so they read top-aligned + app-like. */
.bn-main:has(.ag-page){ padding-top:1.5rem; }

/* one-shot flash → floating toasts: fixed under the nav, overlay the page, never
   take layout space. Auto-dismiss + manual close are wired in Site.php. */
.bn-toasts{
  position:fixed; top:calc(var(--cx-nav-h) + 14px); left:50%; transform:translateX(-50%);
  z-index:2000; display:flex; flex-direction:column; gap:10px;
  width:min(460px, calc(100vw - 32px)); pointer-events:none;
}
.bn-toast{
  pointer-events:auto; display:flex; align-items:center; gap:12px;
  background:#fff; border:1px solid var(--cx-line); border-left:4px solid var(--cx-accent);
  border-radius:12px; box-shadow:0 14px 40px rgba(20,20,40,.16);
  padding:12px 14px; font-size:.92rem; line-height:1.45; color:var(--cx-ink);
  animation:bn-toast-in .25s ease;
}
.bn-toast__msg{ flex:1 1 auto; min-width:0; }
.bn-toast__x{ flex:none; border:0; background:none; color:var(--cx-muted-2); font-size:1.3rem; line-height:1; cursor:pointer; padding:0 2px; }
.bn-toast__x:hover{ color:var(--cx-ink); }
.bn-toast--success{ border-left-color:#15936b; }
.bn-toast--danger{ border-left-color:#c0392b; }
.bn-toast--warning{ border-left-color:#c98a05; }
.bn-toast--info{ border-left-color:var(--cx-accent); }
.bn-toast.is-leaving{ animation:bn-toast-out .3s ease forwards; }
@keyframes bn-toast-in{ from{ opacity:0; transform:translateY(-12px); } to{ opacity:1; transform:translateY(0); } }
@keyframes bn-toast-out{ to{ opacity:0; transform:translateY(-12px); } }

/* header chat shortcut (icon-only link, left of the user button) */
.cx-iconlink{ display:inline-flex; align-items:center; justify-content:center; width:40px; height:40px; border-radius:50%; color:var(--cx-ink); text-decoration:none; font-size:1.18rem; transition:background .15s, color .15s, opacity .15s; }
.cx-iconlink:hover{ background:var(--cx-soft); color:var(--cx-ink); }
.cx-nav--overlay:not(.is-scrolled) .cx-iconlink{ color:#fff; }
.cx-nav--overlay:not(.is-scrolled) .cx-iconlink:hover{ background:rgba(255,255,255,.16); }

/* ---------- account dropdown (right-aligned, in the actions area) ---------- */
.cx-account{ position:relative; }
.cx-account .cx-login{ cursor:pointer; }
.cx-account-menu{
  position:absolute; top:100%; right:0; left:auto; min-width:212px; margin:0;
  border:0; border-radius:var(--cx-r-lg); padding:.5rem; background:#fff;
  box-shadow:0 20px 44px rgba(0,0,0,.14);
}
.cx-account-menu .dropdown-item{ border-radius:var(--cx-r-md); padding:.65rem .85rem; font-size:.95rem; color:var(--cx-ink); display:flex; align-items:center; gap:.6rem; }
.cx-account-menu .dropdown-item:hover{ background:var(--cx-soft); color:var(--cx-ink); }
.cx-account-menu .dropdown-item i{ color:var(--cx-muted); font-size:1rem; }
@media (min-width:1200px){
  .cx-account-menu{ display:block; opacity:0; visibility:hidden; pointer-events:none; transition:opacity .18s ease, visibility .18s ease; }
  .cx-account:hover .cx-account-menu, .cx-account:focus-within .cx-account-menu{ opacity:1; visibility:visible; pointer-events:auto; }
  .cx-account-menu::before{ content:""; position:absolute; inset:-16px 0 auto 0; height:16px; } /* hover bridge */
}
.cx-account:hover .cx-caret{ transform:rotate(180deg); }

/* ---------- Assistants nav dropdown (grouped: Assistants / Widgets) ---------- */
.cx-drop--assist{ display:flex; gap:.25rem; min-width:450px; }
.cx-drop--assist .cx-drop-col{ flex:1 1 0; padding:.15rem .2rem; }
.cx-drop--assist .cx-drop-col + .cx-drop-col{ border-left:1px solid var(--cx-line); padding-left:.6rem; margin-left:.35rem; }
.cx-drop--assist .cx-drop-col h6{ font-size:.7rem; text-transform:uppercase; letter-spacing:.09em; color:var(--cx-muted); font-weight:600; margin:.4rem .9rem .55rem; }
.cx-drop--assist .dropdown-item i{ color:var(--cx-accent); }

/* ---------- platform landing (Core Home/index) ---------- */
.bn-home-hero{ text-align:center; padding:clamp(3rem,8vw,6rem) 0 clamp(2.5rem,5vw,4rem); }
.bn-home-eyebrow{ display:inline-flex; align-items:center; gap:.5rem; font-size:.85rem; color:var(--cx-muted); font-weight:500; margin-bottom:1rem; }
.bn-home-hero h1{ font-size:clamp(2.2rem,5.5vw,3.6rem); font-weight:500; line-height:1.08; letter-spacing:-.02em; margin:0 auto 1.1rem; max-width:18ch; }
.bn-home-hero h1 span{ color:var(--cx-accent); }
.bn-home-lead{ color:var(--cx-muted); font-size:clamp(1rem,2vw,1.2rem); line-height:1.6; max-width:62ch; margin:0 auto 1.9rem; }
.bn-home-cta{ display:flex; flex-wrap:wrap; gap:.8rem; justify-content:center; }
.bn-home-features{ background:var(--cx-surface); padding:clamp(2.5rem,6vw,4.5rem) 0; }
.bn-home-grid{ display:grid; grid-template-columns:repeat(auto-fit,minmax(280px,1fr)); gap:1.1rem; }
.bn-home-feature{ background:#fff; border:1px solid var(--cx-line); border-radius:var(--cx-r-lg); padding:1.6rem 1.5rem; box-shadow:0 1px 2px rgba(16,16,30,.04); }
.bn-home-feature__ic{ display:inline-grid; place-items:center; width:48px; height:48px; border-radius:14px; font-size:1.4rem; color:var(--cx-accent); background:color-mix(in srgb, var(--cx-accent) 12%, #fff); margin-bottom:1rem; }
.bn-home-feature h3{ font-size:1.15rem; font-weight:500; margin:0 0 .45rem; }
.bn-home-feature p{ color:var(--cx-muted); font-size:.94rem; line-height:1.55; margin:0; }
.bn-home-foot{ text-align:center; padding:clamp(2.5rem,6vw,4.5rem) 0; }
.bn-home-foot h2{ font-size:clamp(1.5rem,3.5vw,2.2rem); font-weight:500; margin:0 0 1.5rem; letter-spacing:-.01em; }

/* ============================================================
   CMS PAGE — hero + rendered content prose
   ============================================================ */
.bn-page-hero{ margin-bottom:clamp(1.5rem,4vw,2.5rem); }
.bn-page-hero .eyebrow{ text-transform:uppercase; letter-spacing:.16em; font-size:.78rem; font-weight:500; color:var(--cx-muted); margin-bottom:.85rem; }
.bn-page-hero__img{ display:block; width:100%; max-height:380px; object-fit:cover; border-radius:var(--cx-r-lg); margin-bottom:1.5rem; }
.bn-page-hero h1{ margin:0 0 .65rem; max-width:22ch; }
.bn-page-hero .lead{ color:var(--cx-ink-2); font-size:1.12rem; line-height:1.5; max-width:60ch; margin:0; }
.bn-page-hero__meta{ color:var(--cx-muted); font-size:.92rem; margin:.85rem 0 0; }
/* The mega trigger <li> also carries Bootstrap's .dropdown (position:relative),
   which would box the full-width mega to the item. Force it static (higher
   specificity than .dropdown) so the panel spans the nav (its containing block). */
.cx-nav .cx-has-mega{ position:static; }
/* The blog list (blogIndex / blogCategory) is styled by the vendored blog-list.css
   (cx-* classes), loaded per-template via TemplateRegistry::styles(). */

/* Hero content element (HeroElement → .cx-hhero) — full-width lead section. */
.bn-hero{ padding-block:2.5rem 4rem; }
.bn-hero .eyebrow{ text-transform:uppercase; letter-spacing:.16em; font-size:.82rem; font-weight:500; color:var(--cx-muted); margin-bottom:1.6rem; }
.bn-hero h1{ font-size:clamp(2.2rem,5vw,4rem); line-height:1.05; margin-bottom:1.5rem; }
.bn-hero .cx-hhero__sub{ font-size:1.1rem; color:var(--cx-ink-2); max-width:48ch; margin-bottom:2rem; }
.bn-hero .cx-hhero__cta{ display:flex; flex-wrap:wrap; gap:1rem; }
.bn-hero .cx-hhero__media{ display:flex; flex-direction:column; gap:1rem; }
.bn-hero .cx-hhero__app{ border-radius:var(--cx-r-lg); overflow:hidden; box-shadow:0 30px 70px rgba(0,0,0,.13); display:block; }
.bn-hero .cx-hhero__app img{ width:100%; display:block; }

/* Card grid (CardGridElement → .bn-cards) — image cards, e.g. services. */
.bn-cards{ padding-block:clamp(2rem,5vw,4rem); }
.bn-cards h2{ font-size:clamp(1.6rem,3vw,2.2rem); margin-bottom:2rem; }
.bn-cards .cx-res{ position:relative; border-radius:var(--cx-r-lg); overflow:hidden; min-height:380px; display:flex; flex-direction:column; justify-content:flex-end; padding:1.8rem; color:#fff; text-decoration:none; height:100%; }
.bn-cards .cx-res img{ position:absolute; inset:0; width:100%; height:100%; object-fit:cover; z-index:0; transition:transform .4s ease; }
.bn-cards .cx-res::after{ content:""; position:absolute; inset:0; z-index:1; background:linear-gradient(to top, rgba(0,0,0,.72), rgba(0,0,0,.05) 60%); }
.bn-cards .cx-res > *{ position:relative; z-index:2; }
.bn-cards .cx-res .cat{ font-size:.85rem; opacity:.85; }
.bn-cards .cx-res h3{ color:#fff; font-size:1.45rem; line-height:1.2; margin:.3rem 0 .7rem; }
.bn-cards .cx-res p{ color:rgba(255,255,255,.84); font-size:.95rem; margin:0; }
.bn-cards .cx-res .more{ display:inline-flex; align-items:center; gap:.5rem; color:#fff; margin-top:1.2rem; font-size:.95rem; }
.bn-cards a.cx-res:hover img{ transform:scale(1.04); }

/* CTA band (CtaBandElement → .bn-ctaband) — dark or plain full-width prompt. */
.bn-ctaband{ text-align:center; padding-block:clamp(3rem,6vw,5rem); border-radius:var(--cx-r-xl); }
.bn-ctaband.cx-band-dark{ background:#0d0d0d; color:#fff; }
.bn-ctaband.cx-band-dark h2{ color:#fff; max-width:24ch; margin:0 auto; font-size:clamp(1.9rem,3.8vw,2.8rem); }
.bn-ctaband.cx-band-dark p{ color:rgba(255,255,255,.72); max-width:52ch; margin:1.1rem auto 1.9rem; }
.bn-ctaband--plain{ background:var(--cx-surface); }
.bn-ctaband--plain h2{ max-width:24ch; margin:0 auto; font-size:clamp(1.9rem,3.8vw,2.8rem); }
.bn-ctaband--plain p{ color:var(--cx-muted); max-width:52ch; margin:1.1rem auto 1.9rem; }
.bn-ctaband .cx-cta-row{ display:flex; gap:1rem; justify-content:center; flex-wrap:wrap; }
.cx-btn-white{ background:#fff; color:var(--cx-ink); }
.cx-btn-glass{ background:rgba(255,255,255,.14); color:#fff; border:1px solid rgba(255,255,255,.28); }

/* Logo strip (LogoStripElement → .bn-logos). */
.bn-logos{ padding-block:clamp(1.5rem,4vw,3rem); text-align:center; }
.bn-logos h2{ font-size:clamp(1.3rem,2.4vw,1.8rem); max-width:24ch; margin:0 auto 2.5rem; }
.bn-logos .cx-logos{ display:flex; align-items:center; justify-content:center; gap:2rem 3rem; flex-wrap:wrap; }
.bn-logos .cx-logos span{ font-size:1.4rem; font-weight:700; letter-spacing:-.02em; color:var(--cx-muted-2); opacity:.8; }
.bn-logos .cx-logos img{ height:34px; width:auto; opacity:.8; filter:grayscale(1); }

/* Steps / process (StepsElement → .bn-steps). */
.bn-steps{ padding-block:clamp(2rem,5vw,4rem); }
.bn-steps h2{ font-size:clamp(1.6rem,3vw,2.2rem); margin-bottom:2rem; }
.bn-steps .bn-step{ background:var(--cx-surface); border-radius:var(--cx-r-lg); padding:1.6rem; height:100%; }
.bn-steps .bn-step img{ width:100%; border-radius:var(--cx-r-md); margin-bottom:1.1rem; }
.bn-steps .bn-step__n{ display:inline-flex; align-items:center; justify-content:center; width:40px; height:40px; border-radius:50%; background:var(--cx-ink); color:#fff; font-weight:500; margin-bottom:1.1rem; }
.bn-steps .bn-step h3{ font-size:1.2rem; margin:0 0 .5rem; }
.bn-steps .bn-step p{ color:var(--cx-muted); margin:0; }

/* FAQ (FaqElement → .bn-faq) — an accessible <details> accordion (+ FAQPage JSON-LD). */
.bn-faq{ padding-block:clamp(2rem,5vw,4rem); max-width:780px; margin-inline:auto; }
.bn-faq h2{ font-size:clamp(1.6rem,3vw,2.2rem); margin-bottom:1.4rem; }
.bn-faq__item{ border-bottom:1px solid rgba(0,0,0,.1); }
.bn-faq__item summary{ list-style:none; cursor:pointer; position:relative; padding:1.1rem 2.2rem 1.1rem 0; font-weight:500; font-size:1.08rem; color:var(--cx-ink); }
.bn-faq__item summary::-webkit-details-marker{ display:none; }
.bn-faq__item summary::after{ content:"+"; position:absolute; right:.3rem; top:.95rem; font-size:1.4rem; line-height:1; color:var(--cx-muted); }
.bn-faq__item[open] summary::after{ content:"\2212"; }
.bn-faq__answer{ padding:0 0 1.3rem; color:var(--cx-ink-2); line-height:1.6; }
.bn-faq__answer > :first-child{ margin-top:0; }
.bn-faq__answer > :last-child{ margin-bottom:0; }

/* How-to (HowToElement → .bn-howto) — numbered steps (+ HowTo JSON-LD). */
.bn-howto{ padding-block:clamp(2rem,5vw,4rem); max-width:780px; margin-inline:auto; }
.bn-howto h2{ font-size:clamp(1.6rem,3vw,2.2rem); margin-bottom:.7rem; }
.bn-howto__intro{ color:var(--cx-ink-2); font-size:1.08rem; margin-bottom:2rem; }
.bn-howto__steps{ list-style:none; counter-reset:bn-howto; margin:0; padding:0; }
.bn-howto__step{ counter-increment:bn-howto; position:relative; padding:.1rem 0 1.6rem 3.4rem; }
.bn-howto__step::before{ content:counter(bn-howto); position:absolute; left:0; top:0; width:40px; height:40px; border-radius:50%; background:var(--cx-ink); color:#fff; font-weight:500; display:inline-flex; align-items:center; justify-content:center; }
.bn-howto__step:not(:last-child)::after{ content:""; position:absolute; left:19px; top:46px; bottom:.3rem; width:2px; background:rgba(0,0,0,.1); }
.bn-howto__step h3{ font-size:1.2rem; margin:0 0 .5rem; }
.bn-howto__detail{ color:var(--cx-ink-2); line-height:1.6; }
.bn-howto__detail > :first-child{ margin-top:0; }
.bn-howto__detail > :last-child{ margin-bottom:0; }

/* Form (FormElement → .bn-form). */
.bn-form{ padding-block:clamp(2rem,5vw,3.5rem); max-width:40rem; }
.bn-form h2{ font-size:clamp(1.6rem,3vw,2.2rem); margin-bottom:.75rem; }
.bn-form__intro{ color:var(--cx-muted); margin-bottom:1.5rem; }
.bn-form__field{ margin-bottom:1.1rem; }
.bn-form__field .form-label{ font-size:.9rem; font-weight:500; color:var(--cx-ink-2); }
.bn-form__field .form-control{ border-radius:var(--cx-r-md); padding:.6rem .85rem; }
.bn-form__req{ color:#c0392b; }
.bn-form__hp{ position:absolute; left:-9999px; width:1px; height:1px; overflow:hidden; }

/* Featured quote (QuoteElement → .bn-quote). */
.bn-quote{ padding-block:clamp(2rem,4vw,3rem); }
.bn-quote .cx-quote{ background:var(--cx-surface); border-radius:var(--cx-r-xl); padding:clamp(2rem,4vw,3.5rem); }
.bn-quote .cx-quote__top{ display:flex; align-items:center; justify-content:space-between; gap:1rem; margin-bottom:2.5rem; flex-wrap:wrap; }
.bn-quote .cx-quote__who{ display:flex; align-items:center; gap:1rem; }
.bn-quote .cx-quote__who img{ width:56px; height:56px; border-radius:50%; object-fit:cover; }
.bn-quote .cx-quote__who .n{ font-weight:600; }
.bn-quote .cx-quote__who .r{ color:var(--cx-muted); font-size:.9rem; }
.bn-quote .cx-quote__logo{ font-weight:700; color:var(--cx-muted-2); font-size:1.3rem; }
.bn-quote blockquote{ font-size:clamp(1.3rem,2.4vw,1.85rem); line-height:1.38; margin:0; letter-spacing:-.01em; }

/* Testimonials grid (TestimonialsElement → .bn-testimonials). */
.bn-testimonials{ padding-block:clamp(2rem,5vw,4rem); }
.bn-testimonials h2{ font-size:clamp(1.6rem,3vw,2.2rem); margin-bottom:2rem; }
.bn-testimonials .cx-testi{ background:var(--cx-surface); border-radius:var(--cx-r-lg); padding:2rem; height:100%; display:flex; flex-direction:column; }
.bn-testimonials .cx-testi .stars{ color:#f5a623; margin-bottom:1rem; }
.bn-testimonials .cx-testi blockquote{ font-size:1.08rem; line-height:1.5; margin:0 0 1.5rem; }
.bn-testimonials .cx-testi .who{ display:flex; align-items:center; gap:.8rem; margin-top:auto; }
.bn-testimonials .cx-testi .who img{ width:46px; height:46px; border-radius:50%; object-fit:cover; }
.bn-testimonials .cx-testi .who .n{ font-weight:600; font-size:.95rem; }
.bn-testimonials .cx-testi .who .r{ color:var(--cx-muted); font-size:.85rem; }

/* Stats content element (StatsElement → .bn-stats) — full-width number band. */
.bn-stats{ padding-block:clamp(2.5rem,6vw,5rem); text-align:center; }
.bn-stats h2{ max-width:24ch; margin:0 auto 3rem; }
.bn-stats .bn-stat .num{ font-size:clamp(2.6rem,5vw,4rem); font-weight:400; line-height:1; letter-spacing:-.02em; color:var(--cx-ink); }
.bn-stats .bn-stat p{ color:var(--cx-muted); margin-top:.6rem; }

/* The content-element output (RichText/Markdown, headings, text, image, html).
   Mirrors the template's legal-doc prose so authored content reads cleanly. */
.bn-prose{ max-width:760px; }
.bn-prose > :first-child{ margin-top:0; }
.bn-prose h2{ font-size:clamp(1.35rem,2.3vw,1.8rem); line-height:1.2; margin:2.5rem 0 1rem; }
.bn-prose h3{ font-size:1.16rem; margin:1.75rem 0 .55rem; }
.bn-prose h4{ font-size:1.02rem; margin:1.5rem 0 .5rem; }
.bn-prose p{ color:var(--cx-ink-2); line-height:1.65; margin-bottom:1.1rem; }
.bn-prose ul, .bn-prose ol{ color:var(--cx-ink-2); line-height:1.65; margin-bottom:1.2rem; padding-left:1.3rem; }
.bn-prose li{ margin-bottom:.4rem; }
.bn-prose a{ color:var(--cx-ink); text-decoration:underline; text-underline-offset:3px; }
.bn-prose a:hover{ color:#000; }
.bn-prose strong{ color:var(--cx-ink); font-weight:600; }
.bn-prose blockquote{ margin:1.7rem 0; padding:.4rem 0 .4rem 1.2rem; border-left:3px solid var(--cx-accent); color:var(--cx-ink-2); }
.bn-prose code{ font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace; font-size:.88em; background:var(--cx-soft); padding:.12em .4em; border-radius:6px; }
.bn-prose pre{ background:#1b1b22; color:#e6e8ec; border-radius:var(--cx-r-md); padding:1rem 1.1rem; overflow-x:auto; margin:1.7rem 0; }
.bn-prose pre code{ background:none; padding:0; color:inherit; font-size:.85rem; line-height:1.65; }
.bn-prose .rte > :first-child{ margin-top:0; }
.bn-prose .rte > :last-child{ margin-bottom:0; }
.bn-prose img{ max-width:100%; height:auto; }
.cms-image{ margin:1.9rem 0; }
.cms-image img{ width:100%; border-radius:var(--cx-r-md); display:block; }
.cms-image figcaption{ margin-top:.65rem; font-size:.85rem; color:var(--cx-muted); text-align:center; line-height:1.5; }

/* ============================================================
   ACCESS GATE (P6) — a teaser of the first element, faded out,
   under a register/login prompt card. The hidden elements are never
   sent to the browser; this only dresses the "you may not read on" state.
   ============================================================ */
.bn-teaser{ position:relative; }
.bn-teaser__body{ position:relative; max-height:24rem; overflow:hidden; }
/* gradient mask so the teaser dissolves into the gate instead of cutting hard */
.bn-teaser__fade{ position:absolute; left:0; right:0; bottom:0; height:14rem; pointer-events:none;
  background:linear-gradient(to bottom, rgba(255,255,255,0), var(--cx-white) 82%); }

.bn-gate{ position:relative; z-index:1; margin:-5rem auto 0; max-width:32rem;
  background:#fff; border:1px solid var(--cx-line); border-radius:var(--cx-r-lg);
  box-shadow:0 24px 60px rgba(0,0,0,.12); padding:2.25rem 2rem; text-align:center; }
.bn-gate__badge{ width:54px; height:54px; border-radius:50%; background:var(--cx-soft);
  display:inline-flex; align-items:center; justify-content:center; font-size:1.4rem; color:var(--cx-accent); margin-bottom:1rem; }
.bn-gate h2{ font-size:1.5rem; margin:0 0 .5rem; }
.bn-gate p{ color:var(--cx-muted); max-width:42ch; margin:0 auto 1.5rem; }
.bn-gate__actions{ display:flex; flex-wrap:wrap; gap:.7rem; justify-content:center; }

/* ============================================================
   AUTH CARD — login / register / recover / two-factor / set-password
   ============================================================ */
.bn-auth{ max-width:30rem; margin:0 auto; }
.bn-auth--wide{ max-width:36rem; }
.bn-auth__card{ background:#fff; border:1px solid var(--cx-line); border-radius:var(--cx-r-lg);
  box-shadow:0 18px 48px rgba(0,0,0,.07); padding:clamp(1.75rem,4vw,2.5rem); }
.bn-auth__title{ font-size:1.6rem; text-align:center; margin:0 0 .35rem; }
.bn-auth__sub{ text-align:center; color:var(--cx-muted); font-size:.95rem; margin-bottom:1.6rem; }
.bn-auth .form-label{ font-size:.88rem; font-weight:500; color:var(--cx-ink-2); margin-bottom:.35rem; }
.bn-auth .form-control{ border-radius:var(--cx-r-md); padding:.6rem .85rem; }
.bn-auth .form-control:focus{ border-color:var(--cx-accent); box-shadow:0 0 0 .2rem rgba(91,91,214,.15); }
.bn-auth__links{ display:flex; justify-content:space-between; gap:1rem; font-size:.88rem; margin-top:.25rem; }
.bn-auth__links a{ color:var(--cx-accent); text-decoration:none; }
.bn-auth__links a:hover{ text-decoration:underline; }
.bn-auth__foot{ text-align:center; font-size:.88rem; margin-top:1.25rem; }
.bn-auth__foot a{ color:var(--cx-accent); text-decoration:none; }
.bn-auth__foot a:hover{ text-decoration:underline; }

/* The primary nav is a mega menu (common.css .cx-mega); its desktop dropdown +
   category/link/feature styling lives in common.css. The old .bn-submenu primary
   dropdown was removed — its `.cx-menu .nav-item{position:relative}` boxed the
   full-width mega to the item. */
.cx-menu .nav-link.active{ background:rgba(0,0,0,.05); }

/* ---------- mobile offcanvas nav (NavigationService 'mobile' variant) ---------- */
.cx-m-nav{ display:flex; flex-direction:column; }
.cx-m-nav .cx-m-link{ display:block; padding:.5rem 0; color:var(--cx-ink); text-decoration:none; }
.cx-m-nav .cx-m-link:hover{ color:var(--cx-accent); }
.cx-m-nav .cx-m-link.active{ color:var(--cx-ink); font-weight:600; }
/* depth indentation: level 1 (top), level 2, level 3 */
.cx-m-nav .cx-m-l0{ font-weight:600; font-size:1.05rem; border-top:1px solid var(--cx-line); margin-top:.4rem; padding-top:.85rem; }
.cx-m-nav .cx-m-l1{ padding-left:1.1rem; color:var(--cx-ink-2); }
.cx-m-nav .cx-m-l2{ padding-left:2.2rem; font-size:.92rem; color:var(--cx-muted); }

/* ---------- footer menu (MenuRenderer manual output inside .cx-footer) ---------- */
.cx-footer .bn-foot-menu{ display:flex; flex-wrap:wrap; gap:2.5rem; list-style:none; margin:0; padding:0; }
.cx-footer .bn-foot-menu > .bn-foot-item{ flex:1 1 150px; min-width:120px; }
.cx-footer .bn-foot-menu > .bn-foot-item > a{ display:block; color:#fff; font-size:.95rem; font-weight:500; margin-bottom:1.05rem; }
.cx-footer .bn-foot-menu .bn-submenu{ list-style:none; margin:0; padding:0; }
.cx-footer .bn-foot-menu .bn-submenu .bn-foot-item{ margin-bottom:.7rem; }
.cx-footer .bn-foot-menu a{ color:var(--cx-footer-text); text-decoration:none; font-size:.92rem; transition:color .15s; }
.cx-footer .bn-foot-menu a:hover{ color:#fff; }

/* admin preview ribbon (PagesController::previewAction inserts this above the nav) */
.bn-preview-bar{ background:var(--cx-ink); color:#fff; font-size:.86rem; padding:.55rem 1.25rem;
  display:flex; gap:1rem; justify-content:space-between; align-items:center; }
.bn-preview-bar a{ color:#9db8ff; text-decoration:none; }
.bn-preview-bar a:hover{ color:#fff; }
.bn-preview-bar strong{ color:#fff; }

/* account page (logged-in) keeps a wider, multi-card column */
.bn-account{ max-width:46rem; margin:0 auto; }
.bn-account .card{ border:1px solid var(--cx-line); border-radius:var(--cx-r-lg); box-shadow:0 10px 30px rgba(0,0,0,.04); }
.bn-account .card + .card{ margin-top:0; }

/* ============================================================
   ASSISTANT AREA — premium member surface (library, history,
   widgets, usage). Circula-style: violet accents, soft cards,
   generous whitespace. Scoped under .ag-* / .ag-page.
   ============================================================ */
.cx-btn-sm{ padding:.45rem 1.05rem; font-size:.85rem; }
/* member/app pages fill the standard wide content column (container-cx, 1360) — same
   width as every other wide page; read-only transcripts keep their own narrow cap. */
.ag-page{ width:100%; }

/* hero header */
.ag-hero{ display:flex; align-items:flex-end; justify-content:space-between; flex-wrap:wrap; gap:1.25rem; margin:.25rem 0 1.75rem; }
.ag-hero__text h1{ font-size:clamp(1.7rem,3vw,2.15rem); font-weight:500; margin:0 0 .3rem; letter-spacing:-.01em; }
.ag-hero__text p{ color:var(--cx-muted); margin:0; max-width:54ch; font-size:.96rem; }
.ag-hero__actions{ display:flex; flex-wrap:wrap; gap:.6rem; }

/* category filter pills */
.ag-filters{ display:flex; flex-wrap:wrap; gap:.5rem; margin-bottom:1.6rem; padding-bottom:.25rem; }
.ag-pill{
  display:inline-flex; align-items:center; gap:.45rem; cursor:pointer;
  border:1px solid var(--cx-line); background:#fff; color:var(--cx-ink-2);
  border-radius:var(--cx-pill); padding:.46rem 1rem; font-size:.86rem; font-weight:450; line-height:1;
  font-family:inherit; transition:background .15s, color .15s, border-color .15s, box-shadow .15s;
}
.ag-pill i{ color:var(--ag-accent,var(--cx-muted)); font-size:.95rem; }
.ag-pill:hover{ border-color:#d7d7d2; box-shadow:0 4px 14px rgba(0,0,0,.05); }
.ag-pill.is-active{ background:var(--cx-ink); border-color:var(--cx-ink); color:#fff; }
.ag-pill.is-active i{ color:#fff; }
.ag-pill__n{ font-variant-numeric:tabular-nums; opacity:.55; font-size:.8rem; }

/* card grid */
.ag-grid{ display:grid; grid-template-columns:repeat(auto-fill,minmax(286px,1fr)); gap:1.1rem; }
.ag-card{
  display:flex; flex-direction:column; background:#fff; border:1px solid var(--cx-line);
  border-radius:var(--cx-r-lg); padding:1.35rem 1.35rem 1.15rem; text-decoration:none; color:var(--cx-ink);
  box-shadow:0 1px 2px rgba(16,16,30,.04); transition:transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.ag-card:hover{ transform:translateY(-3px); box-shadow:0 18px 40px rgba(20,20,40,.10); border-color:transparent; }
.ag-card__top{ display:flex; align-items:flex-start; justify-content:space-between; gap:.5rem; margin-bottom:.95rem; }
.ag-card__avatar{
  width:46px; height:46px; border-radius:14px; display:inline-flex; align-items:center; justify-content:center;
  font-size:1.35rem; color:var(--ag-accent,var(--cx-accent)); background:var(--cx-soft);
  background:color-mix(in srgb, var(--ag-accent,var(--cx-accent)) 13%, #fff);
}
.ag-card__avatar--ghost{ color:var(--cx-muted); background:var(--cx-soft); }
.ag-card__badge{ display:inline-flex; align-items:center; gap:.3rem; font-size:.72rem; font-weight:500; padding:.28rem .6rem; border-radius:var(--cx-pill); }
.ag-card__badge--shared{ background:var(--cx-soft); color:var(--cx-muted); }
.ag-card__badge--pin{ background:color-mix(in srgb, var(--ag-accent,var(--cx-accent)) 16%, #fff); color:var(--ag-accent,var(--cx-accent)); }
.ag-card__name{ font-size:1.12rem; font-weight:500; line-height:1.25; margin:0 0 .35rem; }
.ag-card__desc{ color:var(--cx-muted); font-size:.9rem; line-height:1.5; margin:0 0 1rem;
  display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; min-height:2.7em; }
.ag-card__meta{ display:flex; flex-wrap:wrap; gap:.4rem; margin-top:auto; margin-bottom:1rem; }
.ag-chip{ display:inline-flex; align-items:center; gap:.35rem; font-size:.76rem; color:var(--cx-ink-2);
  background:var(--cx-soft); border-radius:var(--cx-pill); padding:.3rem .65rem; line-height:1; white-space:nowrap; }
.ag-chip i{ color:var(--ag-accent,var(--cx-muted)); }
.ag-chip--ghost{ background:transparent; border:1px solid var(--cx-line); color:var(--cx-muted); }
.ag-card__actions{ display:flex; align-items:center; gap:.4rem; padding-top:.95rem; border-top:1px solid var(--cx-line); }
.ag-iconbtn{
  display:inline-flex; align-items:center; justify-content:center; width:34px; height:34px; flex:none;
  border:1px solid var(--cx-line); background:#fff; color:var(--cx-muted); border-radius:10px; cursor:pointer;
  text-decoration:none; font-size:.92rem; transition:background .15s, color .15s, border-color .15s;
}
.ag-iconbtn:hover{ background:var(--cx-soft); color:var(--cx-ink); }
.ag-iconbtn.is-on{ color:var(--cx-accent); border-color:var(--cx-accent); }
.ag-iconbtn--danger:hover{ color:#c0392b; border-color:#e6b8b2; background:#fdf3f2; }

/* dashed "create" card */
.ag-card--new{ align-items:flex-start; justify-content:center; border-style:dashed; border-color:#d8d8d3; box-shadow:none; }
.ag-card--new:hover{ border-color:var(--cx-accent); transform:translateY(-3px); box-shadow:0 18px 40px rgba(20,20,40,.08); }
.ag-card--new .ag-card__avatar{ margin-bottom:.9rem; }

/* shared header for the simpler member pages (history/widgets/usage) */
.ag-pagehead{ display:flex; align-items:flex-end; justify-content:space-between; flex-wrap:wrap; gap:1rem; margin:.25rem 0 1.5rem; }
.ag-pagehead h1{ font-size:clamp(1.55rem,2.6vw,1.95rem); font-weight:500; margin:0 0 .3rem; letter-spacing:-.01em; }
.ag-pagehead p{ color:var(--cx-muted); margin:0; font-size:.95rem; max-width:62ch; }

/* premium surface applied to a member sub-page simply by wrapping it in .ag-page —
   lifts Bootstrap cards/forms/buttons to the cx aesthetic without per-element markup. */
.ag-page .card{ border:1px solid var(--cx-line); border-radius:var(--cx-r-lg); box-shadow:0 1px 2px rgba(16,16,30,.04); }
.ag-page .card-header{ background:#fff; border-bottom:1px solid var(--cx-line); font-weight:500; padding:.9rem 1.25rem; }
.ag-page .card-body{ padding:1.25rem 1.35rem; }
.ag-page .list-group-item{ border-color:var(--cx-line); padding:.85rem 1.1rem; }
.ag-page .form-control, .ag-page .form-select{ border-radius:10px; border-color:#dcdcd6; }
.ag-page .form-control-sm, .ag-page .form-select-sm{ border-radius:8px; }
.ag-page .form-control:focus, .ag-page .form-select:focus{ border-color:var(--cx-accent); box-shadow:0 0 0 3px color-mix(in srgb, var(--cx-accent) 16%, transparent); }
.ag-page .input-group-text{ border-radius:10px; border-color:#dcdcd6; background:var(--cx-soft); }
.ag-page .btn-primary{ background:var(--cx-ink); border-color:var(--cx-ink); border-radius:var(--cx-pill); }
.ag-page .btn-primary:hover{ background:#000; border-color:#000; }
.ag-page .btn-light{ background:var(--cx-soft); border-color:transparent; border-radius:var(--cx-pill); }
.ag-page .btn-light:hover{ background:var(--cx-soft-hover); }
.ag-page .btn-outline-danger, .ag-page .btn-outline-secondary, .ag-page .btn-white, .ag-page .btn-outline-primary{ border-radius:var(--cx-pill); }
.ag-page .alert{ border-radius:var(--cx-r-md); border-color:var(--cx-line); }

/* stat card (usage) */
.ag-stat{ background:#fff; border:1px solid var(--cx-line); border-radius:var(--cx-r-lg); padding:1.1rem 1.2rem; height:100%; box-shadow:0 1px 2px rgba(16,16,30,.04); }
.ag-stat__label{ color:var(--cx-muted); font-size:.82rem; display:flex; align-items:center; gap:.4rem; }
.ag-stat__value{ font-size:1.7rem; font-weight:500; margin-top:.3rem; letter-spacing:-.01em; line-height:1.1; }

/* read-only transcript (history + public shared conversation) */
.ag-tx{ display:flex; flex-direction:column; gap:1rem; margin-top:.5rem; }
.ag-tx__row{ display:flex; gap:.7rem; align-items:flex-start; max-width:88%; }
.ag-tx__row.is-user{ flex-direction:row-reverse; margin-left:auto; }
.ag-tx__avatar{ width:34px; height:34px; flex:none; border-radius:50%; display:inline-flex; align-items:center; justify-content:center; background:var(--cx-soft); color:var(--cx-muted); font-size:.95rem; }
.ag-tx__row.is-user .ag-tx__avatar{ background:var(--cx-ink); color:#fff; }
.ag-tx__bubble{ background:#fff; border:1px solid var(--cx-line); border-radius:16px; border-top-left-radius:4px; padding:.7rem 1rem; white-space:pre-wrap; word-wrap:break-word; line-height:1.55; font-size:.95rem; }
.ag-tx__row.is-user .ag-tx__bubble{ background:var(--cx-ink); color:#fff; border-color:var(--cx-ink); border-top-left-radius:16px; border-top-right-radius:4px; }

@media (max-width:575.98px){
  .ag-hero{ align-items:flex-start; }
  .ag-grid{ grid-template-columns:1fr; }
}

/* ── Assistant create/edit form — premium sectioned settings layout ─────────
   Shared structure with the admin form (admin.css mirrors these .af-* rules with
   the back-office theme's tokens). Inputs stay .form-control/.form-select so they
   inherit the .ag-page focus ring + radius defined above. */
.af-form{ max-width:none; }
.af-section{
  background:#fff; border:1px solid var(--cx-line); border-radius:var(--cx-r-lg);
  box-shadow:0 1px 2px rgba(16,16,30,.04); margin-bottom:1.1rem; overflow:hidden;
}
.af-section__head{ display:flex; gap:.9rem; align-items:flex-start; padding:1.05rem 1.35rem .95rem; border-bottom:1px solid var(--cx-line); }
.af-section__icon{
  flex:none; width:38px; height:38px; border-radius:11px; display:grid; place-items:center; font-size:1.05rem;
  color:var(--cx-accent); background:color-mix(in srgb, var(--cx-accent) 12%, #fff);
}
.af-section__titles{ min-width:0; }
.af-section__title{ font-size:1rem; font-weight:500; margin:0; color:var(--cx-ink); }
.af-section__hint{ font-size:.85rem; color:var(--cx-muted); margin:.15rem 0 0; line-height:1.45; }
.af-section__hint a{ color:var(--cx-accent); }
.af-section__body{ padding:1.15rem 1.35rem; }

.af-grid{ display:grid; grid-template-columns:repeat(2,1fr); gap:1rem 1.1rem; }
.af-grid .af-col-span{ grid-column:1 / -1; }
@media (max-width:640px){ .af-grid{ grid-template-columns:1fr; } }

.af-label{ display:block; font-size:.85rem; font-weight:500; color:var(--cx-ink); margin:0 0 .35rem; }
.af-opt{ color:var(--cx-muted-2); font-weight:400; }
.af-hint{ font-size:.82rem; color:var(--cx-muted); margin:.45rem 0 0; line-height:1.45; }

/* System prompt: segmented Text|JSON toggle + status */
.af-prompt__top{ display:flex; align-items:center; justify-content:space-between; gap:1rem; margin-bottom:.45rem; }
.af-prompt__top .af-label{ margin:0; }
.af-seg{ display:inline-flex; background:var(--cx-soft); border-radius:var(--cx-pill); padding:3px; gap:2px; }
.af-seg__btn{
  border:0; background:none; cursor:pointer; font-size:.82rem; font-weight:500; color:var(--cx-muted);
  padding:.32rem .85rem; border-radius:var(--cx-pill); line-height:1.2; display:inline-flex; align-items:center; gap:.35rem;
  transition:background .15s, color .15s;
}
.af-seg__btn:hover{ color:var(--cx-ink); }
.af-seg__btn.is-active{ background:#fff; color:var(--cx-ink); box-shadow:0 1px 2px rgba(16,16,30,.14); }
.af-prompt.is-json .af-prompt__ta{ font-family:ui-monospace,'SF Mono',Menlo,Consolas,monospace; font-size:.86rem; line-height:1.55; tab-size:2; }
.af-prompt__foot{ display:flex; align-items:center; justify-content:space-between; gap:1rem; margin-top:.4rem; min-height:1.2rem; }
.af-prompt__status{ font-size:.8rem; color:var(--cx-muted); display:inline-flex; align-items:center; gap:.35rem; }
.af-prompt__status.is-ok{ color:#1a7f4b; }
.af-prompt__status.is-err{ color:#c0392b; }
.af-prompt__status i:empty{ display:none; }
.af-linkbtn{ border:0; background:none; color:var(--cx-accent); font-size:.82rem; cursor:pointer; padding:0; display:inline-flex; align-items:center; gap:.3rem; }
.af-linkbtn:hover{ text-decoration:underline; }
.af-linkbtn[hidden]{ display:none; }

/* tool checkbox rows */
.af-check{ display:flex; gap:.75rem; align-items:flex-start; padding:.6rem 0; cursor:pointer; margin:0; }
.af-check + .af-check{ border-top:1px solid var(--cx-line); }
.af-check input{ margin-top:.15rem; width:1.05rem; height:1.05rem; flex:none; accent-color:var(--cx-accent); }
.af-check__txt strong{ font-weight:500; display:block; }
.af-check__txt span{ display:block; font-size:.84rem; color:var(--cx-muted); line-height:1.45; }

.af-actions{ display:flex; gap:.6rem; align-items:center; margin-top:.2rem; }

/* Two-column form: settings stack on the left, Instructions fills the right at the
   matching height. Collapses to one column when narrow. */
.af-cols{ display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1fr); gap:1.1rem; align-items:stretch; margin-bottom:1.2rem; }
.af-col{ display:flex; flex-direction:column; gap:1.1rem; min-width:0; }
.af-cols .af-section{ margin-bottom:0; }
.af-col--side .af-section{ flex:1 1 auto; }
.af-section--fill{ display:flex; flex-direction:column; }
.af-section--fill .af-section__body{ flex:1; display:flex; flex-direction:column; min-height:0; }
.af-section--fill .af-prompt{ flex:1; display:flex; flex-direction:column; min-height:0; }
.af-section--fill .af-prompt__ta{ flex:1 1 auto; min-height:240px; resize:none; }
@media (max-width:820px){
  .af-cols{ grid-template-columns:1fr; }
  .af-section--fill .af-prompt__ta{ resize:vertical; min-height:240px; }
}
