@property --stroke-opacity {
  syntax: '<number>';
  inherits: false;
  initial-value: 1;
}

.link {
  --stroke-opacity: 0.3;
  --text-color: hsl(var(--color-base-text));
  --stroke-color: hsl(var(--color-base-text) / var(--stroke-opacity));
  --cached-opacity: 0.6;

  color: var(--text-color);
  text-decoration-line: underline;
  text-decoration-thickness: var(--stroke-width, 1px);
  text-decoration-color: var(--stroke-color);
  text-underline-position: auto;
  text-underline-offset: 0.125em;
  transition: --stroke-opacity 0.2s;
}

.link:hover {
  --stroke-opacity: 0.1;
}

.offline .link::after {
  content: ' ';
  display: inline-block;
  height: 0.9em;
  width: 0.9em;
  margin-left: 0.3em;
  vertical-align: middle;
  background-size: 0.9em;
  background-repeat: no-repeat;
  background-position: center;
  filter: invert(calc(var(--is-dark-theme-on) * 1));
}

.offline .link--cached::after {
  background-image: url('/images/assets/cached-link.svg');
  background-repeat: no-repeat;
}

.offline .link--non-cached {
  color: hsla(var(--color-base-text) / var(--cached-opacity));
}

.offline .link--non-cached::after {
  background-image: url('/images/assets/non-cached-link.svg');
  opacity: var(--cached-opacity);
}

.online .link:not(.nav-list__link, .article-indexes-list__link, .featured-article__link)::after {
  display: none;
}

.online .link--cached:not(.nav-list__link, .article-indexes-list__link, .featured-article__link)::after {
  display: none;
}

.online .link--non-cached:not(.nav-list__link, .article-indexes-list__link, .featured-article__link)::after {
  display: none;
}

.skip-link {
  position: absolute;
  overflow: hidden;
  top: auto;
  left: -10000px;
  width: 1px;
  height: 1px;
  padding: 16px 52px;
  background-color: var(--color-background);
  z-index: 4;
}

.skip-link:focus-visible {
  top: 0;
  left: 0;
  width: auto;
  height: auto;
}

@media (width >= 1024px) {
  .skip-link {
    padding: 23px 56px;
  }
}

@media (width >= 1680px) {
  .skip-link {
    padding: 26px 62px;
  }
}
