/* Stylesheet: Related publications.
 * Cascade order is intentional: later component/responsive refinements win.
 * Keep selectors, declaration order and breakpoints in place when editing.
 * Shared palette: --brand and --brand-dark in archive.css; fallbacks retained.
 */

.viewer-recommendations {
    position: relative;
    left: 50%;
    transform: translateX(-50%);
    width: min(1100px,calc(100vw - 32px));
    margin: 32px 0 12px;
    padding: 24px;
    background: #f9fbfc;
    border: 1px solid #dce6ed;
    border-radius: 10px;
}

.recommendations-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 20px;
}

.recommendations-header .eyebrow {
    font-size: 10px;
    letter-spacing: 1.3px;
    color: #617c8d;
}

.recommendations-header h2 {
    margin: 0 0 7px;
    color: var(--brand, #28536b);
    font: 700 24px/1.3 'Montagu Slab',Georgia,serif;
}

.recommendations-header p:last-child {
    margin: 0;
    color: #5f7483;
    font-size: 13px;
    line-height: 1.6;
}

.recommendations-header>a {
    flex: 0 0 auto;
    color: var(--brand, #28536b);
    font-size: 12px;
    font-weight: 600;
    text-decoration: none;
}

.recommendations-header>a:hover {
    text-decoration: underline;
    text-underline-offset: 3px;
}

.recommendation-cards {
    display: grid;
    grid-template-columns: repeat(3,minmax(0,1fr));
    gap: 16px;
}

.recommendation-card {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding: 20px;
    background: white;
    border: 1px solid #d9e5ed;
    border-radius: 8px;
    text-decoration: none;
    color: var(--brand, #28536b);
    transition: border-color 150ms ease,box-shadow 150ms ease;
    overflow-wrap: anywhere;
}

.recommendation-card:hover {
    border-color: #95b5cb;
    box-shadow: 0 4px 14px rgb(40 83 107 / 7%);
}

.recommendation-card:focus-visible {
    outline: 3px solid #d9a13c;
    outline-offset: 3px;
}

.recommendation-reason {
    display: block;
    color: #5d7888;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: .5px;
    margin-bottom: 12px;
    text-transform: uppercase;
}

.recommendation-card h3 {
    font: 700 18px/1.45 'Montagu Slab',Georgia,serif;
    margin: 0 0 10px;
}

.recommendation-card p {
    font-size: 12px;
    line-height: 1.6;
    margin: 0 0 20px;
    color: #5b7382;
}

.recommendation-action {
    display: block;
    margin-top: auto;
    font-size: 12px;
    font-weight: 600;
}

.recommendations-status {
    font-size: 13px;
    color: #5f7483;
    margin: 0;
}

.recommendations-status:empty {
    display: none;
}

@media(max-width:700px) {
    .viewer-recommendations {
        padding: 20px;
    }

    .recommendations-header {
        align-items: flex-start;
        flex-direction: column;
        gap: 12px;
    }

    .recommendation-cards {
        grid-template-columns: 1fr;
    }

    .recommendations-header h2 {
        font-size: 22px;
    }

}

@media(prefers-reduced-motion:reduce) {
    .recommendation-card {
        transition: none;
    }

}
