/**
 * /tools/ index. Cards sit on the shared .cb-* system.
 * Gutters stay off the screen edge on phones, including Android.
 */

.cb-page a.tools-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.4rem;
  min-height: 100%;
  padding: 1.25rem 1.35rem 1.05rem;
  background: #fff;
  border: 1px solid var(--cb-border, #e2e8f0);
  border-radius: 14px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
  color: #0f172a;
  font-weight: 400;
  text-decoration: none;
}

.cb-page a.tools-card:hover,
.cb-page a.tools-card:focus-visible {
  border-color: #99f6e4;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.07);
  color: #0f172a;
  text-decoration: none;
}

.cb-page a.tools-card:focus-visible {
  outline: 2px solid #1dbb99;
  outline-offset: 3px;
}

.tools-card__kicker {
  margin: 0;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #0f766e;
}

.cb-page a.tools-card h3 {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 600;
  line-height: 1.3;
  color: #0f172a;
}

.cb-page a.tools-card p {
  margin: 0;
  font-size: 1rem;
  line-height: 1.55;
  color: #334155;
  font-weight: 400;
}

.tools-card__go {
  margin-top: auto;
  padding-top: 0.75rem;
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  font-size: 0.95rem;
  font-weight: 600;
  color: #0f766e;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.tools-grid {
  margin-top: 0;
}

/* Soft close sits on a pale background. The shared .cb-cta heading is white. */
.cb-page .cb-cta--soft h2 {
  color: #0f172a;
}

.cb-page .cb-cta--soft p {
  color: #334155;
}

#tools-money,
#tools-names {
  scroll-margin-top: 96px;
}

@media (max-width: 767px) {
  .cb-page:has(.tools-grid) .cb-wrap {
    padding-left: max(16px, env(safe-area-inset-left, 0px)) !important;
    padding-right: max(16px, env(safe-area-inset-right, 0px)) !important;
  }

  .cb-page:has(.tools-grid) .cb-hero {
    padding: 2rem 0 1.15rem;
  }

  .cb-page:has(.tools-grid) .cb-section {
    padding-top: 2.5rem;
    padding-bottom: 2.5rem;
  }

  .cb-page a.tools-card {
    padding: 1.15rem 1.1rem 0.85rem;
  }

  .cb-page a.tools-card h3,
  .cb-page a.tools-card p {
    overflow-wrap: break-word;
  }
}

@media (pointer: coarse) {
  .cb-page a.tools-card {
    min-height: 48px;
  }
}
