/*
 * Sylo hub chrome — always-on styling for the navigation regions Sylo injects
 * into content: the pillar "Explore {topic}" silo index, the cluster "Part of
 * {pillar}" back-link, and the Topics index page. These are elements Sylo writes
 * into post content, so the active theme has no selectors for them; this sheet
 * gives them sane spacing and a light, theme-agnostic treatment that inherits
 * the theme's own font and link colors (never hard-codes them). Low specificity
 * throughout so a theme can override anything.
 */

/* ── Silo index: "Explore {topic}" list on a pillar ─────────────────────── */
.sylo-silo-index {
    margin-top: 2.5em;
    padding-top: 1.2em;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
}
.sylo-silo-index > h2,
.sylo-silo-index .sylo-silo-index-heading {
    margin: 0 0 0.6em;
    font-size: 1.15em;
}
.sylo-silo-index ul {
    margin: 0;
    padding-left: 1.1em;
}
.sylo-silo-index li {
    margin: 0.35em 0;
}

/* ── Cluster back-link: "Part of {pillar}" breadcrumb strip ─────────────── */
.sylo-hub {
    margin: 0 0 1.5em;
    padding: 0.5em 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    font-size: 0.85em;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    opacity: 0.85;
}
.sylo-hub p {
    margin: 0;
}
.sylo-hub a {
    text-decoration: none;
    border-bottom: 1px solid currentColor;
}

/* ── Topics index page: per-topic hub list ──────────────────────────────── */
.sylo-topics-index {
    margin: 1.5em 0;
}
.sylo-topics-index > ul,
.sylo-topics-index .sylo-topics-index-list {
    list-style: none;
    margin: 0;
    padding: 0;
}
.sylo-topics-index li {
    margin: 0 0 1.4em;
}
.sylo-topics-index li > a,
.sylo-topics-index h2 {
    font-size: 1.1em;
    font-weight: 600;
}
.sylo-topics-index p {
    margin: 0.25em 0 0;
    opacity: 0.8;
}

/* ── Card grid: blog index + Topics hub ─────────────────────────────────── */
/* Shared by BlogIndex (archive takeover) and TopicsIndex (hub page). Inherits
   the theme's font + link colors; only the card surface/border/placeholder use
   neutral tokens a theme can override. */
.sylo-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1.5em;
    margin: 1.5em 0;
    padding: 0;
    list-style: none;
}
.sylo-card {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 10px;
    background: rgba(0, 0, 0, 0.015);
}
.sylo-card-media {
    display: block;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    line-height: 0;
    background: rgba(0, 0, 0, 0.05);
}
.sylo-card-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
/* CSS-only placeholder when a post has no featured image. */
.sylo-card-ph {
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.06), rgba(0, 0, 0, 0.14));
}
.sylo-card-ph-initial {
    font-size: 2.4em;
    font-weight: 700;
    line-height: 1;
    opacity: 0.55;
}
.sylo-card-body {
    display: flex;
    flex-direction: column;
    gap: 0.4em;
    padding: 1em 1.1em 1.2em;
}
.sylo-card-chip {
    align-self: flex-start;
    font-size: 0.72em;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    opacity: 0.7;
}
.sylo-card-title {
    margin: 0;
    font-size: 1.15em;
    font-weight: 600;
    line-height: 1.3;
}
.sylo-card-title a {
    text-decoration: none;
}
.sylo-card-dek {
    margin: 0;
    font-size: 0.92em;
    line-height: 1.45;
    opacity: 0.8;
}
.sylo-card-date {
    font-size: 0.78em;
    opacity: 0.6;
}
.sylo-card-featured {
    border-color: rgba(0, 0, 0, 0.16);
}

/* Blog index archive wrapper + pagination. */
.sylo-archive-inner {
    margin: 0 auto;
}
.sylo-archive-pillars {
    margin-bottom: 0.5em;
}
.sylo-archive-empty {
    opacity: 0.7;
}
.sylo-archive-pagination {
    margin: 2em 0 1em;
}
.sylo-archive-pagination ul {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4em;
    margin: 0;
    padding: 0;
    list-style: none;
}
.sylo-archive-pagination a,
.sylo-archive-pagination span {
    display: inline-block;
    padding: 0.4em 0.75em;
    border: 1px solid rgba(0, 0, 0, 0.12);
    border-radius: 6px;
    text-decoration: none;
    line-height: 1;
}
.sylo-archive-pagination .current {
    font-weight: 700;
    border-color: currentColor;
}

/* Topics hub now renders a card grid, so drop the old list's bottom spacing. */
.sylo-topics-index .sylo-cards {
    margin: 1em 0 0;
}

@media (prefers-color-scheme: dark) {
    .sylo-silo-index {
        border-top-color: rgba(255, 255, 255, 0.15);
    }
    .sylo-hub {
        border-bottom-color: rgba(255, 255, 255, 0.12);
    }
    .sylo-card {
        border-color: rgba(255, 255, 255, 0.14);
        background: rgba(255, 255, 255, 0.03);
    }
    .sylo-card-media {
        background: rgba(255, 255, 255, 0.06);
    }
    .sylo-card-ph {
        background: linear-gradient(135deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.16));
    }
    .sylo-card-featured {
        border-color: rgba(255, 255, 255, 0.22);
    }
    .sylo-archive-pagination a,
    .sylo-archive-pagination span {
        border-color: rgba(255, 255, 255, 0.18);
    }
}
