/* Header proposal "Rail" (?header=rail): one dark bar (brand · tabs · tools) split by two lime slants,
   and a trapezoid crest row hanging below it on every tab except Übersicht. Scrolling keeps only the
   middle: the tabs and the crest row. Crest behaviour lives in header-rail.js. */
@media (min-width:900px){
  html[data-header=rail][data-menu] body .masthead.masthead{--hr-lime:#a6e84a;--hr-fill:linear-gradient(180deg,#121614f5,#0b0e0cf7);--hr-line:#ffffff1f}
  /* Top bar: one panel behind all three parts. */
  html[data-header=rail][data-menu] body .masthead.masthead .masthead-inner{position:relative;isolation:isolate;gap:0!important;grid-template-columns:minmax(0,1fr) auto minmax(0,1fr)!important}
  html[data-header=rail][data-menu] body .masthead.masthead .masthead-inner::before{content:'';position:absolute;inset:0;z-index:-1;border:1px solid var(--hr-line);border-radius:18px;background:var(--hr-fill);box-shadow:0 18px 40px -18px #000c;transition:opacity .2s ease}
  html[data-header=rail][data-menu] body .masthead.masthead :is(.masthead-brand,.masthead-nav,.masthead-tools){position:relative;height:60px!important;background:none!important;border:0!important;border-radius:0!important;box-shadow:none!important;backdrop-filter:none!important;-webkit-backdrop-filter:none!important}
  html[data-header=rail][data-menu] body .masthead.masthead .masthead-brand{justify-self:stretch!important;padding:0 64px 0 26px!important}
  html[data-header=rail][data-menu] body .masthead.masthead .masthead-tools{justify-self:stretch!important;justify-content:flex-end;padding:0 18px 0 64px!important;gap:6px!important}
  /* The two lime slants between the parts. */
  html[data-header=rail][data-menu] body .masthead.masthead :is(.masthead-brand,.masthead-tools)::after{content:'';position:absolute;top:-1px;bottom:-1px;width:3px;border-radius:2px;background:var(--hr-lime);box-shadow:0 0 12px #a6e84a99;pointer-events:none}
  html[data-header=rail][data-menu] body .masthead.masthead .masthead-brand::after{right:22px;transform:skewX(-28deg)}
  html[data-header=rail][data-menu] body .masthead.masthead .masthead-tools::after{left:22px;transform:skewX(28deg)}
  html[data-header=rail][data-menu] body .masthead.masthead .masthead-brand .wordmark{font-size:30px!important;color:#fff!important}
  html[data-header=rail][data-menu] body .masthead.masthead .masthead-brand .brand-rule{height:28px!important;margin:0 20px!important;background:#ffffff26!important}
  /* Tabs: plain text, the active one white with a lime bar. */
  html[data-header=rail][data-menu] body .masthead.masthead .masthead-nav{gap:clamp(4px,1.6vw,26px)!important;padding:0 8px!important}
  html[data-header=rail][data-menu] body .masthead.masthead .masthead-nav.ui-tabs::before{display:none!important}
  html[data-header=rail][data-menu] body .masthead.masthead .main-nav-link{position:relative;height:60px!important;display:inline-flex!important;align-items:center;padding:0 12px!important;border-radius:0!important;background:none!important;color:#b9c0bb!important;font:500 15px/1 Inter,Arial,sans-serif!important;letter-spacing:0!important;text-transform:none!important;box-shadow:none!important}
  html[data-header=rail][data-menu] body .masthead.masthead .main-nav-link:hover{color:#fff!important}
  html[data-header=rail][data-menu] body .masthead.masthead .main-nav-link:is(.active,[aria-current=page]){color:#fff!important;font-weight:700!important}
  html[data-header=rail][data-menu] body .masthead.masthead .main-nav-link:is(.active,[aria-current=page])::after{content:''!important;display:block!important;opacity:1!important;visibility:visible!important;position:absolute!important;top:auto!important;left:8px!important;right:8px!important;bottom:9px!important;width:auto!important;margin:0!important;height:3px!important;border-radius:2px!important;background:var(--hr-lime)!important;box-shadow:0 0 10px #a6e84a80!important;transform:none!important}
  html[data-header=rail][data-menu] body .masthead.masthead .masthead-tools :is(.tool-button,.status-key>summary){width:40px!important;height:40px!important;border:0!important;background:none!important;color:#e6ebe7!important;box-shadow:none!important}
  html[data-header=rail][data-menu] body .masthead.masthead .masthead-tools .profile-trigger{width:44px!important;height:44px!important;border-radius:50%!important}

  /* Crest row: a trapezoid with lime slants, hanging under the bar. */
  html[data-header=rail] body .masthead .club-rail{position:relative;isolation:isolate;display:block;width:min(1560px,80%);height:68px;margin:-1px auto 0}
  html[data-header=rail] body .masthead .club-rail::before,html[data-header=rail] body .masthead .club-rail::after{content:'';position:absolute;z-index:-1;pointer-events:none}
  html[data-header=rail] body .masthead .club-rail::before{inset:0;background:linear-gradient(90deg,var(--hr-lime) 0 44px,var(--hr-line) 44px calc(100% - 44px),var(--hr-lime) calc(100% - 44px));clip-path:polygon(0 0,100% 0,calc(100% - 34px) 100%,34px 100%);filter:drop-shadow(0 0 0 transparent)}
  html[data-header=rail] body .masthead .club-rail::after{inset:1px 0 1px;background:var(--hr-fill);clip-path:polygon(3.5px 0,calc(100% - 3.5px) 0,calc(100% - 35px) 100%,35px 100%)}
  html[data-header=rail] body .masthead .club-rail-track{display:flex;align-items:center;justify-content:space-between;gap:2px;height:100%;padding:0 58px}
  html[data-header=rail] body .masthead .club-rail button{position:relative;display:grid;place-items:center;flex:0 1 auto;min-width:0;width:clamp(36px,3.4vw,50px);height:50px;padding:0;border:1px solid transparent;border-radius:10px;background:none;color:#cfd6d1;cursor:pointer;transition:background .15s,border-color .15s}
  html[data-header=rail] body .masthead .club-rail button img{width:clamp(24px,2.1vw,32px);height:clamp(24px,2.1vw,32px);object-fit:contain}
  html[data-header=rail] body .masthead .club-rail button:hover{background:#ffffff0d}
  html[data-header=rail] body .masthead .club-rail button[aria-pressed=true]{background:linear-gradient(180deg,#a6e84a2e,#a6e84a12);border-color:#a6e84a55}
  html[data-header=rail] body .masthead .club-rail button[aria-pressed=true]::after{content:'';position:absolute;left:8px;right:8px;bottom:-1px;height:3px;border-radius:2px;background:var(--hr-lime)}
  html[data-header=rail][data-rail-visible=false] body .masthead .club-rail{display:none}
  /* Room for the crest row; the in-page crest rows give way to it. */
  html[data-header=rail][data-rail-visible=true] body #workspace{padding-top:170px!important}
  html[data-header=rail] body #page-aufstellungen nav.bl-clubs,html[data-header=rail] body #page-community .dc-club-scroll{display:none!important}

  /* Scrolled: brand and tools leave (as before); the tabs keep their own panel above the crest row. */
  html[data-header=rail][data-menu] body .masthead.masthead.is-scrolled:not(:has([data-league-toggle][aria-expanded=true])) .masthead-inner::before{opacity:0}
  html[data-header=rail][data-menu] body .masthead.masthead.is-scrolled:not(:has([data-league-toggle][aria-expanded=true])) .masthead-nav{background:var(--hr-fill)!important;border:1px solid var(--hr-line)!important;border-bottom:0!important;border-radius:16px 16px 0 0!important;padding:0 18px!important}
}
@media (max-width:899px){html[data-header=rail] body .masthead .club-rail{display:none}}
/* Narrower windows: tighter parts; below 1100px the league shows only its logo. */
@media (min-width:900px) and (max-width:1240px){
  html[data-header=rail][data-menu] body .masthead.masthead .masthead-brand{padding:0 46px 0 18px!important}
  html[data-header=rail][data-menu] body .masthead.masthead .masthead-tools{padding:0 10px 0 46px!important;gap:2px!important}
  html[data-header=rail][data-menu] body .masthead.masthead .masthead-brand::after{right:14px}
  html[data-header=rail][data-menu] body .masthead.masthead .masthead-tools::after{left:14px}
  html[data-header=rail][data-menu] body .masthead.masthead .masthead-brand .wordmark{font-size:24px!important}
  html[data-header=rail][data-menu] body .masthead.masthead .masthead-brand .brand-rule{margin:0 12px!important}
  html[data-header=rail][data-menu] body .masthead.masthead .masthead-nav{gap:0!important;padding:0!important}
  html[data-header=rail][data-menu] body .masthead.masthead .main-nav-link{padding:0 9px!important;font-size:14px!important}
  html[data-header=rail][data-menu] body .masthead.masthead .masthead-tools :is(.tool-button,.status-key>summary){width:34px!important;height:34px!important}
  html[data-header=rail][data-menu] body .masthead.masthead .masthead-tools .profile-trigger{width:38px!important;height:38px!important}
  html[data-header=rail] body .masthead .club-rail{width:86%}
}
@media (min-width:900px) and (max-width:1100px){
  html[data-header=rail][data-menu] body .masthead.masthead .team-switch-text{display:none!important}
}

/* Reference treatment: softly rounded graphite wings with a recessed central spine.
   Artwork is SVG chrome only; all labels, controls and focus targets stay live HTML. */
@media (min-width:900px){
 html[data-header=rail][data-menu] body .masthead.masthead{
  --hr-lime:#b2ee5a;--hr-fill:linear-gradient(180deg,#1a1a1a,#0a0a0a 55%,#1a1a1a);--hr-line:#bdbdbd2e;
  top:12px!important;left:16px!important;right:16px!important;transform:none!important;
  pointer-events:none;
 }
 html[data-header=rail] .masthead :is(.masthead-brand,.masthead-nav,.masthead-tools,.club-rail){pointer-events:auto}
 html[data-header=rail][data-menu] body .masthead.masthead .masthead-inner{
  grid-template-columns:minmax(260px,1fr) minmax(530px,1.85fr) minmax(180px,.8fr)!important;
  height:clamp(52px,3.9vw,64px)!important;align-items:stretch!important;
 }
 html[data-header=rail][data-menu] body .masthead.masthead .masthead-inner::before{
  inset:1px 6% 1px;border-radius:18px;background:linear-gradient(180deg,#1a1a1a,#0a0a0a 55%,#1a1a1a);
  border-color:#bdbdbd30;box-shadow:inset 0 1px 0 #d9eff508,0 12px 30px #0005;
 }
 html[data-header=rail][data-menu] body .masthead.masthead :is(.masthead-brand,.masthead-nav,.masthead-tools){height:100%!important;min-width:0;isolation:isolate}
 html[data-header=rail][data-menu] body .masthead.masthead :is(.masthead-brand,.masthead-tools)::before{
  content:'';display:block!important;position:absolute;inset:0 -20px 0 0;z-index:-1;
  background:url('assets/header/wing.svg?v=3') center/100% 100% no-repeat;pointer-events:none;
 }
 html[data-header=rail][data-menu] body .masthead.masthead .masthead-tools::before{inset:0 0 0 -20px;transform:scaleX(-1)}
 html[data-header=rail][data-menu] body .masthead.masthead :is(.masthead-brand,.masthead-tools)::after{display:none!important}
 html[data-header=rail][data-menu] body .masthead.masthead .masthead-brand{padding:0 30px 0 24px!important}
 html[data-header=rail][data-menu] body .masthead.masthead .masthead-brand .wordmark{font-size:clamp(26px,2.1vw,36px)!important;letter-spacing:-.055em!important;text-shadow:0 2px 3px #0006}
 html[data-header=rail][data-menu] body .masthead.masthead .masthead-brand .brand-rule{height:26px!important;margin:0 20px!important;background:#adbec32a!important}
 html[data-header=rail][data-menu] body .masthead.masthead .team-switch-name{font-size:clamp(12px,1.1vw,18px)!important;max-width:180px}
 html[data-header=rail][data-menu] body .masthead.masthead .masthead-tools{padding:0 22px 0 32px!important;gap:12px!important}
 html[data-header=rail][data-menu] body .masthead.masthead .masthead-tools .profile-trigger{background:linear-gradient(145deg,#182126,#0b1013)!important;border:1.5px solid #c2cbd180!important;color:#fff!important}
 html[data-header=rail][data-menu] body .masthead.masthead .masthead-nav{width:100%;justify-content:space-evenly;gap:0!important;padding:0 16px!important;align-self:stretch}
 html[data-header=rail][data-menu] body .masthead.masthead .main-nav-link{height:100%!important;padding:0 12px!important;font-size:clamp(13px,1.05vw,18px)!important;color:#adb4b7!important;white-space:nowrap}
 html[data-header=rail][data-menu] body .masthead.masthead .main-nav-link:is(.active,[aria-current=page])::after{bottom:6px!important;left:5px!important;right:5px!important;height:3px!important;box-shadow:0 0 9px #b2ee5a45!important}
 html[data-header=rail] body .masthead .club-rail{width:84%;height:clamp(52px,3.9vw,64px);margin:-2px auto 0;filter:drop-shadow(0 12px 18px #0003)}
 html[data-header=rail] body .masthead .club-rail::before{inset:0;background:url('assets/header/club-tray.svg?v=3') center/100% 100% no-repeat;clip-path:none;filter:none}
 html[data-header=rail] body .masthead .club-rail::after{display:none}
 html[data-header=rail] body .masthead .club-rail-track{padding:0 4.5%;gap:3px;overflow-x:auto;scrollbar-width:none}
 html[data-header=rail] body .masthead .club-rail-track::-webkit-scrollbar{display:none}
 html[data-header=rail] body .masthead .club-rail button{flex:1 0 36px;height:calc(100% - 8px);max-width:64px;border-radius:9px;transition:background .18s,border-color .18s,transform .18s}
 html[data-header=rail] body .masthead .club-rail button img{width:clamp(26px,2vw,32px);height:clamp(26px,2vw,32px);filter:drop-shadow(0 2px 3px #0006)}
 html[data-header=rail] body .masthead .club-rail button:hover{background:#b2ee5a12;transform:translateY(-2px)}
 html[data-header=rail] body .masthead .club-rail button[aria-pressed=true]{background:linear-gradient(180deg,#b9ec6818,#a2d7460b);border-color:#b7ee6a24;box-shadow:inset 0 1px 0 #d3ff8810}
 html[data-header=rail] body .masthead .club-rail button:focus-visible{outline:2px solid var(--hr-lime);outline-offset:-3px}
 html[data-header=rail][data-rail-visible=true] body #workspace{padding-top:clamp(136px,9.8vw,160px)!important}
 html[data-header=rail][data-menu] body .masthead.masthead.is-scrolled .masthead-nav{padding:0 16px!important;background:var(--hr-fill)!important;border:1px solid var(--hr-line)!important;border-radius:16px!important;box-shadow:0 8px 30px #0005!important}
 html[data-header=rail][data-menu] body .masthead.masthead.is-scrolled :is(.masthead-brand,.masthead-tools):focus-within{opacity:1!important;visibility:visible!important;pointer-events:auto!important;transform:none!important}
}
@media (min-width:900px) and (max-width:1199px){
 html[data-header=rail][data-menu] body .masthead.masthead .masthead-inner{grid-template-columns:minmax(180px,1fr) minmax(500px,2.4fr) minmax(140px,.75fr)!important}
 html[data-header=rail][data-menu] body .masthead.masthead .masthead-brand{padding-left:16px!important;padding-right:24px!important}
 html[data-header=rail][data-menu] body .masthead.masthead .masthead-brand .brand-rule{margin:0 12px!important}
 html[data-header=rail][data-menu] body .masthead.masthead .team-switch-text{display:none!important}
 html[data-header=rail][data-menu] body .masthead.masthead .team-switch .league-logo{display:grid!important}
 html[data-header=rail][data-menu] body .masthead.masthead .masthead-tools{gap:2px!important;padding:0 12px 0 22px!important}
 html[data-header=rail][data-menu] body .masthead.masthead .masthead-nav{padding:0 6px!important}
 html[data-header=rail][data-menu] body .masthead.masthead .main-nav-link{padding:0 8px!important}
 html[data-header=rail] body .masthead .club-rail{width:92%}
}
@media (max-width:899px){
 html[data-header=rail][data-menu] body .masthead.masthead{height:auto!important;transform:none!important}
 html[data-header=rail] body .masthead .club-rail{display:block;background:linear-gradient(#11191d,#202b30);border-bottom:1px solid #aee95755}
 html[data-header=rail][data-rail-visible=false] body .masthead .club-rail{display:none}
 html[data-header=rail] body .masthead .club-rail-track{display:flex;align-items:center;gap:5px;overflow-x:auto;padding:3px 12px;scrollbar-width:none}
 html[data-header=rail] body .masthead .club-rail button{flex:0 0 44px;height:44px;border:1px solid transparent;border-radius:9px;color:#dce5d4;background:transparent}
 html[data-header=rail] body .masthead .club-rail button img{width:29px;height:29px;object-fit:contain}
 html[data-header=rail] body .masthead .club-rail button[aria-pressed=true]{background:#a6e84a25;border-color:#a6e84a66}
 html[data-header=rail] body .masthead .club-rail button:focus-visible{outline:2px solid #b2ee5a;outline-offset:-2px}
}
@media(prefers-reduced-motion:reduce){
 html[data-header=rail] .masthead *{transition:none!important;scroll-behavior:auto!important}
}

@media(min-width:900px){
 html[data-header=rail][data-menu] body .masthead.masthead .league-picker{display:block!important}
 html[data-header=rail][data-menu] body .masthead.masthead .brand-rule{display:block!important}
}
@media(max-width:899px){
 html[data-header=rail] body #page-aufstellungen nav.bl-clubs,
 html[data-header=rail] body #page-community .dc-club-scroll{display:none!important}
}

@media(min-width:900px){
 html[data-header=rail][data-menu] body .masthead.masthead .nav-menu{display:none!important}
}
@media(min-width:900px) and (max-width:1199px){
 html[data-header=rail][data-menu] body .masthead.masthead .masthead-tools .status-key{display:none!important}
}

/* Fine club separators and restrained lighting keep the compact rail legible. */
@media(min-width:900px){
 html[data-header=rail] body .masthead .club-rail button+button::before{content:'';position:absolute;left:-2px;top:24%;bottom:24%;width:1px;background:linear-gradient(transparent,#a7b7bc26,transparent);pointer-events:none}
 html[data-header=rail] body .masthead .club-rail button[aria-pressed=true]::after{left:25%;right:25%;height:2px;box-shadow:0 0 7px #b2ee5a55}
 html[data-header=rail][data-menu] body .masthead.masthead .masthead-tools .profile-trigger{margin-left:12px;position:relative}
 html[data-header=rail][data-menu] body .masthead.masthead .masthead-tools .profile-trigger::before{content:'';position:absolute;left:-14px;top:8px;bottom:8px;width:1px;background:#91a2aa30}
 html[data-header=rail][data-menu] body .masthead.masthead .main-nav-link{transition:color .18s ease}
 html[data-header=rail][data-menu] body .masthead.masthead .main-nav-link:is(.active,[aria-current=page])::after{box-shadow:0 0 5px #b2ee5a70,0 3px 12px #b2ee5a20!important}
}
@media(min-width:900px) and (max-width:1199px){
 html[data-header=rail][data-menu] body .masthead.masthead .masthead-tools .profile-trigger{margin-left:5px}
 html[data-header=rail][data-menu] body .masthead.masthead .masthead-tools .profile-trigger::before{left:-7px}
}

/* Compact pass: a lower bar and crest row, tabs gathered in the middle, smaller type and controls. */
@media(min-width:900px){
 html[data-header=rail][data-menu] body .masthead.masthead{top:10px!important}
 html[data-header=rail][data-menu] body .masthead.masthead .masthead-inner{height:46px!important;grid-template-columns:minmax(220px,1fr) auto minmax(170px,1fr)!important}
 html[data-header=rail][data-menu] body .masthead.masthead .masthead-inner::before{border-radius:14px}
 html[data-header=rail][data-menu] body .masthead.masthead .masthead-brand{padding:0 26px 0 20px!important}
 html[data-header=rail][data-menu] body .masthead.masthead .masthead-brand .wordmark{font-size:25px!important}
 html[data-header=rail][data-menu] body .masthead.masthead .masthead-brand .brand-rule{height:20px!important;margin:0 14px!important}
 html[data-header=rail][data-menu] body .masthead.masthead .team-switch-name{font-size:14px!important}
 html[data-header=rail][data-menu] body .masthead.masthead .masthead-nav{width:auto;justify-content:center;gap:clamp(6px,1.4vw,22px)!important;padding:0 clamp(26px,3vw,48px)!important}
 html[data-header=rail][data-menu] body .masthead.masthead .main-nav-link{padding:0 8px!important;font-size:14px!important}
 html[data-header=rail][data-menu] body .masthead.masthead .main-nav-link:is(.active,[aria-current=page])::after{bottom:4px!important;height:2.5px!important}
 html[data-header=rail][data-menu] body .masthead.masthead .masthead-tools{gap:4px!important;padding:0 16px 0 26px!important}
 html[data-header=rail][data-menu] body .masthead.masthead .masthead-tools :is(.tool-button,.status-key>summary){width:32px!important;height:32px!important}
 html[data-header=rail][data-menu] body .masthead.masthead .masthead-tools :is(.tool-button,.status-key>summary) svg{width:18px;height:18px}
 html[data-header=rail][data-menu] body .masthead.masthead .masthead-tools .profile-trigger{width:34px!important;height:34px!important;margin-left:10px}
 html[data-header=rail][data-menu] body .masthead.masthead .masthead-tools .profile-trigger::before{left:-10px;top:6px;bottom:6px}
 html[data-header=rail] body .masthead .club-rail{width:min(1180px,74%);height:42px;margin-top:-1px}
 html[data-header=rail] body .masthead .club-rail-track{padding:0 5%;gap:2px}
 html[data-header=rail] body .masthead .club-rail button{flex:1 0 30px;max-width:48px;height:calc(100% - 8px);border-radius:7px}
 html[data-header=rail] body .masthead .club-rail button img{width:22px;height:22px}
 html[data-header=rail] body .masthead .club-rail button:hover{transform:translateY(-1px)}
 html[data-header=rail] body .masthead .club-rail button[aria-pressed=true]::after{bottom:0;height:2px}
 html[data-header=rail][data-rail-visible=true] body #workspace{padding-top:118px!important}
}
@media(min-width:900px) and (max-width:1199px){
 html[data-header=rail][data-menu] body .masthead.masthead .masthead-inner{grid-template-columns:minmax(120px,1fr) auto minmax(120px,1fr)!important}
 html[data-header=rail][data-menu] body .masthead.masthead .masthead-brand .wordmark{font-size:22px!important}
 html[data-header=rail][data-menu] body .masthead.masthead .masthead-nav{gap:2px!important;padding:0 22px!important}
 html[data-header=rail][data-menu] body .masthead.masthead .main-nav-link{padding:0 7px!important;font-size:13.5px!important}
 html[data-header=rail] body .masthead .club-rail{width:86%}
}
/* Side margins: the bar is capped so brand and tools sit closer to the tabs; the tabs and the
   crest row keep their size (the rail width is taken from the window, not from the narrower bar). */
@media(min-width:1200px){
 html[data-header=rail][data-menu] body .masthead.masthead{left:max(16px,calc((100vw - 1240px) / 2))!important;right:max(16px,calc((100vw - 1240px) / 2))!important}
 html[data-header=rail] body .masthead .club-rail{--rail-w:min(1180px,calc((100vw - 32px) * .74));width:var(--rail-w);margin-left:calc((100% - var(--rail-w)) / 2);margin-right:0}
}
/* A touch more room: taller bar. Cap 1250px, between the 1300 and 1200 he tried. */
@media(min-width:900px){
 html[data-header=rail][data-menu] body .masthead.masthead .masthead-inner{height:52px!important}
 html[data-header=rail][data-menu] body .masthead.masthead .main-nav-link:is(.active,[aria-current=page])::after{bottom:6px!important}
 html[data-header=rail][data-rail-visible=true] body #workspace{padding-top:124px!important}
}
@media(min-width:1200px){
 html[data-header=rail][data-menu] body .masthead.masthead{left:max(16px,calc((100vw - 1250px) / 2))!important;right:max(16px,calc((100vw - 1250px) / 2))!important}
}
/* Selected crest: only the neon line underneath, no tile around it. */
html[data-header=rail] body .masthead .club-rail button:is([aria-pressed=true],:hover){background:none!important;border-color:transparent!important;box-shadow:none!important}
/* Scrolling up always brings back the whole header (brand, tabs, tools; plus the crest row where it shows). */
@media(min-width:900px){
 html[data-header=rail][data-menu] body .masthead.masthead.is-scrolled :is(.masthead-brand,.masthead-tools){opacity:1!important;visibility:visible!important;pointer-events:auto!important;transform:none!important}
 html[data-header=rail][data-menu] body .masthead.masthead.is-scrolled .masthead-inner::before{opacity:1!important}
 html[data-header=rail][data-menu] body .masthead.masthead.is-scrolled .masthead-nav{background:none!important;border:0!important;border-radius:0!important;box-shadow:none!important;padding:0 clamp(26px,3vw,48px)!important;backdrop-filter:none!important;-webkit-backdrop-filter:none!important}
}

/* Same weight as the scroll rule above (it uses :not(:has())), so the middle stays exactly as at the top. */
@media(min-width:900px){
 html[data-header=rail][data-menu] body .masthead.masthead.is-scrolled:not(:has([data-league-toggle][aria-expanded=true])) .masthead-nav{background:none!important;border:0!important;border-radius:0!important;box-shadow:none!important;padding:0 clamp(26px,3vw,48px)!important;backdrop-filter:none!important;-webkit-backdrop-filter:none!important}
}
@media(min-width:900px) and (max-width:1199px){
 html[data-header=rail][data-menu] body .masthead.masthead.is-scrolled:not(:has([data-league-toggle][aria-expanded=true])) .masthead-nav{padding:0 22px!important}
}



/* With the crest row showing, the bar's dropdowns (legend ⓘ, league switcher) open below the crest row instead of
   sliding behind it: both stay fully visible. */
@media(min-width:900px){
 html[data-header=rail][data-rail-visible=true] body .masthead .status-key-panel{margin-top:47px!important}
 html[data-header=rail][data-rail-visible=true] body .masthead #league-menu{margin-top:43px!important}
 html[data-header=rail][data-rail-visible=true] body .masthead:has(.status-key[open],[data-league-toggle][aria-expanded=true]) .masthead-inner{z-index:3}
}

/* Scrolling down hides the whole header (bar and crest row), scrolling up brings it back; on every page and width.
   The rail rules above pin transform:none, so the hidden state needs its own !important. */
html[data-header=rail][data-menu] body .masthead.masthead{transition:transform .28s cubic-bezier(.2,.7,.2,1)!important}
html[data-header=rail][data-menu] body .masthead.masthead.is-nav-hidden{transform:translateY(calc(-100% - 40px))!important;pointer-events:none}
@media(prefers-reduced-motion:reduce){html[data-header=rail][data-menu] body .masthead.masthead{transition:none!important}}
