:root {
  --bg: #f5f7fb;
  --dark: #0f172a;
  --text: #334155;
  --muted: #64748b;
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --card: #ffffff;
  --border: #e2e8f0;
  --soft: #eff6ff;
  --shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
  --shadow-card: 0 4px 14px rgba(15, 23, 42, 0.07);
  --radius: 10px;
  --radius-lg: 14px;
  --max-site: 1120px;
  --max-read: 680px;
}

* {
  box-sizing: border-box;
}

body.seo-app {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
}

a {
  color: inherit;
  text-decoration: none;
}

.container,
.seo-container {
  width: min(var(--max-site), 92%);
  margin: 0 auto;
}

/* Header site */
.seo-header {
  background: #ffffffcc;
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 10;
}

.seo-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 0;
  gap: 16px;
  flex-wrap: wrap;
}

.seo-brand img {
  height: 40px;
  width: auto;
  display: block;
}

.seo-nav-links {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.seo-nav-link {
  color: var(--muted);
  font-weight: 600;
  font-size: 14px;
}

.seo-nav-link:hover {
  color: var(--dark);
}

.btn {
  display: inline-block;
  padding: 10px 16px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 14px;
  transition: 0.2s ease;
  border: none;
  cursor: pointer;
}

.btn-sm {
  padding: 8px 14px;
  font-size: 13px;
}

.btn-primary {
  background: var(--primary);
  color: #fff;
}

.btn-primary:hover {
  background: var(--primary-dark);
}

.btn-outline {
  border: 1px solid var(--border);
  background: #fff;
  color: var(--dark);
}

/* Shell / main */
.seo-shell .seo-main {
  padding: 32px 0 64px;
}

/* Breadcrumbs */
.seo-breadcrumbs,
.seo-breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  margin: 0 0 18px;
  font-size: 13px;
  color: var(--muted);
  font-weight: 500;
}

.seo-breadcrumbs a,
.seo-breadcrumb a {
  color: var(--muted);
}

.seo-breadcrumbs a:hover,
.seo-breadcrumb a:hover {
  color: var(--primary);
}

.seo-breadcrumb-sep {
  margin: 0 6px;
  color: #94a3b8;
}

.seo-breadcrumb span:not(.seo-breadcrumb-sep) {
  margin: 0;
}

/* Hub index */
.hub-hero {
  margin-bottom: 32px;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--border);
}

.seo-kicker {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--primary);
  margin: 0 0 10px;
}

.hub-hero h1,
.article-hero-title {
  color: var(--dark);
  font-size: clamp(1.85rem, 4vw, 2.5rem);
  line-height: 1.15;
  margin: 0 0 14px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.hub-hero-lead,
.article-hero-dek {
  font-size: 1.05rem;
  color: var(--muted);
  margin: 0;
  max-width: 62ch;
  line-height: 1.65;
}

.hub-hero-count {
  margin: 14px 0 0;
  font-size: 14px;
  color: var(--muted);
  font-weight: 600;
}

.resource-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
  margin-bottom: 32px;
}

.resource-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 0 0 18px;
  overflow: hidden;
  box-shadow: var(--shadow-card);
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
}

.resource-card:hover {
  border-color: #cbd5e1;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.08);
  transform: translateY(-2px);
}

.resource-card-cap {
  display: block;
  height: 6px;
  background: linear-gradient(90deg, var(--primary), #60a5fa);
}

.resource-card--hub .resource-card-cap {
  height: 72px;
  background: linear-gradient(145deg, #dbeafe 0%, #bfdbfe 100%);
}

.resource-card-badge {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--primary);
  padding: 0 18px;
}

.resource-card-title {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--dark);
  line-height: 1.35;
  padding: 0 18px;
  margin: 0;
}

.resource-card-excerpt {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.55;
  padding: 0 18px;
  margin: 0;
  flex: 1;
}

.resource-card-meta {
  font-size: 13px;
  color: var(--muted);
  padding: 0 18px;
}

/* Article hero */
.article-hero {
  margin-bottom: 36px;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--border);
  max-width: var(--max-read);
}

.article-hero-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 16px;
}

.article-hero-cta {
  margin: 20px 0 0;
}

.article-intro {
  font-size: 1.05rem;
  color: var(--muted);
  line-height: 1.7;
  margin: 0 0 28px;
  max-width: var(--max-read);
}

/* Two-column layout: sidebar left, content right */
.article-layout {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  grid-template-areas: 'sidebar main';
  gap: 40px 48px;
  align-items: start;
}

.article-layout--solo {
  grid-template-columns: 1fr;
  grid-template-areas: 'main';
}

.article-sidebar {
  grid-area: sidebar;
  min-width: 0;
}

.article-content {
  grid-area: main;
  min-width: 0;
  max-width: var(--max-read);
}

@media (min-width: 1025px) {
  .article-layout:not(.article-layout--solo) .article-sidebar {
    position: sticky;
    top: 76px;
    align-self: start;
    max-height: calc(100vh - 88px);
    overflow-y: auto;
  }
}

.article-toc {
  padding: 18px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--card);
  box-shadow: var(--shadow);
}

.article-toc-heading {
  margin: 0 0 14px;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
}

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

.article-toc-list li {
  margin-bottom: 10px;
}

.article-toc-list li:last-child {
  margin-bottom: 0;
}

.article-toc-list a {
  display: block;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.4;
  color: var(--text);
}

.article-toc-list a:hover {
  color: var(--primary);
}

/* Prose */
.seo-prose-section {
  margin: 0 0 28px;
  padding: 0 0 24px;
  border-bottom: 1px solid var(--border);
}

.seo-prose-section:last-of-type {
  border-bottom: none;
}

.seo-prose-section h2,
.seo-faq > h2,
.seo-related > h2 {
  color: var(--dark);
  font-size: 1.35rem;
  font-weight: 800;
  margin: 0 0 14px;
  line-height: 1.3;
  scroll-margin-top: 88px;
}

.seo-prose-section p {
  margin: 0 0 14px;
  font-size: 16px;
  line-height: 1.75;
}

.seo-prose-list {
  margin: 0 0 16px;
  padding-left: 1.25rem;
  font-size: 16px;
  line-height: 1.7;
}

.seo-prose-list li {
  margin-bottom: 8px;
}

.seo-prose-list--ordered {
  list-style: decimal;
}

.seo-checklist {
  list-style: none;
  margin: 0 0 16px;
  padding: 0;
}

.seo-checklist li {
  display: flex;
  gap: 10px;
  margin-bottom: 10px;
  font-size: 16px;
}

.seo-check-mark {
  color: var(--primary);
  font-weight: 700;
  flex-shrink: 0;
}

/* Cards grid */
.content-card-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin: 20px 0;
}

.content-card-grid--compare {
  gap: 18px;
}

.content-card {
  padding: 18px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--card);
  box-shadow: var(--shadow);
}

.content-card h3 {
  margin: 0 0 8px;
  font-size: 15px;
  font-weight: 800;
  color: var(--dark);
}

.content-card p {
  margin: 0;
  font-size: 14px;
  line-height: 1.55;
  color: var(--muted);
}

/* Callouts */
.seo-callout {
  margin: 20px 0;
  padding: 18px 20px;
  border-radius: var(--radius-lg);
  border: 1px solid #bfdbfe;
  background: linear-gradient(180deg, var(--soft) 0%, #f8fafc 100%);
  box-shadow: var(--shadow);
}

.seo-callout-title {
  margin: 0 0 8px;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--primary-dark);
}

.seo-callout-body {
  margin: 0;
  font-size: 15px;
  line-height: 1.65;
  color: var(--text);
}

.seo-callout--warn {
  border-color: #fde68a;
  background: linear-gradient(180deg, #fffbeb 0%, #fff7ed 100%);
}

.seo-callout--warn .seo-callout-title {
  color: #92400e;
}

.seo-callout--tip {
  border-color: #c7d2fe;
  background: linear-gradient(180deg, #eef2ff 0%, #f8fafc 100%);
}

.seo-callout--takeaways {
  border-color: var(--border);
  background: var(--card);
}

.seo-callout--takeaways .seo-callout-title {
  font-size: 1.2rem;
  text-transform: none;
  letter-spacing: -0.02em;
  color: var(--dark);
}

.seo-takeaways-list {
  margin: 0;
  padding-left: 1.15rem;
  font-size: 15px;
  line-height: 1.65;
  color: var(--muted);
}

.seo-quote {
  margin: 20px 0;
  padding: 16px 18px;
  border-left: 4px solid var(--primary);
  background: var(--soft);
  border-radius: 0 var(--radius) var(--radius) 0;
}

.seo-quote p {
  margin: 0;
  font-style: italic;
  color: #1e3a5f;
}

/* FAQ */
.seo-faq {
  margin: 36px 0 0;
  padding-top: 28px;
  border-top: 1px solid var(--border);
}

.seo-faq-list {
  margin: 0;
  padding: 0;
}

.seo-faq-item {
  padding: 18px 0;
  border-bottom: 1px solid var(--border);
}

.seo-faq-item:last-child {
  border-bottom: 0;
}

.seo-faq-q {
  margin: 0 0 8px;
  font-size: 16px;
  font-weight: 800;
  color: var(--dark);
}

.seo-faq-a {
  margin: 0;
  font-size: 15px;
  color: var(--muted);
  line-height: 1.6;
}

/* Disclaimer */
.seo-disclaimer {
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: var(--radius);
  padding: 14px 16px;
  font-size: 14px;
  color: #78350f;
  margin: 28px 0;
}

/* CTA banner */
.seo-cta,
.hub-cta {
  margin: 36px 0 0;
}

.seo-cta-inner {
  padding: 28px 24px;
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, var(--primary-dark), var(--primary));
  color: #fff;
  box-shadow: var(--shadow-card);
}

.seo-cta-inner h2 {
  margin: 0 0 10px;
  font-size: clamp(1.15rem, 2.5vw, 1.4rem);
  font-weight: 800;
  color: #fff;
}

.seo-cta-inner p {
  margin: 0 0 18px;
  max-width: 52ch;
  font-size: 15px;
  line-height: 1.55;
  opacity: 0.95;
}

.seo-cta-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.btn-cta-primary {
  background: #fff;
  color: var(--primary-dark);
  padding: 12px 20px;
}

.btn-cta-primary:hover {
  background: #f1f5f9;
}

.btn-cta-secondary {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.7);
  padding: 12px 18px;
}

.btn-cta-secondary:hover {
  background: rgba(255, 255, 255, 0.18);
}

/* Related */
.seo-related {
  margin: 40px 0 0;
  padding-top: 32px;
  border-top: 1px solid var(--border);
  max-width: none;
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
}

.seo-related .resource-card {
  padding-bottom: 16px;
}

.seo-related .resource-card-cap {
  height: 56px;
}

/* Footer */
.seo-footer {
  background: var(--dark);
  color: #cbd5e1;
  padding: 28px 0;
  font-size: 14px;
}

.seo-footer-inner p {
  margin: 0 0 8px;
}

.seo-footer a {
  color: #93c5fd;
}

.seo-404 {
  text-align: center;
  padding: 48px 0;
}

.seo-404 h1 {
  color: var(--dark);
}

/* Responsive */
@media (max-width: 1024px) {
  .resource-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .article-layout {
    grid-template-columns: 1fr;
    grid-template-areas:
      'sidebar'
      'main';
    gap: 24px;
  }

  .article-content {
    max-width: none;
  }

  .article-sidebar {
    max-width: 100%;
  }
}

@media (max-width: 768px) {
  .resource-grid,
  .content-card-grid,
  .related-grid {
    grid-template-columns: 1fr;
  }

  .seo-nav {
    flex-direction: column;
    align-items: flex-start;
  }

  .seo-nav-links {
    width: 100%;
  }

  .article-hero {
    max-width: none;
  }
}

@media (max-width: 640px) {
  .resource-grid {
    grid-template-columns: 1fr;
  }
}
