@layer base {
  .prose {
    @apply prose-headings:!mb-2 prose-headings:scroll-mt-20 prose-headings:!text-foreground prose-p:!text-sm prose-p:leading-8 prose-p:!text-foreground lg:prose-p:!text-base dark:prose-p:!text-foreground/80 prose-a:!text-foreground prose-a:underline-offset-4 prose-blockquote:!border-l-accent prose-blockquote:opacity-80 prose-figcaption:!text-foreground prose-figcaption:opacity-70 prose-strong:!text-foreground prose-code:rounded prose-code:bg-muted/75 prose-code:p-1 prose-code:!text-foreground prose-code:before:!content-none prose-code:after:!content-none prose-pre:!max-h-[512px] prose-ol:!text-foreground prose-ul:overflow-x-clip prose-ul:!text-foreground prose-li:!text-sm prose-li:!text-foreground prose-li:marker:!text-foreground/80 lg:prose-li:!text-base dark:prose-li:!text-foreground/80 prose-table:text-foreground prose-th:border prose-th:border-border prose-td:border prose-td:border-border prose-img:!my-2 prose-img:!rounded-lg prose-video:!rounded-lg prose-hr:!border-border;
  }
  .prose a {
    @apply break-words;
  }
  .prose thead th:first-child,
  tbody td:first-child,
  tfoot td:first-child {
    padding-inline-start: 0.5714286em !important;
  }
  .prose h2#table-of-contents {
    @apply mb-2;
  }
  .prose details {
    @apply inline-block cursor-pointer text-foreground select-none;
  }
  .prose summary {
    @apply focus-visible:no-underline focus-visible:outline-2 focus-visible:outline-offset-1 focus-visible:outline-accent focus-visible:outline-dashed;
  }
  .prose h2#table-of-contents + p {
    @apply hidden;
  }

  /* ===== Code Blocks & Syntax Highlighting ===== */
  pre:has(code) {
    @apply border border-border;
  }
  code,
  blockquote {
    word-wrap: break-word;
  }

  pre > code {
    white-space: pre;
  }
}
