.pch-host {
  --pch-primary: #607EB8;
  --pch-text: #4F596A;
  --pch-border: #e2e6ec;
  width: 100%;
  container-name: pch-widget;
  container-type: inline-size;
  font-family: var(--pch-font-family, Poppins, Arial, sans-serif);
  color: var(--pch-text);
}

.pch-host *,
.pch-host *::before,
.pch-host *::after {
  box-sizing: border-box;
}

.pch-widget {
  width: 100%;
  border: 1px solid #e2e6ec;
  border-radius: 14px;
  background: #fff;
  padding: 26px 24px 4px;
  box-shadow: 0 8px 24px rgba(28, 39, 56, .06);
}

.pch-widget.pch-widget-flat {
  box-shadow: none;
}

.pch-header {
  display: block;
  margin-bottom: 22px;
}

.pch-header-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
}

.pch-header-actions {
  align-self: center;
}

.pch-heading {
  min-width: 0;
}

.pch-title {
  margin: 0;
  color: var(--pch-text);
  font-size: var(--pch-title-font-size, 30px);
  line-height: 1.2;
  font-weight: 700;
  letter-spacing: -.025em;
}

.pch-subtitle {
  display: block;
  width: 100%;
  margin: 7px 0 0;
  color: #687386;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.45;
}

.pch-header-actions {
  display: flex;
  flex: 0 0 auto;
  flex-direction: row;
  align-items: flex-start;
  align-self: flex-start;
  margin-left: auto;
  gap: 8px;
}

.pch-download-report {
  appearance: none;
  display: inline-flex;
  min-height: 38px;
  padding: 9px 16px;
  align-items: center;
  justify-content: center;
  gap: 9px;
  color: var(--pch-primary);
  background: #fff;
  border: 1px solid var(--pch-border);
  border-radius: 8px;
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
  transition: background .18s ease, border-color .18s ease, transform .18s ease, box-shadow .18s ease;
}

.pch-download-report svg {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  fill: currentColor;
}

.pch-download-report:hover {
  background: color-mix(in srgb, var(--pch-primary) 8%, white);
  border-color: color-mix(in srgb, var(--pch-primary) 18%, white);
  box-shadow: 0 5px 14px rgba(16, 24, 40, .08);
  transform: translateY(-1px);
}

.pch-download-report:active {
  box-shadow: none;
  transform: translateY(0);
}

.pch-download-report:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--pch-primary) 40%, white);
  outline-offset: 2px;
}

@container pch-widget (max-width: 700px) {
  .pch-header-actions {
    gap: 6px;
  }

  .pch-download-report {
    min-height: 34px;
    padding: 7px 12px;
    font-size: 11px;
  }
}

.pch-row + .pch-row {
  margin-top: 28px;
  padding-top: 0;
}

.pch-row-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 12px;
}

.pch-row-title {
  margin: 0;
  color: var(--pch-text);
  font-size: 14px;
  line-height: 1.3;
  font-weight: 700;
}

.pch-row-controls {
  display: flex;
  align-items: center;
  gap: 7px;
}

.pch-arrow {
  display: grid;
  width: 30px;
  height: 30px;
  padding: 0;
  place-items: center;
  border: 1px solid #dfe4ea;
  border-radius: 50%;
  background: #fff;
  color: var(--pch-primary);
  font: inherit;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  transition: background 200ms ease, border-color 200ms ease, color 200ms ease, opacity 200ms ease;
}

.pch-arrow:hover:not(:disabled) {
  border-color: color-mix(in srgb, var(--pch-primary) 42%, #dfe4ea);
  background: color-mix(in srgb, var(--pch-primary) 8%, white);
}

.pch-arrow:disabled {
  opacity: .28;
  color: #8f98a6;
  cursor: default;
}

.pch-carousel {
  width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 6px 0 8px;
  margin: -6px 0 -8px;
  scroll-behavior: smooth;
  scrollbar-width: none;
  overscroll-behavior-inline: contain;
  cursor: grab;
  user-select: none;
  touch-action: pan-x pan-y;
}

.pch-carousel.is-dragging {
  cursor: grabbing;
  scroll-behavior: auto;
}

.pch-carousel::-webkit-scrollbar {
  display: none;
}

.pch-track {
  display: flex;
  gap: 12px;
  width: max-content;
  min-width: 100%;
}

.pch-track .pch-card {
  flex: 0 0 215px;
  width: 215px;
}

.pch-card {
  min-width: 0;
  border: 1px solid #e5e8ed;
  border-radius: 15px;
  background: #fbfcfd;
  padding: 18px 8px 16px;
  text-align: center;
  transition:
    background-color 220ms ease,
    border-color 220ms ease,
    box-shadow 220ms ease,
    color 220ms ease;
}

.pch-card:hover {
  transform: none;
  background: #fff;
  border-color: color-mix(in srgb, var(--pch-primary) 42%, #d7dfe9);
  box-shadow: 0 14px 30px rgba(16,24,40,.10);
}

.pch-card:hover .pch-icon{
  background: color-mix(in srgb,var(--pch-primary) 18%,white);
  color: color-mix(in srgb,var(--pch-primary) 88%,var(--pch-text));
}

.pch-card:hover .pch-score{
  color: color-mix(in srgb,var(--pch-primary) 90%,var(--pch-text));
}

.pch-card:hover .pch-progress span{
  filter: brightness(1.08);
}

.pch-icon {
  display: grid;
  width: 52px;
  height: 52px;
  margin: 0 auto 12px;
  place-items: center;
  border-radius: 15px;
  background: color-mix(in srgb, var(--pch-primary) 12%, white);
  color: var(--pch-primary);
}

.pch-icon svg {
  width: 29px;
  height: 29px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.pch-card-title {
  min-height: 38px;
  margin: 0;
  color: var(--pch-text);
  font-size: 13px;
  line-height: 1.45;
  font-weight: 700;
}

.pch-score-wrap {
  margin-top: 10px;
}

.pch-score-line {
  display: flex;
  justify-content: center;
  align-items: baseline;
  gap: 2px;
}

.pch-score {
  color: var(--pch-primary);
  font-size: 25px;
  line-height: 1;
  font-weight: 700;
}

.pch-score-max {
  color: #8992a1;
  font-size: 10px;
  font-weight: 600;
}

.pch-rating {
  min-height: 16px;
  margin-top: 4px;
  color: #5B6472;
  font-size: 11.5px;
  font-weight: 600;
  line-height: 1.35;
}

.pch-progress {
  width: 100%;
  height: 5px;
  overflow: hidden;
  margin-top: 9px;
  border-radius: 999px;
  background: #e7ebf0;
}

.pch-progress span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--pch-primary);
  transition: width 400ms ease;
}

.pch-description {
  margin: 11px 0 0;
  color: var(--pch-text);
  font-size: 10.5px;
  font-weight: 500;
  line-height: 1.6;
  letter-spacing: 0.01em;
}

.pch-footer {
  display: flex !important;
  justify-content: flex-end !important;
  align-items: center !important;
  width: 100% !important;
  margin: -2px 0 0 !important;
  padding: 4px 0 8px !important;
  border: 0 !important;
  box-shadow: none !important;
  background: transparent !important;
}

.pch-footer a {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: flex-end !important;
  text-decoration: none !important;
  line-height: 0 !important;
}

.pch-powered-logo {
  display: block !important;
  width: auto !important;
  height: 25px !important;
  max-width: 150px !important;
  max-height: none !important;
  object-fit: contain !important;
}

.pch-footer::before,
.pch-footer::after {
  display: none !important;
  content: none !important;
}


@container pch-widget (max-width: 640px) {
  .pch-header-actions {
    margin-top: 0;
  }

  .pch-widget {
    padding: 20px 18px 4px;
  }

  .pch-header {
    margin-bottom: 17px;
  }
}

@container pch-widget (max-width: 480px) {
  .pch-download-report {
    width: 36px;
    padding: 0;
  }

  .pch-download-report span {
    display: none;
  }
}

@container pch-widget (max-width: 420px) {
  .pch-header-top {
    gap: 12px;
  }

  .pch-card-title {
    min-height: 0;
  }
}


@container pch-widget (max-width: 920px) {
  .pch-track .pch-card {
    flex-basis: 205px;
    width: 205px;
  }
}

@container pch-widget (max-width: 640px) {
  .pch-carousel {
    scroll-snap-type: x mandatory;
    scroll-padding-left: 0;
  }

  .pch-row + .pch-row {
    margin-top: 24px;
    padding-top: 0;
  }

  .pch-track .pch-card {
    flex-basis: 193px;
    width: 193px;
    scroll-snap-align: start;
    scroll-snap-stop: always;
  }
}

@container pch-widget (max-width: 420px) {
  .pch-track .pch-card {
    flex-basis: 180px;
    width: 180px;
  }
}


.pch-dots {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 7px;
  min-height: 10px;
  margin-top: 13px;
}

.pch-dot {
  width: 6px;
  height: 6px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: #d7dce4;
  cursor: pointer;
  transition: width 200ms ease, background 200ms ease, opacity 200ms ease;
}

.pch-dot:hover {
  background: color-mix(in srgb, var(--pch-primary) 55%, #d7dce4);
}

.pch-dot.is-active {
  width: 18px;
  background: var(--pch-primary);
}

.pch-dots[hidden] {
  display: none;
}




/* Initial loading skeleton */
.pch-is-loading {
  overflow: hidden;
}

.pch-skeleton {
  position: relative;
  display: block;
  overflow: hidden;
  border-radius: 999px;
  background: #e9edf2;
}

.pch-skeleton::after {
  content: "";
  position: absolute;
  inset: 0;
  transform: translateX(-100%);
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .72), transparent);
  animation: pch-skeleton-shimmer 1.4s ease-in-out infinite;
}

@keyframes pch-skeleton-shimmer {
  100% { transform: translateX(100%); }
}

.pch-skeleton-heading { width: min(260px, 100%); height: 29px; border-radius: 7px; }
.pch-skeleton-subtitle { width: min(360px, 82%); height: 12px; margin-top: 11px; border-radius: 5px; }
.pch-skeleton-download { flex: 0 0 146px; width: 146px; height: 38px; border-radius: 8px; }
.pch-skeleton-arrow { width: 30px; height: 30px; border-radius: 50%; }
.pch-skeleton-row-title { width: 82px; height: 14px; border-radius: 4px; }

.pch-skeleton-card {
  pointer-events: none;
  padding: 18px 8px 16px;
}

.pch-skeleton-score-card { min-height: 250px; }
.pch-skeleton-highlight-card { min-height: 190px; }

.pch-skeleton-card:hover {
  background: #fbfcfd;
  border-color: #e5e8ed;
  box-shadow: none;
}

.pch-skeleton-icon { width: 52px; height: 52px; margin: 0 auto 12px; border-radius: 15px; }
.pch-skeleton-title { width: 68%; height: 13px; margin: 5px auto 0; border-radius: 5px; }
.pch-skeleton-score { width: 46px; height: 25px; margin: 18px auto 0; border-radius: 6px; }
.pch-skeleton-rating { width: 62px; height: 10px; margin: 7px auto 0; border-radius: 5px; }
.pch-skeleton-progress { width: 100%; height: 5px; margin-top: 11px; }
.pch-skeleton-copy { width: 92%; height: 9px; margin: 16px auto 0; border-radius: 4px; }
.pch-skeleton-copy-short { width: 72%; margin-top: 7px; }
.pch-skeleton-divider { width: 46px; height: 3px; margin: 14px auto 0; border-radius: 999px; }
.pch-skeleton-dot-active { width: 18px; height: 6px; }
.pch-skeleton-dot { width: 6px; height: 6px; }
.pch-skeleton-logo { width: 126px; height: 20px; border-radius: 5px; }

@container pch-widget (max-width: 480px) {
  .pch-skeleton-download { flex-basis: 36px; width: 36px; }
  .pch-skeleton-heading { height: 26px; }
  .pch-skeleton-subtitle { width: min(270px, 86%); }
}

@media (prefers-reduced-motion: reduce) {
  .pch-skeleton::after { animation: none; }
}

/* Size the main widget title from the widget width, not the page viewport. */
@container pch-widget (max-width: 560px) {
  .pch-title {
    font-size: var(--pch-title-font-size, 30px);
  }

  .pch-subtitle {
    margin-top: 5px;
    font-size: 12px;
    font-weight: 400;
    line-height: 1.3;
  }

  .pch-powered-logo {
    margin-top: 12px !important;
  }
}


/* Ensure info buttons respond immediately to a single touch. */
.pch-info-button {
  touch-action: manipulation;
}

@container pch-widget (max-width: 700px) {
  .pch-powered-logo {
    height: 20px !important;
  }
}

/* Match Local Lifestyle title sizing at compact widget widths. */
@container pch-widget (min-width: 501px) and (max-width: 640px) {
  .pch-title {
    font-size: 23px !important;
    line-height: 1.08 !important;
  }
}

@container pch-widget (max-width: 480px) {
  .pch-title {
    font-size: 20px !important;
    line-height: 1.08 !important;
  }
}

/* Shared main-title scale for compact embeds. */
@container pch-widget (min-width: 481px) and (max-width: 500px) {
  .pch-title { font-size: 20px !important; line-height: 1.08 !important; }
}
@container pch-widget (min-width: 341px) and (max-width: 380px) {
  .pch-title { font-size: 18px !important; line-height: 1.08 !important; }
}
@container pch-widget (max-width: 340px) {
  .pch-title { font-size: 16px !important; line-height: 1.08 !important; }
}

/* Keep every compact title on the shared 30 / 23 / 20px scale. */
@container pch-widget (min-width: 481px) and (max-width: 640px) {
  .pch-title { font-size: 23px !important; line-height: 1.08 !important; }
}

@container pch-widget (max-width: 480px) {
  .pch-title { font-size: 20px !important; line-height: 1.08 !important; }
}
