/* ==========================================================================
   RP Generatoren - eigenständiges Stylesheet
   --------------------------------------------------------------------------
   Wichtig: Alle Regeln sind unter .rp-page / .rp-* gekapselt.
   Es gibt bewusst KEINE globalen Selektoren wie *, body, button, a, um das
   bestehende Design der Hauptseite nicht zu beeinflussen.
   Farben werden aus den bestehenden CSS-Variablen übernommen (Fallback).
   ========================================================================== */

.rp-page {
    --rp-cyan: var(--neon-cyan, #00f3ff);
    --rp-blue: var(--neon-blue, #0077ff);
    --rp-bg: var(--bg-dark, #050505);
    --rp-glass: rgba(15, 15, 20, 0.72);
    --rp-glass-border: rgba(255, 255, 255, 0.1);
    --rp-text: var(--text-main, #ffffff);
    --rp-muted: var(--text-muted, #a0a0a0);
    --rp-radius: 16px;
    --rp-radius-sm: 10px;
    --rp-max: 1400px;
    --rp-gap: 18px;

    background-color: var(--rp-bg);
    background-image:
        radial-gradient(1000px 500px at 15% -10%, rgba(255, 255, 255, 0.10), transparent 60%),
        radial-gradient(800px 400px at 100% 0%, rgba(0, 119, 255, 0.10), transparent 55%);
    background-attachment: fixed;
    color: var(--rp-text);
    min-height: 100vh;
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.55;
    overflow-x: hidden;
    -webkit-text-size-adjust: 100%;
}

/* Die Hauptseite zentriert den body per Flex; hier neutralisieren. */
.rp-page,
.rp-page * {
    box-sizing: border-box;
}

/* ------------------------------- Shell -------------------------------- */

.rp-shell {
    width: 100%;
    max-width: var(--rp-max);
    margin-inline: auto;
    padding-inline: clamp(14px, 3vw, 32px);
}

.rp-main {
    padding-block: clamp(18px, 3vw, 34px) 48px;
    display: flex;
    flex-direction: column;
    gap: clamp(26px, 3.4vw, 44px);
}

.rp-main--narrow {
    max-width: 760px;
}

/* Skip-Link (Barrierefreiheit) */
.rp-skip {
    position: absolute;
    left: -9999px;
    top: 0;
    background: var(--rp-cyan);
    color: #001014;
    padding: 10px 16px;
    border-radius: 0 0 var(--rp-radius-sm) 0;
    font-weight: 700;
    z-index: 999;
}

.rp-skip:focus {
    left: 0;
    outline: 3px solid #fff;
}

/* -------------------------------- Hero -------------------------------- */

.rp-hero {
    border-bottom: 1px solid var(--rp-glass-border);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(0, 0, 0, 0));
    padding-block: clamp(30px, 4.5vw, 60px) clamp(16px, 2.5vw, 28px);
}

.rp-hero--detail {
    padding-block: clamp(26px, 3.6vw, 48px) clamp(14px, 2.2vw, 26px);
}

.rp-hero__row {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    align-items: flex-start;
    justify-content: space-between;
}

.rp-hero__title {
    font-size: clamp(1.6rem, 4.4vw, 2.6rem);
    line-height: 1.15;
    margin: 6px 0 8px;
    color: #fff;
    text-shadow: 0 0 18px rgba(255, 255, 255, 0.35);
    letter-spacing: 0.5px;
    overflow-wrap: break-word;
}

.rp-hero__lead {
    max-width: 74ch;
    color: #d5d9dd;
    font-size: clamp(0.95rem, 1.6vw, 1.05rem);
    margin: 0 0 10px;
}

.rp-hero__count {
    margin: 0;
    color: var(--rp-muted);
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.rp-hero__count strong {
    color: var(--rp-cyan);
}

.rp-hero__actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

/* ----------------------------- Breadcrumbs ---------------------------- */

.rp-breadcrumbs {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    font-size: 0.82rem;
    color: var(--rp-muted);
    margin-bottom: 4px;
}

.rp-crumb {
    color: var(--rp-muted);
    text-decoration: none;
    border-radius: 6px;
    padding: 2px 2px;
}

a.rp-crumb:hover,
a.rp-crumb:focus-visible {
    color: var(--rp-cyan);
    text-decoration: underline;
}

.rp-crumb--current {
    color: #fff;
}

.rp-crumb__sep {
    opacity: 0.45;
}

/* ------------------------------- Notice ------------------------------- */

.rp-notice {
    border: none;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.02));
    border-radius: var(--rp-radius);
    padding: clamp(14px, 2vw, 20px);
}

.rp-notice--compact {
    padding: 14px 16px;
}

.rp-notice__title {
    margin: 0 0 8px;
    font-weight: 800;
    letter-spacing: 0.6px;
    text-transform: uppercase;
    font-size: 0.85rem;
    color: #ffffff;
    display: flex;
    align-items: center;
    gap: 8px;
}

.rp-notice p {
    margin: 0 0 6px;
    color: #e8e8e8;
    font-size: 0.92rem;
}

.rp-notice p:last-child {
    margin-bottom: 0;
}

.rp-notice strong {
    color: #fff;
}

/* ------------------------------ Toolbar ------------------------------- */

.rp-toolbar {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(0, 220px);
    gap: var(--rp-gap);
    align-items: start;
    background: var(--rp-glass);
    border: 1px solid var(--rp-glass-border);
    border-radius: var(--rp-radius);
    padding: clamp(14px, 2vw, 20px);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
}

.rp-field {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 0;
}

.rp-field--wide {
    grid-column: 1 / -1;
}

.rp-label {
    font-size: 0.75rem;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--rp-muted);
}

.rp-input-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.rp-input-icon {
    position: absolute;
    left: 12px;
    color: var(--rp-muted);
    pointer-events: none;
    font-size: 0.9rem;
}

.rp-input,
.rp-select {
    width: 100%;
    max-width: 100%;
    background: rgba(0, 0, 0, 0.45);
    border: 1px solid var(--rp-glass-border);
    color: #fff;
    border-radius: var(--rp-radius-sm);
    padding: 12px 14px;
    font-size: 1rem;
    font-family: inherit;
    min-height: 46px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.rp-input {
    padding-left: 38px;
}

.rp-input::placeholder {
    color: var(--rp-muted);
}

.rp-input:focus,
.rp-select:focus {
    outline: none;
    border-color: var(--rp-cyan);
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.18);
}

.rp-select {
    appearance: none;
    background-image: linear-gradient(45deg, transparent 50%, var(--rp-cyan) 50%),
        linear-gradient(135deg, var(--rp-cyan) 50%, transparent 50%);
    background-position: calc(100% - 20px) 50%, calc(100% - 14px) 50%;
    background-size: 6px 6px, 6px 6px;
    background-repeat: no-repeat;
    padding-right: 40px;
    cursor: pointer;
}

/* Neue Chromium-Browser: das Ausklappmenue selbst stylen — rundes Popup und
   runde Hover-Optionen. Andere Browser ueberspringen den Block via @supports
   und behalten das native Standardpopup (kein Rückschritt). */
@supports selector(::picker(select)) {
    .rp-select {
        appearance: base-select;
    }
    /* Doppelter Pfeil vermeiden: nur der eigene CSS-Caret bleibt */
    .rp-select::picker-icon {
        display: none;
    }
    .rp-select::picker(select) {
        appearance: base-select;
        border: 1px solid rgba(255, 255, 255, 0.18);
        border-radius: 14px;
        background: rgba(22, 22, 24, 0.97);
        padding: 6px;
        margin-top: 6px;
        box-shadow: 0 18px 40px rgba(0, 0, 0, 0.55);
    }
    .rp-select option {
        border-radius: 10px;
        padding: 10px 14px;
        color: #e6e6e6;
        font-size: 0.95rem;
        cursor: pointer;
    }
    .rp-select option:hover,
    .rp-select option:focus-visible,
    .rp-select option:checked {
        background: rgba(255, 255, 255, 0.12);
        color: #ffffff;
    }
}

.rp-search-status {
    margin: 0;
    font-size: 0.8rem;
    color: var(--rp-muted);
    min-height: 1.1em;
}

.rp-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.rp-chip {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--rp-glass-border);
    color: #e6e6e6;
    border-radius: 999px;
    padding: 9px 16px;
    font-size: 0.9rem;
    font-family: inherit;
    cursor: pointer;
    min-height: 40px;
    transition: all 0.2s ease;
    overflow-wrap: anywhere;
}

.rp-chip:hover {
    border-color: rgba(255, 255, 255, 0.5);
    color: #fff;
}

.rp-chip.is-active {
    background: rgba(255, 255, 255, 0.14);
    border-color: var(--rp-cyan);
    color: #fff;
    box-shadow: 0 0 14px rgba(255, 255, 255, 0.25);
}

.rp-toolbar__extra {
    grid-column: 1 / -1;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.rp-col {
    display: flex;
    flex-direction: column;
    gap: clamp(26px, 3.4vw, 44px);
    min-width: 0;
}

/* -------------------------------- Grid -------------------------------- */

.rp-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
    column-gap: var(--rp-gap);
    row-gap: clamp(30px, 3.6vw, 48px);
    align-items: stretch;
}

/* -------------------------------- Card -------------------------------- */

.rp-card {
    display: flex;
    flex-direction: column;
    background: var(--rp-glass);
    border: 1px solid transparent; /* Umrandung nur beim Überfahren */
    border-radius: var(--rp-radius);
    overflow: hidden;
    min-width: 0;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.45);
    transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.rp-card:hover,
.rp-card:focus-within {
    transform: translateY(-3px);
    border-color: rgba(255, 255, 255, 0.18);
    box-shadow: 0 16px 34px rgba(0, 0, 0, 0.55);
}

.rp-card__media {
    aspect-ratio: 16 / 9;
    background: rgba(0, 0, 0, 0.5);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.rp-card__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.rp-card__placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.10), rgba(0, 119, 255, 0.06)),
        repeating-linear-gradient(45deg, rgba(255, 255, 255, 0.03) 0 8px, transparent 8px 16px);
}

.rp-card__placeholder-letter {
    font-size: clamp(1.8rem, 5vw, 2.6rem);
    font-weight: 800;
    color: rgba(255, 255, 255, 0.75);
    text-shadow: 0 0 18px rgba(255, 255, 255, 0.35);
}

.rp-card__body {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 16px;
    flex: 1 1 auto;
    min-width: 0;
}

.rp-card__badges {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.rp-card__title {
    margin: 0;
    font-size: 1.08rem;
    line-height: 1.3;
    overflow-wrap: break-word;
}

.rp-card__title a {
    color: #fff;
    text-decoration: none;
}

.rp-card__title a:hover,
.rp-card__title a:focus-visible {
    color: var(--rp-cyan);
    text-decoration: underline;
}

.rp-card__desc {
    margin: 0;
    color: #cfd3d7;
    font-size: 0.92rem;
    overflow-wrap: break-word;
    flex: 1 1 auto;
}

.rp-card__tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 2px 0;
}

.rp-tag {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.22);
    color: var(--rp-cyan);
    font-size: 0.72rem;
    padding: 3px 8px;
    border-radius: 999px;
    overflow-wrap: anywhere;
}

.rp-card__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    color: var(--rp-muted);
    font-size: 0.78rem;
}

.rp-meta__item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    overflow-wrap: anywhere;
}

.rp-card__updated {
    margin: 0;
    font-size: 0.74rem;
    color: var(--rp-muted);
    display: flex;
    align-items: center;
    gap: 6px;
}

.rp-card__actions,
.rp-detail__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}

/* ------------------------------- Badges ------------------------------- */

.rp-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 0.7rem;
    letter-spacing: 0.6px;
    text-transform: uppercase;
    font-weight: 700;
    padding: 4px 9px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    background: rgba(255, 255, 255, 0.05);
    color: #e6e6e6;
}

.rp-badge--new {
    background: rgba(255, 255, 255, 0.15);
    border-color: var(--rp-cyan);
    color: #f4f4f4;
    box-shadow: 0 0 12px rgba(255, 255, 255, 0.25);
}

.rp-badge--stable {
    background: rgba(60, 200, 120, 0.15);
    border-color: rgba(60, 200, 120, 0.5);
    color: #b8f5cf;
}

.rp-badge--beta {
    background: rgba(0, 140, 255, 0.15);
    border-color: rgba(0, 160, 255, 0.5);
    color: #bfe4ff;
}

.rp-badge--experimental {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.45);
    color: #e8e8e8;
}

.rp-badge--deprecated {
    background: rgba(220, 60, 60, 0.15);
    border-color: rgba(220, 60, 60, 0.5);
    color: #ffc2c2;
}

.rp-badge--warn {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.45);
    color: #e8e8e8;
}

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

.rp-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 44px;
    padding: 10px 18px;
    border-radius: var(--rp-radius-sm);
    border: 1px solid var(--rp-glass-border);
    background: rgba(255, 255, 255, 0.04);
    color: #fff;
    font-size: 0.92rem;
    font-family: inherit;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
}

.rp-btn:hover {
    border-color: var(--rp-cyan);
    background: rgba(255, 255, 255, 0.10);
    box-shadow: 0 0 14px rgba(255, 255, 255, 0.25);
    transform: translateY(-1px);
}

.rp-btn:focus-visible,
.rp-chip:focus-visible,
.rp-input:focus-visible,
.rp-select:focus-visible,
.rp-preview__load:focus-visible {
    outline: 3px solid var(--rp-cyan);
    outline-offset: 2px;
}

.rp-btn--primary {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.22), rgba(0, 119, 255, 0.22));
    border-color: var(--rp-cyan);
    box-shadow: 0 0 16px rgba(255, 255, 255, 0.22);
}

.rp-btn--ghost {
    background: transparent;
    color: #d8d8d8;
}

.rp-btn--tiny {
    min-height: 36px;
    padding: 6px 12px;
    font-size: 0.82rem;
}

.rp-btn[aria-pressed="true"] {
    background: rgba(255, 255, 255, 0.16);
    border-color: var(--rp-cyan);
    color: #fff;
}

/* -------------------------------- Detail ------------------------------ */

.rp-detail {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: var(--rp-gap);
    align-items: start;
}

.rp-panel {
    background: var(--rp-glass);
    border: none;
    border-radius: var(--rp-radius);
    padding: clamp(14px, 2vw, 22px);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    min-width: 0;
    overflow-wrap: break-word;
    transition: background 0.18s ease;
}

/* Zusammenklappbare Panels heben sich nur beim Überfahren ab */
.rp-panel--collapsible:hover {
    background: rgba(255, 255, 255, 0.07);
}

.rp-panel--collapsible > summary {
    cursor: pointer;
    list-style: none;
}

.rp-panel--collapsible > summary::-webkit-details-marker {
    display: none;
}

.rp-panel--collapsible > summary::after {
    content: "\f078";
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    float: right;
    opacity: 0.6;
    transition: transform 0.2s ease;
}

.rp-panel--collapsible[open] > summary::after {
    transform: rotate(180deg);
}

.rp-panel__title {
    margin: 0 0 12px;
    font-size: 1.05rem;
    color: #fff;
    letter-spacing: 0.4px;
}

.rp-panel__text {
    margin: 0 0 12px;
    color: #d5d9dd;
}

.rp-metatable {
    list-style: none;
    margin: 12px 0 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: 10px;
}

/* Kein Dauer-Rahmen: Infozeilen heben sich nur beim Überfahren ab */
.rp-metatable li {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    background: transparent;
    border: none;
    border-radius: var(--rp-radius-sm);
    padding: 9px 12px;
    font-size: 0.85rem;
    min-width: 0;
    transition: background 0.18s ease;
}

.rp-metatable li:hover {
    background: rgba(255, 255, 255, 0.06);
}

.rp-metatable span {
    color: var(--rp-muted);
}

.rp-metatable strong {
    color: #fff;
    text-align: right;
    overflow-wrap: anywhere;
}

.rp-hint {
    font-size: 0.82rem;
    color: var(--rp-muted);
    margin: 0 0 10px;
}

/* ------------------------------- Preview ------------------------------ */

.rp-preview {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 10;
    border: 1px dashed rgba(255, 255, 255, 0.18);
    border-radius: var(--rp-radius-sm);
    background: rgba(0, 0, 0, 0.45);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.rp-preview iframe {
    width: 100%;
    height: 100%;
    border: 0;
    display: block;
    background: #fff;
}

.rp-preview__load {
    min-height: 48px;
    padding: 12px 20px;
    border-radius: var(--rp-radius-sm);
    border: 1px solid var(--rp-cyan);
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    font-family: inherit;
    font-size: 0.94rem;
    cursor: pointer;
}

/* -------------------------------- Table ------------------------------- */

.rp-tablewrap {
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: var(--rp-radius-sm);
}

.rp-table {
    width: 100%;
    min-width: 480px;
    border-collapse: collapse;
    font-size: 0.87rem;
}

.rp-table th,
.rp-table td {
    text-align: left;
    padding: 10px 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    color: #d9d9d9;
    vertical-align: middle;
}

.rp-table th {
    background: rgba(0, 0, 0, 0.4);
    color: #fff;
    font-size: 0.74rem;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    position: sticky;
    top: 0;
}

.rp-table code {
    color: var(--rp-cyan);
    font-size: 0.82rem;
    overflow-wrap: anywhere;
}

.rp-table tbody tr {
    transition: background 0.15s ease;
}

.rp-table tbody tr:hover {
    background: rgba(255, 255, 255, 0.04);
}

/* ------------------------------ Code-View ----------------------------- */

.rp-code {
    margin-top: 14px;
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: var(--rp-radius-sm);
    background: rgba(0, 0, 0, 0.6);
    overflow: hidden;
}

.rp-code__head {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    justify-content: space-between;
    padding: 10px 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.05);
}

.rp-code__name {
    font-family: 'Consolas', 'Courier New', monospace;
    color: var(--rp-cyan);
    font-size: 0.88rem;
    overflow-wrap: anywhere;
}

.rp-code__buttons {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.rp-code__body {
    margin: 0;
    padding: 14px;
    max-height: 460px;
    overflow: auto;
    -webkit-overflow-scrolling: touch;
    background: #0a0a0a;
}

.rp-code__body code {
    font-family: 'Consolas', 'Courier New', monospace;
    font-size: 0.8rem;
    line-height: 1.6;
    color: #e6e6e6;
    white-space: pre;
    display: block;
    tab-size: 4;
}

/* ------------------------------ Markdown ------------------------------ */

.rp-markdown {
    color: #d5d9dd;
    font-size: 0.92rem;
    overflow-wrap: break-word;
    word-break: break-word;
}

.rp-markdown h3,
.rp-markdown h4,
.rp-markdown h5,
.rp-markdown h6 {
    color: #fff;
    margin: 16px 0 8px;
}

.rp-markdown h3:first-child {
    margin-top: 0;
}

.rp-markdown p {
    margin: 0 0 10px;
}

.rp-markdown ul,
.rp-markdown ol {
    margin: 0 0 14px 20px;
}

.rp-markdown li {
    margin-bottom: 7px;
    line-height: 1.45;
}

.rp-markdown code {
    background: rgba(255, 255, 255, 0.10);
    color: #f4f4f4;
    padding: 1px 5px;
    border-radius: 5px;
    font-size: 0.84rem;
}

.rp-markdown pre {
    background: #0a0a0a;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--rp-radius-sm);
    padding: 12px;
    overflow-x: auto;
    margin: 0 0 12px;
}

.rp-markdown pre code {
    background: none;
    padding: 0;
    color: #e6e6e6;
}

.rp-markdown blockquote {
    margin: 0 0 12px;
    padding: 8px 14px;
    border-left: 3px solid var(--rp-cyan);
    background: rgba(255, 255, 255, 0.06);
    color: #e6e6e6;
}

.rp-markdown hr {
    border: none;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    margin: 16px 0;
}

/* --------------------------- Zustande / Hilfe ------------------------- */

.rp-muted {
    color: var(--rp-muted);
}

.rp-empty,
.rp-noresults {
    color: var(--rp-muted);
    background: rgba(0, 0, 0, 0.3);
    border: 1px dashed rgba(255, 255, 255, 0.14);
    border-radius: var(--rp-radius);
    padding: 20px;
    text-align: center;
    font-size: 0.92rem;
}

.rp-empty--hidden,
.is-hidden {
    display: none !important;
}

.rp-empty code,
.rp-noresults code {
    color: var(--rp-cyan);
}

.rp-warn {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: var(--rp-radius-sm);
    padding: 12px 14px;
    color: #e8e8e8;
    font-size: 0.88rem;
    margin: 0;
}

.rp-scan-errors {
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--rp-radius-sm);
    padding: 12px 14px;
    font-size: 0.85rem;
    color: var(--rp-muted);
}

.rp-scan-errors summary {
    cursor: pointer;
    color: #e6e6e6;
}

.rp-scan-errors ul {
    margin: 10px 0 0 18px;
}

.rp-empty-state {
    text-align: center;
    background: var(--rp-glass);
    border: 1px solid var(--rp-glass-border);
    border-radius: var(--rp-radius);
    padding: clamp(26px, 5vw, 52px) clamp(16px, 4vw, 40px);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.rp-empty-state__icon {
    font-size: 2.4rem;
    color: var(--rp-cyan);
    text-shadow: 0 0 22px rgba(255, 255, 255, 0.35);
    margin: 0;
}

.rp-empty-state h1 {
    margin: 0;
    font-size: clamp(1.3rem, 4vw, 1.9rem);
    color: #fff;
    text-shadow: 0 0 16px rgba(255, 255, 255, 0.3);
}

.rp-empty-state p {
    margin: 0;
    color: #cfd3d7;
    max-width: 60ch;
}

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

.rp-footer {
    border-top: 1px solid var(--rp-glass-border);
    margin-top: auto;
    padding: 20px clamp(14px, 3vw, 32px) 34px;
    text-align: center;
    color: var(--rp-muted);
    font-size: 0.8rem;
}

.rp-footer__links {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 16px;
    justify-content: center;
    margin-bottom: 8px;
}

.rp-footer__links a {
    color: var(--rp-muted);
    text-decoration: none;
}

.rp-footer__links a:hover,
.rp-footer__links a:focus-visible {
    color: var(--rp-cyan);
    text-decoration: underline;
}

.rp-footer__note {
    margin: 0;
    opacity: 0.75;
}

.rp-visually-hidden {
    position: absolute !important;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Beim Drucken darf das Portal trotzdem normal aussehen (Details offen) */
@media print {
    .rp-toolbar,
    .rp-footer,
    .rp-hero__actions,
    .rp-notice {
        display: none !important;
    }
}

/* ------------------------------ Responsive ---------------------------- */

/* Tablet */
@media (max-width: 1024px) {
    .rp-grid {
        grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    }
}

/* Kleines Tablet / großes Handy */
@media (max-width: 820px) {
    .rp-toolbar {
        grid-template-columns: 1fr;
    }
}

/* Smartphone */
@media (max-width: 640px) {
    .rp-grid {
        grid-template-columns: 1fr;
    }

    .rp-detail {
        grid-template-columns: 1fr;
    }

    .rp-hero__row {
        flex-direction: column;
    }

    .rp-card__body {
        padding: 14px;
    }

    .rp-btn,
    .rp-chip {
        width: 100%;
    }

    .rp-card__actions .rp-btn,
    .rp-detail__actions .rp-btn,
    .rp-hero__actions .rp-btn {
        width: 100%;
    }

    .rp-chips {
        gap: 6px;
    }

    .rp-code__body {
        max-height: 320px;
    }

    .rp-metatable {
        grid-template-columns: 1fr;
    }

    .rp-metatable strong {
        text-align: left;
    }
}

/* Sehr schmale Geräte (360px) */
@media (max-width: 380px) {
    .rp-shell {
        padding-inline: 12px;
    }

    .rp-hero__title {
        font-size: 1.5rem;
    }
}

/* Reduzierte Bewegung respektieren */
@media (prefers-reduced-motion: reduce) {

    .rp-card,
    .rp-btn,
    .rp-chip {
        transition: none !important;
        transform: none !important;
    }
}

/* ============================== Sidebar-Navigation (Portal) ============================== */

.rp-layout {
    display: grid;
    grid-template-columns: 235px minmax(0, 1fr);
    gap: 26px;
    align-items: start;
}

.rp-sidebar {
    position: sticky;
    top: 18px;
    background: rgba(0, 0, 0, 0.30);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    padding: 18px 14px;
    max-height: calc(100vh - 36px);
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.2) transparent;
}

.rp-side-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 0 4px 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    margin-bottom: 10px;
}

.rp-side-home {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: #f2f2f2;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 600;
}
.rp-side-home:hover { color: #dcdcdc; }

.rp-side-count {
    font-size: 0.68rem;
    color: #9a9a9a;
    white-space: nowrap;
}

.rp-side-cat {
    margin: 14px 0 6px;
    font-size: 0.66rem;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    color: #9a9a9a;
    font-weight: 600;
}
.rp-side-cat:first-child { margin-top: 0; }

.rp-side-link {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 6px 9px;
    border-radius: 9px;
    border: 1px solid transparent;
    color: #e6e6e6;
    text-decoration: none;
    font-size: 0.82rem;
    cursor: pointer;
    background: transparent;
    text-align: left;
    font-family: inherit;
    transition: background 0.18s ease, border-color 0.18s ease;
}

.rp-side-link:hover,
.rp-side-link:focus-visible {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.14);
    outline: none;
}

.rp-side-link.is-active,
.rp-side-link.is-current {
    background: rgba(255, 255, 255, 0.09);
    border-color: rgba(255, 255, 255, 0.22);
    color: #ffffff;
    font-weight: 600;
}

.rp-side-link > span:first-child {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    flex: 1;
}

.rp-side-num {
    font-size: 0.7rem;
    color: #9a9a9a;
    margin-left: auto;
}

.rp-side-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #7a7a7a;
    flex-shrink: 0;
}

.rp-side-dot.is-stable     { background: #3ba55c; }
.rp-side-dot.is-beta       { background: #4a9eff; }
.rp-side-dot.is-deprecated { background: #ed4245; }

@media (max-width: 959px) {
    .rp-layout { display: block; }

    .rp-sidebar {
        position: static;
        max-height: none;
        padding: 10px;
        margin-bottom: 22px;
    }

    /* Mobile: Sidebar wird zur horizontalen Chip-Leiste */
    .rp-layout .rp-side-nav,
    .rp-layout .rp-side-chips {
        display: flex;
        flex-direction: row;
        gap: 7px;
        overflow-x: auto;
        padding-bottom: 6px;
        scrollbar-width: none;
    }
    .rp-side-nav::-webkit-scrollbar,
    .rp-side-chips::-webkit-scrollbar { display: none; }

    .rp-side-cat { display: none; }

    .rp-side-link {
        white-space: nowrap;
        flex-shrink: 0;
        width: auto;
        padding: 7px 11px;
        border: 1px solid rgba(255, 255, 255, 0.14);
        background: rgba(255, 255, 255, 0.05);
        border-radius: 999px;
    }

    .rp-side-num,
    .rp-side-dot { display: none; }

    .rp-side-count { display: none; }
    .rp-side-top { padding-bottom: 6px; }
}

/* Status-Zusammenfassung im Übersicht-Header */

.rp-hero__statuses {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 14px;
    margin: 8px 0 0;
    font-size: 0.78rem;
    color: #b9b9b9;
}

.rp-hero__status {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    white-space: nowrap;
}

.rp-mini-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    display: inline-block;
    flex-shrink: 0;
}

.rp-mini-dot--stable     { background: #3ba55c; }
.rp-mini-dot--beta       { background: #4a9eff; }
.rp-mini-dot--deprecated { background: #ed4245; }
.rp-mini-dot--unknown    { background: #7a7a7a; }

/* ============================== Suche & Filter in der Sidebar ============================== */

.rp-side-tools {
    margin-bottom: 18px;
}

/* Desktop: Kategorien-Chips in der Sidebar mit Luft dazwischen */
.rp-side-chips {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* Mobile: Klappkopf sichtbar */
.rp-side-tools__summary {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 8px 10px;
    margin-bottom: 10px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.05);
    color: #e6e6e6;
    cursor: pointer;
    list-style: none;
    font-size: 0.82rem;
    font-weight: 600;
    user-select: none;
}

.rp-side-tools__summary::-webkit-details-marker { display: none; }

.rp-side-tools__summary .fas {
    font-size: 0.78rem;
    color: #9a9a9a;
}

.rp-side-tools__summary::after,
.rp-side-tools__chevron {
    margin-left: auto;
    transition: transform 0.2s ease;
}

.rp-side-tools[open] .rp-side-tools__chevron { transform: rotate(180deg); }

.rp-side-tools__body {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 18px;
}

/* Werkzeuge stapeln sich vertikal in der Sidebar */
.rp-toolbar--side {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 18px;
    background: transparent;
    border: none;
    border-radius: 0;
    padding: 0;
    box-shadow: none;
    margin: 0;
}

.rp-toolbar--side .rp-field,
.rp-toolbar--side .rp-field--wide {
    width: 100%;
    min-width: 0;
    margin: 0;
}

.rp-toolbar--side .rp-chips {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
}

.rp-toolbar--side .rp-chips .rp-chip {
    width: 100%;
    justify-content: flex-start;
    text-align: left;
    border-radius: 9px;
}

.rp-toolbar--side .rp-toolbar__extra {
    margin: 0;
    padding: 0;
}

.rp-toolbar--side .rp-btn {
    width: 100%;
    justify-content: center;
}

/* Desktop: Klappkopf weg, Inhaltsbereich immer offen */
@media (min-width: 960px) {
    .rp-side-tools__summary { display: none; }
    .rp-side-tools { margin-bottom: 18px; }
}
