/* Scoped enhancements for the imported homepage and mechanism page.
   Existing brand tokens remain the single source for color and type. */
.home .wholesale-offer--compact,
.how-it-works {
  background: var(--ploy-background-secondary);
}

.page-overview__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 20px;
  margin-top: 36px;
}

.page-overview .page-overview__item {
  padding: 26px;
  box-shadow: none;
  background: var(--ploy-background-primary);
}

.page-overview .page-overview__item:focus-within,
.page-overview .page-overview__item:hover {
  border-color: var(--ploy-border-technical);
  box-shadow: 0 8px 24px var(--ploy-shadow-color);
}

@media (min-width: 640px) {
  .page-overview__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1100px) {
  .page-overview__grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* Native disclosures support touch and keyboard without animation or a
   second runtime. The shared name permits only one open explanation. */
.diagram__stage {
  --diagram-caption-height: 154px;
  position: relative;
  padding-bottom: var(--diagram-caption-height);
  isolation: isolate;
}

.diagram__image {
  display: block;
  width: 100%;
  height: auto;
  border-radius: var(--radius-card, 16px);
}

.diagram__detail {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.diagram__detail--panel {
  --point-x: 49%;
  --point-y: 0.26;
}

.diagram__detail--electrode {
  --point-x: 49%;
  --point-y: 0.60;
}

.diagram__detail--basket {
  --point-x: 60%;
  --point-y: 0.84;
}

.diagram__point {
  position: absolute;
  left: var(--point-x);
  top: calc((100% - var(--diagram-caption-height)) * var(--point-y));
  transform: translate(-50%, -50%);
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border: 3px solid var(--ploy-background-primary);
  border-radius: 50%;
  background: var(--ploy-accent-primary);
  color: var(--ploy-text-inverse);
  box-shadow: 0 2px 10px var(--ploy-shadow-color);
  cursor: pointer;
  list-style: none;
  pointer-events: auto;
}

.diagram__point::-webkit-details-marker {
  display: none;
}

.diagram__point:hover,
.diagram__detail[open] .diagram__point {
  background: var(--ploy-accent-secondary);
}

.diagram__point:focus-visible {
  outline: 3px solid var(--ploy-accent-secondary);
  outline-offset: 4px;
}

.diagram__plus {
  width: 14px;
  height: 14px;
  position: relative;
}

.diagram__plus::before,
.diagram__plus::after {
  content: "";
  position: absolute;
  background: currentColor;
  border-radius: 1px;
}

.diagram__plus::before {
  width: 14px;
  height: 2px;
  left: 0;
  top: 6px;
}

.diagram__plus::after {
  width: 2px;
  height: 14px;
  left: 6px;
  top: 0;
}

.diagram__detail[open] .diagram__plus::after {
  display: none;
}

.diagram__description,
.diagram__hint {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: calc(var(--diagram-caption-height) - 16px);
  margin: 0;
  padding: 20px;
  border-radius: var(--radius-card, 16px);
  background: var(--ploy-background-primary);
  color: var(--ploy-text-secondary);
  font-size: 14px;
  line-height: 1.65;
  pointer-events: auto;
}

.diagram__description strong {
  display: block;
  margin-bottom: 5px;
  color: var(--ploy-text-primary);
  font-size: 16px;
  font-weight: 600;
}

.diagram__description p {
  margin: 0;
}

.diagram__hint {
  display: flex;
  align-items: center;
}

.diagram__stage:has(.diagram__detail[open]) .diagram__hint {
  visibility: hidden;
}

@media (max-width: 479px) {
  .diagram__stage {
    --diagram-caption-height: 180px;
  }
}
