/* ============================================================================
   Previously — SHARED SITE CHROME (topbar + footer)
   One component for every standalone page (/sports/, /culture/,
   /culture/story-board/). Injected by shared/chrome/chrome.js — never
   copy-pasted per page. Derived from the homepage topbar; restyled on the
   Rewind Glyph brand tokens (brand-tokens.css must load before this file).

   Spec: sticky topbar, 68px desktop / 62px mobile, z-index 50, 22px blur.
   Back link LEFT (first element). Canonical 9-item nav. Hamburger < 768px.
   Buttons are never red: CTAs graphite, secondaries pearl.
   ============================================================================ */
@font-face{font-family:"Previously Display";src:url("../../assets/previously-wordmark.ttf") format("truetype");font-display:swap}

/* ---------- topbar ---------- */
.topbar{
  --pv-ink:var(--brand-ink);
  --pv-muted:#a89a83;
  --pv-faint:#8d8478; /* a11y 2026-09-27: was #7d7263 (4.01:1, fails AA) */
  --pv-line:rgba(237,230,214,.12);
  position:sticky;top:0;z-index:50;
  display:flex;align-items:center;justify-content:space-between;
  height:68px;padding:0 max(28px,calc((100vw - 1460px)/2));
  /* 2026-09-27: transparent chrome — no gray box. A soft top scrim keeps the
     nav legible over page art; it fades to fully transparent so the bar never
     reads as a solid surface. Deep Charcoal #101114 everywhere. */
  border-bottom:0;
  background:linear-gradient(to bottom,rgba(10,10,12,.82),rgba(10,10,12,.42) 55%,rgba(10,10,12,0));
  backdrop-filter:saturate(140%) blur(14px);-webkit-backdrop-filter:saturate(140%) blur(14px);
}
.top-left{display:flex;align-items:center;gap:2px;min-width:0}
.back-link{
  display:inline-flex;align-items:center;gap:7px;flex:none;
  min-height:44px;padding:0 14px 0 4px;margin-right:6px;
  color:var(--pv-ink);text-decoration:none;font-size:13px;font-weight:680;white-space:nowrap;
  border-radius:999px;
}
.back-link .back-arrow{color:var(--brand-red);font-size:15px;line-height:1}
.back-link:hover{background:rgba(237,230,214,.075)}
.back-link:active{transform:scale(.96)}
.wordmark{
  display:inline-flex;align-items:center;gap:10px;flex:none;
  border:0;background:transparent;cursor:pointer;text-decoration:none;
  font-family:"Previously Display",Georgia,serif;font-size:23px;letter-spacing:.01em;
  color:var(--pv-ink);padding:8px 12px 8px 0;margin-right:10px;
  transition:transform .12s ease;
}
.wordmark:hover{color:var(--brand-secondary)}
.wordmark:active{transform:scale(.96)}
.wm-glyph{flex:none;display:block}
.primary-nav{display:flex;align-items:center;gap:3px;flex-wrap:nowrap}
/* Nav icons (canonical model injects .nav-ic spans). Lives here — NOT in a
   JS-injected <style> — so strict style-src CSP pages (games, coming-soon,
   sports) keep their icons. */
.topbar .nav-btn .nav-ic{display:inline-flex;flex:none;margin-right:7px;vertical-align:-2px}
.topbar .nav-btn .nav-ic svg{display:block}
.pv-menu-row .nav-ic{display:inline-flex;flex:none;margin-right:10px}
.pv-menu-row .nav-ic svg{display:block}
.nav-btn{
  position:relative;min-height:44px;min-width:44px;border:0;background:transparent;
  color:var(--pv-muted);padding:0 15px;border-radius:999px;cursor:pointer;
  font-size:13px;font-weight:680;text-decoration:none;display:inline-flex;align-items:center;
  /* Font-swap guard: a label may never shrink or wrap mid-swap — the button
     keeps its intrinsic width, so a wider webfont can never clip a label. */
  flex:none;white-space:nowrap;
  transition:color .18s ease,background .18s ease,transform .12s ease;
  font-family:inherit;
}
.nav-btn:hover{color:var(--pv-ink);background:rgba(237,230,214,.075)}
.nav-btn:active{transform:scale(.96);background:rgba(237,230,214,.12)}
/* 2026-09-27: active section must be unmistakable on phone + desktop —
   bright label, visible pill, stronger Rewind-Red rule. */
.nav-btn.active{color:#fff;font-weight:800;background:rgba(237,230,214,.16);box-shadow:inset 0 0 0 1px rgba(237,230,214,.22)}
.nav-btn.active::after{
  content:"";position:absolute;left:14px;right:14px;bottom:4px;height:3px;border-radius:4px;
  background:var(--brand-red);box-shadow:0 0 10px rgba(232,50,30,.65);
}
.top-actions{display:flex;align-items:center;gap:8px;position:relative}
.icon-btn{
  display:grid;place-items:center;width:44px;height:44px;border:0;border-radius:50%;
  background:transparent;color:var(--pv-muted);cursor:pointer;text-decoration:none;
  transition:color .18s,background .18s,transform .12s;
}
.icon-btn:hover{color:var(--pv-ink);background:rgba(237,230,214,.075)}
.icon-btn:active{transform:scale(.92)}
.icon-btn svg{display:block}
.ghost-btn{
  display:inline-flex;align-items:center;justify-content:center;min-height:44px;
  padding:0 20px;border-radius:999px;border:1px solid rgba(237,230,214,.30);
  background:transparent;color:var(--brand-secondary);text-decoration:none;cursor:pointer;
  font-size:13px;font-weight:740;font-family:inherit;white-space:nowrap;
  transition:border-color .18s,background .18s,transform .12s;
}
.ghost-btn:hover{border-color:var(--brand-secondary);background:rgba(244,241,234,.08)}
.ghost-btn:active{transform:scale(.96)}
.bell-dot{
  position:absolute;top:9px;right:10px;width:9px;height:9px;border-radius:50%;
  background:var(--brand-red);border:2px solid #101114;display:none;
}
.pv-bellwrap{position:relative;display:flex}
/* hamburger */
.pv-menu-btn{
  display:none;place-items:center;width:44px;height:44px;border:1px solid var(--pv-line);
  border-radius:12px;background:transparent;color:var(--pv-ink);cursor:pointer;
}
.pv-menu-btn:hover{background:rgba(237,230,214,.075)}
.pv-menu-btn:active{transform:scale(.94)}
.pv-menu{
  display:none;position:absolute;top:calc(100% + 8px);right:0;z-index:60;
  min-width:260px;max-width:86vw;max-height:70vh;overflow-y:auto;
  background:#17181d;border:1px solid rgba(237,230,214,.16);border-radius:16px;
  box-shadow:0 24px 60px rgba(0,0,0,.6);padding:8px;
}
.pv-menu.open,.pv-menu.on{display:block}
.pv-menu a.pv-menu-row,.pv-menu button.pv-menu-row{
  display:flex;align-items:center;gap:12px;width:100%;text-align:left;
  padding:12px 14px;border:0;border-radius:10px;background:transparent;
  color:var(--pv-ink);text-decoration:none;font-size:14.5px;font-weight:640;cursor:pointer;
  font-family:inherit;min-height:48px;
}
.pv-menu a.pv-menu-row:hover,.pv-menu button.pv-menu-row:hover{background:rgba(237,230,214,.07)}
.pv-menu .pv-menu-row.active{color:var(--pv-ink)}
.pv-menu .pv-menu-row.active .pv-menu-label{border-bottom:2px solid var(--brand-red)}
.pv-menu-row svg{flex:none;color:var(--pv-muted)}
.pv-menu-sep{height:1px;background:var(--pv-line);margin:6px 8px}
.pv-menu-kicker{
  padding:10px 14px 4px;font-size:10.5px;font-weight:800;letter-spacing:.14em;
  text-transform:uppercase;color:var(--pv-faint);
}
/* ---------- shared footer ---------- */
footer.pv-footer{
  max-width:none;margin:0;padding:0 28px;
  border-top:1px solid rgba(237,230,214,.12);background:#0c0d10;color:#a89a83;
  font-size:14px;line-height:1.7;
}
.pv-footer-shell{max-width:1360px;margin:0 auto}
.pv-footer-main{display:grid;grid-template-columns:1.3fr repeat(3,minmax(130px,.7fr));gap:46px;padding:36px 0 42px}
.pv-footer-brand{max-width:390px}
.pv-footer-wordmark{
  display:inline-flex;align-items:center;gap:9px;margin-bottom:12px;
  font-family:"Previously Display",Georgia,serif;color:var(--brand-ink);font-size:24px;
}
.pv-footer-brand p{margin:0;font-size:14px;line-height:1.7;color:#a89a83}
.pv-footer-group h2{margin:0 0 13px;color:var(--brand-ink);font-size:12px;letter-spacing:.06em;text-transform:uppercase}
.pv-footer-group a,.pv-footer-group button{
  display:block;width:max-content;max-width:100%;min-height:44px;border:0;background:none;
  color:#a89a83;padding:7px 0;text-decoration:none;font-size:13px;cursor:pointer;font-family:inherit;text-align:left;
}
.pv-footer-group a:hover,.pv-footer-group button:hover{color:var(--brand-ink)}
.pv-footer-base{
  display:flex;justify-content:space-between;align-items:flex-start;gap:24px;flex-wrap:wrap;
  padding:22px 0 30px;border-top:1px solid rgba(237,230,214,.12);
  color:#8d8478; /* a11y 2026-09-27: was #7d7263 (4.01:1) */font-size:12.5px;line-height:1.55;
}
.pv-footer-base p{margin:0;max-width:720px}
.pv-footer-base a{color:var(--brand-ink);text-decoration:underline;text-underline-offset:3px}
/* ---------- focus / motion ---------- */
.topbar :focus-visible,.pv-footer :focus-visible{outline:2px solid var(--brand-red);outline-offset:3px;border-radius:8px}
/* ---------- theme toggle: RETIRED 2026-09-27 ----------
   Brand decision: Deep Charcoal #101114 everywhere — the light theme is gone,
   so there is nothing to toggle. chrome.js no longer renders the button;
   these rules are kept only as a guard in case a stale page still injects one. */
.pv-theme-toggle{display:none!important}

/* ---------- mid-width compaction (768–1500px) ----------
   9 nav items + wordmark + actions must fit with room to spare at laptop
   widths. Measured 2026-09-27: 19px overflow on games/culture/sports,
   82px on coming-soon (theme toggle) at 1280px, 20px at 1440px — the Live
   item slid under the top-actions. This tightens spacing so all 9 items
   always fit; combined with the flex:none/no-wrap guard above, no font
   swap can ever clip a label.
   Placed BEFORE the mobile block so the <768px rules still win there. */
@media (max-width:1500px){
  .wordmark{font-size:20px;margin-right:2px}
  /* Icon-only back link: the arrow keeps full function, the text label
     drops so the 9-item nav always has room. Full label returns >1400px
     and the <768px rules below still show the label on phones. */
  .back-link{font-size:0;padding:0 10px 0 2px;margin-right:2px}
  .back-link .back-arrow{font-size:15px}
  .nav-btn{padding:0 10px;font-size:12px}
  .nav-btn .nav-ic{margin-right:5px}
  .top-actions{gap:4px}
}
/* ---------- narrow-desktop scroll rail (768–1100px) ----------
   Absolute last-resort guard: if the 9 items ever exceed the available
   width (extreme zoom, wider-than-expected webfont), the nav becomes a
   swipeable rail instead of clipping a label — same pattern the SPA uses
   on phones. With the compaction above it essentially never scrolls;
   the rail just makes clipping impossible. */
@media (max-width:1100px){
  .primary-nav{flex:1 1 auto;min-width:0;overflow-x:auto;scrollbar-width:none}
  .primary-nav::-webkit-scrollbar{display:none}
}

/* ---------- mobile: one hamburger pattern < 768px ---------- */
@media (max-width:767px){
  .topbar{height:62px;padding:0 14px}
  .wordmark{font-size:19px;margin-right:2px}
  .back-link{font-size:12.5px;padding:0 10px 0 2px;margin-right:2px}
  .primary-nav{display:none}
  .pv-menu-btn{display:grid}
  .top-actions .search-act,.top-actions .signin-act{display:none}
  .top-actions{gap:2px}
  .pv-footer-main{grid-template-columns:1fr 1fr;gap:30px}
  .pv-footer-brand{grid-column:1/-1}
  .pv-footer-base{flex-direction:column}
}
@media (prefers-reduced-motion:reduce){
  .topbar *,.pv-footer *{transition:none!important;animation:none!important}
}

/* ---------- live status dot (Live nav item) ---------- */
.pv-live-dot{
  width:8px;height:8px;border-radius:50%;background:var(--brand-red,#E8321E);
  flex:none;margin-right:7px;
  box-shadow:0 0 0 0 rgba(232,50,30,.55);
  animation:pv-live-pulse 1.8s infinite;
}
.pv-live-dot[hidden]{display:none}
.pv-menu-row .pv-live-dot{margin-right:2px}
@keyframes pv-live-pulse{
  0%{box-shadow:0 0 0 0 rgba(232,50,30,.55)}
  70%{box-shadow:0 0 0 9px rgba(232,50,30,0)}
  100%{box-shadow:0 0 0 0 rgba(232,50,30,0)}
}
@media (prefers-reduced-motion:reduce){.pv-live-dot{animation:none}}
