.demo-directory {
    --demo-violet: var(--accent);
    --demo-violet-dark: var(--accent-strong);
    background: #fff;
    color: #161616;
}

.demo-directory a:focus-visible {
    outline-color: var(--demo-violet);
}

.demo-hero {
    padding: clamp(47px, 7vw, 105px) 0 clamp(48px, 6vw, 86px);
    background:
        radial-gradient(ellipse at 40% 42%, #e6edfd 0%, transparent 74%),
        radial-gradient(ellipse at 78% 25%, #eff2ff 0%, transparent 69%);
    text-align: center;
}

.demo-hero--preview {
    position: relative;
    background: linear-gradient(180deg, #fff 0%, #e6edfd 50%, #fff 100%);
}

.demo-breadcrumb {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 4px 8px;
    margin: 0 0 18px;
    color: #51515a;
    font-size: .93rem;
}

.demo-breadcrumb a {
    text-underline-offset: .2em;
}

.demo-kicker {
    margin: 0 0 7px;
    font-size: clamp(1.02rem, 2vw, 1.5rem);
    font-weight: 400;
    line-height: 1.3;
}

.demo-hero h1 {
    margin: 0 0 16px;
    color: #101010;
    font-size: clamp(2.7rem, 6.3vw, 5rem);
    font-weight: 500;
    line-height: 1.1;
    overflow-wrap: anywhere;
}

.demo-lead {
    max-width: 46rem;
    margin: 0 auto 28px;
    color: #333;
    font-size: 18px;
    line-height: 1.5;
}

.demo-hero-actions {
    display: flex;
    align-items: stretch;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
}

.demo-button {
    display: inline-flex;
    width: fit-content;
    align-items: center;
    justify-content: center;
    gap: 9px;
    min-height: 46px;
    padding: 10px 20px;
    border: 1px solid var(--demo-violet);
    border-radius: 50px;
    background: var(--demo-violet);
    color: #fff;
    font-weight: 500;
    line-height: 1.2;
    text-decoration: none;
}

.demo-button:hover {
    border-color: var(--demo-violet-dark);
    background: var(--demo-violet-dark);
}

.demo-button--outline {
    background: #fff;
    color: var(--demo-violet);
}

.demo-button--outline:hover {
    background: #f1efff;
    color: var(--demo-violet-dark);
}

.demo-listing {
    padding: clamp(40px, 7vw, 90px) 0 clamp(50px, 8vw, 120px);
    background: linear-gradient(180deg, transparent 0%, #e6edfd 56%, transparent 100%);
    scroll-margin-top: calc(var(--site-header-offset, 128px) + 18px);
}

.demo-listing h2 {
    margin: 0;
    color: #101010;
    font-size: clamp(2.1rem, 4.3vw, 3.7rem);
    font-weight: 500;
    line-height: 1.12;
    text-align: center;
}

.demo-listing-lead {
    margin: 12px 0 0;
    color: #454545;
    line-height: 1.55;
    text-align: center;
}

.demo-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-items: stretch;
    gap: clamp(17px, 3vw, 35px);
    margin: 30px 0 0;
    padding: 0;
    list-style: none;
}

.demo-card {
    display: flex;
    min-width: 0;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid #ccdbfa;
    border-radius: 8px;
    background: #fff;
}

.demo-card--selected {
    border-color: var(--demo-violet);
    box-shadow: 0 0 0 1px var(--demo-violet);
}

.demo-card-image {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 1.56;
    object-fit: cover;
    object-position: top;
    border-bottom: 1px solid #ccdbfa;
    background: #f3f6fd;
}

.demo-card-placeholder {
    display: grid;
    aspect-ratio: 1.56;
    place-items: center;
    border-bottom: 1px solid var(--line);
    background: radial-gradient(ellipse at 20% 25%, #fff, var(--tint));
    color: var(--accent);
}

.demo-card-placeholder .ui-icon { width: 41px; height: 41px; stroke-width: 1.4; }

.demo-card-body {
    display: flex;
    flex: auto;
    flex-direction: column;
    align-items: flex-start;
    padding: clamp(16px, 2.2vw, 25px);
}

.demo-card-platform {
    margin: 0 0 8px;
    color: var(--accent-strong);
    font-size: .82rem;
    font-weight: 500;
}

.demo-card h3 {
    margin: 0;
    font-size: clamp(1.48rem, 2.35vw, 2rem);
    font-weight: 500;
    line-height: 1.15;
    overflow-wrap: anywhere;
}

.demo-card-description {
    flex: auto;
    margin: 8px 0 16px;
    color: #444;
    font-size: .95rem;
    line-height: 1.5;
    overflow-wrap: anywhere;
}

.demo-card h3 + .demo-button {
    margin-top: 16px;
}

.demo-card-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 7px 13px; }
.demo-card-actions .demo-button { padding-inline: 13px; font-size: .89rem; }
.demo-card-detail { display: inline-flex; align-items: center; gap: 5px; color: var(--accent-strong); font-size: .88rem; text-underline-offset: .19em; }
.demo-directory-empty .demo-card-actions { justify-content: center; }

.demo-directory-empty {
    max-width: 36rem;
    margin: 28px auto 0;
    padding: 18px;
    border: 1px solid #ccdbfa;
    border-radius: 8px;
    background: #fff;
    color: #333;
    text-align: center;
}

.demo-directory-empty a {
    color: var(--demo-violet);
    text-underline-offset: .2em;
}

@media (max-width: 910px) {
    .demo-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 545px) {
    .demo-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .demo-lead {
        font-size: 16px;
    }
}
