/* Premium touches (website and admin). CSS only, nothing extra to download or run. */

/* Brand text selection and keyboard focus */
::selection { background: rgba(123, 60, 245, .22); color: inherit; }
::-moz-selection { background: rgba(123, 60, 245, .22); }
:focus-visible { outline: 2px solid #7B3CF5; outline-offset: 3px; border-radius: 6px; }
input:focus-visible, textarea:focus-visible, select:focus-visible { outline-offset: 1px; }

/* Tap-to-zoom pictures in blog posts (premium.js) */
.bl-prose img.rz-can { cursor: zoom-in; }
.rz { position: fixed; inset: 0; z-index: 4500; display: grid; place-items: center; padding: max(16px, env(safe-area-inset-top)) 16px;
    background: rgba(6, 8, 22, calc(.92 * var(--rz-a, 1))); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); cursor: zoom-out; }
.rz img { max-width: min(1400px, 100%); max-height: 100%; border-radius: 14px; box-shadow: 0 40px 120px -30px rgba(0, 0, 0, .8); transition: transform .2s; }
.rz-x { position: absolute; top: max(16px, env(safe-area-inset-top)); right: 16px; width: 46px; height: 46px; border: 0; border-radius: 50%;
    display: grid; place-items: center; color: #fff; font-size: 1.15rem; background: rgba(255, 255, 255, .14); cursor: pointer; }
.rz-x:hover { background: rgba(255, 255, 255, .24); }
body.rz-open { overflow: hidden; }

/* "Continue reading" pill on blog posts (premium.js) */
.rc-resume { position: fixed; left: 50%; bottom: calc(env(safe-area-inset-bottom, 0px) + 22px); z-index: 1200; display: inline-flex; align-items: center; gap: .55rem;
    padding: .7rem 1.1rem .7rem .95rem; border: 0; border-radius: 999px; color: #fff; font: 700 .9rem/1 var(--font-heading, sans-serif);
    background: #0B0D22; box-shadow: 0 18px 40px -14px rgba(76, 58, 245, .75), 0 0 0 1px rgba(255, 255, 255, .08); cursor: pointer;
    opacity: 0; transform: translate(-50%, 16px) scale(.94); transition: opacity .3s, transform .45s cubic-bezier(.2, 1.3, .3, 1); }
.rc-resume.is-on { opacity: 1; transform: translate(-50%, 0); }
.rc-resume i { color: #FFB27A; }
.rc-resume em { font-style: normal; font-size: .78rem; padding: .25rem .5rem; border-radius: 999px; background: rgba(255, 255, 255, .12); }

/* "Listen to this article" (premium.js). Premium, calm colours: deep navy, Rachyet electric blue → cyan as the
   only accent, white for the player's controls (like Apple Music / Spotify). Motion is transform / opacity only,
   and the music animations only run while something is playing. */
.bl-listen { position: relative; display: inline-flex; align-items: center; gap: .9rem; margin-top: 1.3rem;
    padding: .5rem 1.25rem .5rem .5rem; border: 1px solid rgba(255, 255, 255, .06); border-radius: 999px; color: #fff; text-align: left; cursor: pointer;
    background: linear-gradient(180deg, #16204A 0%, #0B1438 100%);
    box-shadow: 0 1px 0 rgba(255, 255, 255, .08) inset, 0 14px 30px -14px rgba(11, 20, 56, .75), 0 0 0 4px rgba(45, 91, 255, .10);
    transition: transform .25s cubic-bezier(.2, 1.3, .3, 1), box-shadow .25s; }
.bl-listen:hover { transform: translateY(-2px); box-shadow: 0 1px 0 rgba(255, 255, 255, .1) inset, 0 20px 40px -16px rgba(11, 20, 56, .85), 0 0 0 5px rgba(45, 91, 255, .16); }
.bl-listen:active { transform: scale(.97); }
.bl-listen-ic { position: relative; flex: none; width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; font-size: 1rem; color: #fff;
    background: linear-gradient(140deg, #4CC6FF 0%, #2D5BFF 70%); box-shadow: 0 8px 18px -6px rgba(45, 91, 255, .8), inset 0 1px 0 rgba(255, 255, 255, .35); }
.bl-listen-ic > i { margin-left: 2px; }
.bl-listen-ic::after { content: ''; position: absolute; inset: -5px; border-radius: 50%; border: 1.5px solid rgba(76, 198, 255, .7); animation: blPulse 2.6s ease-out infinite; }
@keyframes blPulse { from { transform: scale(.92); opacity: .9; } to { transform: scale(1.4); opacity: 0; } }
.bl-listen-txt { display: grid; gap: .22rem; line-height: 1.1; }
.bl-listen-txt strong { font: 800 1rem/1.1 var(--font-heading, sans-serif); letter-spacing: -.01em; }
.bl-listen-txt small { font: 600 .76rem/1.1 var(--font-sans, sans-serif); color: rgba(203, 213, 245, .7); }
.bl-listen-wave { display: flex; align-items: center; gap: 3px; height: 24px; margin-left: .35rem; }
.bl-listen-wave i { width: 3px; height: 100%; border-radius: 3px; background: linear-gradient(#8AD9FF, #2D5BFF); transform: scaleY(.3); opacity: .9; }
.bl-listen-wave i:nth-child(odd) { transform: scaleY(.55); }
.bl-listen-wave i:nth-child(3n) { transform: scaleY(.8); }
/* sound bars (the button's icon while playing, and the player's cover) */
.bl-eq { position: absolute; display: none; align-items: flex-end; justify-content: center; gap: 3px; height: 16px; }
.bl-eq i { width: 3px; height: 100%; border-radius: 2px; background: #fff; transform-origin: bottom; animation: blEq .9s ease-in-out infinite; }
.bl-eq i:nth-child(2) { animation-delay: -.3s; } .bl-eq i:nth-child(3) { animation-delay: -.6s; } .bl-eq i:nth-child(4) { animation-delay: -.15s; }
@keyframes blEq { 0%, 100% { transform: scaleY(.25); } 50% { transform: scaleY(1); } }
.bl-listen.is-playing .bl-listen-ic > i { display: none; }
.bl-listen.is-playing .bl-eq { display: flex; }
.bl-listen.is-playing .bl-listen-wave i { animation: blEq 1s ease-in-out infinite; }
.bl-listen-wave i:nth-child(2n) { animation-delay: -.4s; } .bl-listen-wave i:nth-child(3n) { animation-delay: -.7s; } .bl-listen-wave i:nth-child(4n) { animation-delay: -.2s; }
/* the part being read: soft blue with a blue bar on the left, like a reading app */
.bl-speaking { background: rgba(45, 91, 255, .06); border-radius: 10px; box-shadow: -12px 0 0 0 rgba(45, 91, 255, .06), -15px 0 0 0 #2D5BFF;
    transition: background .4s, box-shadow .4s; }
h1.bl-speaking, p.bl-post-lead.bl-speaking { box-shadow: none; background: rgba(45, 91, 255, .07); }
/* the word being said right now (premium.js, CSS Custom Highlight API: no change to the page layout) */
::highlight(rc-word) { background-color: rgba(45, 91, 255, .26); color: #0B1438; }

/* the player: solid black glass, white controls, one blue accent */
.bl-player { position: fixed; left: 50%; bottom: calc(env(safe-area-inset-bottom, 0px) + 16px); z-index: 1300; width: min(760px, calc(100% - 20px));
    padding: .8rem .95rem .7rem; border-radius: 22px; color: #fff; isolation: isolate; overflow: hidden;
    background: rgba(10, 11, 20, .96); -webkit-backdrop-filter: blur(20px) saturate(1.3); backdrop-filter: blur(20px) saturate(1.3);
    box-shadow: 0 30px 70px -24px rgba(0, 0, 0, .65), 0 0 0 1px rgba(255, 255, 255, .08), inset 0 1px 0 rgba(255, 255, 255, .07);
    opacity: 0; transform: translate(-50%, 120%); transition: opacity .35s, transform .6s cubic-bezier(.16, 1, .3, 1); }
.bl-player.is-on { opacity: 1; transform: translate(-50%, 0); }
.bl-player-glow { position: absolute; inset: 0; z-index: -1; pointer-events: none; opacity: .5;
    background: radial-gradient(60% 120% at 0% 0%, rgba(45, 91, 255, .22), transparent 60%); transition: opacity .6s; }
.bl-player.is-playing .bl-player-glow { opacity: 1; }
.bl-player-row { display: flex; align-items: center; gap: .9rem; }
.bl-player-art { position: relative; flex: none; width: 52px; height: 52px; border-radius: 12px; overflow: hidden; display: grid; place-items: center;
    background: #1E2440; box-shadow: 0 8px 20px -8px rgba(0, 0, 0, .8), 0 0 0 1px rgba(255, 255, 255, .08); }
.bl-player-art img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s; }
.bl-player.is-playing .bl-player-art img { transform: scale(1.06); }
.bl-player-art .bl-eq { inset: 0; height: auto; padding: 15px 13px; background: rgba(10, 11, 20, .5); }
.bl-player.is-playing .bl-player-art .bl-eq { display: flex; }
.bl-player-info { flex: 1; min-width: 0; display: grid; gap: .28rem; }
.bl-player-info small { display: flex; align-items: center; gap: .45rem; font: 700 .68rem/1 var(--font-sans, sans-serif); letter-spacing: .08em; text-transform: uppercase; color: rgba(203, 213, 245, .55); }
.bl-player-live { width: 7px; height: 7px; border-radius: 50%; background: #475569; }
.bl-player.is-playing .bl-player-live { background: #4CC6FF; box-shadow: 0 0 0 0 rgba(76, 198, 255, .6); animation: blLive 1.6s infinite; }
@keyframes blLive { to { box-shadow: 0 0 0 7px rgba(76, 198, 255, 0); } }
.bl-player-info strong { font: 700 .96rem/1.25 var(--font-heading, sans-serif); letter-spacing: -.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bl-player-ctrl, .bl-player-extra { display: flex; align-items: center; gap: .35rem; flex: none; }
.bl-player-play { position: relative; width: 48px; height: 48px; border: 0; border-radius: 50%; display: grid; place-items: center; color: #0A0B14; font-size: 1.05rem; cursor: pointer;
    background: #fff; box-shadow: 0 8px 22px -8px rgba(255, 255, 255, .35); transition: transform .2s; }
.bl-player-play:hover { transform: scale(1.07); }
.bl-player-play:active { transform: scale(.94); }
.bl-player:not(.is-playing) .bl-player-play i { margin-left: 3px; }
.bl-player-btn, .bl-player-rate { height: 38px; min-width: 38px; padding: 0 .6rem; border: 0; border-radius: 999px; display: grid; place-items: center;
    color: rgba(255, 255, 255, .78); background: transparent; cursor: pointer; font: 800 .8rem/1 var(--font-heading, sans-serif); transition: background .2s, color .2s; }
.bl-player-btn:hover, .bl-player-rate:hover { color: #fff; background: rgba(255, 255, 255, .09); }
.bl-player-rate { min-width: 44px; border: 1px solid rgba(255, 255, 255, .14); height: 30px; }
.bl-player-x { color: rgba(255, 255, 255, .55); }
.bl-player-seek-row { display: flex; align-items: center; gap: .75rem; margin-top: .6rem; font: 600 .72rem/1 var(--font-sans, sans-serif); color: rgba(203, 213, 245, .6); font-variant-numeric: tabular-nums; }
.bl-player-seek { position: relative; flex: 1; height: 16px; cursor: pointer; display: flex; align-items: center; }
.bl-player-seek::before { content: ''; position: absolute; left: 0; right: 0; height: 4px; border-radius: 4px; background: rgba(255, 255, 255, .14); }
.bl-player-fill { position: absolute; left: 0; right: 0; height: 4px; border-radius: 4px; transform-origin: left; transform: scaleX(0); background: #fff; transition: transform .3s linear, background .2s; }
.bl-player-seek:hover .bl-player-fill { background: linear-gradient(90deg, #4CC6FF, #2D5BFF); }
.bl-player-knob { position: absolute; top: 50%; width: 12px; height: 12px; margin: -6px 0 0 -6px; border-radius: 50%; background: #fff; left: 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, .5); transition: left .3s linear, transform .2s; transform: scale(0); }
.bl-player-seek:hover .bl-player-knob, .bl-player-seek:focus-visible .bl-player-knob, .bl-player.is-playing .bl-player-knob { transform: scale(1); }
/* floating buttons step aside while the player is open */
body:has(.bl-player.is-on) :is(.wa-float, .rachy-launch, .rachy-nudge, .back-to-top, .rc-resume) { opacity: 0 !important; pointer-events: none !important; transition: opacity .3s; }
@media (max-width: 640px) {
    .bl-player { padding: .65rem .7rem .55rem; border-radius: 20px; }
    .bl-player-row { gap: .6rem; }
    .bl-player-art { width: 44px; height: 44px; border-radius: 10px; }
    .bl-player-info strong { font-size: .86rem; }
    .bl-player [data-p-back], .bl-player-src { display: none; }
    .bl-player-info small { white-space: nowrap; }
    .bl-player-play { width: 44px; height: 44px; }
    .bl-player-btn { height: 34px; min-width: 34px; padding: 0 .45rem; }
    .bl-listen-wave { display: none; }
}

/* Share a highlighted sentence (premium.js) */
.bl-quote { position: absolute; z-index: 1400; display: flex; align-items: center; gap: .3rem; padding: .35rem .4rem .35rem .8rem; border-radius: 999px;
    background: #0B0D22; color: #fff; box-shadow: 0 16px 36px -12px rgba(15, 23, 42, .55), 0 0 0 1px rgba(255, 255, 255, .08);
    opacity: 0; transform: translateY(6px) scale(.96); transition: opacity .18s, transform .25s cubic-bezier(.2, 1.3, .3, 1); }
.bl-quote.is-below { transform: translateY(-6px) scale(.96); }
.bl-quote.is-on { opacity: 1; transform: none; }
.bl-quote > span { margin-right: .25rem; font: 700 .75rem/1 var(--font-heading, sans-serif); color: rgba(226, 232, 255, .7); white-space: nowrap; }
.bl-quote a, .bl-quote button { width: 34px; height: 34px; border: 0; border-radius: 50%; display: grid; place-items: center; color: #fff; font-size: .9rem;
    background: var(--c); cursor: pointer; text-decoration: none; transition: transform .15s, filter .15s; }
.bl-quote a:hover, .bl-quote button:hover { transform: translateY(-2px); filter: brightness(1.15); }
.bl-quote a[style*="#000"] { box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .25); }

/* Scroll animations run by the browser itself where supported (main.js uses .rvs there instead of watching the
   page with a script): content glides in as it enters the screen. "translate" is used so it never clashes with
   hover effects that use "transform". */
@supports (animation-timeline: view()) {
    .rvs { animation: rvsIn linear both; animation-timeline: view(); animation-range: entry 0% entry 55%; }
    @keyframes rvsIn { from { opacity: 0; translate: 0 26px; } }
}
@media (prefers-reduced-motion: reduce) {
    .rvs { animation: none !important; }
    .rz img, .rc-resume, .bl-player, .bl-quote, .bl-listen { transition: none; }
    .bl-listen-ic::after, .bl-eq i, .bl-listen-wave i, .bl-player-glow, .bl-player-live, .bl-player-play::after { animation: none !important; }
}
