:root {
  color-scheme: light;
  --ink: #111827;
  --muted: #667085;
  --soft: #f8fafc;
  --line: #e5e7eb;
  --brand: #2563eb;
  --brand-dark: #1e40af;
  --panel: #ffffff;
  --shadow: 0 24px 70px rgba(15, 23, 42, 0.08);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: "Plus Jakarta Sans", Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(37, 99, 235, 0.08), transparent 32rem),
    linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
}

a { color: inherit; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.blog-header,
.blog-footer,
.blog-hero,
.blog-layout,
.article-shell {
  width: min(1120px, calc(100% - 2rem));
  margin-inline: auto;
}

.blog-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.1rem 0;
}

.blog-brand,
.blog-nav,
.blog-footer,
.article-card,
.empty-card,
.blog-sidebar section,
.toc-card,
.article-cta,
.faq-section,
.related-articles__grid a {
  border: 1px solid rgba(229, 231, 235, 0.9);
  background: rgba(255, 255, 255, 0.82);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
}

.blog-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.55rem 0.75rem;
  border-radius: 999px;
  text-decoration: none;
}

.blog-brand__mark {
  display: grid;
  place-items: center;
  width: 2.1rem;
  height: 2.1rem;
  border-radius: 0.75rem;
  background: #101828;
  color: #ffffff;
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: -0.04em;
}

.blog-brand small {
  display: block;
  color: var(--muted);
  font-size: 0.78rem;
}

.blog-nav {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  border-radius: 999px;
  padding: 0.45rem;
}

.blog-nav a,
.blog-search button,
.article-hero__cta,
.article-cta a,
.sidebar-cta a,
.blog-footer a,
.pagination a {
  border-radius: 999px;
  text-decoration: none;
  font-weight: 700;
}

.blog-nav a {
  padding: 0.55rem 0.8rem;
  color: #344054;
  font-size: 0.94rem;
}

.blog-nav__cta,
.article-hero__cta,
.article-cta a,
.sidebar-cta a,
.blog-footer a,
.blog-search button {
  color: #ffffff !important;
  background: linear-gradient(135deg, var(--brand), var(--brand-dark));
}

.blog-hero {
  padding: clamp(2.5rem, 8vw, 5.75rem) 0 clamp(1.75rem, 4vw, 3rem);
}

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  align-items: center;
  color: var(--muted);
  font-size: 0.9rem;
  margin-bottom: 1rem;
}

.breadcrumbs a {
  color: #344054;
  text-decoration: none;
}

.blog-eyebrow {
  margin: 0 0 0.75rem;
  color: var(--brand);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.78rem;
}

.blog-hero h1,
.article-hero h1 {
  margin: 0;
  max-width: 820px;
  font-size: clamp(2.35rem, 7vw, 5rem);
  line-height: 0.96;
  letter-spacing: -0.065em;
}

.blog-hero p,
.article-hero p {
  max-width: 720px;
  color: var(--muted);
  font-size: clamp(1rem, 2vw, 1.22rem);
  line-height: 1.7;
}

.blog-search {
  display: flex;
  width: min(680px, 100%);
  gap: 0.65rem;
  margin-top: 1.5rem;
  padding: 0.45rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #ffffff;
}

.blog-search input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  padding: 0.85rem 1rem;
  font: inherit;
  background: transparent;
}

.blog-search button {
  border: 0;
  padding: 0.85rem 1.2rem;
  cursor: pointer;
}

.blog-layout,
.article-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 290px;
  gap: 1.25rem;
  align-items: start;
  padding-bottom: 3rem;
}

.article-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.article-card,
.empty-card,
.blog-sidebar section,
.toc-card,
.article-cta,
.faq-section {
  border-radius: 1.5rem;
  padding: 1.25rem;
}

.article-card h2 {
  margin: 0.8rem 0 0.65rem;
  font-size: 1.35rem;
  line-height: 1.18;
  letter-spacing: -0.03em;
}

.article-card h2 a,
.article-card__meta a,
.article-card__tags a,
.tag-cloud a,
.article-tags a {
  text-decoration: none;
}

.article-card p,
.empty-card p,
.blog-sidebar p {
  color: var(--muted);
  line-height: 1.65;
}

.article-card__meta,
.article-card__tags,
.article-hero__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  color: var(--muted);
  font-size: 0.88rem;
}

.article-card__meta a,
.article-hero__meta a {
  color: var(--brand);
  font-weight: 800;
}

.article-card__tags,
.tag-cloud,
.article-tags {
  gap: 0.45rem;
}

.article-card__tags a,
.tag-cloud a,
.article-tags a {
  display: inline-flex;
  padding: 0.35rem 0.6rem;
  border-radius: 999px;
  background: #eef4ff;
  color: #1d4ed8;
  font-size: 0.82rem;
  font-weight: 700;
}

.blog-sidebar {
  display: grid;
  gap: 1rem;
  position: sticky;
  top: 1rem;
}

.blog-sidebar h2,
.toc-card h2 {
  margin: 0 0 0.8rem;
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #475467;
}

.blog-sidebar ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.blog-sidebar li {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.55rem 0;
  color: var(--muted);
}

.blog-sidebar li a {
  color: var(--ink);
  text-decoration: none;
  font-weight: 700;
}

.sidebar-cta a {
  display: inline-flex;
  padding: 0.8rem 1rem;
}

.pagination {
  grid-column: 1 / -1;
  display: flex;
  justify-content: center;
  gap: 0.75rem;
  align-items: center;
  padding: 1rem;
}

.pagination a {
  padding: 0.65rem 0.9rem;
  background: #ffffff;
  border: 1px solid var(--line);
}

.article-shell {
  padding: 2rem 0 3rem;
}

.article-hero {
  padding: clamp(1rem, 4vw, 3rem) 0;
}

.article-hero__meta {
  margin-bottom: 1rem;
}

.article-hero__cta {
  display: inline-flex;
  margin-top: 0.75rem;
  padding: 0.9rem 1.15rem;
}

.article-layout {
  grid-template-columns: 250px minmax(0, 760px);
  justify-content: center;
}

.toc-card {
  position: sticky;
  top: 1rem;
}

.toc-card ol {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0.55rem;
}

.toc-card a {
  color: #344054;
  text-decoration: none;
  font-size: 0.92rem;
}

.toc-card__item--h3 {
  padding-left: 0.85rem;
}

.article-content-wrap {
  min-width: 0;
}

.article-content {
  padding: clamp(1.2rem, 4vw, 2.2rem);
  border-radius: 1.75rem;
  background: #ffffff;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.article-content h2,
.article-content h3,
.article-content h4 {
  margin: 2rem 0 0.75rem;
  line-height: 1.14;
  letter-spacing: -0.035em;
}

.article-content h2 { font-size: 1.85rem; }
.article-content h3 { font-size: 1.35rem; }

.article-content p,
.article-content li,
.faq-section p {
  color: #344054;
  line-height: 1.78;
  font-size: 1.02rem;
}

.article-content a {
  color: var(--brand-dark);
  font-weight: 700;
}

.article-content blockquote {
  margin: 1.5rem 0;
  padding: 1rem 1.2rem;
  border-left: 4px solid var(--brand);
  border-radius: 1rem;
  background: #f5f8ff;
  color: #1d2939;
}

.article-content code {
  border-radius: 0.45rem;
  background: #eef2ff;
  padding: 0.12rem 0.3rem;
}

.article-content pre {
  overflow: auto;
  border-radius: 1rem;
  background: #101828;
  color: #e2e8f0;
  padding: 1rem;
}

.article-content pre code {
  background: transparent;
  padding: 0;
  color: inherit;
}

.article-cta,
.faq-section,
.related-articles,
.article-tags,
.article-prev-next {
  margin-top: 1rem;
}

.article-cta {
  background: linear-gradient(135deg, #eff6ff, #ffffff);
}

.article-cta h2,
.related-articles h2,
.faq-section h2 {
  margin: 0 0 0.65rem;
  letter-spacing: -0.04em;
}

.article-cta p {
  color: var(--muted);
  line-height: 1.7;
}

.article-cta a {
  display: inline-flex;
  padding: 0.85rem 1rem;
}

.faq-section details {
  border-top: 1px solid var(--line);
  padding: 0.9rem 0;
}

.faq-section summary {
  cursor: pointer;
  font-weight: 800;
}

.article-tags {
  display: flex;
  flex-wrap: wrap;
}

.article-prev-next {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.article-prev-next a,
.related-articles__grid a {
  display: grid;
  gap: 0.3rem;
  padding: 1rem;
  border-radius: 1.25rem;
  text-decoration: none;
  background: #ffffff;
  border: 1px solid var(--line);
}

.article-prev-next span,
.related-articles__grid span,
.related-articles__grid small {
  color: var(--muted);
}

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

.blog-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  border-radius: 1.5rem 1.5rem 0 0;
  padding: 1.25rem;
}

.blog-footer p {
  margin: 0.3rem 0 0;
  color: var(--muted);
}

.blog-footer a {
  white-space: nowrap;
  padding: 0.85rem 1rem;
}

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

  .blog-sidebar,
  .toc-card {
    position: static;
  }

  .toc-card {
    order: -1;
  }
}

@media (max-width: 640px) {
  .blog-header,
  .blog-footer,
  .blog-search,
  .article-prev-next {
    align-items: stretch;
    flex-direction: column;
  }

  .blog-nav {
    width: 100%;
    overflow-x: auto;
    justify-content: space-between;
  }

  .blog-search {
    border-radius: 1.25rem;
  }

  .blog-search button {
    width: 100%;
  }

  .article-prev-next {
    display: flex;
  }
}
