/* Home page: one idea per screen. Tokens come from release.css (:root). */
body{overflow-x:clip}
.visually-hidden{position:absolute!important;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
.home-view .eyebrow{text-transform:uppercase}

/* Hero */
.home-hero{max-width:960px;margin:0 auto;padding:40px 0 30px;text-align:center}
.home-hero h1{font-size:clamp(42px,5vw,72px);font-weight:560;letter-spacing:-.055em;line-height:1;margin:0 0 22px}
.home-hero h1:focus{outline:none}
.home-hero h1 span{color:var(--blue)}
.home-lede{font-size:17px;line-height:1.6;color:var(--muted);max-width:880px;margin:0 auto}
.home-facts{display:flex;justify-content:center;gap:56px;margin:24px auto 0;padding-top:16px;border-top:1px solid var(--line);max-width:720px}
.home-facts b{display:block;font-size:23px;font-weight:600;letter-spacing:-.03em}
.home-facts span{font-size:12px;color:var(--muted)}
.home-status{margin:14px auto 0;max-width:760px}
.home-status .inline-button{font-size:12px;padding:0}

/* Ranking table */
.home-ranking{max-width:1180px;margin:0 auto;padding:8px 0 72px}
.home-table-head{display:flex;justify-content:space-between;align-items:flex-end;gap:28px;flex-wrap:wrap;margin-bottom:14px}
.home-table-head h2{font-size:clamp(24px,2.2vw,31px);letter-spacing:-.035em}
.home-tools{display:grid;grid-template-columns:190px 170px 96px 118px;gap:12px}
.home-table-wrap{border-top:2px solid var(--ink)}
.home-table{width:100%;border-collapse:collapse;font-variant-numeric:tabular-nums}
.home-table thead th{position:sticky;top:var(--home-sticky,0px);z-index:2;background:var(--paper);text-align:left;font-size:11px;font-weight:650;letter-spacing:.03em;color:var(--muted);padding:12px 10px;border-bottom:1px solid var(--line);vertical-align:bottom}
.home-table thead small{display:block;font-weight:500;letter-spacing:0;font-size:10px}
.home-table td{padding:5px 10px;border-bottom:1px solid var(--line);vertical-align:middle}
.home-table tbody tr:hover{background:var(--white)}
.home-col-rank{width:64px;font-size:17px;font-weight:650;text-align:right;padding-right:22px!important}
.home-table thead .home-col-rank{text-align:right}
.home-country{display:block;text-align:left;padding:3px 0;width:100%}
.home-country b{display:block;font-size:15px;font-weight:600}
.home-country small{display:block;font-size:11px;line-height:1.3;color:var(--muted)}
.home-country:hover b{color:var(--blue-text);text-decoration:underline;text-underline-offset:3px}
.home-col-score{width:190px;white-space:nowrap}
.home-score{display:inline-block;width:44px;font-size:16px;font-weight:600}
.home-bar{display:inline-block;vertical-align:middle;width:110px;height:6px;background:#e4e9ec;border-radius:3px;overflow:hidden;margin-left:8px}
.home-bar i{display:block;height:100%;background:var(--ink);border-radius:3px}
.home-col-change{width:130px;text-align:right;font-weight:600;white-space:nowrap}
.home-table thead .home-col-change{text-align:right}
.home-col-trend{width:112px;text-align:right}
.home-table thead .home-col-trend{text-align:right}
.home-spark{width:92px;height:26px;display:inline-block;vertical-align:middle}
.home-up{color:var(--up)}.home-down{color:var(--down)}.home-held{color:var(--muted)}
.home-empty{padding:28px 0;text-align:center;color:var(--muted)}
.home-note{max-width:760px;margin:18px 0 0}

/* Bands: full-bleed sections, one message each */
.home-band{margin:0 calc(50% - 50vw);padding:96px calc(50vw - 50%);border-top:1px solid var(--line)}
.home-band.alt{background:var(--white)}
.home-band.dark{background:var(--ink);color:var(--white);border-top:0}
.home-band.dark .eyebrow{color:#c5d0df}
.home-band.dark .home-sub{color:#d4dbe6}
.home-band.programme{background:#eef3e6}
.home-narrow{max-width:780px;margin:0 auto;text-align:center}
.home-band h2{font-size:clamp(28px,3.4vw,46px);letter-spacing:-.04em;line-height:1.08;margin-bottom:20px}
.home-sub{font-size:17px;line-height:1.6;color:var(--muted);margin:0 auto 0}
.home-sub.small{font-size:13px}
.home-actions{display:flex;gap:12px;flex-wrap:wrap;margin-top:28px}
.home-actions.centred{justify-content:center;margin-top:40px}
.home-band .lime-button{margin:0;text-align:center}

/* Regions */
.home-regions{max-width:920px;margin:44px auto 0}
.home-region-scale{display:grid;grid-template-columns:1fr 1fr 1fr;margin-left:290px;font-size:10px;color:var(--muted);padding-bottom:6px}
.home-region-scale span:nth-child(2){text-align:center}.home-region-scale span:nth-child(3){text-align:right}
.home-region{display:grid;grid-template-columns:270px 1fr;gap:20px;align-items:center;padding:12px 0;border-bottom:1px solid var(--line)}
.home-region-label b{display:block;font-size:14px;font-weight:600}
.home-region-label small{font-size:11px;color:var(--muted)}
.home-region-track{position:relative;height:12px;background:#e8edef;border-radius:6px}
.home-region-range{position:absolute;top:0;bottom:0;background:#84b8c9;border-radius:6px}
.home-region-avg{position:absolute;top:50%;width:16px;height:16px;margin:-8px 0 0 -8px;background:var(--ink);border:2px solid var(--white);border-radius:50%}
.home-region-key{margin-top:14px;text-align:right}
.home-region-key i{display:inline-block;vertical-align:middle;margin-right:5px}
.key-range{width:22px;height:8px;background:#84b8c9;border-radius:4px}
.key-avg{width:10px;height:10px;background:var(--ink);border-radius:50%}

/* Movers */
.home-movers{list-style:none;padding:0;max-width:880px;margin:40px auto 28px}
.home-movers li{display:grid;grid-template-columns:44px 1fr 150px 190px;gap:16px;align-items:center;padding:16px 0;border-bottom:1px solid var(--line)}
.home-mover-pos{font-size:15px;font-weight:650;color:var(--muted)}
.home-mover-change{font-size:28px;font-weight:600;letter-spacing:-.03em;text-align:right}
.home-mover-change small,.home-mover-rank small{display:block;font-size:10px;font-weight:500;letter-spacing:0;color:var(--muted)}
.home-mover-rank{text-align:right;font-weight:600;font-variant-numeric:tabular-nums}

/* Guide */
.home-guide{display:grid;grid-template-columns:repeat(4,1fr);gap:18px;max-width:1120px;margin:44px auto 0}
.home-guide article{background:var(--white);border:1px solid var(--line);border-radius:6px;padding:26px 22px;display:flex;flex-direction:column}
.home-guide h3{font-size:18px;margin:10px 0 10px}
.home-guide p{font-size:14px;color:var(--muted);flex:1}
.home-guide .text-button{text-align:left}

/* Research */
.home-stats{display:grid;grid-template-columns:repeat(3,1fr);gap:24px;max-width:920px;margin:48px auto 0;text-align:center}
.home-stats b{display:block;font-size:clamp(34px,4vw,52px);font-weight:560;letter-spacing:-.04em;color:var(--lime)}
.home-stats span{font-size:13px;color:#d4dbe6}
.home-band.dark .home-sub.small{margin-top:36px}

/* Can and cannot */
.home-limits{display:grid;grid-template-columns:1fr 1fr;gap:20px;max-width:980px;margin:40px auto 0}
.home-limits>div{background:var(--white);border:1px solid var(--line);border-radius:6px;padding:28px 30px}
.home-limits h3{font-size:18px;margin-bottom:12px}
.home-limits ul{margin:0;padding-left:18px}
.home-limits li{margin:0 0 10px;color:var(--muted);font-size:15px}
.home-limits.compact{margin:10px 0 0;gap:14px}
.home-limits.compact>div{padding:16px 18px;background:transparent}
.home-limits.compact h3{font-size:14px;margin-bottom:8px}
.home-limits.compact li{font-size:13px}

/* Programme */
.home-independence{font-weight:600;margin:22px auto 0;max-width:640px}

@media(max-width:1100px){
 .home-tools{grid-template-columns:1fr 1fr;width:100%}
 .home-guide{grid-template-columns:1fr 1fr}
 .home-col-trend{display:none}
}
@media(max-width:760px){
 .home-hero{padding:48px 0 36px;text-align:left}
 .home-lede{font-size:16px}
 .home-facts{justify-content:flex-start;gap:24px;flex-wrap:wrap}
 .home-facts b{font-size:22px}
 .home-tools{grid-template-columns:1fr 1fr}
 .home-search{grid-column:1/-1}
 .home-table thead th{padding:10px 6px}
 .home-table td{padding:8px 6px}
 .home-col-rank{width:40px;font-size:14px;padding-right:10px!important}
 .home-bar{display:none}
 .home-table{table-layout:fixed}
 .home-table thead th{font-size:10px;line-height:1.25;letter-spacing:0;white-space:normal}
 .home-table thead small{display:none}
 .home-col-score{width:48px}
 .home-col-change{width:64px;font-size:13px}
 .home-country b{overflow-wrap:anywhere}
 .home-country b{font-size:14px}
 .home-band{padding-top:64px;padding-bottom:64px}
 .home-narrow{text-align:left}
 .home-actions.centred{justify-content:flex-start}
 .home-region{grid-template-columns:1fr;gap:8px}
 .home-region-scale{margin-left:0}
 .home-movers li{grid-template-columns:28px 1fr auto;row-gap:4px}
 .home-mover-rank{grid-column:2/-1;text-align:left;font-size:13px}
 .home-mover-change{font-size:22px}
 .home-guide,.home-stats,.home-limits{grid-template-columns:1fr}
 .home-stats{text-align:left}
}

/* Flags, medals, discreet sorting and the expand row (iteration 2b) */
.home-country{display:grid;grid-template-columns:24px 1fr;column-gap:12px;align-items:center}
.home-flag{width:24px;height:18px;border-radius:2px;box-shadow:0 0 0 1px rgba(25,34,62,.12);object-fit:cover;background:#e8edef}
.home-sort{font:inherit;font-size:11px;font-weight:650;letter-spacing:.03em;color:inherit;padding:0;display:inline-flex;align-items:center;gap:4px;cursor:pointer}
.home-sort:hover,.home-sort.on{color:var(--ink)}
.home-sort-mark{font-size:8px;opacity:0;transition:opacity .15s}
.home-sort:hover .home-sort-mark,.home-sort:focus-visible .home-sort-mark{opacity:.45}
.home-sort.on .home-sort-mark{opacity:1}
.home-table thead .home-col-rank .home-sort,.home-table thead .home-col-change .home-sort{justify-content:flex-end}
.home-more-row{display:flex;justify-content:center;padding:18px 0 4px;border-bottom:1px solid var(--line)}
.home-more-row [hidden]{display:none}
@media(max-width:760px){
 .home-country{grid-template-columns:20px 1fr;column-gap:8px}
 .home-flag{width:20px;height:15px}
 .home-sort{font-size:10px;letter-spacing:0}
 .home-continent{display:none}
}

/* Medals column (after the country) and its tooltip */
.home-col-medals{width:156px;white-space:nowrap}
.home-medals{display:inline-flex;align-items:center;gap:7px;padding:3px 5px;margin-left:-5px;border-radius:14px;cursor:help;transition:background .15s,box-shadow .15s}
.home-medals:hover,.home-medals[aria-describedby]{background:var(--paper);box-shadow:0 0 0 1px var(--line)}
.home-medal-level{display:inline-flex;align-items:center;gap:2px}
.home-medals .medal-glyph{width:16px;height:16px;display:block}
.home-medals .home-medal-level.world .medal-glyph{width:22px;height:22px}
.home-medals-more{font-size:11px;font-weight:650;color:var(--muted);margin-left:2px}
.home-medals-inline{display:none}
.home-tip{position:fixed;z-index:60;width:min(340px,calc(100vw - 24px));max-height:calc(100vh - 24px);overflow:auto;overscroll-behavior:contain;background:var(--white);color:var(--ink);border:1px solid var(--line);border-radius:8px;box-shadow:0 14px 36px rgba(25,34,62,.18);padding:14px 16px 12px;font-size:13px;line-height:1.45;pointer-events:none}
.home-tip.pinned{pointer-events:auto}
.home-tip[hidden]{display:none}
.home-tip-head{display:flex;flex-direction:column;margin:0 0 4px;padding-bottom:10px;border-bottom:1px solid var(--line)}
.home-tip-head b{font-size:15px;font-weight:650}
.home-tip-head span{font-size:11px;color:var(--muted)}
.home-tip ul{list-style:none;margin:0;padding:0}
.home-tip li{padding:8px 0;border-bottom:1px solid #eef1f2}
.home-tip li:last-child{border-bottom:0}
.home-tip li>b{display:block;font-weight:650}
.home-tip li>span{display:block}
.home-tip-awards{display:flex!important;flex-wrap:wrap;gap:3px 12px;margin-top:4px;font-size:11.5px;color:var(--muted)}
.home-tip-awards>span{display:inline-flex;align-items:center;gap:5px;white-space:nowrap}
.home-tip-awards .medal-glyph{width:16px;height:16px;display:block;flex:none}
.home-tip-foot{margin:8px 0 0;padding-top:8px;border-top:1px solid var(--line);font-size:10.5px;color:var(--muted)}
@media(max-width:760px){
 .home-col-medals{display:none}
 .home-medals-inline{display:inline-flex;margin:2px 0 0 23px}
 .home-medals-inline{gap:5px}
 .home-medals-inline .medal-glyph{width:14px;height:14px}
 .home-medals.home-medals-inline .home-medal-level.world .medal-glyph{width:18px;height:18px}
}
@media print{.home-band{margin:0;padding:24px 0}.home-tools,.home-actions{display:none}}
