/* ============================================================
   Highpoint Smooth: one render budget for the whole desk.
   Loaded last. The Miami backdrop becomes a still picture with one cheap, GPU-only
   piece of motion (the grid floor); the per-frame blur comes off every content
   surface; and every surface gets the same layered glass: a lit top edge, a tinted
   body, soft depth, and a hover glow that fades in with opacity instead of
   re-painting shadows. Scoped to html.hp-pro. Revert: remove the <link> in index.html.
   ============================================================ */

/* ---------- 0. glass tokens ---------- */
html.hp-pro{
  /* frosted body: a lavender-white tint over deep plum, so panels read as glass, not dark boxes */
  --gl-base:linear-gradient(180deg,rgba(92,54,132,.46),rgba(30,16,52,.72));
  --gl-base-2:linear-gradient(180deg,rgba(74,40,112,.54),rgba(20,11,36,.80));
  /* a diagonal light streak across the top-left, like light through a pane, plus a specular spot in the corner */
  --gl-sheen:radial-gradient(60% 50% at 8% 0%,rgba(255,255,255,.22),transparent 70%),
    linear-gradient(115deg,rgba(255,255,255,.20) 0%,rgba(255,255,255,.09) 22%,rgba(255,255,255,0) 46%,rgba(255,255,255,0) 70%,rgba(255,255,255,.07) 100%);
  --gl-edge:linear-gradient(180deg,rgba(255,255,255,.45) 0,rgba(255,255,255,0) 2px);
  /* iridescent 1px edge: pink → white → sky → gold, drawn once by a masked ::before ring */
  --gl-ring:linear-gradient(135deg,color-mix(in srgb,var(--theme-accent,#FF4FA3) 95%,transparent) 0%,rgba(255,255,255,.80) 26%,rgba(255,255,255,.28) 48%,rgba(61,184,255,.70) 76%,color-mix(in srgb,var(--theme-accent-2,#FF9E3D) 85%,transparent) 100%);
  --gl-ring-dim:linear-gradient(135deg,rgba(255,120,190,.55),rgba(255,255,255,.42) 30%,rgba(255,255,255,.12) 52%,rgba(120,200,255,.35) 78%,rgba(255,255,255,.40));
  --gl-line:rgba(255,255,255,.18);
  --gl-line-hot:color-mix(in srgb,var(--theme-accent,#FF4FA3) 70%,transparent);
  --gl-shadow:inset 0 1px 0 rgba(255,255,255,.26),inset 0 -1px 0 rgba(0,0,0,.32),inset 0 0 0 1px rgba(255,255,255,.04),inset 0 0 60px -30px rgba(255,255,255,.10),0 34px 70px -30px rgba(0,0,0,.95),0 22px 56px -28px color-mix(in srgb,var(--theme-accent,#FF4FA3) 55%,transparent);
  --gl-glow:0 30px 60px -24px color-mix(in srgb,var(--theme-accent,#FF4FA3) 65%,transparent),0 0 0 1px color-mix(in srgb,var(--theme-accent,#FF4FA3) 40%,transparent);
  --gl-r:26px;
  --gl-ease:cubic-bezier(.2,.8,.2,1);
}

/* ---------- 1. living backdrop, cheap motion only ---------- */
html.hp-pro .vscene{contain:layout paint}
html.hp-pro .vscene::after{opacity:.9}
/* the old scanline/grid pseudo-element animated background-position (a repaint per frame) */
html.hp-pro body::after{display:none!important;animation:none!important}

/* grid floor: the lines move on their own compositor layer (transform only) */
.hp-floor{position:fixed;left:-35%;right:-35%;bottom:-8vh;height:52vh;z-index:0;pointer-events:none;overflow:hidden;
  transform:perspective(520px) rotateX(64deg);transform-origin:50% 100%;opacity:.85;
  -webkit-mask-image:linear-gradient(0deg,#000 8%,transparent 88%);mask-image:linear-gradient(0deg,#000 8%,transparent 88%)}
.hp-floor>i{position:absolute;left:0;right:0;top:-72px;height:calc(100% + 144px);display:block;will-change:transform;
  background:linear-gradient(90deg,color-mix(in srgb,var(--theme-accent,#FF4FA3) 80%,transparent) 1px,transparent 1px) 0 0/72px 72px,linear-gradient(0deg,color-mix(in srgb,var(--theme-accent-2,#FF9E3D) 70%,transparent) 1px,transparent 1px) 0 0/72px 72px;
  animation:hpFloor 8s linear infinite}
@keyframes hpFloor{from{transform:translateY(0)}to{transform:translateY(72px)}}
html.gated .hp-floor,html:not(.hp-pro) .hp-floor{display:none}
@media (max-width:900px){.hp-floor{display:none}}
@media (prefers-reduced-motion:reduce){.hp-floor>i{animation:none}}

/* ---------- 2. no per-frame blur on content ---------- */
html.hp-pro :is(.panel,.hero,.kpis>div,.col,.rank-card,.tiles>*,.hph-card,.hph-bar,.hph-usage,.hph-ready,.hph-sound,.hph-music,.hpd-kpis>div,
  .tablewrap,.chat,.queue,.strip,.strip>div,.amount,.leadwith,.hstats>div,.bigseg,.seg2,.seg,.card,.gs-card,.drawer .dh,.drawer .df,.toast,.rail,.hpk-box){
  -webkit-backdrop-filter:none!important;backdrop-filter:none!important}
/* chrome and floating call tools keep a light blur: few of them, and they sit over a still */
html.hp-pro .topbar{-webkit-backdrop-filter:blur(14px) saturate(140%)!important;backdrop-filter:blur(14px) saturate(140%)!important;
  background:rgba(9,5,15,.74)!important;border-bottom:1px solid var(--gl-line)!important;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.05),0 12px 30px -24px rgba(0,0,0,.9)!important}
html.hp-pro .win{-webkit-backdrop-filter:blur(12px) saturate(140%)!important;backdrop-filter:blur(12px) saturate(140%)!important;background:rgba(11,7,18,.9)!important}
html.hp-pro .hpdk,html.hp-pro .hpd-incoming{-webkit-backdrop-filter:blur(12px) saturate(140%);backdrop-filter:blur(12px) saturate(140%)}
html.hp-pro .hpp{-webkit-backdrop-filter:blur(12px) saturate(130%);backdrop-filter:blur(12px) saturate(130%)}
/* the Spotify dock is already 94% opaque; its 22px blur ran even while hidden (opacity 0, still display:block) */
html.hp-pro #spDock{-webkit-backdrop-filter:none!important;backdrop-filter:none!important;background:var(--gl-edge),var(--gl-sheen),rgba(10,8,16,.97)!important;border-color:var(--gl-line)!important}

/* ---------- 3. one glass for every surface ---------- */
html.hp-pro :is(.panel,.hero,.kpis>div,.col,.rank-card,.tiles>*,.hph-card,.hph-bar,.hph-usage,.hph-ready,.hph-sound,.hph-music,.hpd-kpis>div,.tablewrap,.chat,.queue,.hstats>div,.gs-card){
  position:relative;
  background:var(--gl-edge),var(--gl-sheen),var(--gl-base)!important;
  border:1px solid transparent!important;
  border-radius:var(--gl-r)!important;
  box-shadow:var(--gl-shadow)!important;
  transition:transform .4s var(--gl-ease)!important;
}
/* the iridescent edge: a 1px gradient ring, masked so only the border shows. Painted once, no per-frame cost. */
html.hp-pro :is(.panel,.hero,.kpis>div,.col,.rank-card,.tiles>*,.hph-card,.hph-bar,.hph-usage,.hph-ready,.hph-sound,.hph-music,.hpd-kpis>div,.tablewrap,.chat,.queue,.hstats>div,.gs-card)::before{
  content:"";position:absolute;inset:-1px;width:auto;height:auto;border-radius:inherit;padding:1px;pointer-events:none;z-index:2;
  background:var(--gl-ring-dim);box-shadow:none;
  -webkit-mask:linear-gradient(#000 0 0) content-box,linear-gradient(#000 0 0);-webkit-mask-composite:xor;mask:linear-gradient(#000 0 0) content-box,linear-gradient(#000 0 0);mask-composite:exclude;
  opacity:1;transition:opacity .3s var(--gl-ease)}
html.hp-pro :is(.hero,.panel,.col,.tablewrap,.chat,.queue)::before{background:var(--gl-ring)}
html.hp-pro :is(.kpis>div,.tiles>*,.hstats>div,.hpd-kpis>div,.rank-card){border-radius:18px!important}
html.hp-pro .col{border-top:0!important}
html.hp-pro .col::before{background:linear-gradient(135deg,color-mix(in srgb,var(--theme-accent,#FF4FA3) 85%,transparent) 0%,rgba(255,255,255,.5) 30%,rgba(255,255,255,.12) 55%,color-mix(in srgb,var(--theme-accent-2,#FF9E3D) 50%,transparent) 100%)}
html.hp-pro .hero{border-radius:30px!important;
  background:var(--gl-edge),
    radial-gradient(60% 100% at 100% 0%,color-mix(in srgb,var(--theme-accent,#FF4FA3) 48%,transparent),transparent 62%),
    radial-gradient(50% 80% at 0% 100%,rgba(61,184,255,.28),transparent 62%),
    radial-gradient(40% 60% at 60% 110%,color-mix(in srgb,var(--theme-accent-2,#FF9E3D) 22%,transparent),transparent 65%),
    radial-gradient(60% 50% at 8% 0%,rgba(255,255,255,.24),transparent 70%),
    linear-gradient(115deg,rgba(255,255,255,.18) 0%,rgba(255,255,255,.06) 26%,rgba(255,255,255,0) 50%),
    var(--gl-base-2)!important;
  box-shadow:var(--gl-shadow),0 0 0 7px rgba(255,255,255,.035),0 0 0 8px color-mix(in srgb,var(--theme-accent,#FF4FA3) 10%,transparent),0 50px 110px -40px color-mix(in srgb,var(--theme-accent,#FF4FA3) 75%,transparent)!important}
html.hp-pro .hero::before{inset:-1px!important;height:auto!important;background:var(--gl-ring)!important;box-shadow:none!important}
html.hp-pro .hero h1{text-shadow:0 0 18px color-mix(in srgb,var(--theme-accent,#FF4FA3) 90%,transparent),0 0 48px color-mix(in srgb,var(--theme-accent,#FF4FA3) 55%,transparent),0 2px 0 rgba(0,0,0,.4)!important}

/* the side rail: deep glass with a soft pink light leaking from the content side */
html.hp-pro .rail{background:radial-gradient(80% 30% at 50% 0%,color-mix(in srgb,var(--theme-accent,#FF4FA3) 16%,transparent),transparent 70%),linear-gradient(180deg,rgba(34,18,58,.97),rgba(9,5,16,.99))!important;border-right:1px solid rgba(255,255,255,.10)!important;
  box-shadow:inset -1px 0 0 rgba(255,255,255,.05),14px 0 60px -30px color-mix(in srgb,var(--theme-accent,#FF4FA3) 60%,transparent)!important}
html.hp-pro .rail .nav{border-radius:14px!important;border:1px solid transparent!important;transition:background-color .18s,border-color .18s,transform .18s var(--gl-ease)!important}
html.hp-pro .rail .nav:hover{background:rgba(255,255,255,.07)!important;border-color:rgba(255,255,255,.12)!important;transform:translateX(2px)}
html.hp-pro .rail .nav[aria-current=page]{
  background:linear-gradient(90deg,color-mix(in srgb,var(--theme-accent,#FF4FA3) 34%,transparent),rgba(255,255,255,.08) 55%,rgba(255,255,255,.04))!important;
  border-color:rgba(255,255,255,.22)!important;color:#fff!important;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.22),inset 3px 0 0 var(--theme-accent,#FF4FA3),0 0 24px -6px color-mix(in srgb,var(--theme-accent,#FF4FA3) 55%,transparent),0 14px 32px -18px color-mix(in srgb,var(--theme-accent,#FF4FA3) 90%,transparent)!important}
html.hp-pro .rail .nav[aria-current=page] svg{filter:drop-shadow(0 0 6px color-mix(in srgb,var(--theme-accent,#FF4FA3) 90%,transparent))}

/* segmented controls, toasts, inputs */
html.hp-pro :is(.bigseg,.seg2,.seg){background:linear-gradient(180deg,rgba(0,0,0,.30),rgba(0,0,0,.18))!important;border:1px solid rgba(255,255,255,.12)!important;box-shadow:inset 0 2px 6px rgba(0,0,0,.35),inset 0 1px 0 rgba(255,255,255,.04)!important}
html.hp-pro .toast{background:var(--gl-edge),var(--gl-sheen),linear-gradient(180deg,rgba(40,18,60,.98),rgba(14,8,24,.98))!important;border:1px solid rgba(255,255,255,.16)!important;border-radius:16px!important}
html.hp-pro :is(input,select,textarea).field,html.hp-pro .field :is(input,select,textarea),html.hp-pro .hpd :is(input,select,textarea):not([type=checkbox]):not([type=range]):not([type=file]){
  background:linear-gradient(180deg,color-mix(in srgb,#fff 6%,transparent),transparent 50%),var(--theme-menu,var(--theme-sunk))!important;border:1px solid var(--theme-line-strong,rgba(255,255,255,.13))!important;
  box-shadow:inset 0 1px 0 color-mix(in srgb,#fff 8%,transparent)!important;transition:border-color .18s,box-shadow .18s!important}
html.hp-pro :is(input,select,textarea).field:focus,html.hp-pro .field :is(input,select,textarea):focus{border-color:var(--theme-accent)!important;box-shadow:0 0 0 3px var(--theme-soft)!important;outline:none!important}

/* big numbers: pink → gold → white, lit from above */
html.hp-pro :is(.kpis>div .num,.hstats>div b,.hpd-kpis>div b){
  background:linear-gradient(180deg,#fff 0%,#fff 35%,#ffc6e2 100%);-webkit-background-clip:text;background-clip:text;color:transparent!important;-webkit-text-fill-color:transparent;
  text-shadow:none!important;filter:drop-shadow(0 4px 14px color-mix(in srgb,var(--theme-accent,#FF4FA3) 55%,transparent))}
html.hp-pro .kpis>div .label{letter-spacing:.14em;color:rgba(255,255,255,.62)!important}

/* glass pill buttons: lit top edge, deeper base, no filter() on hover */
html.hp-pro .btn:not(.primary):not([data-new]):not(.hph-go){
  background:linear-gradient(180deg,rgba(255,255,255,.18),rgba(255,255,255,.06))!important;border:1px solid rgba(255,255,255,.22)!important;color:#FBF8FF!important;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.32),inset 0 -1px 0 rgba(0,0,0,.28),0 10px 24px -14px rgba(0,0,0,.95)!important}
html.hp-pro .btn:not(.primary):not([data-new]):not(.hph-go):hover{background:linear-gradient(180deg,rgba(255,255,255,.27),rgba(255,255,255,.10))!important;border-color:rgba(255,255,255,.40)!important;transform:translateY(-1px);
  box-shadow:inset 0 1px 0 rgba(255,255,255,.38),inset 0 -1px 0 rgba(0,0,0,.28),0 12px 26px -14px rgba(0,0,0,.95),0 0 18px -4px rgba(255,255,255,.18)!important}
html.hp-pro .topbar .btn:not(.primary):not([data-new]){background:linear-gradient(180deg,rgba(255,255,255,.16),rgba(255,255,255,.055))!important;border-color:rgba(255,255,255,.20)!important;box-shadow:inset 0 1px 0 rgba(255,255,255,.26)!important}
html.hp-pro .topbar .btn:not(.primary):not([data-new]):hover{background:linear-gradient(180deg,rgba(255,255,255,.25),rgba(255,255,255,.10))!important;border-color:rgba(255,255,255,.36)!important}
/* primary buttons: a hot neon ring and under-glow (static, no filter on hover) */
html.hp-pro .btn.primary,html.hp-pro .topbar [data-new],html.hp-pro .hph-go{
  box-shadow:var(--btn2-ring),var(--btn2-glow)!important}
html.hp-pro .btn.primary:hover,html.hp-pro .topbar [data-new]:hover,html.hp-pro .hph-go:hover{filter:none!important;transform:translateY(-1px);
  box-shadow:var(--btn2-ring),0 16px 34px -14px var(--theme-glow)!important}
html.hp-pro .topbar{background:linear-gradient(180deg,rgba(44,22,74,.80),rgba(12,7,22,.74))!important;border-bottom:1px solid rgba(255,255,255,.14)!important;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.10),0 1px 0 color-mix(in srgb,var(--theme-accent,#FF4FA3) 18%,transparent),0 14px 36px -24px rgba(0,0,0,.95)!important}

/* glass scrollbars */
html.hp-pro ::-webkit-scrollbar{width:10px;height:10px}
html.hp-pro ::-webkit-scrollbar-track{background:transparent}
html.hp-pro ::-webkit-scrollbar-thumb{background:linear-gradient(180deg,rgba(255,255,255,.22),rgba(255,255,255,.10));border:2px solid transparent;background-clip:padding-box;border-radius:999px}
html.hp-pro ::-webkit-scrollbar-thumb:hover{background:linear-gradient(180deg,rgba(255,120,190,.55),rgba(255,255,255,.18));background-clip:padding-box}

/* table headers and rows read through the glass */
html.hp-pro .tablewrap thead th{background:rgba(255,255,255,.04)!important;border-bottom:1px solid rgba(255,255,255,.10)!important;letter-spacing:.14em}
html.hp-pro .tablewrap tbody tr{transition:background-color .15s}
html.hp-pro .tablewrap tbody tr:hover{background:color-mix(in srgb,var(--theme-accent,#FF4FA3) 7%,transparent)!important}

/* hover: the border lights and a spotlight fades in (opacity only, no shadow/background transitions) */
html.hp-pro :is(.hero,.kpis>div,.tiles>*,.rank-card,.hph-card,.col){position:relative;isolation:isolate}
html.hp-pro :is(.hero,.kpis>div,.tiles>*,.rank-card,.hph-card,.col)::after{content:"";position:absolute;inset:0;width:auto;height:auto;border-radius:inherit;pointer-events:none;z-index:-1;opacity:0;
  transition:opacity .3s var(--gl-ease);will-change:opacity;
  background:radial-gradient(480px circle at var(--mx,50%) var(--my,0%),color-mix(in srgb,var(--theme-accent,#FF4FA3) 38%,transparent),color-mix(in srgb,var(--theme-accent-2,#FF9E3D) 12%,transparent) 40%,transparent 66%)}
html.hp-pro :is(.hero,.kpis>div,.tiles>*,.rank-card,.hph-card,.col).hp3-hot::after{opacity:1}
html.hp-pro .hp3-hot{background:var(--gl-edge),var(--gl-sheen),var(--gl-base)!important;box-shadow:var(--gl-shadow)!important;border-color:transparent!important}
html.hp-pro :is(.kpis>div,.tiles>*,.rank-card,.hph-card).hp3-hot::before{background:var(--gl-ring)}
html.hp-pro .hero.hp3-hot{background:var(--gl-edge),
    radial-gradient(60% 100% at 100% 0%,color-mix(in srgb,var(--theme-accent,#FF4FA3) 48%,transparent),transparent 62%),
    radial-gradient(50% 80% at 0% 100%,rgba(61,184,255,.28),transparent 62%),
    radial-gradient(40% 60% at 60% 110%,color-mix(in srgb,var(--theme-accent-2,#FF9E3D) 22%,transparent),transparent 65%),
    radial-gradient(60% 50% at 8% 0%,rgba(255,255,255,.24),transparent 70%),
    linear-gradient(115deg,rgba(255,255,255,.18) 0%,rgba(255,255,255,.06) 26%,rgba(255,255,255,0) 50%),
    var(--gl-base-2)!important;
  box-shadow:var(--gl-shadow),0 0 0 7px rgba(255,255,255,.035),0 0 0 8px color-mix(in srgb,var(--theme-accent,#FF4FA3) 10%,transparent),0 50px 110px -40px color-mix(in srgb,var(--theme-accent,#FF4FA3) 75%,transparent)!important}
html.hp-pro :is(.kpis>div,.tiles>*,.rank-card){will-change:transform}
html.hp-pro .kpis>div:hover{box-shadow:var(--gl-shadow)!important}

/* pipeline cards: lift with transform, glow with an opacity-faded ring */
html.hp-pro .card{position:relative;isolation:isolate;
  background:linear-gradient(180deg,rgba(255,255,255,.16),rgba(255,255,255,.05))!important;border:1px solid rgba(255,255,255,.20)!important;border-radius:16px!important;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.26),0 12px 26px -16px rgba(0,0,0,.9)!important;
  transition:transform .22s var(--gl-ease),border-color .2s!important}
html.hp-pro .card::after{content:"";position:absolute;inset:-1px;border-radius:inherit;pointer-events:none;z-index:-1;opacity:0;transition:opacity .25s var(--gl-ease);box-shadow:var(--gl-glow)}
html.hp-pro .card:hover{transform:translateY(-2px);border-color:var(--gl-line-hot)!important;box-shadow:inset 0 1px 0 rgba(255,255,255,.09),0 10px 22px -16px rgba(0,0,0,.9)!important}
html.hp-pro .card:hover::after{opacity:1}

/* buttons: no filter transitions (each one re-rasterizes the button every frame) */
html.hp-pro .btn{transition:transform .16s var(--gl-ease),border-color .2s,background-color .2s,box-shadow .2s!important}
html.hp-pro .btn:hover{filter:none!important}

/* one page-enter animation, not two stacked on the same element */
html.hp-pro section[data-v]:not([hidden]){animation:hpViewIn .32s var(--gl-ease) both}
@media (prefers-reduced-motion:reduce){html.hp-pro section[data-v]:not([hidden]){animation:none}}

/* ---------- 4. reduced motion ---------- */
@media (prefers-reduced-motion:reduce){
  html.hp-pro :is(.hero,.kpis>div,.tiles>*,.rank-card,.hph-card,.col)::after,html.hp-pro .card::after{transition:none}
  html.hp-pro .card:hover{transform:none}
}
