/* ====================================
   PROSE CONTENT STYLING - Light & Dark Mode
   ==================================== */

.prose {
    font-size: 1.125rem;
    line-height: 1.8;
    color: rgb(55, 65, 81);
}

.dark .prose {
    color: rgba(255, 255, 255, 0.9);
}

/* Paragraph */
.prose p {
    margin-bottom: 1.5rem;
    color: rgb(75, 85, 99);
}

.dark .prose p {
    color: rgba(255, 255, 255, 0.85);
}

.prose p:first-child {
    font-size: 1.25rem;
    font-weight: 500;
    color: rgb(17, 24, 39);
}

.dark .prose p:first-child {
    color: rgba(255, 255, 255, 0.95);
}

/* Headings */
.prose h2,
.prose h3 {
    color: rgb(17, 24, 39);
    font-weight: 700;
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.dark .prose h2,
.dark .prose h3 {
    color: rgb(255, 255, 255);
}

.prose h2 {
    font-size: 2rem;
    line-height: 1.3;
    border-bottom: 2px solid rgba(197, 160, 89, 0.3);
    padding-bottom: 0.75rem;
}

.prose h3 {
    font-size: 1.5rem;
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
}

.prose h4 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-top: 1.25rem;
    margin-bottom: 0.5rem;
    color: rgb(17, 24, 39);
}

.dark .prose h4 {
    color: rgb(255, 255, 255);
}

.prose h5,
.prose h6 {
    font-weight: 600;
    margin-top: 1rem;
    margin-bottom: 0.75rem;
    color: rgb(17, 24, 39);
}

.dark .prose h5,
.dark .prose h6 {
    color: rgb(255, 255, 255);
}

/* Lists */
.prose ul,
.prose ol {
    margin: 1.5rem 0;
    padding-left: 1.5rem;
}

.prose li {
    margin-bottom: 0.75rem;
    list-style: none;
    position: relative;
    padding-left: 1.5rem;
    color: rgb(75, 85, 99);
}

.dark .prose li {
    color: rgba(255, 255, 255, 0.85);
}

.prose ul > li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.75rem;
    width: 6px;
    height: 6px;
    background: var(--premium-gold);
    border-radius: 50%;
}

.prose ol {
    counter-reset: item;
    padding-left: 0;
}

.prose ol > li {
    counter-increment: item;
    padding-left: 2rem;
}

.prose ol > li::before {
    content: counter(item) '.';
    position: absolute;
    left: 0;
    font-weight: 700;
    color: var(--premium-gold);
}

/* Links */
.prose a {
    color: var(--premium-gold);
    font-weight: 500;
    text-decoration: underline;
    text-decoration-thickness: 2px;
    text-underline-offset: 4px;
    transition: all 0.3s ease;
}

.prose a:hover {
    color: #b8901f;
    text-decoration-thickness: 3px;
}

/* Blockquote */
.prose blockquote {
    border-left: 4px solid var(--premium-gold);
    padding: 1.5rem;
    padding-left: 1.5rem;
    margin: 2rem 0;
    background: rgba(197, 160, 89, 0.08);
    border-radius: 0.5rem;
    font-style: italic;
    color: rgb(55, 65, 81);
    font-size: 1.1rem;
}

.dark .prose blockquote {
    background: rgba(197, 160, 89, 0.05);
    color: rgba(255, 255, 255, 0.8);
}

.prose blockquote p:last-child {
    margin-bottom: 0;
}

/* Code */
.prose code {
    background: rgba(197, 160, 89, 0.12);
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.95em;
    color: var(--premium-gold);
    font-weight: 500;
    word-break: break-word;
}

.dark .prose code {
    background: rgba(197, 160, 89, 0.1);
}

.prose pre {
    background: rgb(245, 245, 245);
    padding: 1.5rem;
    border-radius: 0.5rem;
    overflow-x: auto;
    margin: 2rem 0;
    border: 1px solid rgba(197, 160, 89, 0.15);
}

.dark .prose pre {
    background: rgba(10, 10, 10, 0.8);
    border: 1px solid rgba(197, 160, 89, 0.1);
}

.prose pre code {
    background: none;
    color: rgb(17, 24, 39);
    padding: 0;
    font-size: 0.9rem;
    line-height: 1.6;
}

.dark .prose pre code {
    color: rgba(255, 255, 255, 0.9);
}

/* Inline elements */
.prose strong {
    font-weight: 700;
    color: rgb(17, 24, 39);
}

.dark .prose strong {
    color: rgb(255, 255, 255);
}

.prose em {
    font-style: italic;
}

.prose mark {
    background: rgba(197, 160, 89, 0.25);
    padding: 0.125rem 0.25rem;
    border-radius: 0.125rem;
}

/* Horizontal Rule */
.prose hr {
    border: none;
    border-top: 1px solid rgba(197, 160, 89, 0.2);
    margin: 2rem 0;
}

/* Tables */
.prose table {
    width: 100%;
    border-collapse: collapse;
    margin: 2rem 0;
    font-size: 0.95rem;
}

.prose thead {
    background: rgba(197, 160, 89, 0.12);
    border-bottom: 2px solid var(--premium-gold);
}

.dark .prose thead {
    background: rgba(197, 160, 89, 0.1);
}

.prose th {
    padding: 0.75rem;
    text-align: left;
    font-weight: 700;
    color: rgb(17, 24, 39);
}

.dark .prose th {
    color: rgb(255, 255, 255);
}

.prose td {
    padding: 0.75rem;
    border-bottom: 1px solid rgba(197, 160, 89, 0.15);
    color: rgb(75, 85, 99);
}

.dark .prose td {
    border-bottom: 1px solid rgba(197, 160, 89, 0.1);
    color: rgba(255, 255, 255, 0.85);
}

.prose tbody tr:hover {
    background: rgba(197, 160, 89, 0.08);
}

.dark .prose tbody tr:hover {
    background: rgba(197, 160, 89, 0.05);
}

/* Images */
.prose img {
    width: 100%;
    max-width: 100%;
    height: auto;
    border-radius: 0.75rem;
    margin: 2rem 0;
    display: block;
    border: 1px solid rgba(197, 160, 89, 0.1);
}

/* Figcaption */
.prose figcaption {
    font-size: 0.875rem;
    color: rgb(107, 114, 128);
    text-align: center;
    margin-top: -1rem;
    margin-bottom: 2rem;
    font-style: italic;
}

.dark .prose figcaption {
    color: rgba(255, 255, 255, 0.6);
}

/* Embedded content */
.prose iframe {
    width: 100%;
    max-width: 100%;
    border-radius: 0.75rem;
    margin: 2rem 0;
    border: 1px solid rgba(197, 160, 89, 0.1);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .prose {
        font-size: 1rem;
    }

    .prose h2 {
        font-size: 1.75rem;
    }

    .prose h3 {
        font-size: 1.25rem;
    }

    .prose pre {
        padding: 1rem;
        font-size: 0.85rem;
    }

    .prose table {
        font-size: 0.85rem;
    }

    .prose th,
    .prose td {
        padding: 0.5rem;
    }
}

/* Utilities for prose content */
.prose .text-center {
    text-align: center;
}

.prose .text-right {
    text-align: right;
}

.prose .text-muted {
    color: rgb(107, 114, 128);
}

.dark .prose .text-muted {
    color: rgba(255, 255, 255, 0.6);
}

.prose .highlight {
    background: rgba(197, 160, 89, 0.15);
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    color: var(--premium-gold);
    font-weight: 500;
}

/* KBD (keyboard) tags */
.prose kbd {
    background: rgba(0, 0, 0, 0.06);
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    border: 1px solid rgba(0, 0, 0, 0.15);
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.875rem;
    font-weight: 500;
    color: rgb(17, 24, 39);
}

.dark .prose kbd {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: rgba(255, 255, 255, 0.9);
}

/* Sup/Sub tags */
.prose sup,
.prose sub {
    font-size: 0.8em;
}

/* Prose-invert variant for background compatibility */
.prose-invert {
    /* This is handled by the dark: prefix in Tailwind */
}
