/* ==========================================================
   N5TG V1.0.59 — Glossy design system (final layer)
   ----------------------------------------------------------
   One consistent "glossy glass" look for the whole feed:
   - pearl-gloss buttons and chips (top specular highlight + inner edge)
   - glass panels built from gradients, NOT per-card backdrop blur
     (the old sheets used 9+ blurred layers per card, which is what
     made mid-range phones stutter while scrolling)
   - per-post admin colours (title / text / background / read more)
     are respected: nothing here overrides inline colours.
   ========================================================== */

:root {
    --rn-g-accent: #e4002b;
    --rn-g-accent-2: #ff3b62;
    --rn-g-ink: #0d0f14;
    --rn-g-edge: rgba(255, 255, 255, .15);
    --rn-g-edge-strong: rgba(255, 255, 255, .26);
    --rn-g-hi: inset 0 1px 0 rgba(255, 255, 255, .30);
    --rn-g-lo: inset 0 -1px 0 rgba(0, 0, 0, .38);
    --rn-g-glass:
        linear-gradient(180deg, rgba(255, 255, 255, .15) 0%, rgba(255, 255, 255, .045) 49%, rgba(255, 255, 255, .015) 50%, rgba(255, 255, 255, .06) 100%);
    --rn-g-pearl:
        radial-gradient(130% 80% at 30% 0%, #ffffff 0%, rgba(255, 255, 255, .96) 42%, rgba(255, 255, 255, 0) 43%),
        linear-gradient(180deg, #ffffff 0%, #eef0f5 55%, #dfe3ea 100%);
    --rn-g-shadow-sm: 0 6px 16px rgba(0, 0, 0, .30);
    --rn-g-shadow: 0 12px 30px rgba(0, 0, 0, .38);
    --rn-g-ease: cubic-bezier(.2, .8, .2, 1);
    --rn-g-spring: cubic-bezier(.2, .9, .25, 1.35);
}

/* ---------- performance: drop per-card blur layers ---------- */
html body .rn-feed-card .rn-action-btn,
html body .rn-feed-card .rn-news-meta-top,
html body .rn-feed-card .rn-news-view-count-outside,
html body .rn-feed-card .rn-feed-logo,
html body .rn-feed-card .rn-action-bar {
    -webkit-backdrop-filter: none !important;
    backdrop-filter: none !important;
}

/* ---------- card shell ---------- */
html body #rn-feed-wrapper > .rn-feed-card.rn-news-reel-card {
    background-color: #0b0c11;
}

/* image melts into the body + soft top gloss */
html body .rn-feed-card .rn-feed-image::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 2;
    pointer-events: none;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, .10) 0%, rgba(255, 255, 255, 0) 18%),
        linear-gradient(0deg, rgba(8, 9, 13, .72) 0%, rgba(8, 9, 13, .22) 22%, rgba(8, 9, 13, 0) 42%);
}
html body .rn-feed-card .rn-feed-image:has(video)::after { display: none; }
html body .rn-feed-card .rn-feed-image > .rn-image-badges-row,
html body .rn-feed-card .rn-feed-image > .rn-feed-logo,
html body .rn-feed-card .rn-feed-image > .rn-feed-poll { z-index: 46 !important; }
html body .rn-feed-card .rn-feed-image > .rn-image-watermark { z-index: 3 !important; }

/* thin specular line + ambient glow where the image meets the text */
html body .rn-feed-card .rn-news-body-area::before {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    height: 120px;
    z-index: 0;
    pointer-events: none;
    background:
        linear-gradient(90deg, rgba(255, 255, 255, 0), rgba(255, 255, 255, .22) 30%, rgba(255, 255, 255, .22) 70%, rgba(255, 255, 255, 0)) top / 100% 1px no-repeat,
        radial-gradient(70% 100% at 18% 0%, rgba(228, 0, 43, .16), rgba(228, 0, 43, 0) 70%);
}
html body .rn-feed-card .rn-news-content-panel { position: relative; z-index: 8; }

/* ---------- category / breaking / logo ---------- */
html body .rn-feed-card .rn-news-category-label {
    position: relative !important;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, .7) !important;
    box-shadow: 0 6px 16px rgba(0, 0, 0, .28), inset 0 -1px 0 rgba(0, 0, 0, .08) !important;
    letter-spacing: .08em !important;
    text-transform: uppercase;
}
html body .rn-feed-card .rn-news-category-label:not([style*="background"]) {
    background: var(--rn-g-pearl) !important;
    color: var(--rn-g-ink) !important;
}
html body .rn-feed-card .rn-news-category-label::before,
html body .rn-feed-card .rn-read-more::before,
html body .rn-feed-card .rn-count::before {
    content: "";
    position: absolute;
    left: 6%;
    right: 6%;
    top: 1px;
    height: 48%;
    border-radius: 999px 999px 60% 60% / 999px 999px 100% 100%;
    background: linear-gradient(180deg, rgba(255, 255, 255, .55), rgba(255, 255, 255, 0));
    pointer-events: none;
    opacity: .55;
}
html body .rn-feed-card .rn-breaking-badge {
    position: relative;
    overflow: hidden;
    background: linear-gradient(180deg, var(--rn-g-accent-2), var(--rn-g-accent) 55%, #a8001f) !important;
    color: #fff !important;
    border: 1px solid rgba(255, 255, 255, .35) !important;
    box-shadow: 0 8px 20px rgba(228, 0, 43, .45), inset 0 1px 0 rgba(255, 255, 255, .45) !important;
}

html body .rn-feed-card .rn-feed-logo {
    background: var(--rn-g-pearl) !important;
    border: 1px solid rgba(255, 255, 255, .85) !important;
    box-shadow: 0 10px 26px rgba(0, 0, 0, .35), inset 0 -2px 4px rgba(0, 0, 0, .08), 0 0 0 4px rgba(255, 255, 255, .12) !important;
}

/* ---------- meta / views / listen ---------- */
html body .rn-feed-card .rn-news-meta-top {
    background: var(--rn-g-glass), rgba(12, 13, 19, .72) !important;
    border: 1px solid var(--rn-g-edge) !important;
    box-shadow: var(--rn-g-shadow-sm), var(--rn-g-hi), var(--rn-g-lo) !important;
}
html body .rn-feed-card .rn-news-meta-top,
html body .rn-feed-card .rn-news-meta-top * { color: rgba(255, 255, 255, .9); }

html body .rn-feed-card .rn-news-view-count-outside {
    background: var(--rn-g-glass), rgba(5, 6, 10, .78) !important;
    border: 1px solid var(--rn-g-edge-strong) !important;
    box-shadow: var(--rn-g-shadow-sm), var(--rn-g-hi), var(--rn-g-lo) !important;
}
html body .rn-feed-card .rn-view-number { font-variant-numeric: tabular-nums; }

html body .rn-feed-card .rn-tts-button {
    overflow: hidden;
    background-image: linear-gradient(180deg, rgba(255, 255, 255, .22), rgba(255, 255, 255, 0) 55%, rgba(0, 0, 0, .14)) !important;
    border: 1px solid rgba(255, 255, 255, .38) !important;
    box-shadow: 0 8px 20px rgba(228, 0, 43, .35), inset 0 1px 0 rgba(255, 255, 255, .45), inset 0 -1px 0 rgba(0, 0, 0, .25) !important;
    transition: transform .18s var(--rn-g-spring), filter .2s ease !important;
}

/* ---------- title + text ---------- */
html body .rn-feed-card .rn-feed-title {
    text-shadow: 0 1px 0 rgba(0, 0, 0, .35), 0 8px 24px rgba(0, 0, 0, .35) !important;
    text-wrap: balance;
}
html body .rn-feed-card .rn-feed-excerpt { text-wrap: pretty; }

/* ---------- read more: pearl capsule ---------- */
html body .rn-feed-card .rn-read-more {
    overflow: hidden;
    isolation: isolate;
    border: 1px solid rgba(255, 255, 255, .9) !important;
    box-shadow: 0 12px 28px rgba(0, 0, 0, .38), inset 0 -2px 3px rgba(0, 0, 0, .10), inset 0 1px 0 #fff !important;
    transition: transform .2s var(--rn-g-spring), box-shadow .2s ease !important;
}
html body .rn-feed-card .rn-read-more:not([style*="background"]) {
    background: var(--rn-g-pearl) !important;
    color: var(--rn-g-ink) !important;
}
html body .rn-feed-card .rn-read-more::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background: linear-gradient(105deg, transparent 30%, rgba(255, 255, 255, .85) 46%, rgba(255, 255, 255, 0) 60%);
    transform: translateX(-130%);
    pointer-events: none;
}
html body .rn-feed-card.rn-is-active .rn-read-more::after {
    animation: rnGlossSheen 1.6s var(--rn-g-ease) .9s 1 both;
}
html body .rn-feed-card .rn-read-more span[aria-hidden] {
    display: inline-block;
    transition: transform .2s var(--rn-g-ease);
}
html body .rn-feed-card .rn-read-more:hover span[aria-hidden] { transform: translateX(3px); }
html body .rn-feed-card .rn-read-more:hover { transform: translateY(-1px); }
html body .rn-feed-card .rn-read-more:active { transform: scale(.95); }

@keyframes rnGlossSheen {
    to { transform: translateX(130%); }
}

/* ---------- action dock: glass rail + pearl buttons ---------- */
html body .rn-feed-card .rn-action-bar {
    background:
        linear-gradient(180deg, rgba(255, 255, 255, .20) 0%, rgba(255, 255, 255, .06) 14%, rgba(255, 255, 255, .02) 60%, rgba(255, 255, 255, .05) 100%),
        linear-gradient(180deg, rgba(30, 32, 42, .78), rgba(6, 7, 11, .9)) !important;
    border: 1px solid var(--rn-g-edge-strong) !important;
    border-right: 0 !important;
    box-shadow: -14px 0 30px rgba(0, 0, 0, .38), inset 1px 1px 0 rgba(255, 255, 255, .22) !important;
}

html body .rn-feed-card .rn-action-btn,
html body .rn-feed-card .rn-translate-toggle {
    position: relative;
    background: var(--rn-g-pearl) !important;
    border: 1px solid rgba(255, 255, 255, .95) !important;
    box-shadow: 0 8px 18px rgba(0, 0, 0, .34), inset 0 -3px 5px rgba(0, 0, 0, .10), inset 0 1px 0 #fff !important;
    transition: transform .2s var(--rn-g-spring), box-shadow .2s ease !important;
    -webkit-tap-highlight-color: transparent;
}
html body .rn-feed-card .rn-action-btn:hover,
html body .rn-feed-card .rn-translate-toggle:hover { transform: translateY(-2px); }
html body .rn-feed-card .rn-action-btn:active,
html body .rn-feed-card .rn-translate-toggle:active {
    transform: scale(.9);
    box-shadow: 0 3px 8px rgba(0, 0, 0, .34), inset 0 2px 5px rgba(0, 0, 0, .14) !important;
    transition-duration: .08s !important;
}

html body .rn-feed-card .rn-like-btn.liked {
    color: #fff !important;
    background:
        radial-gradient(130% 80% at 30% 0%, rgba(255, 255, 255, .55) 0%, rgba(255, 255, 255, .1) 42%, rgba(255, 255, 255, 0) 43%),
        linear-gradient(180deg, var(--rn-g-accent-2), var(--rn-g-accent) 60%, #a3001d) !important;
    border-color: rgba(255, 255, 255, .5) !important;
    box-shadow: 0 8px 20px rgba(228, 0, 43, .45), inset 0 1px 0 rgba(255, 255, 255, .5) !important;
}
html body .rn-feed-card .rn-save-btn.saved {
    color: #fff !important;
    background:
        radial-gradient(130% 80% at 30% 0%, rgba(255, 255, 255, .5) 0%, rgba(255, 255, 255, .08) 42%, rgba(255, 255, 255, 0) 43%),
        linear-gradient(180deg, #3b82f6, #1d4ed8 60%, #1e3a8a) !important;
    border-color: rgba(255, 255, 255, .45) !important;
}

html body .rn-feed-card .rn-count {
    position: relative !important;
    overflow: hidden;
    background: linear-gradient(180deg, #2a2d38, #0b0c11) !important;
    border: 1px solid rgba(255, 255, 255, .2) !important;
    box-shadow: 0 3px 8px rgba(0, 0, 0, .35), inset 0 1px 0 rgba(255, 255, 255, .18) !important;
    font-variant-numeric: tabular-nums;
}
html body .rn-feed-card .rn-count::before { opacity: .22; }
html body .rn-feed-card .rn-issue-count { background: transparent !important; border: 0 !important; box-shadow: none !important; }
html body .rn-feed-card .rn-issue-count::before { display: none; content: none; }

/* count "pop" when the number changes (like / save / share) */
html body .rn-feed-card .rn-count.rn-count-pop { animation: rnCountPop .42s var(--rn-g-spring); }
@keyframes rnCountPop { 40% { transform: scale(1.28); } }

/* ---------- bottom navigation (one fixed element, blur is fine here) ---------- */
html body .rn-mobile-bottom-menu.rn-global-bottom-menu,
html body .rn-mobile-bottom-menu {
    background:
        linear-gradient(180deg, rgba(255, 255, 255, .10), rgba(255, 255, 255, .02) 40%, rgba(255, 255, 255, 0)),
        rgba(9, 10, 14, .82) !important;
    border-top: 1px solid rgba(255, 255, 255, .14) !important;
    box-shadow: 0 -14px 34px rgba(0, 0, 0, .5), inset 0 1px 0 rgba(255, 255, 255, .12) !important;
    -webkit-backdrop-filter: blur(18px) saturate(1.4) !important;
    backdrop-filter: blur(18px) saturate(1.4) !important;
}
html body .rn-mobile-bottom-menu .rn-mobile-menu-item {
    background: transparent !important;
    transition: transform .2s var(--rn-g-spring), background .2s ease, color .2s ease !important;
}
html body .rn-mobile-bottom-menu .rn-mobile-menu-item.active,
html body .rn-mobile-bottom-menu .rn-mobile-menu-item[aria-current="page"] {
    background:
        linear-gradient(180deg, rgba(255, 255, 255, .22), rgba(255, 255, 255, .05) 50%, rgba(255, 255, 255, .02) 51%, rgba(255, 255, 255, .08)),
        rgba(228, 0, 43, .22) !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .32), inset 0 -1px 0 rgba(0, 0, 0, .3), 0 8px 20px rgba(228, 0, 43, .25) !important;
    border: 1px solid rgba(255, 255, 255, .16) !important;
}
html body .rn-mobile-bottom-menu .rn-mobile-menu-item:active { transform: scale(.94); }

/* ---------- desktop rails ---------- */
html body .rn-desktop-sidebar {
    background:
        radial-gradient(120% 40% at 0% 0%, rgba(228, 0, 43, .14), rgba(228, 0, 43, 0) 60%),
        linear-gradient(180deg, #0c0d12, #06070a) !important;
    border-right: 1px solid rgba(255, 255, 255, .07) !important;
}
html body .rn-desktop-sidebar .rn-desktop-nav-item {
    transition: transform .2s var(--rn-g-ease), background .2s ease, box-shadow .2s ease !important;
}
html body .rn-desktop-sidebar .rn-desktop-nav-item:hover { transform: translateX(3px); }
html body .rn-desktop-sidebar .rn-desktop-nav-item.active {
    background:
        linear-gradient(180deg, rgba(255, 255, 255, .16), rgba(255, 255, 255, .03) 50%, rgba(255, 255, 255, .01) 51%, rgba(255, 255, 255, .05)),
        linear-gradient(90deg, rgba(228, 0, 43, .45), rgba(228, 0, 43, .16)) !important;
    border: 1px solid rgba(255, 90, 120, .45) !important;
    box-shadow: 0 10px 26px rgba(228, 0, 43, .22), inset 0 1px 0 rgba(255, 255, 255, .25) !important;
}
html body .rn-desktop-sidebar .rn-desktop-action-links a {
    background: var(--rn-g-glass), rgba(255, 255, 255, .03) !important;
    border: 1px solid rgba(255, 255, 255, .1) !important;
    box-shadow: var(--rn-g-hi) !important;
    transition: transform .2s var(--rn-g-ease), border-color .2s ease !important;
}
html body .rn-desktop-sidebar .rn-desktop-action-links a:hover { transform: translateY(-1px); border-color: rgba(255, 255, 255, .22) !important; }

html body .rn-desktop-latest-panel {
    background:
        linear-gradient(180deg, rgba(255, 255, 255, .07), rgba(255, 255, 255, .015) 30%, rgba(255, 255, 255, 0)),
        #0d0e14 !important;
    border: 1px solid rgba(255, 255, 255, .1) !important;
    box-shadow: 0 24px 60px rgba(0, 0, 0, .45), inset 0 1px 0 rgba(255, 255, 255, .1) !important;
}
html body .rn-desktop-latest-panel .rn-desktop-latest-item {
    background: var(--rn-g-glass), rgba(255, 255, 255, .02) !important;
    border: 1px solid rgba(255, 255, 255, .08) !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .08) !important;
    transition: transform .22s var(--rn-g-ease), border-color .2s ease, box-shadow .2s ease !important;
}
html body .rn-desktop-latest-panel .rn-desktop-latest-item:hover {
    transform: translateY(-2px);
    border-color: rgba(255, 255, 255, .2) !important;
    box-shadow: 0 12px 26px rgba(0, 0, 0, .35), inset 0 1px 0 rgba(255, 255, 255, .14) !important;
}
html body .rn-desktop-latest-panel .rn-desktop-latest-item img { transition: transform .4s var(--rn-g-ease); }
html body .rn-desktop-latest-panel .rn-desktop-latest-item:hover img { transform: scale(1.05); }

/* desktop card frame */
@media (min-width: 1181px) {
    html body #rn-feed-wrapper > .rn-feed-card.rn-news-reel-card {
        border: 1px solid rgba(255, 255, 255, .1) !important;
        box-shadow: 0 30px 80px rgba(0, 0, 0, .5), inset 0 1px 0 rgba(255, 255, 255, .1) !important;
    }
}

/* ==========================================================
   Motion: first reveal of each card (added by rn-scroll-unified-v156.js)
   ========================================================== */
/* Only three elements animate per card (text panel, Read More, dock).
   Animating every text node separately made the compositor drop touch
   flings mid-swipe on phones, so the stagger lives inside one layer. */
html body .rn-feed-card.rn-reveal-pending .rn-news-content-panel,
html body .rn-feed-card.rn-reveal-pending .rn-read-more {
    opacity: 0;
}
html body .rn-feed-card.rn-reveal-pending .rn-action-bar { opacity: 0; }

html body .rn-feed-card.rn-reveal-in .rn-news-content-panel { animation: rnRiseIn .56s var(--rn-g-ease) .02s both; }
html body .rn-feed-card.rn-reveal-in .rn-read-more          { animation: rnRiseIn .5s var(--rn-g-spring) .2s both; }
html body .rn-feed-card.rn-reveal-in .rn-action-bar         { animation: rnDockIn .5s var(--rn-g-ease) .08s both; }

@keyframes rnRiseIn {
    from { opacity: 0; transform: translateY(14px); }
    to   { opacity: 1; transform: none; }
}
@keyframes rnDockIn {
    from { opacity: 0; translate: 14px 0; }
    to   { opacity: 1; translate: 0 0; }
}

/* the floating read-more is positioned with "right/bottom", so its own
   transform is free for the animation above; keep any admin transform off */
html body .rn-feed-card.rn-reveal-in .rn-read-more { will-change: transform, opacity; }

/* ---------- accessibility ---------- */
html body .rn-feed-card .rn-action-btn:focus-visible,
html body .rn-feed-card .rn-read-more:focus-visible,
html body .rn-feed-card .rn-tts-button:focus-visible,
html body .rn-feed-card .rn-translate-toggle:focus-visible {
    outline: 2px solid #fff !important;
    outline-offset: 2px !important;
}

@media (prefers-reduced-motion: reduce) {
    html body .rn-feed-card.rn-reveal-pending *,
    html body .rn-feed-card.rn-reveal-in * {
        animation: none !important;
        opacity: 1 !important;
        transform: none !important;
        translate: none !important;
    }
    html body .rn-feed-card .rn-read-more::after { display: none; }
    html body .rn-feed-card .rn-action-btn,
    html body .rn-feed-card .rn-read-more,
    html body .rn-feed-card .rn-tts-button { transition: none !important; }
}
