.seo-hero {
  margin: 16px 0 28px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border, rgba(0, 0, 0, 0.08));
}

.seo-hero h1 {
  margin: 0 0 10px;
  font-size: 32px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: var(--text);
}

.seo-hero p {
  margin: 0;
  font-size: 16px;
  line-height: 1.55;
  color: var(--muted);
  max-width: 780px;
}

.seo-hero.seo-hero-compact {
  margin: 0;
  padding-bottom: 0;
  border-bottom: none;
}

.seo-hero.seo-hero-compact h1.tagline {
  font-size: 26px;
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -0.01em;
  margin: 0 0 6px;
}

.seo-hero.seo-hero-compact p.tagline-sub {
  font-size: 14px;
  line-height: 1.55;
  max-width: 760px;
  margin: 0 0 16px;
}

.seo-section {
  margin: 32px 0;
}

.seo-section h2 {
  margin: 0 0 14px;
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--text);
}

.seo-section h3 {
  margin: 20px 0 10px;
  font-size: 17px;
  font-weight: 600;
  color: var(--text);
}

.seo-section p,
.seo-section li {
  font-size: 15px;
  line-height: 1.6;
  color: var(--text);
}

.seo-section ul,
.seo-section ol {
  padding-left: 22px;
  margin: 8px 0 14px;
}

.seo-section li + li {
  margin-top: 6px;
}

.seo-section a {
  color: var(--accent, #4a8bf5);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.15s ease;
}

.seo-section a:hover,
.seo-section a:focus-visible {
  border-bottom-color: currentColor;
}

.seo-compare-table {
  width: 100%;
  border-collapse: collapse;
  margin: 8px 0 16px;
  font-size: 14.5px;
}

.seo-compare-table th,
.seo-compare-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border, rgba(0, 0, 0, 0.08));
  text-align: left;
  vertical-align: top;
}

.seo-compare-table th {
  font-weight: 600;
  color: var(--muted);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.seo-compare-table td:first-child {
  font-weight: 600;
  color: var(--text);
  width: 28%;
}

.seo-cta {
  margin: 28px 0;
  padding: 18px 20px;
  border: 1px solid var(--border, rgba(0, 0, 0, 0.12));
  border-radius: 10px;
  background: var(--surface, rgba(0, 0, 0, 0.02));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.seo-cta-text {
  font-size: 15px;
  color: var(--text);
  margin: 0;
}

.seo-cta-link {
  display: inline-block;
  padding: 9px 16px;
  background: var(--text);
  color: var(--bg);
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  transition: opacity 0.15s ease;
}

.seo-cta-link:hover,
.seo-cta-link:focus-visible {
  opacity: 0.85;
}

.seo-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 14px;
  margin: 14px 0 8px;
}

.seo-card {
  display: block;
  padding: 16px;
  border: 1px solid var(--border, rgba(0, 0, 0, 0.1));
  border-radius: 10px;
  text-decoration: none;
  color: var(--text);
  transition: border-color 0.15s ease, transform 0.15s ease;
}

.seo-card:hover,
.seo-card:focus-visible {
  border-color: var(--text);
  transform: translateY(-1px);
}

.seo-card-title {
  font-weight: 600;
  font-size: 15.5px;
  margin: 0 0 6px;
}

.seo-card-desc {
  font-size: 13.5px;
  color: var(--muted);
  margin: 0;
  line-height: 1.5;
}

.seo-breadcrumb {
  font-size: 13px;
  color: var(--muted);
  margin: 8px 0 16px;
}

.seo-breadcrumb a {
  color: var(--muted);
  text-decoration: none;
  border-bottom: 1px dotted currentColor;
}

.seo-breadcrumb a:hover {
  color: var(--text);
}

/* ---- product-detail hero (build-static-pages.js) ---- */
.seo-hero-sub {
  margin: 8px 0 0;
  font-size: 15px;
  color: var(--muted);
}

.seo-hero-links {
  margin: 10px 0 0;
  font-size: 14px;
}

/* ---- "works well with" grid + tool lists ---- */
.seo-works-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 18px;
  margin: 6px 0;
}

.seo-works-col h3 {
  margin: 0 0 8px;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
}

.seo-works-col ul,
.seo-tool-list {
  list-style: none;
  padding-left: 0;
  margin: 0;
}

.seo-tool-list li { margin: 0 0 8px; }

.seo-empty {
  font-size: 14px;
  color: var(--muted);
  font-style: italic;
}

/* ---- ranked "best for" entries ---- */
.seo-rank { margin: 22px 0; }

.seo-rank h2 {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
}

.seo-rank-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 26px;
  height: 26px;
  padding: 0 6px;
  border-radius: 7px;
  background: var(--text);
  color: var(--bg);
  font-size: 14px;
  font-weight: 700;
  flex: 0 0 auto;
}

.seo-rank-why {
  margin: 0 0 6px;
  font-size: 14px;
  color: var(--muted);
}

/* ---- horizontal scroll wrapper for wide comparison tables ---- */
.seo-table-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 8px 0 16px;
}

.seo-table-scroll .seo-compare-table {
  margin: 0;
  min-width: 540px;
}

/* ---- programmatic SEO: vs / alternatives / best-for / pricing ---- */
.seo-na {
  color: var(--muted);
  opacity: 0.6;
}

/* X vs Y: two product columns of equal width */
.seo-vs-table th:nth-child(2),
.seo-vs-table th:nth-child(3),
.seo-vs-table td:nth-child(2),
.seo-vs-table td:nth-child(3) {
  width: 36%;
}

/* "X alternatives" cards */
.seo-alt-list {
  display: grid;
  gap: 14px;
  margin: 14px 0 8px;
}

.seo-alt {
  padding: 16px 18px;
  border: 1px solid var(--border, rgba(0, 0, 0, 0.1));
  border-radius: 10px;
}

.seo-alt-head {
  display: flex;
  align-items: center;
  gap: 10px;
}

.seo-alt-head h3 {
  margin: 0;
  font-size: 17px;
}

.seo-alt-rank {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  height: 24px;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--text);
  color: var(--bg);
  font-size: 13px;
  font-weight: 700;
  flex: 0 0 auto;
}

.seo-alt-tagline {
  margin: 8px 0 6px;
  color: var(--muted);
  font-size: 14px;
}

.seo-alt-why {
  margin: 10px 0 4px;
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
}

.seo-alt ul {
  margin: 4px 0 10px;
}

.seo-alt-links {
  margin: 6px 0 0;
  font-size: 14px;
  font-weight: 600;
}

/* "best <layer> for <segment>" rationale list */
.seo-rank-list {
  display: grid;
  gap: 12px;
  margin: 14px 0 8px;
}

.seo-rank-item {
  padding: 12px 16px;
  border-left: 3px solid var(--border, rgba(0, 0, 0, 0.12));
}

.seo-rank-item h3 {
  margin: 0 0 4px;
  font-size: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.seo-rank-item p {
  margin: 0;
  font-size: 14px;
  color: var(--muted);
}

@media (max-width: 720px) {
  .seo-hero h1 { font-size: 26px; }
  .seo-hero p { font-size: 14.5px; }
  .seo-section h2 { font-size: 19px; }
  .seo-compare-table { font-size: 13.5px; }
  .seo-compare-table th,
  .seo-compare-table td { padding: 8px 8px; }
}
