html { font-size: 100%; }
body { font-size: 1rem; }

body.pk-public-body :is(h1, h2, h3, h4, h5, h6, p, li, summary, legend),
body:is(.pk-auth-body, .pk-dash-body) :is(h1, h2, h3, h4, h5, h6, p, label, legend, summary),
.pk-public-body .km-line-text,
.pk-benefits-table :is(th, td) {
  overflow-wrap: anywhere;
}

/* Navigational bars and buttons may contain wrapped links, while long table
   rows still have a dedicated horizontal scroll container where needed. */
.pk-public-body :is(.pk-actions, .pk-page-head, .pk-guide-section-head) > *,
.pk-auth-body .pk-register-wide .pk-field,
.pk-guide-topic-intro > *,
.pk-guide-topic-intro li,
.pk-benefit-explanation > *,
.pk-benefits-table tbody td {
  min-inline-size: 0;
}

.pk-benefits-table :is(thead th, tbody td) { white-space: normal; }

@media (max-width: 900px) {
  .pk-benefits-table tbody td {
    grid-template-columns: minmax(0, 2fr) minmax(0, 3fr);
  }
  .pk-benefits-table tbody td::before { overflow-wrap: anywhere; }
}

@media (max-width: 820px) {
  .pk-guide-layout,
  .pk-guide-search-band,
  .pk-guide-topic-intro,
  .pk-benefit-explanation {
    grid-template-columns: minmax(0, 1fr);
  }

  .pk-public-body :is(.pk-guide-header, .pk-guide-article-header, .pk-benefits-header, .pk-product-header, .pk-price-header) h1 {
    font-size: clamp(1.65rem, 1.35rem + 1.25vw, 2rem);
    line-height: 1.18;
  }

  .pk-public-body :is(.pk-guide-topic-intro, .pk-guide-section-head, .pk-guide-answer, .pk-guide-copy, .pk-guide-search-band, .pk-guide-sources, .pk-guide-faq, .pk-benefits-section-head, .pk-benefits-next, .pk-product-section-head, .pk-product-answer, .pk-product-cta, .pk-product-boundaries) h2 {
    font-size: clamp(1.35rem, 1.1rem + 1.35vw, 1.9rem);
    line-height: 1.24;
  }
}

@media (max-width: 480px) {
  .pk-auth-body .pk-register-wide .pk-form-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .pk-benefits-table tbody td {
    grid-template-columns: minmax(0, 1fr);
    gap: 4px;
    text-align: start;
  }
}

.pk-public-body .km-home-overview,
.pk-public-body .km-goals {
  padding-block: clamp(32px, 4vw, 56px);
}

.km-home-overview .km-home-overview-copy {
  max-width: none;
  margin: 0;
  text-align: start;
}

.km-home-overview .km-home-overview-copy .pk-lead {
  max-width: 61ch;
  margin: 10px 0 0;
  font-size: clamp(1rem, .94rem + .3vw, 1.2rem);
  line-height: 1.6;
  color: #43564b;
}

.km-home-overview h2,
.km-goals h2 {
  font-size: clamp(1.5rem, 1.2rem + 1.15vw, 2.25rem);
  line-height: 1.18;
}

.km-feature-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(14px, 1.7vw, 24px);
  margin-block: clamp(20px, 2.5vw, 32px) 0;
}

.km-feature-card {
  min-width: 0;
  overflow: hidden;
  border: 1px solid #d8e4d8;
  border-radius: 14px;
  background: #fff;
}

.km-feature-card img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 8 / 5;
  object-fit: cover;
}

.km-feature-card > div {
  padding: clamp(14px, 1.4vw, 20px);
}

.km-feature-card h3 {
  font-size: clamp(1.06rem, .99rem + .28vw, 1.28rem);
  line-height: 1.24;
}

.km-feature-card p {
  margin: 6px 0 0;
  font-size: 1rem;
  line-height: 1.55;
  color: #43564b;
}

.km-home-overview > .pk-fineprint {
  margin: 18px 0 0;
  text-align: start;
}

.km-goals-band {
  background: #f1f5ed;
}

.km-goal-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
  margin-top: 18px;
}

.km-demo-nav {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

:is(.km-goal-grid, .km-demo-nav) > .pk-btn {
  min-width: 0;
  min-height: 52px;
  padding-inline: 12px;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

@media (max-width: 899px) {
  .km-feature-grid,
  .km-demo-nav { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .km-goal-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .km-goal-grid > .pk-btn { grid-column: span 2; }
  .km-goal-grid > .pk-btn:nth-child(n + 4) { grid-column: span 3; }
}

@media (max-width: 559px) {
  .km-feature-grid,
  .km-goal-grid,
  .km-demo-nav { grid-template-columns: minmax(0, 1fr); }
  .km-goal-grid > .pk-btn:nth-child(n) { grid-column: auto; }
}
