/* Reading links: a quiet ink wash and a clear underline without changing
   text flow, colours inherited from the page, or the size of the line. */
body main :is(.article-body, .task-section, .policy, .cookie-info,
  .information-body, .case-page, .hero-copy, .cases-toolbar,
  .depth .editorial-body, .reading header) :is(p, li) a[href]:not(:has(svg, img)) {
  text-decoration-line: underline;
  text-decoration-style: solid;
  text-decoration-thickness: .09em;
  text-decoration-color: currentColor;
  text-underline-offset: .2em;
  text-decoration-skip-ink: auto;
  background-color: rgba(85, 147, 195, .11);
  border-radius: 2px;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}

/* Article copy sits on a light reading surface: use the existing ink blue so
   links remain distinct even when the surrounding body text is nearly black. */
body main .reading .article-body :is(p, li) a[href]:not(:has(svg, img)) {
  color: #0b3a95;
}

/* These specific text surfaces are light; keep other inherited colours intact. */
body main :is(.task-section p, .policy p, .policy li, .cookie-info p,
  .cookie-info li, .case-page .attribution, .hero-copy .founder,
  .cases-toolbar .cases-attribution, .reading header .publication) a[href]:not(:has(svg, img)) {
  color: #0b3a95;
}

body main :is(.article-body, .task-section, .policy, .cookie-info,
  .information-body, .case-page, .hero-copy, .cases-toolbar,
  .depth .editorial-body, .reading header) :is(p, li) a[href]:not(:has(svg, img)):focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 3px;
  background-color: rgba(85, 147, 195, .24);
}

@media (prefers-reduced-motion: no-preference) {
  body main :is(.article-body, .task-section, .policy, .cookie-info,
    .information-body, .case-page, .hero-copy, .cases-toolbar,
    .depth .editorial-body, .reading header) :is(p, li) a[href]:not(:has(svg, img)) {
    transition: background-color 200ms ease, text-decoration-color 200ms ease;
  }
}

@media (hover: hover) and (pointer: fine) {
  body main :is(.article-body, .task-section, .policy, .cookie-info,
    .information-body, .case-page, .hero-copy, .cases-toolbar,
    .depth .editorial-body, .reading header) :is(p, li) a[href]:not(:has(svg, img)):hover {
    background-color: rgba(85, 147, 195, .24);
    text-decoration-thickness: .12em;
  }
}

@media (hover: none) and (pointer: coarse) {
  body main :is(.article-body, .task-section, .policy, .cookie-info,
    .information-body, .case-page, .hero-copy, .cases-toolbar,
    .depth .editorial-body, .reading header) :is(p, li) a[href]:not(:has(svg, img)):is(:active, .motion-touch-active) {
    background-color: rgba(85, 147, 195, .24);
    text-decoration-thickness: .12em;
  }
}

@media (prefers-reduced-motion: reduce) {
  body main :is(.article-body, .task-section, .policy, .cookie-info,
    .information-body, .case-page, .hero-copy, .cases-toolbar,
    .depth .editorial-body, .reading header) :is(p, li) a[href]:not(:has(svg, img)) {
    transition: none;
  }
}
