.source-loading #main>.page{opacity:.5;pointer-events:none}
.page-navigation{padding-top:12px}
.page-navigation:has(button[hidden]){display:none}
#page-back{display:inline-flex;align-items:center;justify-content:center;gap:6px;min-height:40px;padding:6px 10px;border:1px solid var(--control-edge);border-radius:8px;color:var(--green);font-size:12px;font-weight:500;line-height:1;white-space:nowrap;text-transform:none;letter-spacing:0}
#page-back[hidden]{display:none}
#page-back:hover{background:var(--soft)}
.league-filter{flex:1 1 210px;min-width:0;color:var(--muted);font-size:12px}
.league-filter>span{display:block;margin-bottom:7px}
.league-filter[hidden]{display:none}
#global-leagues{position:relative;padding:0;border:0}
#global-leagues>summary{display:flex;align-items:center;gap:10px;min-height:44px;padding:10px 12px;border:1px solid var(--line);border-radius:7px;background:var(--panel);color:var(--ink);font-weight:500}
#global-leagues>summary:after{content:'⌄';margin-left:auto}
#global-leagues[open]>summary:after{content:'⌃'}
.league-filter-panel{position:absolute;top:calc(100% + 6px);left:0;z-index:12;width:max(100%,280px);max-width:calc(100vw - 32px);padding:12px;background:var(--panel);border:1px solid var(--line);border-radius:8px;box-shadow:0 8px 28px #0003}
.league-filter-actions{display:flex;gap:18px;padding:0 2px 9px;border-bottom:1px solid var(--line)}
.league-filter-actions button{min-height:32px;padding:0;color:var(--green);font-size:12px;font-weight:600}
.league-filter-panel fieldset{max-height:280px;overflow:auto;border:0;margin:8px 0 0;padding:0}
.league-filter-panel fieldset label{display:flex;flex-direction:row;align-items:center;gap:10px;min-height:40px;margin:0;padding:6px 3px;color:var(--ink);cursor:pointer}
.league-filter-panel input{flex:0 0 18px;width:18px;height:18px;margin:0}
.visually-hidden{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border:0}
#source-status{margin:16px 0;padding:16px;background:var(--soft);border-radius:8px;color:var(--green)}
.source-loading #source-status{opacity:1}
:root{--brand-text:var(--green);--surface:var(--panel);--surface-muted:var(--soft);--surface-control:var(--panel);--surface-hover:var(--soft);--neg:#b34d5b}
.dark .chart-colour-0{--chart-colour:#92c8c6}.dark .chart-colour-1{--chart-colour:#d9ad72}.dark .chart-colour-2{--chart-colour:#c1a2d2}.dark .chart-colour-3{--chart-colour:#8bbadd}.dark .chart-colour-4{--chart-colour:#e6a0b3}
.chart-values table{min-width:0;white-space:normal}
.chart-values th,.chart-values td{position:static;min-width:0;width:auto;height:auto;font-size:11px;white-space:normal!important}
.chart-values th:first-child,.chart-values td:first-child{width:auto}
.chart-values-scroll{max-height:320px;overflow:auto}
.chart-values thead th{position:sticky;top:0;z-index:1;background:var(--panel)}
.rating-controls{align-items:center;gap:10px;margin-bottom:12px}
.rating-controls label{display:flex;align-items:center;gap:8px;flex:0 1 auto;width:auto;min-width:0;font-size:10px}
.rating-controls select{width:148px;min-height:36px;height:36px;margin:0;padding:6px 25px 6px 10px;font-size:12px;border-radius:6px}
.rating-controls>button{min-height:36px;max-width:none;font-size:11px;white-space:nowrap}
.mobile-strength-reference{display:none}
.rating-controls .mobile-performance-period{display:none}
@media(max-width:760px){
 .rating-controls.has-performance-period{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);align-items:end}
 .rating-controls.has-performance-period>label{flex-direction:column;align-items:stretch;gap:4px}
 .rating-controls.has-performance-period select{width:100%;font-size:16px}
 .rating-controls.has-performance-period .mobile-performance-period:not([hidden]){display:flex}
 .rating-controls.has-performance-period>[data-view="goals"],#performance-toolbar .period-controls{display:none}
 #strength-view .rating-controls{flex-wrap:wrap;row-gap:4px}
 #strength-view .mobile-strength-reference{display:block;flex:0 0 100%;margin:0;font-size:11px;line-height:1.5;color:var(--muted)}
}
.section-top{flex-wrap:wrap;gap:18px 24px}
.league-picker-label{flex:0 1 340px;max-width:100%;min-width:0}
.league-picker-field{width:340px;max-width:100%;min-width:0}
.league-picker-field select{width:100%;min-width:0;font-size:14px;letter-spacing:0;padding:12px 34px 12px 72px;min-height:48px}
.inline-brand{display:inline-block;width:4.35em;height:1.12em;vertical-align:-.12em;line-height:1;color:var(--ink)}
.inline-brand-logo{display:block;width:100%;height:100%;overflow:visible}
.inline-brand .logo-mark{color:var(--green)}
#predict{max-width:720px}
#predict .comparison-select{margin:16px 0;gap:14px}
#predict .comparison{padding:22px 24px}
#predict .prediction-score{padding:12px 0 8px}
#predict .prediction-score strong{font-size:34px}
#predict .prediction-score p{margin:6px 0}
#predict .comparison-head{gap:18px;margin-bottom:10px}
#predict .comparison-head .club{max-width:48%;font-size:16px;text-align:left;white-space:normal}
#predict .comparison-head .club:last-child{text-align:right;justify-content:flex-end}
#predict .probabilities{margin:12px 0}
#predict .probabilities b{font-size:20px;margin-top:5px}
#predict .probability-bar{margin-bottom:14px}
#predict #matchup>.note{margin:8px 0 0;font-size:11px;line-height:1.5}
#predict .predictor-options{margin:0 0 14px}
@media(max-width:760px){
 .mobile-actions #menu-toggle{width:auto;min-width:86px;gap:7px;padding:10px 12px;font-size:12px;font-weight:700;background:#91c1ff;border-color:#a2ccff}
 body[data-palette="blue"] .mobile-actions #menu-toggle{color:#10223a}
 .mobile-actions #menu-toggle span{position:static;width:auto;height:auto;overflow:visible;clip:auto}
 .league-picker-label{flex:1 1 100%;width:100%}
 .league-picker-field{width:100%}
 .league-picker-field select{font-size:16px;letter-spacing:0;padding-left:56px;padding-right:28px}
 #selected-league-badge .league-badge{width:36px;height:34px}
 #predict .comparison{padding:18px 16px}
 #predict .comparison-head .club{font-size:13px}
 #predict .prediction-score strong{font-size:28px}
}
.reading-links{display:flex;align-items:center;gap:18px;flex:0 0 auto}
.reading-links .text-link{min-height:32px;padding:0;color:var(--green);font-size:11px;font-weight:500;white-space:nowrap}
.reading-links .text-link:hover{text-decoration:underline;text-underline-offset:4px}
.intro-help-row{display:flex;align-items:flex-start;flex-wrap:wrap;gap:0 20px;margin:0 0 14px}
.intro-help-row .intro-guide{flex:1 1 150px;margin:0}
.intro-help-row:has(.intro-guide[open]){display:block}
.intro-help-row:has(.intro-guide[open]) .reading-links{margin-top:4px}
.view-intro{flex-wrap:wrap;gap:4px 20px}
.view-intro>.reading-links{margin-left:auto}
@media(max-width:600px){
 .rating-controls label{gap:6px}
 .rating-controls select{width:134px;min-height:40px;height:40px}
 .rating-controls>button{font-size:10px}
 .intro-help-row{gap:0 12px}
 .intro-help-row .intro-guide>summary,.reading-links .text-link{font-size:10px}
 .reading-links{gap:14px}
 .view-intro>.reading-links{margin-left:0}
}
.explore-controls,
.predictor-options{display:flex;flex-wrap:wrap;align-items:end;gap:16px;margin:20px 0}
.explore-controls label,
.predictor-options>label{display:flex;flex-direction:column;gap:7px;min-width:0;font-size:12px;color:var(--muted)}
.explore-controls select,
.predictor-options select{min-height:44px;max-width:100%;border:1px solid var(--line);border-radius:7px;padding:10px 36px 10px 12px;background:var(--panel);color:var(--ink);font:inherit}

.explore-controls label{flex:1 1 160px}
.explore-controls .search{min-height:44px;flex:1 1 180px}
.explore-controls .search input{width:100%}
.predictor-options .neutral-choice{flex-direction:row;align-items:center;min-height:44px}
.neutral-choice input{width:18px;height:18px;accent-color:var(--green)}
.predictor-options{margin-bottom:28px}
.predictor-options #swap-teams{min-height:44px;margin-left:auto}
.prediction-score{text-align:center;padding:22px 0}
.prediction-score strong{font-size:clamp(28px,4vw,48px);letter-spacing:-1px;font-weight:600}
.prediction-score strong span{color:var(--muted);font-weight:400;margin:0 10px}
.prediction-score p{color:var(--muted);font-size:12px}
.fixture-date{display:flex;justify-content:space-between;gap:12px}
.fixture-card .club{white-space:normal;text-align:inherit;font-size:inherit;justify-content:inherit}
.fixture-card .fixture-teams>strong:last-child .club{justify-content:flex-end}
.fixture-saved{text-align:center}
.fixture-clean-sheets{display:grid;grid-template-columns:minmax(0,1fr) auto minmax(0,1fr);align-items:center;gap:8px;margin-top:9px;padding-top:7px;border-top:1px solid var(--line);font-family:var(--font-ui);font-size:12px;line-height:1.3}
.fixture-clean-sheet-label{color:var(--muted);text-align:center}
.fixture-clean-sheets>span:last-child{text-align:right}
.fixture-clean-sheets b{font-size:14px;font-weight:600;font-variant-numeric:tabular-nums;color:var(--ink)}
.table-empty{padding:24px;text-align:center}
.profile-facts{display:grid;grid-template-columns:repeat(4,1fr);gap:12px;margin:16px 0 28px}
.profile-facts div{display:flex;flex-direction:column;border:1px solid var(--line);padding:12px;border-radius:7px}
.profile-facts span{display:block;color:var(--muted);font-size:11px;margin-bottom:8px}
.profile-facts b{margin-top:auto;font-size:21px;font-weight:500}
.team-description{font-size:14px;line-height:1.85;color:var(--ink);margin:14px 0 20px}
.profile-narratives{margin:22px 0 26px}
.profile-narratives h3{font-size:17px;margin:0}
.profile-narratives details{padding:0;border-top:1px solid var(--line)}
.profile-narratives summary{min-height:44px;align-items:center;font-size:12px;color:var(--green)}
.profile-narratives details p{font-size:13px;line-height:1.8;margin:0 0 16px}
.global-reading{margin:-8px 0 15px;justify-content:flex-end}
.league-strength-list>div{display:grid;grid-template-columns:minmax(120px,1fr) minmax(40px,1fr) 45px;align-items:center;gap:12px;padding:14px 0;border-bottom:1px solid var(--line)}
.league-strength-list small{display:block;color:var(--muted);font-size:10px;margin-top:4px}
.league-strength-list b{font-size:13px;text-align:right;font-variant-numeric:tabular-nums}
.league-strength-bar{height:5px;background:var(--soft);border-radius:4px}
.league-strength-bar i{display:block;height:100%;background:var(--green);border-radius:4px}
#profileBody>.reader-definitions dt{font-weight:600;margin-top:20px}
#profileBody>.reader-definitions dd{margin:7px 0 18px;color:var(--muted);line-height:1.8}
.club-name small{display:block;color:var(--muted);font-weight:400;font-size:10px;margin-top:5px;line-height:1.35}
#global .table-tools{gap:16px}
#global .column-switch{display:flex}
#global table{table-layout:fixed}
#global table th:first-child,#global table td:first-child{width:42px}
#global table th:nth-child(2),#global table td:nth-child(2){width:35%;text-align:left}
#global table .club-name{white-space:normal;overflow-wrap:anywhere}
#global table .club{max-width:100%;white-space:normal;text-align:left}
#global table .change-detail{display:none}
#global table[data-columns=changes] .rating-detail{display:none}
#global table[data-columns=changes] .change-detail{display:table-cell}
#global table th{position:sticky;top:0;z-index:5;background:var(--panel);box-shadow:0 1px var(--line)}
.show-more{display:block;min-height:44px;margin:20px auto;padding:10px 24px;border:1px solid var(--line);border-radius:8px;color:var(--green)}
.international-grid{grid-template-columns:1fr}
.international-grid article{padding:24px;background:var(--panel);border:1px solid var(--line);border-radius:10px}
.international-grid article p{font-size:14px;line-height:1.7;color:var(--muted)}
.table-shell .outcome-table th{overflow-wrap:anywhere}
.table-shell .outcome-table th:nth-child(2){width:27%}

@media(max-width:600px){
 .explore-controls{gap:10px}

 .explore-controls select{width:100%;font-size:12px}
 .fixture-teams .club{flex-direction:column;gap:6px}
 .fixture-card .fixture-teams>strong:last-child .club{align-items:center}
 .fixture-date{font-size:10px}
 .profile-facts{grid-template-columns:repeat(2,1fr)}
 #global table th,#global table td{padding:12px 5px;font-size:11px}
 #global table th:first-child,#global table td:first-child{width:25px}
 #global table th:nth-child(2),#global table td:nth-child(2){width:41%}
 #global .club{font-size:11px;gap:6px}
 #global .club-badge,#global .club-badge img{width:22px;height:22px;flex-basis:22px}
 #global .club-name small{font-size:9px}
 #global .score{font-size:13px}
 .predictor-options #swap-teams{margin-left:0}
 .prediction-score{padding:15px 0}
 .comparison-head>span{overflow-wrap:anywhere}
}

/* Restore the original welcome copy within the blue site navigation. */
html[data-entry=welcome] .source-loading #welcome{display:block;opacity:1}
html[data-entry=welcome] .source-loading #ratings{display:none}
#welcome{position:relative;isolation:isolate;overflow:hidden;margin-top:24px;padding:64px 24px;border:1px solid var(--line);border-radius:12px;background:var(--panel)}
#welcome[hidden]{display:none}
.welcome-backdrop{position:absolute;inset:0;z-index:-1;opacity:.12;pointer-events:none}
.welcome-field{width:100%;height:100%;fill:none;stroke:var(--green);stroke-width:1.2}
.welcome-stage{max-width:580px;margin:auto;text-align:center}
.welcome-card-top{font-size:11px;font-weight:600;letter-spacing:2px;text-transform:uppercase;color:var(--muted);margin:0 0 28px}
.welcome-logo{display:block;width:min(320px,80%);height:auto;margin:0 auto 30px;color:var(--ink)}
.welcome-logo .logo-mark{color:var(--green)}
#welcome h1{max-width:none;font-size:clamp(28px,3.5vw,44px);line-height:1.2;letter-spacing:-1.4px;margin:0 0 20px}
.welcome-description{max-width:440px;margin:0 auto 28px;font-size:16px;line-height:1.8;color:var(--muted)}
.welcome-enter{display:inline-flex;align-items:center;justify-content:center;gap:36px;min-height:48px;min-width:168px;padding:12px 24px;border-radius:7px;background:var(--green);color:var(--bg);font-weight:700}
.welcome-enter svg{width:22px;height:22px;fill:none;stroke:currentColor;stroke-width:1.7}
.welcome-enter:hover{filter:brightness(1.08)}
.welcome-card-bottom{font-size:11px;color:var(--muted);margin:24px 0 0}
/* Keep Supremacy figures close together and its view switch self-contained. */
#global{max-width:960px}
#global .global-table-toolbar{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;padding:14px 18px}
#global-count{margin:0;font-size:15px;line-height:1.4;font-weight:600}
#global .column-switch{display:inline-flex;flex:0 0 auto;width:max-content;max-width:100%;gap:3px;padding:3px;border:1px solid var(--line);border-radius:8px;background:var(--bg)}
#global .column-switch button{flex:0 0 auto;min-height:40px;padding:9px 14px;border-radius:5px;font-size:12px;line-height:1.2}
#global table th:nth-child(2),#global table td:nth-child(2){width:44%}
#global table th:nth-child(n+3),#global table td:nth-child(n+3){text-align:center}
#global table th:nth-child(n+3) button{text-align:center}
#global table td{height:58px}
#global .table-shell .snapshot-table thead th{top:0}
/* Desktop has room for ratings and the final Change column together. */
@media(min-width:761px){
 #global .column-switch{display:none}
 #global table[data-columns] .rating-detail,#global table[data-columns] .change-detail{display:table-cell}
 #global table th:nth-child(2),#global table td:nth-child(2){width:36%}
}
@media(max-width:760px){
 #welcome{margin-top:16px;padding:38px 18px}
 .welcome-logo{margin-bottom:24px}
 .welcome-description{font-size:14px}
 #global .global-table-toolbar{padding:12px;gap:10px}
 #global-count{font-size:13px}
 #global .column-switch button{min-height:44px;padding:9px 12px}
 #global table th:nth-child(2),#global table td:nth-child(2){width:41%}
 #global .table-shell .snapshot-table thead th{top:0}
 #global .table-foot{gap:4px}
}
/* Use the phone width for filters so the Supremacy table starts sooner. */
@media(max-width:760px){
 body:has(#global:not([hidden])) aside#site-navigation{min-height:76px;padding-block:12px}
 main:has(#global:not([hidden])) .page-navigation{padding-top:0}
 main:has(#global:not([hidden])) #page-back{min-height:32px}
 main>#global{padding-top:6px}
 #global-subtitle{font-size:12px;line-height:1.5;margin:8px 0 10px}
 #global>.period-controls{margin-bottom:0}
 #global-controls{display:grid;grid-template-columns:minmax(105px,.8fr) minmax(0,1.2fr);gap:8px 10px;margin:12px 0 2px}
 #global-controls select{margin:0}
 #global-controls>.search{grid-column:1/-1;max-width:none;min-height:44px;padding:8px 10px}
 #global .global-reading{margin:0 0 6px;gap:16px}
 #global .global-table-toolbar{padding:8px 10px}
 #global table th{padding-block:8px}
 #global .league-filter-panel{left:auto;right:0;width:min(300px,calc(100vw - 32px))}
 .competition-grid a{display:grid;grid-template-columns:40px minmax(0,210px);justify-content:center;gap:15px}
 .competition-grid .league-badge{width:40px;justify-self:center}
 .competition-grid .competition-name{text-align:center;min-width:0}
}

/* Keep the accepted data date in the same compact place on every page. */
.page-navigation,.page-navigation:has(button[hidden]){display:flex;align-items:center;justify-content:space-between;gap:12px;min-height:40px}
#site-last-updated{margin-left:auto;color:var(--muted);font-size:10px;line-height:1.5;text-align:right}
#site-last-updated time{white-space:nowrap}
/* The league and period travel with the existing frozen view tabs. */
#ratings .tabs{flex-wrap:wrap;row-gap:0}
#league-scroll-context{flex:1 0 100%;grid-column:1/-1;display:flex;align-items:baseline;flex-wrap:wrap;gap:4px 12px;min-width:0;padding:6px 1px 3px;font-size:11px;line-height:1.5;white-space:normal;color:var(--muted)}
#league-scroll-context strong{color:var(--green);font-size:inherit;font-weight:600}
@media(max-width:760px){
 #site-last-updated{font-size:9px}
 #league-scroll-context{padding:3px 6px 5px;font-size:10px}
}

/* Use the active sort column for emphasis in every table and colour theme. */
:is(#strength-table,.snapshot-table) :is(th,td).main-metric{
 background:var(--column);color:var(--green);
}
:is(#strength-table,.snapshot-table) td.main-metric{font-weight:700}
:is(#strength-table,.snapshot-table) .main-metric .score{color:var(--green)}

.fixture-score.fixture-saved{width:max-content;max-width:100%;margin:16px auto 0;font-size:18px}
