.tools__wrap {
  max-width: 1152px;
  width: 100%;
  min-width: 0;
}

.tools__card {
  display: flex;
  flex-direction: column;
  gap: 22px;
  padding: 48px;
  border: 1px solid #e6efe9;
  border-radius: 28px;
  background: linear-gradient(180deg, #ffffff, #f6faf7);
}

.tools__main {
  display: flex;
  flex-direction: column;
  gap: 64px;
}

.tools__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.tools__head-copy {
  display: flex;
  flex-direction: column;
  gap: 16px;
  flex: 1 1 360px;
  min-width: 0;
}

.tools__title {
  margin-top: 0;
}

.tools__lead {
  margin: 0;
  font-size: 22px;
  line-height: 1.5;
  color: #151515;
}

.tools__pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 16px;
  border-radius: 999px;
  background-color: var(--opt-mint);
  font-size: 14px;
  font-weight: 700;
  white-space: nowrap;
  color: var(--opt-green-dark);
}

.tools__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.tools-item {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 24px;
  border: 1px solid #e6efe9;
  border-radius: 20px;
  background-color: var(--opt-white);
  transition: box-shadow 0.25s ease, transform 0.25s ease, translate 0.18s ease-out;
}

/* The same small answer as the Features and Beyond cards, only where there is a pointer. */
@media (hover: hover) {
  .tools-item:hover {
    box-shadow: 0 30px 60px -36px rgba(0, 80, 40, 0.35);
    transform: translateY(-3px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .tools-item {
    transition: none;
  }

  .tools-item:hover {
    transform: none;
  }
}

.tools-item__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 13px;
  background-color: var(--opt-mint);
}

.tools-item__icon svg {
  fill: none;
  stroke: var(--opt-green);
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.tools-item__copy {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.tools-item__title {
  margin: 0;
  font-size: 20px;
  font-weight: 600;
  line-height: 1.06;
  color: var(--opt-ink);
  letter-spacing: -0.03em;
}

.tools-item__text {
  margin: 0;
  font-size: 15px;
  line-height: 1.55;
  color: var(--opt-body);
}

.tools__more {
  padding-top: 18px;
  border-top: 1px solid #e6efe9;
}

.tools__more summary {
  font-size: 15px;
  font-weight: 700;
  color: var(--opt-green);
  list-style: none;
  cursor: pointer;
}

.tools__more summary::-webkit-details-marker {
  display: none;
}

.tools__more summary::after {
  content: " +";
}

.tools__more[open] summary::after {
  content: " \2212";
}

.tools__more-list {
  display: grid;
  list-style: none;
  gap: 8px;
  margin: 0;
  padding: 12px 0 0;
  font-size: 15px;
  line-height: 1.55;
  color: var(--opt-body);
}

@media (max-width: 1199.98px) {
  .tools__card {
    padding: 40px;
  }
}

@media (max-width: 949.98px) {
  .tools__grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 767.98px) {
  .tools__card {
    padding: 32px;
  }
}

@media (max-width: 649.98px) {
  .tools__grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 575.98px) {
  .tools__card {
    padding: 28px;
  }
}

/* Tablet and phone: same card and same three tools, set to the width they get.
   - 64px between the heading row and the tools is a desktop value: 40px here, 28px on phones.
   - Two columns hold three tools (650-949px), which used to leave the third alone in the left
     half of a second row. An odd last tool now spans both columns and reads sideways (icon
     beside its text), the same way an odd last plan does in Pricing; it is written as "an odd
     last item" so adding or removing a tool keeps the grid full.
   - The "Included in Personal, Business & Agency" pill is nowrap on desktop and is 301px wide,
     wider than the card's inner width at 320px: it was the one element that made the whole
     page 345px wide there. On phones it wraps inside its own width and stops being a full
     capsule (a two-line capsule looks like a lozenge). */
@media (max-width: 991.98px) {
  .tools__lead {
    font-size: 20px;
  }

  .tools__main {
    gap: 40px;
  }

  /* Heading block: centred and stacked (title, lead, pill) like every other section's heading
     on tablet and phone. On desktop the title sits on the left with the pill opposite it; once
     the width is below 992px they no longer share a row at every width, so the layout is
     forced to one column instead of flipping between the two. */
  .tools__head {
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
  }

  .tools__head-copy {
    flex: none;
    align-items: center;
    width: 100%;
  }
}

@media (min-width: 650px) and (max-width: 949.98px) {
  .tools-item:last-child:nth-child(odd) {
    grid-column: 1 / -1;
    flex-direction: row;
    align-items: center;
    gap: 20px;
  }
}

@media (max-width: 575.98px) {
  .tools__card {
    padding: 22px;
    border-radius: 22px;
  }

  .tools__main {
    gap: 28px;
  }

  .tools__head {
    gap: 16px;
  }

  .tools__head-copy {
    gap: 12px;
  }

  .tools__lead {
    font-size: 17px;
    line-height: 1.5;
  }

  .tools__pill {
    padding: 8px 14px;
    border-radius: 16px;
    font-size: 13px;
    line-height: 1.4;
    white-space: normal;
  }

  .tools__grid {
    gap: 12px;
  }

  .tools-item {
    gap: 14px;
    padding: 20px;
    border-radius: 16px;
  }

  .tools-item__icon {
    width: 40px;
    height: 40px;
    border-radius: 12px;
  }

  .tools-item__title {
    font-size: 19px;
  }

  .tools-item__text {
    font-size: 14.5px;
  }

  .tools__more {
    padding-top: 16px;
  }

  .tools__more summary,
  .tools__more-list {
    font-size: 14.5px;
  }
}

@media (max-width: 379.98px) {
  .tools__card {
    padding: 20px;
  }
}

/* Tablet and small laptop (576-1199px): the descriptions are short and sit in 220-390px columns,
   so a last line of one word was common ("updates." under "Site Guard checks your site after",
   "included." at the end of the comparison list). pretty keeps the last line to at least two
   words. Body text only; the headings keep their own breaks. */
@media (min-width: 576px) and (max-width: 1199.98px) {
  .tools-item__text,
  .tools__more-list {
    text-wrap: pretty;
  }
}
