/* The desktop shell follows the width and navigation order of the competition preview. */
html[data-preview-shell] {
  --mast-width: 1280px;
  --mast-gutter: clamp(14px,2.25vw,30px);
  --mast-fill: #171c22;
  --mast-text: #f2f5f8;
  --mast-muted: #b8c4d0;
  --mast-rule: #38434e;
  --mast-accent: var(--brand-blue-300);
}
html[data-preview-shell][data-theme=light] {
  --mast-fill: #fff;
  --mast-text: #172433;
  --mast-muted: #415264;
  --mast-rule: #c5d5e9;
  --mast-accent: var(--brand-blue-700);
}
html[data-preview-shell] .site-masthead {
  font-family: var(--font-reading,system-ui,sans-serif);
  font-size: 14px;
  line-height: 1.25;
  color: var(--mast-text);
}
.site-masthead .mast-brand {
  order: 0; display: inline-flex; flex: none; align-items: center; justify-content: flex-start;
  width: 108px; height: 44px; margin: 0; padding: 0; text-decoration: none;
}
.site-masthead .mast-brand img { display:block; width:100%; height:auto; max-height:28px; }
.site-masthead .mast-brand :is(.mast-logo-light,.feedback-logo-light) { display: none; }
html[data-theme=light] .site-masthead .mast-brand :is(.mast-logo-light,.feedback-logo-light) {display:block}
html[data-theme=light] .site-masthead .mast-brand :is(.mast-logo-dark,.feedback-logo-dark) {display:none}
html[data-preview-shell] .site-masthead .mast-explore {
  order: 1; display: inline-flex; align-items:center; min-height:44px; margin:0; padding:0 2px;
  color:var(--mast-muted); background:transparent; border:0; border-bottom:2px solid transparent;
  border-radius:0; text-decoration:none; font:600 15px/1.15 var(--font-reading,system-ui,sans-serif);
}
html[data-preview-shell] .site-masthead .mast-explore[aria-current=page] {border-bottom-color:var(--mast-accent);color:var(--mast-text)}
html[data-preview-shell] body[data-palette] .site-masthead details.mast-menu {
  order:5;position:relative;flex:none;margin:0;padding:0;border:0;background:transparent;
}
html[data-preview-shell] body[data-palette] .site-masthead :is(.mast-explore,.mast-menu > summary)::after,
html[data-preview-shell] body[data-palette] .site-masthead .mast-menu > summary::before {content:none!important}
html[data-preview-shell] body[data-palette] .site-masthead #mast-all-pages[hidden] {display:none!important}
.site-masthead #mast-all-pages {padding:1px 0 5px 8px;border-inline-start:2px solid var(--mast-rule);margin:0 0 4px 6px}
.site-masthead .mast-analysis-links {padding-bottom:4px;border-bottom:1px solid var(--mast-rule);margin-bottom:4px}
.site-masthead .mast-pages-toggle::after {content:'+';margin-inline-start:auto;color:var(--mast-muted)}
.site-masthead .mast-pages-toggle[aria-expanded=true]::after {content:'−'}
html[data-preview-shell] .site-masthead .mast-menu > summary {
  display:inline-flex;justify-content:center;align-items:center;min-height:36px;box-sizing:border-box;
  padding:6px 14px;margin:0;border-radius:20px;border:1px solid var(--mast-rule);
  background:transparent;color:var(--mast-text);cursor:pointer;
  font:600 14px/1.1 var(--font-reading,system-ui,sans-serif);text-decoration:none;list-style:none;white-space:nowrap;
}
.site-masthead .mast-menu > summary::-webkit-details-marker {display:none}
.site-masthead .mast-menu[open] > summary,
.site-masthead .mast-explore:hover {color:var(--mast-accent)}
.site-masthead .mast-menu > nav {
  position:absolute;top:calc(100% + 6px);right:0;z-index:12;width:min(272px,calc(100vw - 32px));
  display:grid;gap:0;max-height:min(65dvh,580px);overflow:auto;overscroll-behavior:contain;
  padding:4px 12px;border:1px solid var(--mast-rule);border-radius:9px;
  background:var(--mast-fill);color:var(--mast-text);box-shadow:0 8px 25px #09121c2b;
}
.site-masthead .mast-menu:not([open]) > nav {display:none}
.site-masthead .mast-menu nav > div {padding:4px 0}
.site-masthead .mast-menu nav > div + div {border-top:1px solid var(--mast-rule)}
html[data-preview-shell] .site-masthead .mast-menu nav :is(a,button) {
  display:flex;width:100%;min-height:34px;align-items:center;justify-content:flex-start;
  margin:0;padding:5px 7px;box-sizing:border-box;border:0;border-radius:4px;
  color:var(--mast-text);background:none;text-align:start;text-decoration:none;cursor:pointer;
  font:500 14px/1.25 var(--font-reading,system-ui,sans-serif);
}
html[data-preview-shell] .site-masthead .mast-menu nav :is(a,button):is(:hover,:focus-visible) {
  background:color-mix(in srgb,var(--mast-accent) 13%,var(--mast-fill));
}
html[data-preview-shell] .site-masthead :is(a,button,summary):focus-visible {
  outline:2px solid var(--mast-accent);outline-offset:-2px;
}
html[data-preview-shell] body[data-palette] .site-masthead .journey-navigation {
  order:3;gap:0;margin:0;flex:none;border:1px solid var(--mast-rule);border-radius:7px;overflow:hidden;
}
html[data-preview-shell] body[data-palette] .site-masthead .journey-navigation :is(#journey-back,#journey-forward) {
  min-height:34px;border:0;border-radius:0;padding:5px 10px;background:transparent;color:var(--mast-text);
  font:500 14px/1.15 var(--font-reading,system-ui,sans-serif);
}
html[data-preview-shell] body[data-palette] .site-masthead .journey-navigation #journey-forward {border-inline-start:1px solid var(--mast-rule)}
html[data-preview-shell] body[data-palette] .site-masthead .journey-navigation :is(.journey-start,[data-refresh-app]) {display:none!important}
html[data-preview-shell] body[data-palette] .site-masthead .mobile-update-tools,
html[data-preview-shell] body[data-palette] .feedback-header.site-masthead > [data-release-stamp] {
  order:2;flex:0 1 auto;margin:0 0 0 auto;text-align:right;color:var(--mast-muted);
}
html[data-preview-shell] body[data-palette] .site-masthead .mobile-update-tools #site-last-updated {
  margin:0;color:var(--mast-muted);text-align:end;font:500 12px/1.25 var(--font-reading,system-ui,sans-serif);
}
.site-masthead .mobile-update-tools time {display:block}
html[data-preview-shell] body[data-palette] .site-masthead #theme {
  order:4;flex:none;min-width:36px;width:36px;min-height:36px;height:36px;margin:0;padding:7px;
  border-radius:50%;border:1px solid var(--mast-rule);background:transparent;color:var(--mast-text);
}
.site-masthead #theme span {display:none}
.site-masthead #theme svg {width:18px;height:18px;flex:none}
.site-masthead .install-app-top {order:4;}
.site-masthead .install-app-top:not(:has(button:not([hidden]))) {display:none}
html[data-preview-shell] body[data-palette] .site-masthead :is(.section-switcher,.breadcrumb) {display:none!important}
html[data-preview-shell] body[data-palette] .feedback-header.site-masthead {
  position:sticky;top:0;z-index:55;box-sizing:border-box;display:flex;align-items:center;justify-content:flex-start;
  width:min(100%,var(--mast-width));min-height:56px;margin:0 auto;padding:4px var(--mast-gutter);gap:12px;
  border:0;border-bottom:1px solid var(--mast-rule);border-radius:0;background:var(--mast-fill);
}
@media(min-width:761px) {
  html[data-preview-shell] .site-masthead .mast-menu nav .mast-mobile-only {display:none!important}
  html[data-preview-shell][data-theme] {--journey-height:56px;--analysis-strip-height:40px}
  html[data-preview-shell][data-theme][data-analysis-navigation][data-table-navigation] {
    --table-heading-top:calc(var(--pinned-masthead,var(--journey-height)) + var(--pinned-sections,var(--analysis-strip-height)));
  }
  html[data-preview-shell] body[data-palette] aside#site-navigation {display:none!important}
  html[data-preview-shell][data-theme] body[data-palette] #main {
    width:min(100%,var(--mast-width));max-width:var(--mast-width);min-width:0;margin:0 auto!important;
    padding:0 var(--mast-gutter) 22px!important;box-sizing:border-box;
  }
  html[data-preview-shell][data-theme] body[data-palette] #main > header.site-masthead {
    box-sizing:border-box;display:flex!important;align-items:center;justify-content:flex-start;gap:12px;
    position:sticky;top:0;z-index:55;width:auto;height:auto!important;min-height:var(--journey-height)!important;
    margin:0;padding:0 12px!important;
    background:var(--mast-fill);border:0;border-bottom:1px solid var(--mast-rule);border-radius:0;box-shadow:none;overflow:visible;
  }
  html[data-preview-shell][data-analysis-navigation] body[data-palette] #main>.analysis-navigation-top:not([hidden]) {
    height:var(--analysis-strip-height);top:var(--pinned-masthead,var(--journey-height));z-index:50;padding:0;
    margin:0;border:0;border-bottom:1px solid var(--mast-rule);background:var(--mast-fill);
  }
  #main>.analysis-navigation-top :is(a,button) {font-family:var(--font-reading,system-ui,sans-serif);font-size:14px}
  html[data-preview-shell] #main>.analysis-navigation-top :is(a,button)[aria-current=page]{border-bottom-color:var(--nav-marker);color:var(--mast-text)}
}
@media(max-width:760px) {
  html[data-preview-shell][data-theme][data-table-navigation] {
    --journey-height:var(--mobile-header-size,64px)!important;
    --table-heading-top:var(--mobile-header-size,64px)!important;
  }
  html[data-preview-shell][data-theme][data-table-navigation]:not([data-current-page=welcome]) body[data-palette]:has(#main) {
    padding-top:var(--mobile-header-size,64px)!important;
  }
  html[data-preview-shell][data-theme] body[data-palette] #main {padding-top:0!important}
  html[data-preview-shell][data-analysis-navigation][data-table-navigation][data-current-page=welcome] body[data-palette] {
    padding-bottom:var(--mobile-bottom-nav-size,64px)!important;
  }
  html[data-preview-shell][data-analysis-navigation][data-table-navigation][data-current-page=welcome] body[data-palette] .app-bottom-nav.analysis-navigation:not([hidden]) {
    display:grid!important;
  }
  html[data-preview-shell][data-theme] body[data-palette] aside#site-navigation {display:none!important}
  html[data-preview-shell][data-theme] body[data-palette] #main > header.site-masthead,
  html[data-preview-shell] body[data-palette] .feedback-header.site-masthead {
    position:fixed;inset:0 0 auto;z-index:60;box-sizing:border-box;min-width:0;
    display:grid!important;grid-template-columns:auto auto minmax(0,1fr) auto auto;
    grid-template-rows:42px auto;align-items:center;gap:0 clamp(4px,1.2vw,8px);
    width:100%;height:auto!important;min-height:0!important;
    padding:calc(2px + env(safe-area-inset-top,0px)) max(10px,env(safe-area-inset-right,0px)) 4px max(10px,env(safe-area-inset-left,0px))!important;
    margin:0;background:var(--mast-fill);border-radius:0;border:0;border-bottom:1px solid var(--mast-rule);
    box-shadow:none;overflow:visible;
  }
  html[data-preview-shell] body[data-palette] .feedback-header.site-masthead {position:sticky}
  .site-masthead .mast-brand {grid-area:1/1;width:clamp(72px,22.5vw,104px);height:42px}
  html[data-preview-shell] .site-masthead .mast-explore,
  html[data-preview-shell] .site-masthead .mast-explore[aria-current=page] {
    grid-area:1/2;display:inline-flex;align-items:center;min-height:36px;padding:4px 11px;
    box-sizing:border-box;border:1px solid color-mix(in srgb,var(--mast-accent) 65%,var(--mast-fill));
    border-radius:20px;color:var(--mast-accent);background:color-mix(in srgb,var(--mast-accent) 10%,var(--mast-fill));
    font-size:14px;
  }
  html[data-preview-shell] .site-masthead .mast-explore[aria-current=page] {
    background:var(--mast-accent);color:var(--mast-fill);
  }
  html[data-preview-shell] body[data-palette] .site-masthead .journey-navigation {
    grid-area:1/4;display:flex!important;justify-self:end;position:static;padding:0;align-items:center;min-width:0;
  }
  html[data-preview-shell] body[data-palette] .site-masthead .journey-navigation :is(#journey-back,#journey-forward) {
    display:inline-flex;justify-content:center;align-items:center;gap:3px;width:auto;min-width:36px;
    height:36px;min-height:36px;padding:0 5px;
  }
  .site-masthead .journey-navigation button:disabled {opacity:.55}
  html[data-preview-shell] body[data-palette] .site-masthead .journey-navigation .journey-label {display:none}
  .site-masthead .mast-menu {grid-area:1/5;justify-self:end}
  html[data-preview-shell] .site-masthead .mast-menu > summary {min-height:36px;padding:4px 11px;font-size:14px}
  html[data-preview-shell] body[data-palette] .site-masthead :is(#theme,.install-app-top) {display:none!important}
  html[data-preview-shell][data-theme] body[data-palette] .site-masthead .mobile-update-tools,
  html[data-preview-shell] body[data-palette] .feedback-header.site-masthead > [data-release-stamp] {
    grid-area:2/1/3/-1;justify-self:end;margin:0;text-align:end;
  }
  html[data-preview-shell][data-theme] body[data-palette] .site-masthead .mobile-update-tools {display:flex!important}
  html[data-preview-shell] body[data-palette] .site-masthead .mobile-update-tools #site-last-updated,
  html[data-preview-shell] body[data-palette] .feedback-header.site-masthead > [data-release-stamp] {
    font-size:11px;line-height:1.3;white-space:normal;text-align:end;
  }
  html[data-preview-shell] body[data-palette] .site-masthead :is(#site-last-updated,[data-release-stamp]) time {display:inline}
  html[data-preview-shell] .site-masthead .mast-menu nav :is(a,button) {min-height:44px}
  html[data-preview-shell] .site-masthead .mast-menu nav [hidden] {display:none!important}
  .site-masthead .mast-menu > nav {width:min(272px,calc(100vw - 24px))}
}
@media(min-width:440px) and (max-width:760px) {
  html[data-preview-shell] body[data-palette] .site-masthead .journey-navigation .journey-label {display:inline}
  html[data-preview-shell] body[data-palette] .site-masthead .journey-navigation :is(#journey-back,#journey-forward) {flex:0 0 auto;padding-inline:8px}
}
@media(max-width:359px) {
  html[data-preview-shell] body[data-palette] .site-masthead .journey-navigation :is(#journey-back,#journey-forward) {width:34px;min-width:34px;padding:0}
  html[data-preview-shell] body[data-palette] .site-masthead :is(.mast-explore,.mast-menu > summary) {padding-inline:8px;font-size:13px}
}

/* Keep the original wordmark and tint only the 90 on each section. */
html[data-preview-shell] .site-masthead .mast-brand {position:relative}
.site-masthead .mast-brand img {clip-path:inset(0 0 0 42%)}
.site-masthead .mast-brand::before {
  content:'';position:absolute;left:0;top:50%;transform:translateY(-50%);width:100%;aspect-ratio:760/171;
  clip-path:inset(0 58% 0 0);background:var(--selection-ink,var(--mast-accent));
  mask:url('/assets/ninety-index/brand-logo-dark.svg') center/contain no-repeat;
}
html[data-current-page="welcome"] .site-masthead .mast-brand img {clip-path:none}
html[data-current-page="welcome"] .site-masthead .mast-brand::before {content:none}
html[data-preview-shell] body[data-palette] .site-masthead #theme {display:none!important}
.site-masthead .mast-actions {order:4;display:flex;align-items:center;gap:3px}
html[data-preview-shell] body[data-palette] .site-masthead .mast-actions button {
  display:grid;place-items:center;width:38px;height:38px;min-height:0;padding:0;margin:0;
  border:1px solid var(--mast-rule);border-radius:50%;background:transparent;color:var(--mast-text);cursor:pointer;
}
.site-masthead .mast-actions svg {width:17px;height:17px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
.site-masthead .mast-actions button:hover {color:var(--mast-accent)}
@media(max-width:760px){
  html[data-preview-shell][data-theme] body[data-palette] :is(#main > header,.feedback-header).site-masthead {grid-template-columns:auto minmax(0,1fr) auto auto auto}
  .site-masthead .mast-actions {grid-area:1/3}
  html[data-preview-shell] body[data-palette] .site-masthead .mast-actions button {width:34px;height:36px;border:0}
}
@media(max-width:380px){
  html[data-preview-shell][data-theme] body[data-palette] :is(#main > header,.feedback-header).site-masthead {column-gap:2px}
  .site-masthead .mast-actions {gap:0}
}


@media(max-width:540px) {
  html[data-preview-shell][data-theme] body[data-palette] :is(#main > header,.feedback-header).site-masthead {
    grid-template-columns:auto minmax(0,1fr) auto auto;grid-template-rows:38px auto;
  }
  html[data-preview-shell] body[data-palette] .site-masthead .mast-actions {grid-area:1/2;justify-self:end}
  html[data-preview-shell] body[data-palette] .site-masthead .journey-navigation {grid-area:1/3}
  html[data-preview-shell] body[data-palette] .site-masthead .mast-menu {grid-area:1/4}
  html[data-preview-shell][data-theme] body[data-palette] .site-masthead :is(.mobile-update-tools,[data-release-stamp]:not(#site-last-updated)) {grid-area:2/1/3/-1}
}

.site-masthead .mast-menu nav > div:last-child:not(:has(button:not([hidden]))) {display:none}

.site-masthead .mast-brand img {transform:translateY(-6px);}
html[data-preview-shell] .site-masthead .mast-brand::before {top:calc(50% - 6px);}
.site-masthead .mast-home-label {position:absolute;bottom:0;left:0;font:600 12px/1 var(--font-ui);color:var(--mast-muted);}
.site-masthead .mast-brand:hover .mast-home-label {color:var(--selection-ink,var(--mast-accent));text-decoration:underline;}

@media (min-width:541px) and (max-width:760px) and (max-height:480px) {
  html[data-preview-shell][data-theme] body[data-palette] :is(#main > header,.feedback-header).site-masthead {
    grid-template-rows:40px;padding-block:env(safe-area-inset-top,0px) 1px!important;
  }
  html[data-preview-shell][data-theme] body[data-palette] .site-masthead .mobile-update-tools,
  html[data-preview-shell][data-theme] body[data-palette] .feedback-header.site-masthead > [data-release-stamp] {
    grid-area:1/2;align-self:center;
  }
}

@media (max-width:540px) {
  html[data-preview-shell] body[data-palette] .site-masthead .journey-navigation .journey-label {display:none}
  html[data-preview-shell] body[data-palette] .site-masthead .journey-navigation :is(#journey-back,#journey-forward),
  html[data-preview-shell] body[data-palette] .site-masthead .mast-actions button {
    box-sizing:border-box;min-width:36px;width:36px;padding-inline:0;flex:0 0 36px;
  }
}
@media (max-width:359px) {
  .site-masthead .mast-brand {width:62px}
  html[data-preview-shell] body[data-palette] .site-masthead .journey-navigation :is(#journey-back,#journey-forward),
  html[data-preview-shell] body[data-palette] .site-masthead .mast-actions button {
    min-width:34px;width:34px;flex-basis:34px;
  }
}

@media(max-width:760px) {
  html[data-preview-shell] body[data-palette] .site-masthead .journey-navigation :is(#journey-back,#journey-forward) {
    display:grid;justify-items:center;align-content:center;gap:0;width:auto;min-width:43px;
    padding:0 3px;flex:0 0 auto;
  }
  html[data-preview-shell] body[data-palette] .site-masthead .journey-navigation .journey-arrow {width:15px;height:15px;grid-row:1}
  html[data-preview-shell] body[data-palette] .site-masthead .journey-navigation .journey-label {display:block;grid-row:2;font-size:.75rem}
}

html[data-current-page=welcome] #main > header :is(.journey-navigation,.mast-menu) {
  display:none!important;
}

/* Home renders before the data views. Keep its pinned header in the document
   flow so showing the league list never depends on a later JS measurement. */
@media (max-width:760px) {
  html[data-theme][data-current-page=welcome] body[data-palette] #main {
    padding-top:0!important;
    row-gap:0;
  }
  html[data-theme][data-current-page=welcome] body[data-palette] #main > header,
  html[data-theme][data-current-page=welcome] body[data-palette] #main > header.site-masthead {
    position:sticky;
    top:0;
    width:100%;
    align-self:center;
    flex:none;
  }
  html[data-current-page=welcome] #welcome {
    scroll-margin-block-start:var(--mobile-header-size,calc(var(--home-entry-header,63.3px) + env(safe-area-inset-top,0px)));
  }
  html[data-current-page=welcome]:not([data-preview-shell]) body[data-palette] #main > header {
    height:calc(var(--home-entry-header,63.3px) + env(safe-area-inset-top,0px))!important;
  }
}
@media (max-width:540px) {
  html[data-current-page=welcome] {--home-entry-header:59.3px}
}
@media (min-width:541px) and (max-width:760px) and (max-height:480px) {
  html[data-current-page=welcome] {--home-entry-header:42px}
}
