/* The press theme colors every link #3eaf7c, 2.75:1 on the white page
   and lower on the type chips, table stripes and inline code. #247350
   keeps the green and stays above 4.5:1 on all of them. Navbar links
   keep the theme colors. The admonition and banner rules are more
   specific and keep theirs too. */
.content a,
.body-header a,
.page-nav a {
    color: #247350;
}

/* In the sidebar the theme green colors the title link, the current
   page and the link under the pointer. */
.vp-sidebar .caption-text > a,
.vp-sidebar .toctree-l1 a.current,
.vp-sidebar .toctree-l2 a.current,
.vp-sidebar .toctree-l1 a:hover,
.vp-sidebar .toctree-l2 a:hover {
    color: #247350;
}

/* The theme paints a literal inside a link in the old green. */
.content a code {
    color: inherit;
}

/* At 1.9:1 against the body text, color alone does not tell a link in
   a sentence apart. The theme's hover underline targets a class these
   pages do not carry. Underline every content link but the heading
   permalinks. */
.content a:not(.headerlink) {
    text-decoration: underline;
}

/* The theme drops the focus outline of content links and puts nothing
   in its place. Keyboard users lose track of where they are. Show one
   again for keyboard focus only, in the link green. It keeps well above
   3:1 on every background the links sit on. */
.content a:focus-visible {
    outline: 2px solid #247350;
    outline-offset: 2px;
}

/* The theme hides the heading permalinks with visibility: hidden and
   draws a "#" only while the pointer is over the heading. A hidden link
   takes no keyboard focus, so keyboard users cannot reach the link to a
   key. Keep the links visible to the browser and hide only the "#",
   then show it on hover and on keyboard focus. The links have no text
   (html_permalinks_icon in conf.py). The "#" has empty alternative
   text, so screen readers name the link from its title. */
.content a.headerlink {
    visibility: visible;
}

.content a.headerlink::after {
    content: "#";
    content: "#" / "";
    color: #247350;
    opacity: 0;
}

.content :is(h1, h2, h3, h4, h5, h6):hover > a.headerlink::after,
.content a.headerlink:focus-visible::after {
    content: "#";
    content: "#" / "";
    opacity: 1;
}

/* Give the "#" and the focus outline the system link color in forced
   colors. */
@media (forced-colors: active) {
    .content a.headerlink {
        outline-color: LinkText;
    }

    .content a.headerlink::after {
        color: LinkText;
    }
}
