.rselearningprogress {
    --rselearningprogress-accent: var(--color-accent);
    --rselearningprogress-primary: var(--color-primary);
    color: var(--surface-text, var(--color-text));
    overflow-wrap: anywhere;
    box-sizing: border-box;
    min-width: 0;
    display: grid;
    gap: 0.78rem;
    padding: 1rem;
    border: 1px solid var(--surface-border, var(--color-border));
    border-radius: 0.5rem;
    background: var(--surface-panel, var(--color-surface));
    box-shadow: var(--surface-card-shadow, none);
    pointer-events: auto;
    backdrop-filter: var(--surface-card-backdrop, none);
}

.rselearningprogress__progress {
    display: grid;
    gap: 0.42rem;
}

.rselearningprogress__progressHead {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.75rem;
}

.rselearningprogress__percent {
    color: var(--surface-heading, var(--color-heading));
    font-size: 1.05rem;
    line-height: 1.15;
}

/* Gleiche Leiste wie im Ausbildungsweg (rs_training_slot): neutrale Spur, Oliv für Erledigtes. */
.rselearningprogress__bar {
    display: block;
    width: 100%;
    height: 0.45rem;
    overflow: hidden;
    border: 1px solid color-mix(in srgb, currentColor 16%, transparent);
    border-radius: var(--radius-pill, 999px);
    appearance: none;
    accent-color: var(--rselearningprogress-primary);
    background: color-mix(in srgb, currentColor 16%, transparent);
}

.rselearningprogress__bar::-webkit-progress-bar {
    border-radius: var(--radius-pill, 999px);
    background: color-mix(in srgb, currentColor 16%, transparent);
}

.rselearningprogress__bar::-webkit-progress-value {
    border-radius: var(--radius-pill, 999px);
    background: var(--rselearningprogress-primary);
}

.rselearningprogress__bar::-moz-progress-bar {
    border-radius: var(--radius-pill, 999px);
    background: var(--rselearningprogress-primary);
}

.rselearningprogress__progressText {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 0.12rem 0.75rem;
}

.rselearningprogress__progressText,
.rselearningprogress__eyebrow,
.rselearningprogress__taskTitle {
    color: var(--surface-muted, var(--color-text-soft));
    font-size: 0.82rem;
    font-weight: 650;
}

.rselearningprogress__submitted {
    color: var(--rselearningprogress-accent);
}

.rselearningprogress__button:focus-visible,
.rselearningprogress__feedback:focus-visible {
    outline: 3px solid var(--rselearningprogress-accent);
    outline-offset: 3px;
}

.rselearningprogress__next {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.34rem 0.72rem;
    padding-top: 0.76rem;
    border-top: 1px solid color-mix(in srgb, currentColor 16%, transparent);
}

.rselearningprogress__nextTitle,
.rselearningprogress__nextMeta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.28rem 0.48rem;
    min-width: 0;
}

.rselearningprogress__nextTitle {
    align-items: baseline;
}

.rselearningprogress__nextMeta {
    align-items: center;
    justify-content: flex-end;
}

.rselearningprogress__nextMeta strong {
    color: var(--surface-heading, var(--color-heading));
    font-size: 1.05rem;
    line-height: 1.15;
}

.rselearningprogress__nextDuration {
    align-items: center;
    padding: 0.25rem 0.48rem;
    border: 1px solid color-mix(in srgb, currentColor 16%, transparent);
    border-radius: 999px;
    background: color-mix(in srgb, currentColor 16%, transparent);
    color: var(--surface-muted, var(--color-text-soft));
    display: inline-flex;
    flex: 0 0 auto;
    font-size: 0.78rem;
    font-weight: 650;
    gap: 0.35rem;
    line-height: 1.2;
    min-height: 1.62rem;
}

.rselearningprogress__durationIcon {
    border: 1.4px solid currentColor;
    border-radius: 999px;
    display: inline-block;
    flex: 0 0 0.76rem;
    height: 0.76rem;
    position: relative;
    width: 0.76rem;
}

.rselearningprogress__durationIcon::before,
.rselearningprogress__durationIcon::after {
    background: currentColor;
    border-radius: 999px;
    content: "";
    left: 50%;
    position: absolute;
    top: 50%;
    transform-origin: left center;
}

.rselearningprogress__durationIcon::before {
    height: 1.5px;
    transform: translateY(-50%) rotate(-90deg);
    width: 0.24rem;
}

.rselearningprogress__durationIcon::after {
    height: 1.5px;
    transform: translateY(-50%) rotate(25deg);
    width: 0.2rem;
}

.rselearningprogress__taskTitle {
    color: var(--surface-muted, var(--color-text-soft));
    font-size: 0.86rem;
    font-weight: 720;
    white-space: normal;
}

.rselearningprogress__button,
.rselearningprogress__feedback {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 2.78rem;
    border-radius: 0.45rem;
    font-weight: 760;
    text-decoration: none;
    transition: transform 160ms ease, background 160ms ease, border-color 160ms ease;
}

.rselearningprogress__button {
    box-sizing: border-box;
    padding: 0.65rem 1.15rem;
    background: var(--surface-button-bg, var(--color-heading));
    color: var(--surface-button-text, var(--color-surface));
    line-height: 1.3;
    text-align: center;
}

.rselearningprogress__button:hover {
    transform: translateY(-1px);
    filter: brightness(1.05);
}

.rselearningprogress__feedback {
    justify-content: flex-start;
    flex-wrap: wrap;
    gap: 0.55rem;
    min-height: 2.6rem;
    padding: 0.58rem 0.72rem;
    border: 1px solid color-mix(in srgb, var(--rselearningprogress-accent) 44%, transparent);
    background: color-mix(in srgb, var(--rselearningprogress-accent) 15%, transparent);
    color: var(--surface-heading, var(--color-heading));
    font-size: 0.9rem;
}

.rselearningprogress__feedback:hover {
    border-color: color-mix(in srgb, var(--rselearningprogress-accent) 78%, transparent);
    background: color-mix(in srgb, var(--rselearningprogress-accent) 22%, transparent);
}

.rselearningprogress__feedback strong {
    flex: none;
    margin-left: auto;
    white-space: nowrap;
    color: var(--rselearningprogress-accent);
}

.rselearningprogress__feedbackIcon {
    position: relative;
    flex: 0 0 auto;
    width: 1.1rem;
    height: 0.86rem;
    border: 2px solid currentColor;
    border-radius: 0.28rem;
}

.rselearningprogress__feedbackIcon::after {
    content: "";
    position: absolute;
    right: 0.12rem;
    bottom: -0.38rem;
    width: 0.42rem;
    height: 0.42rem;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: rotate(45deg);
    background: transparent;
}


@media (max-width: 52rem) {
    .rselearningprogress__next { grid-template-columns: 1fr; }
    .rselearningprogress__nextMeta { justify-content: flex-start; }
}
@media (prefers-reduced-motion: reduce) {
    .rselearningprogress a { transition: none; }
}
