/* Notice bar above the panel */
.demo-notice {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 0.25rem 1.5rem;
    padding: 0.4rem 1rem;
    font-size: 0.8125rem;
    color: white;
    background: rgb(17 24 39);
}

.demo-notice a {
    color: rgb(253 186 116);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.demo-notice-links {
    display: inline-flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.25rem 1rem;
}

/* On a phone the links wrap between links, not inside one */
.demo-notice-links a {
    white-space: nowrap;
}

.demo-notice a.demo-notice-buy {
    color: white;
    font-weight: 600;
}

.demo-notice-lang select {
    padding: 0.1rem 1.6rem 0.1rem 0.5rem;
    font-size: 0.8125rem;
    color: white;
    background-color: rgb(31 41 55);
    border: 1px solid rgb(75 85 99);
    border-radius: 0.375rem;
}

.demo-notice-lang .sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
}

/* Tour page */
.demo-tour-section + .demo-tour-section {
    margin-top: 0.5rem;
}

.demo-tour-heading {
    margin-bottom: 0.75rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: rgb(107 114 128);
}

.demo-tour-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(18rem, 1fr));
    gap: 1rem;
}

.demo-tour-card {
    display: flex;
    gap: 0.875rem;
    padding: 1rem 1.25rem;
    border-radius: 0.75rem;
    background: white;
    box-shadow: 0 1px 2px rgb(0 0 0 / 0.05);
    outline: 1px solid rgb(3 7 18 / 0.05);
    transition: outline-color 0.15s;
}

.demo-tour-card:hover {
    outline: 2px solid var(--primary-500);
}

.dark .demo-tour-card {
    background: rgb(255 255 255 / 0.05);
    outline-color: rgb(255 255 255 / 0.1);
}

.demo-tour-icon {
    flex: none;
    width: 1.5rem;
    height: 1.5rem;
    color: var(--primary-500);
}

.demo-tour-title {
    font-weight: 600;
}

.demo-tour-text {
    margin-top: 0.25rem;
    font-size: 0.875rem;
    color: rgb(107 114 128);
}

.demo-tour-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem 1rem;
    margin-top: 0.5rem;
    font-size: 0.875rem;
    font-weight: 600;
}

.demo-tour-links a {
    color: var(--primary-600);
}

.dark .demo-tour-links a {
    color: var(--primary-400);
}

.demo-tour-links a:hover {
    text-decoration: underline;
}

/* Japanese headings wrap between phrases, not in the middle of a word (Chrome and Edge; other browsers keep the usual wrap) */
html:lang(ja) :is(h1, h2, h3) {
    word-break: auto-phrase;
}

/* "Try it on this page" above each page */
.demo-hints { display: flex; gap: 0.75rem; padding: 0.875rem 1rem; border-radius: 0.75rem; background: color-mix(in oklab, var(--primary-500) 7%, transparent); border: 1px solid color-mix(in oklab, var(--primary-500) 25%, transparent); font-size: 0.875rem; line-height: 1.5; }
.demo-hints-icon { width: 1.25rem; height: 1.25rem; flex-shrink: 0; margin-top: 0.1rem; color: var(--primary-600); }
.demo-hints ul { margin-top: 0.25rem; padding-left: 1.1rem; list-style: disc; color: rgb(55 65 81); }
.demo-hints li + li { margin-top: 0.2rem; }
.dark .demo-hints ul { color: rgb(209 213 219); }

/* Wide screen: the notice bar stays on one line in every language. A long text is cut with … (the links and the language menu keep their size). */
@media (min-width: 1100px) {
    body .demo-notice {
        flex-wrap: nowrap;
    }

    body .demo-notice > :first-child {
        flex: 0 1 auto;
        min-width: 0;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    body .demo-notice-links {
        flex-wrap: nowrap;
        flex-shrink: 0;
    }

    body .demo-notice-lang {
        flex-shrink: 0;
    }
}
