/* Granularity / coherence enhancements (Batch A).
 * Kept in a separate sheet to avoid edit contention on style.css.
 * Uses the theme variables already defined in style.css. */

/* --- Paper Detail: subfield badge in meta row --- */
.pd-subfield {
    display: inline-block;
    padding: 2px 8px;
    border: 1px solid var(--border);
    border-radius: 10px;
    font-size: 0.8rem;
    color: var(--text-muted);
    background: var(--bg-badge-other, transparent);
}

/* --- Paper Detail: impact profile meters (foundational / hub / velocity) --- */
.pd-impact { display: flex; flex-direction: column; gap: 10px; max-width: 560px; }
.pd-impact-row {
    display: grid;
    grid-template-columns: 110px 1fr 64px 52px;
    align-items: center;
    gap: 10px;
    font-size: 0.9rem;
}
.pd-impact-label { color: var(--text-primary); font-weight: 600; }
.pd-impact-bar {
    position: relative;
    height: 8px;
    border-radius: 4px;
    background: var(--bg-hover-row, rgba(128,128,128,0.15));
    overflow: hidden;
}
.pd-impact-fill {
    position: absolute;
    left: 0; top: 0; bottom: 0;
    background: var(--accent);
    border-radius: 4px;
}
.pd-impact-pct { color: var(--text-primary); font-variant-numeric: tabular-nums; text-align: right; }
.pd-impact-raw { color: var(--text-muted); font-variant-numeric: tabular-nums; text-align: right; font-size: 0.82rem; }

/* --- Semantic results: clickable journal + subfield tag --- */
.sem-journal { color: var(--accent); cursor: pointer; text-decoration: none; }
.sem-journal:hover { text-decoration: underline; }
.sem-subfield {
    display: inline-block;
    padding: 1px 6px;
    border-radius: 8px;
    border: 1px solid var(--border);
    font-size: 0.78rem;
    color: var(--text-muted);
}

/* --- Theory / Fields cards: discipline distribution mini-bar --- */
.disc-mini {
    display: flex;
    height: 8px;
    width: 100%;
    border-radius: 4px;
    overflow: hidden;
    margin-top: 8px;
    background: var(--bg-hover-row, rgba(128,128,128,0.12));
}
.disc-mini-seg { height: 100%; }
.disc-mini-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 12px;
    margin-top: 6px;
    font-size: 0.75rem;
    color: var(--text-muted);
}
.disc-mini-legend span { white-space: nowrap; }
.disc-mini-dot {
    display: inline-block;
    width: 8px; height: 8px;
    border-radius: 2px;
    margin-right: 4px;
    vertical-align: middle;
}

/* --- Coherence cross-links (Batch B): paper -> schools / field --- */
.coh-links-host { margin-top: 14px; }
.coh-heading { font-size: 1rem; margin: 0 0 8px; color: var(--text-primary); }
.coh-block { display: flex; flex-direction: column; gap: 8px; margin-top: 6px; }
.coh-row { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.coh-row-label {
    flex: 0 0 110px;
    font-size: 0.8rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.03em;
}
.coh-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.coh-school-chip, .coh-field-chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 2px 9px;
    border-radius: 12px;
    border: 1px solid var(--border);
    font-size: 0.82rem;
    color: var(--accent);
    background: var(--bg-badge-other, transparent);
    text-decoration: none;
    cursor: pointer;
    line-height: 1.5;
}
.coh-school-chip:hover, .coh-field-chip:hover {
    border-color: var(--accent);
    background: var(--bg-hover-row, rgba(37,99,235,0.08));
}
.coh-school-share {
    font-size: 0.72rem;
    color: var(--text-muted);
    font-variant-numeric: tabular-nums;
}
.coh-field-chip { color: var(--text-primary); font-weight: 600; }
.coh-field-static { cursor: default; }
.coh-field-static:hover { border-color: var(--border); background: var(--bg-badge-other, transparent); }
