/* ═══════════════════════════════════════════════════════════════
   The Clinical Lighthouse — Article Page Stylesheet
   ═══════════════════════════════════════════════════════════════ */

/* ── Article layout ── */
.article-page {
    max-width: 720px;
    margin: 0 auto;
    padding: 40px 20px 80px;
}

/* ── Article header ── */
.article-header {
    margin-bottom: 32px;
}

.article-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
}

.article-meta-info {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: var(--muted);
    margin-bottom: 20px;
}

.article-meta-info .meta-dot {
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--muted);
    display: inline-block;
    vertical-align: middle;
}

.article-title {
    font-size: 36px;
    line-height: 1.2;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--fg);
    margin-bottom: 12px;
}

.article-dek {
    font-size: 18px;
    line-height: 1.6;
    color: var(--muted);
}

/* ── Hero image ── */
.article-hero {
    margin: 0 0 40px;
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--border);
}

.article-hero .hero-img {
    width: 100%;
    height: auto;
    display: block;
}

/* ── Article content typography ── */
.article-content {
    font-size: 17px;
    line-height: 1.8;
    color: var(--fg);
}

.article-content h2 {
    font-size: 28px;
    line-height: 1.3;
    font-weight: 700;
    letter-spacing: -0.01em;
    margin-top: 48px;
    margin-bottom: 16px;
    color: var(--fg);
}

.article-content h3 {
    font-size: 21px;
    line-height: 1.4;
    font-weight: 600;
    margin-top: 32px;
    margin-bottom: 12px;
    color: var(--fg);
}

.article-content p {
    margin-bottom: 20px;
    line-height: 1.8;
}

.article-content a {
    color: var(--accent);
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: all 0.2s ease;
}

.article-content a:hover {
    border-bottom-color: var(--accent);
}

/* Override link styles inside study-info-card */
.article-content .study-info-card a {
    color: #fff;
    border-bottom-color: transparent;
}

.article-content .study-info-card a:hover {
    color: #fff;
    border-bottom-color: transparent;
}

.article-content .study-info-card a.study-title-link {
    color: #fff;
    border-bottom: 2px solid rgba(255, 255, 255, 0.3);
    padding-bottom: 4px;
}

.article-content .study-info-card a.study-title-link:hover {
    color: #fff;
    border-bottom-color: #fff;
    opacity: 0.9;
}

.article-content strong {
    font-weight: 700;
    color: var(--fg);
}

.article-content ul,
.article-content ol {
    margin-bottom: 20px;
    padding-left: 24px;
}

.article-content li {
    margin-bottom: 8px;
    line-height: 1.7;
}

.article-content hr {
    border: none;
    border-top: 1px solid var(--border);
    margin: 40px 0;
}

/* ── "For Doctors in a Hurry" summary box ── */
.paper-summary {
    background: var(--card);
    border-left: 4px solid var(--accent);
    border-radius: var(--radius);
    padding: 24px 28px;
    margin: 8px 0 40px;
    box-shadow: 0 2px 8px var(--shadow);
}

.paper-summary-title {
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--accent);
    margin-bottom: 16px;
}

.paper-summary ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.paper-summary li {
    position: relative;
    padding-left: 24px;
    margin-bottom: 12px;
    font-size: 15px;
    line-height: 1.6;
    color: var(--fg);
}

.paper-summary li:last-child {
    margin-bottom: 0;
}

.paper-summary li::before {
    content: "\2192";
    position: absolute;
    left: 0;
    color: var(--accent);
    font-weight: 700;
}

/* ── Study Info card ── */
.study-info-card {
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-hover) 100%);
    border-radius: var(--radius);
    padding: 32px;
    margin: 48px 0;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.25);
}

.study-info-title {
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 20px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: rgba(255, 255, 255, 0.9);
}

.study-title-link {
    font-size: 19px;
    font-weight: 600;
    color: #fff;
    text-decoration: none;
    display: block;
    margin-bottom: 16px;
    line-height: 1.4;
    border-bottom: 2px solid rgba(255, 255, 255, 0.3);
    padding-bottom: 4px;
    transition: all 0.2s ease;
}

.study-title-link:hover {
    color: #fff;
    border-bottom-color: #fff;
}

.study-authors {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.6;
    margin-bottom: 16px;
}

.study-authors .inst {
    color: rgba(255, 255, 255, 0.75);
    font-size: 13px;
}

.study-meta-row {
    display: flex;
    gap: 24px;
    margin: 16px 0;
    flex-wrap: wrap;
}

.study-meta-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.study-meta-label {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: rgba(255, 255, 255, 0.75);
}

.study-meta-value {
    font-size: 14px;
    color: white;
    font-weight: 500;
}

/* ── References section ── */
.article-content h2#references {
    font-size: 22px;
    margin-top: 32px;
}

/* ── Subscribe gate ── */
.subscribe-gate {
    position: relative;
    margin-top: 0;
}

/* Teaser: shows beginning of article content with fade-out */
.gate-teaser {
    position: relative;
    max-height: 180px;
    overflow: hidden;
    pointer-events: none;
    user-select: none;
}
.gate-teaser__content {
    font-size: 17px;
    line-height: 1.8;
    color: var(--fg);
}
.gate-teaser__content h2,
.gate-teaser__content h3 {
    font-weight: 700;
    color: var(--fg);
}
.gate-teaser__content .paper-summary {
    background: var(--card);
    border-left: 4px solid var(--accent);
    border-radius: var(--radius);
    padding: 24px 28px;
    margin: 8px 0 40px;
}
.gate-teaser__fade {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 160px;
    background: linear-gradient(to bottom, transparent, var(--bg));
}

.gate-box {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 40px;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 32px;
    align-items: start;
}

.gate-login h3,
.gate-signup h3 {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--fg);
}

.gate-login p,
.gate-signup p {
    font-size: 14px;
    color: var(--muted);
    line-height: 1.6;
    margin-bottom: 16px;
}

.gate-login form {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.gate-login input {
    padding: 10px 14px;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 14px;
    background: var(--bg);
    color: var(--fg);
}

.gate-login input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.gate-divider {
    display: flex;
    align-items: center;
    writing-mode: vertical-lr;
    color: var(--muted);
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 16px 0;
}

.pro-kicker {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--accent);
    margin-bottom: 8px;
}

.paywall-features {
    list-style: none;
    padding: 0;
    margin: 0 0 20px;
}

.paywall-features li {
    position: relative;
    padding-left: 20px;
    margin-bottom: 8px;
    font-size: 14px;
    color: var(--fg);
    line-height: 1.5;
}

.paywall-features li::before {
    content: "\2713";
    position: absolute;
    left: 0;
    color: var(--accent);
    font-weight: 700;
}

.upgrade-btn {
    display: inline-block;
    padding: 12px 28px;
    background: var(--accent);
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.2s;
    text-align: center;
}

.upgrade-btn:hover {
    background: var(--accent-hover);
}

.gate-login-btn {
    width: 100%;
}

/* ── Responsive ── */
@media (max-width: 768px) {
    .article-title {
        font-size: 28px;
    }

    .article-dek {
        font-size: 16px;
    }

    .article-content h2 {
        font-size: 24px;
    }

    .article-content h3 {
        font-size: 19px;
    }

    .article-content {
        font-size: 16px;
    }

    .study-info-card {
        padding: 24px;
    }

    .study-meta-row {
        flex-direction: column;
        gap: 12px;
    }

    .gate-box {
        grid-template-columns: 1fr;
        padding: 24px;
    }

    .gate-divider {
        writing-mode: horizontal-tb;
        padding: 0 16px;
    }
}

@media (max-width: 480px) {
    .article-page {
        padding: 24px 16px 60px;
    }

    .article-title {
        font-size: 24px;
    }

    .paper-summary {
        padding: 20px;
    }
}
