/* Shared legacy-plugin palette. Do not rely on individual page overrides. */
body.light-mode {
  --ad-text: #26394f;
  --ad-text-dim: #465b72;
  --ad-accent: #785000;
  --ad-gold: #785000;
  --ad-green: #346927;
  --ad-green2: #285b23;
  --ad-blue: #17549a;
  --ad-cyan: #185b91;
  --nx-muted: #53657b;
  --text-dim: #465b72;
}
body.light-mode :is(.ad-progress-widget,.ad-league-breakdown,.ad-profile,.ad-stadium-grid) :is(.ad-league-name,.ad-league-frac,.ad-planned-progress-heading,.ad-planned-next,.ad-planned-footnote,.ad-stat-label) {color:#40546d!important;}
body.light-mode :is(.ad-progress-widget,.ad-dashboard) .ad-badge-dark {background:#dce6f1!important;color:#30465e!important;}
body.light-mode :is(.ad-progress-widget,.ad-dashboard) .ad-badge-accent {background:#fff0cc!important;color:#785000!important;}
body.light-mode :is(.ad-progress-widget,.ad-dashboard) .ad-badge-green {background:#d9f1e4!important;color:#21643a!important;}
body.light-mode .ad-progress-widget :is(.ad-planned-summary,.ad-planned-progress-heading strong,#ad-planned-new-badge),
body.light-mode .ad-stadium-grid .ad-planned-marker {color:#174d91!important;}
body.light-mode .ad-progress-widget .ad-progress-fraction {color:#28652c!important;}
body.light-mode :is(.ad-stadium-grid,.ad-club-actions) .ad-btn-visit:not(.visited) {color:#30465e!important;border-color:#9eb1c7!important;background:#f8fafc!important;}
body.light-mode :is(.ad-stadium-grid,.ad-club-actions) .ad-btn-visit:not(.visited):hover {color:#235c30!important;background:#e5f4e9!important;border-color:#487e47!important;}
body.light-mode :is(.ad-stadium-grid,.ad-club-actions) .ad-btn-visit.visited {color:#245b30!important;background:#d8f0e1!important;border-color:#487e47!important;}
body.light-mode .ad-next-app :is(input,textarea)::placeholder {color:#52647a;opacity:1;}
body.light-mode .ad-next-app select option {color:#203248;background:#fff;}
/* A few intentionally dark surfaces have their own palette; never inherit light ink. */
body.light-mode :is(.ad-mh-scorecard,.ad-next-showcase,.ad-next-home .ad-next-passport,.ad-next-home .ad-next-social-link) {
  --ad-text:#dce7f5;--ad-text-dim:#c1d0e2;--ad-white:#f7faff;--ad-green:#d2eb92;--ad-accent:#ffdf80;--ad-gold:#ffdf80;--ad-cyan:#a9d3ff;
}
/* Fallback for legacy inline text on measurable solid backgrounds. The JS only
   sets this property when the original computed foreground fails 4.5:1. */
body.light-mode.ad-contrast-ready .ad-next-app :is(#main-content,.site-main) [data-ad-contrast] {color:var(--ad-contrast-ink)!important;}

/* The passport's newer white cards override an older dark-only page palette. */
body.light-mode .ad-passport-page .ad-passport-card {
  --ad-text:#26394f;--ad-text-dim:#465b72;--ad-white:#17283e;--ad-accent:#785000;--ad-green:#346927;--ad-cyan:#185b91;
}

/* 2.3.16 — restore the original full-height rail, with a fixed utility area.
   Navigation distributes its available space; neither axis scrolls internally. */
@media (min-width:741px) {
  .ad-next-app .ad-next-rail {
    box-sizing:border-box;top:19px;bottom:19px;height:auto;min-height:0;
    padding:11px 7px;gap:9px;overflow:visible;
  }
  .ad-next-app .ad-next-rail-brand {flex:0 0 auto;}
  .ad-next-app .ad-next-rail-brand,.ad-next-app .ad-next-rail-brand img {width:56px;height:56px;}
  .ad-next-app .ad-next-rail-links {
    box-sizing:border-box;flex:1 1 0;width:100%;min-width:0;min-height:0;
    gap:4px;overflow:visible;justify-content:space-evenly;
  }
  .ad-next-app .ad-next-rail-link {
    box-sizing:border-box;width:100%;max-width:62px;min-width:0;flex:0 1 58px;
    min-height:42px;padding:3px 2px;gap:3px;border-radius:16px;
    font-size:10px!important;line-height:1.15;white-space:nowrap;
    transition:background .15s,color .15s,box-shadow .15s;
  }
  .ad-next-app .ad-next-rail-link .adp-icon {width:21px;height:21px;flex:none;}
  .ad-next-app .ad-next-rail-tail {
    box-sizing:border-box;flex:0 0 auto;width:100%;padding-top:0;
    border-top:0;gap:8px;
  }
  .ad-next-app .ad-next-rail-divider {display:block;flex:0 0 1px;width:100%;height:1px;background:var(--nx-line);margin:0;}
  .ad-next-app .ad-next-rail-guide {
    box-sizing:border-box;display:flex;flex-direction:column;align-items:center;justify-content:center;
    min-height:38px;width:100%;max-width:62px;gap:3px;border-radius:12px;
    font-size:10px!important;font-weight:800!important;line-height:1.1;text-decoration:none!important;
  }
  .ad-next-app .ad-next-rail-guide .adp-icon {width:20px;height:20px;flex:none;}
  .ad-next-app .ad-next-rail-guide:hover {background:rgba(162,194,234,.1);color:var(--nx-fg)!important;}
  .ad-next-app .ad-next-rail-guide[aria-current="page"] {background:#d7ec82;color:#111a27!important;}
  .ad-next-app .ad-next-rail-avatar {width:42px;height:42px;}
  .ad-next-app .ad-next-rail-account .ad-next-rail-avatar {flex-basis:42px;}
  .ad-next-app .ad-next-rail :is(a,button):focus-visible {outline:2px solid #9db8e8;outline-offset:2px;}
}
@media (min-width:741px) and (max-height:650px) {
  .ad-next-app .ad-next-rail {top:10px;bottom:10px;padding:6px;gap:5px;border-radius:20px;}
  .ad-next-app .ad-next-rail-brand,.ad-next-app .ad-next-rail-brand img {width:42px;height:42px;}
  .ad-next-app .ad-next-rail-links {gap:2px;}
  .ad-next-app .ad-next-rail-link {flex-basis:48px;min-height:35px;padding:2px;gap:2px;border-radius:11px;}
  .ad-next-app .ad-next-rail-link .adp-icon,.ad-next-app .ad-next-rail-guide .adp-icon {width:18px;height:18px;}
  .ad-next-app .ad-next-rail-tail {padding-top:0;gap:4px;}
  .ad-next-app .ad-next-rail-guide {min-height:32px;gap:2px;}
  .ad-next-app .ad-next-rail-avatar {width:36px;height:36px;}
  .ad-next-app .ad-next-rail-account .ad-next-rail-avatar {flex-basis:36px;}
}
@media (min-width:741px) and (max-height:425px) {
  /* Exceptionally short windows retain all destinations through the main menu. */
  .ad-next-app .ad-next-rail {display:none;}
  .ad-next-app {--ad-shell-rail:0px;}
}
