/* Font trial (2026-11-15): Manrope 700/800 headings, Be Vietnam Pro 400/500/600 body.
   Loaded last, only while BIPLUS_FONT_TRIAL is on (inc/biplus-font-trial.php). biplus-tokens.css and the
   UTM Avo files stay untouched, so switching the constant off restores the old type exactly.
   Card titles (post cards, collections, journey steps, mega-menu) keep their sizes and only take the new faces. */
/* Metric-matched fallbacks: while the web fonts load (display=swap), Arial is scaled and given the web fonts'
   ascent and descent, so the swap moves no line. Measured in Chrome against Arial on Vietnamese text. */
@font-face { font-family: 'Be Vietnam Pro Fallback'; src: local('Arial'), local('ArialMT'), local('Helvetica'); font-weight: 400 500;
  size-adjust: 107.44%; ascent-override: 93.07%; descent-override: 24.2%; line-gap-override: 0%; }
@font-face { font-family: 'Be Vietnam Pro Fallback'; src: local('Arial Bold'), local('Arial-BoldMT'), local('Helvetica Bold'); font-weight: 600 800;
  size-adjust: 102.95%; ascent-override: 97.14%; descent-override: 25.26%; line-gap-override: 0%; }
@font-face { font-family: 'Manrope Fallback'; src: local('Arial Bold'), local('Arial-BoldMT'), local('Helvetica Bold'); font-weight: 700 800;
  size-adjust: 99.9%; ascent-override: 106.7%; descent-override: 30%; line-gap-override: 0%; }
:root {
  --font-heading: 'Manrope', 'Manrope Fallback', 'Segoe UI', system-ui, sans-serif;
  --font-body: 'Be Vietnam Pro', 'Be Vietnam Pro Fallback', 'Segoe UI', system-ui, -apple-system, sans-serif;
  --font-deck-display: var(--font-heading);
  --font-deck-body: var(--font-body);
  /* Scale, desktop (phone below 768px) */
  --fs-h1: 48px; --fs-h2: 36px; --fs-h3: 28px; --fs-h4: 22px; --fs-lead: 18px; --fs-ui: 16px; --fs-caption: 14px;
  --ls-h1: -1.5px; --ls-h2: -1px;
  /* 1.24 is the lowest line-height where a stacked mark (Ễ, Ặ, Ự in Manrope 800) clears the descender of the line above */
  --lh-display: 1.24; --lh-head: 1.3; --lh-body: 1.6; --lh-ui: 1.25;
  --measure: 36em; /* about 66 characters of Be Vietnam Pro */
}
@media (max-width: 767px) {
  :root { --fs-h1: 32px; --fs-h2: 26px; --fs-h3: 22px; --fs-h4: 18px; --fs-lead: 17px; --fs-ui: 15px; --fs-caption: 13px; --ls-h1: -0.5px; --ls-h2: -0.5px; }
}

/* Only 400/500/600 of Be Vietnam Pro load: never let the browser fake a bolder cut */
body { font-size: 16px; line-height: var(--lh-body); font-synthesis-weight: none; }
body, body p, body li, body input, body textarea, body select { font-family: var(--font-body); font-weight: 400; }
body :is(strong, b), body .bp-prose :is(strong, b), body .bp-outcome strong { font-weight: 600; }
body p, body li { text-wrap: pretty; }

/* H1: page, post, archive and hero titles */
body h1, body .h1, body .hero-title, body .entry-title.ast-archive-title, body.biplus-archive .ast-archive-title,
body .bp-section .bp-hero__title, body .bp-section .bp-pagehead__title, body .bp-hero__title {
  font-family: var(--font-heading) !important; font-size: var(--fs-h1) !important; line-height: var(--lh-display) !important;
  font-weight: 800 !important; letter-spacing: var(--ls-h1) !important; text-wrap: balance;
}
/* H2: section and article headings */
body h2, body .h2, body .bp-section h2.wp-block-heading, body .bp-prose h2,
body .bp-newsletter h2.wp-block-heading, body .bp-contact-page h2.wp-block-heading {
  font-family: var(--font-heading) !important; font-size: var(--fs-h2) !important; line-height: var(--lh-display) !important;
  font-weight: 800 !important; letter-spacing: var(--ls-h2) !important; text-wrap: balance;
}
/* h2 tags that are labels, not section headings: footer column titles, docs group and "more" titles */
body .bp-footer h2.bp-footer__title {
  font-family: var(--font-body) !important; font-size: 16px !important; line-height: 1.4 !important; font-weight: 600 !important; letter-spacing: 0 !important;
}
body .bp-qa-group h2.bp-qa-group__title, body h2.bp-qa-group__title {
  font-size: 24px !important; line-height: var(--lh-head) !important; font-weight: 800 !important; letter-spacing: -0.3px !important;
}
body h2.bp-doc-more__title {
  font-family: var(--font-body) !important; font-size: 17px !important; line-height: 1.4 !important; font-weight: 600 !important; letter-spacing: 0 !important;
}
/* Archive post cards (category, tag, search) are h2 in Astra's markup: card title size, not section size */
body.biplus-archive h2.entry-title {
  font-size: 18px !important; line-height: var(--lh-head) !important; font-weight: 700 !important; letter-spacing: -0.2px !important;
}

/* H3 / H4 at full scale inside reading text */
body .bp-prose h3, body .entry-content > h3 { font-family: var(--font-heading); font-size: var(--fs-h3); line-height: var(--lh-head); font-weight: 700; letter-spacing: -0.3px; }
body .bp-prose h4, body .entry-content > h4 { font-family: var(--font-heading); font-size: var(--fs-h4); line-height: var(--lh-head); font-weight: 700; letter-spacing: 0; }
body h3, body h4, body h5, body h6 { font-family: var(--font-heading); font-weight: 700; }
/* Card titles: same sizes as before, heading face at 700, room for marks */
body .bp-section h3.wp-block-heading, body .bp-section .bp-posts h3.wp-block-post-title, body.biplus-archive .entry-title,
body .bp-section h3.bp-journey__title {
  font-family: var(--font-heading); font-weight: 700; line-height: var(--lh-head); letter-spacing: -0.2px; text-wrap: balance;
}
/* Clamped post titles: the box clips at its top, so give stacked marks on the first line room inside it */
body .bp-posts .wp-block-post-title a, body.biplus-archive .entry-title a { line-height: 1.4; padding-top: var(--sp-1); margin-top: calc(-1 * var(--sp-1)); }
body .bp-posts .wp-block-post-excerpt__excerpt { line-height: 1.6; padding-top: var(--sp-1); }
/* Questions in Hỏi đáp read as list items: body face */
body .bp-qa__q { font-family: var(--font-body); font-weight: 600; }

/* Reading measure: about 66 characters a line */
body .bp-prose p, body .bp-prose :is(ul, ol), body .bp-qa__a :is(p, ul, ol) { max-width: var(--measure); }
body .bp-lead { font-size: var(--fs-lead); line-height: var(--lh-body); font-weight: 400; max-width: 38em; }
body .bp-hero__lead { font-weight: 400; }
body .bp-prose { font-weight: 400; }
body .bp-card p, body .bp-coll__tagline, body .bp-coll__apps li { line-height: 1.55; }

/* Buttons and menu: Be Vietnam Pro 600, one line-height for every control */
body .bp-btn, body .wp-block-button__link, body button, body .ast-button, body input[type="submit"],
body .bp-nav__label, body .bp-nav__trigger, body .bp-nav__item > a, body .main-header-menu a, body .bp-mega a {
  font-family: var(--font-body) !important; font-weight: 600 !important; font-size: var(--fs-ui);
}
body .bp-btn, body .wp-block-button .wp-block-button__link { line-height: var(--lh-ui); min-height: 48px; padding-block: var(--sp-3); }
body .bp-mega a, body .bp-nav__item > a, body .bp-nav__trigger { letter-spacing: 0; }
body .bp-mega__title { font-weight: 600; font-size: 13px; }
body .bp-mega__name { font-weight: 600; line-height: 1.35; }
body .bp-mega__desc { font-weight: 400; line-height: 1.45; }

/* Labels, chips, meta: body face 600 at most */
body .bp-field label, body .bp-card__link a, body .bp-app, body .bp-role, body .bp-chip, body .bp-tags a,
body .bp-coll__apps strong, body .bp-toc__title, body .bp-share__label, body .bp-person__role, body .bp-qa__link,
body .bp-eol__more, body .bp-pager, body .bp-rail__top { font-weight: 600; }
body .bp-field label { line-height: 1.4; }
body .bp-form__submit { line-height: var(--lh-ui); }

/* Numbers: dates, counters and pager figures line up */
body :is(.wp-block-post-date, .bp-meta, .entry-meta, .bp-pager, time), body .bp-journey__list > .bp-phase::before {
  font-variant-numeric: tabular-nums lining-nums;
}

/* Footer */
body .bp-footer { line-height: var(--lh-body); }
body .bp-footer__bottom { font-size: 13px; }

/* Caption */
body figcaption, body .wp-element-caption, body .caption { font-family: var(--font-body); font-size: var(--fs-caption); line-height: 1.5; font-weight: 400; }
