:where(a) {
  color: inherit;
  text-decoration: none;
}

/* Content links are the default. Zero specificity lets a component's own
   class keep its color; inherited-color controls are excluded explicitly.
   Nested states also use :where(), so hover/focus cannot raise priority. */
:where(a[href]:not(
  header a, nav a, aside a, footer a, [role="navigation"] a,
  .topbar a, .sidebar a, .method-toc-list a, .privacy-index a,
  .btn, .btn-primary, .btn-secondary, .btn-ghost, .icon-btn,
  .link-btn, .login-action, .gate-cta, .cta-link, .tier-cta,
  .method-cta-btn, .doc-action, .action, .nf-link, .slot-cta,
  .sf-mobile-dock-cta, .app-link-card, .industry-report-card,
  .stocks-item, .skip-link, .brand, .header-brand, .login-brand,
  .section-jump-link, .sb-item, .nav-link, .data-export-link,
  .data-export-gate a, .financial-history-gate a,
  [role="button"], [role="tab"]
)) {
  color: var(--gold);
  text-decoration: underline;
  text-decoration-color: rgba(201, 169, 110, .45);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;

  &:where(:hover) {
    color: #e2c48d;
    text-decoration-color: #e2c48d;
  }

  &:where(:focus-visible) {
    outline: 2px solid var(--gold);
    outline-offset: 3px;
  }

  /* CSS owns the indicator. Legacy hand-written indicators can opt out with
     data-external-arrow="present"; sidebar ↗ icons are already excluded. */
  &:where(
    [target="_blank"],
    :is([href^="http://"], [href^="https://"], [href^="//"]):not(
      [href="https://vindexes.com"], [href^="https://vindexes.com/"],
      [href="http://vindexes.com"], [href^="http://vindexes.com/"],
      [href="//vindexes.com"], [href^="//vindexes.com/"],
      [href="https://www.vindexes.com"], [href^="https://www.vindexes.com/"],
      [href="http://www.vindexes.com"], [href^="http://www.vindexes.com/"],
      [href="//www.vindexes.com"], [href^="//www.vindexes.com/"]
    )
  ):where(:not([data-external-arrow="present"]))::after {
    content: " ↗";
  }
}
