/* ============================================================
   Trei Surse — topics index page specific styles
   Builds on top of css/main.css (.card, .tag), css/homepage.css
   (shared chrome) and css/story.css (.story-back). Adds only
   what's specific to the topics listing page.
   ============================================================ */

/* ---- header ---- */
.topics-header {
    padding-bottom: 28px;
}

.topics-header__title {
    margin: 0 0 10px;
    font-size: 2rem;
    line-height: 1.2;
    letter-spacing: -0.03em;
}

.topics-header__meta {
    margin: 0;
    color: var(--color-text-secondary);
    font-size: 0.95rem;
}

/* ---- topic grid ---- */
.topic-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 16px;
    margin-bottom: 40px;
}

.topic-card {
    display: block;
    padding: 20px;
}

.topic-card__title-link {
    display: block;
    text-decoration: none;
    color: inherit;
}

.topic-card__title {
    margin: 0 0 12px;
    font-size: 1.05rem;
    font-weight: 800;
    letter-spacing: -0.01em;
}

.topic-card__subtopics {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.topic-card__subtopic {
    text-decoration: none;
    cursor: pointer;
    transition: background 150ms ease, color 150ms ease;
}

.topic-card__subtopic:hover {
    background: color-mix(in srgb, var(--color-teal) 18%, transparent);
    color: var(--color-teal);
}

.topic-card__empty {
    margin: 0;
    color: var(--color-text-muted);
    font-size: 0.82rem;
}

/* ---- responsive ---- */
@media (max-width: 768px) {
    .topics-header__title {
        font-size: 1.6rem;
    }
}
