/* =====================================================================================================
   NetworkDLS - design system
   Bootstrap 5.3 provides the components; this file provides the look, in a light and a dark theme.
   ===================================================================================================== */

:root,
[data-bs-theme=light] {
    --font-sans: "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
    --font-display: "Segoe UI Variable Display", "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
    --font-mono: "Cascadia Code", "JetBrains Mono", Consolas, "SFMono-Regular", Menlo, monospace;

    --brand: #4263eb;
    --brand-strong: #364fc7;
    --brand-soft: rgba(66, 99, 235, .1);
    --accent: #0ca678;

    --surface: #ffffff;
    --surface-2: #f5f6fa;
    --surface-3: #eceef5;
    --text: #1a1e29;
    --text-muted: #5d6475;
    --border: #e1e4ee;
    --shadow-sm: 0 1px 2px rgba(20, 24, 40, .06), 0 1px 3px rgba(20, 24, 40, .04);
    --shadow: 0 10px 30px -12px rgba(20, 24, 40, .22), 0 2px 6px rgba(20, 24, 40, .05);
    --radius: 14px;
    --radius-sm: 9px;

    --hero-1: #0a0f1f;
    --hero-2: #17235a;
    --entity-tint: 96%;

    --code-bg: #f3f4f8;
    --hl-keyword: #8b2ec4;
    --hl-string: #12805c;
    --hl-number: #b35c00;
    --hl-comment: #7a8193;
    --hl-title: #2b5bd7;
    --hl-type: #b5306f;
    --hl-attr: #9a6700;

    --bs-body-bg: var(--surface-2);
    --bs-body-color: var(--text);
    --bs-body-font-family: var(--font-sans);
    --bs-border-color: var(--border);
    --bs-secondary-color: var(--text-muted);
    --bs-link-color: var(--brand);
    --bs-link-color-rgb: 66, 99, 235;
    --bs-link-hover-color: var(--brand-strong);
    --bs-link-hover-color-rgb: 54, 79, 199;
    --bs-card-bg: var(--surface);
    --bs-emphasis-color: var(--text);
}

[data-bs-theme=dark] {
    --brand: #7c94ff;
    --brand-strong: #a3b4ff;
    --brand-soft: rgba(124, 148, 255, .14);
    --accent: #38d9a9;

    --surface: #151924;
    --surface-2: #0e1118;
    --surface-3: #1d2230;
    --text: #e4e7f0;
    --text-muted: #98a0b4;
    --border: #262d3d;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, .4);
    --shadow: 0 14px 34px -14px rgba(0, 0, 0, .7), 0 2px 6px rgba(0, 0, 0, .3);

    --hero-1: #070a14;
    --hero-2: #141d4a;
    --entity-tint: 13%;

    --code-bg: #10141d;
    --hl-keyword: #c792ea;
    --hl-string: #8fd694;
    --hl-number: #f2a66b;
    --hl-comment: #6c7489;
    --hl-title: #82aaff;
    --hl-type: #f07178;
    --hl-attr: #ffcb6b;

    --bs-body-bg: var(--surface-2);
    --bs-body-color: var(--text);
    --bs-border-color: var(--border);
    --bs-secondary-color: var(--text-muted);
    --bs-link-color: var(--brand);
    --bs-link-color-rgb: 124, 148, 255;
    --bs-link-hover-color: var(--brand-strong);
    --bs-link-hover-color-rgb: 163, 180, 255;
    --bs-card-bg: var(--surface);
    --bs-emphasis-color: var(--text);
    --bs-tertiary-bg: var(--surface-3);
    --bs-secondary-bg: var(--surface-3);
}

html {
    scroll-padding-top: 5rem;
}

body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    font-feature-settings: "cv11", "ss01";
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

h1, h2, h3, .display-font {
    font-family: var(--font-display);
    letter-spacing: -.02em;
}

a {
    text-decoration: none;
}

    a:hover {
        text-decoration: underline;
        text-underline-offset: 3px;
    }

code, pre, kbd {
    font-family: var(--font-mono);
}

::selection {
    background: var(--brand-soft);
}

.site-main {
    flex: 1 0 auto;
}

.text-muted {
    color: var(--text-muted) !important;
}

/* ----- Buttons --------------------------------------------------------------------------------------- */

.btn {
    --bs-btn-border-radius: 10px;
    --bs-btn-font-weight: 600;
}

.btn-primary {
    --bs-btn-bg: var(--brand);
    --bs-btn-border-color: var(--brand);
    --bs-btn-hover-bg: var(--brand-strong);
    --bs-btn-hover-border-color: var(--brand-strong);
    --bs-btn-active-bg: var(--brand-strong);
    --bs-btn-active-border-color: var(--brand-strong);
    --bs-btn-color: #fff;
    --bs-btn-hover-color: #fff;
}

[data-bs-theme=dark] .btn-primary {
    --bs-btn-color: #0b0e16;
    --bs-btn-hover-color: #0b0e16;
}

.btn-soft {
    --bs-btn-bg: var(--brand-soft);
    --bs-btn-color: var(--brand);
    --bs-btn-border-color: transparent;
    --bs-btn-hover-bg: var(--brand);
    --bs-btn-hover-color: #fff;
    --bs-btn-active-bg: var(--brand-strong);
    --bs-btn-active-color: #fff;
}

.btn-ghost {
    --bs-btn-color: var(--text);
    --bs-btn-border-color: var(--border);
    --bs-btn-bg: var(--surface);
    --bs-btn-hover-bg: var(--surface-3);
    --bs-btn-hover-border-color: var(--border);
    --bs-btn-hover-color: var(--text);
    --bs-btn-active-bg: var(--surface-3);
}

.btn-download {
    --bs-btn-bg: var(--accent);
    --bs-btn-border-color: var(--accent);
    --bs-btn-color: #fff;
    --bs-btn-hover-bg: #099268;
    --bs-btn-hover-border-color: #099268;
    --bs-btn-hover-color: #fff;
    --bs-btn-active-bg: #087f5b;
    --bs-btn-padding-y: .7rem;
    --bs-btn-padding-x: 1.4rem;
    box-shadow: 0 8px 20px -10px rgba(12, 166, 120, .8);
}

[data-bs-theme=dark] .btn-download {
    --bs-btn-color: #04120d;
    --bs-btn-hover-color: #04120d;
    --bs-btn-hover-bg: #63e6be;
    --bs-btn-hover-border-color: #63e6be;
}

.btn-thin {
    padding: 4px 10px;
    font-size: 12px;
    line-height: 1.2;
}

.btn:focus-visible, .form-control:focus, .form-select:focus, .form-check-input:focus {
    box-shadow: 0 0 0 .2rem var(--brand-soft);
    border-color: var(--brand);
}

.form-control, .form-select {
    background-color: var(--surface);
    border-color: var(--border);
    border-radius: 10px;
}

/* ----- Header ---------------------------------------------------------------------------------------- */

.site-header {
    position: sticky;
    top: 0;
    z-index: 1030;
    background: color-mix(in srgb, var(--surface) 97%, transparent);
    border-bottom: 1px solid var(--border);
}

    .site-header .navbar {
        --bs-navbar-padding-y: .6rem;
    }

    .site-header .navbar-brand {
        display: flex;
        align-items: center;
        gap: .55rem;
        font-family: var(--font-display);
        font-weight: 700;
        font-size: 1.2rem;
        letter-spacing: -.02em;
        color: var(--text);
    }

        .site-header .navbar-brand:hover {
            text-decoration: none;
        }

    .site-header .nav-link {
        font-weight: 600;
        color: var(--text-muted);
        border-radius: 8px;
        padding: .45rem .8rem !important;
    }

        .site-header .nav-link:hover {
            color: var(--text);
            background: var(--surface-3);
            text-decoration: none;
        }

        .site-header .nav-link.active {
            color: var(--brand);
            background: var(--brand-soft);
        }

.header-search {
    position: relative;
    min-width: 240px;
}

    .header-search input {
        padding-left: 2.2rem;
        background: var(--surface-3);
        border-color: transparent;
        border-radius: 999px;
    }

        .header-search input:focus {
            background: var(--surface);
        }

    .header-search svg, .search-xl svg {
        position: absolute;
        top: 50%;
        transform: translateY(-50%);
        color: var(--text-muted);
        pointer-events: none;
    }

    .header-search svg {
        left: .8rem;
    }

.icon-button {
    width: 38px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text-muted);
}

    .icon-button:hover {
        color: var(--text);
        background: var(--surface-3);
    }

.theme-icon-dark {
    display: none;
}

[data-bs-theme=dark] .theme-icon-dark {
    display: inline;
}

[data-bs-theme=dark] .theme-icon-light {
    display: none;
}

.admin-strip {
    background: var(--surface-3);
    border-bottom: 1px solid var(--border);
    font-size: .85rem;
}

/* ----- Hero (home) ----------------------------------------------------------------------------------- */

.hero {
    position: relative;
    color: #eef1ff;
    background: radial-gradient(900px 420px at 85% -10%, rgba(99, 132, 255, .45), transparent 60%),
                radial-gradient(700px 380px at 0% 110%, rgba(12, 166, 120, .28), transparent 60%),
                linear-gradient(160deg, var(--hero-1), var(--hero-2));
    overflow: hidden;
}

    .hero::before {
        content: "";
        position: absolute;
        inset: 0;
        background-image: linear-gradient(rgba(255, 255, 255, .045) 1px, transparent 1px),
                          linear-gradient(90deg, rgba(255, 255, 255, .045) 1px, transparent 1px);
        background-size: 44px 44px;
        mask-image: radial-gradient(ellipse at 70% 30%, black 20%, transparent 75%);
        pointer-events: none;
    }

    .hero > .container {
        position: relative;
    }

    .hero h1 {
        font-size: clamp(2.2rem, 4.6vw, 3.6rem);
        font-weight: 800;
        line-height: 1.05;
    }

    .hero .lead {
        color: #c4cbe6;
        max-width: 40rem;
    }

    .hero a:not(.btn) {
        color: #fff;
    }

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    font-size: .8rem;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--brand);
}

.hero .eyebrow {
    color: #9fb1ff;
}

.gradient-text {
    background: linear-gradient(90deg, #9fb1ff, #63e6be);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.search-xl {
    position: relative;
    max-width: 40rem;
}

    .search-xl input {
        height: 3.5rem;
        padding-left: 3rem;
        padding-right: 7.5rem;
        border-radius: 14px;
        border: 1px solid rgba(255, 255, 255, .15);
        background: rgba(255, 255, 255, .96);
        color: #1a1e29;
        font-size: 1.05rem;
        box-shadow: 0 20px 40px -20px rgba(0, 0, 0, .6);
    }

    .search-xl svg {
        left: 1.1rem;
    }

    .search-xl button {
        position: absolute;
        right: .45rem;
        top: .45rem;
        bottom: .45rem;
    }

.stats {
    display: flex;
    flex-wrap: wrap;
    gap: 2.25rem;
}

.stat-value {
    font-family: var(--font-display);
    font-size: 1.9rem;
    font-weight: 800;
    line-height: 1;
    color: #fff;
}

.stat-label {
    font-size: .8rem;
    text-transform: uppercase;
    letter-spacing: .07em;
    color: #9aa4c7;
    margin-top: .35rem;
}

.spotlight {
    background: rgba(255, 255, 255, .06);
    border: 1px solid rgba(255, 255, 255, .12);
    border-radius: var(--radius);
    padding: 1.5rem;
}

    .spotlight .text-muted {
        color: #a9b2d2 !important;
    }

    /* Slides keep the same height so the hero does not jump while the carousel rotates. */
    .spotlight-description {
        display: -webkit-box;
        -webkit-line-clamp: 3;
        -webkit-box-orient: vertical;
        overflow: hidden;
        min-height: 4.5em;
    }

.carousel-nav {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, .18);
    background: rgba(255, 255, 255, .06);
    color: #dfe4ff;
    font-size: 1.3rem;
    line-height: 1;
}

    .carousel-nav:hover {
        background: rgba(255, 255, 255, .16);
        color: #fff;
    }

.spotlight-indicators {
    position: static;
    justify-content: flex-start;
    margin: 1.25rem 0 0;
    gap: .4rem;
}

    .spotlight-indicators [data-bs-target] {
        width: 22px;
        height: 4px;
        margin: 0;
        border: 0;
        border-radius: 999px;
        background: #fff;
        opacity: .3;
        transition: width .2s ease, opacity .2s ease;
    }

    .spotlight-indicators .active {
        width: 36px;
        opacity: .9;
    }

/* ----- Sections -------------------------------------------------------------------------------------- */

.section {
    padding: 3.5rem 0;
}

    .section + .section {
        padding-top: 0;
    }

.section-head {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.25rem;
}

    .section-head h2 {
        font-size: 1.6rem;
        font-weight: 800;
        margin: 0;
    }

    .section-head p {
        margin: .25rem 0 0;
        color: var(--text-muted);
    }

.see-all {
    font-weight: 600;
    white-space: nowrap;
}

.page-head {
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    padding: 2.25rem 0 1.75rem;
}

    .page-head h1 {
        font-weight: 800;
        font-size: clamp(1.8rem, 3vw, 2.4rem);
        margin: 0;
    }

    .page-head .lead {
        color: var(--text-muted);
        margin: .4rem 0 0;
        font-size: 1.05rem;
    }

/* ----- App icon (monogram) -------------------------------------------------------------------------- */

.app-icon {
    --size: 46px;
    width: var(--size);
    height: var(--size);
    flex: 0 0 var(--size);
    border-radius: 24%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-display);
    font-weight: 800;
    font-size: calc(var(--size) * .38);
    letter-spacing: -.02em;
    color: #fff;
    background: linear-gradient(140deg, hsl(var(--h) 78% 60%), hsl(calc(var(--h) + 38) 72% 42%));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .35), 0 6px 14px -8px hsl(var(--h) 70% 35%);
    text-shadow: 0 1px 1px rgba(0, 0, 0, .18);
    user-select: none;
}

    .app-icon.sm {
        --size: 32px;
    }

    .app-icon.lg {
        --size: 76px;
    }

    .app-icon.article {
        background: linear-gradient(140deg, hsl(var(--h) 30% 55%), hsl(calc(var(--h) + 20) 30% 38%));
    }

/* ----- Cards ----------------------------------------------------------------------------------------- */

.soft-card {
    position: relative;
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: 1.25rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;
}

    .soft-card:hover {
        transform: translateY(-3px);
        box-shadow: var(--shadow);
        border-color: color-mix(in srgb, var(--brand) 35%, var(--border));
    }

    .soft-card h3 {
        font-size: 1.08rem;
        font-weight: 700;
        margin: 0;
        line-height: 1.25;
    }

    .soft-card .stretched-link {
        color: var(--text);
    }

        .soft-card .stretched-link:hover {
            text-decoration: none;
        }

    .soft-card .description {
        color: var(--text-muted);
        font-size: .93rem;
        margin: .85rem 0 1rem;
        display: -webkit-box;
        -webkit-line-clamp: 3;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    .soft-card .meta {
        margin-top: auto;
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        gap: .4rem 1rem;
        font-size: .8rem;
        color: var(--text-muted);
        border-top: 1px solid var(--border);
        padding-top: .8rem;
    }

    .soft-card .tags {
        position: relative;
        z-index: 2;
        display: flex;
        flex-wrap: wrap;
        gap: .35rem;
        margin-bottom: .9rem;
    }

.version-pill {
    display: inline-block;
    font-size: .72rem;
    font-weight: 700;
    padding: .18rem .5rem;
    border-radius: 6px;
    background: var(--brand-soft);
    color: var(--brand);
    font-family: var(--font-mono);
    vertical-align: middle;
}

.status-dot {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
}

    .status-dot::before {
        content: "";
        width: 7px;
        height: 7px;
        border-radius: 50%;
        background: var(--dot, #adb5bd);
    }

    .status-dot.stable {
        --dot: #12b886;
    }

    .status-dot.pre-release, .status-dot.experimental {
        --dot: #fab005;
    }

    .status-dot.antique {
        --dot: #fa5252;
    }

    .status-dot.planned, .status-dot.unreleased {
        --dot: #4c6ef5;
    }

.featured-ribbon {
    position: absolute;
    top: 1rem;
    right: 1rem;
    font-size: .68rem;
    font-weight: 800;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: #b08800;
    background: rgba(250, 176, 5, .14);
    border-radius: 6px;
    padding: .2rem .45rem;
}

/* ----- Topic chips ----------------------------------------------------------------------------------- */

.chip {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    padding: .3rem .75rem;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text);
    font-size: .85rem;
    font-weight: 600;
    line-height: 1.3;
    cursor: pointer;
    transition: background .12s ease, border-color .12s ease, color .12s ease;
}

    .chip:hover {
        text-decoration: none;
        border-color: var(--brand);
        color: var(--brand);
    }

    .chip .count {
        font-size: .72rem;
        color: var(--text-muted);
        background: var(--surface-3);
        border-radius: 999px;
        padding: 0 .45rem;
    }

    .chip.active, .chip[aria-pressed=true] {
        background: var(--brand);
        border-color: var(--brand);
        color: #fff;
    }

        .chip.active .count, .chip[aria-pressed=true] .count {
            background: rgba(255, 255, 255, .25);
            color: #fff;
        }

.chip-sm {
    padding: .1rem .55rem;
    font-size: .74rem;
    font-weight: 600;
    color: var(--text-muted);
    background: var(--surface-3);
    border-color: transparent;
}

.hero .chip {
    background: rgba(255, 255, 255, .08);
    border-color: rgba(255, 255, 255, .14);
    color: #dfe4ff;
}

    .hero .chip:hover {
        background: rgba(255, 255, 255, .16);
        color: #fff;
    }

/* ----- Most downloaded ------------------------------------------------------------------------------- */

.rank-list {
    list-style: none;
    margin: 0;
    padding: 0;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
}

    .rank-list li {
        position: relative;
        display: flex;
        align-items: center;
        gap: .9rem;
        padding: .8rem 1.1rem;
        border-top: 1px solid var(--border);
    }

        .rank-list li:first-child {
            border-top: 0;
        }

        .rank-list li:hover {
            background: var(--surface-3);
        }

    .rank-list .rank {
        width: 1.6rem;
        font-weight: 800;
        color: var(--text-muted);
        font-variant-numeric: tabular-nums;
    }

    .rank-list .name {
        font-weight: 700;
        color: var(--text);
    }

    .rank-list .bar {
        height: 6px;
        border-radius: 999px;
        background: var(--surface-3);
        overflow: hidden;
        margin-top: .4rem;
    }

        .rank-list .bar span {
            display: block;
            height: 100%;
            border-radius: inherit;
            background: linear-gradient(90deg, var(--brand), var(--accent));
        }

    .rank-list .downloads {
        font-weight: 800;
        font-variant-numeric: tabular-nums;
        white-space: nowrap;
    }

/* ----- Article rows ---------------------------------------------------------------------------------- */

.article-list {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
}

.article-row {
    position: relative;
    display: flex;
    gap: 1rem;
    padding: 1.1rem 1.25rem;
    border-top: 1px solid var(--border);
}

    .article-row:first-child {
        border-top: 0;
    }

    .article-row:hover {
        background: var(--surface-3);
    }

    .article-row h3 {
        font-size: 1.05rem;
        font-weight: 700;
        margin: 0 0 .2rem;
    }

    .article-row .stretched-link {
        color: var(--text);
    }

    .article-row p {
        margin: 0;
        color: var(--text-muted);
        font-size: .93rem;
    }

/* ----- Catalog (filterable listing) ------------------------------------------------------------------ */

.catalog-toolbar {
    position: sticky;
    top: 61px;
    z-index: 1010;
    background: var(--surface-2);
    padding: 1rem 0 .75rem;
    border-bottom: 1px solid var(--border);
}

.catalog-filter {
    position: relative;
    flex: 1 1 260px;
}

    .catalog-filter input {
        padding-left: 2.4rem;
        height: 2.75rem;
    }

    .catalog-filter svg {
        position: absolute;
        left: .9rem;
        top: 50%;
        transform: translateY(-50%);
        color: var(--text-muted);
    }

.chip-scroller {
    display: flex;
    gap: .4rem;
    overflow-x: auto;
    padding: .75rem 0 .25rem;
    scrollbar-width: thin;
}

    .chip-scroller .chip {
        flex: 0 0 auto;
    }

.catalog-count {
    font-size: .9rem;
    color: var(--text-muted);
}

/* ----- Live search and pager (server-paged lists such as Manage/Entities) --------------------------- */

.live-search {
    max-width: 40rem;
    margin: 0 auto;
}

/* Dimmed while a search is loading; the updated results arrive without aria-busy. */
.live-results {
    transition: opacity .15s ease-in-out;
}

    .live-results[aria-busy=true] {
        opacity: .5;
    }

.pager .pagination {
    --bs-pagination-color: var(--brand);
    --bs-pagination-bg: var(--surface);
    --bs-pagination-border-color: var(--border);
    --bs-pagination-hover-color: var(--brand-strong);
    --bs-pagination-hover-bg: var(--brand-soft);
    --bs-pagination-hover-border-color: var(--border);
    --bs-pagination-focus-color: var(--brand-strong);
    --bs-pagination-focus-bg: var(--brand-soft);
    --bs-pagination-active-bg: var(--brand);
    --bs-pagination-active-border-color: var(--brand);
    --bs-pagination-disabled-color: var(--text-muted);
    --bs-pagination-disabled-bg: var(--surface);
    --bs-pagination-disabled-border-color: var(--border);
    --bs-pagination-border-radius: var(--radius-sm);
    flex-wrap: wrap;
}

    .pager .page-link {
        min-width: 2.1rem;
        text-align: center;
    }

.empty-state {
    text-align: center;
    padding: 4rem 1rem;
    color: var(--text-muted);
}

    .empty-state .big {
        font-size: 2.5rem;
        line-height: 1;
        margin-bottom: .75rem;
    }

[hidden] {
    display: none !important;
}

/* ----- Entity page ----------------------------------------------------------------------------------- */

.entity-hero {
    background: radial-gradient(800px 300px at 15% -40%, hsl(var(--h) 85% 60% / .28), transparent 70%),
                linear-gradient(180deg, hsl(var(--h) 60% var(--entity-tint)), var(--surface-2));
    border-bottom: 1px solid var(--border);
    padding: 2.5rem 0 2rem;
}

    .entity-hero h1 {
        font-size: clamp(1.9rem, 3.4vw, 2.75rem);
        font-weight: 800;
        margin: 0;
    }

    .entity-hero .lead {
        color: var(--text-muted);
        font-size: 1.12rem;
        margin: .5rem 0 0;
        max-width: 48rem;
    }

.crumbs {
    font-size: .85rem;
    margin-bottom: 1.1rem;
    color: var(--text-muted);
}

    .crumbs a {
        color: var(--text-muted);
        font-weight: 600;
    }

    .crumbs span {
        margin: 0 .4rem;
    }

.hero-meta {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem 1.25rem;
    margin-top: 1rem;
    font-size: .9rem;
    color: var(--text-muted);
}

    .hero-meta strong {
        color: var(--text);
    }

.panel {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.25rem;
    box-shadow: var(--shadow-sm);
}

    .panel + .panel {
        margin-top: 1rem;
    }

    .panel h2 {
        font-size: .78rem;
        font-weight: 800;
        letter-spacing: .08em;
        text-transform: uppercase;
        color: var(--text-muted);
        margin: 0 0 .9rem;
        font-family: var(--font-sans);
    }

.detail-list {
    margin: 0;
    display: grid;
    grid-template-columns: auto 1fr;
    gap: .55rem 1rem;
    font-size: .92rem;
}

    .detail-list dt {
        font-weight: 600;
        color: var(--text-muted);
    }

    .detail-list dd {
        margin: 0;
        text-align: right;
        font-weight: 600;
        overflow-wrap: anywhere;
    }

.related-link {
    display: flex;
    align-items: center;
    gap: .7rem;
    padding: .45rem .3rem;
    border-radius: 10px;
    color: var(--text);
}

    .related-link:hover {
        background: var(--surface-3);
        text-decoration: none;
    }

    .related-link small {
        display: block;
        color: var(--text-muted);
        font-size: .78rem;
        line-height: 1.3;
    }

.sticky-aside {
    position: sticky;
    top: 80px;
}

.content-panel {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: clamp(1.25rem, 3vw, 2.25rem);
    box-shadow: var(--shadow-sm);
}

/* ----- Releases -------------------------------------------------------------------------------------- */

.timeline {
    position: relative;
    padding-left: 1.75rem;
}

    .timeline::before {
        content: "";
        position: absolute;
        left: .45rem;
        top: .5rem;
        bottom: .5rem;
        width: 2px;
        background: var(--border);
    }

.timeline-item {
    position: relative;
    margin-bottom: 1.25rem;
}

    .timeline-item::before {
        content: "";
        position: absolute;
        left: -1.6rem;
        top: 1.45rem;
        width: 12px;
        height: 12px;
        border-radius: 50%;
        background: var(--surface);
        border: 3px solid var(--brand);
    }

    .timeline-item.recommended::before {
        border-color: var(--accent);
        background: var(--accent);
    }

.file-row {
    display: flex;
    align-items: center;
    gap: .9rem;
    padding: .8rem 1rem;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--surface);
}

    .file-row + .file-row {
        margin-top: .6rem;
    }

    .file-row .file-icon {
        width: 38px;
        height: 38px;
        border-radius: 10px;
        background: var(--brand-soft);
        color: var(--brand);
        display: inline-flex;
        align-items: center;
        justify-content: center;
        flex: 0 0 38px;
    }

/* ----- Rendered markdown ----------------------------------------------------------------------------- */

.wiki-body {
    font-size: 1.02rem;
    line-height: 1.7;
    overflow-wrap: break-word;
}

    .wiki-body > :first-child {
        margin-top: 0;
    }

    .wiki-body h1, .wiki-body h2, .wiki-body h3, .wiki-body h4 {
        font-weight: 750;
        margin: 2rem 0 .8rem;
        line-height: 1.25;
    }

    .wiki-body h1 {
        font-size: 1.9rem;
    }

    .wiki-body h2 {
        font-size: 1.45rem;
        padding-bottom: .4rem;
        border-bottom: 1px solid var(--border);
    }

    .wiki-body h3 {
        font-size: 1.2rem;
    }

    .wiki-body img, .wiki-body video, .responsive-img {
        max-width: 100%;
        height: auto;
    }

    .wiki-body p > img:only-child, .wiki-body p > a:only-child > img:only-child, .wiki-body > img, .wiki-body video {
        border-radius: 10px;
        box-shadow: var(--shadow-sm);
    }

    .wiki-body :not(pre) > code {
        font-size: .88em;
        background: var(--code-bg);
        border: 1px solid var(--border);
        border-radius: 6px;
        padding: .1em .35em;
        color: inherit;
    }

    .wiki-body pre {
        background: var(--code-bg);
        border: 1px solid var(--border);
        border-radius: 12px;
        padding: 1rem 1.15rem;
        font-size: .88rem;
        line-height: 1.55;
        overflow-x: auto;
    }

        .wiki-body pre code.hljs {
            background: transparent;
            padding: 0;
        }

    .wiki-body blockquote {
        border-left: 4px solid var(--brand);
        background: var(--brand-soft);
        padding: .75rem 1rem;
        border-radius: 0 10px 10px 0;
        color: var(--text);
    }

        .wiki-body blockquote > :last-child {
            margin-bottom: 0;
        }

    .wiki-body table {
        width: 100%;
        margin: 1.25rem 0;
        border-collapse: separate;
        border-spacing: 0;
        border: 1px solid var(--border);
        border-radius: 10px;
        overflow: hidden;
        font-size: .93rem;
        display: block;
        overflow-x: auto;
    }

    .wiki-body th, .wiki-body td {
        padding: .55rem .8rem;
        border-top: 1px solid var(--border);
    }

    .wiki-body th {
        background: var(--surface-3);
        border-top: 0;
    }

    .wiki-body ul, .wiki-body ol {
        padding-left: 1.4rem;
    }

    .wiki-body li + li {
        margin-top: .25rem;
    }

    .wiki-body hr {
        border-color: var(--border);
        opacity: 1;
        margin: 2rem auto;
    }

    .wiki-body .task-list-item {
        list-style: none;
    }

/* Syntax highlighting (highlight.js classes), follows the theme. */
.hljs {
    color: var(--text);
}

.hljs-keyword, .hljs-selector-tag, .hljs-built_in, .hljs-literal {
    color: var(--hl-keyword);
}

.hljs-string, .hljs-regexp, .hljs-addition, .hljs-template-string {
    color: var(--hl-string);
}

.hljs-number, .hljs-symbol, .hljs-bullet {
    color: var(--hl-number);
}

.hljs-comment, .hljs-quote, .hljs-meta {
    color: var(--hl-comment);
}

.hljs-title, .hljs-section, .hljs-function .hljs-title, .hljs-title.function_ {
    color: var(--hl-title);
}

.hljs-type, .hljs-class .hljs-title, .hljs-title.class_, .hljs-tag, .hljs-name {
    color: var(--hl-type);
}

.hljs-attr, .hljs-attribute, .hljs-variable, .hljs-params, .hljs-property {
    color: var(--hl-attr);
}

.hljs-deletion {
    color: #e03131;
}

/* GitHub style alerts: > [!NOTE] */
.markdown-alert {
    padding: .75rem 1rem;
    margin-bottom: 1rem;
    border-left: .25rem solid var(--border);
    border-radius: 0 10px 10px 0;
    background: var(--surface-3);
}

    .markdown-alert > .markdown-alert-title {
        font-weight: 700;
        margin-bottom: .25rem;
    }

    .markdown-alert > :last-child {
        margin-bottom: 0;
    }

.markdown-alert-note { border-color: #4263eb; }
.markdown-alert-tip { border-color: #0ca678; }
.markdown-alert-important { border-color: #7950f2; }
.markdown-alert-warning { border-color: #f59f00; }
.markdown-alert-caution { border-color: #e03131; }

/* Wiki functions: {{Callout}} */
.bd-callout {
    padding: 1.1rem 1.25rem;
    margin: 1.25rem 0;
    border: 1px solid var(--border);
    border-left-width: .25rem;
    border-radius: 10px;
    background: var(--surface);
}

    .bd-callout h4 {
        margin-top: 0;
        margin-bottom: .25rem;
    }

    .bd-callout p:last-child {
        margin-bottom: 0;
    }

.bd-callout-info { border-left-color: #22b8cf; }
.bd-callout-warning { border-left-color: #f59f00; }
.bd-callout-danger { border-left-color: #e03131; }
.bd-callout-primary { border-left-color: var(--brand); }
.bd-callout-secondary, .bd-callout-default { border-left-color: #868e96; }
.bd-callout-success { border-left-color: #0ca678; }

/* ----- Misc (admin and legacy classes) --------------------------------------------------------------- */

.badge-outline, .badge-tag {
    display: inline-block;
    padding: .35em .65em;
    font-size: .75em;
    font-weight: 600;
    border: 1px solid var(--border);
    background-color: transparent;
    color: inherit;
    border-radius: 999px;
    line-height: 1;
    white-space: nowrap;
}

.fixedTable100 {
    width: 100%;
}

.table {
    --bs-table-bg: var(--surface);
}

.card {
    --bs-card-border-color: var(--border);
    --bs-card-border-radius: var(--radius);
    --bs-card-cap-bg: var(--surface-3);
}

/* ----- Footer ---------------------------------------------------------------------------------------- */

.site-footer {
    margin-top: 4rem;
    background: var(--surface);
    border-top: 1px solid var(--border);
    padding: 3rem 0 1.5rem;
    font-size: .92rem;
}

    .site-footer h2 {
        font-size: .78rem;
        font-weight: 800;
        letter-spacing: .08em;
        text-transform: uppercase;
        color: var(--text-muted);
        margin-bottom: .9rem;
        font-family: var(--font-sans);
    }

    .site-footer ul {
        list-style: none;
        padding: 0;
        margin: 0;
    }

    .site-footer li + li {
        margin-top: .45rem;
    }

    .site-footer a {
        color: var(--text);
    }

        .site-footer a:hover {
            color: var(--brand);
        }

    .site-footer .fine {
        border-top: 1px solid var(--border);
        margin-top: 2.5rem;
        padding-top: 1.25rem;
        color: var(--text-muted);
        font-size: .85rem;
    }

    .site-footer .link-button {
        background: none;
        border: 0;
        padding: 0;
        color: var(--text);
    }

        .site-footer .link-button:hover {
            color: var(--brand);
            text-decoration: underline;
        }

#blazor-error-ui {
    background: lightyellow;
    color: #1a1e29;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, .2);
    display: none;
    left: 0;
    padding: .6rem 1.25rem .7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}

    #blazor-error-ui .dismiss {
        cursor: pointer;
        position: absolute;
        right: .75rem;
        top: .5rem;
    }

@media (max-width: 991.98px) {
    .catalog-toolbar {
        top: 57px;
    }

    .header-search {
        min-width: 0;
        width: 100%;
        margin: .5rem 0;
    }

    .section {
        padding: 2.5rem 0;
    }
}

@media (prefers-reduced-motion: reduce) {
    .soft-card, .chip {
        transition: none;
    }

        .soft-card:hover {
            transform: none;
        }
}

.min-w-0 {
    min-width: 0;
}

@media (max-width: 575.98px) {
    .stats {
        gap: 1.1rem;
    }

    .stat-value {
        font-size: 1.45rem;
    }

    .stat-label {
        font-size: .68rem;
    }
}

/* An uploaded icon (always a square PNG) in the same box as the monogram. */
.app-icon.has-image {
    background: var(--surface);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    padding: calc(var(--size) * .08); /* A percentage would be relative to the parent, not the icon. */
}

    .app-icon.has-image img {
        width: 100%;
        height: 100%;
        object-fit: contain;
        display: block;
    }

.icon-editor .preview {
    width: 96px;
    height: 96px;
    border-radius: 24%;
    border: 1px dashed var(--border);
    background: var(--surface-3);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

    .icon-editor .preview img {
        width: 100%;
        height: 100%;
        object-fit: contain;
    }
