.rr {
    --rr-primary: var(--mdb-primary, #c53030);
    --rr-primary-dark: #8a2121;
    --rr-primary-soft: #f9eaea;
    --rr-ink: #222222;
    --rr-text: #4f4f4f;
    --rr-muted: #8a8a8a;
    --rr-border: #dedede;
    --rr-hairline: #ececec;
    --rr-surface: #ffffff;
    --rr-root: #ffffff;
    --rr-badge-bg: #f1f1ef;
    --rr-badge-text: #5f5f5f;
    --rr-new-bg: var(--mdb-success, #14a44d);
    --rr-new-text: #ffffff;
    --rr-shadow: 0 1px 2px rgba(34, 34, 34, 0.05);
    --rr-shadow-hover: 0 6px 18px rgba(34, 34, 34, 0.1);
    container-type: inline-size;
    color: var(--rr-text);
}

[data-bs-theme="dark"] .rr,
.rr[data-bs-theme="dark"] {
    --rr-primary: #e46a6a;
    --rr-primary-dark: #f0a0a0;
    --rr-primary-soft: rgba(228, 106, 106, 0.14);
    --rr-ink: #f3f3f3;
    --rr-text: #cbcbcb;
    --rr-muted: #9a9a9a;
    --rr-border: rgba(255, 255, 255, 0.14);
    --rr-hairline: rgba(255, 255, 255, 0.1);
    --rr-surface: #2b2b2b;
    --rr-root: #222222;
    --rr-badge-bg: rgba(255, 255, 255, 0.08);
    --rr-badge-text: #c4c4c4;
    --rr-shadow: none;
    --rr-shadow-hover: 0 6px 18px rgba(0, 0, 0, 0.45);
}

.rr--themed {
    padding: clamp(1rem, 3vw, 1.6rem);
    border: 1px solid var(--rr-border);
    border-radius: 1rem;
    background: var(--rr-root);
}

[data-bs-theme="dark"] .rr--themed,
.rr--themed[data-bs-theme="dark"] {
    background: radial-gradient(
            circle at 85% 8%,
            rgba(197, 48, 48, 0.5),
            transparent 15rem
        ),
        #222;
}

.rr__title {
    margin: 0 0 1rem;
    color: var(--rr-ink);
    font-size: 1.35rem;
    font-weight: 500;
    line-height: 1.25;
}

.rr__title b,
.rr__title strong {
    font-weight: 700;
}

.rr__title > * {
    margin: 0;
    color: inherit;
}

.rr__title > * + * {
    margin-top: 0.35rem;
}

.rr__items {
    margin: 0;
    padding: 0;
    list-style: none;
}

.rr a {
    text-decoration: none;
}

.rr-stretch::after {
    content: "";
    position: absolute;
    z-index: 1;
    inset: 0;
}

.rr-meta {
    position: relative;
    z-index: 2;
    color: var(--rr-muted);
    font-size: 0.7rem;
    min-height: 18px;
}

.rr-meta__date {
    white-space: nowrap;
}

.rr .rr-lang {
    border-radius: 50rem;
    background: var(--rr-badge-bg);
    color: var(--rr-badge-text);
    font-size: 0.62rem;
    font-weight: 500;
    letter-spacing: 0.03em;
    padding: 0.2em 0.5em;
}

.rr .rr-lang--link {
    cursor: pointer;
    transition: background-color 0.12s ease, color 0.12s ease;
}

.rr .rr-lang--link:hover,
.rr .rr-lang--link:focus-visible {
    background: var(--rr-primary);
    color: #fff;
}

.rr .rr-lang--lit {
    background: var(--rr-primary);
    color: #fff;
    transition: background-color 0.6s ease, color 0.6s ease;
}

.rr-badge-new {
    display: inline-block;
    border-radius: var(--mdb-border-radius-sm, 0.5rem);
    background: var(--mdb-primary);
    color: var(--rr-new-text);
    font-size: 0.6rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    line-height: 1.5;
    padding: 0.1em 0.55em;
    vertical-align: 0.15em;
}

.rr-badge-new--inverse {
    background: #fff;
    color: var(--mdb-primary, #c53030);
}

.rr__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1rem;
}

.rr--modern {
    padding: 0.9rem 1.35rem;
    border: 1px solid var(--rr-border);
    border-top: 0.25rem solid var(--rr-primary);
    border-radius: 0.75rem;
    background: var(--rr-surface);
    box-shadow: var(--mdb-shadow-sm, 0 2px 4px rgba(0, 0, 0, 0.08));
}

[data-bs-theme="dark"] .rr--modern,
.rr--modern[data-bs-theme="dark"] {
    padding: clamp(1rem, 3vw, 1.6rem);
    border: 1px solid var(--rr-border);
    border-radius: 1rem;
    box-shadow: none;
}

.rr--modern .rr__items--timeline {
    display: grid;
    padding-left: 0.5rem;
    gap: 0;
    grid-template-columns: 1fr;
}

.rr--modern .rr-tl {
    position: relative;
    padding-left: 1.1rem;
    border-left: 2px solid var(--rr-hairline);
}

.rr--modern .rr-tl:first-child,
.rr--modern .rr-tl:last-child {
    border-left-color: transparent;
}

.rr--modern .rr-tl:first-child::after,
.rr--modern .rr-tl:last-child::after {
    content: "";
    position: absolute;
    left: -2px;
    width: 2px;
    background: var(--rr-hairline);
}

.rr--modern .rr-tl:first-child::after {
    top: 1.31rem;
    bottom: 0;
}

.rr--modern .rr-tl:last-child::after {
    top: 0;
    height: 1.31rem;
}

.rr--modern .rr-tl:first-child:last-child::after {
    display: none;
}

.rr--modern .rr-tl__row {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    padding: 0.6rem 0.55rem;
    border-bottom: 1px solid var(--rr-hairline);
    border-radius: 0.4rem 0.4rem 0 0;
    transition: background-color 0.15s ease;
}

.rr--modern .rr-tl:last-child .rr-tl__row {
    border-bottom: 0;
}

.rr--modern .rr-tl:hover .rr-tl__row,
.rr--modern .rr-tl:focus-within .rr-tl__row {
    background: var(--rr-primary-soft);
}

.rr--modern .rr-tl__arrow {
    flex: 0 0 auto;
    color: var(--rr-muted);
    font-size: 0.8rem;
    transition: transform 0.15s ease, color 0.15s ease;
}

.rr--modern .rr-tl:hover .rr-tl__arrow {
    color: var(--rr-primary);
    transform: translateX(3px);
}

.rr--modern .rr-tl__dot {
    position: absolute;
    z-index: 1;
    top: 0.95rem;
    left: -0.42rem;
    width: 0.72rem;
    height: 0.72rem;
    border: 2px solid var(--rr-surface);
    border-radius: 50%;
    background: var(--rr-muted);
    transition: background-color 0.15s ease, transform 0.15s ease;
}

.rr--modern .rr-tl--new .rr-tl__dot {
    background: var(--rr-primary);
}

.rr--modern .rr-tl:hover .rr-tl__dot {
    background: var(--rr-primary);
    transform: scale(1.25);
}

.rr--modern .rr-tl__body {
    display: block;
    min-width: 0;
    flex: 1 1 auto;
}

.rr--modern .rr-tl__heading {
    display: block;
    margin-bottom: 0.2rem;
}

.rr--modern .rr-tl__name {
    color: var(--rr-ink);
    font-size: 0.9rem;
    font-weight: 400;
    line-height: 1.35;
    transition: color 0.15s ease;
}

.rr--modern .rr-tl--new .rr-tl__name {
    font-weight: 500;
}

.rr--modern .rr-tl:hover .rr-tl__name {
    color: var(--rr-primary);
}

@container (min-width: 640px) {
    .rr--modern .rr__items--timeline {
        column-gap: 2rem;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .rr--modern .rr-tl:first-child,
    .rr--modern .rr-tl:last-child {
        border-left-color: var(--rr-hairline);
    }

    .rr--modern .rr-tl:first-child::after,
    .rr--modern .rr-tl:last-child::after {
        display: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    .rr--modern .rr-tl__row,
    .rr--modern .rr-tl__arrow,
    .rr--modern .rr-tl__dot,
    .rr--modern .rr-tl__name,
    .rr .rr-lang--link {
        transition: none;
    }

    .rr--modern .rr-tl:hover .rr-tl__dot {
        transform: none;
    }
}
