.seo-topic-section {
  margin: 30px 0 12px;
}

.seo-topic-head {
  max-width: 850px;
  margin-bottom: 18px;
}

.seo-topic-head h2 {
  margin: 0 0 8px;
  color: #05224a;
  font-size: clamp(1.65rem, 3.8vw, 2.6rem);
  letter-spacing: -.025em;
}

.seo-topic-head p {
  margin: 0;
  color: #52647c;
  line-height: 1.65;
}

.seo-topic-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.seo-topic-card {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 12px;
  padding: 22px;
  border: 1px solid rgba(5, 34, 74, .11);
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 14px 34px rgba(5, 34, 74, .065);
}

.seo-topic-card > small {
  align-self: flex-start;
  padding: 7px 10px;
  border-radius: 999px;
  background: #eef5ff;
  color: #003399;
  font-weight: 900;
}

.seo-topic-card h3 {
  margin: 0;
  color: #05224a;
  font-size: 1.2rem;
  line-height: 1.25;
}

.seo-topic-card p {
  margin: 0;
  color: #52647c;
  line-height: 1.55;
}

.seo-topic-links {
  display: grid;
  gap: 8px;
  margin-top: auto;
}

.seo-topic-links a {
  display: flex;
  min-height: 44px;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 14px;
  background: #f3f7fc;
  color: #073b84;
  font-weight: 800;
  line-height: 1.35;
  text-decoration: none;
  overflow-wrap: anywhere;
}

.seo-topic-links a::after {
  content: "→";
  flex: 0 0 auto;
}

.seo-topic-links a:hover,
.seo-topic-links a:focus-visible {
  background: #e6effb;
  outline: 3px solid rgba(17, 201, 211, .35);
  outline-offset: 2px;
}

.seo-topic-note {
  margin: 18px 0 0;
  padding: 16px 18px;
  border-left: 4px solid #11c9d3;
  border-radius: 0 16px 16px 0;
  background: #eefaff;
  color: #334c68;
  line-height: 1.6;
}

@media (max-width: 920px) {
  .seo-topic-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Keep the global favourite and Titor controls outside interactive content. */
@media (max-width: 1500px) {
  .seo-tools-page .nb-titor-trigger-v2 {
    width: 58px;
    padding: .36rem;
  }

  .seo-tools-page .nb-titor-trigger-v2 > span,
  .seo-tools-page .favorite-floating-label {
    display: none;
  }

  .seo-tools-page .favorite-floating {
    width: 48px;
    height: 48px;
    min-height: 48px;
    justify-content: center;
    padding: 0;
  }
}

@media (min-width: 641px) and (max-width: 1180px) {
  .seo-tools-page .tools-shell {
    width: calc(100% - 104px);
    margin-left: 16px;
    margin-right: auto;
  }
}

@media (max-width: 640px) {
  .seo-topic-grid { grid-template-columns: 1fr; }
  .seo-topic-card { padding: 18px; }
  .seo-topic-links a {
    min-height: 48px;
    margin-right: 64px;
  }
  .seo-tools-page .tool-card { margin-right: 64px; }
}
