/* news/polish.css — News page micro-interactions polish bundle.
 * Scoped under [data-route="/news"] where specificity requires it.
 * Respects prefers-reduced-motion throughout.
 */

/* ─── CHIP ENTRANCE (is-active state) ───────────────────────────────────── */
@keyframes nw-chip-fadeInUp {
  from {
    opacity: 0;
    transform: translateY(4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Chip color transition — applies to all nw-chip transitions */
.nw-chip {
  transition: color 0.2s ease, background-color 0.2s ease, border-color 0.2s ease;
}

/* When a chip gains .is-active, run the entrance animation */
.nw-chip.is-active {
  animation: nw-chip-fadeInUp 0.25s ease-out both;
}

/* Stagger sibling chips slightly using nth-child offsets (capped at 5 items) */
.nw-chip:nth-child(2).is-active { animation-delay: 0.02s; }
.nw-chip:nth-child(3).is-active { animation-delay: 0.04s; }
.nw-chip:nth-child(4).is-active { animation-delay: 0.06s; }
.nw-chip:nth-child(5).is-active { animation-delay: 0.08s; }
.nw-chip:nth-child(6).is-active { animation-delay: 0.10s; }

@media (prefers-reduced-motion: reduce) {
  .nw-chip.is-active {
    animation: none;
  }
  .nw-chip {
    transition: none;
  }
}

/* ─── HERO NAV BUTTONS ───────────────────────────────────────────────────── */
.hero-nav {
  transition: transform 0.15s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.15s ease;
}

.hero-nav:hover {
  transform: scale(1.08) translateY(-1px);
  box-shadow: 0 0 12px rgba(255, 26, 26, 0.4);
}

@media (prefers-reduced-motion: reduce) {
  .hero-nav {
    transition: none;
  }
  .hero-nav:hover {
    transform: none;
    box-shadow: none;
  }
}

/* ════════════════════════════════════════════════════════════════════════
   NR-40 — IMMERSIVE VIDEO REEL
   Wall-to-wall vertical video feed that autoplays the centred clip.
   Scoped to /news so it never leaks into other routes.
   ════════════════════════════════════════════════════════════════════════ */

/* ── reel-declutter ROOT FIX (LEDGER: /news VIDEOS reel top-chrome collision) ──
   .nw-feed-tabs / .nw-reel-bar are position:fixed viewport overlays in mobile
   reel mode (below), but they're DOM descendants of .card.sn--c_feed, the
   giant article that wraps the whole feed. core.css ships a sitewide
   `.card:hover { transform: translateY(-2px); ... }` lift. On mobile Chrome/
   Safari, :hover STICKS after a tap until the next tap elsewhere — so tapping
   the VIDEOS tab itself (inside this same .card) armed a non-`none` transform
   on the ancestor, which establishes a NEW CSS containing block for every
   position:fixed descendant. Result: the "viewport-fixed, full-bleed" header
   chrome silently re-anchored to the transformed, narrower in-flow card
   instead of the true viewport — stacking the tabs/filters at the wrong
   coordinates on top of the video and (during the reflow) the caption/video
   text underneath, i.e. Brock's "three layers of text colliding." Unlayered
   (loads last) so it beats the @layer components rule regardless of a sticky
   :hover anywhere on this card. The generic lift was never a considered
   interaction for a page-level structural wrapper anyway — cut it here. */
.card.sn--c_feed:hover,
.card.sn--c_feed:active { transform: none; }

/* ── Reel filter panel (replaces the category chips on the VIDEOS tab) ──
   reel-declutter: collapsed by default — shown only via .is-open, toggled by
   the FILTERS button in .nw-feed-tabs (TikTok/Shorts pattern: filters live
   behind one affordance, not a second row permanently racing the tab row for
   space over the video). */
.nw-reel-bar {
  display: none;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 18px;
  /* No `padding-bottom` here so the .action-bar utility's bottom clearance
     (tab-bar + safe-area) is respected when this control row renders in normal
     flow; the tidy gap to the row below is a margin instead. Reel-mode re-sets
     padding + position below, so the clearance is inert over the video. */
  padding-top: 4px;
  padding-inline: 16px;
  margin-bottom: 12px;
}
.nw-reel-bar.is-open { display: flex; }
.nw-reel-bar[hidden] { display: none !important; }
.nw-reel-presets,
.nw-reel-hides { display: inline-flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.nw-reel-hides-label {
  font-family: var(--f-mono, "JetBrains Mono", ui-monospace, monospace);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .16em;
  color: #6A6A6A;
}
/* ── C6: ONE unified chip component ──────────────────────────────────────
   The category filter chips (.nw-chip), the VIDEOS reel presets
   (.nw-reel-preset), and the reel hide toggles (.nw-reel-hide) previously each
   had their own font/size/radius/colour (6px vs 999px vs 7px radius; 16/14/13px;
   three border/bg palettes). They now converge on this single chip base +
   active state. Functional-only modifiers (HYPE gradient, −/+ prefix, is-hidden
   strike-through, reel-mode positioning) stay below as deltas.
   Defined here (unlayered, loads last) so it wins over route.css @layer. */
.nw-chip,
.nw-reel-preset,
.nw-reel-hide {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--f-mono, "JetBrains Mono", ui-monospace, monospace);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  line-height: 1;
  color: var(--text-muted, #C2C2C2);
  background: var(--black-soft, #111);
  border: 1px solid var(--gray-border, #2A2A2A);
  border-radius: var(--sns-btn-radius, 8px);
  padding: 8px 14px;
  min-height: 34px;
  white-space: nowrap;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
  transition: color .18s ease, border-color .18s ease, background .18s ease, box-shadow .18s ease, transform .12s ease;
}
.nw-chip:hover,
.nw-reel-preset:hover,
.nw-reel-hide:hover {
  color: var(--white-bright, #F5F5F5);
  border-color: var(--accent, #FF2D2D);
}
/* news-nav-ia: the LIST-mode category rail (.nw-chip) is the primary,
   always-visible filter row per the design directive, so it gets the full
   mobile tap-target floor (active a11y program). .nw-reel-preset/.nw-reel-hide
   stay at the base 34px — they live in the space-constrained, on-demand
   FILTERS panel over the video, where the reel-mode media query below
   already compacts them further by design; bumping them too would blow the
   panel's deliberately tight footprint. */
html[data-route="/news"] .nw-chip { min-height: 44px; }
/* Quiet active state (news-elegance): ONE accent — a soft red-tinted fill + a
   muted red edge. The old loud glow bloom (0 0 12px) is dropped so the active
   filter reads as "selected," not as the loudest thing on the page. */
.nw-chip.is-active,
.nw-reel-preset.is-active,
.nw-reel-hide.is-active {
  color: var(--white-bright, #F5F5F5);
  background: rgba(255, 26, 26, .10);
  border-color: rgba(255, 45, 45, .55);
  box-shadow: none;
}

/* HYPE preset — the one allowed accent modifier (fire gradient when armed) */
.nw-reel-preset--hype.is-active {
  color: #fff;
  background: linear-gradient(135deg, #FF1A1A, #ff6a00);
  border-color: transparent;
  box-shadow: 0 0 18px rgba(255, 60, 0, .45);
}
.nw-reel-preset--hype:not(.is-active):hover { border-color: #FF1A1A; color: #fff; }

/* Reel hide toggles carry the shared chip look + the −/+ prefix affordance */
.nw-reel-hide::before { content: "− "; color: #6A6A6A; font-weight: 800; }
/* When a bucket is hidden, the toggle goes "off": struck + dim, with a + to re-add */
.nw-reel-hide.is-hidden {
  color: #6A6A6A;
  background: #0d0d0f;
  border-color: #1c1c1c;
  text-decoration: line-through;
}
.nw-reel-hide.is-hidden::before { content: "+ "; color: #FF1A1A; text-decoration: none; }
/* HYPE preset already isolates → hide toggles are moot; dim them */
.nw-reel-bar.preset-hype .nw-reel-hides { opacity: .35; pointer-events: none; }

/* ── The reel itself ──
   One clip owns the screen at a time. Snap lives on the page scroller (html,
   toggled via .nw-reel-mode in JS) — putting it on this non-scrolling div did
   nothing before. Each item is ~a full viewport tall, so scrolling lands you on
   the next video. */
.nw-feed-grid.is-reel {
  display: block;
  padding: 0;
}
html.nw-reel-mode {
  /* firm snap on every breakpoint so a scroll cleanly CATCHES the next clip
     (desktop used to be loose 'proximity' → it landed between videos) */
  scroll-snap-type: y mandatory;
  /* no sideways play — the fixed reel covers the viewport; this kills any few-px
     horizontal jiggle of the page behind it on a scroll/tap reflow */
  overflow-x: hidden;
}
html.nw-reel-mode body { overflow-x: hidden; }
.nw-reel-item {
  scroll-snap-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  /* one clip ≈ one screen, so a scroll-down delivers the next video */
  min-height: 88vh;
  min-height: 88dvh;
  padding: 1vh 0;
}
.nw-reel-stage {
  position: relative;
  /* As big as the available height allows, capped so it stays a tidy box on
     wide desktops — the clip genuinely dominates the screen. */
  width: min(100%, calc(82dvh * 16 / 9));
  max-width: 1180px;
  aspect-ratio: 16 / 9;
  background: #000;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 10px 44px rgba(0, 0, 0, .6);
  transition: box-shadow .25s ease, transform .25s ease;
}
.nw-reel-item.is-active .nw-reel-stage {
  box-shadow: 0 0 0 1px rgba(255, 26, 26, .35), 0 14px 60px rgba(255, 26, 26, .18), 0 10px 40px rgba(0, 0, 0, .6);
}

/* Two stacked media layers fill the stage, bottom→top:
   1 poster (sharp still — slow Ken-Burns pan while the card is centred, so it
     reads as alive on scroll without ever risking YouTube's grey preview shell)
   2 iframe (HD YouTube, fades in once frames are actually PLAYING — desktop /
     Android autoplay, or one tap on iOS). */
.nw-reel-iframe,
.nw-reel-thumb {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}
.nw-reel-thumb {
  z-index: 1;
  background-size: cover;
  background-position: center;
  background-color: #0a0a0a;
  will-change: transform;
}
/* Ken-Burns: the centred clip's poster slowly pans + zooms → motion on scroll,
   guaranteed on every device, never a grey/broken frame. */
.nw-reel-item.is-active .nw-reel-thumb {
  animation: nw-reel-kenburns 16s ease-in-out infinite alternate;
}
@keyframes nw-reel-kenburns {
  from { transform: scale(1.02) translate3d(0, 0, 0); }
  to   { transform: scale(1.12) translate3d(-1.5%, -2%, 0); }
}
/* HD iframe sits above the poster but fades in only once frames are PLAYING
   (not during buffering / the black YT shell). */
.nw-reel-iframe { z-index: 3; pointer-events: none; opacity: 0; transition: opacity .45s ease; }
.nw-reel-stage iframe {
  position: absolute;
  inset: 0;
  width: 100% !important;
  height: 100% !important;
  border: 0;
}
.nw-reel-item.is-playing .nw-reel-iframe { opacity: 1; }

/* Full-stage tap target → play full HD with sound. Sits above every media layer. */
.nw-reel-tap {
  position: absolute;
  inset: 0;
  z-index: 5;
  border: 0;
  background: transparent;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

/* Sound chip (top-right) reflects global mute state */
.nw-reel-sound {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 6;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--f-mono, "JetBrains Mono", ui-monospace, monospace);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .08em;
  color: #fff;
  background: rgba(0, 0, 0, .55);
  backdrop-filter: blur(6px);
  border: 1px solid rgba(255, 255, 255, .18);
  border-radius: 999px;
  padding: 5px 11px;
  pointer-events: none;
}
.nw-reel-sound::before { content: "🔇 TAP TO PLAY"; }
.nw-feed-grid.reel-sound-on .nw-reel-sound::before { content: "🔊 SOUND ON"; }
/* Only surface the sound chip on the active clip to keep things clean */
.nw-reel-item:not(.is-active) .nw-reel-sound { opacity: 0; }

/* Bottom gradient + meta */
.nw-reel-grad {
  position: absolute;
  inset: auto 0 0 0;
  height: 45%;
  z-index: 4;
  background: linear-gradient(to top, rgba(0, 0, 0, .82) 0%, rgba(0, 0, 0, .35) 45%, transparent 100%);
  pointer-events: none;
}
.nw-reel-meta {
  position: absolute;
  left: 16px;
  right: 56px;
  bottom: 14px;
  z-index: 6;
  pointer-events: none;
}
.nw-reel-channel {
  display: block;
  font-family: var(--f-mono, "JetBrains Mono", ui-monospace, monospace);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: #FF5A4D;
  margin-bottom: 4px;
}
.nw-reel-title {
  margin: 0;
  font-family: var(--f-display, "Graduate"), Georgia, serif;
  font-size: clamp(16px, 2.4vw, 22px);
  font-weight: 600;
  line-height: 1.15;
  color: #fff;
  text-shadow: 0 2px 12px rgba(0, 0, 0, .8);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Open-on-YouTube affordance (bottom-right) */
.nw-reel-open {
  position: absolute;
  right: 12px;
  bottom: 14px;
  z-index: 7;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  color: #fff;
  background: rgba(0, 0, 0, .5);
  backdrop-filter: blur(6px);
  border: 1px solid rgba(255, 255, 255, .18);
  transition: background-color .15s ease, transform .12s ease;
}
.nw-reel-open:hover { background: rgba(255, 26, 26, .85); transform: scale(1.06); }

/* ── news-nav-ia: list-mode tab bar — ALWAYS VISIBLE on mobile ──
   Brock: "confusing and hidden" — the FOR YOU/ALL/VIDEOS switcher used to
   live inside the feed card and scroll away with the hero on the first
   swipe. Benchmarked against ESPN/Apple News/YouTube: the segmented control
   should be reachable no matter how far down the feed you've scrolled.

   position:sticky was the first attempt and doesn't work here: this site
   ships `html,body { overflow-x: hidden }` (core.css, sitewide, presumably
   an iOS elastic-bounce guard). Per the CSS Overflow spec, when one axis is
   non-visible the OTHER axis's computed value gets force-promoted from
   visible to auto — so body's overflow-y computes to `auto` sitewide even
   though no rule sets it directly. That makes <body> (not <html>, which is
   the element that actually scrolls here) the nearest CSS "scroll
   container" ancestor for any sticky descendant, and since body itself
   never scrolls, every sticky child is a silent no-op. Confirmed this is
   NOT news-specific: the pre-existing `.sb-filterbar` sticky pattern used
   on /scores has the exact same bug (verified live). Fixing it at the root
   means loosening body's overflow-x sitewide, which risks reintroducing the
   iOS bounce it was guarding against — too big a blast radius for a
   navigation-IA fix on one route, so it's called out below as a follow-up
   rather than patched here.
   position:fixed sidesteps the whole problem (fixed positioning ignores
   scroll-container ancestry, only ancestor transform/filter/perspective
   breaks it, and .card.sn--c_feed's transform is already neutralized
   above). It's also the SAME technique the reel header already ships two
   blocks down — this just extends it to list mode. `top: 56px` starts the
   bar right below the existing mobile burger button's reserved 56px zone
   (.mob-nav-burger, core.css: top:12px + 44px tall) so the two never
   overlap; `.content`'s padding-top is bumped by the same amount so the
   hero doesn't render underneath the now out-of-flow bar.
   Desktop (>880px) is intentionally left in normal flow, not fixed —
   mirroring the reel header's own desktop behavior (comment below: "never
   position:fixed... the collision this branch fixes is a mobile
   fixed-overlay bug only"). A correct desktop-fixed version needs
   `left: var(--sidebar-w)` sidebar-offset math this task didn't need to
   take on; flagged as a judgment call in the handoff. */
@media (max-width: 880px) {
  html[data-route="/news"]:not(.nw-reel-mode) .nw-feed-tabs {
    position: fixed;
    top: 56px;
    left: 0;
    right: 0;
    z-index: 40;
    margin: 0;
    padding: 8px 16px;
    background: linear-gradient(180deg, rgba(5,5,5,.97) 0%, rgba(5,5,5,.90) 100%);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
  }
  html[data-route="/news"]:not(.nw-reel-mode) .content {
    padding-top: 124px; /* 56 (burger clearance, unchanged) + ~68 (this fixed bar) */
  }
}

/* Desktop: a big clip that owns the screen, one clean catch per scroll. */
@media (min-width: 881px) {
  /* Compact the header so the clip isn't pushed down by a big WATCH·THE REEL
     block + count line — keeps the FOR YOU/ALL/VIDEOS tabs + HYPE filter.
     Scoped to reel mode so the article tabs keep their normal header. */
  html.nw-reel-mode .card.sn--c_feed > .card-head { display: none; }
  html.nw-reel-mode .nw-meta { display: none; }
  html.nw-reel-mode .nw-feed-tabs { margin-bottom: 8px; }
  html.nw-reel-mode .card.sn--c_feed { padding-top: 10px; }
  /* Desktop reel header is in normal flow (never position:fixed — the
     collision this branch fixes is a mobile fixed-overlay bug only), so the
     FILTERS-collapse affordance below is scoped to the mobile/landscape-short
     query; here the preset+hide panel just stays visible the way it always
     has, no extra tap required. */
  html.nw-reel-mode .nw-reel-bar { display: flex; }

  .nw-reel-item {
    min-height: 94vh; min-height: 94dvh; padding: 0;
    scroll-snap-stop: always;   /* desktop: one wheel scroll = one clean catch */
  }
  /* Fill the content column: size by height up to the full available width so
     the video is as big as fits, centred, instead of a 1100px island. */
  .nw-reel-stage { width: min(100%, calc(88dvh * 16 / 9)); max-width: 1600px; }
}

/* Mobile (Sleeper/TikTok-style): every clip FILLS the whole screen — no
   letterbox, no dead space. The stage is the full viewport and the 16/9 source
   is cover-cropped to fill it; caption floats above the bottom tab bar. */
/* Phones: portrait OR landscape (a rotated phone is wide but short, so it escapes
   max-width:880 (the site's mobile-chrome breakpoint where the bottom tab bar
   shows — sidebar collapses + .sns-bottombar appears at <=880, so the reel must
   go full-bleed at the same width or a wide phone, e.g. an unfolded Fold, lands
   in a 721-880 dead zone with the base centered 16:9 box) — also catch it with
   the landscape+short-height query so the immersive reel still applies when you
   flip the phone). */
@media (max-width: 880px), (orientation: landscape) and (max-height: 540px) {
  html.nw-reel-mode { scroll-snap-type: y mandatory; } /* firm one-at-a-time on touch */
  /* Full-bleed breakout: the reel feed escapes the page's content + card padding
     to span the whole viewport width (no left/right dead bars). Scoped to reel
     mode so the card padding still frames the header above it; lift the card's
     overflow:hidden so the breakout isn't clipped back to the card box. */
  html.nw-reel-mode .card.sn--c_feed { overflow: visible; }
  /* The reel is its OWN fixed full-screen scroller (not the page). Scrolling an
     inner element doesn't hide/show the mobile URL bar, so the 100dvh clips no
     longer resize mid-scroll — that resize was what made them jump/jitter on
     fast scroll. overscroll-behavior:contain kills bounce-chaining. z-index sits
     under the chrome sidebar(70)/fab(86)/nav(90). */
  html.nw-reel-mode .nw-feed-grid.is-reel {
    position: fixed;
    /* pin to BOTH edges — NOT width:100vw. 100vw includes the scrollbar gutter,
       so a scroll/tap reflow nudged the reel right and exposed a few-px gap on
       the left. left+right:0 = exact viewport width, no gutter, no shift. */
    top: 0; left: 0; right: 0;
    height: 100dvh;
    margin: 0;
    overflow-y: scroll;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    scroll-snap-type: y mandatory;
    z-index: 1;
    scrollbar-width: none;
  }
  html.nw-reel-mode .nw-feed-grid.is-reel::-webkit-scrollbar { width: 0; height: 0; }
  /* Safe-box dimensions the fit math sizes against: the viewport MINUS the device
     notch / home-indicator insets. On a bar-less phone every inset is 0 → the box
     is the whole screen (true edge-to-edge); on a notched phone the clip is kept
     out of the system bars. Needs viewport-fit=cover (set in index.html). */
  html.nw-reel-mode {
    --sbw: calc(100vw - env(safe-area-inset-left) - env(safe-area-inset-right));
    --sbh: calc(100dvh - env(safe-area-inset-top) - env(safe-area-inset-bottom));
  }
  .nw-reel-item {
    min-height: 100%;
    height: 100%;
    padding: 0;
    scroll-snap-align: start;
    /* forces the scroller to STOP at every item regardless of fling velocity —
       without this, `scroll-snap-type: mandatory` alone lets a fast swipe fly
       past 2-3 clips before it decelerates enough to catch a snap point (Brock
       2026-07-10: "one swipe advances 2-3 videos"). This is the exact property
       TikTok/Shorts rely on for one-swipe-one-video. */
    scroll-snap-stop: always;
    position: relative;   /* context for the full-bleed blurred backdrop */
  }
  /* ── Full-bleed blurred backdrop: a heavily-blurred, dimmed copy of the poster
     fills the ENTIRE viewport — the notch + home-indicator bands and any
     letterbox/pillarbox gutter — so a contained clip never shows dead black bars
     and the screen still reads as full-bleed. Sits BEHIND the safe-area stage.
     (--poster is set per item in script.js.) ── */
  .nw-reel-item::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 0;
    background-image: var(--poster);
    background-size: cover;
    background-position: center;
    filter: blur(34px) brightness(.42) saturate(1.2);
    transform: scale(1.2);
    pointer-events: none;
  }
  .nw-reel-item.is-active::before { filter: blur(34px) brightness(.54) saturate(1.25); }
  /* ── The STAGE is the device SAFE BOX: inset by env(safe-area-inset-*) so the
     sharp clip AND our caption never fall under the notch or the home indicator.
     The clip fits INSIDE this box; the blurred backdrop fills behind it. On a
     bar-less phone the insets are 0, so the stage is the full screen. ── */
  .nw-reel-stage {
    position: absolute;
    top: env(safe-area-inset-top);
    right: env(safe-area-inset-right);
    bottom: env(safe-area-inset-bottom);
    left: env(safe-area-inset-left);
    width: auto;
    height: auto;
    max-width: none;
    aspect-ratio: auto;
    background: transparent;
    border-radius: 0;
    box-shadow: none;
    z-index: 1;
  }
  .nw-reel-item.is-active .nw-reel-stage { box-shadow: none; }
  .nw-reel-item.is-active .nw-reel-thumb { animation: none; }  /* no Ken-Burns crop on mobile */

  /* ── LANDSCAPE source (default) → moderate COVER zoom, framed on the action.
     The 2026-07-04 "contain, never crop" pass rendered the sharp video as a
     ~26%-of-screen-height strip (full width, natural 9/16-of-width tall) with
     huge dead top/bottom bars — Brock 2026-07-10: "take too much of the
     screen [is dead space]" / "isn't framed on the action" / "don't just
     center a wide video in a tall box showing sidelines". Fix: zoom the sharp
     video into a taller box via cover-crop, bounded so we DON'T repeat the
     old full-bleed-to-full-height crop that chopped ~74% of the width and cut
     off burned-in captions — --nw-reel-lz is the one knob (currently ~65% of
     the frame width stays visible, a much smaller crop than the old bug).
     The full-bleed blurred backdrop (.nw-reel-item::before) still fills the
     remaining top/bottom gutters, so the screen still reads as full-bleed. ── */
  .nw-reel-item:not(.is-vert) {
    /* target visible-box height. Was 0.86*sbw ≈ 335px on a 390-wide phone —
       only ~40% of the screen height, so the landscape clip rendered as a small
       letterboxed strip with ~60% dead blurred bands top+bottom (Brock
       2026-07-10: "videos take too much of the screen [in dead space] / not
       focused on the action"). Size off the SAFE-BOX HEIGHT so the clip fills a
       strong majority of the tall slide, capped by an implied side-crop bound
       (a 16:9 source cover-cropped into a portrait box loses width as it grows
       taller) — the cap keeps ≥~43% of the frame width visible so we DON'T
       repeat the old full-height crop that chopped the burned-in captions. At
       390×844 this resolves to ~506px ≈ 60% of screen height. */
    --nw-reel-lz: min(calc(var(--sbh) * 0.60), calc(var(--sbw) * 1.34));
  }
  .nw-reel-item:not(.is-vert) .nw-reel-thumb {
    /* !important on top/left/right/transform: the `inset:auto !important` reset
       above expands to top/right/bottom/left:auto !important, which otherwise
       DEFEATS a plain `top:50%` (important beats non-important regardless of
       order) — so the poster was top-anchored and translateY(-50%) yanked half
       of it above the viewport (thumb rect y≈-253 on a 390×844 phone) instead of
       centering. The iframe rule below already uses !important; match it so the
       poster the user sees BEFORE playback is centered too (no top-anchored jump
       to a centered video on play). */
    inset: auto !important;
    top: 50% !important;
    left: 0 !important;
    right: 0 !important;
    height: var(--nw-reel-lz);
    transform: translateY(-50%) !important;
    background-size: cover !important;
    background-position: center center;
    background-repeat: no-repeat;
    background-color: transparent;
  }
  .nw-reel-item:not(.is-vert) .nw-reel-stage iframe {
    inset: auto !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%);
    width: calc(var(--nw-reel-lz) * 16 / 9) !important;
    height: var(--nw-reel-lz) !important;
    min-width: 0 !important;
    min-height: 0 !important;
  }

  /* ── VERTICAL source (confirmed 9:16 Short) → COVER-fill the safe box,
     immersive/hype. YouTube pillarboxes the short inside its 16:9 embed (gray
     side bars); scale the 16:9 up until the central 9:16 strip fills the safe
     box and the gray bars crop off. Bounded to the SAFE box (not the raw
     viewport) so it never bleeds under the notch / home indicator. ── */
  .nw-reel-item.is-vert .nw-reel-thumb { background-size: cover !important; background-color: transparent; }
  .nw-reel-item.is-vert .nw-reel-stage iframe {
    inset: auto !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%);
    width: var(--sbw) !important;
    height: calc(var(--sbw) * 9 / 16) !important;
    min-height: var(--sbh) !important;                 /* fill the safe height … */
    min-width: calc(var(--sbh) * 16 / 9) !important;   /* …keep 16:9 → crop the gray bars */
  }

  /* Clean video: no in-video badges/buttons (Brock). Tap still mutes. */
  .nw-reel-sound,
  .nw-reel-open { display: none !important; }

  /* caption (1–2 lines) sits inside the safe stage, lifted above the chrome.js
     bottom tab bar. The stage is already inset by env(safe-area-inset-bottom),
     so this offset is measured from the safe edge — no extra inset needed. For a
     LETTERBOXED landscape clip the video is centred + short, so the caption lands
     in the bottom blur band BELOW the picture (never over its burned-in text). */
  .nw-reel-meta { left: 16px; right: 16px; bottom: 78px; }
  .nw-reel-grad { height: 52%; }
  .nw-reel-bar { gap: 10px 12px; padding: 4px 12px 12px; }
  .nw-reel-preset { padding: 8px 14px; font-size: 13px; }
  .nw-reel-title { font-size: clamp(18px, 5vw, 23px); }

  /* 100%-video on first paint: float the controls OVER the top of the reel so
     even the first screen is pure video, no header band. The big WATCH·THE REEL
     block + count are dropped; tabs + HYPE/HIDE filter become a translucent
     top overlay. Scoped to reel mode → FOR YOU / ALL article tabs keep their
     normal in-flow header. */
  html.nw-reel-mode .card.sn--c_feed > .card-head { display: none; }
  html.nw-reel-mode .nw-meta { display: none; }
  html.nw-reel-mode .nw-feed-tab-hint { display: none; }
  /* guests: the chrome.js sign-in FAB (bottom-left) overlaps the reel caption
     (.nw-reel-meta) → hide it in reel mode (mirrors the landscape rule below) */
  html.nw-reel-mode .sns-signin-fab { display: none !important; }
  /* zero the top offsets so the first clip starts at the very top of the viewport */
  html.nw-reel-mode .content { padding-top: 0; }
  html.nw-reel-mode .row-nw-feed { margin-top: 0; }
  html.nw-reel-mode .card.sn--c_feed { padding-top: 0; }
  /* ── reel-declutter: ONE fixed header band ──
     .nw-feed-tabs is now the single position:fixed, opaque-backed, owned-
     stacking-context element for the whole top overlay — CLEAN, the tabs,
     and FILTERS are real flex children of it (see index.html), so they can
     never land in a different coordinate frame from each other (the old bug:
     the clean-toggle was `document.body.appendChild`'d and the tabs/bar were
     fixed-but-nested-in-.card, coordinated only by a hardcoded 88px padding
     guess — a sitewide hover-lift transform on the card ancestor silently
     broke that coordination, see the ROOT FIX comment above .nw-reel-bar).
     The FILTERS panel (.nw-reel-bar) is a second fixed band directly BELOW
     it, shown only on tap (.is-open) — collapsing what used to be a second,
     always-on, gradient-fading row into one on-demand sheet with its own
     fully opaque backing (TikTok/Shorts: chrome recedes, one row by default). */
  html.nw-reel-mode .nw-feed-tabs {
    position: fixed;
    top: 0; left: 0; right: 0;
    isolation: isolate;      /* owned stacking context — nothing from the
                                 video/iframe layers beneath can slot between
                                 this band and its own children */
    z-index: 40;             /* over the video, under the chrome nav (z90) */
    margin: 0;
    border: 0;
    padding: calc(env(safe-area-inset-top) + 8px) 10px 4px;
    background: #0a0a0d;     /* fully opaque — was rgba(...,.78); a
                                 translucent scrim over autoplaying video with
                                 its own burned-in captions is exactly how
                                 Brock's "text bleeding through the tab row"
                                 read on screen */
  }
  html.nw-reel-mode .nw-feed-tab-group { gap: 2px; }
  /* news-nav-ia: the compact reel header still needs a 44px tap target even
     though the pill reads small (font stays 12px) — CLEAN/FILTERS beside it
     already carry min-height:44px; the tabs were the one gap (was ~26px).
     Padding stays tight (not the list-mode 16px) — CLEAN + 3 tabs + FILTERS
     share one narrow phone-width row; the list-mode padding wrapped "FOR
     YOU" onto two lines here. white-space:nowrap (base rule) + this tighter
     padding keeps every pill one line at 390-412px. */
  html.nw-reel-mode .nw-feed-tab { font-size: 12px; padding: 0 7px; min-height: 44px; }
  /* FILTERS panel — fixed directly under the header band, own opaque backing,
     hidden unless .is-open (tapped open from the FILTERS button). */
  html.nw-reel-mode .nw-reel-bar {
    position: fixed;
    top: calc(env(safe-area-inset-top) + 46px);
    left: 0; right: 0;
    isolation: isolate;
    z-index: 39;             /* just under the header band it hangs from */
    margin: 0;
    border: 0;
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    gap: 8px;
    background: #0a0a0d;     /* fully opaque, matches the header band */
    padding: 10px 12px 14px;
  }
  html.nw-reel-mode .nw-reel-bar::-webkit-scrollbar { width: 0; height: 0; }
  html.nw-reel-mode .nw-reel-presets,
  html.nw-reel-mode .nw-reel-hides { flex-wrap: nowrap; flex: none; }
  html.nw-reel-mode .nw-reel-preset,
  html.nw-reel-mode .nw-reel-hide { flex: none; }
  html.nw-reel-mode .nw-reel-preset { padding: 6px 12px; font-size: 12px; }
  html.nw-reel-mode .nw-reel-hide { padding: 5px 10px; font-size: 12px; }
  html.nw-reel-mode .nw-reel-hides-label { display: none; }
  /* push the in-video pill + sound chip below the floating header so they
     don't collide */
  html.nw-reel-mode .nw-reel-sound,
  html.nw-reel-mode .nw-reel-pill { top: calc(env(safe-area-inset-top) + 46px); }

  /* CLEAN + FILTERS: compact icon/label buttons, flex children of the header
     band (not independently positioned). Hidden outside reel mode. */
  html.nw-reel-mode .nw-reel-clean-toggle,
  html.nw-reel-mode .nw-reel-filter-toggle {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 44px; /* review polish: mobile tap-target floor (active a11y program) */
    padding: 6px 10px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, .08);
    color: #fff;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    flex: none;
  }
  html.nw-reel-mode .nw-reel-filter-toggle {
    font-family: var(--f-mono, "JetBrains Mono", ui-monospace, monospace);
    font-size: 11px; font-weight: 800; letter-spacing: .1em; color: #fff;
    position: relative;
    margin-left: auto;   /* pins FILTERS to the right; CLEAN + tabs stay grouped left */
  }
  /* quiet active state — matches the .nw-chip.is-active convention elsewhere
     in this file (soft red-tinted fill + a muted red edge, no glow bloom) so
     FILTERS-open reads as "one accent," consistent with the rest of the page */
  html.nw-reel-mode .nw-reel-filter-toggle[aria-expanded="true"] {
    background: rgba(255, 26, 26, .12);
    border: 1px solid rgba(255, 45, 45, .55);
    padding: 5px 9px;   /* -1px to offset the new border, same outer size */
  }
  .nw-reel-filter-dot {
    width: 6px; height: 6px; border-radius: 50%; background: #FF1A1A; flex: none;
  }
}

/* ── Rotate to LANDSCAPE on a phone → just works, no button. A LANDSCAPE clip
   letterboxes to fill the wide screen (contain — the shared mobile rule already
   does this, whole frame + captions preserved); a VERTICAL Short pillarboxes at
   its natural 9:16, centred, with the blurred backdrop filling the wide sides.
   Everything sits inside the device safe box (side notch + home indicator). ── */
@media (orientation: landscape) and (max-height: 540px) {
  /* Landscape source → CONTAIN, overriding the portrait-tuned zoom-crop from
     the shared mobile rule above. That crop math (--nw-reel-lz, sized off
     --sbw) assumes a PORTRAIT safe box; in a rotated/landscape safe box
     --sbw is the LONG edge, so the same formula would wildly over-zoom. A
     16:9 clip in a landscape viewport already nearly fills it with a plain
     contain-fit, so just go back to the natural whole-frame fit here. Only
     VERTICAL needs an override: a 9:16 short must PILLARBOX on a wide
     screen, not cover-crop its top/bottom. */
  .nw-reel-item:not(.is-vert) .nw-reel-thumb {
    inset: 0 !important;
    top: 0; left: 0; right: 0;
    height: 100%;
    transform: none;
    background-size: contain !important;
    background-repeat: no-repeat;
    background-color: transparent;
  }
  .nw-reel-item:not(.is-vert) .nw-reel-stage iframe {
    inset: auto !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%);
    width: min(var(--sbw), calc(var(--sbh) * 16 / 9)) !important;
    height: min(var(--sbh), calc(var(--sbw) * 9 / 16)) !important;
    min-width: 0 !important;
    min-height: 0 !important;
  }
  .nw-reel-item.is-vert .nw-reel-thumb {
    background-size: contain !important;
    background-color: transparent;
  }
  .nw-reel-item.is-vert .nw-reel-stage iframe {
    inset: auto !important;
    top: 50% !important; left: 50% !important;
    transform: translate(-50%, -50%);
    height: var(--sbh) !important;
    width: calc(var(--sbh) * 9 / 16) !important;   /* 9:16 of the safe height */
    min-width: 0 !important; min-height: 0 !important;
    max-width: var(--sbw) !important;
  }
  .nw-reel-meta { left: 16px; right: 16px; bottom: 10px; }

  /* Landscape = pure full-screen video: hide ALL our chrome (the chrome.js bottom
     tab bar + sign-in FAB, the top header band — tabs/CLEAN/FILTERS travel
     together as its children now — filter panel, caption). Rotate back to
     portrait to get the buttons back. (The browser's own top/bottom bars are
     outside our control on iOS web; reelGoFullscreen() drops them on Android.) */
  html.nw-reel-mode .sns-bottombar,
  html.nw-reel-mode .sns-signin-fab,
  html.nw-reel-mode .nw-feed-tabs,
  html.nw-reel-mode .nw-reel-bar,
  html.nw-reel-mode .nw-reel-meta,
  html.nw-reel-mode .nw-reel-grad { display: none !important; }
}

/* ── CLEAN toggle base (always in markup, gated to phones-in-reel by the
   media query below; see .nw-reel-clean-toggle flex-child styling inside
   the mobile @media block above) — reel-declutter renamed the label from
   "HIDE" to "CLEAN" (was reusing the same word as the filter panel's HIDE
   bucket-toggles, one of the "stacked text" tells Brock was reading). Tap
   again to bring everything back. FILTERS shares the base hidden state. ── */
.nw-reel-clean-toggle,
.nw-reel-filter-toggle { display: none; }
.nw-reel-clean-label {
  font-family: var(--f-mono, "JetBrains Mono", ui-monospace, monospace);
  font-size: 12px; font-weight: 800; letter-spacing: .16em; color: #fff;
  opacity: .9; max-width: 60px; overflow: hidden; white-space: nowrap;
  transition: opacity .35s ease, max-width .35s ease, transform .35s ease;
}
.nw-reel-clean-dot {
  width: 7px; height: 7px; border-radius: 50%; background: #FF1A1A; flex: none;
}
/* clean ON: caption fades toward the corner; the tab row + filter panel fade
   out entirely EXCEPT the CLEAN toggle itself, which must stay reachable to
   turn clean mode back off — it is intentionally excluded from this rule. */
html.nw-reel-clean .nw-reel-meta,
html.nw-reel-clean .nw-reel-grad {
  opacity: 0; transform: translate(-14px, -10px) scale(.95); pointer-events: none;
  transition: opacity .4s ease, transform .4s ease;
}
html.nw-reel-clean .nw-feed-tab-group,
html.nw-reel-clean .nw-reel-filter-toggle,
html.nw-reel-clean .nw-reel-bar {
  opacity: 0; transform: translate(-30vw, -14px) scale(.7); pointer-events: none;
  transition: opacity .45s ease, transform .45s ease;
}
/* the header band's own opaque backing goes transparent too — clean mode
   means nothing but video + the one small CLEAN pill */
html.nw-reel-clean .nw-feed-tabs {
  background: transparent;
  transition: background .4s ease;
}
/* keep the label readable in clean mode (now reads "SHOW") so it's always obvious
   the tab brings everything back; own backing since the header band's is gone */
html.nw-reel-clean .nw-reel-clean-toggle {
  background: rgba(0, 0, 0, .5);
  backdrop-filter: blur(7px);
  -webkit-backdrop-filter: blur(7px);
}
html.nw-reel-clean .nw-reel-clean-dot { animation: nw-clean-pulse 1.5s ease-out 2; }
@keyframes nw-clean-pulse {
  0%   { box-shadow: 0 0 0 0 rgba(255, 26, 26, .6); }
  100% { box-shadow: 0 0 0 13px rgba(255, 26, 26, 0); }
}

@media (prefers-reduced-motion: reduce) {
  html.nw-reel-mode { scroll-snap-type: none; }
  .nw-reel-item.is-active .nw-reel-thumb { animation: none; }
  html.nw-reel-clean .nw-reel-dot,
  html.nw-reel-clean .nw-reel-clean-dot { animation: none; }
  .nw-reel-stage,
  .nw-reel-open,
  .nw-reel-preset { transition: none; }
}

/* ── Deep-link highlight: /news?story=<id> from the dashboard ──
   Briefly ring + lift the targeted story so the user sees where they landed.
   scroll-margin keeps the card clear of the fixed chrome on scrollIntoView.
   news-nav-ia: mobile's list-mode tab bar is now position:fixed and reserves
   124px at the top (see the @media(max-width:880px) block above) — taller
   than this 96px margin, which would land a deep-linked card partly hidden
   behind the bar. Bump mobile to clear it; desktop is untouched (tabs stay
   in normal flow there, no fixed chrome to clear). */
.nw-card { scroll-margin-top: 96px; scroll-margin-bottom: 24px; }
@media (max-width: 880px) {
  html[data-route="/news"]:not(.nw-reel-mode) .nw-card { scroll-margin-top: 136px; }
}
.nw-card--deeplink {
  outline: 2px solid var(--accent, #e8503a);
  outline-offset: 3px;
  border-radius: 14px;
  animation: nw-deeplink-pulse 2.6s ease-out 1;
}
@keyframes nw-deeplink-pulse {
  0%   { box-shadow: 0 0 0 0 rgba(232, 80, 58, 0.55); }
  60%  { box-shadow: 0 0 0 10px rgba(232, 80, 58, 0); }
  100% { box-shadow: 0 0 0 0 rgba(232, 80, 58, 0); }
}
@media (prefers-reduced-motion: reduce) {
  .nw-card--deeplink { animation: none; }
}

/* ════════════════════════════════════════════════════════════════════════
   NEWS ELEGANCE REDESIGN — art leads, containers separate, buttons recede
   ------------------------------------------------------------------------
   Matches the Brock-approved /leagues treatment (leagues.css .lhub-league-card)
   and DESIGN-ELEVATION-SPEC §5 (/news row). Unlayered + loads last, so these
   win over route.css (@layer components) and the index.html critical <style>
   without !important. Reel gesture/scroll-snap/fit logic is UNTOUCHED — this
   only restyles resting chrome + the article-feed cards (.nw-card never renders
   inside the reel; the reel uses .nw-reel-* items).
   ════════════════════════════════════════════════════════════════════════ */

/* ── 1. Container separation: retire the sitewide red-glow .card halo on the
   two news section containers; give them a calm neutral raised surface so they
   sit ON the #050505 page instead of dissolving into it (Gestalt common
   region). The hero body + feed panel become surface-1. ── */
html[data-route="/news"] .card.sn--c_hero,
html[data-route="/news"] .card.sn--c_feed {
  background: var(--sns-grad-card, linear-gradient(180deg, #141418 0%, #0E0E12 100%));
  border: 1px solid rgba(255, 255, 255, .07);
  box-shadow: 0 1px 2px rgba(0, 0, 0, .5), 0 8px 28px rgba(0, 0, 0, .4);
}

/* ── 2. Story cards → distinct RAISED containers (surface-2), art + headline
   leading. Lighter top edge than the surface-1 feed panel they nest in, a
   hairline edge + a NEUTRAL seat-shadow (no red at rest). Red appears only on
   hover — the interaction, not the resting state. ── */
html[data-route="/news"] .nw-card {
  background: linear-gradient(180deg, #17171C 0%, #101016 100%);
  border: 1px solid rgba(255, 255, 255, .09);
  border-radius: 12px;
  box-shadow: var(--sns-shadow-card, 0 1px 2px rgba(0, 0, 0, .55), 0 6px 20px rgba(0, 0, 0, .35));
  padding: 0 0 14px;
  gap: 10px;
  overflow: hidden;
  transition: transform .18s var(--sns-ease-soft, ease),
              box-shadow .18s var(--sns-ease-soft, ease),
              border-color .18s var(--sns-ease-soft, ease);
}
html[data-route="/news"] .nw-card:hover,
html[data-route="/news"] .nw-card:focus-visible {
  transform: translateY(-3px);
  border-color: rgba(255, 26, 26, .4);
  box-shadow: var(--sns-glow-2, 0 0 16px rgba(255, 26, 26, .34), 0 4px 14px rgba(0, 0, 0, .45));
}

/* ── 3. Reorder (CSS only, no JS/DOM change): the IMAGERY and HEADLINE lead;
   the source name + time drop below as muted meta. .nw-card is a flex column,
   so `order` re-sequences the children buildCard() emits (source-row, media,
   title, excerpt, chips) into: media → headline → excerpt → source·time →
   tags. Media is full-bleed to the rounded top; text gets consistent inset. ── */
html[data-route="/news"] .nw-card-media-wrap {
  order: -2;
  margin: 0 0 12px;
  border-radius: 0;   /* full-bleed; the card's overflow:hidden rounds the top corners */
}
html[data-route="/news"] .nw-card-title      { order: -1; padding: 0 14px; }
html[data-route="/news"] .nw-card-excerpt    { order:  0; padding: 0 14px; }
html[data-route="/news"] .nw-card-source-row { order:  1; padding: 0 14px; margin: 2px 0 0; }
html[data-route="/news"] .nw-card-footer-chips { order: 2; padding: 0 14px; }

/* Headline = the ONE dominant line. Keeps the display face route.css already
   gives it (spec-compliant per DESIGN-ELEVATION-SPEC §3 card-title row); we only
   firm up the weight/leading + full white so it out-weighs the muted excerpt and
   meta and clearly wins the card's first fixation. */
html[data-route="/news"] .nw-card-title {
  font-size: 15px;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: .01em;
  color: var(--white-bright, #F5F5F5);
}
html[data-route="/news"] .nw-card-excerpt {
  font-size: 13px;
  line-height: 1.5;
  color: var(--text-faint, #9CA0A8);
}
/* Source · time = quiet meta (was a bright 700/#C0C0C0 row above the image). */
html[data-route="/news"] .nw-card-source-name { font-weight: 600; color: #8A8A8A; }
html[data-route="/news"] .nw-card-source-time { color: #6A6A6A; }

/* ── 4. 8pt rhythm: a touch more air between cards + between the tab/chip rail
   and the grid, so the feed reads calm and scannable. ── */
html[data-route="/news"] .nw-feed-grid { gap: 16px; padding-top: 8px; }
html[data-route="/news"] .nw-filters   { margin-bottom: 4px; }

@media (max-width: 720px) {
  html[data-route="/news"] .nw-feed-grid { gap: 12px; }
}
