/* Interaction layer for the original login and three original workspace cards.
   No business page, original brand pseudo-element or navigation handler is
   replaced. The existing meteor layer gains a full viewport stage.
   data-login-focus="true" is driven by pointer presence or keyboard navigation;
   an input retaining focus alone must not keep the pointer hover active.
   Optional workspace-card[data-focused="true"] mirrors keyboard focus.
*/
#login-view .login-side .login-box {
  position: relative;
  isolation: isolate;
  transform-origin: center;
  /* Keep the original entry and release its transform after it finishes. */
  animation-fill-mode: backwards;
  transition: border-color 180ms ease;
}
#login-view .login-side .login-box::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  pointer-events: none;
  box-shadow: 0 0 28px 7px #679fe044, 0 0 64px 17px #79adf323;
  opacity: .32;
  transition: opacity 340ms cubic-bezier(.22, .8, .25, 1);
}
#login-view .brand-stage {
  transform-origin: center;
  transition: none;
}

@media (min-width: 701px) {
  #login-view.login-layout,
  #login-view .login-layout {
    position: relative;
    isolation: isolate;
    grid-template-columns: 58% 42%;
  }
  #login-view .brand-stage {
    position: absolute;
    inset: 0;
    z-index: 0;
    width: 100%;
    height: 100%;
    min-height: 0;
  }
  #login-view .brand-message {
    left: 6.96%;
    right: 46%;
  }
  #login-view .brand-footer {
    right: calc(42% + 52px);
  }
  #login-view .login-side {
    position: relative;
    z-index: 2;
    grid-column: 1 / -1;
    width: 100%;
    min-width: 0;
    height: 100dvh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
  }
}

/* Leave the central 420px card clear on narrow desktop screens. The original
   animated brand copy remains visible in the upper-left gutter. */
@media (min-width: 701px) and (max-width: 1050px) {
  #login-view .brand-message {
    left: 24px;
    right: auto;
    top: 116px;
    width: calc((100% - 420px) / 2 - 48px);
  }
  #login-view .brand-message .eyebrow {
    font-size: 10px;
    letter-spacing: 1px;
    overflow-wrap: anywhere;
  }
  #login-view .brand-title {
    font-size: clamp(22px, 2.6vw, 28px);
    line-height: 1.3;
    gap: 6px;
    letter-spacing: 1px;
    margin: 12px 0;
  }
  #login-view .brand-message > p {
    font-size: 13px;
    line-height: 1.7;
    letter-spacing: 0;
  }
  #login-view .brand-rule {
    margin: 20px 0 16px;
  }
  #login-view .brand-services {
    flex-wrap: wrap;
    gap: 6px 10px;
    font-size: 11px;
  }
}

/* The stage also fills mobile screens. The original mobile logo stays above
   the form; original hidden message/footer rules remain in control. */
@media (max-width: 700px) {
  #login-view.login-layout,
  #login-view .login-layout {
    position: relative;
    isolation: isolate;
  }
  #login-view .brand-stage {
    position: absolute;
    inset: 0;
    z-index: 0;
    width: 100%;
    height: 100%;
    min-height: 0;
  }
  #login-view .login-side {
    position: relative;
    z-index: 2;
    min-width: 0;
    min-height: 100dvh;
    padding: 126px 24px 126px;
    background: transparent;
  }
}

/* Focus still has a clear painted edge on touch/reduced-motion devices. */
#login-view .login-side .login-box:focus-within {
  border-color: #91accf;
  box-shadow: 0 20px 52px #2339571c, inset 0 1px 0 #fff;
}

/* These are the existing three buttons. Their dimensions and grid order stay
   with the original site styles; this adds only depth and semantic artwork. */
#choice-view .workspace-card {
  position: relative;
  isolation: isolate;
  transform-origin: center;
  transition: transform 220ms ease, filter 220ms ease, opacity 220ms ease, border-color 220ms ease;
}
#choice-view .workspace-card:focus-visible {
  outline: 3px solid #5d87b9;
  outline-offset: 4px;
}
#choice-view .workspace-card > .workspace-semantic {
  position: absolute;
  top: 84px;
  right: 24px;
  z-index: -1;
  width: clamp(80px, 8.75vw, 112px);
  aspect-ratio: 1;
  color: #5377a6;
  opacity: .16;
  pointer-events: none;
  user-select: none;
  transform: translate(0, 0);
  transition: opacity 220ms ease, transform 320ms ease;
}
#choice-view .workspace-semantic > svg {
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
}
#choice-view .workspace-semantic > svg :is(path, rect, circle, ellipse, line, polyline, polygon) {
  fill: none;
  stroke: currentColor;
  stroke-dasharray: none;
  stroke-dashoffset: 0;
}
#choice-view .workspace-semantic > svg .semantic-base :is(path, rect, circle, ellipse, line, polyline, polygon) {
  stroke-dasharray: none;
  animation: none;
}
#choice-view .workspace-semantic > svg .semantic-trace {
  opacity: 0;
  transition: opacity 220ms ease;
}
#choice-view .workspace-semantic > svg .semantic-trace :is(path, rect, circle, ellipse, line, polyline, polygon) {
  stroke-dasharray: 18 38;
}
#choice-view .workspace-semantic > span {
  position: absolute;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: currentColor;
  opacity: .25;
  transform: translate(var(--semantic-particle-x, 0px), var(--semantic-particle-y, 0px));
  transition: transform 650ms cubic-bezier(.19, 1, .22, 1), opacity 220ms ease;
}
#choice-view .workspace-semantic > span:nth-of-type(1) {
  left: 18%; top: 22%; --semantic-particle-x: -15px; --semantic-particle-y: -8px;
}
#choice-view .workspace-semantic > span:nth-of-type(2) {
  left: 82%; top: 18%; --semantic-particle-x: 15px; --semantic-particle-y: -12px;
}
#choice-view .workspace-semantic > span:nth-of-type(3) {
  left: 85%; top: 82%; --semantic-particle-x: 12px; --semantic-particle-y: 14px;
}
#choice-view .workspace-semantic > span:nth-of-type(4) {
  left: 25%; top: 85%; --semantic-particle-x: -8px; --semantic-particle-y: 12px;
}

@media (min-width:701px) and (hover:hover) and (pointer:fine) {
  #login-view[data-login-focus="true"] .login-side .login-box::before {opacity:1}
}

@media (hover: hover) and (pointer: fine) {
  #choice-view .workspace-card:not(:disabled):is(:hover, :focus-visible, [data-focused="true"]) {
    border-color: #86a9d7;
    background: #fff;
    opacity: 1;
    filter: none;
    box-shadow: 0 18px 44px #28487316;
    transform: translateY(-3px) scale(1.025);
  }
  #choice-view:has(.workspace-card:not(:disabled):hover) .workspace-card:not(:hover):not(:focus-visible):not([data-focused="true"]),
  #choice-view:has(.workspace-card:focus-visible) .workspace-card:not(:focus-visible):not(:hover):not([data-focused="true"]),
  #choice-view:has(.workspace-card[data-focused="true"]) .workspace-card:not([data-focused="true"]):not(:hover):not(:focus-visible) {
    opacity: .66;
    filter: brightness(.84) blur(.7px);
    transform: scale(.975);
  }
  #choice-view .workspace-card:not(:disabled):is(:hover, :focus-visible, [data-focused="true"]) > .workspace-semantic {
    opacity: .32;
    transform: translate(3px, -3px);
  }
  #choice-view .workspace-card:not(:disabled):is(:hover, :focus-visible, [data-focused="true"]) > .workspace-semantic > svg .semantic-trace {
    opacity: 1;
  }
  #choice-view .workspace-card:not(:disabled):is(:hover, :focus-visible, [data-focused="true"]) > .workspace-semantic > svg .semantic-trace :is(path, rect, circle, ellipse, line, polyline, polygon) {
    animation: shx-workspace-outline-flow 2.8s linear infinite;
  }
  #choice-view .workspace-card:not(:disabled):is(:hover, :focus-visible, [data-focused="true"]) > .workspace-semantic > span {
    opacity: .85;
    transform: translate(0, 0);
  }
}

@keyframes shx-workspace-outline-flow {
  to { stroke-dashoffset: -56; }
}

@media (hover: none), (pointer: coarse) {
  #choice-view .workspace-card:hover {
    transform: none;
    filter: none;
    box-shadow: var(--premium-shadow, none);
  }
  #choice-view .workspace-card:focus-visible {
    border-color: #86a9d7;
    background: #fff;
  }
  #choice-view .workspace-card > .workspace-semantic {
    opacity: .12;
  }
}

/* Root enables this same stable presentation on limited hardware and touch.
   Focus colors remain visible without blur, scaling or moving artwork. */
html[data-effects-lite] #login-view .brand-stage,
html[data-effects-lite] #login-view .login-side .login-box,
html[data-effects-lite] #login-view .login-side .login-box::before,
html[data-effects-lite] #choice-view .workspace-card,
html[data-effects-lite] #choice-view .workspace-semantic,
html[data-effects-lite] #choice-view .workspace-semantic > span {
  transition: none !important;
  transform: none !important;
}
html[data-effects-lite] #login-view .brand-stage,
html[data-effects-lite] #choice-view .workspace-card {
  filter: none !important;
}
html[data-effects-lite] #choice-view .workspace-card {
  opacity: 1 !important;
}
html[data-effects-lite] #choice-view .workspace-semantic > svg :is(path, rect, circle, ellipse, line, polyline, polygon) {
  animation: none !important;
  stroke-dashoffset: 0;
}
html[data-effects-lite] #choice-view .workspace-semantic > svg .semantic-trace {
  opacity: 0 !important;
  transition: none !important;
}

@media (prefers-reduced-motion: reduce) {
  #login-view .brand-stage,
  #login-view .login-side .login-box,
  #login-view .login-side .login-box::before,
  #choice-view .workspace-card,
  #choice-view .workspace-semantic,
  #choice-view .workspace-semantic > span {
    transition: none !important;
    transform: none !important;
  }
  #login-view .brand-stage,
  #choice-view .workspace-card {
    filter: none !important;
  }
  #choice-view .workspace-card {
    opacity: 1 !important;
  }
  #choice-view .workspace-semantic > svg :is(path, rect, circle, ellipse, line, polyline, polygon) {
    animation: none !important;
    stroke-dashoffset: 0;
  }
  #choice-view .workspace-semantic > svg .semantic-trace {
    opacity: 0 !important;
    transition: none !important;
  }
}
