/*!
 * compat.css —— 长尾内核（微信 X5 / 旧 Android WebView / 旧 iOS Safari / 旧 Edge）兼容层
 * 由 tools/gen-compat-css.js 从 tokens/main/sections/pages.css 机械推导，请勿手工编辑。
 * 重新生成：node tools/gen-compat-css.js   校验是否过期：node tools/gen-compat-css.js --check
 */

/* =====================================================================
 * 1. flex / grid 的 gap 降级层
 *    触发条件：compat.js 真实测量后打点 html.no-gap（Chromium<84 / Safari<14.1 / 旧 X5）。
 *    原理：容器负 margin 抵消边缘留白 + 子元素正 margin 复刻间距。
 *    轴向已按 flex-direction / flex-wrap 精确判定：单行 row 容器不写纵向 margin，
 *    否则按钮、徽章会被额外撑高。clamp()/calc() 写两遍：静态值在前、原值在后，
 *    不认识 clamp() 的内核自动丢弃后一条，仍得到可用间距。
 *    输出为扁平选择器（不用原生 CSS 嵌套），老内核才能真的读到这些规则。
 * ===================================================================== */
  html.no-gap .eyebrow { margin-right: -0.55rem; }
  html.no-gap .eyebrow > * { margin-right: 0.55rem; }

  html.no-gap .btn { margin-right: -0.5rem; }
  html.no-gap .btn > * { margin-right: 0.5rem; }

  html.no-gap .site-header__inner { margin-right: -1rem; }
  html.no-gap .site-header__inner { margin-right: calc(-1 * (clamp(1rem, 3vw, 2.5rem))); }
  html.no-gap .site-header__inner > * { margin-right: 1rem; }
  html.no-gap .site-header__inner > * { margin-right: clamp(1rem, 3vw, 2.5rem); }

  html.no-gap .brand { margin-right: -0.7rem; }
  html.no-gap .brand > * { margin-right: 0.7rem; }

  html.no-gap .site-nav { margin-right: -0.45rem; }
  html.no-gap .site-nav { margin-right: calc(-1 * (clamp(0.45rem, 1.1vw, 1.1rem))); }
  html.no-gap .site-nav > * { margin-right: 0.45rem; }
  html.no-gap .site-nav > * { margin-right: clamp(0.45rem, 1.1vw, 1.1rem); }

  html.no-gap .header-actions { margin-right: -0.75rem; }
  html.no-gap .header-actions > * { margin-right: 0.75rem; }

  html.no-gap .nav-toggle { margin-bottom: -4px; }
  html.no-gap .nav-toggle > * { margin-bottom: 4px; }

  html.no-gap .lang-switcher__btn { margin-right: -0.45rem; }
  html.no-gap .lang-switcher__btn > * { margin-right: 0.45rem; }

  html.no-gap .lang-switcher__item { margin-right: -0.6rem; }
  html.no-gap .lang-switcher__item > * { margin-right: 0.6rem; }

  html.no-gap .hero__badge { margin-right: -0.55rem; }
  html.no-gap .hero__badge > * { margin-right: 0.55rem; }

  html.no-gap .hero__actions { margin-right: -0.85rem; }
  html.no-gap .hero__actions > * { margin-right: 0.85rem; }
  html.no-gap .hero__actions { margin-bottom: -0.85rem; }
  html.no-gap .hero__actions > * { margin-bottom: 0.85rem; }

  html.no-gap .hero__stats { margin-right: -1rem; }
  html.no-gap .hero__stats { margin-right: calc(-1 * (clamp(1rem, 3vw, 3rem))); }
  html.no-gap .hero__stats > * { margin-right: 1rem; }
  html.no-gap .hero__stats > * { margin-right: clamp(1rem, 3vw, 3rem); }
  html.no-gap .hero__stats { margin-bottom: -1rem; }
  html.no-gap .hero__stats { margin-bottom: calc(-1 * (clamp(1rem, 3vw, 3rem))); }
  html.no-gap .hero__stats > * { margin-bottom: 1rem; }
  html.no-gap .hero__stats > * { margin-bottom: clamp(1rem, 3vw, 3rem); }

  html.no-gap .hero__scroll { margin-bottom: -0.5rem; }
  html.no-gap .hero__scroll > * { margin-bottom: 0.5rem; }

  html.no-gap .hero__dots { margin-right: -0.5rem; }
  html.no-gap .hero__dots > * { margin-right: 0.5rem; }

  html.no-gap .chip-row { margin-right: -0.55rem; }
  html.no-gap .chip-row > * { margin-right: 0.55rem; }
  html.no-gap .chip-row { margin-bottom: -0.55rem; }
  html.no-gap .chip-row > * { margin-bottom: 0.55rem; }

  html.no-gap .field { margin-bottom: -0.35rem; }
  html.no-gap .field > * { margin-bottom: 0.35rem; }

  html.no-gap .form-grid { margin-right: -1rem; }
  html.no-gap .form-grid > * { margin-right: 1rem; }
  html.no-gap .form-grid { margin-bottom: -1rem; }
  html.no-gap .form-grid > * { margin-bottom: 1rem; }

  html.no-gap .lightbox__body { margin-bottom: -0.85rem; }
  html.no-gap .lightbox__body > * { margin-bottom: 0.85rem; }

  html.no-gap .lightbox__meta { margin-right: -0.4rem; }
  html.no-gap .lightbox__meta > * { margin-right: 0.4rem; }
  html.no-gap .lightbox__meta { margin-bottom: -0.4rem; }
  html.no-gap .lightbox__meta > * { margin-bottom: 0.4rem; }

  html.no-gap .site-footer__grid { margin-right: -1.5rem; }
  html.no-gap .site-footer__grid { margin-right: calc(-1 * (clamp(1.5rem, 4vw, 3rem))); }
  html.no-gap .site-footer__grid > * { margin-right: 1.5rem; }
  html.no-gap .site-footer__grid > * { margin-right: clamp(1.5rem, 4vw, 3rem); }
  html.no-gap .site-footer__grid { margin-bottom: -1.5rem; }
  html.no-gap .site-footer__grid { margin-bottom: calc(-1 * (clamp(1.5rem, 4vw, 3rem))); }
  html.no-gap .site-footer__grid > * { margin-bottom: 1.5rem; }
  html.no-gap .site-footer__grid > * { margin-bottom: clamp(1.5rem, 4vw, 3rem); }

  html.no-gap .site-footer__bottom { margin-right: -0.75rem; }
  html.no-gap .site-footer__bottom > * { margin-right: 0.75rem; }
  html.no-gap .site-footer__bottom { margin-bottom: -0.75rem; }
  html.no-gap .site-footer__bottom > * { margin-bottom: 0.75rem; }

  html.no-gap .contact-line { margin-right: -0.6rem; }
  html.no-gap .contact-line > * { margin-right: 0.6rem; }

  html.no-gap .mobile-actionbar { margin-right: -0.5rem; }
  html.no-gap .mobile-actionbar > * { margin-right: 0.5rem; }

  html.no-gap .mobile-actionbar__btn { margin-bottom: -2px; }
  html.no-gap .mobile-actionbar__btn > * { margin-bottom: 2px; }

  @media (max-width: 640px) {
    html.no-gap .site-header__inner { margin-right: -0.55rem; }
    html.no-gap .site-header__inner > * { margin-right: 0.55rem; }
  }

  @media (max-width: 640px) {
    html.no-gap .hero__stats { margin-right: -1.25rem; }
    html.no-gap .hero__stats > * { margin-right: 1.25rem; }
    html.no-gap .hero__stats { margin-bottom: -1rem; }
    html.no-gap .hero__stats > * { margin-bottom: 1rem; }
  }

  @media (max-width: 480px) {
    html.no-gap .hero__actions { margin-right: -0.6rem; }
    html.no-gap .hero__actions > * { margin-right: 0.6rem; }
    html.no-gap .hero__actions { margin-bottom: -0.6rem; }
    html.no-gap .hero__actions > * { margin-bottom: 0.6rem; }
  }

  html.no-gap .trust-bar__track { margin-right: -1.5rem; }
  html.no-gap .trust-bar__track { margin-right: calc(-1 * (clamp(1.5rem, 4vw, 3.5rem))); }
  html.no-gap .trust-bar__track > * { margin-right: 1.5rem; }
  html.no-gap .trust-bar__track > * { margin-right: clamp(1.5rem, 4vw, 3.5rem); }

  html.no-gap .trust-bar__item { margin-right: -0.5rem; }
  html.no-gap .trust-bar__item > * { margin-right: 0.5rem; }

  html.no-gap .advantages { margin-right: -1px; }
  html.no-gap .advantages > * { margin-right: 1px; }
  html.no-gap .advantages { margin-bottom: -1px; }
  html.no-gap .advantages > * { margin-bottom: 1px; }

  html.no-gap .advantage { margin-bottom: -0.6rem; }
  html.no-gap .advantage > * { margin-bottom: 0.6rem; }

  html.no-gap .products-toolbar { margin-right: -1rem; }
  html.no-gap .products-toolbar > * { margin-right: 1rem; }
  html.no-gap .products-toolbar { margin-bottom: -1rem; }
  html.no-gap .products-toolbar > * { margin-bottom: 1rem; }

  html.no-gap .category-scroll { margin-right: -0.5rem; }
  html.no-gap .category-scroll > * { margin-right: 0.5rem; }

  html.no-gap .product-grid { margin-right: -0.75rem; }
  html.no-gap .product-grid { margin-right: calc(-1 * (clamp(0.75rem, 1.6vw, 1.35rem))); }
  html.no-gap .product-grid > * { margin-right: 0.75rem; }
  html.no-gap .product-grid > * { margin-right: clamp(0.75rem, 1.6vw, 1.35rem); }
  html.no-gap .product-grid { margin-bottom: -0.75rem; }
  html.no-gap .product-grid { margin-bottom: calc(-1 * (clamp(0.75rem, 1.6vw, 1.35rem))); }
  html.no-gap .product-grid > * { margin-bottom: 0.75rem; }
  html.no-gap .product-grid > * { margin-bottom: clamp(0.75rem, 1.6vw, 1.35rem); }

  html.no-gap .product-card__body { margin-bottom: -0.35rem; }
  html.no-gap .product-card__body > * { margin-bottom: 0.35rem; }

  html.no-gap .product-card__meta { margin-right: -0.3rem; }
  html.no-gap .product-card__meta > * { margin-right: 0.3rem; }
  html.no-gap .product-card__meta { margin-bottom: -0.3rem; }
  html.no-gap .product-card__meta > * { margin-bottom: 0.3rem; }

  html.no-gap .custom-layout { margin-right: -2rem; }
  html.no-gap .custom-layout { margin-right: calc(-1 * (clamp(2rem, 5vw, 4rem))); }
  html.no-gap .custom-layout > * { margin-right: 2rem; }
  html.no-gap .custom-layout > * { margin-right: clamp(2rem, 5vw, 4rem); }
  html.no-gap .custom-layout { margin-bottom: -2rem; }
  html.no-gap .custom-layout { margin-bottom: calc(-1 * (clamp(2rem, 5vw, 4rem))); }
  html.no-gap .custom-layout > * { margin-bottom: 2rem; }
  html.no-gap .custom-layout > * { margin-bottom: clamp(2rem, 5vw, 4rem); }

  html.no-gap .custom-steps { margin-bottom: -0.25rem; }
  html.no-gap .custom-steps > * { margin-bottom: 0.25rem; }

  html.no-gap .custom-step { margin-right: -1rem; }
  html.no-gap .custom-step > * { margin-right: 1rem; }
  html.no-gap .custom-step { margin-bottom: -1rem; }
  html.no-gap .custom-step > * { margin-bottom: 1rem; }

  html.no-gap .custom-visual { margin-right: -0.85rem; }
  html.no-gap .custom-visual > * { margin-right: 0.85rem; }
  html.no-gap .custom-visual { margin-bottom: -0.85rem; }
  html.no-gap .custom-visual > * { margin-bottom: 0.85rem; }

  html.no-gap .gallery { margin-right: -0.85rem; }
  html.no-gap .gallery > * { margin-right: 0.85rem; }
  html.no-gap .gallery { margin-bottom: -0.85rem; }
  html.no-gap .gallery > * { margin-bottom: 0.85rem; }

  html.no-gap .about-layout { margin-right: -2rem; }
  html.no-gap .about-layout { margin-right: calc(-1 * (clamp(2rem, 5vw, 4rem))); }
  html.no-gap .about-layout > * { margin-right: 2rem; }
  html.no-gap .about-layout > * { margin-right: clamp(2rem, 5vw, 4rem); }
  html.no-gap .about-layout { margin-bottom: -2rem; }
  html.no-gap .about-layout { margin-bottom: calc(-1 * (clamp(2rem, 5vw, 4rem))); }
  html.no-gap .about-layout > * { margin-bottom: 2rem; }
  html.no-gap .about-layout > * { margin-bottom: clamp(2rem, 5vw, 4rem); }

  html.no-gap .about-figures { margin-right: -0.85rem; }
  html.no-gap .about-figures > * { margin-right: 0.85rem; }
  html.no-gap .about-figures { margin-bottom: -0.85rem; }
  html.no-gap .about-figures > * { margin-bottom: 0.85rem; }

  html.no-gap .about-tags { margin-right: -0.4rem; }
  html.no-gap .about-tags > * { margin-right: 0.4rem; }
  html.no-gap .about-tags { margin-bottom: -0.4rem; }
  html.no-gap .about-tags > * { margin-bottom: 0.4rem; }

  html.no-gap .cert-viewer { margin-right: -1.5rem; }
  html.no-gap .cert-viewer { margin-right: calc(-1 * (clamp(1.5rem, 3vw, 2.5rem))); }
  html.no-gap .cert-viewer > * { margin-right: 1.5rem; }
  html.no-gap .cert-viewer > * { margin-right: clamp(1.5rem, 3vw, 2.5rem); }
  html.no-gap .cert-viewer { margin-bottom: -1.5rem; }
  html.no-gap .cert-viewer { margin-bottom: calc(-1 * (clamp(1.5rem, 3vw, 2.5rem))); }
  html.no-gap .cert-viewer > * { margin-bottom: 1.5rem; }
  html.no-gap .cert-viewer > * { margin-bottom: clamp(1.5rem, 3vw, 2.5rem); }

  html.no-gap .cert-figure { margin-right: -0.9rem; }
  html.no-gap .cert-figure > * { margin-right: 0.9rem; }
  html.no-gap .cert-figure { margin-bottom: -0.9rem; }
  html.no-gap .cert-figure > * { margin-bottom: 0.9rem; }

  html.no-gap .cert-caption { margin-right: -0.75rem; }
  html.no-gap .cert-caption > * { margin-right: 0.75rem; }
  html.no-gap .cert-caption { margin-bottom: -0.5rem; }
  html.no-gap .cert-caption > * { margin-bottom: 0.5rem; }

  html.no-gap .cert-list { margin-right: -0.5rem; }
  html.no-gap .cert-list > * { margin-right: 0.5rem; }

  html.no-gap .cert-list button { margin-bottom: -0.75rem; }
  html.no-gap .cert-list button > * { margin-bottom: 0.75rem; }

  html.no-gap .cert-zoom__figure { margin-right: -0.9rem; }
  html.no-gap .cert-zoom__figure > * { margin-right: 0.9rem; }
  html.no-gap .cert-zoom__figure { margin-bottom: -0.9rem; }
  html.no-gap .cert-zoom__figure > * { margin-bottom: 0.9rem; }

  html.no-gap .exhibition-grid { margin-right: -0.85rem; }
  html.no-gap .exhibition-grid > * { margin-right: 0.85rem; }
  html.no-gap .exhibition-grid { margin-bottom: -0.85rem; }
  html.no-gap .exhibition-grid > * { margin-bottom: 0.85rem; }

  html.no-gap .contact-layout { margin-right: -1.5rem; }
  html.no-gap .contact-layout { margin-right: calc(-1 * (clamp(1.5rem, 4vw, 3rem))); }
  html.no-gap .contact-layout > * { margin-right: 1.5rem; }
  html.no-gap .contact-layout > * { margin-right: clamp(1.5rem, 4vw, 3rem); }
  html.no-gap .contact-layout { margin-bottom: -1.5rem; }
  html.no-gap .contact-layout { margin-bottom: calc(-1 * (clamp(1.5rem, 4vw, 3rem))); }
  html.no-gap .contact-layout > * { margin-bottom: 1.5rem; }
  html.no-gap .contact-layout > * { margin-bottom: clamp(1.5rem, 4vw, 3rem); }

  html.no-gap .contact-info { margin-bottom: -1.35rem; }
  html.no-gap .contact-info > * { margin-bottom: 1.35rem; }

  html.no-gap .contact-info__item { margin-right: -0.85rem; }
  html.no-gap .contact-info__item > * { margin-right: 0.85rem; }

  @media (max-width: 720px) {
    html.no-gap .custom-visual { margin-right: -0.6rem; }
    html.no-gap .custom-visual > * { margin-right: 0.6rem; }
    html.no-gap .custom-visual { margin-bottom: -0.6rem; }
    html.no-gap .custom-visual > * { margin-bottom: 0.6rem; }
  }

  @media (max-width: 720px) {
    html.no-gap .products-toolbar { margin-right: -0.6rem; }
    html.no-gap .products-toolbar > * { margin-right: 0.6rem; }
    html.no-gap .products-toolbar { margin-bottom: -0.6rem; }
    html.no-gap .products-toolbar > * { margin-bottom: 0.6rem; }
  }

  @media (max-width: 520px) {
    html.no-gap .product-grid { margin-right: -0.55rem; }
    html.no-gap .product-grid > * { margin-right: 0.55rem; }
    html.no-gap .product-grid { margin-bottom: -0.55rem; }
    html.no-gap .product-grid > * { margin-bottom: 0.55rem; }
  }

  @media (max-width: 520px) {
    html.no-gap .gallery { margin-right: -0.6rem; }
    html.no-gap .gallery > * { margin-right: 0.6rem; }
    html.no-gap .gallery { margin-bottom: -0.6rem; }
    html.no-gap .gallery > * { margin-bottom: 0.6rem; }
  }

  @media (max-width: 520px) {
    html.no-gap .custom-step { margin-right: -0.75rem; }
    html.no-gap .custom-step > * { margin-right: 0.75rem; }
    html.no-gap .custom-step { margin-bottom: -0.75rem; }
    html.no-gap .custom-step > * { margin-bottom: 0.75rem; }
  }

  html.no-gap .section--page-head .hero__stats { margin-right: -0.55rem; }
  html.no-gap .section--page-head .hero__stats > * { margin-right: 0.55rem; }
  html.no-gap .section--page-head .hero__stats { margin-bottom: -0.55rem; }
  html.no-gap .section--page-head .hero__stats > * { margin-bottom: 0.55rem; }

  html.no-gap .news-grid { margin-right: -1rem; }
  html.no-gap .news-grid { margin-right: calc(-1 * (clamp(1rem, 2.2vw, 1.75rem))); }
  html.no-gap .news-grid > * { margin-right: 1rem; }
  html.no-gap .news-grid > * { margin-right: clamp(1rem, 2.2vw, 1.75rem); }
  html.no-gap .news-grid { margin-bottom: -1rem; }
  html.no-gap .news-grid { margin-bottom: calc(-1 * (clamp(1rem, 2.2vw, 1.75rem))); }
  html.no-gap .news-grid > * { margin-bottom: 1rem; }
  html.no-gap .news-grid > * { margin-bottom: clamp(1rem, 2.2vw, 1.75rem); }

  @media (max-width: 720px) {
    html.no-gap .news-grid { margin-right: -0.7rem; }
    html.no-gap .news-grid > * { margin-right: 0.7rem; }
  }

  html.no-gap .news-card__body { margin-bottom: -0.5rem; }
  html.no-gap .news-card__body > * { margin-bottom: 0.5rem; }

  html.no-gap .news-card__meta { margin-right: -0.55rem; }
  html.no-gap .news-card__meta > * { margin-right: 0.55rem; }
  html.no-gap .news-card__meta { margin-bottom: -0.55rem; }
  html.no-gap .news-card__meta > * { margin-bottom: 0.55rem; }

  html.no-gap .article__meta { margin-right: -0.55rem; }
  html.no-gap .article__meta > * { margin-right: 0.55rem; }
  html.no-gap .article__meta { margin-bottom: -0.55rem; }
  html.no-gap .article__meta > * { margin-bottom: 0.55rem; }

  html.no-gap .pager { margin-right: -0.45rem; }
  html.no-gap .pager > * { margin-right: 0.45rem; }
  html.no-gap .pager { margin-bottom: -0.45rem; }
  html.no-gap .pager > * { margin-bottom: 0.45rem; }

  html.no-gap .related__grid { margin-right: -0.9rem; }
  html.no-gap .related__grid > * { margin-right: 0.9rem; }
  html.no-gap .related__grid { margin-bottom: -0.9rem; }
  html.no-gap .related__grid > * { margin-bottom: 0.9rem; }

  html.no-gap .cat-grid { margin-right: -0.9rem; }
  html.no-gap .cat-grid > * { margin-right: 0.9rem; }
  html.no-gap .cat-grid { margin-bottom: -0.9rem; }
  html.no-gap .cat-grid > * { margin-bottom: 0.9rem; }

  @media (max-width: 639px) {
    html.no-gap .cat-grid { margin-right: -0.6rem; }
    html.no-gap .cat-grid > * { margin-right: 0.6rem; }
    html.no-gap .cat-grid { margin-bottom: -0.6rem; }
    html.no-gap .cat-grid > * { margin-bottom: 0.6rem; }
  }

/* =====================================================================
 * 2. 逻辑属性（inset-inline-* / margin-inline / padding-inline / text-align:start）
 *    不支持的内核会整条丢弃声明 → 居中失效、RTL 阿语页面元素跑偏。
 *    这里用 [dir] 选择器给出等价的 left/right 物理写法，LTR / RTL 都不退化。
 * ===================================================================== */
@supports not (inset-inline-start: 1px) {
  .container { margin-left: auto; }
  .container { margin-right: auto; }

  .container { padding-left: 1rem; }
  .container { padding-right: 1rem; }
  .container { padding-left: clamp(1rem, 4vw, 3rem); }
  .container { padding-right: clamp(1rem, 4vw, 3rem); }

  .section { padding-top: 3.5rem; }
  .section { padding-bottom: 3.5rem; }
  .section { padding-top: clamp(3.5rem, 8vw, 7rem); }
  .section { padding-bottom: clamp(3.5rem, 8vw, 7rem); }

  .section--tight { padding-top: 2.5rem; }
  .section--tight { padding-bottom: 2.5rem; }
  .section--tight { padding-top: clamp(2.5rem, 5vw, 4.5rem); }
  .section--tight { padding-bottom: clamp(2.5rem, 5vw, 4.5rem); }

  .section-head--center { margin-left: auto; }
  .section-head--center { margin-right: auto; }

  .site-header__inner { margin-left: auto; }
  .site-header__inner { margin-right: auto; }

  .site-header__inner { padding-left: 1rem; }
  .site-header__inner { padding-right: 1rem; }
  .site-header__inner { padding-left: clamp(1rem, 4vw, 3rem); }
  .site-header__inner { padding-right: clamp(1rem, 4vw, 3rem); }

  [dir="ltr"] .site-nav { margin-left: auto; }
  [dir="rtl"] .site-nav { margin-right: auto; }

  [dir="ltr"] .lang-switcher__item { text-align: left; }
  [dir="rtl"] .lang-switcher__item { text-align: right; }

  .hero__inner { margin-left: auto; }
  .hero__inner { margin-right: auto; }

  [dir="ltr"] .chip b { margin-left: 0.3rem; }
  [dir="rtl"] .chip b { margin-right: 0.3rem; }

  .site-footer__bottom { padding-top: 1.5rem; }
  .site-footer__bottom { padding-bottom: 1.5rem; }

  @media (max-width: 640px) {
    .section { padding-top: 2.75rem; }
    .section { padding-bottom: 2.75rem; }
    .section { padding-top: clamp(2.75rem, 9vw, 4rem); }
    .section { padding-bottom: clamp(2.75rem, 9vw, 4rem); }
  }

  @media (hover: none) {
    .site-footer li a, .site-footer ul a, .mobile-drawer a { padding-top: 0.3rem; }
    .site-footer li a, .site-footer ul a, .mobile-drawer a { padding-bottom: 0.3rem; }
  }

  @media (hover: none) {
    .brand { padding-left: 2px; }
    .brand { padding-right: 2px; }
  }

  @media (max-width: 480px) {
    .container { padding-left: 1rem; }
    .container { padding-right: 1rem; }
  }

  .trust-bar { padding-top: 1.1rem; }
  .trust-bar { padding-bottom: 1.1rem; }

  [dir="ltr"] .products-count { margin-left: auto; }
  [dir="rtl"] .products-count { margin-right: auto; }

  [dir="ltr"] .cert-nav--prev { left: 0.6rem; }
  [dir="rtl"] .cert-nav--prev { right: 0.6rem; }

  [dir="ltr"] .cert-nav--next { right: 0.6rem; }
  [dir="rtl"] .cert-nav--next { left: 0.6rem; }

  [dir="ltr"] .cert-list { padding-right: 0.35rem; }
  [dir="rtl"] .cert-list { padding-left: 0.35rem; }

  [dir="ltr"] .cert-list button { text-align: left; }
  [dir="rtl"] .cert-list button { text-align: right; }

  [dir="ltr"] .cert-zoom__close { right: 1rem; }
  [dir="rtl"] .cert-zoom__close { left: 1rem; }
  [dir="ltr"] .cert-zoom__close { right: max(1rem, 2.5vw); }
  [dir="rtl"] .cert-zoom__close { left: max(1rem, 2.5vw); }

  [dir="ltr"] .cert-zoom__nav--prev { left: 0.75rem; }
  [dir="rtl"] .cert-zoom__nav--prev { right: 0.75rem; }
  [dir="ltr"] .cert-zoom__nav--prev { left: max(0.75rem, 2vw); }
  [dir="rtl"] .cert-zoom__nav--prev { right: max(0.75rem, 2vw); }

  [dir="ltr"] .cert-zoom__nav--next { right: 0.75rem; }
  [dir="rtl"] .cert-zoom__nav--next { left: 0.75rem; }
  [dir="ltr"] .cert-zoom__nav--next { right: max(0.75rem, 2vw); }
  [dir="rtl"] .cert-zoom__nav--next { left: max(0.75rem, 2vw); }

  @media (max-width: 720px) {
    [dir="ltr"] .products-count { margin-left: 0; }
    [dir="rtl"] .products-count { margin-right: 0; }
  }

  @media (max-width: 1080px) {
    [dir="ltr"] .cert-list { padding-right: 0; }
    [dir="rtl"] .cert-list { padding-left: 0; }
  }

  @media (max-width: 1080px) {
    [dir="ltr"] .cert-list { padding-bottom: 0.35rem; }
    [dir="rtl"] .cert-list { padding-top: 0.35rem; }
  }

  @media (max-width: 1080px) {
    .cert-stage { margin-left: auto; }
    .cert-stage { margin-right: auto; }
  }

  @media (max-width: 1080px) {
    .cert-figure { margin-left: auto; }
    .cert-figure { margin-right: auto; }
  }

  @media (max-width: 1080px) {
    .cert-list { scroll-padding-left: 1rem; }
    .cert-list { scroll-padding-right: 1rem; }
  }
}

/* =====================================================================
 * 4. 无背景滤镜时（compat.js 实测打点 html.no-backdrop）
 *    没有毛玻璃也必须保证文字对比度：把该元素自身的半透明底色提到接近不透明，
 *    颜色取自源样式，绝不出现「白字压白底」或整块颜色走形。
 * ===================================================================== */
  html.no-backdrop .site-header.is-solid { background-color: rgba(11, 12, 14, 0.97); }
  html.no-backdrop .hero__badge { background-color: rgba(11, 12, 14, 0.97); }
  html.no-backdrop .lightbox { background-color: rgba(6, 7, 9, 0.97); }
  html.no-backdrop .mobile-actionbar { background-color: rgba(255, 255, 255, 0.97); }
  html.no-backdrop .cert-zoom { background-color: rgba(6, 7, 9, 0.97); }

/* =====================================================================
 * 5. :focus-visible 不被支持时（compat.js 打点 html.no-focus-visible）
 *    老内核会整条丢弃 :focus-visible 规则 → 键盘用户完全看不到焦点框，退回 :focus。
 *    同样以扁平选择器输出，避免原生嵌套在不支持的内核里整块失效。
 * ===================================================================== */
  html.no-focus-visible *:focus { outline:  2px solid #c9a96a; outline-offset:  3px; }
