/* Dedicated layout for Beacon SEO topic hubs and comparison guides. */
.beacon-seo-topic-page {
  --bst-ink: var(--bc-semantic-color-text-primary);
  --bst-body: var(--bc-semantic-color-text-secondary);
  --bst-border: var(--bc-semantic-color-border-default);
  --bst-surface: var(--bc-semantic-color-surface-canvas);
  --bst-subtle: var(--bc-semantic-color-surface-subtle);
  --bst-accent: var(--bc-semantic-color-brand-accent);
  --bst-radius-sm: var(--bc-rounded-sm, 4px);
  --bst-radius-xs: var(--bc-rounded-xs, 3.25px);
  color: var(--bst-ink);
  background: transparent !important;
}

.beacon-seo-topic-page,
.beacon-seo-topic-page main,
.beacon-seo-topic-page .site-main {
  background-color: transparent !important;
}

.beacon-seo-topic-wrap {
  width: min(100% - 48px, 1240px);
  margin-inline: auto;
  padding-block: 28px 72px;
}

.beacon-seo-topic-hero {
  position: relative;
  overflow: hidden;
  margin-top: 24px;
  padding: clamp(28px, 5vw, 64px);
  border: 1px solid var(--bst-border);
  border-top: 4px solid var(--bst-accent);
  border-radius: var(--bst-radius-sm);
  background: var(--bst-subtle);
}

.beacon-seo-topic-eyebrow {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 20px;
  color: var(--bst-body);
  font-family: var(--bc-font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.beacon-seo-topic-eyebrow::before {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--bst-accent);
  content: "";
}

.beacon-seo-topic-title {
  max-width: 1120px;
  margin: 0 0 18px;
  color: var(--bst-ink);
  font-size: clamp(30px, 3.4vw, 42px);
  font-weight: 500;
  letter-spacing: -.035em;
  line-height: 1.16;
  overflow-wrap: anywhere;
}

.beacon-seo-topic-intro {
  max-width: 850px;
  margin: 0;
  color: var(--bst-body);
  font-size: clamp(16px, 1.5vw, 18px);
  line-height: 1.8;
  overflow-wrap: anywhere;
}

.beacon-seo-topic-jump {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-height: 44px;
  margin-top: 28px;
  padding: 0 16px;
  border: 1px solid var(--bc-primary);
  border-radius: var(--bc-rounded-sm);
  background: var(--bc-primary);
  color: var(--bc-on-dark) !important;
  font-size: 14px;
  font-weight: 500;
  text-decoration: none !important;
  transition: background-color 150ms ease, border-color 150ms ease;
}

.beacon-seo-topic-jump:hover,
.beacon-seo-topic-jump:focus-visible {
  border-color: var(--bc-color-palette-legacy-ink-hover);
  background: var(--bc-color-palette-legacy-ink-hover);
  color: var(--bc-on-dark) !important;
}

.beacon-seo-topic-jump:focus-visible,
.beacon-seo-topic-toc a:focus-visible,
.beacon-seo-topic-content a:focus-visible {
  outline: 2px solid var(--bc-semantic-color-border-focus);
  outline-offset: 3px;
}

.beacon-seo-topic-layout {
  display: grid;
  grid-template-columns: minmax(200px, 250px) minmax(0, 1fr);
  align-items: start;
  gap: clamp(20px, 3vw, 40px);
  margin-top: 32px;
}

.beacon-seo-topic-toc {
  position: sticky;
  top: 88px;
  padding: 18px 16px;
  border: 1px solid var(--bst-border);
  border-radius: var(--bst-radius-sm);
  background: var(--bst-surface);
}

.beacon-seo-topic-toc-title {
  margin: 0 0 12px;
  color: var(--bst-body);
  font-family: var(--bc-font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .05em;
}

.beacon-seo-topic-toc ol {
  display: grid;
  gap: 2px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.beacon-seo-topic-toc li {
  margin: 0;
  padding: 0;
}

.beacon-seo-topic-toc a {
  display: block;
  padding: 8px 9px;
  border-left: 2px solid transparent;
  color: var(--bst-body);
  font-size: 13px;
  line-height: 1.5;
  text-decoration: none;
  overflow-wrap: anywhere;
}

.beacon-seo-topic-toc a:hover {
  border-left-color: var(--bst-accent);
  background: var(--bst-subtle);
  color: var(--bst-ink);
}

.beacon-seo-topic-content,
.beacon-seo-topic-content .beacon-topic-hub {
  min-width: 0;
}

.beacon-seo-topic-content .beacon-topic-hub {
  display: grid;
  gap: 16px;
}

.beacon-seo-topic-content .beacon-topic-section {
  min-width: 0;
  margin: 0;
  padding: clamp(20px, 3vw, 30px);
  border: 1px solid var(--bst-border);
  border-radius: var(--bst-radius-sm);
  background: var(--bst-surface);
  scroll-margin-top: 92px;
}

.beacon-seo-topic-content .beacon-topic-section h2 {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin: 0 0 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--bst-border);
  color: var(--bst-ink);
  font-size: clamp(19px, 2vw, 23px);
  font-weight: 500;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.beacon-seo-topic-content .beacon-topic-section h2::before {
  flex: 0 0 auto;
  color: var(--bst-accent);
  font-family: var(--bc-font-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: .02em;
}

.beacon-seo-topic-content #topic-section-1 h2::before { content: "01"; }
.beacon-seo-topic-content #topic-section-2 h2::before { content: "02"; }
.beacon-seo-topic-content #topic-section-3 h2::before { content: "03"; }
.beacon-seo-topic-content #topic-section-4 h2::before { content: "04"; }
.beacon-seo-topic-content #topic-section-5 h2::before { content: "05"; }
.beacon-seo-topic-content #topic-section-6 h2::before { content: "06"; }

.beacon-seo-topic-content .beacon-topic-section > p {
  margin: 0 0 16px;
  color: var(--bst-body);
  font-size: 15px;
  line-height: 1.8;
  overflow-wrap: anywhere;
}

.beacon-seo-topic-content .beacon-topic-section h3 {
  margin: 22px 0 10px;
  padding-left: 10px;
  border-left: 2px solid var(--bst-accent);
  color: var(--bst-ink);
  font-size: 15px;
  font-weight: 500;
  line-height: 1.45;
}

.beacon-seo-topic-content .beacon-topic-links {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 14px 0 0;
  padding: 0;
  list-style: none;
}

.beacon-seo-topic-content .beacon-topic-links li {
  min-width: 0;
  margin: 0;
  padding: 0;
}

.beacon-seo-topic-content .beacon-topic-links a {
  display: flex;
  align-items: flex-start;
  min-height: 44px;
  padding: 11px 12px;
  border: 1px solid var(--bst-border);
  border-radius: var(--bst-radius-xs);
  background: var(--bst-surface);
  color: var(--bst-ink);
  font-size: 14px;
  line-height: 1.5;
  text-decoration: none;
  overflow-wrap: anywhere;
  transition: border-color 140ms ease, background-color 140ms ease;
}

.beacon-seo-topic-content .beacon-topic-links a::before {
  flex: 0 0 auto;
  margin: .05em 9px 0 0;
  color: var(--bst-accent);
  content: "↗";
}

.beacon-seo-topic-content .beacon-topic-links a:hover {
  border-color: var(--bc-border-strong);
  background: var(--bst-subtle);
}

.beacon-seo-topic-content .beacon-topic-faq .bh-faq {
  display: grid;
  gap: 10px;
}

.beacon-seo-topic-content .beacon-topic-faq .bh-faq-item {
  margin: 0;
  padding: 16px;
  border: 1px solid var(--bst-border);
  border-radius: var(--bst-radius-sm);
  background: var(--bst-subtle);
}

.beacon-seo-topic-content .beacon-topic-faq .bh-faq-q,
.beacon-seo-topic-content .beacon-topic-faq .bh-faq-a {
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
}

.beacon-seo-topic-content .beacon-topic-faq .bh-faq-q p {
  margin: 0 0 7px;
  color: var(--bst-ink);
  font-size: 15px;
  line-height: 1.55;
}

.beacon-seo-topic-content .beacon-topic-faq .bh-faq-a p {
  margin: 0;
  color: var(--bst-body);
  font-size: 14px;
  line-height: 1.75;
}

.beacon-seo-topic-content .beacon-topic-sources > p {
  margin: 12px 0 0;
  color: var(--bst-body);
  font-size: 13px;
}

@media (max-width: 900px) {
  .beacon-seo-topic-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .beacon-seo-topic-toc {
    position: static;
  }

  .beacon-seo-topic-toc ol {
    display: flex;
    flex-wrap: nowrap;
    gap: 6px;
    overflow-x: auto;
    padding: 2px 2px 8px;
    scrollbar-width: thin;
  }

  .beacon-seo-topic-toc li {
    flex: 0 0 auto;
    max-width: 240px;
  }

  .beacon-seo-topic-toc a {
    border: 1px solid var(--bst-border);
    border-radius: var(--bst-radius-xs);
    white-space: nowrap;
  }
}

@media (max-width: 600px) {
  .beacon-seo-topic-wrap {
    width: min(100% - 32px, 1240px);
    padding-block: 20px 48px;
  }

  .beacon-seo-topic-hero {
    margin-top: 18px;
    padding: 24px 20px;
  }

  .beacon-seo-topic-title {
    font-size: clamp(27px, 8vw, 36px);
  }

  .beacon-seo-topic-layout {
    gap: 16px;
    margin-top: 20px;
  }

  .beacon-seo-topic-content .beacon-topic-hub {
    gap: 12px;
  }

  .beacon-seo-topic-content .beacon-topic-section {
    padding: 18px 16px;
  }

  .beacon-seo-topic-content .beacon-topic-links {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (prefers-reduced-motion: reduce) {
  .beacon-seo-topic-page *,
  .beacon-seo-topic-page *::before,
  .beacon-seo-topic-page *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}

html.io-black-mode:not(#_) .beacon-seo-topic-page {
  --bst-ink: var(--bc-color-palette-white);
  --bst-body: var(--bc-semantic-color-text-inverse-secondary);
  --bst-border: var(--bc-color-palette-dark-surface);
  --bst-surface: var(--bc-semantic-color-surface-inverse);
  --bst-subtle: var(--bc-semantic-color-surface-inverse-raised);
}

html.io-black-mode:not(#_) .beacon-seo-topic-hero,
html.io-black-mode:not(#_) .beacon-seo-topic-toc,
html.io-black-mode:not(#_) .beacon-seo-topic-content .beacon-topic-section,
html.io-black-mode:not(#_) .beacon-seo-topic-content .beacon-topic-links a {
  background: var(--bst-surface);
}

html.io-black-mode:not(#_) .beacon-seo-topic-content .beacon-topic-faq .bh-faq-item,
html.io-black-mode:not(#_) .beacon-seo-topic-toc a:hover,
html.io-black-mode:not(#_) .beacon-seo-topic-content .beacon-topic-links a:hover {
  background: var(--bst-subtle);
}
