/* PRISM Phase 2IC — spectral crystal optical finish + VERIFIED-current-stage motion.
   Presentation only. Classic is the geometric source of truth (Phase 2IB).
   No stage, PR, APP, permission, auth or routing logic is implemented here.
   CSS is gated by html.prismThemeCrystal.  */
@property --ic-rim-angle {
  syntax: '<angle>';
  inherits: false;
  initial-value: 0deg;
}
html.prismThemeCrystal {
  --ic-white:rgba(255,255,255,.96);
  --ic-silver:rgba(216,234,255,.76);
  --ic-blue:#06d6ff;
  --ic-cyan:#12eaff;
  --ic-magenta:#fb32ec;
  --ic-iris:#8d48ff;
  --ic-gold:#ffd87b;
  --ic-clear:linear-gradient(163deg,rgba(255,255,255,.63) 0%,rgba(255,255,255,.23) 26%,rgba(222,226,255,.26) 57%,rgba(251,248,255,.48) 100%);
  --ic-crown:inset 0 3px 1px rgba(255,255,255,1),inset 0 7px 7px -5px rgba(255,255,255,.98),inset 0 -5px 8px -3px rgba(74,59,152,.42),inset 5px 1px 7px -6px rgba(255,255,255,.90),inset -5px 1px 7px -6px rgba(255,255,255,.86);
  --ic-shadow:0 4px 3px -2px rgba(255,255,255,.8),0 9px 9px -5px rgba(37,34,107,.45),0 19px 16px -11px rgba(41,32,91,.46),0 25px 22px -20px rgba(32,23,91,.71);
}
/* Reference: pale pearl backdrop with coherent, moving-looking but non-interactive
   spectral arcs. An SVG is painted BEHIND live controls; the app never becomes an image. */
html.prismThemeCrystal #app .main,
html.prismThemeCrystal.prismDashboardActive #app .main {
  background-image:
    url('prism-phase2ic-caustics.svg'),
    radial-gradient(ellipse 62% 34% at 56% 3%,rgba(226,173,255,.24),transparent 83%),
    radial-gradient(ellipse 60% 58% at 105% 20%,rgba(78,198,255,.20),transparent 76%),
    radial-gradient(ellipse 55% 43% at 9% 72%,rgba(137,96,253,.12),transparent 90%),
    linear-gradient(110deg,#c2bfd9 0%,#e5e2f1 29%,#d8d6ec 67%,#c9d5f2 100%)!important;
  background-position:top center,center,center,center,center!important;
  background-repeat:no-repeat,no-repeat,no-repeat,no-repeat,no-repeat!important;
  background-size:100% auto,cover,cover,cover,cover!important;
}
/* Sculpted shell: use an independent translucent *center* and thin optically
   dispersed wall, never a rainbow image under the full panel. Shape, placement,
   width, height, font, grid, padding all remain inherited from Classic/2IB. */
html.prismThemeCrystal #app #homePage :is(.prismReferenceWorkflow,.prismRefKpi,.prismSharedPanel,.prismGlassPanel,.prismModuleTile,#gdDashboardStage) {
  background:var(--ic-clear)!important;
  border-color:rgba(252,254,255,.97)!important;
  -webkit-backdrop-filter:blur(18px) saturate(155%) contrast(105%)!important;
  backdrop-filter:blur(18px) saturate(155%) contrast(105%)!important;
  box-shadow:
    var(--ic-crown),var(--ic-shadow),
    -8px 12px 17px -13px rgba(0,212,255,.79),
     9px 13px 17px -13px rgba(233,54,255,.74),
     0 0 0 1px rgba(232,243,255,.55)!important;
}
/* Colored refraction is concentrated in each optical base, while white arcs
   are supplied by the existing optically sculpted canvas. */
html.prismThemeCrystal #app #homePage .prismRefKpi:nth-child(1) {
  background:radial-gradient(ellipse 76% 30% at 15% 102%,rgba(0,207,255,.52),transparent 95%),var(--ic-clear)!important;
  box-shadow:var(--ic-crown),var(--ic-shadow),0 17px 16px -12px rgba(0,195,255,.75),-6px 11px 17px -12px rgba(22,122,255,.8),8px 13px 19px -14px rgba(171,87,255,.60)!important;
}
html.prismThemeCrystal #app #homePage .prismRefKpi:nth-child(2) {
  background:radial-gradient(ellipse 82% 31% at 12% 102%,rgba(13,234,192,.51),transparent 95%),var(--ic-clear)!important;
  box-shadow:var(--ic-crown),var(--ic-shadow),0 17px 17px -12px rgba(0,224,171,.74),-6px 11px 17px -12px rgba(0,230,222,.66),8px 14px 16px -12px rgba(57,185,255,.55)!important;
}
html.prismThemeCrystal #app #homePage .prismRefKpi:nth-child(3) {
  background:radial-gradient(ellipse 78% 36% at 90% 110%,rgba(229,63,255,.43),transparent 95%),var(--ic-clear)!important;
  box-shadow:var(--ic-crown),var(--ic-shadow),0 17px 17px -12px rgba(180,58,253,.76),-6px 11px 17px -12px rgba(107,101,255,.7),8px 14px 18px -12px rgba(246,63,232,.60)!important;
}
html.prismThemeCrystal #app #homePage .prismRefKpi:nth-child(4) {
  background:radial-gradient(ellipse 78% 33% at 87% 107%,rgba(255,154,67,.39),transparent 95%),var(--ic-clear)!important;
  box-shadow:var(--ic-crown),var(--ic-shadow),0 17px 17px -12px rgba(255,132,94,.77),-6px 11px 17px -12px rgba(255,73,161,.67),8px 14px 18px -12px rgba(255,208,62,.67)!important;
}
/* Lenses on ALL nav items including inactive states; active only intensifies the
   same material, never gets glass only after click. No display override. */
html.prismThemeCrystal #app .side .nav :is(button,a.gdPublicNav) {
  border-radius:999px!important;
  border-color:rgba(224,239,255,.76)!important;
  background:radial-gradient(ellipse 55% 110% at 2% 116%,rgba(6,193,255,.31),transparent 91%),radial-gradient(ellipse 52% 100% at 104% 113%,rgba(236,68,248,.29),transparent 95%),linear-gradient(178deg,rgba(117,116,207,.36),rgba(24,26,80,.43) 46%,rgba(35,29,90,.44))!important;
  box-shadow:inset 0 2px 2px rgba(255,255,255,.72),inset 0 -3px 5px rgba(4,9,46,.72),0 5px 7px rgba(9,8,46,.39),-4px 9px 10px -8px #09d5ff,4px 9px 10px -8px #f43af7!important;
  transition:box-shadow .20s ease,filter .20s ease,background .20s ease!important;
}
html.prismThemeCrystal #app .side .nav :is(button,a.gdPublicNav):not(.active):hover {
  filter:brightness(1.13) saturate(1.26)!important;
  box-shadow:inset 0 2px 3px #fff,0 7px 12px #080c3c9e,-6px 12px 17px -8px #00daff,7px 12px 17px -8px #f751ed!important;
}
html.prismThemeCrystal #app .side .nav :is(button,a.gdPublicNav).active {
  background:radial-gradient(ellipse 65% 94% at 3% 100%,rgba(0,204,255,.94),transparent 92%),radial-gradient(ellipse 70% 94% at 102% 111%,rgba(253,44,223,.88),transparent 92%),linear-gradient(180deg,#23368b,#151958 56%,#421071)!important;
  border-color:#f4fbff!important;
  box-shadow:inset 0 3px 2px #fff,inset 0 -4px 4px #121149,0 9px 12px #0d0f3e85,-7px 13px 14px -7px #00dfff,8px 13px 14px -7px #fe3eeb!important;
}
/* Decorative edge-only light on the existing Classic tracker track. */
html.prismThemeCrystal #app #homePage .prismReferenceWorkflow {
  box-shadow:var(--ic-crown),var(--ic-shadow),-7px 11px 16px -11px rgba(13,202,255,.81),8px 11px 17px -11px rgba(240,71,247,.79),0 0 0 1px rgba(255,255,255,.6)!important;
}
html.prismThemeCrystal #app #homePage .prismWorkflowTrack::before {
  background:linear-gradient(90deg,rgba(4,170,240,.71),rgba(86,181,255,.78),rgba(169,87,255,.85),rgba(255,96,214,.71),rgba(255,196,114,.81))!important;
  box-shadow:0 0 8px rgba(90,133,255,.48),0 1px 1px #fff!important;
}
html.prismThemeCrystal #app #homePage .prismWorkflowTrack::after {
  background:linear-gradient(90deg,#05baff 0%,#f7f8ff 14%,#16e9f4 24%,#b66dff 37%,#fff 49%,#fd4fd1 66%,#ffd767 78%,#15ceff 100%)!important;
  background-size:260% 100%!important;
  box-shadow:0 0 10px rgba(23,203,255,.90),0 0 15px rgba(202,91,255,.62)!important;
  animation:prismICFlow 4.9s linear infinite!important;
}
/* Clear faceted lenses for all three states: shapes unchanged from Classic. */
html.prismThemeCrystal #app #homePage .prismWorkflowStep {
  border-color:rgba(255,255,255,.96)!important;
  background:radial-gradient(ellipse 78% 40% at 15% 105%,rgba(51,201,255,.25),transparent 96%),linear-gradient(174deg,rgba(255,255,255,.72),rgba(232,237,255,.40) 60%,rgba(229,224,249,.56))!important;
  box-shadow:inset 0 3px 3px rgba(255,255,255,.99),inset 0 -5px 8px rgba(65,70,130,.27),0 7px 9px rgba(29,25,80,.31),0 13px 13px -9px rgba(24,23,80,.44),-5px 13px 15px -11px rgba(0,204,255,.55),5px 13px 15px -11px rgba(255,74,231,.54)!important;
  -webkit-backdrop-filter:blur(14px) saturate(156%)!important;
  backdrop-filter:blur(14px) saturate(156%)!important;
}
html.prismThemeCrystal #app #homePage .prismWorkflowStep.complete {
  opacity:1!important;
  background:radial-gradient(ellipse 83% 37% at 14% 110%,rgba(0,223,255,.28),transparent 95%),linear-gradient(172deg,rgba(255,255,255,.84),rgba(203,230,255,.52) 65%,rgba(187,208,254,.51))!important;
}
html.prismThemeCrystal #app #homePage .prismWorkflowStep:not(.complete):not(.current){opacity:.95!important}
/* ACTIVE STATUS: visible at rest — polished fuchsia-gold lens, substantial
   external glow + spectral animated border, *not* a low-opacity class filter.
   The class comes ONLY from existing dashboard.js's verified stage index. */
html.prismThemeCrystal #app #homePage .prismWorkflowStep.current {
  --ic-rim-angle:0deg;
  isolation:isolate!important;position:relative!important;z-index:8!important;
  border-color:rgba(255,250,255,1)!important;
  background:
    radial-gradient(ellipse 95% 92% at 87% 116%,rgba(255,115,193,.66),transparent 86%),
    radial-gradient(ellipse 85% 85% at 5% -10%,rgba(223,251,255,.60),transparent 81%),
    linear-gradient(173deg,rgba(255,255,255,.90),rgba(248,199,246,.69) 54%,rgba(255,158,209,.71))!important;
  box-shadow:
    inset 0 4px 3px #fff,
    inset 0 -6px 7px -3px rgba(135,39,118,.68),
    0 0 0 2px rgba(255,240,255,.84),
    0 0 12px 3px rgba(254,70,208,.88),
    0 0 26px 6px rgba(180,67,255,.70),
    0 14px 17px rgba(87,29,104,.49),
    -10px 18px 18px -10px #13e8ff,
    11px 18px 18px -10px #ffcd68!important;
  animation:prismICCurrentLift 3.8s ease-in-out infinite!important;
}
/* Rotating colored refraction ONLY around the *rim*.
   The interior remains transparent, and content stays pointer-accessible. */
html.prismThemeCrystal #app #homePage .prismWorkflowStep.current::before {
  content:""!important;display:block!important;position:absolute!important;
  inset:-2px!important;padding:5px!important;border-radius:inherit!important;
  background:conic-gradient(from var(--ic-rim-angle),#fff 0deg,#17d8ff 37deg,#fafaff 71deg,#925dff 120deg,#fff 147deg,#fd41e8 192deg,#ffe97f 246deg,#fff 275deg,#00d8f3 324deg,#fff 360deg)!important;
  -webkit-mask:linear-gradient(#fff 0 0) content-box,linear-gradient(#fff 0 0)!important;
  -webkit-mask-composite:xor!important;
  mask:linear-gradient(#fff 0 0) content-box,linear-gradient(#fff 0 0)!important;
  mask-composite:exclude!important;
  opacity:1!important;pointer-events:none!important;z-index:3!important;
  box-shadow:none!important;
  animation:prismICRimOrbit 4.6s linear infinite!important;
}
/* Broad curved white light travels over the glass body, not over labels. */
html.prismThemeCrystal #app #homePage .prismWorkflowStep.current::after {
  content:""!important;display:block!important;position:absolute!important;
  inset:4px!important;z-index:3!important;border-radius:inherit!important;pointer-events:none!important;
  background:linear-gradient(111deg,transparent 0%,transparent 30%,rgba(255,255,255,.02) 41%,rgba(255,255,255,.92) 49%,rgba(158,255,255,.50) 52%,transparent 66%,transparent 100%)!important;
  background-size:340% 100%!important;
  background-position:160% 0!important;
  mix-blend-mode:screen!important;opacity:1!important;
  animation:prismICLensSweep 3.9s cubic-bezier(.42,0,.25,1) infinite!important;
}
html.prismThemeCrystal #app #homePage .prismWorkflowStep.current > :is(.prismWorkflowCircle,strong,small) {
  position:relative!important;z-index:5!important;
}
html.prismThemeCrystal #app #homePage .prismWorkflowStep.current .prismWorkflowCircle {
  background:radial-gradient(circle at 30% 16%,#fff9c3,#ff98bc 35%,#8b35ed 82%)!important;
  color:#362267!important;
  border:2px solid rgba(255,255,255,.95)!important;
  border-radius:11px!important;
  box-shadow:inset 0 2px 2px #fff,0 0 0 2px #fee9ff,0 0 12px 4px rgba(250,68,222,.67),0 4px 8px #62167d82!important;
  animation:prismICOrbPulse 3.8s ease-in-out infinite!important;
}
html.prismThemeCrystal #app #homePage .prismWorkflowStep.current strong {
  color:#54114f!important;text-shadow:0 1px 1px #fff!important;
}
html.prismThemeCrystal #app #homePage .prismWorkflowStep.current small {
  color:#6d2269!important;text-shadow:0 1px 1px #fff8!important;
}
/* Strong but narrow glass capsule glow on quick actions without changing
   physical geometry, clickability, or the existing current-stage selector. */
html.prismThemeCrystal #app #homePage :is(.prismModuleTile,.prismStageLocate,#prismWorkflowContinue,.prismHeroRefresh) {
  box-shadow:var(--ic-crown),0 8px 9px -5px #35347b67,0 17px 16px -13px #2b2374ac,-6px 12px 13px -10px rgba(0,225,255,.82),7px 12px 14px -10px rgba(234,68,255,.75)!important;
}
html.prismThemeCrystal #app #homePage :is(.prismModuleTile,.prismStageLocate,#prismWorkflowContinue,.prismHeroRefresh):hover {
  filter:brightness(1.07) saturate(1.17)!important;
}
@keyframes prismICCurrentLift {
  0%,100% {filter:brightness(1.06) saturate(1.04);transform:translateY(0)}
  50% {filter:brightness(1.19) saturate(1.37);transform:translateY(-2px)}
}
@keyframes prismICRimOrbit {0%{--ic-rim-angle:0deg}100%{--ic-rim-angle:360deg}}
@keyframes prismICLensSweep {
  0%,12%{background-position:160% 0;opacity:.08}
  38%,63%{opacity:1}
  77%,100%{background-position:-160% 0;opacity:.12}
}
@keyframes prismICOrbPulse {0%,100%{filter:brightness(1);transform:scale(1)}50%{filter:brightness(1.26);transform:scale(1.06)}}
@keyframes prismICFlow {from{background-position:240% 0}to{background-position:-60% 0}}
@media(prefers-reduced-motion:reduce){
 html.prismThemeCrystal #app #homePage .prismWorkflowStep.current,
 html.prismThemeCrystal #app #homePage .prismWorkflowStep.current::before,
 html.prismThemeCrystal #app #homePage .prismWorkflowStep.current::after,
 html.prismThemeCrystal #app #homePage .prismWorkflowStep.current .prismWorkflowCircle,
 html.prismThemeCrystal #app #homePage .prismWorkflowTrack::after{
   animation:none!important;transform:none!important;
 }
 html.prismThemeCrystal #app #homePage .prismWorkflowStep.current::before{--ic-rim-angle:45deg!important}
 html.prismThemeCrystal #app #homePage .prismWorkflowStep.current::after{background-position:50% 0!important;opacity:.3!important}
}
/* Security: high-specificity optical styles must not reveal role-hidden controls. */
html.prismThemeCrystal #app#app .side .nav :is(button.hide,a.hide,[hidden]){display:none!important}
html:not(.prismThemeCrystal) #app .prismHYOptic,
html:not(.prismThemeCrystal) #app .prismHZOptic{display:none!important}
