/* LegalPractice360 R56 — layout balance and inclusive navigation.
   Applied after R54/R55; scoped to this product page only. */

/* Six cards occupy a complete 3-by-2 grid, without the orphan third row. */
.lp54 .lp54-cap-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(14px, 1.5vw, 20px);
  align-items: stretch;
}
.lp54 .lp54-cap-card,
.lp54 .lp54-cap-feature {
  box-sizing: border-box;
  grid-column: auto;
  grid-row: auto;
  min-width: 0;
  min-height: 310px;
  height: 100%;
  padding: clamp(23px, 2.2vw, 31px);
}
.lp54 .lp54-cap-feature {
  min-height: 310px;
}
.lp54 .lp54-cap-feature h3 {
  font-size: clamp(25px, 2.25vw, 31px);
  margin-top: 14px;
}
.lp54 .lp54-cap-feature p {
  font-size: 13px;
  line-height: 1.7;
}
.lp54 .lp54-cap-feature .lp54-cap-icon {
  width: 46px;
  height: 46px;
  margin-bottom: 22px;
}
.lp54 .lp54-cap-feature .lp54-cap-icon svg {
  width: 24px;
  height: 24px;
}
.lp54 .lp54-cap-foot {
  margin-top: auto;
  padding-top: 18px;
  line-height: 1.45;
}

/* Align each lifecycle label to the same baseline in its row. */
.lp54 .lp54-journey-grid {
  align-items: stretch;
  row-gap: 20px;
}
.lp54 .lp54-journey-grid article {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  min-width: 0;
  min-height: 0;
  padding-bottom: 0;
}
.lp54 .lp54-journey-grid h3 {
  width: 100%;
  margin-bottom: 12px;
}
.lp54 .lp54-journey-grid p {
  flex: 1 1 auto;
  min-height: 0;
  margin: 0 0 18px;
}
.lp54 .lp54-journey-chip {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  margin-top: auto;
  padding: 9px 16px;
  font-size: 12px;
  line-height: 1.3;
}

/* Mobile nav: reachable targets and discoverable horizontal scrolling. */
.lp54 .lp54-sectionnav-links {
  scroll-padding-inline: 10px;
  scroll-behavior: smooth;
}
.lp54 .lp54-sectionnav-links a {
  min-height: 44px;
  touch-action: manipulation;
}
.lp54 .lp54-nav-cta {
  min-height: 46px;
  touch-action: manipulation;
}
.lp54 .lp54-tablist button {
  min-height: 44px;
  touch-action: manipulation;
}
.lp54 .lp54-tablist button:focus-visible {
  outline: 3px solid #b12c65;
  outline-offset: -3px;
}
@media (max-width: 1050px) {
  .lp54 .lp54-cap-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .lp54 .lp54-cap-card,
  .lp54 .lp54-cap-feature { grid-column: auto; grid-row: auto; min-height: 292px; }
}
@media (max-width: 720px) {
  .lp54 .lp54-sectionnav-inner { gap: 10px; }
  .lp54 .lp54-sectionnav-links {
    scroll-snap-type: x proximity;
    overscroll-behavior-x: contain;
  }
  .lp54 .lp54-sectionnav-links a {
    min-height: 44px;
    scroll-snap-align: start;
    padding-inline: 13px;
  }
  .lp54 .lp54-nav-cta { min-height: 44px; }
  .lp54 .lp54-cap-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .lp54 .lp54-cap-card,
  .lp54 .lp54-cap-feature { grid-column: auto; grid-row: auto; min-height: 285px; }
  .lp54 .lp54-journey-grid article { padding-bottom: 0; }
}
@media (max-width: 540px) {
  .lp54 .lp54-cap-grid { grid-template-columns: minmax(0, 1fr); }
  .lp54 .lp54-cap-card,
  .lp54 .lp54-cap-feature { min-height: 0; height: auto; padding: 26px; }
  .lp54 .lp54-cap-feature { min-height: 275px; }
  .lp54 .lp54-cap-feature h3 { font-size: 29px; }
  .lp54 .lp54-sectionnav-inner { width: calc(100% - 18px); gap: 7px; }
  .lp54 .lp54-sectionnav-links a { min-height: 44px; }
  .lp54 .lp54-nav-cta { min-width: 93px; min-height: 44px; padding-inline: 9px; font-size: 11px; }
  .lp54 .lp54-journey-grid article { min-height: 0; }
  .lp54 .lp54-journey-grid h3 { margin: 0 0 7px; }
  .lp54 .lp54-journey-grid p { flex: 0 1 auto; margin-bottom: 9px; }
  .lp54 .lp54-journey-chip { margin-top: 0; min-height: 44px; }
}
@media (prefers-reduced-motion: reduce) {
  .lp54 .lp54-sectionnav-links { scroll-behavior: auto; }
}

/* Narrow two-column lifecycle cards: chips share a fixed bottom baseline. */
@media (min-width: 471px) and (max-width: 720px) {
  .lp54 .lp54-journey-grid article {
    position: relative;
    padding-bottom: 64px !important;
  }
  .lp54 .lp54-journey-chip {
    position: absolute;
    left: 0;
    bottom: 0;
    margin: 0;
  }
}

/* Automated WCAG contrast audit improvements, page-specific. */
.lp54 .lp54-section:not(.lp54-assurance) .lp54-heading span { color: #5d6e84; }
.lp54 .lp54-value-grid > div > span:last-child { color: #56667a; }
.lp54 .lp54-cap-card:not(.lp54-cap-feature) .lp54-cap-num { color: #90486b; }
.lp54 .lp54-journey-grid p { color: #53647a; }
.lp54 .lp54-connectors p { color: #53647a; }
.lp54 .lp54-connector-status { color: #526177; }
.lp54 .lp54-integration-note { color: #53647a; }
.lp54 .lp54-faq-layout > div:first-child > p { color: #526177; }
.lp54 .lp54-closing-actions .lp54-button-accent { background: #c51b58; }
.lp54 .lp54-closing-actions .lp54-button-accent:hover,
.lp54 .lp54-closing-actions .lp54-button-accent:focus-visible { background: #aa174a; }
