.riq-cards__layout {
  display: block;
}

.riq-cards__grid {
  display: grid;
  gap: var(--riq-gap, 24px);
  grid-template-columns: repeat(var(--riq-cols-d, 4), minmax(0, 1fr));
}

/* ------------------------------------------------------------ Card */
/* each card sits in a cell that carries the entrance animation, so the
   shadow cards' hover transform and the scroll-in transform never compete */
.riq-cards__cell {
  display: flex;
  min-width: 0;
}

.riq-cards__cell > .riq-cards__item {
  flex: 1 1 auto;
}

.riq-cards__item {
  display: flex;
  flex-direction: column;
  gap: 12px;
  height: 100%;
}

/* Titles take their size and weight from "Style as" (a heading level from
   Theme settings). Only spacing lives here. */
.riq-cards__title {
  margin: 0;
}

.riq-cards__text p,
.riq-cards__text li {
  font-size: 16px;
  line-height: 1.5;
}

.riq-cards__text > *:last-child,
.riq-cards__text p:last-child {
  margin-bottom: 0;
}

.riq-cards__result {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  margin-top: auto;
}

.riq-cards__result p {
  font-size: 16px;
  margin: 0;
}

.riq-cards__link {
  margin-top: auto;
  padding-bottom: 0;
}

/* ======================================================== Shadow cards
   The ResultsIQ landing look: navy keyline and an offset flat shadow. Its
   title sizes are fixed per "Title size" and override "Style as". */
.riq-cards--shadow .riq-cards__item {
  background-color: var(--riq-white, #fff);
  border: 1px solid var(--riq-border, #9094A5);
  border-radius: var(--riq-radius, 10px);
  box-shadow: var(--riq-card-shadow);
  padding: 20px;
  transition: box-shadow .25s ease, transform .25s ease;
}

.riq-cards--shadow .riq-cards__item:hover {
  box-shadow: var(--riq-card-shadow-hover);
  transform: translate(2px, -2px);
}

.riq-cards--shadow .riq-cards__title {
  font-weight: 700;
  line-height: 1.15;
}

.riq-cards--shadow.riq-cards--title-sm .riq-cards__title { font-size: 20px; }
.riq-cards--shadow.riq-cards--title-md .riq-cards__title { font-size: 24px; }
.riq-cards--shadow.riq-cards--title-lg .riq-cards__title { font-size: 30px; }

.riq-cards--shadow.riq-cards--stat .riq-cards__title {
  font-size: 30px;
  font-weight: 900;
}

.riq-cards--shadow.riq-cards--stat .riq-cards__text p {
  font-size: 18px;
}

/* ======================================================== Border cards
   The Results+ card: white, a warm hairline, 14px corners and a soft lift. */
.riq-cards--border .riq-cards__item {
  background-color: var(--riq-white, #fff);
  border: 1px solid var(--riq-line, #DFD9C8);
  border-radius: 14px;
  box-shadow: var(--riq-lift-sm);
  gap: 0;
  padding: 26px;
}

/* the reference grids sit 16px further below their heading than a plain
   heading gap */
.riq-cards--border.riq-cards--feature .riq-cards__grid {
  margin-top: 16px;
}

.riq-cards--border .riq-cards__icon {
  margin-bottom: 16px;
}

.riq-cards--border .riq-cards__title {
  margin-bottom: 8px;
}

.riq-cards--border .riq-cards__text strong {
  color: var(--riq-navy, #1A2D49);
  font-weight: 700;
}

/* icon tile: pale blue square, navy glyph */
.riq-cards--border .riq-icon-box {
  background-color: var(--riq-blue-tint, #E7EFF3);
  border: 0;
  border-radius: 10px;
  height: 44px;
  width: 44px;
}

.riq-cards--border .riq-icon-box img {
  height: 20px;
  width: 20px;
}

/* ----------------------------------------------------- Numbered steps
   Number, title and text line up across the row: each card spans three
   rows of a shared subgrid, so a two-line title pushes every text down. */
.riq-cards__number {
  align-items: center;
  background-color: var(--riq-orange-tint, #FBEAE0);
  border-radius: 50%;
  color: var(--riq-orange, #E1794C);
  display: inline-flex;
  flex: 0 0 auto;
  font-size: 14px;
  font-weight: 800;
  height: 34px;
  justify-content: center;
  line-height: 1;
  width: 34px;
}

.riq-cards--border.riq-cards--numbered .riq-cards__item {
  padding: 28px 24px;
}

.riq-cards--border.riq-cards--numbered .riq-cards__title {
  margin-bottom: 10px;
}

@supports (grid-template-rows: subgrid) {
  .riq-cards--numbered .riq-cards__cell,
  .riq-cards--numbered .riq-cards__item {
    display: grid;
    grid-row: span 3;
    grid-template-rows: subgrid;
    row-gap: 0;
  }

  .riq-cards--numbered .riq-cards__cell > .riq-cards__item {
    align-content: start;
  }

  .riq-cards--numbered .riq-cards__number {
    align-self: start;
  }
}

/* --------------------------------------------------- Fit / not-fit lists
   Cards whose text is a check or cross list get a 3px top rule (orange on
   the highlighted card), a mark before the title and dot bullets. */
.riq-cards--border .riq-cards__item--checks,
.riq-cards--border .riq-cards__item--crosses {
  border-top: 3px solid var(--riq-line, #DFD9C8);
  border-radius: 16px;
  padding: 32px;
}

.riq-cards--border .riq-cards__item--checks .riq-cards__title,
.riq-cards--border .riq-cards__item--crosses .riq-cards__title {
  margin-bottom: 16px;
}

.riq-cards--border .riq-cards__item--checks .riq-cards__title::before,
.riq-cards--border .riq-cards__item--crosses .riq-cards__title::before {
  display: inline-block;
  font-family: Roboto, sans-serif;
  font-weight: 700;
  margin-right: 8px;
}

.riq-cards--border .riq-cards__item--checks .riq-cards__title::before {
  color: var(--riq-orange, #E1794C);
  content: "\2713";
}

.riq-cards--border .riq-cards__item--crosses .riq-cards__title::before {
  color: var(--riq-dblue, #375586);
  content: "\2715";
}

.riq-cards__item--highlight {
  border-top: 3px solid var(--riq-orange, #E1794C) !important;
}

.riq-cards__text--checks ul,
.riq-cards__text--crosses ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.riq-cards__text--checks li,
.riq-cards__text--crosses li {
  padding: 6px 0 6px 1.6em;
  position: relative;
}

.riq-cards__text--checks li::before,
.riq-cards__text--crosses li::before {
  font-weight: 700;
  left: 0;
  position: absolute;
  top: 6px;
}

.riq-cards__text--checks li::before {
  color: var(--riq-orange, #E1794C);
  content: "\2713";
}

.riq-cards__text--crosses li::before {
  color: var(--riq-border, #9094A5);
  content: "\2715";
}

/* on Results+ cards the list reads as filled dots; the mark is on the title */
.riq-cards--border .riq-cards__text--checks li,
.riq-cards--border .riq-cards__text--crosses li {
  padding: 8px 0 8px 26px;
}

.riq-cards--border .riq-cards__text--checks li p,
.riq-cards--border .riq-cards__text--crosses li p {
  margin: 0;
}

.riq-cards--border .riq-cards__text--checks li::before,
.riq-cards--border .riq-cards__text--crosses li::before {
  border-radius: 50%;
  content: "";
  height: 8px;
  left: 4px;
  top: 16px;
  width: 8px;
}

.riq-cards--border .riq-cards__text--checks li::before {
  background-color: var(--riq-orange, #E1794C);
}

.riq-cards--border .riq-cards__text--crosses li::before {
  background-color: var(--riq-dblue, #375586);
}

/* ------------------------------------------------------- Stat variant */
/* numbers start at the top so a row of stats lines up even when one label
   wraps to two lines */
.riq-cards--stat .riq-cards__item {
  align-items: center;
  justify-content: flex-start;
  text-align: center;
}

.riq-cards--stat .riq-cards__icon img {
  height: 64px;
  object-fit: contain;
  width: auto;
}

.riq-cards--border.riq-cards--stat .riq-cards__item {
  padding: 26px 22px;
}

.riq-cards--border.riq-cards--stat .riq-cards__title {
  margin-bottom: 0;
}

.riq-cards--border.riq-cards--stat .riq-cards__text {
  margin-top: 4px;
}

/* ------------------------------------------------------- Divided strip
   A row of facts with hairlines between them instead of boxes. It spans the
   full 1180px page grid, a little wider than the other sections. */
.riq-cards--divided {
  max-width: 1180px;
}

.riq-cards--divided .riq-cards__grid {
  border-bottom: 1px solid var(--riq-line, #DFD9C8);
  border-top: 1px solid var(--riq-line, #DFD9C8);
  gap: 0;
}

.riq-cards--divided .riq-cards__item {
  border-left: 1px solid var(--riq-line, #DFD9C8);
  gap: 0;
  padding: 22px 32px;
}

.riq-cards--divided .riq-cards__cell:first-child .riq-cards__item {
  border-left: 0;
}

.riq-cards--divided .riq-cards__title {
  font-weight: 600;
  line-height: 1.5;
}

.riq-cards--divided .riq-cards__text p {
  font-size: 14px;
  line-height: 24px;
}

/* ------------------------------------------------------------ Badge row
   Partner badges: a 96px logo over a Roboto Condensed caption, with a
   hairline between them. A rule under the whole row separates this trust
   strip from whatever comes next — both usually sit on the same beige,
   which otherwise reads as one section. */
.riq-cards--badge {
  border-bottom: 1px solid var(--riq-line, #DFD9C8);
  padding-bottom: 32px;
}

.riq-cards--badge .riq-cards__grid {
  align-items: start;
  gap: 0;
  grid-template-columns: repeat(var(--riq-cols-d, 4), 250px);
  justify-content: center;
}

.riq-cards--badge .riq-heading {
  margin-bottom: 32px;
}

.riq-cards--badge .riq-cards__item {
  align-items: center;
  gap: 0;
  padding: 0 16px;
  text-align: center;
}

.riq-cards--badge .riq-cards__cell + .riq-cards__cell .riq-cards__item {
  border-left: 1px solid var(--riq-line, #DFD9C8);
}

.riq-cards--badge .riq-cards__icon {
  align-items: center;
  display: flex;
  height: 96px;
  justify-content: center;
  margin-bottom: 12px;
}

.riq-cards--badge .riq-cards__icon img {
  height: 100%;
  max-width: 100%;
  object-fit: contain;
  width: auto;
}

.riq-cards--badge .riq-cards__title {
  color: var(--riq-navy, #1A2D49);
  font-family: var(--riq-font-heading);
  font-size: 18px;
  font-weight: 400;
  line-height: 1.5;
}

/* ------------------------------------------------------ Split layout */
.riq-cards--split .riq-cards__layout {
  align-items: start;
  display: grid;
  gap: 48px;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
}

.riq-cards--split-right .riq-cards__side {
  order: 2;
}

.riq-cards--split-right .riq-cards__layout {
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
}

.riq-cards__side {
  position: sticky;
  top: 120px;
}

.riq-cards__side-content h2 {
  font-size: 58px;
  line-height: 1.08;
  letter-spacing: -.01em;
}

.riq-cards__side-cta {
  margin-top: 24px;
}

.riq-cards__side-image {
  border-radius: var(--riq-radius-lg, 20px);
  display: block;
  height: auto;
  margin-top: 24px;
  width: 100%;
}

/* ------------------------------------------------------------ Footer */
.riq-cards__footer-content > *:last-child {
  margin-bottom: 0;
}

/* inline brand logos inside a sentence ("¡Start using HubSpot…") */
.riq-cards__footer-content h2 img,
.riq-cards__footer-content h3 img {
  display: inline-block;
  height: auto;
  max-height: 1.2em;
  vertical-align: -0.2em;
  width: auto;
}

.riq-cards__footer-content h3 {
  font-size: 36px;
}

/* checklist panel below the cards */
.riq-cards__footer-content ul {
  background-color: var(--riq-cream, #FFFBF2);
  border-radius: var(--riq-radius-lg, 20px);
  display: inline-block;
  list-style: none;
  margin: 0;
  padding: 32px 64px;
  text-align: left;
}

.riq-cards__footer-content li {
  font-size: 26px;
  line-height: 1.4;
  padding-left: 1.3em;
  position: relative;
}

.riq-cards__footer-content li::before {
  color: #4F9A4A;
  content: "\2713";
  left: 0;
  position: absolute;
}

/* -------------------------------------------------------- Responsive */
@media (max-width: 992px) {
  .riq-cards__grid {
    grid-template-columns: repeat(var(--riq-cols-t, 2), minmax(0, 1fr));
  }

  .riq-cards--badge .riq-cards__grid {
    gap: 32px 8px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .riq-cards--badge .riq-cards__item {
    padding: 0 8px;
  }

  .riq-cards--badge .riq-cards__cell + .riq-cards__cell .riq-cards__item {
    border-left: 0;
  }

  .riq-cards--badge .riq-cards__icon {
    height: 80px;
  }

  .riq-cards--split .riq-cards__layout,
  .riq-cards--split-right .riq-cards__layout {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .riq-cards--split-right .riq-cards__side {
    order: 0;
  }

  .riq-cards__side {
    position: static;
  }

  .riq-cards__side-content h2 {
    font-size: 42px;
  }

  /* one column: the steps no longer share rows */
  .riq-cards--numbered .riq-cards__cell,
  .riq-cards--numbered .riq-cards__item {
    grid-row: auto;
    grid-template-rows: none;
  }
}

@media (max-width: 767px) {
  .riq-cards__grid {
    grid-template-columns: repeat(var(--riq-cols-m, 1), minmax(0, 1fr));
    gap: 16px;
  }

  .riq-cards--shadow .riq-cards__item {
    box-shadow: -6px 6px 0 0 rgba(55, 85, 134, .1);
  }

  /* icon beside the copy on phones, like the live landing */
  .riq-cards--shadow.riq-cards--feature .riq-cards__item {
    column-gap: 14px;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-content: start;
  }

  .riq-cards--shadow.riq-cards--feature .riq-cards__icon {
    grid-row: 1 / span 6;
  }

  /* the icon spans six implicit rows; with a row gap each empty one added
     12px under short cards, so space the copy with margins instead */
  .riq-cards--shadow.riq-cards--feature .riq-cards__item:not(.riq-cards__item--no-marker) {
    row-gap: 0;
  }

  .riq-cards--shadow.riq-cards--feature .riq-cards__item:not(.riq-cards__item--no-marker) > :not(.riq-cards__icon) + :not(.riq-cards__icon) {
    margin-top: 12px;
  }

  .riq-cards--shadow.riq-cards--feature .riq-cards__item > *:not(.riq-cards__icon) {
    grid-column: 2;
  }

  /* nothing to sit beside: keep the plain stacked flow */
  .riq-cards--shadow.riq-cards--feature .riq-cards__item--no-marker {
    display: flex;
  }

  .riq-cards--divided .riq-cards__item {
    border-left: 0;
    border-top: 1px solid var(--riq-line, #DFD9C8);
    padding: 22px 32px;
  }

  .riq-cards--divided .riq-cards__cell:first-child .riq-cards__item {
    border-top: 0;
  }

  .riq-cards--border.riq-cards--stat .riq-cards__item {
    padding: 22px 14px;
  }

  .riq-cards--border .riq-cards__item--checks,
  .riq-cards--border .riq-cards__item--crosses {
    padding: 28px 22px;
  }

  .riq-cards--shadow.riq-cards--title-md .riq-cards__title,
  .riq-cards--shadow.riq-cards--title-lg .riq-cards__title {
    font-size: 22px;
  }

  .riq-cards--shadow.riq-cards--stat .riq-cards__title {
    font-size: 24px;
  }

  .riq-cards__side-content h2 {
    font-size: 34px;
  }

  .riq-cards__footer-content h3 {
    font-size: 25px;
  }

  .riq-cards__footer-content ul {
    padding: 24px;
  }

  .riq-cards__footer-content li {
    font-size: 19px;
  }
}
