/* jpl-stats-feel.css, the public Stats page: the same glass look and tighter layout
   as the Competitions pages. Andy, 17 Nov 2026: "general competition and stats area
   need bringing inline with new build".

   What changed at 1440 wide: the header is compact; the filters are ONE frosted
   toolbar (no label row above the selects); the board picker is a row of pills that
   sticks under the toolbar; each leaderboard is a frosted panel with denser rows and,
   on a laptop, two columns reading down (1 to 10 on the left, then on) instead of one
   thin line across a wide box; the first three places are lit.

   ROLL BACK: add ?classic=1 to the address (remembered on that device, ?classic=0
   clears it), or delete the stylesheet link and the switch script marked "stats-feel"
   in stats.html. The page's own styles, script and wording are untouched.
   Presentation only: no figure, filter, score rule or privacy rule changes.

   Logical properties only (the page is bilingual, Arabic mirrors). Every animation
   stops under reduced motion; solid fallbacks for no backdrop-filter and for reduced
   transparency. */

.jpl-home{
  --max-w:1360px;
  --sf-edge:rgba(255,255,255,.14);
  --sf-ease:cubic-bezier(.22,.8,.3,1);
  --sf-shadow:0 1px 2px rgba(0,0,0,.4),0 24px 52px rgba(0,0,0,.45);
  background:
    radial-gradient(800px 520px at 8% -4%,rgba(0,238,226,.24),transparent 66%),
    radial-gradient(760px 520px at 98% 4%,rgba(96,140,255,.22),transparent 66%),
    radial-gradient(860px 600px at 52% 108%,rgba(176,128,255,.16),transparent 68%),
    #070d14;
  background-attachment:fixed;
}

/* ---- header ---- */
.jpl-home .hero{padding:72px 0 16px;background:transparent;border-bottom:0}
.jpl-home .hero::before{display:none}
.jpl-home .hero .wrap{
  display:grid;grid-template-columns:minmax(0,1fr);grid-template-areas:"kicker" "title" "lede" "tabs";
  row-gap:6px;min-height:0;padding-inline-end:clamp(18px,4vw,40px);
}
.jpl-home .hero .wrap::after{display:none}
.jpl-home .home-kicker{grid-area:kicker;margin:0}
.jpl-home h1{grid-area:title;font-size:clamp(34px,4.4vw,56px);line-height:1.02;margin:0}
.jpl-home .hero .lede{grid-area:lede;font-size:13px;line-height:1.6;max-width:62ch;margin:0}
.jpl-home .home-links{grid-area:tabs;margin-top:14px;gap:6px}
.jpl-home .home-links a{
  padding:0 18px;border-radius:999px;border:1px solid transparent;font-size:12px;
  transition:background .2s var(--sf-ease),color .2s var(--sf-ease);
}
.jpl-home .home-links a[aria-current=page]{background:rgba(0,238,226,.14);border-color:rgba(0,238,226,.45);box-shadow:0 8px 22px rgba(0,238,226,.14)}

/* ---- one frosted toolbar ---- */
.jpl-home .bar{position:sticky;top:10px;z-index:30;padding:0 clamp(12px,2vw,24px);background:transparent;border:0}
.jpl-home .bar>.wrap.bar-in{
  display:flex;flex-wrap:wrap;align-items:center;gap:10px;max-width:var(--max-w);margin-inline:auto;padding:12px 14px;border-radius:26px;
  background:linear-gradient(160deg,rgba(255,255,255,.12),rgba(255,255,255,.05));
  border:1px solid var(--sf-edge);
  -webkit-backdrop-filter:blur(22px) saturate(170%);backdrop-filter:blur(22px) saturate(170%);
  box-shadow:var(--sf-shadow),inset 0 1px 0 rgba(255,255,255,.16),inset 0 -1px 0 rgba(0,0,0,.25);
}
.jpl-home .bar-in .home-filter>span{display:none}
.jpl-home .bar-in .home-filter{flex:1 1 150px;gap:0;min-width:0}
.jpl-home .bar input[type=search]{flex:1.4 1 200px}
.jpl-home .bar .lang{flex:0 0 auto;width:auto}
.jpl-home .bar .count{flex:0 0 auto}
.jpl-home .bar-in .home-filter:has(select[hidden]){display:none}
.jpl-home .bar input[type=search],.jpl-home .bar select{
  min-height:46px;border-radius:16px;background:rgba(255,255,255,.07);border:1px solid var(--sf-edge);font-size:13px;max-width:none;width:100%;
}
.jpl-home .bar .lang{min-height:46px;border-radius:999px;padding:0 16px;white-space:nowrap}
.jpl-home .bar .count{margin:0;white-space:nowrap;font-size:11px;letter-spacing:.06em;text-align:end}
@supports not ((backdrop-filter:blur(1px)) or (-webkit-backdrop-filter:blur(1px))){.jpl-home .bar>.wrap.bar-in{background:#121c27}}
@media (prefers-reduced-transparency:reduce){.jpl-home .bar>.wrap.bar-in{-webkit-backdrop-filter:none;backdrop-filter:none;background:#121c27}}

/* ---- the boards picker: glass pills ---- */
.jpl-home .tabs{gap:8px;padding:18px 0 4px}
.jpl-home .tab{
  min-height:44px;border-radius:999px;padding:0 18px;font-size:12px;border:1px solid var(--sf-edge);
  background:linear-gradient(160deg,rgba(255,255,255,.1),rgba(255,255,255,.04));
  transition:background .2s var(--sf-ease),color .2s var(--sf-ease),transform .15s var(--sf-ease);
}
.jpl-home .tab:active{transform:scale(.96)}
.jpl-home .tab[aria-selected=true]{background:linear-gradient(160deg,rgba(0,238,226,.34),rgba(0,238,226,.16));border-color:rgba(0,238,226,.65);color:#5cffff;box-shadow:0 10px 26px rgba(0,238,226,.18)}
.jpl-home .home-board-title{margin-top:10px}

/* ---- boards: frosted panel, denser rows ---- */
.jpl-home .board{
  clip-path:none;border-radius:28px;overflow:hidden;
  background:linear-gradient(160deg,rgba(255,255,255,.1),rgba(255,255,255,.04));
  border:1px solid var(--sf-edge);
  -webkit-backdrop-filter:blur(14px) saturate(160%);backdrop-filter:blur(14px) saturate(160%);
  box-shadow:var(--sf-shadow),inset 0 1px 0 rgba(255,255,255,.14);
}
.jpl-home .row{padding:10px 18px;gap:12px;border-bottom:1px solid rgba(255,255,255,.07);break-inside:avoid}
.jpl-home .row:nth-child(odd){background:rgba(255,255,255,.025)}
.jpl-home .rank{
  flex:0 0 34px;width:34px;height:34px;display:grid;place-items:center;border-radius:50%;
  background:rgba(255,255,255,.07);color:#9db0c6;font-size:15px;
}
.jpl-home .row.top .rank{background:rgba(0,238,226,.18);color:#5cffff;box-shadow:0 0 18px rgba(0,238,226,.2)}
.jpl-home .row:nth-child(1) .rank{background:linear-gradient(145deg,#ffe38a,#e0a823);color:#3a2800;box-shadow:0 6px 18px rgba(224,168,35,.35)}
.jpl-home .nm{font-size:16px}
.jpl-home .figs{gap:14px}
.jpl-home .fig{min-width:42px}
.jpl-home .fig b{font-size:21px}
.jpl-home .fig span{font-size:10.5px}
.jpl-home .recs{gap:12px}
.jpl-home .rec{
  clip-path:none;border-radius:24px;background:linear-gradient(160deg,rgba(255,255,255,.1),rgba(255,255,255,.04));
  border:1px solid var(--sf-edge);box-shadow:var(--sf-shadow),inset 0 1px 0 rgba(255,255,255,.14);
  -webkit-backdrop-filter:blur(14px) saturate(160%);backdrop-filter:blur(14px) saturate(160%);
}
.jpl-home .empty{border-radius:28px;border-color:var(--sf-edge);background:rgba(255,255,255,.04)}
.jpl-home .fail{border-radius:24px}
.jpl-home .foot{max-width:var(--max-w)}

/* a laptop: two columns reading down, so the board is not one thin line across a wide box */
@media (min-width:1000px){
  .jpl-home .board{column-count:2;column-gap:0}
  .jpl-home .board>.row{border-inline-end:1px solid rgba(255,255,255,.07)}
}

@supports not ((backdrop-filter:blur(1px)) or (-webkit-backdrop-filter:blur(1px))){
  .jpl-home :is(.board,.rec){background:#101b26}
}
@media (prefers-reduced-transparency:reduce){
  .jpl-home :is(.board,.rec){-webkit-backdrop-filter:none;backdrop-filter:none;background:#101b26}
}

/* ---- tablet and phone ---- */
@media (max-width:1000px){
  .jpl-home .bar>.wrap.bar-in{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));row-gap:8px}
  .jpl-home .bar input[type=search]{grid-column:1 / -1}
  .jpl-home .bar .home-filter{grid-column:span 2}
  .jpl-home .bar #clear-filters{grid-column:span 2}
  .jpl-home .bar #lang{grid-column:span 1;padding:0 8px}
  .jpl-home .bar .count{grid-column:span 1;justify-self:end}
}
@media (max-width:900px){
  .jpl-home .hero{padding:64px 0 12px}
  .jpl-home .bar{position:static}
}
@media (max-width:560px){
  .jpl-home h1{font-size:34px;line-height:1.05}
  .jpl-home .row{padding:10px 12px;gap:10px}
  .jpl-home .rank{flex:0 0 30px;width:30px;height:30px;font-size:14px}
  .jpl-home .fig b{font-size:18px}
}

@media (prefers-reduced-motion:no-preference){
  .jpl-home .board,.jpl-home .rec{animation:sfRise .45s var(--sf-ease) both}
  @keyframes sfRise{from{opacity:0;transform:translateY(10px)}to{opacity:1;transform:none}}
}
@supports (corner-shape:squircle){
  .jpl-home :is(.board,.rec,.empty,.bar>.wrap.bar-in){corner-shape:squircle}
  .jpl-home .board{border-radius:48px}
  .jpl-home .rec{border-radius:40px}
  .jpl-home .bar>.wrap.bar-in{border-radius:42px}
}
@media (prefers-reduced-motion:reduce){
  .jpl-home *,.jpl-home *::before,.jpl-home *::after{animation:none!important;transition:none!important}
}
