/**
 * Resources hub + article pages (brand v3).
 * Typography from design-tokens.css — no local font overrides.
 */

@keyframes pp-resources-slide-in {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.pp-resources-page {
  font-family: var(--pp-font-longform);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.pp-resources-page h1,
.pp-resources-page h2,
.pp-resources-page h3,
.pp-resources-page h4,
.pp-resources-page h5,
.pp-resources-page h6 {
  letter-spacing: -0.01em;
}

.pp-resources-page .animate-slide {
  animation: pp-resources-slide-in 0.5s ease-in-out forwards;
  opacity: 0;
}

.pp-resources-page #bg-animation {
  position: relative;
  overflow: hidden;
  background: var(--pp-bg);
}

.pp-resources-page .timeline-icon-box {
  width: 3rem;
  min-width: 3rem;
  height: 3rem;
  min-height: 3rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  align-self: center;
  background: var(--pp-neutral-50);
  border: 1px solid var(--pp-border);
  border-radius: var(--pp-radius-lg);
}

.pp-resources-page .pp-resources-icon {
  color: var(--pp-primary-500);
}

.pp-resources-page .topic-chip {
  border: 1px solid var(--pp-border);
  color: var(--pp-text-secondary);
  background: color-mix(in srgb, var(--pp-surface) 92%, transparent);
  border-radius: var(--pp-radius-lg);
}

.pp-resources-page .topic-chip.is-active {
  background: var(--pp-primary-500);
  color: #ffffff;
  border-color: transparent;
  box-shadow: 0 4px 12px rgba(24, 127, 232, 0.18);
}

.pp-resources-page .article-card {
  background: color-mix(in srgb, var(--pp-surface) 94%, transparent);
  border: 1px solid var(--pp-border);
}

.pp-resources-page .resource-accent-text {
  color: var(--pp-link);
}

.pp-resources-page .resource-chip-soft,
.pp-resources-page .resource-chip-muted,
.pp-resources-page .resource-chip-featured {
  border-radius: var(--pp-radius-lg);
}

.pp-resources-page .resource-chip-soft {
  background: color-mix(in srgb, var(--pp-primary-500) 14%, var(--pp-surface));
  color: var(--pp-link);
  border: 1px solid color-mix(in srgb, var(--pp-primary-500) 24%, var(--pp-border));
}

.pp-resources-page .resource-chip-muted {
  background: color-mix(in srgb, var(--pp-surface) 88%, transparent);
  color: var(--pp-text-secondary);
  border: 1px solid var(--pp-border);
}

.pp-resources-page .resource-chip-featured {
  background: var(--pp-primary-500);
  color: #ffffff;
}

.pp-resources-page .resource-strip-soft {
  background: color-mix(in srgb, var(--pp-primary-500) 10%, var(--pp-surface));
}

.pp-resources-page .resource-card-muted {
  background: color-mix(in srgb, var(--pp-surface) 72%, var(--pp-neutral-50));
}

.pp-resources-page .resource-card-ghost {
  background: color-mix(in srgb, var(--pp-surface) 84%, transparent);
  border: 1px solid var(--pp-border);
}

.pp-resources-page .resource-link-soft {
  color: var(--pp-link);
}

.pp-resources-page .resource-link-soft:hover {
  color: var(--pp-link-hover, var(--pp-link));
}

.pp-resources-page .featured-resource-card {
  min-height: 19rem;
}

.pp-resources-page .foundations-card {
  align-items: flex-start;
}

.pp-resources-page .pp-resource-article-shell {
  border-radius: var(--pp-radius-xl);
}

/* Article rich content — calm reading column (body only; header stays full-bleed) */
.pp-resources-page .article-rich-content,
.pp-resources-page .article-share-bar {
  /* Match header description width (~max-w-3xl) for a guide-like measure */
  max-width: 48rem;
  width: 100%;
}

.pp-resources-page .article-rich-content {
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--pp-text);
}

.pp-resources-page .article-rich-content > :first-child {
  margin-top: 0;
}

.pp-resources-page .article-rich-content h1,
.pp-resources-page .article-rich-content h2,
.pp-resources-page .article-rich-content h3,
.pp-resources-page .article-rich-content h4 {
  color: var(--pp-text);
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.01em;
}

/* Prefer guide-scale headings over marketing “blog H2” sizes.
   :where() keeps specificity manageable; explicit .text-* overrides beat Tailwind utilities from markdown import. */
.pp-resources-page .article-rich-content h1,
.pp-resources-page .article-rich-content h1.text-3xl,
.pp-resources-page .article-rich-content h1.text-2xl {
  font-size: 1.5rem;
  margin: 2rem 0 0.7rem;
}

.pp-resources-page .article-rich-content h2,
.pp-resources-page .article-rich-content h2.text-3xl,
.pp-resources-page .article-rich-content h2.text-2xl {
  font-size: 1.3125rem;
  margin: 2rem 0 0.65rem;
}

.pp-resources-page .article-rich-content h3,
.pp-resources-page .article-rich-content h3.text-2xl,
.pp-resources-page .article-rich-content h3.text-xl {
  font-size: 1.125rem;
  margin: 1.6rem 0 0.5rem;
}

.pp-resources-page .article-rich-content h4 {
  font-size: 1.0625rem;
  margin: 1.35rem 0 0.4rem;
}

.pp-resources-page .article-rich-content p,
.pp-resources-page .article-rich-content p.leading-relaxed,
.pp-resources-page .article-rich-content p.mb-6 {
  margin: 0 0 1.05em;
  color: var(--pp-text);
}

.pp-resources-page .article-rich-content p:empty {
  margin: 0;
}

.pp-resources-page .article-rich-content p.text-slate-700,
.pp-resources-page .article-rich-content h2.text-slate-900,
.pp-resources-page .article-rich-content h3.text-slate-900 {
  color: var(--pp-text);
}

.pp-resources-page .article-rich-content blockquote {
  border-left: 3px solid var(--pp-border);
  border-left-color: color-mix(in srgb, var(--pp-primary-500) 55%, var(--pp-border));
  padding: 0.1rem 0 0.1rem 1.1rem;
  margin: 1.35rem 0;
  font-style: normal;
  color: var(--pp-text-secondary);
  background: transparent;
  border-radius: 0;
}

.pp-resources-page .article-rich-content blockquote p {
  margin-bottom: 0.65em;
}

.pp-resources-page .article-rich-content blockquote p:last-child {
  margin-bottom: 0;
}

.pp-resources-page .article-rich-content a {
  color: var(--pp-link);
  text-decoration: underline;
  text-underline-offset: 0.15em;
}

.pp-resources-page .article-rich-content a:hover {
  color: var(--pp-link-hover, var(--pp-link));
}

.pp-resources-page .article-rich-content strong {
  font-weight: 600;
  color: var(--pp-text);
}

.pp-resources-page .article-rich-content .ql-align-center { text-align: center; }
.pp-resources-page .article-rich-content .ql-align-right { text-align: right; }
.pp-resources-page .article-rich-content .ql-align-justify { text-align: justify; }

.pp-resources-page .article-rich-content ul {
  list-style: disc;
  margin: 0 0 1.05em 1.25rem;
  padding-left: 0.35rem;
}

.pp-resources-page .article-rich-content ol {
  list-style: decimal;
  margin: 0 0 1.05em 1.25rem;
  padding-left: 0.35rem;
}

.pp-resources-page .article-rich-content li {
  margin: 0.35rem 0;
  padding-left: 0.15rem;
}

.pp-resources-page .article-rich-content li > p {
  margin-bottom: 0.4em;
}

.pp-resources-page .article-rich-content .blog-image-grid {
  display: grid;
  gap: 1rem;
  margin: 2rem 0 1rem;
}

.pp-resources-page .article-rich-content .blog-image-grid--grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.pp-resources-page .article-rich-content .blog-image-grid--row {
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
}

.pp-resources-page .article-rich-content .blog-image-grid--stack {
  grid-template-columns: 1fr;
}

.pp-resources-page .article-rich-content .blog-image-grid__item {
  overflow: hidden;
  border-radius: var(--pp-radius-xl);
  background: color-mix(in srgb, var(--pp-surface) 84%, transparent);
  border: 1px solid var(--pp-border);
}

.pp-resources-page .article-rich-content .blog-image-grid__image {
  width: 100%;
  display: block;
  object-fit: cover;
}

.pp-resources-page .article-rich-content .blog-image-grid__caption {
  margin: -0.25rem 0 1rem;
  color: var(--pp-text-muted);
  font-size: 0.875rem;
}

.pp-resources-page .resource-back-link {
  color: var(--pp-link);
}

.pp-resources-page .resource-back-link:hover {
  color: var(--pp-link-hover, var(--pp-link));
}

.pp-resources-page .resource-article-views {
  flex-shrink: 0;
  white-space: nowrap;
  opacity: 0.72;
  font-weight: 400;
  letter-spacing: 0.01em;
}

.pp-resources-page .resource-article-views .tabular-nums {
  margin-right: 0.3em;
}

.pp-resources-page .resource-article-views--on-media {
  opacity: 0.78;
  color: rgba(255, 255, 255, 0.82);
}

.pp-resources-page .resource-meta-dot {
  background: var(--pp-primary-400);
}

@media (max-width: 767px) {
  .pp-resources-page .featured-resource-card {
    min-height: 16rem;
  }

  .pp-resources-page .featured-resource-content {
    padding: 1rem;
    background: linear-gradient(to top, rgba(15, 23, 42, 0.86), rgba(15, 23, 42, 0.18));
  }

  .pp-resources-page .featured-resource-title {
    font-size: 1.95rem;
    line-height: 1.05;
  }

  .pp-resources-page .featured-resource-description {
    font-size: 1rem;
    line-height: 1.45;
    max-width: none;
  }

  .pp-resources-page .foundations-card {
    padding: 1rem;
    gap: 0.9rem;
  }

  .pp-resources-page .foundations-card .timeline-icon-box {
    width: 2.5rem;
    min-width: 2.5rem;
    height: 2.5rem;
    min-height: 2.5rem;
  }

  .pp-resources-page .foundations-card .timeline-icon-box svg {
    width: 2rem;
    height: 2rem;
  }

  .pp-resources-page .foundations-card-copy {
    margin-left: 0;
  }

  .pp-resources-page .mobile-section-pad {
    padding: 1rem;
  }

  .pp-resources-page .mobile-section-title {
    font-size: 1.875rem;
    line-height: 1.1;
  }

  .pp-resources-page .latest-blog-excerpt {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  .pp-resources-page .article-card h3 {
    font-size: 1.125rem;
    line-height: 1.3;
  }

  .pp-resources-page .article-card p {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
}
