/**
 * AI RSS Publisher Pro content blocks — theme overrides.
 * Loads after the plugin stylesheet to replace admin-oriented light styles.
 */

.tellr-article__content h2[id],
.tellr-article__content h3[id] {
  scroll-margin-top: calc(var(--tellr-header-height) + var(--tellr-space-4));
}

.tellr-article__content .airp-summary-box,
.tellr-article__content .airp-faq,
.tellr-article__content .airp-related-topics,
.tellr-article__content .airp-external-refs {
  margin-block: var(--tellr-space-8);
  padding: var(--tellr-space-6);
  border: 1px solid var(--tellr-border);
  border-radius: var(--tellr-radius-xl);
  background: var(--tellr-muted);
  color: var(--tellr-foreground);
}

.tellr-article__content .airp-toc {
  margin-block: var(--tellr-space-8);
  padding: var(--tellr-space-6);
  border: 1px solid var(--tellr-border);
  border-radius: var(--tellr-radius-xl);
  background:
    radial-gradient(ellipse 80% 60% at 0% 0%, oklch(0.55 0.18 250 / 10%), transparent 58%),
    var(--tellr-card);
  color: var(--tellr-foreground);
}

.tellr-article__content .airp-toc__header {
  margin-bottom: var(--tellr-space-5);
  padding-bottom: var(--tellr-space-4);
  border-bottom: 1px solid var(--tellr-border);
}

.tellr-article__content .airp-toc__title,
.tellr-article__content .airp-toc h2 {
  margin: 0;
  font-size: var(--tellr-text-xl);
  font-weight: var(--tellr-font-semibold);
  line-height: var(--tellr-leading-snug);
  letter-spacing: var(--tellr-tracking-tight);
  color: var(--tellr-foreground);
}

.tellr-article__content .airp-toc__desc {
  margin: var(--tellr-space-2) 0 0;
  font-size: var(--tellr-text-sm);
  line-height: var(--tellr-leading-relaxed);
  color: var(--tellr-muted-foreground);
}

.tellr-article__content .airp-toc__list,
.tellr-article__content .airp-toc ol {
  display: grid;
  gap: var(--tellr-space-2);
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: airp-toc;
}

@media (min-width: 640px) {
  .tellr-article__content .airp-toc__list,
  .tellr-article__content .airp-toc ol {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--tellr-space-3);
  }
}

.tellr-article__content .airp-toc__item,
.tellr-article__content .airp-toc ol > li {
  margin: 0;
}

.tellr-article__content .airp-toc__sublist {
  display: grid;
  gap: var(--tellr-space-2);
  margin: var(--tellr-space-2) 0 0;
  padding: 0 0 0 var(--tellr-space-4);
  list-style: none;
  grid-column: 1 / -1;
}

.tellr-article__content .airp-toc__link,
.tellr-article__content .airp-toc ol a {
  display: flex;
  align-items: flex-start;
  gap: var(--tellr-space-3);
  padding: var(--tellr-space-3) var(--tellr-space-4);
  border: 1px solid transparent;
  border-radius: var(--tellr-radius-lg);
  color: var(--tellr-foreground);
  font-size: var(--tellr-text-sm);
  font-weight: var(--tellr-font-medium);
  line-height: var(--tellr-leading-snug);
  text-decoration: none;
  transition:
    color var(--tellr-duration-normal) var(--tellr-ease-out),
    background-color var(--tellr-duration-normal) var(--tellr-ease-out),
    border-color var(--tellr-duration-normal) var(--tellr-ease-out);
}

.tellr-article__content .airp-toc__link::before,
.tellr-article__content .airp-toc ol a::before {
  content: counter(airp-toc, decimal-leading-zero);
  counter-increment: airp-toc;
  flex-shrink: 0;
  min-width: 1.75rem;
  font-size: var(--tellr-text-xs);
  font-weight: var(--tellr-font-semibold);
  line-height: 1.6;
  color: var(--tellr-brand);
}

.tellr-article__content .airp-toc__link::after,
.tellr-article__content .airp-toc ol a::after {
  content: "→";
  flex-shrink: 0;
  margin-left: auto;
  color: var(--tellr-muted-foreground);
  opacity: 0;
  transform: translateX(-4px);
  transition:
    opacity var(--tellr-duration-normal) var(--tellr-ease-out),
    transform var(--tellr-duration-normal) var(--tellr-ease-out);
}

.tellr-article__content .airp-toc__label {
  flex: 1;
  min-width: 0;
}

.tellr-article__content .airp-toc__link:hover,
.tellr-article__content .airp-toc__link:focus-visible,
.tellr-article__content .airp-toc ol a:hover,
.tellr-article__content .airp-toc ol a:focus-visible {
  color: var(--tellr-brand);
  background: var(--tellr-brand-muted);
  border-color: oklch(from var(--tellr-brand) l c h / 20%);
  outline: none;
}

.tellr-article__content .airp-toc__link:hover::after,
.tellr-article__content .airp-toc__link:focus-visible::after,
.tellr-article__content .airp-toc ol a:hover::after,
.tellr-article__content .airp-toc ol a:focus-visible::after {
  opacity: 1;
  transform: translateX(0);
}

.tellr-article__content .airp-toc__link.is-active,
.tellr-article__content .airp-toc ol a.is-active {
  color: var(--tellr-brand);
  background: var(--tellr-brand-muted);
  border-color: oklch(from var(--tellr-brand) l c h / 24%);
}

.tellr-article__content .airp-toc__item--h3 .airp-toc__link::before {
  content: "•";
  counter-increment: none;
  min-width: 1rem;
  font-size: var(--tellr-text-base);
  line-height: 1.4;
}

.tellr-article__content .airp-summary-box {
  border-left: 3px solid var(--tellr-brand);
  border-radius: 0 var(--tellr-radius-lg) var(--tellr-radius-lg) 0;
  background: var(--tellr-brand-muted);
}

.tellr-article__content .airp-key-takeaways {
  margin-block: var(--tellr-space-8);
  padding: var(--tellr-space-6);
  border: 1px solid var(--tellr-border);
  border-radius: var(--tellr-radius-xl);
  background:
    radial-gradient(ellipse 75% 55% at 100% 0%, oklch(0.62 0.17 280 / 10%), transparent 58%),
    var(--tellr-card);
  color: var(--tellr-foreground);
}

.tellr-article__content .airp-key-takeaways__header {
  margin-bottom: var(--tellr-space-5);
  padding-bottom: var(--tellr-space-4);
  border-bottom: 1px solid var(--tellr-border);
}

.tellr-article__content .airp-key-takeaways__title,
.tellr-article__content .airp-key-takeaways > h2 {
  margin: 0;
  font-size: var(--tellr-text-xl);
  font-weight: var(--tellr-font-semibold);
  line-height: var(--tellr-leading-snug);
  letter-spacing: var(--tellr-tracking-tight);
  color: var(--tellr-foreground);
}

.tellr-article__content .airp-key-takeaways__desc {
  margin: var(--tellr-space-2) 0 0;
  font-size: var(--tellr-text-sm);
  line-height: var(--tellr-leading-relaxed);
  color: var(--tellr-muted-foreground);
}

.tellr-article__content .airp-key-takeaways__list,
.tellr-article__content .airp-key-takeaways ul {
  display: grid;
  gap: var(--tellr-space-3);
  margin: 0;
  padding: 0;
  list-style: none;
}

@media (min-width: 640px) {
  .tellr-article__content .airp-key-takeaways__list,
  .tellr-article__content .airp-key-takeaways ul {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.tellr-article__content .airp-key-takeaways__item,
.tellr-article__content .airp-key-takeaways li {
  display: flex;
  align-items: flex-start;
  gap: var(--tellr-space-3);
  margin: 0;
  padding: var(--tellr-space-4);
  border: 1px solid var(--tellr-border);
  border-radius: var(--tellr-radius-lg);
  background: var(--tellr-muted);
  line-height: var(--tellr-leading-relaxed);
  font-size: var(--tellr-text-sm);
}

.tellr-article__content .airp-key-takeaways__item::before,
.tellr-article__content .airp-key-takeaways li::before {
  content: "✓";
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 1.5rem;
  height: 1.5rem;
  margin-top: 0.1em;
  border-radius: var(--tellr-radius-full);
  background: var(--tellr-brand-muted);
  color: var(--tellr-brand);
  font-size: var(--tellr-text-xs);
  font-weight: var(--tellr-font-bold);
  line-height: 1;
}

.tellr-article__content .airp-key-takeaways__text {
  flex: 1;
  min-width: 0;
}

.tellr-article__content .airp-summary-box h2,
.tellr-article__content .airp-faq h2,
.tellr-article__content .airp-related-topics h2,
.tellr-article__content .airp-external-refs h2 {
  margin: 0 0 var(--tellr-space-4);
  font-size: var(--tellr-text-xl);
  font-weight: var(--tellr-font-semibold);
  line-height: var(--tellr-leading-snug);
  color: var(--tellr-foreground);
}

.tellr-article__content .airp-summary-box p:last-child {
  margin-bottom: 0;
}

.tellr-article__content .airp-related-topics ul,
.tellr-article__content .airp-external-refs ul {
  margin: 0;
  padding-left: var(--tellr-space-6);
  list-style: disc;
}

.tellr-article__content .airp-related-topics li,
.tellr-article__content .airp-external-refs li {
  line-height: var(--tellr-leading-relaxed);
}

.tellr-article__content .airp-external-refs a {
  color: var(--tellr-brand);
  font-weight: var(--tellr-font-medium);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.tellr-article__content .airp-faq details,
.tellr-article__content .airp-faq .airp-faq-item {
  margin: 0;
  padding-block: var(--tellr-space-3);
  border-bottom: 1px solid var(--tellr-border);
}

.tellr-article__content .airp-faq details:last-child,
.tellr-article__content .airp-faq .airp-faq-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.tellr-article__content .airp-faq details:first-of-type,
.tellr-article__content .airp-faq .airp-faq-item:first-of-type {
  padding-top: 0;
}

.tellr-article__content .airp-faq summary,
.tellr-article__content .airp-faq .airp-faq-question {
  cursor: pointer;
  list-style: none;
  margin: 0;
  font-size: var(--tellr-text-base);
  font-weight: var(--tellr-font-medium);
  line-height: var(--tellr-leading-snug);
  color: var(--tellr-foreground);
}

.tellr-article__content .airp-faq summary::-webkit-details-marker {
  display: none;
}

.tellr-article__content .airp-faq summary::before,
.tellr-article__content .airp-faq .airp-faq-question::before {
  content: "+";
  display: inline-block;
  width: 1.25rem;
  margin-right: var(--tellr-space-2);
  color: var(--tellr-brand);
  font-weight: var(--tellr-font-bold);
}

.tellr-article__content .airp-faq details[open] summary::before,
.tellr-article__content .airp-faq details[open] .airp-faq-question::before {
  content: "−";
}

.tellr-article__content .airp-faq summary strong {
  font-weight: inherit;
}

.tellr-article__content .airp-faq .airp-faq-answer {
  margin: var(--tellr-space-3) 0 0 calc(1.25rem + var(--tellr-space-2));
  color: var(--tellr-muted-foreground);
  font-size: var(--tellr-text-base);
}
