/* Legacy Checker - glass UI layer (loaded LAST on every page): purple scrollbars, glass surfaces,
   polished controls, tab/category switch animations, and the clipped-glow ("line") fix. */
:root{--g-line:rgba(196,160,255,.16);--g-line2:rgba(196,160,255,.32);--g-glass:rgba(24,16,44,.52);--g-glass2:rgba(16,10,30,.62);--g-p:#a855f7;--g-p2:#c026d3;--g-ease:cubic-bezier(.16,1,.3,1)}

/* ---------- selection / caret ---------- */
::selection{background:rgba(168,85,247,.5);color:#fff}
input,textarea{caret-color:#d8b4fe}
::placeholder{color:rgba(190,175,225,.42)}

/* ---------- scrollbars (glass track + purple gradient thumb) ---------- */
html,*{scrollbar-width:thin;scrollbar-color:rgba(168,85,247,.6) rgba(255,255,255,.03)}
::-webkit-scrollbar{width:12px;height:12px}
::-webkit-scrollbar-track{background:rgba(255,255,255,.025);border-radius:99px;box-shadow:inset 0 0 0 1px rgba(196,160,255,.06)}
::-webkit-scrollbar-thumb{background:linear-gradient(180deg,#a855f7,#7c3aed 55%,#c026d3);border-radius:99px;border:3px solid transparent;background-clip:padding-box;box-shadow:0 0 10px rgba(168,85,247,.5);min-height:36px}
::-webkit-scrollbar-thumb:hover{background:linear-gradient(180deg,#c084fc,#9333ea 55%,#e879f9);background-clip:padding-box;border:3px solid transparent}
::-webkit-scrollbar-thumb:active{background:linear-gradient(180deg,#d8b4fe,#a855f7);background-clip:padding-box;border:3px solid transparent}
::-webkit-scrollbar-button{display:none;width:0;height:0}
::-webkit-scrollbar-corner{background:transparent}
.rv-tablewrap::-webkit-scrollbar,.lcs-pop::-webkit-scrollbar{width:8px;height:8px}
html{scroll-behavior:smooth}

/* ---------- glass surfaces ---------- */
.sp-card,.sp-tile,.mp-modal,.pin-modal,.tp-tabs,.lcs-pop{backdrop-filter:blur(18px) saturate(150%);-webkit-backdrop-filter:blur(18px) saturate(150%)}
.sp-card,.sp-tile{background:linear-gradient(160deg,rgba(255,255,255,.055),rgba(255,255,255,.016) 45%,rgba(124,58,237,.05));border-color:var(--g-line);box-shadow:0 10px 40px rgba(0,0,0,.35),inset 0 1px 0 rgba(255,255,255,.07)}
.mp-modal,.pin-modal{background:linear-gradient(165deg,rgba(34,22,60,.86),rgba(12,8,24,.92));border-color:var(--g-line2);box-shadow:0 30px 90px rgba(0,0,0,.65),0 0 60px rgba(124,58,237,.18),inset 0 1px 0 rgba(255,255,255,.08)}
.mp-overlay,.pin-overlay{background:rgba(8,5,18,.68);backdrop-filter:blur(8px);-webkit-backdrop-filter:blur(8px)}
.tp-tabs{background:rgba(20,12,38,.55);border-color:var(--g-line)}
.sp-card:hover{border-color:var(--g-line2)}
.sp-card{transition:border-color .25s,box-shadow .3s,transform .3s var(--g-ease)}

/* ---------- inputs ---------- */
.tp-in,input.tp-in,textarea.tp-in,select.tp-in{background:linear-gradient(180deg,rgba(255,255,255,.05),rgba(255,255,255,.02));border:1px solid var(--g-line);color:#fff;transition:border-color .2s,box-shadow .25s,background .2s}
.tp-in:hover{border-color:var(--g-line2)}
.tp-in:focus{border-color:rgba(216,180,254,.8)!important;box-shadow:0 0 0 4px rgba(168,85,247,.2),0 0 24px rgba(192,38,211,.22)!important;background:rgba(255,255,255,.06)}
select option,select optgroup{background:#140d24;color:#eadfff}
input[type=checkbox]{accent-color:#a855f7}

/* ---------- buttons ---------- */
.sp-cta,.tp-ghost,.sp-mbtn,.tp-tab,.mp-cat,.tp-radios button{transition:transform .2s var(--g-ease),box-shadow .25s,background .2s,border-color .2s,color .2s,opacity .2s}
.sp-cta:hover,.sp-mbtn:hover{transform:translateY(-1px)}
.sp-cta:active,.tp-ghost:active,.sp-mbtn:active{transform:translateY(0) scale(.97)}
.tp-ghost{background:rgba(255,255,255,.035);border-color:var(--g-line)}
.tp-ghost:hover{background:rgba(168,85,247,.14);border-color:var(--g-line2)}
button:focus-visible,a:focus-visible,[tabindex]:focus-visible{outline:2px solid rgba(216,180,254,.8);outline-offset:2px;border-radius:10px}

/* ---------- the "line" glitch: glows were clipped by the card edge (overflow:hidden) and showed as a hard
   line right under the buttons. Give the glow room, tone it down, and make the divider a soft gradient. ---------- */
.sp-cta{box-shadow:0 6px 18px rgba(168,85,247,.32)}
.sp-cta:hover{box-shadow:0 8px 24px rgba(192,38,211,.42)}
.tp-form{padding-bottom:34px}
.mp-form{padding-bottom:6px}
.tp-actions{border-top:0!important;position:relative;padding-top:20px!important;margin-top:4px}
.tp-actions::before{content:"";position:absolute;left:0;right:0;top:0;height:1px;background:linear-gradient(90deg,transparent,var(--g-line2),transparent)}
.sp-card{overflow:clip;overflow-clip-margin:0}

/* ---------- switch animations: tabs, categories, views, modals ---------- */
@keyframes lcViewIn{from{opacity:0;transform:translateY(16px) scale(.992);filter:blur(5px)}to{opacity:1;transform:none;filter:blur(0)}}
@keyframes lcItemIn{from{opacity:0;transform:translateY(12px)}to{opacity:1;transform:none}}
@keyframes lcModalIn{from{opacity:0;transform:translateY(18px) scale(.95)}to{opacity:1;transform:none}}
@keyframes lcFadeIn{from{opacity:0}to{opacity:1}}
.sp-view.active{animation:lcViewIn .5s var(--g-ease) both!important}
.sp-view.active>*{animation:lcItemIn .5s var(--g-ease) both}
.sp-view.active>*:nth-child(2){animation-delay:.05s}.sp-view.active>*:nth-child(3){animation-delay:.1s}.sp-view.active>*:nth-child(4){animation-delay:.15s}.sp-view.active>*:nth-child(5){animation-delay:.2s}
#mp-main>*{animation:lcViewIn .5s var(--g-ease) both}
#mp-main>*>*{animation:lcItemIn .5s var(--g-ease) both}
#mp-main>*>*:nth-child(2){animation-delay:.05s}#mp-main>*>*:nth-child(3){animation-delay:.1s}#mp-main>*>*:nth-child(4){animation-delay:.15s}#mp-main>*>*:nth-child(5){animation-delay:.2s}#mp-main>*>*:nth-child(6){animation-delay:.25s}
.mp-overlay.open,.pin-overlay.open{animation:lcFadeIn .22s ease both}
.mp-overlay.open .mp-modal,.pin-overlay.open .pin-modal{animation:lcModalIn .42s var(--g-ease) both}
.mp-modal .mp-form>*,.mp-modal .tp-field{animation:lcItemIn .45s var(--g-ease) both}
.mp-modal .tp-field:nth-child(2){animation-delay:.04s}.mp-modal .tp-field:nth-child(3){animation-delay:.08s}.mp-modal .tp-field:nth-child(4){animation-delay:.12s}
.tp-tab.active,.mp-cat.active{animation:lcPop .35s var(--g-ease)}
@keyframes lcPop{from{transform:scale(.94)}to{transform:none}}
.mp-cat{position:relative}
.mp-cat:hover{transform:translateX(3px)}
.mp-cat.active{box-shadow:inset 3px 0 0 var(--g-p),0 0 22px rgba(168,85,247,.14)}
@media (prefers-reduced-motion:reduce){.sp-view.active,.sp-view.active>*,#mp-main>*,#mp-main>*>*,.mp-modal,.pin-modal,.mp-overlay.open,.pin-overlay.open{animation:none!important}html{scroll-behavior:auto}}

/* ---------- custom dropdown: stronger purple glass ---------- */
.lcs-btn{background:linear-gradient(180deg,rgba(255,255,255,.07),rgba(255,255,255,.025));border-color:var(--g-line2);backdrop-filter:blur(10px)}
.lcs-pop{background:linear-gradient(180deg,rgba(38,24,68,.9),rgba(14,9,28,.95));border-color:rgba(192,132,252,.4)}
.lcs-opt.hl{background:linear-gradient(90deg,rgba(124,58,237,.5),rgba(192,38,211,.34))}


/* =====================================================================================================
   GLASSMORPHISM v2 - one frosted-glass system for the whole site (landing, staff panel, management,
   player results, modals, forms). Paint-only: nothing here changes layout or sizes.
   Recipe: translucent fill + backdrop blur/saturate + 1px light edge + top specular highlight + soft shadow.
   Blur is applied to the OUTER surfaces only; small repeated items (rows, chips) just get translucent fills,
   which keeps scrolling smooth.
   ===================================================================================================== */
:root{
  --gl-fill:linear-gradient(145deg,rgba(255,255,255,.105) 0%,rgba(255,255,255,.04) 42%,rgba(139,92,246,.085) 100%);
  --gl-fill-hi:linear-gradient(145deg,rgba(255,255,255,.15) 0%,rgba(255,255,255,.06) 45%,rgba(139,92,246,.14) 100%);
  --gl-tint:linear-gradient(rgba(12,8,26,.42),rgba(12,8,26,.42));
  --gl-soft:rgba(255,255,255,.05);
  --gl-soft-hi:rgba(255,255,255,.09);
  --gl-edge:rgba(255,255,255,.15);
  --gl-edge-hi:rgba(216,180,254,.45);
  --gl-blur:blur(22px) saturate(165%);
  --gl-shadow:0 22px 56px -22px rgba(5,2,18,.8),0 1px 0 rgba(255,255,255,.16) inset,0 -1px 0 rgba(255,255,255,.03) inset;
  --gl-shadow-lg:0 34px 90px -28px rgba(5,2,18,.9),0 0 70px -20px rgba(139,92,246,.35),0 1px 0 rgba(255,255,255,.18) inset;
}

/* colour behind the glass (blur needs something to blur) + no sideways scroll from full-bleed decorations */
html{overflow-x:clip}
body{overflow-x:clip;
  background:
    radial-gradient(900px 620px at 8% -6%,rgba(124,58,237,.34),transparent 62%),
    radial-gradient(760px 560px at 96% 4%,rgba(217,70,239,.20),transparent 62%),
    radial-gradient(900px 640px at 50% 112%,rgba(56,189,248,.11),transparent 62%),
    #07050f!important;
  background-attachment:fixed!important}

/* A fade that ends on filter:blur(0) leaves a `filter` on the container, which stops every glass card inside it
   from seeing the page behind it (flat, un-blurred panels after a tab switch). End on `none` instead. */
@keyframes lcViewIn{from{opacity:0;transform:translateY(16px) scale(.992);filter:blur(5px)}to{opacity:1;transform:none;filter:none}}

/* ---- large glass surfaces ---- */
.ac-card,.term,.sx,.mw,.rep,.pin-modal,.mp-modal,.sp-card,.sp-tile,.tp-tabs,.tp-menu,.mp-rail,.mp-toast,.sp-picker,
.lc-glass,#auth-modal .pin-modal{
  background:var(--gl-fill),var(--gl-tint)!important;
  border:1px solid var(--gl-edge)!important;
  box-shadow:var(--gl-shadow)!important;
  -webkit-backdrop-filter:var(--gl-blur);backdrop-filter:var(--gl-blur)}
.pin-modal,.mp-modal,.term,.sx{box-shadow:var(--gl-shadow-lg)!important}
.pin-modal,.mp-modal{background:var(--gl-fill-hi),linear-gradient(rgba(14,9,30,.55),rgba(14,9,30,.55))!important;border-color:rgba(216,180,254,.3)!important}
.ac-card:hover,.sp-card:hover{border-color:var(--gl-edge-hi)!important}
.term-bar,.mw-bar,.sx-h,.sp-card-head{background:rgba(255,255,255,.045)!important;border-bottom:1px solid rgba(255,255,255,.1)!important}
.sx-f{background:rgba(8,5,18,.32)!important;border-top:1px solid rgba(255,255,255,.1)!important}
.term-body{background:rgba(6,4,14,.38)}

/* ---- navigation: a floating glass bar ---- */
nav.fixed.top-0,nav.sticky.top-0{
  background:var(--gl-fill),linear-gradient(rgba(12,8,26,.5),rgba(12,8,26,.5))!important;
  border:1px solid var(--gl-edge)!important;box-shadow:var(--gl-shadow)!important;
  -webkit-backdrop-filter:blur(24px) saturate(170%);backdrop-filter:blur(24px) saturate(170%)}
.lcnav #mobile-menu,#mobile-menu.open{background:rgba(16,10,32,.72);-webkit-backdrop-filter:var(--gl-blur);backdrop-filter:var(--gl-blur);border:1px solid var(--gl-edge);border-radius:18px}

/* ---- inner items: translucent only (no blur) ---- */
.mw-layers,.tile,.fi,.find,.mw-f,.perm,.sp-chip,.sp-mini,.mp-perm,.mp-tag,.mp-chip,.tp-pgrid div,.mp-srv-stats div,.mp-scope,.mp-cat,.sp-code,.tp-radios button,.sx-pill,.fchip,.ac-chip,.seg,.chipf,.mw-url,.mw-chips button{
  background:var(--gl-soft)!important;border-color:rgba(255,255,255,.11)!important;box-shadow:0 1px 0 rgba(255,255,255,.06) inset}
.mw-layers{background:rgba(6,4,14,.30)!important}
.fi:hover,.mp-cat:hover,.seg:hover,.chipf:hover,.fchip:hover{background:var(--gl-soft-hi)!important}
.tile.run{background:rgba(139,92,246,.16)!important;border-color:rgba(192,132,252,.55)!important}
.tile.done{background:rgba(52,211,153,.06)!important}
.tile.flag{background:rgba(251,113,133,.08)!important}
.mp-cat.active,.seg.on,.chipf.on,.fchip.on,.tp-radios button.on,.mw-chips button.on,.tp-tab.active{
  background:linear-gradient(135deg,rgba(139,92,246,.42),rgba(217,70,239,.24))!important;border-color:rgba(216,180,254,.5)!important;
  box-shadow:0 1px 0 rgba(255,255,255,.2) inset,0 10px 26px -14px rgba(168,85,247,.95)!important}

/* ---- buttons ---- */
/* the old secondary button painted an opaque fill over a spinning conic border; now it is a glass pill */
.btn-border{background:var(--gl-soft-hi)!important;border:1px solid rgba(216,180,254,.42)!important;
  box-shadow:0 1px 0 rgba(255,255,255,.18) inset,0 10px 28px -16px rgba(168,85,247,.8);
  -webkit-backdrop-filter:blur(14px) saturate(150%);backdrop-filter:blur(14px) saturate(150%)}
.btn-border:hover{background:rgba(255,255,255,.14)!important;border-color:rgba(233,213,255,.7)!important;filter:none}
.btn-ghost,.tp-ghost,.sp-mbtn,.sp-fbtn,.sp-seg button{background:var(--gl-soft)!important;border:1px solid rgba(255,255,255,.14)!important;
  box-shadow:0 1px 0 rgba(255,255,255,.08) inset;-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px)}
.btn-ghost:hover,.tp-ghost:hover,.sp-mbtn:hover,.sp-fbtn:hover{background:rgba(168,85,247,.18)!important;border-color:var(--gl-edge-hi)!important}
.btn-shine,.sp-cta{box-shadow:0 1px 0 rgba(255,255,255,.38) inset,0 0 0 1px rgba(255,255,255,.14) inset,0 12px 30px -10px rgba(168,85,247,.7)}
.ac-badge{background:rgba(139,92,246,.16);border:1px solid rgba(216,180,254,.34);box-shadow:0 1px 0 rgba(255,255,255,.12) inset;-webkit-backdrop-filter:blur(12px);backdrop-filter:blur(12px)}

/* ---- form fields ---- */
.field input,.tp-in,input.tp-in,textarea.tp-in,select.tp-in,.ac-select,.lcs-btn,.mp-modal input,.mp-modal textarea,.mp-modal select{
  background:rgba(255,255,255,.055)!important;border:1px solid rgba(255,255,255,.16)!important;color:#fff;
  box-shadow:0 2px 8px rgba(0,0,0,.28) inset,0 1px 0 rgba(255,255,255,.05);
  -webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px)}
.field input:focus,.tp-in:focus,.ac-select:focus,.sp-search input:focus{border-color:rgba(233,213,255,.85)!important;background:rgba(255,255,255,.085)!important;
  box-shadow:0 0 0 4px rgba(168,85,247,.22),0 0 26px rgba(192,38,211,.22)!important}

/* ---- tables / lists ---- */
.sp-table-wrap,.mp-tw{border-radius:14px}
table thead th{background:rgba(255,255,255,.04)}
hr,.sp-div{border-color:rgba(255,255,255,.1)}

/* ---- footer ---- */
footer{background:rgba(255,255,255,.025)!important;border-top:1px solid var(--gl-edge)!important;-webkit-backdrop-filter:blur(14px);backdrop-filter:blur(14px)}

/* ---- risk ring (results header + landing demo): show the % sign ---- */
.mw-risk b::after{content:"%";font-size:.55em;margin-left:1px;opacity:.8}
.rv-verdict .ring b{font-variant-numeric:tabular-nums}

/* ---- browsers without backdrop-filter, or with "reduce transparency": solid, readable fills ---- */
@supports not ((backdrop-filter:blur(1px)) or (-webkit-backdrop-filter:blur(1px))){
  .ac-card,.term,.sx,.mw,.rep,.pin-modal,.mp-modal,.sp-card,.sp-tile,.tp-tabs,.tp-menu,.mp-rail,nav.fixed.top-0,nav.sticky.top-0{background:rgba(24,16,44,.94)!important}
}
@media (prefers-reduced-transparency:reduce){
  .ac-card,.term,.sx,.mw,.rep,.pin-modal,.mp-modal,.sp-card,.sp-tile,.tp-tabs,.tp-menu,.mp-rail,nav.fixed.top-0,nav.sticky.top-0,footer{
    background:rgba(24,16,44,.96)!important;-webkit-backdrop-filter:none;backdrop-filter:none}
}

/* ---- v2.1 corrections (the first glass pass over-styled these) ---- */
/* search: ONE glass pill - the wrapper is the field, the input inside is invisible (it was a box inside a box) */
.sp-search{background:rgba(255,255,255,.06)!important;border:1px solid rgba(255,255,255,.16)!important;border-radius:14px!important;
  box-shadow:0 1px 0 rgba(255,255,255,.07) inset,0 6px 20px -12px rgba(0,0,0,.6);-webkit-backdrop-filter:blur(12px);backdrop-filter:blur(12px)}
.sp-search:focus-within{border-color:rgba(233,213,255,.8)!important;box-shadow:0 0 0 4px rgba(168,85,247,.2),0 1px 0 rgba(255,255,255,.1) inset!important}
.sp-search input,.sp-search input:focus{background:transparent!important;border:0!important;box-shadow:none!important;-webkit-backdrop-filter:none!important;backdrop-filter:none!important;outline:0!important}
/* root console rail: a rounded glass panel with flat items, only the active one is lit */
.mp-rail{border-radius:22px!important;padding:12px!important;gap:3px!important}
.mp-cat{background:transparent!important;border:1px solid transparent!important;box-shadow:none!important;border-radius:14px!important}
.mp-cat:hover{background:rgba(255,255,255,.07)!important}
.mp-cat.active{background:linear-gradient(135deg,rgba(var(--sp-rgb,168,85,247),.42),rgba(var(--sp-rgb2,217,70,239),.2))!important;border-color:rgba(233,213,255,.4)!important;
  box-shadow:0 1px 0 rgba(255,255,255,.22) inset,0 10px 26px -14px rgba(var(--sp-rgb,168,85,247),.95)!important}
.mp-rail-label{padding:2px 12px 10px!important}
/* colour / banner swatches must show their own colour */
.tp-sw button{background:var(--c)!important;border:2px solid transparent!important;box-shadow:0 4px 14px -6px rgba(0,0,0,.7),0 1px 0 rgba(255,255,255,.25) inset!important}
.tp-sw button.on{border-color:#fff!important;box-shadow:0 0 0 3px rgba(255,255,255,.18),0 6px 18px -6px rgba(0,0,0,.7)!important}
.tp-radios button{border-radius:12px!important}

.sp-row:hover{background:rgba(255,255,255,.04)}
