/* article.css — consistent typography and components for Coyyn article pages */

.article-page {
    padding: 150px 20px 80px;
    min-height: 70vh;
}

.article-container {
    max-width: 880px;
    margin: 0 auto;
}

/* Breadcrumbs */
.breadcrumbs {
    margin-bottom: 24px;
    font-size: 0.875rem;
    color: var(--text-muted);
}

.breadcrumbs ol {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    list-style: none;
}

.breadcrumbs li:not(:last-child)::after {
    content: '\203A';
    margin-left: 8px;
    color: var(--text-muted);
}

.breadcrumbs a {
    color: var(--accent-purple-light);
    transition: color var(--transition-fast);
}

.breadcrumbs a:hover {
    color: var(--text-primary);
}

/* Article header */
.article-header {
    text-align: center;
    margin-bottom: 32px;
}

.article-header .category-badge {
    position: static;
    display: inline-flex;
    margin-bottom: 18px;
    background: rgba(139, 92, 246, 0.15);
    border: 1px solid var(--border-highlight);
    color: var(--accent-purple-light);
    padding: 6px 14px;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    border-radius: var(--radius-full);
}

.article-header h1 {
    font-size: clamp(1.9rem, 4.5vw, 2.75rem);
    color: var(--text-primary);
    margin-bottom: 18px;
    line-height: 1.2;
}

.article-meta-row {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 18px 28px;
    color: var(--text-muted);
    font-size: 0.875rem;
}

.article-meta-row .meta-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.article-meta-row .author-name {
    color: var(--accent-purple-light);
    font-weight: 500;
}

.article-hero-image {
    width: 100%;
    aspect-ratio: 1280/800;
    border-radius: var(--radius-xl);
    margin-bottom: 32px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4);
}

/* Quick answer box (AEO featured-snippet style) */
.answer-box {
    background: var(--bg-surface);
    border: 1px solid var(--border-highlight);
    border-left: 4px solid var(--accent-purple);
    border-radius: var(--radius-lg);
    padding: 24px 28px;
    margin-bottom: 32px;
}

.answer-box .answer-label {
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--accent-purple-light);
    margin-bottom: 10px;
    display: block;
}

.answer-box p {
    color: var(--text-primary);
    font-size: 1.05rem;
    line-height: 1.8;
    margin: 0;
}

/* Table of contents */
.toc {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 24px 28px;
    margin-bottom: 20px;
}

.toc h2 {
    font-size: 1.1rem;
    margin-bottom: 14px;
    color: var(--text-primary);
}

.toc ol {
    list-style: none;
    display: grid;
    grid-template-columns: 1fr;
    gap: 6px;
}

.toc a {
    color: var(--text-secondary);
    font-size: 0.95rem;
    transition: color var(--transition-fast);
    display: inline-flex;
    align-items: baseline;
    gap: 8px;
}

.toc a:hover {
    color: var(--accent-purple-light);
}

.toc .toc-num {
    color: var(--accent-purple);
    font-size: 0.8rem;
    font-weight: 600;
}

/* Prose / body typography */
.article-prose {
    color: var(--text-secondary);
}

.article-prose p {
    font-size: 1.05rem;
    line-height: 1.9;
    margin-bottom: 1.5rem;
}

.article-prose strong {
    color: var(--text-primary);
    font-weight: 600;
}

.article-prose h2 {
    font-size: 1.85rem;
    color: var(--text-primary);
    margin-top: 3rem;
    margin-bottom: 1.25rem;
    padding-bottom: 0.6rem;
    border-bottom: 1px solid var(--border-color);
    scroll-margin-top: 110px;
}

.article-prose h2 .section-anchor {
    color: var(--accent-purple-light);
}

.article-prose h3 {
    font-size: 1.3rem;
    color: var(--text-primary);
    margin-top: 2.25rem;
    margin-bottom: 0.9rem;
    scroll-margin-top: 110px;
}

.article-prose h4 {
    font-size: 1.08rem;
    color: var(--text-primary);
    margin-top: 1.75rem;
    margin-bottom: 0.7rem;
}

.article-prose ul,
.article-prose ol {
    margin: 0 0 1.5rem 1.4rem;
}

.article-prose ul li {
    list-style: disc;
    margin-bottom: 0.6rem;
}

.article-prose ol li {
    list-style: decimal;
    margin-bottom: 0.6rem;
}

.article-prose li {
    line-height: 1.8;
}

.article-prose a {
    color: var(--accent-purple-light);
    text-decoration: underline;
    text-underline-offset: 3px;
    transition: color var(--transition-fast);
}

.article-prose a:hover {
    color: var(--text-primary);
}

.article-prose blockquote {
    border-left: 3px solid var(--accent-purple);
    background: var(--bg-surface);
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
    padding: 18px 22px;
    margin: 1.75rem 0;
    color: var(--text-primary);
    font-style: italic;
    font-size: 1.02rem;
}

/* Tables (comparison / data tables) */
.article-prose table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.75rem 0;
    font-size: 0.95rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    overflow: hidden;
}

.article-prose th {
    background: var(--bg-surface);
    color: var(--text-primary);
    text-align: left;
    font-weight: 600;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-highlight);
}

.article-prose td {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-secondary);
    line-height: 1.7;
    vertical-align: top;
}

.article-prose tr:last-child td {
    border-bottom: none;
}

.article-prose .table-note {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: -1rem;
}

/* Callouts */
.callout {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.12), rgba(6, 182, 212, 0.06));
    border: 1px solid var(--border-highlight);
    border-radius: var(--radius-lg);
    padding: 24px 28px;
    margin: 2rem 0;
}

.callout h3 {
    margin-top: 0;
    color: var(--accent-purple-light);
    font-size: 1.1rem;
}

.callout p {
    margin-bottom: 0.75rem;
}

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

.callout ul li {
    list-style: none;
    position: relative;
    padding-left: 22px;
}

.callout ul li::before {
    content: '\2713';
    position: absolute;
    left: 0;
    color: var(--accent-green);
    font-weight: 700;
}

.callout.warning {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.1), rgba(245, 158, 11, 0.05));
    border-color: rgba(239, 68, 68, 0.3);
}

.callout.warning ul li::before {
    content: '\26A0';
    color: var(--accent-gold);
}

/* Key terms / definition list */
.key-terms {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 24px 28px;
    margin: 2rem 0;
}

.key-terms h3 {
    color: var(--accent-purple-light);
    margin-top: 0;
    font-size: 1.1rem;
}

.key-terms dl {
    margin: 0;
}

.key-terms dt {
    color: var(--text-primary);
    font-weight: 600;
    margin-top: 12px;
}

.key-terms dt::after {
    content: ' —';
    color: var(--accent-purple-light);
}

.key-terms dd {
    color: var(--text-secondary);
    line-height: 1.8;
    margin-left: 0;
}

/* FAQ */
.faq-section h2 {
    margin-bottom: 1rem;
}

.faq-item {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    margin-bottom: 14px;
    overflow: hidden;
}

.faq-item summary {
    cursor: pointer;
    padding: 18px 22px;
    font-weight: 600;
    font-size: 1.02rem;
    color: var(--text-primary);
    list-style: none;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: color var(--transition-fast);
}

.faq-item summary::-webkit-details-marker {
    display: none;
}

.faq-item summary .faq-q {
    color: var(--accent-purple);
    font-size: 0.85rem;
    font-weight: 700;
}

.faq-item summary .faq-toggle {
    margin-left: auto;
    color: var(--accent-purple-light);
    font-size: 1.1rem;
    transition: transform var(--transition-normal);
}

.faq-item[open] summary .faq-toggle {
    transform: rotate(45deg);
}

.faq-item[open] summary {
    color: var(--accent-purple-light);
}

.faq-answer {
    padding: 0 22px 20px 22px;
    color: var(--text-secondary);
    line-height: 1.8;
    font-size: 0.98rem;
}

.faq-answer p {
    margin-bottom: 0.75rem;
}

.faq-answer p:last-child {
    margin-bottom: 0;
}

/* Author box */
.author-box {
    display: flex;
    gap: 18px;
    align-items: flex-start;
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 24px 28px;
    margin: 3rem 0 2rem;
}

.author-avatar {
    flex-shrink: 0;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent-purple), #6D28D9);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.2rem;
    color: #fff;
}

.author-box h3 {
    margin-bottom: 4px;
    font-size: 1.05rem;
}

.author-box .author-title {
    font-size: 0.8rem;
    color: var(--accent-purple-light);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 8px;
    display: block;
}

.author-box p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.7;
    margin: 0;
}

/* Disclaimer */
.article-disclaimer {
    background: rgba(245, 158, 11, 0.06);
    border: 1px solid rgba(245, 158, 11, 0.2);
    border-radius: var(--radius-lg);
    padding: 18px 22px;
    margin: 2.5rem 0 0;
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.7;
}

.article-disclaimer strong {
    color: var(--accent-gold);
}

/* Related articles */
.related-articles {
    max-width: 880px;
    margin: 0 auto;
    padding-top: 60px;
}

.related-articles h2 {
    text-align: center;
    font-size: 1.6rem;
    margin-bottom: 2rem;
    color: var(--text-primary);
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--spacing-md);
}

.related-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
    display: block;
    transition: all var(--transition-normal);
}

.related-card:hover {
    transform: translateY(-5px);
    border-color: var(--accent-purple);
}

.related-card img {
    width: 100%;
    aspect-ratio: 16/10;
    object-fit: cover;
}

.related-card .related-body {
    padding: var(--spacing-md);
}

.related-card h3 {
    font-size: 1rem;
    color: var(--text-primary);
    margin-bottom: 8px;
    line-height: 1.4;
}

.related-card .related-meta {
    font-size: 0.75rem;
    color: var(--text-muted);
    display: flex;
    justify-content: space-between;
}

.article-back-link {
    text-align: center;
    margin: 32px 0 8px;
}

.article-back-link a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--accent-purple-light);
    font-weight: 500;
    transition: gap var(--transition-fast);
}

.article-back-link a:hover {
    gap: 12px;
}

/* Responsive */
@media (max-width: 768px) {
    .article-page {
        padding: 130px 16px 60px;
    }

    .article-header h1 {
        font-size: 1.7rem;
    }

    .related-grid {
        grid-template-columns: 1fr;
    }

    .author-box {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
}

@media (max-width: 430px) {
    .article-prose h2 {
        font-size: 1.5rem;
    }

    .article-prose p {
        font-size: 1rem;
    }

    .toc {
        padding: 18px 20px;
    }
}