/* ============================================================
   BrandXtrategy v2 (AEO update, Oct 2026)
   Additions on top of styles.css: Brandix placements, answer-first
   sections, FAQ, pricing, guide/article layout, review markers.
   Uses the tokens from ds-tokens.css. Loaded after styles.css.
   ============================================================ */

bx-mascot { display: inline-block; aspect-ratio: 1; }

/* ---------- Header: more links, earlier mobile menu ---------- */
.main-nav { gap: 22px; }
.main-nav a { font-size: 0.93rem; }
@media (max-width: 1080px) {
  .main-nav {
    display: none; position: absolute; top: 72px; left: 0; right: 0;
    background: var(--white); flex-direction: column; align-items: stretch;
    padding: 16px 24px 24px; gap: 4px; border-bottom: 1px solid var(--light);
    box-shadow: var(--shadow);
  }
  .main-nav.open { display: flex; }
  .main-nav a { padding: 12px 4px; font-size: 1.05rem; }
  .main-nav a.nav-cta { text-align: center; margin-top: 8px; }
  .nav-toggle { display: block; }
}

/* ---------- Hero with Brandix ---------- */
.hero-inner.hero-split { max-width: var(--maxw); margin: 0 auto; display: grid; grid-template-columns: minmax(0, 700px) 260px; justify-content: center; gap: 72px; align-items: center; }
.hero-split > div { max-width: 700px; }
.hero-mascot { margin: 0; text-align: center; }
.hero-mascot bx-mascot { width: 200px; filter: drop-shadow(0 18px 30px rgba(12, 46, 74, .45)); }
.hero-mascot figcaption { margin-top: 14px; color: var(--sky-soft); font-size: .88rem; font-weight: 600; }
@media (max-width: 880px) {
  .hero-inner.hero-split { grid-template-columns: 1fr; }
  .hero-mascot { display: none; }
}

/* ---------- Service cards: guide links ---------- */
a.card-guide {
  display: block; margin: 0 0 6px; color: var(--steel); font-weight: 600;
  font-size: .9rem; text-decoration: none; transition: color .18s;
}
a.card-guide:hover { color: var(--navy); text-decoration: underline; }
.service-card a.card-guide:first-of-type { margin-top: 4px; }
.service-card .card-ask { margin-top: 10px; display: inline-block; }

/* ---------- Pricing ---------- */
.price-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.price-card {
  background: var(--white); border: 1px solid var(--light); border-radius: var(--radius);
  padding: 28px; box-shadow: var(--shadow-sm); transition: transform .18s, box-shadow .18s;
}
.price-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.price-card h3 { font-size: 1.1rem; margin-bottom: 8px; }
.price-card .price { font-family: var(--font-display); font-weight: 800; color: var(--navy); font-size: 1.35rem; margin-bottom: 10px; }
.price-card .price small { font-size: .85rem; font-weight: 600; color: var(--ink-soft); }
.price-card p { color: var(--ink-soft); font-size: .94rem; margin-bottom: 14px; }
.price-card a { color: var(--steel); font-weight: 600; text-decoration: none; font-size: .92rem; }
.price-card a:hover { color: var(--navy); }
@media (max-width: 880px) { .price-row { grid-template-columns: 1fr; } }

/* ---------- FAQ ---------- */
.faq-wrap { display: grid; grid-template-columns: 1fr 1.5fr; gap: 56px; align-items: start; }
.faq-wrap .section-head { margin-bottom: 0; position: sticky; top: 100px; }
.faq-wrap .section-head a { color: var(--steel); font-weight: 600; }
.faq-mascot { width: 96px; margin-top: 26px; }
.faq-list { display: flex; flex-direction: column; gap: 12px; }
.faq-item {
  background: var(--white); border: 1px solid var(--light); border-radius: var(--radius);
  box-shadow: var(--shadow-sm); padding: 0 22px; transition: box-shadow .18s;
}
.faq-item[open] { box-shadow: var(--shadow); }
.faq-item summary {
  list-style: none; cursor: pointer; padding: 18px 28px 18px 0; position: relative;
  font-family: var(--font-display); font-weight: 700; color: var(--navy); font-size: 1.02rem;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: ""; position: absolute; right: 2px; top: 50%; width: 9px; height: 9px;
  border-right: 2px solid var(--steel); border-bottom: 2px solid var(--steel);
  transform: translateY(-70%) rotate(45deg); transition: transform .18s;
}
.faq-item[open] summary::after { transform: translateY(-30%) rotate(-135deg); }
.faq-item p { color: var(--ink-soft); padding: 0 0 18px; font-size: .97rem; }
.faq-item p + p { margin-top: -6px; }
@media (max-width: 880px) {
  .faq-wrap { grid-template-columns: 1fr; gap: 28px; }
  .faq-wrap .section-head { position: static; }
  .faq-mascot { display: none; }
}

/* ---------- About with Brandix ---------- */
.about-lede { color: var(--navy) !important; font-size: 1.08rem; }
.about-brandix { margin: 0; flex-direction: column; gap: 18px; padding: 36px 28px; text-align: center; background: linear-gradient(160deg, #EEF4FA 0%, var(--white) 70%); }
.about-brandix figcaption { color: var(--ink-soft); font-size: .93rem; max-width: 300px; }
.about-brandix figcaption strong { color: var(--navy); }

/* ---------- Form success with Brandix ---------- */
.form-success { align-items: center; gap: 12px; }
.form-success .success-mascot { width: 44px; flex-shrink: 0; }
.form-success[style*="block"] { display: flex !important; }

/* ---------- Footer with 4 columns ---------- */
.footer-grid.has-guides { grid-template-columns: 1.3fr 1fr 1fr 1.2fr; }
@media (max-width: 880px) { .footer-grid.has-guides { grid-template-columns: 1fr 1fr; } .footer-grid.has-guides .footer-brand { grid-column: 1 / -1; } }

/* ---------- Article / guide pages ---------- */
.article-hero { padding: 56px 0 60px; }
.article-hero .container { position: relative; }
.crumbs { font-size: .85rem; color: var(--sky-soft); margin-bottom: 18px; position: relative; }
.crumbs a { color: var(--sky-soft); text-decoration: none; }
.crumbs a:hover { color: var(--white); }
.crumbs span[aria-hidden] { margin: 0 8px; opacity: .6; }
.article-hero .eyebrow {
  display: inline-block; font-size: .78rem; font-weight: 700; letter-spacing: .12em;
  text-transform: uppercase; color: var(--sky); margin-bottom: 12px; position: relative;
}
.article-hero h1 { max-width: 820px; }
.article-hero p.answer { font-size: 1.15rem; color: #E4EEF7; max-width: 760px; }
.article-hero .meta { margin-top: 18px; font-size: .85rem; color: var(--sky-soft); }

.article-grid { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 56px; align-items: start; }
.article-aside { position: sticky; top: 96px; display: flex; flex-direction: column; gap: 20px; }
@media (max-width: 960px) {
  .article-grid { grid-template-columns: 1fr; }
  .article-aside { position: static; }
  .article-aside .toc { display: none; }
}

.prose { background: var(--white); border: 1px solid var(--light); border-radius: var(--radius-lg); padding: 44px 48px; box-shadow: var(--shadow-sm); min-width: 0; }
@media (max-width: 640px) { .prose { padding: 28px 20px; } }
.prose > *:first-child { margin-top: 0; }
.prose h2 { font-size: clamp(1.35rem, 2.4vw, 1.65rem); font-weight: 800; margin: 44px 0 14px; scroll-margin-top: 96px; }
.prose h3 { font-size: 1.12rem; font-weight: 700; margin: 28px 0 10px; scroll-margin-top: 96px; }
.prose p { margin: 0 0 16px; color: var(--ink); font-size: 1.02rem; }
.prose ul, .prose ol { margin: 0 0 18px 22px; }
.prose li { margin-bottom: 8px; }
.prose a { color: var(--steel); font-weight: 600; text-underline-offset: 3px; }
.prose a:hover { color: var(--navy); }
.prose strong { color: var(--navy); }
.prose sup { line-height: 0; }
.prose sup a { text-decoration: none; font-size: .75rem; padding: 0 1px; }
.prose .table-wrap { overflow-x: auto; margin: 6px 0 22px; border: 1px solid var(--light); border-radius: var(--radius); }
.prose table { border-collapse: collapse; width: 100%; font-size: .93rem; min-width: 560px; }
.prose th { background: #EEF4FA; color: var(--navy); font-family: var(--font-display); text-align: left; padding: 12px 14px; font-weight: 700; }
.prose td { padding: 12px 14px; border-top: 1px solid var(--light); vertical-align: top; color: var(--ink-soft); }
.prose .footnote { font-size: .88rem; color: var(--ink-soft); }
.prose .footnote hr { display: none; }
.prose .footnote ol { margin-left: 18px; }
.prose .footnote li p { font-size: .88rem; margin: 0; color: var(--ink-soft); }
.prose .faq-list { margin: 8px 0 12px; }
.prose .next-step { background: #EEF4FA; border-radius: var(--radius); padding: 22px 24px; margin: 28px 0 8px; display: flex; gap: 18px; align-items: center; }
.prose .next-step bx-mascot { width: 64px; flex-shrink: 0; }
.prose .next-step p { margin: 0; }

.toc { background: var(--white); border: 1px solid var(--light); border-radius: var(--radius); padding: 20px 22px; box-shadow: var(--shadow-sm); }
.toc h2 { font-family: var(--font-body); font-size: .75rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--steel); margin-bottom: 10px; }
.toc a { display: block; color: var(--ink-soft); text-decoration: none; font-size: .88rem; padding: 6px 0; border-top: 1px solid #F0F3F6; line-height: 1.35; }
.toc a:first-of-type { border-top: 0; }
.toc a:hover { color: var(--navy); }

.cta-card { background: var(--grad-navy); color: var(--white); border-radius: var(--radius); padding: 26px 24px; box-shadow: var(--shadow-lg); text-align: center; }
.cta-card bx-mascot { width: 84px; margin-bottom: 6px; }
.cta-card h2 { color: var(--white); font-size: 1.12rem; margin-bottom: 8px; }
.cta-card p { color: #CFE0EE; font-size: .9rem; margin-bottom: 16px; }
.cta-card .btn { width: 100%; justify-content: center; }

.related { margin-top: 28px; }
.related h2 { font-size: 1.2rem; margin-bottom: 14px; }

/* ---------- Guides hub ---------- */
.guide-group { margin-bottom: 48px; }
.guide-group > h2 { font-size: 1.35rem; margin-bottom: 6px; }
.guide-group > p { color: var(--ink-soft); margin-bottom: 20px; max-width: 680px; }
.guide-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 20px; }
.guide-card {
  display: flex; flex-direction: column; background: var(--white); border: 1px solid var(--light);
  border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow-sm); text-decoration: none;
  transition: transform .18s, box-shadow .18s;
}
.guide-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.guide-card .kicker { font-size: .74rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--steel); margin-bottom: 8px; }
.guide-card h3 { font-size: 1.08rem; margin-bottom: 8px; }
.guide-card p { color: var(--ink-soft); font-size: .92rem; flex: 1; margin-bottom: 14px; }
.guide-card .go { color: var(--steel); font-weight: 600; font-size: .9rem; }

/* ---------- Simple content sections (pricing / about) ---------- */
.page-section { max-width: 820px; }
.page-section + .page-section { margin-top: 56px; }
.page-section h2 { font-size: clamp(1.4rem, 2.6vw, 1.8rem); margin-bottom: 12px; }
.page-section p { color: var(--ink-soft); margin-bottom: 14px; font-size: 1.02rem; }
.page-section p.answer { color: var(--ink); font-size: 1.08rem; }
.page-section ul { margin: 0 0 16px 22px; color: var(--ink-soft); }
.page-section li { margin-bottom: 8px; }
.page-section .table-wrap { overflow-x: auto; border: 1px solid var(--light); border-radius: var(--radius); background: var(--white); margin: 8px 0 18px; }
.page-section table { border-collapse: collapse; width: 100%; font-size: .94rem; min-width: 560px; }
.page-section th { background: #EEF4FA; color: var(--navy); text-align: left; padding: 12px 14px; font-family: var(--font-display); }
.page-section td { padding: 12px 14px; border-top: 1px solid var(--light); color: var(--ink-soft); vertical-align: top; }
.page-section td strong { color: var(--navy); }

.brandix-states { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 14px; margin: 18px 0 8px; }
.brandix-state { background: var(--white); border: 1px solid var(--light); border-radius: var(--radius); padding: 18px 12px; text-align: center; box-shadow: var(--shadow-sm); }
.brandix-state bx-mascot { width: 64px; margin-bottom: 8px; }
.brandix-state strong { display: block; color: var(--navy); font-size: .9rem; }
.brandix-state span { font-size: .8rem; color: var(--ink-soft); }

/* ---------- 404 ---------- */
.notfound { text-align: center; padding: 96px 0; }
.notfound bx-mascot { width: 150px; margin-bottom: 18px; }
.notfound h1 { font-size: clamp(1.8rem, 4vw, 2.6rem); margin-bottom: 12px; }
.notfound p { color: var(--ink-soft); max-width: 520px; margin: 0 auto 26px; }
.notfound .hero-ctas { justify-content: center; }

/* ---------- Review markers (remove before publishing) ---------- */
mark.tbc { background: #FFF1C2; color: #6B4E00; border-radius: 4px; padding: 1px 5px; font-weight: 600; font-size: .92em; }
.draft-banner { background: #FFF1C2; color: #6B4E00; text-align: center; font-size: .88rem; font-weight: 600; padding: 10px 16px; }

/* ---------- Back-to-top next to Brandix: arrow only, so there is one "X" on screen ---------- */
body.has-bx-chat #toTop { width: 44px; height: 44px; right: 34px; }
body.has-bx-chat #toTop img { display: none; }
body.has-bx-chat #toTop .up-arrow { width: 20px; height: 20px; opacity: .8; }

/* v2.1 (2026-11-05): own projects on the examples page, footer profiles (shown only when filled in build.py SOCIAL) */
.project-card .badge-free { position: static; display: inline-block; margin-bottom: 10px; }
.project-card h3 { margin-top: 0; }
.footer-social { padding: 14px 0 0; font-size: .9rem; color: #9FB8CC; }
.footer-social a { color: #9FB8CC; }
