/* =====================================================================
   BlaskAttacks front page: "the desk" (Oct 2026)

   Loaded only on the front page, with the template in blask-front.php.
   Mobile first:
     phone    one column. The player leads only while the stream is live.
     tablet   hero band, then posts beside a pinned stream column.
     desktop  one screen. The hero never leaves; only the two rails scroll,
              and the footer is a thin bar that opens when you reach for it.
   Palette, type and the storm photo are the Sept 2026 design pass's.
   ===================================================================== */

body.bx-front {
  --bg: #121110;
  --panel: rgba(17, 16, 15, .74);
  --panel-solid: rgba(19, 18, 17, .97);
  --line: rgba(255, 255, 255, .085);
  --line-2: rgba(255, 255, 255, .17);
  --text: #ededed;
  --text-2: #c2beb8;
  --muted: #9d9893;
  --ember: #ff5c33;
  --ember-hi: #ff7a57;
  --ink: #161311;
  --live: #ff2a36;
  --twitch: #bf94ff;
  --r: 8px;
  --ease: cubic-bezier(.16, 1, .3, 1);
  --f-d: 'Onest', system-ui, sans-serif;
  --f-b: 'Inter', system-ui, sans-serif;
  --hdr: 56px;
  --ftr: 42px;
  --gap: 12px;
  --adminbar: 0px;

  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 16px/1.55 var(--f-b);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  scrollbar-color: rgba(255, 255, 255, .22) transparent;
}
body.admin-bar.bx-front { --adminbar: 46px; }
@media (min-width: 783px) { body.admin-bar.bx-front { --adminbar: 32px; } }

/* Resets carry zero specificity so every component rule below wins. */
:where(.bx), :where(.bx) *, :where(.bx) *::before, :where(.bx) *::after { box-sizing: border-box; }
:where(.bx) :where(h1, h2, h3, p, ol, ul, li, figure) { margin: 0; padding: 0; }
:where(.bx) :where(ol, ul) { list-style: none; }
:where(.bx) :where(a) { color: inherit; text-decoration: none; }
:where(.bx) :where(img) { display: block; max-width: 100%; height: auto; }
:where(.bx) :where(button) { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
:where(.bx) :where(svg) { display: block; flex: none; }
.bx ::selection { background: rgba(255, 92, 51, .38); color: #fff; }
.bx :focus { outline: none; }
.bx :focus-visible { outline: 2px solid var(--ember); outline-offset: 2px; border-radius: 4px; }
.bx-sr { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.bx-skip {
  position: fixed; left: 12px; top: calc(var(--adminbar) + 8px); z-index: 100;
  padding: 10px 14px; border-radius: 6px; background: var(--ember); color: var(--ink) !important;
  font: 700 .85rem/1 var(--f-d); transform: translateY(calc(-100% - 40px)); transition: transform .25s var(--ease);
}
.bx-skip:focus { transform: none; }

.bx ::-webkit-scrollbar { width: 8px; height: 8px; }
.bx ::-webkit-scrollbar-track { background: transparent; }
.bx ::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, .16); border-radius: 8px; border: 2px solid transparent; background-clip: padding-box; }
.bx ::-webkit-scrollbar-thumb:hover { background-color: rgba(255, 92, 51, .7); }

/* The stream status bar plugin says the same thing the player does, and
   pads the body to make room for itself. The theme still prints its
   off-canvas menu through wp_body_open; the desk has its own. */
body.bx-front .cp-sw-status-bar,
body.bx-front > .side-nav,
body.bx-front > .side-nav-overlay,
body.bx-front > #inspiro-back-to-top { display: none !important; }
body.bx-front { padding: 0 !important; }

/* ---------- Frame (phone first) ---------------------------------------- */
.bx {
  position: relative;
  isolation: isolate;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  --o-player: 4;
}
.bx[data-live="live"] { --o-player: 2; }

.bx-backdrop {
  position: absolute; inset: 0 0 auto; z-index: -1;
  height: min(80svh, 680px);
  overflow: hidden; pointer-events: none;
  background: #0b0b0b;
}
.bx-backdrop img { width: 100%; height: 100%; max-width: none; object-fit: cover; object-position: 50% 30%; }
.bx-backdrop::after {
  content: ""; position: absolute; inset: 0;
  background:
    radial-gradient(120% 90% at 50% 38%, transparent 0%, rgba(0, 0, 0, .42) 72%),
    linear-gradient(to bottom, rgba(8, 8, 8, .6) 0%, rgba(8, 8, 8, 0) 20%, rgba(18, 17, 16, 0) 52%, var(--bg) 100%);
}
.bx-flash {
  position: absolute; inset: 0; z-index: 1; opacity: 0;
  background: radial-gradient(60% 50% at 68% 28%, rgba(220, 205, 255, .55), rgba(160, 140, 255, .12) 45%, transparent 70%);
  mix-blend-mode: screen;
}
.bx-flash.is-striking { animation: bx-strike .9s linear; }
@keyframes bx-strike {
  0% { opacity: 0; } 6% { opacity: .9; } 16% { opacity: .15; } 22% { opacity: .65; } 100% { opacity: 0; }
}

/* ---------- Header ------------------------------------------------------ */
.bx-hdr {
  order: 0;
  position: sticky; top: var(--adminbar); z-index: 40;
  height: var(--hdr);
  display: flex; align-items: center; gap: 8px;
  padding: 0 12px 0 16px;
  transition: background-color .3s var(--ease), border-color .3s;
  border-bottom: 1px solid transparent;
}
.bx.is-stuck .bx-hdr, .bx.is-menu-open .bx-hdr {
  background: var(--panel-solid);
  border-bottom-color: var(--line);
}
.bx-logo { margin-right: auto; display: flex; align-items: center; height: 100%; }
.bx-logo img { width: auto; height: 26px; }
.bx-logo-text { font: 800 1.25rem/1 var(--f-d); letter-spacing: -.02em; color: #fff; }

.bx-nav {
  position: fixed; left: 0; right: 0; top: calc(var(--adminbar) + var(--hdr)); z-index: 39;
  max-height: calc(100svh - var(--hdr) - var(--adminbar)); overflow-y: auto;
  background: var(--panel-solid);
  border-bottom: 1px solid var(--line);
  padding: 8px 12px 16px;
  clip-path: inset(0 0 100% 0);
  visibility: hidden;
  transition: clip-path .45s var(--ease), visibility 0s linear .45s;
}
.bx.is-menu-open .bx-nav { clip-path: inset(0 0 0 0); visibility: visible; transition-delay: 0s; }
.bx-nav ul { display: grid; }
.bx-nav a {
  position: relative; display: flex; align-items: center; gap: 8px;
  min-height: 48px; padding: 0 12px;
  font: 600 1.05rem/1.2 var(--f-d); color: #e4e4e4;
  border-radius: 6px;
  transition: background-color .2s, color .2s;
}
.bx-nav a:hover { background: rgba(255, 255, 255, .06); color: #fff; }
.bx-nav a[aria-current="page"] { color: #fff; }
.bx-nav a[aria-current="page"]::before {
  content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--ember); margin-left: -2px;
}
.bx-nav .bx-ext { width: 12px; height: 12px; opacity: .45; transition: transform .25s var(--ease), opacity .2s; }
.bx-nav a:hover .bx-ext { opacity: .9; transform: translate(1px, -1px); }

.bx-tools { display: flex; align-items: center; gap: 4px; }
.bx-iconbtn {
  display: grid; place-items: center;
  width: 44px; height: 44px; border-radius: 6px;
  color: #e4e4e4;
  transition: background-color .2s, color .2s;
}
.bx-iconbtn:hover { background: rgba(255, 255, 255, .07); color: #fff; }
.bx-iconbtn svg { width: 20px; height: 20px; }
.bx-menubtn .bx-i-close { display: none; }
.bx.is-menu-open .bx-menubtn .bx-i-close { display: block; }
.bx.is-menu-open .bx-menubtn .bx-i-menu { display: none; }

.bx-search { display: flex; align-items: center; margin-bottom: 6px; border: 1px solid var(--line-2); border-radius: 6px; background: rgba(0, 0, 0, .25); }
.bx-search input {
  flex: 1; min-width: 0; height: 44px; padding: 0 12px;
  background: none; border: 0; color: #fff; font: 500 .95rem/1 var(--f-b);
  caret-color: var(--ember);
}
.bx-search input::placeholder { color: var(--muted); }
.bx-search input::-webkit-search-cancel-button { filter: invert(1) opacity(.5); }
.bx-search .bx-iconbtn { width: 40px; height: 40px; }
.bx-hdr > .bx-search { display: none; }

.bx-livebtn {
  display: inline-flex; align-items: center; gap: 8px;
  height: 36px; padding: 0 12px;
  border: 1px solid var(--line-2); border-radius: 6px;
  font: 700 .78rem/1 var(--f-d); letter-spacing: .1em; text-transform: uppercase; color: #ececec;
  transition: border-color .25s, background-color .25s, color .25s;
}
.bx-livebtn svg { width: 15px; height: 15px; color: var(--twitch); }
.bx-livebtn:hover { border-color: rgba(191, 148, 255, .6); background: rgba(191, 148, 255, .08); color: #fff; }
.bx-livebtn .bx-dot { display: none; }
.bx-livebtn .bx-on { display: none; }
.bx[data-live="live"] .bx-livebtn { border-color: rgba(255, 42, 54, .55); background: rgba(255, 42, 54, .12); }
.bx[data-live="live"] .bx-livebtn svg { display: none; }
.bx[data-live="live"] .bx-livebtn .bx-dot { display: block; }
.bx[data-live="live"] .bx-livebtn .bx-on { display: inline; }
.bx[data-live="live"] .bx-livebtn .bx-off { display: none; }

.bx-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--live); position: relative; }
.bx-dot::after {
  content: ""; position: absolute; inset: -4px; border-radius: 50%;
  border: 2px solid var(--live); opacity: 0;
  animation: bx-pulse 1.8s var(--ease) infinite;
}
@keyframes bx-pulse { 0% { transform: scale(.4); opacity: .9; } 100% { transform: scale(1.5); opacity: 0; } }

/* ---------- Stage: the hero ------------------------------------------- */
.bx-stage {
  order: 1;
  container-type: inline-size;
  min-height: calc(min(80svh, 680px) - var(--hdr));
  display: flex; flex-direction: column; align-items: center;
  padding: 24px 16px 20px;
  text-align: center;
}
.bx-stage-inner { margin-block: auto; display: flex; flex-direction: column; align-items: center; }
.bx-title {
  font: 800 clamp(3rem, 15.5cqi, 7rem)/.95 var(--f-d);
  letter-spacing: -.035em; color: #fff;
  text-shadow: 0 6px 40px rgba(0, 0, 0, .55);
}
.bx-tag {
  display: flex; align-items: center; justify-content: center; gap: .9em;
  margin-top: 1rem;
  font: 600 clamp(.72rem, .66rem + .3vw, .92rem)/1.3 var(--f-d);
  letter-spacing: .3em; text-transform: uppercase; color: var(--ember);
}
.bx-tag::before, .bx-tag::after { content: ""; width: 2.2em; height: 1px; background: currentColor; opacity: .55; }
.bx-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 1.8rem; }

.bx-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .6em;
  min-height: 46px; padding: 0 1.25em;
  border-radius: 6px;
  font: 700 .86rem/1.1 var(--f-d); letter-spacing: .07em; text-transform: uppercase;
  transition: transform .25s var(--ease), background-color .2s, border-color .2s, box-shadow .25s var(--ease);
}
.bx-btn svg { width: 16px; height: 16px; }
.bx-btn:active { transform: translateY(0) scale(.98); }
.bx-btn--primary { background: var(--ember); color: var(--ink); box-shadow: 0 10px 22px -12px rgba(0, 0, 0, .8); }
.bx-btn--primary:hover { background: var(--ember-hi); transform: translateY(-2px); box-shadow: 0 16px 28px -14px rgba(0, 0, 0, .9); }
.bx-btn--ghost {
  color: #fff; border: 1px solid rgba(255, 255, 255, .45);
  background: rgba(0, 0, 0, .28);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
}
.bx-btn--ghost:hover { border-color: #fff; transform: translateY(-2px); }
.bx-btn--ghost svg { transition: transform .25s var(--ease); }
.bx-btn--ghost:hover svg { transform: translateX(3px); }

/* the Secret Societies door, in that section's own colours */
.bx-feature {
  display: grid; grid-template-columns: minmax(0, 1fr); align-items: center; gap: 6px 16px;
  width: 100%; max-width: 620px; margin-top: 28px;
  padding: 14px 16px;
  background: rgba(21, 17, 13, .88);
  border: 1px solid #3a2f24; border-radius: var(--r);
  text-align: left;
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  transition: border-color .25s, transform .3s var(--ease), box-shadow .3s var(--ease);
}
.bx-feature:hover { border-color: #6b3a2a; transform: translateY(-2px); box-shadow: 0 16px 30px -18px rgba(0, 0, 0, .9); }
.bx-feature-head { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 12px; }
.bx-feature-label { font: 600 .72rem/1 var(--f-b); letter-spacing: .18em; text-transform: uppercase; color: #ff2d3c; }
.bx-feature-title { font: 700 1.15rem/1.15 var(--f-d); color: #ebe2d0; }
.bx-feature-text { grid-column: 1; font: 400 .88rem/1.45 Georgia, 'Source Serif 4', serif; color: #b4a48c; }
.bx-feature-go {
  display: flex; align-items: center; gap: 6px; margin-top: 2px;
  font: 600 .82rem/1 var(--f-d); color: #e8b65c; white-space: nowrap;
}
.bx-feature-go svg { width: 16px; height: 16px; transition: transform .25s var(--ease); }
.bx-feature:hover .bx-feature-go svg { transform: translateX(3px); }

/* ---------- Rails: shared ---------------------------------------------- */
.bx-rail { display: flex; flex-direction: column; min-width: 0; }
.bx-rail-head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 18px 16px 12px;
}
.bx-rail-head h2 { font: 700 1.1rem/1.2 var(--f-d); color: #fff; letter-spacing: -.01em; text-wrap: balance; }
.bx-rail-head h2 a { transition: color .2s; }
.bx-rail-head h2 a:hover { color: var(--ember-hi); }
.bx-headlink {
  display: inline-flex; align-items: center; gap: 4px; flex: none;
  min-height: 32px; padding: 0 6px; margin-right: -6px; border-radius: 4px;
  font: 600 .78rem/1 var(--f-d); color: var(--muted);
  transition: color .2s;
}
.bx-headlink svg { width: 13px; height: 13px; transition: transform .25s var(--ease); }
.bx-headlink:hover { color: #fff; }
.bx-headlink:hover svg { transform: translate(1px, -1px); }
.bx-sub {
  font: 600 .7rem/1 var(--f-b); letter-spacing: .14em; text-transform: uppercase; color: var(--muted);
  margin: 0 0 10px;
}

/* ---------- Posts rail -------------------------------------------------- */
.bx-posts { order: 3; padding-bottom: 8px; }
.bx-postlist { border-top: 1px solid var(--line); }
.bx-post { border-bottom: 1px solid var(--line); }
.bx-post a {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 14px; row-gap: 4px;
  padding: 14px 16px;
  transition: background-color .2s;
}
.bx-post-media {
  grid-column: 2; grid-row: 1 / span 3; align-self: start;
  width: 84px; aspect-ratio: 4 / 3; overflow: hidden; border-radius: 4px; background: #1c1b1a;
}
.bx-post-media img { width: 100%; height: 100%; max-width: none; object-fit: cover; transition: transform .6s var(--ease); }
.bx-post time {
  grid-column: 1;
  font: 500 .7rem/1.3 var(--f-b); letter-spacing: .09em; text-transform: uppercase;
  color: var(--muted); font-variant-numeric: tabular-nums;
}
.bx-post h3 {
  grid-column: 1;
  font: 650 1.02rem/1.3 var(--f-d); letter-spacing: -.01em; color: #fff;
  text-wrap: balance; transition: color .2s;
}
.bx-post p {
  grid-column: 1;
  font-size: .86rem; line-height: 1.5; color: var(--text-2);
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden;
}
.bx-post a:hover { background: rgba(255, 255, 255, .035); }
.bx-post a:hover h3 { color: var(--ember-hi); }
.bx-post a:hover .bx-post-media img { transform: scale(1.06); }
.bx-post a:focus-visible { outline-offset: -2px; }

.bx-post.is-lead a { grid-template-columns: minmax(0, 1fr); padding-top: 16px; }
.bx-post.is-lead .bx-post-media {
  grid-column: 1; grid-row: auto; width: 100%; aspect-ratio: 16 / 9; margin-bottom: 8px; border-radius: 6px;
}
.bx-post.is-lead h3 { font-size: 1.3rem; line-height: 1.2; }
.bx-post.is-lead p { -webkit-line-clamp: 3; }
/* a phone gets the newest six; "All posts" is right under them */
@media (max-width: 699px) { .bx-post:nth-child(n + 7) { display: none; } }

.bx-more {
  display: flex; align-items: center; justify-content: space-between;
  min-height: 52px; padding: 0 16px;
  font: 700 .8rem/1 var(--f-d); letter-spacing: .08em; text-transform: uppercase; color: var(--ember);
  transition: color .2s, background-color .2s;
}
.bx-more svg { width: 18px; height: 18px; transition: transform .25s var(--ease); }
.bx-more:hover { color: var(--ember-hi); background: rgba(255, 92, 51, .06); }
.bx-more:hover svg { transform: translateX(4px); }

/* ---------- Stream rail ------------------------------------------------- */
/* On a phone the rail dissolves so its parts can sit in the page order:
   the player leads only while the stream is live. */
.bx-stream, .bx-stream > .bx-rail-scroll { display: contents; }
.bx-stream-head, .bx-player-wrap { order: var(--o-player); }
.bx-clips { order: 5; }
.bx-short { order: 6; }
.bx-sw-source { display: none !important; }

.bx-status {
  display: inline-flex; align-items: center; gap: 7px;
  margin-right: auto;
  font: 600 .7rem/1 var(--f-b); letter-spacing: .12em; text-transform: uppercase; color: var(--muted);
}
.bx-status .bx-dot { display: none; }
.bx-status-ico { width: 8px; height: 8px; border-radius: 50%; border: 1.5px solid currentColor; opacity: .7; }
.bx[data-live="live"] .bx-status { color: #ffd9db; }
.bx[data-live="live"] .bx-status .bx-dot { display: block; }
.bx[data-live="live"] .bx-status-ico { display: none; }
.bx-stream-head h2 { display: flex; align-items: center; gap: 8px; }
.bx-stream-head h2 svg { width: 18px; height: 18px; color: var(--twitch); }

.bx-player-wrap { padding: 0 16px 6px; }
.bx-player {
  position: relative; aspect-ratio: 16 / 9; overflow: hidden;
  background: #070707; border: 1px solid var(--line); border-radius: 6px;
}
.bx-player > * { position: absolute; inset: 0; width: 100%; height: 100%; }
.bx-player iframe { width: 100%; height: 100%; border: 0; display: block; }
.bx-player-live { transition: opacity .35s var(--ease); }
.bx-player-clip { opacity: 0; visibility: hidden; transition: opacity .35s var(--ease), visibility 0s linear .35s; }
.bx-player[data-mode="clip"] .bx-player-clip { opacity: 1; visibility: visible; transition-delay: 0s; }
.bx-player[data-mode="clip"] .bx-player-live { opacity: 0; pointer-events: none; }

.bx-player-wait {
  display: grid; place-items: center; pointer-events: none;
  font: 600 .72rem/1 var(--f-b); letter-spacing: .14em; text-transform: uppercase; color: var(--muted);
  background: #070707; transition: opacity .3s;
}
.bx[data-live="live"] .bx-player-wait, .bx[data-live="offline"] .bx-player-wait { opacity: 0; }

.bx-poster { position: absolute; inset: 0; display: block; width: 100%; text-align: left; }
.bx-poster img { width: 100%; height: 100%; max-width: none; object-fit: cover; transition: transform .8s var(--ease), filter .4s; filter: saturate(.85) brightness(.8); }
.bx-poster::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(0, 0, 0, .85) 0%, rgba(0, 0, 0, .2) 55%, rgba(0, 0, 0, .1) 100%); }
.bx-poster-play {
  position: absolute; left: 50%; top: 46%; z-index: 1; transform: translate(-50%, -50%);
  display: grid; place-items: center; width: 58px; height: 58px; border-radius: 50%;
  background: rgba(0, 0, 0, .55); border: 1.5px solid rgba(255, 255, 255, .7); color: #fff;
  transition: transform .3s var(--ease), background-color .2s, border-color .2s;
}
.bx-poster-play svg { width: 24px; height: 24px; margin-left: 3px; }
.bx-poster-cap { position: absolute; left: 14px; right: 14px; bottom: 12px; z-index: 1; display: grid; gap: 3px; }
.bx-poster-cap span { font: 600 .72rem/1 var(--f-b); letter-spacing: .14em; text-transform: uppercase; color: var(--twitch); }
.bx-poster-cap strong {
  font: 650 .95rem/1.25 var(--f-d); color: #fff;
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden;
}
.bx-poster:hover img { transform: scale(1.04); filter: saturate(1) brightness(.9); }
.bx-poster:hover .bx-poster-play { transform: translate(-50%, -50%) scale(1.08); background: var(--twitch); border-color: var(--twitch); color: #17112a; }
.bx-poster:focus-visible { outline-offset: -3px; }

.bx-offline-card {
  position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 10px; padding: 16px;
  text-align: center; font-size: .9rem; color: var(--text-2);
}
.bx-offline-card a { color: var(--twitch); font-weight: 600; }

.bx-now {
  display: flex; align-items: center; gap: 10px; min-height: 40px;
  font-size: .8rem; color: var(--muted);
}
.bx-now-text { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bx-now-text b { color: var(--text); font-weight: 600; }
.bx-backlive {
  display: none; align-items: center; gap: 7px; flex: none;
  height: 30px; padding: 0 10px; border-radius: 5px;
  border: 1px solid rgba(255, 42, 54, .55); background: rgba(255, 42, 54, .12);
  font: 700 .7rem/1 var(--f-d); letter-spacing: .1em; text-transform: uppercase; color: #fff;
  transition: background-color .2s;
}
.bx-backlive:hover { background: rgba(255, 42, 54, .25); }
.bx[data-live="live"] .bx-player[data-mode="clip"] ~ .bx-now .bx-backlive { display: inline-flex; }

.bx-clips { padding: 14px 0 6px; }
.bx-clips .bx-sub { padding: 0 16px; }
.bx-clips[hidden] { display: none; }
.bx-cliplist {
  display: flex; gap: 12px; overflow-x: auto; padding: 0 16px 10px;
  scroll-snap-type: x mandatory; scroll-padding-inline: 16px; overscroll-behavior-x: contain;
}
.bx-cliplist > li { flex: 0 0 min(72%, 300px); scroll-snap-align: start; }

.bx-clip { display: grid; gap: 6px; border-radius: 6px; }
.bx-clip-thumb { position: relative; display: block; aspect-ratio: 16 / 9; overflow: hidden; border-radius: 6px; background: #1b1a19; }
.bx-clip-thumb img { width: 100%; height: 100%; max-width: none; object-fit: cover; transition: transform .6s var(--ease); }
.bx-clip-dur {
  position: absolute; right: 6px; bottom: 6px;
  padding: 3px 5px; border-radius: 3px; background: rgba(0, 0, 0, .75);
  font: 600 .7rem/1 var(--f-b); font-variant-numeric: tabular-nums; color: #fff;
}
.bx-clip-play {
  position: absolute; inset: 0; display: grid; place-items: center;
  background: rgba(10, 6, 20, .35); opacity: 0; transition: opacity .25s;
}
.bx-clip-play svg { width: 30px; height: 30px; color: #fff; filter: drop-shadow(0 2px 6px rgba(0, 0, 0, .6)); }
.bx-clip-badge {
  position: absolute; left: 6px; top: 6px; display: none;
  padding: 4px 6px; border-radius: 3px; background: var(--twitch); color: #17112a;
  font: 700 .7rem/1 var(--f-d); letter-spacing: .1em; text-transform: uppercase;
}
.bx-clip-title {
  font: 600 .84rem/1.3 var(--f-d); color: #ececec;
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden;
  transition: color .2s;
}
.bx-clip-meta { font-size: .72rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.bx-clip:hover .bx-clip-thumb img { transform: scale(1.05); }
.bx-clip:hover .bx-clip-play, .bx-clip:focus-visible .bx-clip-play { opacity: 1; }
.bx-clip:hover .bx-clip-title { color: #fff; }
.bx-clip[aria-current="true"] .bx-clip-thumb { box-shadow: 0 0 0 2px var(--twitch); }
.bx-clip[aria-current="true"] .bx-clip-badge { display: block; }
.bx-clip[aria-current="true"] .bx-clip-play { display: none; }

.bx-short { padding: 14px 16px 18px; }
.bx-short-frame { width: min(100%, 260px); margin: 0 auto; aspect-ratio: 9 / 16; overflow: hidden; border-radius: 6px; border: 1px solid var(--line); background: #070707; }
.bx-short-frame iframe { width: 100%; height: 100%; border: 0; display: block; }

/* ---------- Footer ------------------------------------------------------ */
.bx-ftr { order: 9; margin-top: 16px; }
.bx-ftr-panel { display: flex; flex-direction: column-reverse; background: #0e0e0d; border-top: 1px solid var(--line); }
.bx-ftr-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  min-height: var(--ftr); padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
  font-size: .78rem; color: var(--muted);
}
.bx-ftr-toggle { display: none; }
.bx-social { display: flex; align-items: center; gap: 2px; }
.bx-social a { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 6px; color: #cfcfcf; transition: color .2s, background-color .2s, transform .25s var(--ease); }
.bx-social a:hover { color: #fff; background: rgba(255, 255, 255, .07); transform: translateY(-1px); }
.bx-social svg { width: 17px; height: 17px; }
.bx-ftr-more { display: grid; grid-template-rows: 1fr; }
.bx-ftr-more-inner { min-height: 0; overflow: hidden; }
.bx-ftr-cols { display: grid; gap: 24px; padding: 24px 16px 8px; }
.bx-ftr-cols h2 { font: 700 .72rem/1 var(--f-b); letter-spacing: .16em; text-transform: uppercase; color: var(--muted); margin-bottom: 12px; }
.bx-ftr-cols ul { columns: 2; column-gap: 16px; }
.bx-ftr-cols li { break-inside: avoid; }
.bx-ftr-cols a { display: inline-flex; align-items: center; min-height: 34px; font-size: .92rem; color: #dedede; transition: color .2s; }
.bx-ftr-cols a:hover { color: var(--ember-hi); }

/* ======================================================================
   Tablet: hero band, then posts beside a pinned stream column
   ====================================================================== */
@media (min-width: 700px) {
  .bx {
    display: grid;
    grid-template-columns: minmax(0, 1.08fr) minmax(0, 1fr);
    grid-template-areas: "hdr hdr" "stage stage" "posts stream" "ftr ftr";
    align-items: start;
    column-gap: 20px;
    padding-inline: 20px;
  }
  .bx-posts, .bx-stream-head, .bx-player-wrap, .bx-clips, .bx-short { order: 0; }
  .bx-feature { grid-template-columns: minmax(0, 1fr) auto; gap: 4px 16px; }
  .bx-feature-text { grid-column: 1; }
  .bx-feature-go { grid-column: 2; grid-row: 1 / span 2; margin-top: 0; }
  .bx-hdr { grid-area: hdr; margin-inline: -20px; padding-inline: 24px 16px; }
  .bx-stage { grid-area: stage; min-height: calc(min(66svh, 620px) - var(--hdr)); padding-bottom: 28px; }
  .bx-backdrop { height: min(66svh, 620px); }
  .bx-ftr { grid-area: ftr; margin-inline: -20px; margin-top: 28px; }

  .bx-posts, .bx-stream {
    background: rgba(25, 24, 23, .7);
    border: 1px solid var(--line); border-radius: var(--r);
  }
  .bx-posts { grid-area: posts; }
  .bx-stream {
    grid-area: stream;
    display: flex; flex-direction: column;
    position: sticky; top: calc(var(--adminbar) + var(--hdr) + 12px);
    max-height: calc(100svh - var(--adminbar) - var(--hdr) - 24px);
    overflow: hidden;
  }
  .bx-stream > .bx-rail-scroll { display: block; flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; }
  .bx-player-wrap {
    position: sticky; top: 0; z-index: 3;
    padding: 2px 14px 4px; background: rgba(23, 22, 21, .98);
  }
  .bx-stream-head { padding-inline: 14px; }
  .bx-clips { padding-top: 10px; }
  .bx-clips .bx-sub { padding: 0 14px; }
  .bx-cliplist { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 12px; overflow: visible; padding: 0 14px 8px; }
  .bx-cliplist > li { flex: none; }
  .bx-ftr-cols { grid-template-columns: minmax(0, 520px) auto; justify-content: start; column-gap: 64px; padding-inline: 24px; }
  .bx-ftr-cols ul { columns: 3; }
  .bx-ftr-bar { padding-inline: 24px; }
}

/* Header nav goes inline once it fits */
@media (min-width: 1024px) {
  .bx-menubtn { display: none; }
  .bx-nav {
    position: static; z-index: auto; max-height: none; overflow: visible;
    clip-path: none; visibility: visible; transition: none;
    background: none; border: 0; padding: 0;
    margin-right: auto;
  }
  .bx-nav ul { display: flex; align-items: center; gap: 2px; }
  .bx-nav .bx-search { display: none; }
  .bx-nav a {
    min-height: 38px; padding: 0 11px;
    font: 600 .86rem/1 var(--f-d); color: #d6d6d6;
  }
  .bx-nav a::after {
    content: ""; position: absolute; left: 11px; right: 11px; bottom: 5px; height: 2px;
    background: var(--ember); border-radius: 1px;
    transform: scaleX(0); transform-origin: left; transition: transform .3s var(--ease);
  }
  .bx-nav a:hover::after, .bx-nav a[aria-current="page"]::after { transform: scaleX(1); }
  .bx-nav a[aria-current="page"]::before { display: none; }
  .bx-nav .bx-ext { width: 11px; height: 11px; margin-left: -3px; }
  .bx-logo { margin-right: 20px; }

  .bx-hdr > .bx-search {
    display: flex; margin: 0; border-color: transparent; background: none;
    transition: border-color .25s, background-color .25s;
  }
  .bx-hdr > .bx-search input { width: 0; padding: 0; opacity: 0; transition: width .4s var(--ease), padding .4s var(--ease), opacity .2s; }
  .bx-hdr > .bx-search:focus-within, .bx-hdr > .bx-search.is-open { border-color: var(--line-2); background: rgba(0, 0, 0, .4); }
  .bx-hdr > .bx-search:focus-within input, .bx-hdr > .bx-search.is-open input { width: 12rem; padding: 0 4px 0 12px; opacity: 1; }
  .bx-hdr > .bx-search .bx-iconbtn { width: 38px; height: 38px; }
}

/* ======================================================================
   Desktop: one screen. The hero stays; the rails scroll on their own.
   ====================================================================== */
@media (min-width: 1024px) and (min-height: 600px) {
  body.bx-front { --hdr: 60px; height: 100dvh; overflow: hidden; }
  .bx {
    --rail-l: clamp(280px, 22vw, 380px);
    --rail-r: clamp(340px, 28vw, 480px);
    height: calc(100dvh - var(--adminbar));
    min-height: 0;
    grid-template-columns: var(--rail-l) minmax(0, 1fr) var(--rail-r);
    grid-template-rows: var(--hdr) minmax(0, 1fr) var(--ftr);
    grid-template-areas: "hdr hdr hdr" "posts stage stream" "ftr ftr ftr";
    align-items: stretch;
    column-gap: var(--gap);
    padding-inline: var(--gap);
  }
  .bx-backdrop { position: fixed; inset: 0; height: auto; }
  .bx-backdrop::after {
    background:
      radial-gradient(70% 80% at 50% 45%, transparent 0%, rgba(0, 0, 0, .5) 80%),
      linear-gradient(to bottom, rgba(6, 6, 6, .7) 0%, rgba(6, 6, 6, 0) 16%, rgba(6, 6, 6, 0) 80%, rgba(6, 6, 6, .7) 100%);
  }
  .bx-hdr { position: relative; top: 0; margin-inline: calc(-1 * var(--gap)); padding-inline: 20px 14px; background: none !important; border-bottom-color: transparent !important; }

  .bx-posts, .bx-stream {
    min-height: 0; margin-bottom: 10px;
    display: flex; flex-direction: column; overflow: hidden;
    position: relative; top: auto; max-height: none;
    background: var(--panel);
    -webkit-backdrop-filter: blur(18px) saturate(125%); backdrop-filter: blur(18px) saturate(125%);
    box-shadow: 0 24px 50px -30px rgba(0, 0, 0, .9);
  }
  .bx-posts > .bx-rail-scroll, .bx-stream > .bx-rail-scroll {
    display: block; flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain;
  }
  .bx-posts > .bx-rail-scroll {
    -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 var(--fade-t, 0px), #000 calc(100% - var(--fade-b, 0px)), transparent 100%);
            mask-image: linear-gradient(to bottom, transparent 0, #000 var(--fade-t, 0px), #000 calc(100% - var(--fade-b, 0px)), transparent 100%);
  }
  .bx-stream > .bx-rail-scroll {
    -webkit-mask-image: linear-gradient(to bottom, #000 calc(100% - var(--fade-b, 0px)), transparent 100%);
            mask-image: linear-gradient(to bottom, #000 calc(100% - var(--fade-b, 0px)), transparent 100%);
  }
  .bx-rail-head { border-bottom: 1px solid var(--line); padding: 14px 16px 12px; }
  .bx-postlist { border-top: 0; }
  .bx-post.is-lead h3 { font-size: 1.2rem; }
  .bx-player-wrap { background: var(--panel-solid); padding: 12px 14px 2px; box-shadow: 0 10px 18px -14px rgba(0, 0, 0, .9); }
  .bx-clips--top { padding-top: 12px; }

  .bx-stage { grid-area: stage; min-height: 0; padding: 12px 8px 22px; overflow: hidden; }
  .bx-title { font-size: clamp(3rem, 14.5cqi, 7.25rem); }

  /* the footer: a thin bar that opens when you reach for it */
  .bx-ftr { grid-area: ftr; position: relative; z-index: 30; margin: 0 calc(-1 * var(--gap)); }
  .bx-ftr-panel {
    position: absolute; left: 0; right: 0; bottom: 0;
    background: rgba(10, 10, 10, .34);
    border-top-color: rgba(255, 255, 255, .06);
    -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
    transition: background-color .45s var(--ease) .2s, -webkit-backdrop-filter .45s .2s, backdrop-filter .45s .2s, box-shadow .45s .2s;
  }
  .bx-ftr-bar { height: var(--ftr); min-height: 0; padding: 0 12px 0 20px; opacity: .62; transition: opacity .45s var(--ease) .2s; }
  .bx-social a { width: 32px; height: 32px; }
  .bx-social svg { width: 15px; height: 15px; }
  .bx-ftr-toggle {
    display: inline-flex; align-items: center; gap: 6px;
    height: 32px; padding: 0 10px; border-radius: 6px;
    font: 600 .74rem/1 var(--f-d); letter-spacing: .12em; text-transform: uppercase; color: #dcdcdc;
    transition: background-color .2s;
  }
  .bx-ftr-toggle:hover { background: rgba(255, 255, 255, .07); }
  .bx-ftr-toggle svg { width: 14px; height: 14px; transition: transform .45s var(--ease); }
  .bx-ftr-more { grid-template-rows: 0fr; transition: grid-template-rows .5s var(--ease) .2s; }
  .bx-ftr-cols {
    grid-template-columns: minmax(0, 560px) auto; justify-content: start; column-gap: 72px;
    padding: 22px 20px 6px; opacity: 0; transform: translateY(8px);
    transition: opacity .3s .1s, transform .45s var(--ease) .1s;
  }
  .bx-ftr-cols ul { columns: 3; }
  .bx-ftr-cols a { min-height: 30px; }

  .bx-ftr:hover .bx-ftr-panel, .bx-ftr:focus-within .bx-ftr-panel, .bx-ftr.is-open .bx-ftr-panel {
    background: rgba(13, 13, 12, .95);
    -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px);
    box-shadow: 0 -24px 50px -20px rgba(0, 0, 0, .8);
    transition-delay: .1s;
  }
  .bx-ftr:hover .bx-ftr-bar, .bx-ftr:focus-within .bx-ftr-bar, .bx-ftr.is-open .bx-ftr-bar { opacity: 1; transition-delay: .1s; }
  .bx-ftr:hover .bx-ftr-more, .bx-ftr:focus-within .bx-ftr-more, .bx-ftr.is-open .bx-ftr-more { grid-template-rows: 1fr; transition-delay: .1s; }
  .bx-ftr:hover .bx-ftr-cols, .bx-ftr:focus-within .bx-ftr-cols, .bx-ftr.is-open .bx-ftr-cols { opacity: 1; transform: none; transition-delay: .22s; }
  .bx-ftr:hover .bx-ftr-toggle svg, .bx-ftr:focus-within .bx-ftr-toggle svg, .bx-ftr.is-open .bx-ftr-toggle svg { transform: rotate(180deg); }
}

/* Very wide screens: keep the rails from becoming billboards */
@media (min-width: 1900px) and (min-height: 600px) {
  .bx { --rail-l: 400px; --rail-r: 500px; }
}

/* ---------- Entrance: the desk assembles around the storm --------------- */
@media (prefers-reduced-motion: no-preference) {
  .bx-title, .bx-tag, .bx-actions, .bx-feature { animation: bx-rise 1.1s var(--ease) both; }
  .bx-title { animation-delay: .1s; }
  .bx-tag { animation-delay: .22s; }
  .bx-actions { animation-delay: .32s; }
  .bx-feature { animation-delay: .5s; }
  .bx-backdrop img { animation: bx-settle 2.6s var(--ease) both; }
}
@media (prefers-reduced-motion: no-preference) and (min-width: 1024px) and (min-height: 600px) {
  .bx-posts { animation: bx-in-l 1s var(--ease) .15s both; }
  .bx-stream { animation: bx-in-r 1s var(--ease) .15s both; }
  .bx-ftr-panel { animation: bx-fade 1s var(--ease) .6s both; }
}
@keyframes bx-rise { from { opacity: 0; transform: translateY(22px); filter: blur(6px); } }
@keyframes bx-settle { from { transform: scale(1.1); } to { transform: scale(1.02); } }
@keyframes bx-in-l { from { opacity: 0; transform: translateX(-24px); } }
@keyframes bx-in-r { from { opacity: 0; transform: translateX(24px); } }
@keyframes bx-fade { from { opacity: 0; } }

@media (prefers-reduced-motion: reduce) {
  .bx *, .bx *::before, .bx *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
  .bx-flash { display: none; }
}
