/* Sources & Credits page — original brand-coloured monogram badges + cards. */

.src-intro {
    max-width: 60ch;
    color: var(--text-muted);
    line-height: 1.55;
    margin: .25rem 0 1.5rem;
}

.src-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
    gap: .9rem;
    margin: .9rem 0 2rem;
}

.src-card {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background: var(--bg-alt);
    transition: border-color .15s ease, transform .15s ease, box-shadow .15s ease;
}
.src-card:hover {
    border-color: var(--accent, #3b9bf0);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, .12);
}

/* Logo banner: a white panel so every logo — full-colour, monochrome, or a
   wide wordmark — is visible and consistent in both light and dark themes. */
.src-logohead {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 88px;
    padding: 16px 22px;
    background: #fff;
    border-bottom: 1px solid var(--border);
}
.src-body { padding: .9rem 1.05rem 1.05rem; }

.src-badge {
    flex: 0 0 auto;
    width: 52px;
    height: 52px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-family: var(--font-mono, 'JetBrains Mono', monospace);
    font-weight: 700;
    font-size: 1.05rem;
    letter-spacing: .02em;
    box-shadow: 0 2px 6px rgba(0, 0, 0, .22);
    user-select: none;
}
.src-badge--sm { font-size: .72rem; letter-spacing: .03em; }   /* 3-letter monograms (WHO, NPS, FDA) */

/* Real logo (when a file exists in static/sources/) — scaled to fit the white
   banner, preserving aspect ratio so wordmarks and square marks both work. */
.src-logo {
    max-height: 56px;
    max-width: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
}

.src-body { min-width: 0; }
.src-name { font-weight: 700; font-size: 1.04rem; margin: .1rem 0 .2rem; }
.src-desc {
    font-size: var(--fs-small, .9rem);
    color: var(--text-muted);
    line-height: 1.45;
    margin: 0 0 .4rem;
}
.src-link {
    display: inline-block;
    font-size: var(--fs-small, .88rem);
    font-weight: 600;
    text-decoration: none;
    color: var(--accent, #3b9bf0);
    word-break: break-all;
}
.src-link::after { content: " \2197"; }   /* ↗ */
.src-link:hover { text-decoration: underline; }

.src-foot { margin-top: 1.5rem; }
.src-foot p { margin: 0; line-height: 1.5; }

@media (max-width: 560px) {
    .src-grid { grid-template-columns: 1fr; }
    .src-logohead { height: 80px; }
}
