.demo-page .demo-head {
    align-items: flex-start;
}

.demo-page .demo-current {
    margin: 0.5rem 0 0;
    color: hsl(var(--muted));
    font-size: 0.75rem;
}

.demo-page .demo-current strong {
    color: hsl(var(--fg));
}

.demo-note {
    margin: 0 0 1rem;
    padding: 0.75rem 1rem;
    border-radius: 0.75rem;
    font-size: 0.875rem;
}

.demo-note.is-ok {
    background: hsl(var(--p) / 0.12);
    color: hsl(var(--p));
}

.demo-note.is-bad {
    background: hsl(0 72% 96%);
    color: hsl(0 72% 40%);
}

.demo-grid {
    display: grid;
    gap: 1rem;
}

.demo-grid.providers {
    grid-template-columns: 1fr;
}

@media (min-width: 768px) {
    .demo-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (min-width: 1280px) {
    .demo-grid.parties {
        grid-template-columns: 1fr 1fr 1fr;
    }
}

.demo-card {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    padding: 1rem 1.1rem 1.1rem;
    border: 1px solid hsl(var(--line));
    border-radius: 0.75rem;
    background: #fff;
}

.demo-card.is-current {
    border-color: hsl(var(--p));
    box-shadow: 0 0 0 1px hsl(var(--p));
}

.demo-card-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
}

.demo-card h2 {
    margin: 0;
    font-size: 1rem;
    font-weight: 700;
}

.demo-role {
    flex: none;
    padding: 0.15rem 0.5rem;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 700;
    line-height: 1.4;
}

.demo-tone-primary { background: hsl(var(--p) / 0.12); color: hsl(var(--p)); }
.demo-tone-blue { background: rgb(59 130 246 / 0.12); color: #2563eb; }
.demo-tone-amber { background: rgb(245 158 11 / 0.14); color: #b45309; }
.demo-tone-emerald { background: rgb(16 185 129 / 0.14); color: #047857; }
.demo-tone-purple { background: rgb(168 85 247 / 0.14); color: #7c3aed; }

.demo-copy {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0;
    border: 0;
    background: transparent;
    color: hsl(var(--fg));
    font: inherit;
    font-size: 0.75rem;
    cursor: pointer;
}

.demo-copy.secret {
    color: hsl(var(--muted));
    font-family: ui-monospace, Consolas, monospace;
}

.demo-copy:hover {
    color: hsl(var(--p));
}

.demo-page p.demo-journey,
.demo-page p.demo-meta {
    margin: 0;
    color: hsl(var(--muted));
    font-size: 0.75rem;
    line-height: 1.6;
}

.demo-block p {
    margin: 0 0 0.35rem;
    font-size: 11px;
    font-weight: 700;
}

.demo-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.3rem;
}

.demo-chip,
.demo-chip.soft {
    padding: 0.1rem 0.45rem;
    border-radius: 999px;
    border: 1px solid hsl(var(--line));
    background: #fff;
    color: hsl(var(--fg));
    font-size: 10px;
}

.demo-chip.soft {
    border-color: transparent;
    background: hsl(var(--accent));
}

.demo-docs {
    margin: 0;
    padding-inline-start: 1.1rem;
    color: hsl(var(--muted));
    font-size: 11px;
}

.demo-page .demo-section {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
    margin: 2.5rem 0 1rem;
}

.demo-page .demo-section h2 {
    margin: 0;
    font-size: 1.125rem;
}

.demo-switch,
.demo-run {
    margin: 0;
}

.demo-switch {
    margin-top: auto;
}

.demo-page button.demo-solid,
.demo-page button.demo-outline,
.demo-page button.demo-quiet {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    width: 100%;
    padding: 0.45rem 0.8rem;
    border-radius: 0.5rem;
    font: inherit;
    font-size: 0.8125rem;
    font-weight: 600;
    cursor: pointer;
}

.demo-page .demo-actions button.demo-solid,
.demo-page .demo-actions button.demo-outline {
    width: auto;
}

.demo-page button.demo-solid {
    border: 0;
    color: #fff;
    background: linear-gradient(135deg, hsl(var(--p)), hsl(var(--p-glow)));
}

.demo-page button.demo-outline,
.demo-page button.demo-quiet {
    border: 1px solid hsl(var(--line));
    background: #fff;
    color: hsl(var(--fg));
}

.demo-page button.demo-quiet {
    background: hsl(var(--accent));
}

.demo-page button:disabled {
    cursor: default;
    opacity: 0.7;
}

.demo-page p.demo-foot {
    margin-top: 1.5rem;
    color: hsl(var(--muted));
    font-size: 11px;
}
