/* Critical, render-blocking on purpose: everything here is either needed to
   avoid a flash of unstyled content on first paint (dark body background,
   the mobile tab bar's layout/backdrop) or is a couple of bytes not worth a
   second request. Anything that only matters after the page has already
   painted (page-transition animations, the nav progress bar, novel/note
   prose styles, offline-mode overrides) lives in global-deferred.css
   instead, loaded non-blocking — see the <link media="print" ...> trick
   in index.php's <head>. */
/* Theme tokens — RGB channels, so alpha still works: rgb(var(--c-white) / .06). These are the dark
   theme's values (the site's original look); html[data-theme="light"] below swaps them. Tailwind's
   `white`, `surface`, `surface-2` and `page` colors read these (tailwind.config.js), and inline
   styles / hand-written CSS use them directly. --c-white is the foreground *and* the overlay colour
   (text, hairlines, hover fills): white on dark, ink on light. A brand surface (violet button,
   badge ...) adds `.on-brand` to get real white back for everything inside it. */
:root {
    --c-white: 255 255 255;
    --c-surface: 17 17 19;
    --c-surface-2: 14 14 17;
    --c-surface-3: 23 23 31; /* dialogs / elevated cards */
    --c-page: 8 8 10;
    --c-page-2: 13 13 20; /* full-screen auth / setup backdrops */
    --c-page-3: 10 10 12; /* profile card well */
    --c-page-4: 6 6 7; /* avatar cut-out ring */
    --c-tint: 22 15 34; /* violet-tinted gradient start on cards */
    /* Accent / status text colours: the dark theme's pastels. Light swaps in darker shades of the same hues. */
    --c-violet-soft: 167 139 250;
    --c-violet-light: 196 181 253;
    --c-violet-lighter: 221 214 254;
    --c-green: 74 222 128;
    --c-emerald: 52 211 153;
    --c-red: 248 113 113;
    --c-red-light: 252 165 165;
    --c-rose: 251 113 133;
    --c-blue: 96 165 250;
    --c-amber: 251 191 36;
    --c-yellow: 250 204 21;
    --c-silver: 203 213 225;
    --c-purple: 192 132 252;
    --c-bronze: 217 119 6;
    --c-avatar: 28 28 34; /* initial-letter avatar fallback */
    --c-amber-tint: 34 26 12; /* novel banner gradient start */
    --c-peek: 16 16 18; /* the card 'sheet' peeking out behind grouped chapter cards */
    --c-pop: 22 22 26; /* hover popup panels */
}

/* Light theme: the same tokens, light values. --c-white becomes the ink colour, so every
   text-white/60, bg-white/5, border-white/10 ... in the markup turns into the matching ink tint.
   Everything that can't be expressed by these variables lives in light.css, which index.php only
   loads when the theme is light (theme-toggle.js loads it on the first switch). */
html[data-theme="light"] {
    color-scheme: light;
    --c-white: 24 24 33;
    --c-surface: 255 255 255;
    --c-surface-2: 250 250 252;
    --c-surface-3: 255 255 255;
    --c-page: 243 243 247;
    --c-page-2: 243 243 247;
    --c-page-3: 243 243 247;
    --c-page-4: 243 243 247;
    --c-tint: 245 240 255;
    --c-violet-soft: 124 58 237;
    --c-violet-light: 109 40 217;
    --c-violet-lighter: 91 33 182;
    --c-green: 21 128 61;
    --c-emerald: 5 150 105;
    --c-red: 220 38 38;
    --c-red-light: 185 28 28;
    --c-rose: 225 29 72;
    --c-blue: 37 99 235;
    --c-amber: 180 83 9;
    --c-yellow: 161 98 7;
    --c-silver: 100 116 139;
    --c-purple: 147 51 234;
    --c-bronze: 180 83 9;
    --c-avatar: 232 232 240;
    --c-amber-tint: 255 244 224;
    --c-peek: 226 226 233;
    --c-pop: 255 255 255;
}

.on-brand {
    --c-white: 255 255 255;
}

/* Header colour-scheme menu (assets/scripts/theme-toggle.js). The button shows the icon of the scheme in use: moon = Dark,
   sun = Light, drop = any of the colour schemes (Aqua, Rose ...); the menu under it lists them all, each with a swatch of what it
   looks like. */
.theme-toggle .theme-icon-sun,
.theme-toggle .theme-icon-scheme {
    display: none;
}

html[data-theme="light"] .theme-toggle .theme-icon-moon {
    display: none;
}

html[data-theme="light"] .theme-toggle .theme-icon-sun {
    display: block;
}

html[data-scheme] .theme-toggle .theme-icon-sun {
    display: none;
}

html[data-scheme] .theme-toggle .theme-icon-scheme {
    display: block;
}

.theme-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    z-index: 60;
    width: 10.75rem;
    padding: .375rem;
    border-radius: .875rem;
    background: rgb(var(--c-surface-2));
    border: 1px solid rgb(var(--c-white) / .09);
    box-shadow: 0 16px 40px rgba(0, 0, 0, .45);
    /* below the nav (and the top banner), so a short screen scrolls the list instead of cutting it off */
    max-height: calc(100vh - 8.5rem);
    max-height: calc(100dvh - 8.5rem);
    overflow-y: auto;
    transform-origin: top right;
    animation: theme-menu-in .14s ease-out;
}

.theme-menu[hidden] {
    display: none;
}

@keyframes theme-menu-in {
    from {
        opacity: 0;
        transform: translateY(-4px) scale(.97);
    }
}

@media (prefers-reduced-motion: reduce) {
    .theme-menu {
        animation: none;
    }
}

.theme-menu-sep {
    height: 1px;
    margin: .3125rem .375rem;
    background: rgb(var(--c-white) / .09);
}

.theme-opt {
    display: flex;
    align-items: center;
    gap: .625rem;
    width: 100%;
    padding: .5rem .625rem;
    border: 0;
    border-radius: .625rem;
    background: transparent;
    color: rgb(var(--c-white) / calc(var(--ta-b,0) + var(--ta-m,1) * .75));
    font-size: .8125rem;
    font-weight: 500;
    text-align: left;
    cursor: pointer;
    transition: background-color .15s ease, color .15s ease;
}

.theme-opt:hover,
.theme-opt:focus-visible {
    background: rgb(var(--c-white) / .06);
    color: rgb(var(--c-white));
    outline: none;
}

.theme-opt:focus-visible {
    box-shadow: inset 0 0 0 2px rgb(var(--c-white) / .3);
}

.theme-opt[aria-checked="true"] {
    color: rgb(var(--c-white));
}

.theme-opt-name {
    flex: 1 1 auto;
}

.theme-opt-check {
    flex: none;
    width: .875rem;
    height: .875rem;
    opacity: 0;
}

.theme-opt[aria-checked="true"] .theme-opt-check {
    opacity: 1;
}

/* "Home sections" panel (index.php #home-sections-panel, opened from the user menu — assets/scripts/home-sections.js): switch rows
   built on .theme-opt, aria-checked = the section is shown */
.home-sec[aria-checked="false"] {
    color: rgb(var(--c-white) / calc(var(--ta-b, 0) + var(--ta-m, 1) * .45));
}

.home-sec-switch {
    flex: none;
    position: relative;
    width: 1.875rem;
    height: 1.125rem;
    border-radius: 9999px;
    background: rgb(var(--c-white) / .15);
    transition: background-color .15s ease;
}

.home-sec-switch::after {
    content: "";
    position: absolute;
    top: .125rem;
    left: .125rem;
    width: .875rem;
    height: .875rem;
    border-radius: 9999px;
    background: rgb(var(--c-white));
    transition: transform .15s ease;
}

.home-sec[aria-checked="true"] .home-sec-switch {
    background: var(--zmio-accent-pill-bg, var(--scheme-pill, linear-gradient(135deg, #7c3aed, #a78bfa)));
}

.home-sec[aria-checked="true"] .home-sec-switch::after {
    background: #fff;
    transform: translateX(.75rem);
}

/* the swatches preview each scheme, so they are fixed colours whichever one is in use (a colour scheme's is its palette, set inline by
   the header: components/header/index.php) */
.theme-swatch {
    flex: none;
    width: 1.375rem;
    height: 1.375rem;
    border-radius: 9999px;
    box-shadow: 0 0 0 1px rgb(var(--c-white) / .22);
}

.theme-swatch-dark {
    background: linear-gradient(135deg, #1c1c22 50%, #08080a 50%);
}

.theme-swatch-light {
    background: linear-gradient(135deg, #ffffff 50%, #f3f3f7 50%);
}

/* Set by theme-toggle.js for ~300ms while the theme flips, so colours glide instead of snapping. */
html.theme-anim *,
html.theme-anim *::before,
html.theme-anim *::after {
    transition: background-color .25s ease, color .25s ease, border-color .25s ease, fill .25s ease, stroke .25s ease, box-shadow .25s ease !important;
}

body {
    background-color: rgb(var(--c-page));
    color: rgb(var(--c-white));
}

a {
    text-decoration: none;
}

.page-h1-sr {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Mobile bottom tab bar (phones only) — visually prominent on first paint
   for phone-width viewports, so this stays blocking rather than risking a
   flash of an unstyled <nav> full of raw links. */
#mobile-tabbar {
    display: none;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 45;
    height: var(--mobile-tabbar-h, 4rem);
    padding-bottom: env(safe-area-inset-bottom, 0px);
    background: rgb(var(--c-surface) / 0.95);
    -webkit-backdrop-filter: blur(16px);
    backdrop-filter: blur(16px);
    border-top: 1px solid rgb(var(--c-white) / 0.06);
}

#mobile-tabbar .tab-item {
    position: relative;
    flex: 1 1 0;
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 9px;
    padding: 6px 8px;
    background: transparent;
    border: 0;
    cursor: pointer;
    color: rgb(var(--c-white) / calc(var(--ta-b,0) + var(--ta-m,1) * 0.45));
    text-decoration: none;
    transition: color .15s ease;
    -webkit-tap-highlight-color: transparent;
}

#mobile-tabbar .tab-item:active {
    color: rgb(var(--c-white) / calc(var(--ta-b,0) + var(--ta-m,1) * 0.85));
}

#mobile-tabbar .tab-item.is-active {
    color: rgb(var(--c-violet-soft));
}

#mobile-tabbar .tab-item > svg {
    width: 22px;
    height: 22px;
}

/* Profile avatar + zmio decoration overlay (mirrors the top bar). */
#mobile-tabbar .tab-avatar {
    position: relative;
    display: block;
    width: 22px;
    height: 22px;
}

#mobile-tabbar .tab-avatar-img {
    display: block;
    width: 100%;
    height: 100%;
    border-radius: 9999px;
    object-fit: cover;
}

#mobile-tabbar .tab-avatar-deco {
    position: absolute;
    top: 50%;
    left: 50%;
    width: calc(100% + 6px);
    height: calc(100% + 6px);
    max-width: none;
    transform: translate(-50%, -50%);
    pointer-events: none;
}

#mobile-tabbar .tab-label {
    font-size: 10px;
    font-weight: 600;
    line-height: 1;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

#mobile-tabbar .tab-badge {
    position: absolute;
    top: 3px;
    left: calc(50% + 3px);
    min-width: 15px;
    height: 15px;
    padding: 0 3px;
    border-radius: 9999px;
    background: #ef4444;
    color: #fff;
    font-size: 9px;
    font-weight: 700;
    line-height: 15px;
    text-align: center;
    pointer-events: none;
}

/* Recent badge (components/header, recent-badge.js): how many chapters came out since the reader last opened
   Recently Updated, in the corner of the Recent button / link (.hdr-recent-badge) and on the phone tab (.tab-badge,
   above). The pill is the alerts red so the two badges read as one family; a ring pings out of it every couple of
   seconds so a new count catches the eye. [hidden] = nothing new (the server renders it so, the script toggles it). */
.hdr-recent-badge {
    position: absolute;
    top: -6px;
    right: -6px;
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    border-radius: 9999px;
    background: #ef4444;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    line-height: 16px;
    text-align: center;
    white-space: nowrap;
    pointer-events: none;
}

.hdr-recent-badge[hidden],
#mobile-tabbar .tab-badge[hidden] {
    display: none;
}

/* Search shortcut (components/header, nav-search.js): a key hint sits at the right end of the desktop search field,
   "Ctrl K" (⌘ K on a Mac) while idle and "ESC" while the field has focus. Pressing / or Ctrl/⌘ K anywhere on the
   page focuses the field (and brings the bar back if it had slid away); Esc closes the suggestions and leaves it.
   The field's right padding keeps typed text clear of the hint; header designs 5 and 6 hide it while their search
   is folded to an icon (their own <style>). */
#site-nav #nav-search-input {
    padding-right: 3.75rem;
}

.hdr-kbd {
    position: absolute;
    right: .5rem;
    top: 50%;
    transform: translateY(-50%);
    display: inline-flex;
    align-items: center;
    height: 1.25rem;
    padding: 0 .4rem;
    border-radius: .3rem;
    border: 1px solid rgb(var(--c-white) / .12);
    background: rgb(var(--c-white) / .05);
    color: rgb(var(--c-white) / calc(var(--ta-b, 0) + var(--ta-m, 1) * .4));
    font-family: inherit;
    font-size: .625rem;
    font-weight: 600;
    line-height: 1;
    letter-spacing: .04em;
    white-space: nowrap;
    pointer-events: none;
    user-select: none;
    transition: color .15s ease, border-color .15s ease;
}

#nav-search-form:focus-within .hdr-kbd {
    color: rgb(var(--c-white) / calc(var(--ta-b, 0) + var(--ta-m, 1) * .6));
    border-color: rgb(var(--c-white) / .18);
}

.js-recent-badge {
    isolation: isolate;
}

.js-recent-badge::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    border-radius: inherit;
    background: inherit;
    opacity: .6;
    animation: recent-badge-ping 2.4s cubic-bezier(0, 0, .2, 1) infinite;
}

@keyframes recent-badge-ping {
    0% {
        transform: scale(1);
        opacity: .6;
    }

    60%,
    100% {
        transform: scale(2.1);
        opacity: 0;
    }
}

@media (prefers-reduced-motion: reduce) {
    .js-recent-badge::before {
        display: none;
    }
}

/* Centre "Buy" coins tab (components/header): laid out exactly like its
   neighbours (22px icon, label), but always in the accent colour — the
   active-tab violet when the viewer has none — so it reads as the bar's main
   action. [data-buy-coins] opens the Buy Coins modal. */
#mobile-tabbar .tab-buy,
#mobile-tabbar .tab-buy:active {
    color: var(--zmio-accent-light, rgb(var(--c-violet-soft)));
}

#mobile-tabbar .tab-buy:active {
    opacity: .75;
}

/* Phones only — and publish the height so fixed bottom bars on
   other pages can dock above the tab bar. Kept last so it wins
   over the base `display:none` above. */
@media (max-width: 767.98px) {
    :root {
        --mobile-tabbar-h: calc(4rem + env(safe-area-inset-bottom, 0px));
    }

    body {
        padding-bottom: var(--mobile-tabbar-h, 0px);
    }

    #mobile-tabbar {
        display: flex;
    }
}

/* Review tag chips (components/reviews + assets/scripts/reviews.js), themed
   to the VIEWER's accent via --zmio-accent-rgb / --zmio-accent-light, set on
   :root in index.php's <head> (everywhere, the profile Reviews tab included —
   nothing re-scopes them to the profile owner). The var() fallbacks are the
   default violet, so with no accent set the chips look exactly as before. */
.review-tag-pill {
    background-color: rgba(var(--zmio-accent-rgb, 139, 92, 246), 0.1);
    border-color: rgba(var(--zmio-accent-rgb, 167, 139, 250), 0.2);
    color: var(--zmio-accent-light, rgba(221, 214, 254, 0.8));
}

/* Selected state of the write-a-review form's tag picker. */
.review-tag-chip-on {
    background-color: rgba(var(--zmio-accent-rgb, 139, 92, 246), 0.2);
    border-color: rgba(var(--zmio-accent-rgb, 167, 139, 250), 0.4);
    color: var(--zmio-accent-light, #ddd6fe);
}

/* Text colors for the active review vote buttons (violet-300 icon / violet-200 count by default). */
.zmio-accent-text {
    color: var(--zmio-accent-light, #c4b5fd);
}

.zmio-accent-text-lt {
    color: var(--zmio-accent-light, #ddd6fe);
}

/* Highlight color for accent text that was Tailwind's violet-400 (home hero). */
.zmio-accent-text-soft {
    color: var(--zmio-accent-soft, #a78bfa);
}

/* Hover outlines that were Tailwind's violet-500 (cards, rows, tierlist button) follow the
   viewer's accent; same selectors as the utilities, loaded after output.css so they win.
   The fallback is violet-500's own rgb, so with no accent set nothing changes. */
.hover\:border-violet-500\/25:hover {
    border-color: rgba(var(--zmio-accent-rgb, 139, 92, 246), .25);
}

.hover\:border-violet-500\/30:hover {
    border-color: rgba(var(--zmio-accent-rgb, 139, 92, 246), .3);
}

/* ── Tailwind's violet utilities -> the viewer's accent ──────────────────────
   The site was built with hard-coded violet (text-violet-300/400, tints, borders,
   focus rings). These rules re-point every one of those utilities at the accent
   variables set in index.php's <head>; each fallback is the utility's original
   value, so with no accent set nothing changes. Same selectors as the utilities
   and loaded after output.css, so they win without touching any markup (and they
   cover the JS-built HTML too). Add a line here before using a new violet-* class.
   Two scripts still look these classes up by name (reader.js: .bg-violet-900/30,
   edit-profile.js: .border-violet-400 / .bg-violet-500/15), so the names stay. */
.text-violet-300 {
    color: var(--zmio-accent-light, #c4b5fd);
}

.text-violet-300\/70 {
    color: rgba(var(--zmio-accent-light-rgb, 196, 181, 253), .7);
}

.text-violet-400 {
    color: var(--zmio-accent-soft, #a78bfa);
}

.hover\:text-violet-300:hover {
    color: var(--zmio-accent-light, #c4b5fd);
}

.bg-violet-400 {
    background-color: var(--zmio-accent-soft, #a78bfa);
}

.bg-violet-500\/10 {
    background-color: rgba(var(--zmio-accent-rgb, 139, 92, 246), .1);
}

.bg-violet-500\/15 {
    background-color: rgba(var(--zmio-accent-rgb, 139, 92, 246), .15);
}

.bg-violet-900\/30 {
    background-color: rgba(var(--zmio-accent-deep-rgb, 76, 29, 149), .3);
}

.border-violet-400 {
    border-color: var(--zmio-accent-soft, #a78bfa);
}

.border-violet-500\/15 {
    border-color: rgba(var(--zmio-accent-rgb, 139, 92, 246), .15);
}

.border-violet-500\/20 {
    border-color: rgba(var(--zmio-accent-rgb, 139, 92, 246), .2);
}

.border-violet-500\/25 {
    border-color: rgba(var(--zmio-accent-rgb, 139, 92, 246), .25);
}

.border-violet-500\/40 {
    border-color: rgba(var(--zmio-accent-rgb, 139, 92, 246), .4);
}

.focus\:border-violet-500\/40:focus {
    border-color: rgba(var(--zmio-accent-rgb, 139, 92, 246), .4);
}

.focus\:border-violet-500\/50:focus {
    border-color: rgba(var(--zmio-accent-rgb, 139, 92, 246), .5);
}

.accent-violet-500 {
    accent-color: var(--zmio-accent, #8b5cf6);
}

/* ── Slider pagination dots (shared by the Featured hero — components/series-slider — and Editor's Choice —
   components/editors-choice): one 15.2×26px tap target per slide drawing an 8px dot; the current one stretches into
   a 24px pill in the viewer's accent (the colour scheme's, else violet). The pill doubles as the autoplay timer:
   --ssp (0..1, set on the dots row by meikoDotsAutoplay in featured-slider.js) grows the solid fill over a faint
   accent track, starting as a full circle at the left end. Each component only positions its row. */
.slider-dots {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 0;
}

.slider-dots button {
    position: relative;
    width: 15.2px;
    height: 26px;
    padding: 0;
    border: 0;
    background: transparent;
    cursor: pointer;
    transition: width .3s cubic-bezier(.2, .8, .2, 1);
    -webkit-tap-highlight-color: transparent;
}

.slider-dots button::before {
    content: "";
    position: absolute;
    left: 50%;
    top: 50%;
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: rgb(var(--c-white) / .3);
    transform: translate(-50%, -50%);
    transition: width .3s cubic-bezier(.2, .8, .2, 1), background-color .3s ease;
}

.slider-dots button[aria-current="true"] {
    width: 31.2px;
}

.slider-dots button[aria-current="true"]::before {
    width: 24px;
    background: rgba(var(--zmio-accent-rgb, var(--scheme-rgb, 167, 139, 250)), .28);
}

.slider-dots button[aria-current="true"]::after {
    content: "";
    position: absolute;
    left: calc(50% - 12px);
    top: 50%;
    width: calc(8px + 16px * var(--ssp, 1));
    height: 8px;
    border-radius: 999px;
    background: rgb(var(--zmio-accent-rgb, var(--scheme-rgb, 167, 139, 250)));
    transform: translateY(-50%);
}

@media (prefers-reduced-motion: reduce) {
    .slider-dots button, .slider-dots button::before { transition: none; }
}


/* "Buy coins" header button (components/header, .hdr-buy): the glassy glow
   treatment — a lit top edge and a shaded bottom edge (glass), a soft halo in
   the accent, a thin light ring that orbits the edge, a sheen that sweeps
   across every few seconds, and a lift on hover. The fill stays the inline
   accent gradient (site convention: schemes.css recolours it by matching that
   inline string and light.css keeps the text white), so everything here is
   layered on top. Colours follow the viewer's accent, else the scheme's, else
   violet. The ring and the sheen are the two pseudo-elements, painted above
   the fill and below the icon/label (isolation + z-index -1). */
@property --hb-a {
    syntax: '<angle>';
    inherits: false;
    initial-value: 0deg;
}

.hdr-buy {
    --hb-rgb: var(--zmio-accent-rgb, var(--scheme-rgb, 167, 139, 250));
    position: relative;
    isolation: isolate;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, .28),
        inset 0 -1px 0 rgba(0, 0, 0, .18),
        0 4px 16px -4px rgba(var(--hb-rgb), .6);
    transition: transform .25s cubic-bezier(.2, .8, .2, 1), box-shadow .25s ease;
}

.hdr-buy:hover {
    transform: translateY(-1px);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, .34),
        inset 0 -1px 0 rgba(0, 0, 0, .18),
        0 6px 22px -4px rgba(var(--hb-rgb), .85);
}

.hdr-buy:active {
    transform: translateY(0) scale(.97);
    transition-duration: .08s;
}

/* the orbiting ring: a conic highlight 1.5px outside the edge, hollowed to a
   ring by masking out the content box; only where the browser can draw the
   mask, otherwise the fill alone is left as it was */
@supports (mask-composite: exclude) or (-webkit-mask-composite: xor) {
    .hdr-buy::before {
        content: "";
        position: absolute;
        inset: -1.5px;
        z-index: -1;
        padding: 1.5px;
        border-radius: inherit;
        --hb-a: 0deg;
        background: conic-gradient(from var(--hb-a),
            transparent 0deg,
            rgba(var(--hb-rgb), .55) 70deg,
            rgba(255, 255, 255, .95) 105deg,
            rgba(var(--hb-rgb), .55) 140deg,
            transparent 200deg,
            transparent 250deg,
            rgba(255, 255, 255, .45) 290deg,
            transparent 330deg,
            transparent 360deg);
        -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
        mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
        -webkit-mask-composite: xor;
        mask-composite: exclude;
        opacity: .85;
        animation: hdr-buy-orbit 3.2s linear infinite;
        pointer-events: none;
        transition: opacity .25s ease;
    }

    .hdr-buy:hover::before {
        opacity: 1;
    }
}

/* the sheen: a diagonal streak of light crossing the fill, then a pause */
.hdr-buy::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    border-radius: inherit;
    background: linear-gradient(115deg,
        transparent 36%,
        rgba(255, 255, 255, .16) 45%,
        rgba(255, 255, 255, .42) 50%,
        rgba(255, 255, 255, .16) 55%,
        transparent 64%) no-repeat;
    background-size: 260% 100%;
    background-position: 100% 0;
    animation: hdr-buy-sheen 4.6s ease-in-out infinite;
    pointer-events: none;
}

@keyframes hdr-buy-orbit {
    to { --hb-a: 360deg; }
}

@keyframes hdr-buy-sheen {
    0%   { background-position: 100% 0; }
    34%  { background-position: 0% 0; }
    100% { background-position: 0% 0; }
}

@media (prefers-reduced-motion: reduce) {
    .hdr-buy::before, .hdr-buy::after { animation: none; }
    .hdr-buy::after { display: none; }
}
