/* OriginMind Robotics / OmindOS — functional entry icons, preview candidate.
 * Source artwork: PR #160 (742fd2f), 24×24 / stroke 1.75 / rounded ends.
 * Only explicit functional links and marked local headings are affected.
 * No desktop top-level navigation, theme, footer, or account behavior changes.
 */
@supports (mask-image: url("/assets/icons/feature-v1/developer-center.svg")) or (-webkit-mask-image: url("/assets/icons/feature-v1/developer-center.svg")) {
  /* Shared menus: use existing destinations so no navigation HTML is rebuilt. */
  :is(.nav-six-panel > a, #mobile-menu details > div > a):is([href="/developers/resources/"], [href="/en/developers/resources/"], [href="/en/developers/"]),
  [data-om-feature-icon="developer-center"] {
    --om-feature-mask: url("/assets/icons/feature-v1/developer-center.svg");
  }
  :is(.nav-six-panel > a, #mobile-menu details > div > a):is([href="/viewer/"], [href="https://omindos.cn/viewer/"]),
  [data-om-feature-icon="3d-model-viewer"] {
    --om-feature-mask: url("/assets/icons/feature-v1/3d-model-viewer.svg");
  }
  :is(.nav-six-panel > a, #mobile-menu details > div > a):is([href="/resources/"], [href="/en/resources/"]),
  [data-om-feature-icon="resources-downloads"] {
    --om-feature-mask: url("/assets/icons/feature-v1/resources-downloads.svg");
  }
  :is(.nav-six-panel > a, #mobile-menu details > div > a):is([href="/integration/"], [href="/en/integration/"]),
  [data-om-feature-icon="service-support"] {
    --om-feature-mask: url("/assets/icons/feature-v1/service-support.svg");
  }
  #mobile-menu .mobile-extra > a:is([href="/contact/"], [href="/en/contact/"]),
  [data-om-feature-icon="contact-us"] {
    --om-feature-mask: url("/assets/icons/feature-v1/contact-us.svg");
  }
  [data-om-feature-icon="robot"] { --om-feature-mask: url("/assets/icons/feature-v1/robot.svg"); }
  :is(.nav-six-panel > a, #mobile-menu details > div > a)[href="https://cloud.omindos.cn/"],
  [data-om-feature-icon="simulation-platform"] { --om-feature-mask: url("/assets/icons/feature-v1/simulation-platform.svg"); }
  [data-om-feature-icon="learning-center"] { --om-feature-mask: url("/assets/icons/feature-v1/learning-center.svg"); }
  [data-om-feature-icon="home"] { --om-feature-mask: url("/assets/icons/feature-v1/home.svg"); }
  :is(.nav-six-panel > a, #mobile-menu details > div > a)[href="/en/omindos/"],
  [data-om-feature-icon="omindos"] { --om-feature-mask: url("/assets/icons/feature-v1/omindos.svg"); }
  [data-om-feature-icon="about-us"] { --om-feature-mask: url("/assets/icons/feature-v1/about-us.svg"); }
  [data-om-feature-icon="faq"] { --om-feature-mask: url("/assets/icons/feature-v1/faq.svg"); }

  /* Desktop dropdown entries and mobile secondary entries only. */
  :is(.nav-six-panel > a, #mobile-menu details > div > a):is(
    [href="/developers/resources/"], [href="/en/developers/resources/"],
    [href="/viewer/"], [href="https://omindos.cn/viewer/"],
    [href="/resources/"], [href="/en/resources/"],
    [href="/integration/"], [href="/en/integration/"],
    [href="/en/omindos/"], [href="https://cloud.omindos.cn/"], [href="/en/developers/"]
  ), #mobile-menu .mobile-extra > a:is([href="/contact/"], [href="/en/contact/"]) {
    --om-feature-size: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
  }
  #mobile-menu details > div > a:is(
    [href="/developers/resources/"], [href="/en/developers/resources/"],
    [href="/viewer/"], [href="https://omindos.cn/viewer/"],
    [href="/resources/"], [href="/en/resources/"],
    [href="/integration/"], [href="/en/integration/"],
    [href="/en/omindos/"], [href="https://cloud.omindos.cn/"], [href="/en/developers/"]
  ), #mobile-menu .mobile-extra > a:is([href="/contact/"], [href="/en/contact/"]) {
    min-height: 44px;
    white-space: normal;
    overflow-wrap: anywhere;
  }

  /* Explicitly marked local resource navigation and task/tool headings. */
  main#main-content a[data-om-feature-icon] {
    --om-feature-size: 18px;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-width: 0;
    max-width: 100%;
    white-space: normal;
    overflow-wrap: break-word;
  }
  main#main-content h3[data-om-feature-icon] {
    --om-feature-size: 24px;
    display: flex;
    align-items: flex-start;
    gap: 9px;
    min-width: 0;
    white-space: normal;
    overflow-wrap: break-word;
  }
  :is(.nav-six-panel > a, #mobile-menu details > div > a):is(
    [href="/developers/resources/"], [href="/en/developers/resources/"],
    [href="/viewer/"], [href="https://omindos.cn/viewer/"],
    [href="/resources/"], [href="/en/resources/"],
    [href="/integration/"], [href="/en/integration/"],
    [href="/en/omindos/"], [href="https://cloud.omindos.cn/"], [href="/en/developers/"]
  )::before,
  #mobile-menu .mobile-extra > a:is([href="/contact/"], [href="/en/contact/"])::before,
  main#main-content :is(a,h3)[data-om-feature-icon]::before {
    content: ""; /* Decorative; all existing text remains the accessible name. */
    display: block;
    flex: 0 0 var(--om-feature-size, 20px);
    inline-size: var(--om-feature-size, 20px);
    block-size: var(--om-feature-size, 20px);
    background: currentColor;
    forced-color-adjust: preserve-parent-color;
    -webkit-mask-image: var(--om-feature-mask);
    mask-image: var(--om-feature-mask);
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    -webkit-mask-position: center;
    mask-position: center;
    -webkit-mask-size: contain;
    mask-size: contain;
  }
  main#main-content h3[data-om-feature-icon]::before {
    margin-block-start: 2px;
    margin-block-start: max(0px, calc((1lh - var(--om-feature-size, 24px)) / 2));
  }
  :is(.nav-six-panel > a, #mobile-menu details > div > a):is(
    [href="/developers/resources/"], [href="/en/developers/resources/"],
    [href="/viewer/"], [href="https://omindos.cn/viewer/"],
    [href="/resources/"], [href="/en/resources/"],
    [href="/integration/"], [href="/en/integration/"],
    [href="/en/omindos/"], [href="https://cloud.omindos.cn/"], [href="/en/developers/"]
  ):is(:hover,:focus-visible)::before,
  #mobile-menu .mobile-extra > a:is([href="/contact/"], [href="/en/contact/"]):is(:hover,:focus-visible)::before,
  main#main-content a[data-om-feature-icon]:is(:hover,:focus-visible)::before,
  main#main-content a.task:is(:hover,:focus-visible) h3[data-om-feature-icon]::before {
    background-color: var(--om-feature-emphasis, #b7192c);
  }
  @media (forced-colors: active) {
    :root { --om-feature-emphasis: currentColor; }
  }
  @media (max-width: 768px) {
    main#main-content a[data-om-feature-icon] { min-height: 44px; }
  }
}
