/* Blog insights hub + editorial article reading layout */

.seo-hub-blog,
.seo-article-editorial {
  --blog-measure: 42rem;
}

.seo-hub-blog .seo-hub-main,
.seo-article-editorial .seo-main {
  max-width: 1120px;
  margin: 0 auto;
  padding: 32px 24px 80px;
}

.blog-eyebrow {
  display: inline-block;
  margin: 0 0 12px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #a78bfa;
}

.seo-hub-blog .hub-hero {
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
  gap: 40px;
  align-items: stretch;
  margin-bottom: 36px;
}

.seo-hub-blog .hub-hero:has(.blog-featured.is-hidden) {
  grid-template-columns: 1fr;
}

.seo-hub-blog .hub-hero h1 {
  font-size: clamp(2rem, 4.2vw, 3.15rem);
  line-height: 1.12;
  letter-spacing: -0.03em;
  max-width: 14ch;
  margin: 0 0 16px;
}

.blog-featured {
  display: flex;
  flex-direction: column;
  min-height: 100%;
  background: var(--hub-surface);
  border: 1px solid var(--hub-border);
  border-radius: 16px;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
}

.blog-featured:hover {
  border-color: rgba(139, 92, 246, 0.45);
}

.blog-featured-shot {
  margin: 0;
  background: #0a0e16;
}

.blog-featured-shot img {
  display: block;
  width: 100%;
  height: 220px;
  object-fit: cover;
}

.blog-featured-body {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 22px 22px 24px;
  flex: 1;
}

.blog-kicker {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  align-items: center;
  font-size: 12px;
  color: var(--hub-muted);
}

.blog-cat {
  color: #c4b5fd;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-size: 11px;
}

.blog-featured h2 {
  margin: 0;
  font-size: 1.45rem;
  line-height: 1.25;
  letter-spacing: -0.02em;
}

.blog-featured p,
.blog-card p {
  margin: 0;
  color: var(--hub-muted);
  font-size: 15px;
  line-height: 1.55;
}

.blog-read {
  margin-top: auto;
  color: #c4b5fd;
  font-weight: 600;
  font-size: 14px;
}

.blog-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: flex-end;
  justify-content: space-between;
  margin: 8px 0 28px;
}

.blog-search {
  position: relative;
  flex: 1 1 280px;
  max-width: 420px;
}

.blog-search label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--hub-muted);
  margin-bottom: 6px;
}

.blog-search input {
  width: 100%;
  height: 44px;
  padding: 0 40px 0 14px;
  border-radius: 10px;
  border: 1px solid var(--hub-border);
  background: var(--hub-surface);
  color: var(--hub-text);
  font: inherit;
  font-size: 15px;
}

.blog-search input:focus {
  outline: 2px solid var(--hub-accent);
  outline-offset: 2px;
}

.blog-search-clear {
  position: absolute;
  right: 8px;
  bottom: 8px;
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--hub-muted);
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
}

.blog-search-clear:focus-visible {
  outline: 2px solid var(--hub-accent);
}

.blog-topics {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.blog-topic {
  height: 36px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid var(--hub-border);
  background: transparent;
  color: var(--hub-muted);
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.blog-topic.is-active,
.blog-topic[aria-pressed="true"] {
  background: rgba(99, 102, 241, 0.18);
  border-color: rgba(139, 92, 246, 0.55);
  color: #fff;
}

.blog-topic:focus-visible {
  outline: 2px solid var(--hub-accent);
  outline-offset: 2px;
}

.blog-section {
  margin: 8px 0 48px;
}

.blog-section h2 {
  margin: 0 0 8px;
  font-size: 1.5rem;
  letter-spacing: -0.02em;
}

.blog-section > p {
  margin: 0 0 22px;
  color: var(--hub-muted);
  max-width: 42rem;
}

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

.blog-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 100%;
  padding: 20px;
  background: var(--hub-surface);
  border: 1px solid var(--hub-border);
  border-radius: 14px;
  text-decoration: none;
  color: inherit;
}

.blog-card h3 {
  margin: 0;
  font-size: 1.05rem;
  line-height: 1.35;
  letter-spacing: -0.015em;
}

.blog-card:hover {
  border-color: rgba(139, 92, 246, 0.4);
}

.blog-empty {
  display: none;
  padding: 28px;
  border: 1px dashed var(--hub-border);
  border-radius: 14px;
  color: var(--hub-muted);
  text-align: center;
}

.blog-empty.is-visible {
  display: block;
}

.blog-card.is-hidden,
.blog-featured.is-hidden,
.blog-section.is-empty {
  display: none;
}

.blog-count {
  margin: 0 0 16px;
  font-size: 13px;
  color: var(--hub-muted);
}

.seo-hub-blog .feat-final,
.seo-article-editorial .feat-final {
  margin-top: 24px;
  padding: 36px 28px;
  text-align: center;
  background: var(--hub-surface);
  border: 1px solid var(--hub-border);
  border-radius: 16px;
}

.seo-hub-blog .feat-final h2,
.seo-article-editorial .feat-final h2 {
  margin: 0 0 10px;
}

.seo-hub-blog .feat-final p,
.seo-article-editorial .feat-final p {
  margin: 0 auto 20px;
  max-width: 36rem;
  color: var(--hub-muted);
}

/* Article reading */

.seo-article-editorial .seo-article {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 220px;
  gap: 40px;
  align-items: start;
  max-width: 960px;
  margin: 0 auto;
}

.seo-article-editorial .seo-article-header,
.seo-article-editorial .seo-section,
.seo-article-editorial .seo-faq,
.seo-article-editorial .seo-contextual-links,
.seo-article-editorial .feat-final,
.seo-article-editorial .blog-related {
  grid-column: 1;
}

.seo-article-editorial .seo-breadcrumbs {
  max-width: 960px;
  margin: 0 auto 20px;
  color: var(--hub-muted);
  font-size: 13px;
}

.seo-article-editorial .seo-breadcrumbs a {
  color: #c4b5fd;
}

.seo-article-editorial .blog-back {
  display: inline-flex;
  margin-bottom: 16px;
  color: #c4b5fd;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
}

.seo-article-editorial h1 {
  font-size: clamp(1.85rem, 3.4vw, 2.6rem);
  line-height: 1.18;
  letter-spacing: -0.03em;
  margin: 0 0 14px;
  max-width: 20ch;
}

.seo-article-editorial .seo-intro {
  font-size: 1.05rem;
  line-height: 1.65;
  color: #cbd5e1;
  max-width: var(--blog-measure);
}

.seo-article-editorial .seo-author {
  display: flex;
  gap: 12px;
  align-items: center;
  margin: 0 0 16px;
  padding: 0;
  background: none;
  border: 0;
}

.seo-article-editorial .seo-author-avatar {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  font-size: 12px;
}

.seo-article-editorial .seo-author-name,
.seo-article-editorial .seo-author-meta,
.seo-article-editorial .blog-freshness {
  font-size: 13px;
  color: var(--hub-muted);
}

.seo-article-editorial .blog-freshness {
  margin: 0 0 20px;
  padding: 0;
  background: none;
  border: 0;
}

.seo-article-editorial .blog-freshness p {
  margin: 0;
}

.seo-article-editorial .seo-section {
  max-width: var(--blog-measure);
  margin: 0 0 28px;
}

.seo-article-editorial .seo-section h2 {
  font-size: 1.25rem;
  margin: 0 0 10px;
  letter-spacing: -0.02em;
  scroll-margin-top: 88px;
}

.seo-article-editorial .seo-section p,
.seo-article-editorial .seo-section li {
  font-size: 16.5px;
  line-height: 1.7;
  color: #e2e8f0;
}

.seo-article-editorial .seo-screenshot {
  margin: 12px 0 28px;
  border: 1px solid var(--hub-border);
  border-radius: 12px;
  overflow: hidden;
  background: var(--hub-surface);
}

.seo-article-editorial .seo-screenshot img {
  width: 100%;
  height: auto;
}

.blog-toc {
  grid-column: 2;
  grid-row: 1 / span 8;
  position: sticky;
  top: 88px;
  align-self: start;
  padding: 0 0 0 8px;
}

.blog-toc-label {
  margin: 0 0 8px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--hub-muted);
}

.blog-toc ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

.blog-toc a {
  display: block;
  padding: 6px 0;
  color: var(--hub-muted);
  font-size: 13px;
  line-height: 1.4;
  text-decoration: none;
  border-left: 2px solid transparent;
  padding-left: 10px;
}

.blog-toc a.is-active,
.blog-toc a:hover {
  color: #fff;
  border-left-color: var(--hub-accent);
}

.blog-toc a:focus-visible {
  outline: 2px solid var(--hub-accent);
  outline-offset: 2px;
}

.blog-related {
  margin: 12px 0 32px;
}

.blog-related h2 {
  font-size: 1.2rem;
  margin: 0 0 14px;
}

.blog-related-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.seo-article-editorial .seo-cta-sticky,
.seo-article-editorial .seo-trust {
  display: none;
}

.seo-article-editorial .blog-article-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 8px 0 8px;
}

.seo-article-editorial .seo-faq,
.seo-article-editorial .seo-contextual-links {
  max-width: var(--blog-measure);
  margin: 0 0 28px;
}

.seo-article-editorial .seo-faq h2,
.seo-article-editorial .seo-contextual-links h2,
.seo-article-editorial .seo-section:has(.seo-screenshot) h2 {
  font-size: 1.2rem;
}

.seo-article-editorial .seo-faq details {
  border: 1px solid var(--hub-border);
  border-radius: 10px;
  margin-bottom: 8px;
  background: var(--hub-surface);
}

.seo-article-editorial .seo-faq summary {
  cursor: pointer;
  padding: 12px 14px;
  font-weight: 600;
}

.seo-article-editorial .seo-faq details p {
  margin: 0;
  padding: 0 14px 14px;
  color: var(--hub-muted);
}

.seo-article-editorial .seo-related {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.seo-article-editorial .seo-related a {
  display: inline-flex;
  padding: 8px 12px;
  border-radius: 10px;
  border: 1px solid var(--hub-border);
  color: #e2e8f0;
  text-decoration: none;
  font-size: 13px;
}

@media (max-width: 980px) {
  .seo-hub-blog .hub-hero {
    grid-template-columns: 1fr;
  }

  .seo-hub-blog .hub-hero h1 {
    max-width: none;
  }

  .blog-grid,
  .blog-related-grid {
    grid-template-columns: 1fr 1fr;
  }

  .seo-article-editorial .seo-article {
    grid-template-columns: 1fr;
  }

  .blog-toc {
    position: static;
    grid-column: 1;
    grid-row: auto;
    margin: 0 0 24px;
    padding: 0;
  }

  .blog-toc ol {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 6px;
  }

  .blog-toc a {
    white-space: nowrap;
    border: 1px solid var(--hub-border);
    border-radius: 999px;
    padding: 6px 12px;
  }
}

@media (max-width: 680px) {
  .blog-grid,
  .blog-related-grid {
    grid-template-columns: 1fr;
  }

  .blog-featured-shot img {
    height: 160px;
  }

  .seo-article-editorial h1 {
    max-width: none;
  }

  .seo-article-editorial .seo-section,
  .seo-article-editorial .seo-section table {
    max-width: 100%;
  }

  .seo-article-editorial table {
    display: block;
    overflow-x: auto;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hub-btn,
  .blog-card,
  .blog-featured {
    transition: none;
  }

  html:has(.seo-hub-blog),
  html:has(.seo-article-editorial) {
    scroll-behavior: auto;
  }
}
