.pv2h {
  position: relative;
  max-width: 1240px;
  margin: 0 auto;
}

.pv2h .k-win {
  width: 100%;
  aspect-ratio: 1300 / 880;
}

.pv2h .k-win__content {
  width: 100%;
  height: 100%;
  aspect-ratio: 1300 / 880;
}

.pv2h .k-win__content img {
  width: 100%;
  height: 100%;
}

/* ===== Cards ===== */

.pv2h-card {
  position: absolute;
  background: var(--color-surface, #fff);
  border-radius: 12px;
  box-shadow: 0 20px 40px -22px rgba(38, 37, 30, 0.38), 0 0 0 1px rgba(38, 37, 30, 0.07);
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  color: var(--color-text-primary);
  font-size: 12px;
  line-height: 1.35;
}

/* Card A: bottom-left, progress catalogue */
.pv2h-card--a {
  bottom: -20px;
  left: 20px;
  padding: 16px;
  min-width: 280px;
}

.pv2h-card__progress {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.pv2h-card__number {
  font-weight: 500;
  font-size: 13px;
}

.pv2h-card__percent {
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--color-success, #2ecc71);
}

.pv2h-card__bar {
  width: 100%;
  height: 6px;
  background: var(--color-surface-muted, #f0f0f0);
  border-radius: 3px;
  overflow: hidden;
}

.pv2h-card__fill {
  width: 99.1%;
  height: 100%;
  background: var(--color-success, #2ecc71);
  border-radius: 3px;
}

/* Card B: top-right, product with discrepancy */
.pv2h-card--b {
  top: -20px;
  right: 20px;
  padding: 12px;
  max-width: 300px;
}

.pv2h-card__product {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.pv2h-card__product img {
  width: 44px;
  height: 56px;
  object-fit: cover;
  border-radius: 6px;
  background: var(--color-surface-muted, #f0f0f0);
  flex: none;
}

.pv2h-card__info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.pv2h-card__title {
  font-weight: 500;
  font-size: 12px;
  line-height: 1.3;
}

.pv2h-card__spec {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 8px 0;
  border-top: 1px solid var(--color-border-subtle, #e6e5df);
  border-bottom: 1px solid var(--color-border-subtle, #e6e5df);
  font-size: 11px;
}

.pv2h-card__source {
  display: flex;
  align-items: baseline;
  gap: 6px;
}

.pv2h-card__label {
  color: var(--color-text-muted, #999);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.pv2h-card__value {
  font-size: 11px;
  color: var(--color-text-primary, #26251e);
}

.pv2h-card__source--flag .pv2h-card__label {
  color: var(--color-accent, #bb3d13);
}

.pv2h-card__source mark {
  background: transparent;
  color: var(--color-accent, #bb3d13);
  padding: 0;
  border-radius: 0;
  font-weight: 500;
}

.pv2h-card__status {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  padding-top: 6px;
  color: var(--color-accent, #bb3d13);
}

.pv2h-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex: none;
  background: var(--color-text-faint, #ccc);
}

.pv2h-dot--held {
  background: var(--color-accent, #bb3d13);
}

/* ===== Animations ===== */

@media (prefers-reduced-motion: no-preference) {
  .pv2h:not(.is-in) .k-win {
    transform: translateY(40px) scale(0.985);
    opacity: 0;
  }

  .pv2h:not(.is-in) .pv2h-card {
    transform: translateY(20px);
    opacity: 0;
  }

  .pv2h .k-win {
    transition: transform 1s cubic-bezier(0.32, 0.72, 0, 1),
                opacity 1s cubic-bezier(0.32, 0.72, 0, 1);
  }

  .pv2h .pv2h-card {
    transition: transform 1.1s cubic-bezier(0.32, 0.72, 0, 1),
                opacity 1.1s cubic-bezier(0.32, 0.72, 0, 1);
    transition-delay: 0.2s;
  }
}

/* ===== Responsive ===== */

@media (max-width: 640px) {
  .pv2h .k-win {
    grid-template-columns: 1fr;
  }

  .pv2h .k-win__sidebar {
    display: none;
  }

  .pv2h-card--b {
    display: none;
  }

  .pv2h-card--a {
    position: static;
    margin-top: 16px;
    width: auto;
  }
}

/* Evidence card (replaces the progress + coat cards: the screen now shows both). */
.pv2h .pv2h-card--a { padding: 14px; min-width: 0; width: 330px; bottom: -28px; left: -24px; }
.pv2h-ev { display: flex; gap: 14px; align-items: center; }
.pv2h-ev__label { flex: none; width: 104px; padding: 10px 6px; border: 1px dashed var(--color-border, #E6E5DF); border-radius: 6px; text-align: center; font: 600 9.5px/1.6 "Helvetica Neue", Helvetica, Arial, sans-serif; letter-spacing: .12em; color: var(--color-text-primary); }
.pv2h-ev__label span { color: var(--color-accent); background: var(--color-accent-subtle); border-radius: 3px; padding: 0 2px; }
.pv2h-ev__txt small { display: block; font-size: 10px; letter-spacing: .08em; text-transform: uppercase; color: var(--color-text-muted); }
.pv2h-ev__txt b { display: block; font-weight: 500; margin: 3px 0 2px; }
.pv2h-ev__txt span { display: block; font-size: 11.5px; color: var(--color-text-secondary); }
@media (max-width: 1320px) { .pv2h .pv2h-card--a { left: 12px; } }
@media (max-width: 640px) { .pv2h .pv2h-card--a { width: auto; } }

/* Kito reply card (matches the Home screen's composer). */
.pv2h .pv2h-card--a { width: 360px; padding: 14px 16px; }
.pv2h-chat { display: flex; gap: 12px; align-items: flex-start; }
.pv2h-chat__av { flex: none; width: 26px; height: 26px; border-radius: 8px; background: var(--color-text-primary); color: #fff; display: grid; place-items: center; font-size: 12px; font-weight: 600; }
.pv2h-chat small { display: block; font-size: 10.5px; color: var(--color-text-muted); margin-bottom: 4px; }
.pv2h-chat p { font-size: 12.5px; line-height: 1.5; color: var(--color-text-secondary); margin: 0; }
.pv2h-chat p b { color: var(--color-text-primary); font-weight: 500; }
.pv2h-chat__btns { display: flex; gap: 6px; margin-top: 10px; }
.pv2h-chat__btns span { font-size: 11.5px; padding: 5px 10px; border-radius: 999px; border: 1px solid var(--color-border, #E6E5DF); }
.pv2h-chat__btns .is-dark { background: var(--color-text-primary); color: #fff; border-color: transparent; }
.pv2h .pv2h-card--a { bottom: -72px; }

/* Phones: the reply card sits under the window at exactly its width. */
@media (max-width: 640px) { .pv2h .pv2h-card--a { width: auto; min-width: 0; margin-top: 12px; } }
