/* A permanent, server-classified base; no scene is declared interactive here.
   Native content stays readable while optional footer scripts arrive or fail. */
body.hhx-enabled.hhx-first-paint {
  --hhx-first-paint-css:1;
  --hhb-display:HHXBroadcastDisplay,"Arial Black",Arial,sans-serif;
  --hhb-sans:HHXBroadcastSans,Arial,sans-serif;
  --hhb-ink:#081018; --hhb-cream:#eeeae1; --hhb-red:#d30b32;
  --hhb-muted:#b8bec1; --hhb-line:#eeeae133;
  --hhx-navigation-bottom-space:calc(90px + env(safe-area-inset-bottom,0px));
  background:var(--hhb-ink); color:var(--hhb-cream); font-family:var(--hhb-sans);
}
body.hhx-enabled.hhx-first-paint:not(.hhx-site) :is(.site,.content-bg) { background:var(--hhb-ink); }
body.hhx-enabled.hhx-first-paint #primary { min-width:0; }
body.hhx-enabled.hhx-first-paint :is(button,a,summary,input,select,textarea):focus-visible { outline:3px solid #e4a72e; outline-offset:4px; }
body.hhx-enabled.hhx-first-paint #colophon { padding-bottom:var(--hhx-navigation-bottom-space); background:var(--hhb-ink); color:var(--hhb-cream); }

/* The previous arrival gate must not conceal this real, readable document. */
html[data-hhx-arrival-pending="true"] body.hhx-enabled.hhx-first-paint #primary { visibility:visible; }
html[data-hhx-arrival-pending="true"] body.hhx-enabled.hhx-first-paint:not(.hhx-route-pending)::before { content:none; }

/* The owned replacement is in the response before these old menu controls
   retire. CSS failure leaves the original menu and plain navigation links. */
body.hhx-enabled.hhx-first-paint:has([data-hhx-first-paint-navigation]) #masthead :is(#site-navigation,.menu-toggle-open) { display:none!important; }
body.hhx-enabled.hhx-first-paint:has([data-hhx-first-paint-navigation]) :is(.hhx-broadcast-dock,.hhx-site-dock) { display:none!important; }
body.hhx-enabled.hhx-first-paint:has([data-hhx-first-paint-navigation]) { padding-bottom:0!important; }

/* Exactly the same five ordinary links become enhanced navigation later. */
body.hhx-enabled.hhx-first-paint:not(.hhx-navigation-ready) [data-hhx-first-paint-navigation] {
  position:fixed; z-index:85; left:50%; bottom:max(10px,env(safe-area-inset-bottom));
  box-sizing:border-box; width:min(470px,calc(100% - 20px)); min-width:0; margin:0;
  transform:translateX(-50%); padding:5px 6px; border:1px solid #eeeae13d; border-radius:30px;
  background:#101c25f5; color:#eeeae1; box-shadow:0 10px 32px #0005;
  backdrop-filter:blur(14px); font-family:var(--hhb-sans);
}
body.hhx-enabled.hhx-first-paint:not(.hhx-navigation-ready) [data-hhx-first-paint-navigation] .hhx-unified-nav-links { display:flex; flex-wrap:wrap; align-items:stretch; gap:3px; min-width:0; }
body.hhx-enabled.hhx-first-paint:not(.hhx-navigation-ready) [data-hhx-first-paint-navigation] a.hhx-unified-link {
  position:relative; display:flex; flex:1 1 max-content; flex-direction:column; align-items:center; justify-content:center;
  box-sizing:border-box; min-width:min(100%,2.75rem); max-width:100%; min-height:52px; gap:4px; margin:0;
  padding:6px; border:0; border-radius:24px; background:transparent; color:#bfcbd1;
  font:750 .6875rem/1.3 var(--hhb-sans); text-align:center; text-decoration:none; letter-spacing:0; white-space:normal; overflow-wrap:normal;
}
body.hhx-enabled.hhx-first-paint:not(.hhx-navigation-ready) [data-hhx-first-paint-navigation] a[aria-current] { color:#fff6e8; background:#eeeae10f; }
body.hhx-enabled.hhx-first-paint:not(.hhx-navigation-ready) [data-hhx-first-paint-navigation] a[aria-current]::after { position:absolute; right:calc(50% - 7px); bottom:2px; width:14px; height:2px; border-radius:2px; background:#ff3155; content:""; }
body.hhx-enabled.hhx-first-paint:not(.hhx-navigation-ready) [data-hhx-first-paint-navigation] svg { width:22px; height:22px; flex:0 0 22px; fill:none; stroke:currentColor; }
body.hhx-enabled.hhx-first-paint:not(.hhx-navigation-ready) [data-hhx-first-paint-navigation] .hhx-unified-label { display:block; max-width:100%; white-space:normal; overflow-wrap:normal; }
body.hhx-enabled.hhx-first-paint:not(.hhx-navigation-ready) [data-hhx-first-paint-navigation] a:focus-visible { outline-offset:-4px; }

/* Base masthead rules also work without generated arrow/MTL controls. Keep
   the native day arrows and scroll affordances until their replacements exist. */
body.hhx-enabled.hhx-first-paint:not(.hhx-masthead-ready) #masthead .site-header-inner-wrap .habs-league-scoreboard-label { grid-template-columns:minmax(0,1fr) minmax(194px,1fr); grid-template-rows:minmax(52px,auto); }
body.hhx-enabled.hhx-first-paint:not(.hhx-masthead-ready) #masthead .site-header-inner-wrap .habs-league-scoreboard-label .hh-score-dates { display:grid; grid-column:2; grid-row:1; grid-template-columns:44px minmax(0,1fr) 44px; gap:2px; }
body.hhx-enabled.hhx-first-paint:not(.hhx-masthead-ready) #masthead .hh-score-dates > button[data-habs-league-day] { position:static; display:flex; align-items:center; justify-content:center; min-width:44px; min-height:44px; margin:0; padding:4px; color:#eeeae1; background:#081923; }
body.hhx-enabled.hhx-first-paint:not(.hhx-masthead-ready) #masthead .habs-league-scoreboard-track { scrollbar-width:thin; }
body.hhx-enabled.hhx-first-paint:not(.hhx-navigation-ready) #masthead .search-toggle-open { position:absolute; z-index:30; top:14px; right:max(14px,calc((100% - var(--habs-header-max-width,1180px))/2 + var(--habs-header-gutter,24px))); display:flex; align-items:center; justify-content:center; width:44px; height:44px; margin:0; padding:9px; border:0; background:transparent; color:#eeeae1; }
body.hhx-enabled.hhx-first-paint:not(.hhx-masthead-ready) #masthead .site-title { overflow-wrap:normal; }


/* Put the existing plain wrappers into one fallback grid. This is only box
   layout: native controls keep their DOM parents, handlers, labels and order. */
@supports(display:contents) {
  body.hhx-enabled.hhx-first-paint:not(.hhx-masthead-ready).habs-design-2026 #masthead .site-header-inner-wrap .habs-league-scoreboard { grid-template-columns:minmax(0,max-content) 44px 44px minmax(0,1fr) 44px; grid-template-rows:minmax(64px,auto) auto auto auto; column-gap:5px; row-gap:0; align-items:center; }
  body.hhx-enabled.hhx-first-paint:not(.hhx-masthead-ready).habs-design-2026 #masthead .site-header-inner-wrap .habs-league-scoreboard > :is(.habs-league-scoreboard-label,.habs-league-scoreboard-viewport) { display:contents; }
  body.hhx-enabled.hhx-first-paint:not(.hhx-masthead-ready).habs-design-2026 #masthead .site-header-inner-wrap .habs-league-scoreboard-label > .hh-scores-label { grid-column:1; grid-row:1; min-width:0; }
  body.hhx-enabled.hhx-first-paint:not(.hhx-masthead-ready).habs-design-2026 #masthead .site-header-inner-wrap .habs-league-scoreboard-label .hh-score-dates { grid-column:4; grid-row:1; display:block; position:relative; min-width:0; width:100%; max-width:none; margin:0; justify-self:stretch; }
  body.hhx-enabled.hhx-first-paint:not(.hhx-masthead-ready).habs-design-2026 #masthead .site-header-inner-wrap .habs-league-scoreboard-viewport > .habs-league-scroll { grid-row:1; position:static; display:inline-flex; align-items:center; justify-content:center; box-sizing:border-box; width:44px; min-width:44px; height:44px; min-height:44px; margin:0; padding:8px; border:1px solid #657c8b99; border-radius:7px; background:transparent; color:#eeeae1; }
  body.hhx-enabled.hhx-first-paint:not(.hhx-masthead-ready).habs-design-2026 #masthead .site-header-inner-wrap .habs-league-scroll.is-previous { grid-column:2; }
  body.hhx-enabled.hhx-first-paint:not(.hhx-masthead-ready).habs-design-2026 #masthead .site-header-inner-wrap .habs-league-scroll.is-next { grid-column:3; }
  body.hhx-enabled.hhx-first-paint:not(.hhx-masthead-ready).habs-design-2026 #masthead .site-header-inner-wrap .habs-league-scroll > span { width:22px; height:22px; border:0; background:transparent; }
  body.hhx-enabled.hhx-first-paint:not(.hhx-masthead-ready).habs-design-2026 #masthead .site-header-inner-wrap .habs-league-scoreboard.is-empty .habs-league-scroll { display:none; }
  body.hhx-enabled.hhx-first-paint:not(.hhx-masthead-ready).habs-design-2026 #masthead .site-header-inner-wrap .habs-league-scoreboard-track { grid-column:1/-1; grid-row:4; scrollbar-width:none; }
  body.hhx-enabled.hhx-first-paint:not(.hhx-masthead-ready).habs-design-2026 #masthead .site-header-inner-wrap .habs-league-scoreboard-label .hh-scores-today:not([hidden]) { grid-column:1/-1; grid-row:2; }
  body.hhx-enabled.hhx-first-paint:not(.hhx-masthead-ready).habs-design-2026 #masthead .site-header-inner-wrap .habs-league-scoreboard-label > em { grid-column:1/-1; grid-row:3; }
  body.hhx-enabled.hhx-first-paint:not(.hhx-masthead-ready).habs-design-2026 #masthead .site-header-inner-wrap .habs-league-scoreboard > .hhx-source-status { grid-column:1/-1; grid-row:5; }
  /* The original date field remains visible; focusing it exposes the original
     day buttons, exactly as the enhanced header does. */
  body.hhx-enabled.hhx-first-paint:not(.hhx-masthead-ready).habs-design-2026 #masthead .site-header-inner-wrap .hh-score-dates > button[data-habs-league-day] { position:absolute; z-index:5; top:calc(100% + 3px); display:none; align-items:center; justify-content:center; box-sizing:border-box; width:44px; min-width:44px; height:44px; min-height:44px; margin:0; padding:0; border:1px solid #657c8b; border-radius:7px; background:#102936; color:#eeeae1; }
  body.hhx-enabled.hhx-first-paint:not(.hhx-masthead-ready).habs-design-2026 #masthead .site-header-inner-wrap .hh-score-dates > button[data-habs-league-day="previous"] { left:0; }
  body.hhx-enabled.hhx-first-paint:not(.hhx-masthead-ready).habs-design-2026 #masthead .site-header-inner-wrap .hh-score-dates > button[data-habs-league-day="next"] { right:0; }
  body.hhx-enabled.hhx-first-paint:not(.hhx-masthead-ready).habs-design-2026 #masthead .site-header-inner-wrap .hh-score-dates:focus-within > button[data-habs-league-day] { display:flex; }
  @media(max-width:349px) {
    body.hhx-enabled.hhx-first-paint:not(.hhx-masthead-ready).habs-design-2026 #masthead .site-header-inner-wrap .habs-league-scoreboard { grid-template-columns:minmax(0,1fr) 44px 44px; grid-template-rows:minmax(52px,auto) minmax(52px,auto) auto auto auto; }
    body.hhx-enabled.hhx-first-paint:not(.hhx-masthead-ready).habs-design-2026 #masthead .site-header-inner-wrap .habs-league-scoreboard-label .hh-score-dates { grid-column:1/-1; grid-row:2; }
    body.hhx-enabled.hhx-first-paint:not(.hhx-masthead-ready).habs-design-2026 #masthead .site-header-inner-wrap .habs-league-scoreboard-label .hh-scores-today:not([hidden]) { grid-row:3; }
    body.hhx-enabled.hhx-first-paint:not(.hhx-masthead-ready).habs-design-2026 #masthead .site-header-inner-wrap .habs-league-scoreboard-label > em { grid-row:4; }
    body.hhx-enabled.hhx-first-paint:not(.hhx-masthead-ready).habs-design-2026 #masthead .site-header-inner-wrap .habs-league-scoreboard-track { grid-row:5; }
    body.hhx-enabled.hhx-first-paint:not(.hhx-masthead-ready).habs-design-2026 #masthead .site-header-inner-wrap .habs-league-scoreboard > .hhx-source-status { grid-row:6; }
  }
}

/* Native featured media already supplies the article cover before Site starts. */
body.hhx-enabled.hhx-first-paint.hhx-site-article:has(#primary :is(.article-post-thumbnail,.post-top-featured)) .entry-header.post-title { min-height:0; padding-right:0; }
body.hhx-enabled.hhx-first-paint.hhx-site-article:has(#primary :is(.article-post-thumbnail,.post-top-featured)) .entry-header.post-title::after { display:none; }

@media(min-width:700px) {
  body.hhx-enabled.hhx-first-paint { --hhx-navigation-bottom-space:0px; --hhx-navigation-height:54px; --hhx-adminbar-offset:0px; }
  body.hhx-enabled.hhx-first-paint.admin-bar { --hhx-adminbar-offset:32px; }
  body.hhx-enabled.hhx-first-paint:not(.hhx-navigation-ready) [data-hhx-first-paint-navigation] { position:sticky; top:var(--hhx-adminbar-offset); bottom:auto; left:auto; width:100%; transform:none; padding:5px max(20px,calc((100% - 1180px)/2)); border-width:0 0 1px; border-radius:0; box-shadow:0 5px 18px #0002; }
  body.hhx-enabled.hhx-first-paint:not(.hhx-navigation-ready) [data-hhx-first-paint-navigation] a.hhx-unified-link { flex:1 1 8em; flex-direction:row; min-height:44px; gap:8px; padding:8px 12px; border-radius:9px; font-size:.875rem; }
  body.hhx-enabled.hhx-first-paint:not(.hhx-navigation-ready) [data-hhx-first-paint-navigation] a[aria-current]::after { bottom:0; }
}
@media(min-width:700px) and (max-width:782px) { body.hhx-enabled.hhx-first-paint.admin-bar { --hhx-adminbar-offset:46px; } }
@media(max-width:1024px) { body.hhx-enabled.hhx-first-paint:not(.hhx-navigation-ready) #masthead .search-toggle-open { top:12px; right:12px; } }
@media(max-width:360px) {
  body.hhx-enabled.hhx-first-paint:not(.hhx-navigation-ready) [data-hhx-first-paint-navigation] { width:calc(100% - 16px); padding-inline:4px; }
  body.hhx-enabled.hhx-first-paint:not(.hhx-navigation-ready) [data-hhx-first-paint-navigation] a.hhx-unified-link { padding-inline:4px; }
}
@media(max-width:349px) {
  body.hhx-enabled.hhx-first-paint:not(.hhx-masthead-ready) #masthead .site-header-inner-wrap .habs-league-scoreboard-label { grid-template-columns:minmax(0,1fr); }
  body.hhx-enabled.hhx-first-paint:not(.hhx-masthead-ready) #masthead .site-header-inner-wrap .habs-league-scoreboard-label .hh-score-dates { grid-column:1; grid-row:2; }
}
@media print { body.hhx-enabled.hhx-first-paint [data-hhx-first-paint-navigation] { display:none!important; } }

/* The roster cover and compact native list are real first-response content.
   Retire only the duplicate heading after the permanent cover's CSS is present;
   missing scripts leave ordinary player links, search and native panels usable. */
body.hhx-enabled.hhx-first-paint.hhx-site-data.hhx-site-context-players #primary .habs-roster-hub:has(> [data-hhx-server-club-cover]) > .habs-section-heading { display:none; }
body.hhx-enabled.hhx-first-paint.hhx-site-data.hhx-site-context-players:not(.hhx-roster-cards-ready) #primary .hh-roster-identity::before { display:none; }
body.hhx-enabled.hhx-first-paint.hhx-site-data.hhx-site-context-players:not(.hhx-roster-cards-ready) #primary .hh-roster-portrait::after { display:none; }
/* The original directory links stay useful without enhancement, after the
   roster instead of briefly displacing its tabs. The header already contains
   the same result count; retain the live region for assistive technology. */
body.hhx-enabled.hhx-first-paint.hhx-site-data.hhx-site-context-players #primary .habs-roster-hub > .hh-section-links { order:4; margin:0; padding:20px 24px; }
body.hhx-enabled.hhx-first-paint.hhx-site-data.hhx-site-context-players #primary [data-habs-roster]:has(.habs-roster-section-heading .habs-season-pill) .habs-roster-result-count { position:absolute; width:1px; height:1px; margin:-1px; padding:0; border:0; overflow:hidden; clip:rect(0,0,0,0); clip-path:inset(50%); white-space:nowrap; }
