/* Wiki page URLs use canonical /iw/ routes. Assets and fragment-only links
   and inline editorial flags are excluded. A background keeps the decorative logo with the first word
   without changing the accessible name, copied text, or existing separators. */
:is(a[href^="/iw/"], a[href^="https://tkwa.me/iw/"]):is(
  [href$="/"], [href*="/#"], [href*="/?"],
  [href$="/index.html"], [href*="/index.html#"], [href*="/index.html?"]
):not([aria-current="page"]):not(:where(.whale-inline-flag, .dispute-marker, .inline-template) a) {
  padding-inline-start: 1.05em;
  background-image: url("/favicon.png?v=d9c46307c849");
  background-repeat: no-repeat;
  background-position: left center;
  background-size: .85em 1em;
  -webkit-box-decoration-break: slice;
  box-decoration-break: slice;
}

/* Wikipedia uses its puzzle globe. Keep it decorative, with the first word,
   like local wiki marks. Exact origins avoid decorating lookalike domains. */
:is(
  a[href^="https://en.wikipedia.org/" i],
  a[href^="https://en.m.wikipedia.org/" i],
  a[href^="https://www.wikipedia.org/" i],
  a[href^="https://wikipedia.org/" i],
  a[href^="http://en.wikipedia.org/" i],
  a[href^="http://en.m.wikipedia.org/" i],
  a[href^="//en.wikipedia.org/" i],
  a[href^="//en.m.wikipedia.org/" i]
) {
  padding-inline-start: 1.15em;
  background-image: url("/wikipedia-logo.png?v=94f772989350");
  background-repeat: no-repeat;
  background-position: left center;
  background-size: 1em 1em;
  -webkit-box-decoration-break: slice;
  box-decoration-break: slice;
}

/* Forum destinations have their own mark; wiki articles about the forum
   retain the wiki mark above. Assets and in-thread fragment links are excluded. */
:is(a[href^="/infiniteforum/"], a[href^="https://tkwa.me/infiniteforum/"]):is(
  [href$="/"], [href*="/#"], [href*="/?"],
  [href$="/index.html"], [href*="/index.html#"], [href*="/index.html?"]
):not([aria-current="page"]):not(.brand) {
  padding-inline-start: 1.8em;
  background-image: url("/infiniteforum/link-mark.svg?v=413602b6f6b8");
  background-repeat: no-repeat;
  background-position: left center;
  background-size: 1.6em .96em;
  -webkit-box-decoration-break: slice;
  box-decoration-break: slice;
}

/* The wiki header already has a leading mark; use Hazel in its place. */
.site-header a.wordmark[href="/iw/"] {
  padding-inline-start: 35px;
  background-position: left center;
  background-size: 25px 28px;
}
.wordmark[href="/iw/"] .wordmark-icon { display: none; }

/* Keep the header's existing compact navigation with the wider Hazel mark. */
@media (max-width: 620px) {
  .stub-page .site-header .site-links a[href="/"] { display: none; }
}

/* This queue footer points to the current page rather than another wiki page. */
[data-request-queue] .article-footer a[href="/iw/requested/"] {
  padding-inline-start: 0;
  background-image: none;
}
