
h1, h2, h3, h4, h5, h6, h7, h8 {
    margin-bottom: 10px;
}


/* ── Demo-Seiten ─────────────────────────────────────────── */
.demo-page {
    max-width: 1100px;
    padding: 1.5rem 1rem;
}
    .demo-page h1, .demo-page h2, .demo-page h3, .demo-page h4, .demo-page h5 {
        margin: 0 0 10px 0;
    }

.demo-page__section {
    border: 1px solid var(--oo-color-border);
    border-radius: 0.5rem;
    padding: 1rem;
}

/* Beschreibung, Beispiel und Ergebnis bilden klar getrennte Blöcke.
   Nur die äußere Demo-Ebene erhält Abstände; Layouts innerhalb der Komponenten bleiben unverändert. */
:is([data-testid="demo-playground-preview"], .demo-page__section:not([data-testid])) {
    display: flow-root;
    min-width: 0;
}

:is([data-testid="demo-playground-preview"], .demo-page__section:not([data-testid])) > br {
    display: none;
}

:is([data-testid="demo-playground-preview"], .demo-page__section:not([data-testid])) > small {
    display: block;
    line-height: 1.6;
}

:is([data-testid="demo-playground-preview"], .demo-page__section:not([data-testid])) > :not(br, style, script, [hidden]) {
    margin-block: 0;
}

:is([data-testid="demo-playground-preview"], .demo-page__section:not([data-testid])) > :nth-child(n + 2 of :not(br, style, script, [hidden])) {
    margin-block-start: var(--oo-space-4);
}

/* Lange Codebeispiele bleiben innerhalb ihrer Card scrollbar. */
[data-testid="demo-playground-preview"] > pre {
    max-width: 100%;
    overflow-x: auto;
}

/* Handy: Eingabefelder und Cards in Demo-Beispielen untereinander anordnen. */
@media (max-width: 36rem) {
    .demo-page__section {
        padding: 0.75rem;
    }

    /* Ebenso Zeilen mit Eingabefeldern oder Cards nebeneinander (z.B. Größen-Demo, zwei Editoren, Card-Raster) */
    .oo-row:has(> .oo-col > :is(.form--group, .oo-rich-text-editor, .oo-checkbox, .oo-switch, .oo-card)) {
        flex-wrap: wrap !important; /* Row setzt flex-wrap als Inline-Style */
        row-gap: 0.25rem;
    }

    .oo-row:has(> .oo-col > :is(.form--group, .oo-rich-text-editor, .oo-checkbox, .oo-switch, .oo-card)) > .oo-col {
        flex: 0 0 100%;
        max-width: 100%;
    }

    /* Lange Inline-Code-Schnipsel im Fließtext umbrechen statt die Seite zu verbreitern */
    :not(pre) > code {
        overflow-wrap: anywhere;
    }
}

/* ── SKILL.md-Block unter Demo-Seiten ───────────────────── */
.demo-skill-block {
    margin-top: 3rem;
    border-top: 1px solid var(--oo-color-border);
    padding-top: 1rem;
}

.demo-skill-block details summary {
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: var(--oo-font-size-sm);
    font-weight: 600;
    color: var(--oo-color-text-subtle);
    user-select: none;
    list-style: none;
}

.demo-skill-block details summary .material-symbols-outlined {
    font-size: 1.1rem;
}

.demo-skill-block__pre {
    margin-top: 0.75rem;
    padding: 1rem;
    background: var(--oo-surface-2);
    border: 1px solid var(--oo-color-border);
    border-radius: 0.5rem;
    font-size: 0.78rem;
    line-height: 1.5;
    overflow-x: auto;
    white-space: pre-wrap;
    word-break: break-word;
    overflow-y: auto;
}

.demo-custom-class {
    border: 3px solid #f97316 !important;
}


/* ── Home – To-Do-Liste ──────────────────────────────────── */
.home-todo {
    margin: 2rem auto;
    padding: 0 1rem;
}

.home-todo__header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 1.5rem;
}

.home-todo__icon {
    font-size: 26px;
    color: var(--oo-primary);
}

.home-todo__title {
    font-size: 1.4rem;
    font-weight: 700;
    margin: 0;
    flex: 1;
    color: var(--oo-color-text);
}

.home-todo__list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.home-todo__item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    border-radius: var(--oo-radius-md, 8px);
    background: var(--oo-color-surface);
    border: 1px solid var(--oo-color-border);
    transition: background 0.15s ease, border-color 0.15s ease;
}

.home-todo__item:hover {
    border-color: var(--oo-primary);
}