/* Michael's 12 October card-finish lock, adapted to the live animated services.
   Load after the service study, responsive, action and integrated badge CSS. */
@property --nx-service-rim-angle {
  syntax: "<angle>";
  inherits: false;
  initial-value: -90deg;
}

.nx-services .compare-board .cr-card.surface {
  position: relative;
  overflow: visible;
  border: 1px solid #dce1e8;
  border-radius: 18px;
  outline: none;
  box-shadow: inset 0 0 0 1px transparent,
    0 1px 2px rgba(25,35,48,.05),
    0 22px 48px -28px rgba(25,35,48,.24);
  transition: border-color .3s ease, box-shadow .3s ease;
}

.nx-services .compare-board .cr-card.surface:is(:hover,:focus-within) {
  border-color: var(--nx-light-blue-0030fd,#0030fd);
  outline: none;
  box-shadow: inset 0 0 0 1px var(--nx-light-blue-0030fd,#0030fd),
    0 1px 2px rgba(25,35,48,.05),
    0 22px 48px -28px rgba(25,35,48,.24);
}

/* Replace only the old study's top rule, keeping its animated visual interior. */
.nx-services .compare-board .cr-card.surface::after {
  content: none;
}

.nx-services .compare-board .cr-card.surface::before {
  content: "";
  position: absolute;
  inset: -1px;
  width: auto;
  height: auto;
  padding: 2px;
  border-radius: inherit;
  z-index: 3;
  pointer-events: none;
  opacity: 0;
  transform: none;
  clip-path: none;
  background: conic-gradient(from var(--nx-service-rim-angle),
    transparent 0deg 294deg, rgba(var(--nx-light-blue-rgb-b3c1fe,179, 193, 254),.08) 307deg,
    var(--nx-light-blue-b3c1fe,#b3c1fe) 328deg, #fff 343deg, var(--nx-light-blue-b3c1fe,#b3c1fe) 352deg, transparent 360deg);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
}

@media (hover: hover) {
  .nx-services .compare-board .cr-card.surface:is(:hover,:focus-within)::before {
    animation: nx-service-rim-light 20s linear 1 both;
  }
}

@keyframes nx-service-rim-light {
  0% { --nx-service-rim-angle: -90deg; opacity: 0; }
  12% { opacity: .9; }
  80% { opacity: .9; }
  100% { --nx-service-rim-angle: 270deg; opacity: 0; }
}

/* The card itself provides the locked two-pixel keyboard focus boundary. */
.nx-services .compare-board .cr-card .cr-card-link {
  border-radius: 17px;
}
.nx-services .compare-board .cr-card .cr-card-link:focus-visible {
  outline: none;
}

.nx-services .compare-board .cr-card .cr-card-title {
  min-height: var(--service-title-height, 0px);
}
@container service-cards (max-width: 620px) {
  /* integrated-badges.css keeps the desktop track with !important. Stacked
     cards instead need natural grid rows; each native link retains its 70px footer. */
  .nx-services .compare-board .cr-card-list {
    grid-template-rows: none !important;
  }
  .nx-services .compare-board .cr-card .cr-card-title {
    min-height: 0;
  }
}
.nx-services .compare-board .cr-card .cr-card-link h2 {
  position: relative;
  display: block;
  width: fit-content;
  max-width: 100%;
  min-height: 0;
}
.nx-services .compare-board .cr-card .cr-card-link h2::after {
  content: "";
  position: absolute;
  left: 0;
  right: auto;
  width: var(--title-line-width, 100%);
  bottom: -8px;
  height: 3px;
  background: var(--nx-light-blue-0030fd,#0030fd);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 650ms cubic-bezier(.22,1,.36,1);
  pointer-events: none;
}
.nx-services .compare-board .cr-card.surface:is(:hover,:focus-within) h2::after {
  transform: scaleX(1);
}

/* Keep the existing low badge track and its independent disclosure controls. */
.nx-services .compare-board .cr-card .nx-integrated-footer {
  background: linear-gradient(#e1e5ec,#e1e5ec) left 34px / 100% 2px no-repeat;
}
.nx-services .compare-board .cr-card .nx-integrated-footer::before,
.nx-services .compare-board .cr-card .nx-integrated-footer::after {
  content: none;
}

/* The 28px circle is flush with the divider end; its anchor still has a 44px target.
   JS adds only the inner SVG wrapper, leaving the native whole-card link intact. */
.nx-services .compare-board .cr-card .cr-action-mark {
  width: 44px !important;
  height: 44px !important;
  display: grid;
  align-items: center;
  justify-items: end;
  pointer-events: auto;
  color: var(--nx-light-blue-0030fd,#0030fd);
}
.nx-services .compare-board .cr-card .nx-locked-arrow-circle {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  box-sizing: border-box;
  padding: 2px;
  border: 2px solid transparent;
  border-radius: 50%;
  transition: background-color .18s ease, border-color .18s ease;
}
.nx-services .compare-board .cr-card .nx-locked-arrow-circle svg {
  grid-area: 1 / 1;
  display: block;
  width: 20px;
  height: 20px;
}
.nx-services .compare-board .cr-card .cr-action-mark .cr-action-blue {
  color: var(--nx-light-blue-0030fd,#0030fd);
  clip-path: none;
  transition: none;
}
.nx-services .compare-board .cr-card .nx-locked-arrow-circle:hover,
.nx-services .compare-board .cr-card-link:focus-visible .nx-locked-arrow-circle {
  background: #f2f4fa;
  border-color: var(--nx-light-blue-0030fd,#0030fd);
}

@media (prefers-reduced-motion: reduce) {
  .nx-services .compare-board .cr-card.surface::before {
    animation: none !important;
    opacity: 0;
  }
  .nx-services .compare-board .cr-card.surface,
  .nx-services .compare-board .cr-card .cr-card-link h2::after,
  .nx-services .compare-board .cr-card .nx-locked-arrow-circle {
    transition: none;
  }
}

@media (forced-colors: active) {
  .nx-services .compare-board .cr-card.surface {
    border-color: CanvasText;
    box-shadow: none;
  }
  .nx-services .compare-board .cr-card.surface::before { display: none; }
  .nx-services .compare-board .cr-card.surface:is(:hover,:focus-within) {
    border-color: Highlight;
    outline: 1px solid Highlight;
    outline-offset: -2px;
    box-shadow: none;
  }
  .nx-services .compare-board .cr-card .cr-card-link h2::after {
    background: Highlight;
  }
  .nx-services .compare-board .cr-card .nx-integrated-footer {
    background: none;
  }
  .nx-services .compare-board .cr-card .nx-integrated-footer::before {
    content: "";
    position: absolute;
    top: 34px;
    left: 0;
    right: 0;
    height: 0;
    border-top: 2px solid CanvasText;
    pointer-events: none;
  }
  .nx-services .compare-board .cr-card .nx-locked-arrow-circle:hover,
  .nx-services .compare-board .cr-card-link:focus-visible .nx-locked-arrow-circle {
    border-color: Highlight;
    background: Canvas;
  }
}
