.pw-wheel,
.pw-wheel * {
  box-sizing: border-box;
}
.pw-wheel {
  --pw-program-link: #0073ae;
  max-width: 1440px;
  margin: 0 auto;
  font-family: inherit;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
}
.pw-stage {
  width: 100%;
  max-width: 620px;
  flex-shrink: 0;
}
/* Wheel left, text panel right on wide screens. */
@media (min-width: 900px) {
  .pw-wheel {
    flex-direction: row;
    align-items: center;
    gap: 48px;
  }
  .pw-stage {
    width: 54%;
    max-width: 660px;
  }
  .pw-wheel .pw-panel {
    flex: 1;
    text-align: left;
  }
  .pw-wheel .pw-caption p {
    margin-left: 0;
  }
}
.pw-wheel svg {
  width: 100%;
  height: auto;
  display: block;
  overflow: visible;
  flex-shrink: 0;
  max-width: 620px;
}
.pw-arm,
.pw-arm-over,
.pw-label {
  opacity: 0;
  transform-box: view-box;
  transform-origin: 500px 500px;
  transition:
    transform 0.5s cubic-bezier(0.22, 1, 0.36, 1),
    opacity 0.4s ease;
}
.pw-arm,
.pw-arm-over {
  cursor: pointer;
}
.pw-arm:focus,
.pw-arm:focus-visible {
  outline: none;
}
.pw-label {
  pointer-events: none;
}
/* The visual ribbon scales on hover while the transparent hit path never
   moves, so the cursor can't fall out of the ribbon mid-animation. */
.pw-arm-visual {
  pointer-events: none;
  transform-box: view-box;
  transform-origin: 500px 500px;
  transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}
.pw-social-arm .pw-arm-visual {
  transition: none;
}
.pw-wheel.is-in .pw-social-arm .pw-arm-visual.is-active {
  transform: none;
}
/* Entrance: each ribbon sweeps out from the center; delays are set per
   element from JS so the ribbons cascade around the wheel. */
.pw-wheel.is-in .pw-arm,
.pw-wheel.is-in .pw-arm-over,
.pw-wheel.is-in .pw-label {
  opacity: 1;
}
.pw-wheel.is-in .pw-arm,
.pw-wheel.is-in .pw-arm-over {
  animation: pw-sweep-in 0.9s cubic-bezier(0.22, 1, 0.36, 1) backwards;
}
.pw-wheel.is-in .pw-arm-visual.is-active {
  transform: scale(1.07);
}
.pw-label.is-active {
  transform: scale(1.07);
}
/* Program page hover hint: a smaller grow than the selected ribbon. */
.pw-wheel.is-in .pw-arm-visual.is-hint {
  transform: scale(1.035);
}
.pw-wheel.is-in .pw-social-arm .pw-arm-visual.is-hint {
  transform: none;
}
.pw-label.is-hint {
  transform: scale(1.035);
}
.pw-label text {
  fill: #fff;
  font-weight: 800;
  font-size: 24px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  font-family: "Montserrat", "Segoe UI", system-ui, sans-serif;
}
.pw-ring {
  transform-origin: 50% 50%;
}
.pw-wheel[data-spin="true"] .pw-ring {
  animation: pw-spin 60s linear infinite;
}
.pw-wheel[data-spin="true"].is-dimmed .pw-ring {
  animation-play-state: paused;
}
.pw-center {
  opacity: 0;
  transform-box: view-box;
  transform-origin: 500px 500px;
  pointer-events: auto;
}
.pw-center image {
  pointer-events: auto;
}
/* Entrance: the photo pops in with a spring once the ribbons have landed. */
.pw-wheel.is-in .pw-center {
  opacity: 1;
  animation: pw-pop-in 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) 0.75s backwards;
}

/* Blue panel: solid card that shifts to the active pillar's own color. */
.pw-panel {
  width: 100%;
  max-width: 42rem;
  min-width: 0;
}
.pw-wheel .pw-program-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 16px;
  padding: 8px 0;
  color: var(--pw-program-link);
  font-family: "Montserrat", "Segoe UI", system-ui, sans-serif;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.5;
  text-decoration: none;
}
.pw-program-link span {
  text-decoration: underline;
  text-underline-offset: 4px;
}
.pw-wheel .pw-program-link svg {
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
}
.pw-program-link:focus-visible {
  outline: 2px solid var(--pw-program-link);
  outline-offset: 4px;
}
.pw-caption {
  --pw-nav-ink: #fff;
  --pw-nav-border: rgba(255, 255, 255, 0.6);
  --pw-nav-hover: rgba(255, 255, 255, 0.15);
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  text-align: left;
  width: 100%;
  max-width: 42rem;
  min-height: 320px;
  padding: 36px 40px;
  border-radius: 16px;
  background: #33709f;
  transition: background 0.4s ease;
  font-family: "Montserrat", "Segoe UI", system-ui, sans-serif;
}
.pw-caption-body,
.pw-caption-current {
  position: relative;
}
.pw-caption-sizers {
  display: none;
}
@media (max-width: 599px) {
  .pw-caption {
    padding: 28px 24px;
  }
}
.pw-caption h3 {
  margin: 0;
  font-size: clamp(1.875rem, 3vw, 2.25rem);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.01em;
  color: #fff;
}
.pw-caption p {
  margin: 20px 0 0;
  max-width: 36rem;
  font-size: clamp(1rem, 1.2vw, 1.125rem);
  line-height: 1.625;
  color: rgba(255, 255, 255, 0.95);
  font-family: "Montserrat", "Segoe UI", system-ui, sans-serif;
}
/* Program page: longer accordion text, smaller type, and no self-link. */
.pw-wheel.is-program .pw-caption h3 {
  font-size: clamp(1.25rem, 2vw, 1.5rem);
  line-height: 1.25;
}
.pw-wheel.is-program .pw-caption p {
  margin-top: 12px;
  font-size: 0.875rem;
}
/* Reserve the longest text's height only when wheel and panel are side by side. */
@media (min-width: 900px) {
  .pw-wheel.is-program .pw-caption-body,
  .pw-wheel.is-program .pw-caption-sizers {
    display: grid;
  }
  .pw-wheel.is-program .pw-caption-sizers,
  .pw-wheel.is-program .pw-caption-sizer,
  .pw-wheel.is-program .pw-caption-current {
    grid-area: 1 / 1;
  }
  .pw-wheel.is-program .pw-caption-sizer {
    visibility: hidden;
  }
}
@media (min-width: 640px) {
  .pw-wheel.is-program .pw-caption p {
    font-size: 0.9375rem;
  }
}
.pw-caption-current.is-swap h3,
.pw-caption-current.is-swap p {
  animation: pw-caption-in 0.45s cubic-bezier(0.22, 1, 0.36, 1) backwards;
}
.pw-caption-current.is-swap h3 {
  animation-delay: 0.04s;
}
.pw-caption-current.is-swap p {
  animation-delay: 0.07s;
}
/* Arrow navigation stays pinned to the bottom-left of the panel. */
.pw-nav {
  position: relative;
  display: flex;
  justify-content: flex-start;
  gap: 12px;
  margin-top: auto;
  padding-top: 32px;
}
.pw-nav button {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 40px;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 1px solid var(--pw-nav-border);
  border-radius: 50%;
  color: var(--pw-nav-ink);
  background: transparent;
  cursor: pointer;
  transition: background 0.3s ease;
}
.pw-nav button:hover {
  background: var(--pw-nav-hover);
}
.pw-nav button:focus-visible {
  outline: 2px solid var(--pw-nav-ink);
  outline-offset: 3px;
}
.pw-nav button svg {
  width: 18px;
  height: 18px;
}

@keyframes pw-caption-in {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
@keyframes pw-spin {
  to {
    transform: rotate(360deg);
  }
}
@keyframes pw-sweep-in {
  from {
    transform: rotate(-90deg) scale(0.4);
    opacity: 0;
  }
  to {
    transform: rotate(0deg) scale(1);
    opacity: 1;
  }
}
@keyframes pw-pop-in {
  0% {
    transform: scale(0.3);
    opacity: 0;
  }
  60% {
    transform: scale(1.08);
    opacity: 1;
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}
@media (prefers-reduced-motion: reduce) {
  .pw-ring,
  .pw-wheel.is-in .pw-arm,
  .pw-wheel.is-in .pw-arm-over,
  .pw-wheel.is-in .pw-label,
  .pw-wheel.is-in .pw-center {
    animation: none !important;
  }
}

/* Compact mode — wheel only, for a homepage teaser. */
.pw-wheel.is-compact {
  max-width: 640px;
}
.pw-wheel.is-compact .pw-stage {
  max-width: 100%;
  width: 100%;
}
@media (min-width: 900px) {
  .pw-wheel.is-compact {
    flex-direction: column;
  }
  .pw-wheel.is-compact .pw-stage {
    width: 100%;
    max-width: 640px;
  }
}
