/* Shared with archived pages, whose original theme used a different accent. */
:root {
    --interactive-gold: #c27617;
}

.dark {
    --interactive-gold: #e0af42;
}

:is(
    a[href]:not(:where(.top-link, .profile .buttons > .button)),
    button:enabled,
    summary,
    input:is([type="button"], [type="submit"], [type="reset"]):enabled
):is(:hover, :active, :focus-visible),
.paginav a[href]:is(:hover, :active, :focus-visible) .title {
    color: var(--interactive-gold);
}

/* These links cover an entire card. Its visible text is outside the anchor. */
:is(.post-entry, .first-entry, .archive-entry):has(> a[href]:is(:hover, :active, :focus-visible))
    :is(.entry-header, .entry-header h1, .entry-header h2, .entry-content, .entry-footer, .archive-entry-title, .archive-meta) {
    color: var(--interactive-gold);
}

/* Give gold labels a neutral surface, including when a tag has keyboard focus. */
:is(.terms-tags a, .post-tags a):is(:hover, :active, :focus-visible) {
    background-color: var(--theme);
}

/* Keep the copy label reachable by keyboard. Touchscreens cannot reveal it by hovering. */
button.copy-code {
    display: block;
}

@media (hover: hover) {
    :is(pre, .highlight, table):not(:hover) > .copy-code:not(:focus-visible, :active) {
        opacity: 0;
        pointer-events: none;
    }
}
