@import url('https://fonts.googleapis.com/css2?family=Fira+Code:wght@400;700&family=Inter:wght@400;500;600;700&display=swap');

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    --bg: #f5f5f0;
    --bg-card: #ffffff;
    --bg-muted: #fafaf5;
    --text: #1a1a1a;
    --text-muted: #555;
    --text-soft: #888;
    --text-faint: #aaa;
    --border: #e5e5e0;
    --border-strong: #ccc;
    --accent: #00aaaa;
    --accent-hover: #006666;
    --warning: #cc8800;
    --error: #ff4444;
    --mono: 'Fira Code', 'Courier New', monospace;
    --sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

html { scroll-behavior: smooth; }

body {
    background: var(--bg);
    color: var(--text);
    font-family: var(--sans);
    font-size: 16px;
    line-height: 1.6;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

.container {
    max-width: 960px;
    margin: 0 auto;
    padding: 0 20px;
}

.sr-only {
    position: absolute;
    width: 1px; height: 1px;
    padding: 0; margin: -1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
    white-space: nowrap;
    border: 0;
}

a { color: var(--accent); text-decoration: none; border-bottom: 1px solid transparent; transition: border-color .15s ease, color .15s ease; }
a:hover { color: var(--accent-hover); border-bottom-color: var(--accent-hover); }

/* ─────────────────────────────────────────────── */
/* Header */
/* ─────────────────────────────────────────────── */
.site-header {
    background: #fff;
    border-bottom: 1px solid var(--border);
    padding: 28px 0 32px;
}

.breadcrumb {
    font-family: var(--mono);
    font-size: 12px;
    color: var(--text-soft);
    margin-bottom: 16px;
}
.breadcrumb a { color: var(--text-muted); border-bottom: 1px dashed transparent; }
.breadcrumb a:hover { color: var(--text); border-bottom-color: var(--text); }
.breadcrumb .sep { margin: 0 6px; color: var(--text-faint); }
.breadcrumb .current { color: var(--text); font-weight: 500; }

.site-title {
    font-family: var(--mono);
    font-size: 28px;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 10px;
}
.site-title .title-accent { color: var(--text-muted); font-weight: 400; }

.site-subtitle {
    color: var(--text-muted);
    font-size: 15px;
    max-width: 640px;
    line-height: 1.55;
}

/* ─────────────────────────────────────────────── */
/* Stats bar */
/* ─────────────────────────────────────────────── */
.stats-bar {
    background: var(--bg-muted);
    border-bottom: 1px solid var(--border);
    font-family: var(--mono);
    font-size: 12px;
    padding: 10px 0;
}
.stats-bar .container {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 24px;
}
.stats-bar .stat-label { color: var(--text-soft); margin-right: 4px; }
.stats-bar .stat-val { color: var(--text); font-weight: 500; }

/* ─────────────────────────────────────────────── */
/* Search bar */
/* ─────────────────────────────────────────────── */
.search-bar {
    background: #fff;
    border-bottom: 1px solid var(--border);
    padding: 20px 0;
    position: sticky;
    top: 0;
    z-index: 10;
}

.search-wrap {
    position: relative;
    margin-bottom: 12px;
}

#searchInput {
    width: 100%;
    padding: 12px 44px 12px 16px;
    border: 1.5px solid var(--border);
    border-radius: 8px;
    font-family: var(--sans);
    font-size: 15px;
    background: var(--bg-muted);
    color: var(--text);
    transition: border-color .15s ease, background .15s ease;
    -webkit-appearance: none;
    appearance: none;
}
#searchInput::-webkit-search-cancel-button { display: none; }
#searchInput:focus {
    outline: none;
    border-color: var(--accent);
    background: #fff;
}

.clear-btn {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-soft);
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    padding: 4px 10px;
    border-radius: 4px;
}
.clear-btn:hover { color: var(--text); background: var(--border); }

.filter-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    font-size: 13px;
    color: var(--text-muted);
}

.filter {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: var(--mono);
}
.filter select {
    font-family: var(--sans);
    font-size: 13px;
    padding: 4px 8px;
    border: 1px solid var(--border);
    border-radius: 4px;
    background: #fff;
    color: var(--text);
    cursor: pointer;
}

.results-count {
    font-family: var(--mono);
    color: var(--text-soft);
}

/* ─────────────────────────────────────────────── */
/* Articles list */
/* ─────────────────────────────────────────────── */
.content { padding: 32px 0 48px; }

.articles-list { display: flex; flex-direction: column; gap: 20px; }

.loading, .empty {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-soft);
    font-family: var(--mono);
    font-size: 14px;
}

.article-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 24px 28px;
    transition: border-color .15s ease, box-shadow .15s ease;
}
.article-card:hover {
    border-color: var(--border-strong);
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

.article-title-pl {
    font-size: 19px;
    font-weight: 600;
    color: var(--text);
    line-height: 1.35;
    margin-bottom: 6px;
}

.article-title-en {
    font-family: var(--mono);
    font-size: 12px;
    color: var(--text-soft);
    font-style: italic;
    line-height: 1.4;
    margin-bottom: 14px;
}

.article-meta {
    font-family: var(--mono);
    font-size: 12px;
    color: var(--text-soft);
    margin-bottom: 16px;
    display: flex;
    flex-wrap: wrap;
    gap: 4px 14px;
}
.article-meta .meta-item { display: inline-flex; align-items: center; gap: 4px; }
.article-meta .meta-label { color: var(--text-faint); }

.article-summary {
    color: var(--text);
    font-size: 15px;
    line-height: 1.65;
    margin-bottom: 16px;
}

.article-keywords {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 16px;
}
.keyword-tag {
    font-family: var(--mono);
    font-size: 11px;
    color: var(--text-muted);
    background: var(--bg-muted);
    border: 1px solid var(--border);
    padding: 3px 9px;
    border-radius: 20px;
}

.article-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding-top: 12px;
    border-top: 1px dashed var(--border);
}
.article-links .btn {
    font-family: var(--mono);
    font-size: 12px;
    color: var(--accent);
    padding: 6px 12px;
    border: 1px solid var(--accent);
    border-radius: 6px;
    text-decoration: none;
    transition: all .15s ease;
}
.article-links .btn:hover {
    background: var(--accent);
    color: #fff;
    border-bottom-color: var(--accent);
}
.article-links .btn.primary {
    background: var(--text);
    color: #fff;
    border-color: var(--text);
}
.article-links .btn.primary:hover {
    background: #000;
    border-color: #000;
    border-bottom-color: #000;
}

mark.highlight {
    background: rgba(0, 170, 170, 0.18);
    color: var(--text);
    padding: 0 2px;
    border-radius: 2px;
}

/* ─────────────────────────────────────────────── */
/* Pagination */
/* ─────────────────────────────────────────────── */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 16px;
    margin-top: 32px;
    padding: 16px 0;
}
.page-btn {
    font-family: var(--mono);
    font-size: 13px;
    padding: 8px 16px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text);
    cursor: pointer;
    transition: all .15s ease;
}
.page-btn:hover:not(:disabled) { border-color: var(--accent); color: var(--accent); }
.page-btn:disabled { opacity: 0.4; cursor: not-allowed; }
.page-info {
    font-family: var(--mono);
    font-size: 13px;
    color: var(--text-muted);
}

/* ─────────────────────────────────────────────── */
/* Disclaimer */
/* ─────────────────────────────────────────────── */
.disclaimer-box {
    background: #fff8ed;
    border-top: 1px solid #f0d8a0;
    border-bottom: 1px solid #f0d8a0;
    padding: 16px 0;
    font-size: 13px;
    color: #6b4c00;
    line-height: 1.55;
}
.disclaimer-box strong { color: #8a5f00; }

/* ─────────────────────────────────────────────── */
/* Footer */
/* ─────────────────────────────────────────────── */
.site-footer {
    padding: 24px 0;
    font-family: var(--mono);
    font-size: 12px;
    color: var(--text-soft);
    text-align: center;
}
.site-footer .sep { margin: 0 8px; color: var(--text-faint); }
.site-footer a { color: var(--text-muted); }
.site-footer a:hover { color: var(--text); }
.site-footer .copyright {
    margin-top: 8px;
    font-size: 11px;
    color: var(--text-faint);
}

/* ─────────────────────────────────────────────── */
/* Responsive */
/* ─────────────────────────────────────────────── */
@media (max-width: 640px) {
    body { font-size: 15px; }
    .site-title { font-size: 22px; }
    .site-subtitle { font-size: 14px; }
    .article-card { padding: 20px 18px; }
    .article-title-pl { font-size: 17px; }
    .article-summary { font-size: 14.5px; }
    .search-bar { padding: 14px 0; }
    .stats-bar .container { gap: 4px 16px; font-size: 11px; }
}

/* ─────────────────────────────────────────────── */
/* Tabs */
/* ─────────────────────────────────────────────── */
.tabs {
    background: var(--bg-muted);
    border-bottom: 1px solid var(--border);
    padding: 0;
}
.tabs .container {
    display: flex;
    gap: 4px;
    padding-top: 12px;
    padding-bottom: 0;
}
.tab-btn {
    background: transparent;
    border: 1px solid transparent;
    border-bottom: none;
    color: var(--text-muted);
    font-family: var(--sans);
    font-size: 15px;
    font-weight: 500;
    padding: 10px 20px;
    cursor: pointer;
    border-radius: 6px 6px 0 0;
    transition: background .15s, color .15s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
.tab-btn:hover {
    background: rgba(0, 170, 170, 0.08);
    color: var(--accent);
}
.tab-btn.active {
    background: var(--bg);
    border-color: var(--border);
    color: var(--text);
    font-weight: 600;
    margin-bottom: -1px;
    position: relative;
    z-index: 1;
}
.tab-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 26px;
    padding: 2px 8px;
    background: var(--border);
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 700;
    border-radius: 10px;
}
.tab-btn.active .tab-count {
    background: var(--accent);
    color: #fff;
}

/* ─────────────────────────────────────────────── */
/* Source / status badges */
/* ─────────────────────────────────────────────── */
.article-header {
    display: flex;
    gap: 8px;
    align-items: center;
    margin-bottom: 10px;
    flex-wrap: wrap;
}
.source-badge, .status-badge {
    display: inline-block;
    padding: 3px 10px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    border-radius: 3px;
    font-family: var(--mono);
}
.source-badge.pubmed   { background: #e8f4f4; color: #006666; border: 1px solid #b8dada; }
.source-badge.preprint { background: #fff4e5; color: #b87600; border: 1px solid #ffdca8; }
.source-badge.trial    { background: #e5eeff; color: #2050a0; border: 1px solid #b8cdef; }

.status-badge               { background: #f0f0f0; color: #555; border: 1px solid #ddd; }
.status-badge.status-active  { background: #e7f7e5; color: #1a7a1a; border: 1px solid #b8dfb3; }
.status-badge.status-pending { background: #fff8dc; color: #8a6c00; border: 1px solid #e8d878; }

/* Trial-specific tweaks */
.trial-card .country-tag {
    background: #eef2f7;
    color: #486080;
    font-size: 12px;
}

/* Polski journal badge */
.source-badge.journal-pl { background: #f0e5ff; color: #5a24a0; border: 1px solid #d4baff; }

/* EMA alert badge + card */
.source-badge.alert { background: #ffe5e5; color: #a02020; border: 1px solid #ffb8b8; }
.alert-card {
    border-left: 4px solid #d04040;
}
.alert-card .drug-tag {
    background: #fff0f0;
    color: #a02020;
    font-weight: 700;
    font-family: var(--mono);
    font-size: 12px;
    text-transform: lowercase;
}

/* ─────────────────────────────────────────────── */
/* Clickable cards + CTA */
/* ─────────────────────────────────────────────── */
.article-card.clickable {
    cursor: pointer;
    transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}
.article-card.clickable:hover {
    transform: translateY(-2px);
    border-color: var(--accent);
    box-shadow: 0 4px 12px rgba(0, 170, 170, 0.12);
}
.article-card.clickable:hover .article-cta {
    color: var(--accent-hover);
    padding-left: 4px;
}
.article-cta {
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px dashed var(--border);
    color: var(--accent);
    font-size: 14px;
    font-weight: 600;
    transition: color .15s, padding-left .15s;
}

/* ─────────────────────────────────────────────── */
/* Detail view */
/* ─────────────────────────────────────────────── */
.detail-view {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 28px 32px;
    margin-top: 12px;
}
.detail-view .back-link {
    display: inline-block;
    margin-bottom: 18px;
    font-size: 14px;
    color: var(--accent);
    font-weight: 600;
    border-bottom: none;
}
.detail-view .back-link:hover {
    color: var(--accent-hover);
    transform: translateX(-3px);
    transition: transform .15s, color .15s;
}
.detail-header {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}
.detail-title {
    font-size: 26px;
    line-height: 1.3;
    color: var(--text);
    margin: 0 0 8px 0;
}
.detail-title-en {
    font-size: 14px;
    color: var(--text-soft);
    margin-bottom: 20px;
    line-height: 1.4;
}
.detail-section {
    margin: 26px 0;
}
.detail-section h3 {
    font-size: 15px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.8px;
    margin-bottom: 10px;
    font-weight: 600;
}
.detail-summary {
    font-size: 17px;
    line-height: 1.65;
    color: var(--text);
}
.detail-abstract {
    background: var(--bg-muted);
    border-left: 3px solid var(--border-strong);
    padding: 14px 18px;
    font-size: 14px;
    line-height: 1.6;
    color: var(--text-muted);
    border-radius: 2px;
    white-space: pre-wrap;
}
.detail-meta {
    display: grid;
    grid-template-columns: max-content 1fr;
    gap: 8px 18px;
    font-size: 14px;
}
.detail-meta dt {
    color: var(--text-muted);
    font-weight: 600;
}
.detail-meta dd {
    color: var(--text);
    margin: 0;
    word-break: break-word;
}
.detail-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 28px;
}
.disclaimer-inline {
    background: #fffbea;
    border-left: 3px solid #e0b020;
    padding: 14px 18px;
    border-radius: 2px;
    font-size: 14px;
    color: #553f00;
}
.disclaimer-inline.urgent {
    background: #ffe8e8;
    border-left-color: #d04040;
    color: #5a1010;
}
.disclaimer-inline p { margin: 0; }

/* ─────────────────────────────────────────────── */
/* Glossary term + icon */
/* ─────────────────────────────────────────────── */
.gloss-term {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    border-bottom: 1px dotted var(--accent);
    cursor: help;
    color: inherit;
    transition: color .12s;
}
.gloss-term:hover { color: var(--accent-hover); border-bottom-color: var(--accent-hover); }
.gloss-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--accent);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    font-family: var(--mono);
    border-bottom: none;
    user-select: none;
}
.gloss-term:hover .gloss-icon { background: var(--accent-hover); }

/* ─────────────────────────────────────────────── */
/* Glossary popover */
/* ─────────────────────────────────────────────── */
.glossary-popover {
    position: absolute;
    z-index: 1000;
    max-width: 380px;
    background: #1a1a1a;
    color: #f5f5f0;
    border-radius: 8px;
    box-shadow: 0 8px 28px rgba(0,0,0,0.25);
    padding: 0;
    overflow: hidden;
    animation: popover-in .15s ease-out;
}
@keyframes popover-in {
    from { opacity: 0; transform: translateY(-6px); }
    to   { opacity: 1; transform: translateY(0); }
}
.glossary-popover .gp-head {
    background: #111;
    padding: 10px 14px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #333;
}
.glossary-popover .gp-term {
    font-family: var(--mono);
    font-weight: 700;
    font-size: 13px;
    letter-spacing: 0.5px;
    color: #4dd0d0;
    text-transform: uppercase;
}
.glossary-popover .gp-close {
    background: transparent;
    border: 0;
    color: #999;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    padding: 0 4px;
}
.glossary-popover .gp-close:hover { color: #fff; }
.glossary-popover .gp-body {
    padding: 14px 16px;
    font-size: 14px;
    line-height: 1.55;
    color: #e8e8e0;
}

/* When detail title has glossary term, the icon shouldn't dominate */
.detail-title .gloss-icon { font-size: 9px; width: 14px; height: 14px; }

/* Alert detail */
.alert-detail { border-left: 4px solid #d04040; }

/* ─────────────────────────────────────────────── */
/* Landing tiles (audience categories) */
/* ─────────────────────────────────────────────── */
.landing-section {
    background: var(--bg-card);
    border-bottom: 1px solid var(--border);
    padding: 18px 0 22px;
}
.landing-tiles {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 10px;
    margin-bottom: 14px;
}
.tile {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    gap: 4px;
    padding: 14px 12px;
    background: var(--bg-muted);
    border: 1px solid var(--border);
    border-radius: 8px;
    cursor: pointer;
    font-family: var(--sans);
    color: var(--text);
    text-align: center;
    transition: transform .12s, border-color .12s, background .12s;
}
.tile:hover:not(:disabled) {
    border-color: var(--accent);
    background: #fff;
    transform: translateY(-1px);
}
.tile.active {
    border-color: var(--accent);
    background: #e8f5f5;
    box-shadow: 0 2px 6px rgba(0, 170, 170, 0.15);
}
.tile:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}
.tile-icon { font-size: 24px; line-height: 1; }
.tile-title { font-weight: 600; font-size: 15px; }
.tile-sub { font-size: 11px; color: var(--text-muted); line-height: 1.3; }
.tile-count {
    display: inline-block;
    margin-top: 4px;
    padding: 2px 10px;
    background: var(--accent);
    color: #fff;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 700;
    font-family: var(--mono);
    min-width: 30px;
}
.tile:disabled .tile-count { background: var(--border-strong); }

/* ─────────────────────────────────────────────── */
/* Filter chips */
/* ─────────────────────────────────────────────── */
.filter-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
    padding-top: 4px;
}
.chips-label {
    font-size: 13px;
    color: var(--text-muted);
    margin-right: 6px;
    font-weight: 500;
}
.chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    background: var(--bg-muted);
    border: 1px solid var(--border);
    border-radius: 14px;
    font-size: 13px;
    color: var(--text);
    cursor: pointer;
    font-family: var(--sans);
    transition: border-color .12s, background .12s;
}
.chip:hover:not(:disabled) {
    border-color: var(--accent);
    background: #fff;
}
.chip.active {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
}
.chip:disabled { opacity: 0.4; cursor: not-allowed; }
.chip-count {
    font-size: 11px;
    font-weight: 700;
    font-family: var(--mono);
    padding: 1px 6px;
    background: rgba(0,0,0,0.08);
    border-radius: 8px;
}
.chip.active .chip-count { background: rgba(255,255,255,0.25); }

/* ─────────────────────────────────────────────── */
/* Filter summary (active filters + clear) */
/* ─────────────────────────────────────────────── */
.filter-summary {
    margin-top: 10px;
    padding: 8px 12px;
    background: #fff8e1;
    border: 1px solid #ffe082;
    border-radius: 4px;
    font-size: 13px;
    color: #665500;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
.filter-chip-active {
    padding: 2px 10px;
    background: #fff;
    border: 1px solid #e0c060;
    border-radius: 10px;
    font-weight: 600;
    color: #554400;
}
.filter-clear {
    margin-left: auto;
    background: transparent;
    border: 0;
    color: #886600;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    padding: 2px 6px;
}
.filter-clear:hover { color: #442200; text-decoration: underline; }

/* ─────────────────────────────────────────────── */
/* Detail view rich sections */
/* ─────────────────────────────────────────────── */
.detail-description p { margin: 0 0 12px 0; font-size: 15.5px; line-height: 1.65; color: var(--text); }
.detail-description p:last-child { margin-bottom: 0; }

.clean-list { list-style: none; padding: 0; margin: 0; }
.clean-list li {
    padding: 10px 14px 10px 36px;
    margin-bottom: 6px;
    background: var(--bg-muted);
    border-left: 3px solid var(--accent);
    border-radius: 3px;
    position: relative;
    font-size: 15px;
    line-height: 1.5;
}
.clean-list li::before {
    content: "•";
    position: absolute;
    left: 14px;
    top: 10px;
    color: var(--accent);
    font-weight: 700;
    font-size: 18px;
}

.practical-box {
    background: #eef9f9;
    border-left: 4px solid var(--accent);
    padding: 16px 20px;
    border-radius: 4px;
}
.practical-box h2, .questions-box h2, .limitations-box h2, .urgent-box h2 {
    color: var(--accent-hover);
    margin-bottom: 8px;
}
.practical-box p { font-size: 16px; line-height: 1.65; margin: 0; }

.questions-box {
    background: #f5f0ff;
    border-left: 4px solid #7a4dff;
    padding: 16px 20px;
    border-radius: 4px;
}
.questions-box h2 { color: #5a2db3; }
.questions-box .clean-list li { background: #fff; border-left-color: #7a4dff; }
.questions-box .clean-list li::before { content: "?"; color: #7a4dff; }

.limitations-box {
    background: #fff8ec;
    border-left: 4px solid #d0a050;
    padding: 16px 20px;
    border-radius: 4px;
}
.limitations-box h2 { color: #805520; }
.limitations-box p { font-size: 15px; color: #553700; margin: 0; }

.urgent-box {
    background: #ffeeea;
    border-left: 4px solid #d04040;
    padding: 16px 20px;
    border-radius: 4px;
}
.urgent-box h2 { color: #8a2222; }

/* ─────────────────────────────────────────────── */
/* Meta pills (audience, evidence stage) */
/* ─────────────────────────────────────────────── */
.meta-pill {
    display: inline-block;
    padding: 3px 10px;
    font-size: 11px;
    font-weight: 600;
    border-radius: 12px;
    font-family: var(--sans);
    background: #eef5f5;
    color: #335555;
    border: 1px solid #c8dcdc;
}
.audience-children       { background: #fff0f5; color: #8b2d5a; border-color: #f5c8dc; }
.audience-adults         { background: #eef2f7; color: #30466a; border-color: #c8d5e4; }
.audience-pregnancy      { background: #fff5e5; color: #804500; border-color: #f5d5a8; }
.audience-drug_resistant { background: #ffeeee; color: #8a2222; border-color: #f5b8b8; }
.audience-caregivers     { background: #eef7f0; color: #2d5a3a; border-color: #c0dcc8; }
.audience-general        { background: #f0f0f0; color: #444; border-color: #ccc; }

.evidence-approved    { background: #e5f5e8; color: #1a6a2a; border-color: #b8dfb3; }
.evidence-human_late  { background: #e8f4ff; color: #2055a0; border-color: #b8cde8; }
.evidence-human_early { background: #fff4e5; color: #805500; border-color: #f5d5a8; }
.evidence-animal      { background: #f5ecff; color: #5a28a0; border-color: #d8baf0; }
.evidence-review      { background: #f0f0f0; color: #555; border-color: #ccc; }

/* H2 in detail-section styling */
.detail-section h2 {
    font-size: 17px;
    color: var(--text);
    margin-bottom: 10px;
    margin-top: 4px;
    font-weight: 700;
    letter-spacing: normal;
    text-transform: none;
}

/* Responsive */
@media (max-width: 600px) {
    .landing-tiles { grid-template-columns: repeat(2, 1fr); }
    .detail-view { padding: 18px 16px; }
    .detail-title { font-size: 22px; }
    .detail-meta { grid-template-columns: 1fr; gap: 4px; }
    .detail-meta dt { margin-top: 8px; }
}

/* Print styles for "Drukuj do lekarza" */
@media print {
    .site-header, .stats-bar, .tabs, .search-bar, .pagination, .landing-section,
    .disclaimer-box, .site-footer, .back-link, .detail-buttons, .article-cta,
    .gloss-icon, .glossary-popover { display: none !important; }
    .detail-view { border: none; padding: 0; }
    .detail-title { font-size: 18pt; }
    a[href]::after { content: " (" attr(href) ")"; font-size: 9pt; color: #666; }
    .detail-abstract { page-break-inside: avoid; }
    body { background: white; color: black; font-size: 11pt; }
}

/* FAERS source badge + card */
.source-badge.faers { background: #fff2e5; color: #a05600; border: 1px solid #f5cfa0; }
.faers-card { border-left: 4px solid #d07030; }
.faers-card .article-summary { color: var(--text-muted); font-size: 14.5px; }
.faers-detail { border-left: 4px solid #d07030; }
