/**
 * Public referral program page (system/pages/referral-program.php, /pl/referral-program, /en/referral-program).
 * Loaded by template.php only on PAGE referral-program. Shared pieces: telara-components.css (tl-panel, tl-btn,
 * tl-slot, tl-orn). Classes: rp-*. Tier medallion colours = referralTierDefinitions() (referral_system.php).
 *
 * The page sits in the main column (about 670px on a computer, 320px on a 390px phone), so the layout follows
 * the width of .rp (container queries), not the screen. Browsers without container queries get the phone layout.
 * Motion: one entrance of the crest and one shine over the medallions on load; nothing runs after that,
 * and prefers-reduced-motion turns both off. The `!important` on p/h3 margins beats the long `.news p` /
 * `.news h3` selectors of main-dark.css (same as android-download.css); no `!important` on font sizes.
 */

.rp {
    container: rp / inline-size;
    color: var(--tl-parchment);
    margin: 0 0 8px;
}

.rp *,
.rp *::before,
.rp *::after {
    box-sizing: border-box;
}

.rp p {
    margin: 0 !important;
    line-height: 1.6;
}

.rp h3 {
    margin: 0 !important;
}

.rp a:not(.tl-btn) {
    color: var(--tl-gold-pale);
    text-decoration: underline;
    text-decoration-color: rgba(255, 230, 155, 0.35);
    text-underline-offset: 3px;
}

.rp a:not(.tl-btn):hover,
.rp a:not(.tl-btn):focus {
    color: #fff3c8;
    text-decoration-color: currentColor;
}

.rp .tl-btn {
    min-height: 48px;
    white-space: normal;
    text-align: center;
    line-height: 1.25;
}

.rp .tl-btn .rp-ico {
    flex: none;
    width: 18px;
    height: 18px;
}

.rp-ico {
    width: 20px;
    height: 20px;
    flex: none;
}

.rp-live {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

/* ------------------------------------------------------------------
 * Breadcrumb
 * ------------------------------------------------------------------ */
.rp-crumbs {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 8px;
    margin: 0 0 12px;
    color: var(--tl-faint);
    font-size: 0.8125rem;
}

.rp-crumbs a {
    color: var(--tl-gold);
}

.rp .rp-crumbs a {
    text-decoration: none;
}

/* ------------------------------------------------------------------
 * Hero
 * ------------------------------------------------------------------ */
.rp-hero {
    isolation: isolate;
    overflow: hidden;
    padding: 28px 16px 20px;
    text-align: center;
}

.rp-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: -1;
    background:
        radial-gradient(60% 46% at 50% 0%, rgba(230, 195, 92, 0.2), transparent 72%),
        radial-gradient(50% 30% at 50% 100%, rgba(201, 162, 39, 0.08), transparent 70%),
        repeating-linear-gradient(135deg, rgba(255, 230, 155, 0.018) 0 2px, transparent 2px 12px);
    pointer-events: none;
}

.rp-crest {
    display: block;
    width: 92px;
    height: 92px;
    margin: 0 auto 12px;
    filter: drop-shadow(0 0 18px rgba(230, 195, 92, 0.32)) drop-shadow(0 8px 14px rgba(0, 0, 0, 0.6));
    animation: tl-rise 0.6s ease-out both;
}

.rp-kicker {
    color: var(--tl-gold);
    font-family: var(--font-heading);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.2em;
    text-transform: uppercase;
}

.rp-title {
    margin: 8px auto 0;
    max-width: 18ch;
    color: var(--tl-gold-pale);
    background: linear-gradient(180deg, #fff7dc 0%, #ffe69b 38%, #e6c35c 70%, #c99a45 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    font-size: 1.75rem;
    line-height: 1.12;
    letter-spacing: 0.03em;
    text-shadow: none;
    filter: drop-shadow(0 2px 0 rgba(0, 0, 0, 0.55));
}

.rp-hero .tl-orn {
    margin-top: 14px;
}

.rp .rp-lead {
    max-width: 60ch;
    margin: 14px auto 0 !important;
    color: var(--tl-parchment);
    font-size: 1rem;
    line-height: 1.65 !important;
}

.rp-lead strong {
    color: var(--tl-gold-pale);
}

.rp .rp-mytier {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 14px auto 0 !important;
    padding: 4px 12px 4px 6px;
    border: 1px solid var(--tl-bronze-deep);
    border-radius: 999px;
    background: rgba(10, 9, 7, 0.6);
    color: var(--tl-muted);
    font-size: 0.875rem;
}

.rp-mytier strong {
    color: var(--tl-gold-pale);
}

/* Buttons row */
.rp-cta {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin-top: 20px;
}

.rp-cta .tl-btn {
    flex: 1 1 100%;
}

/* Logged in: the short link with Copy / Share */
.rp-linkbox {
    max-width: 540px;
    margin: 20px auto 0;
    padding: 14px;
    border: 1px solid var(--tl-bronze-deep);
    border-radius: 4px;
    background: rgba(10, 9, 7, 0.55);
    box-shadow: inset 0 1px 0 rgba(255, 230, 155, 0.06), 0 0 0 1px var(--tl-frame-outer);
    text-align: left;
}

.rp .rp-linkbox__label {
    margin: 0 0 8px !important;
    color: var(--tl-gold);
    font-family: var(--font-heading);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

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

.rp .rp-linkbox__field {
    display: block;
    flex: 1 1 100%;
    min-width: 0;
    min-height: 48px;
    margin: 0 !important;
    padding: 13px 12px;
    border: 1px solid var(--tl-bronze);
    border-radius: 3px;
    background: #0a0907;
    box-shadow: inset 0 1px 4px rgba(0, 0, 0, 0.7);
    color: var(--tl-muted);
    font-size: 0.9375rem;
    line-height: 1.3 !important;
    overflow-wrap: anywhere;
    user-select: all;
    -webkit-user-select: all;
}

.rp-linkbox__field b {
    color: var(--tl-gold-pale);
    font-weight: 700;
    letter-spacing: 0.02em;
}

.rp-linkbox__row .tl-btn {
    flex: 1 1 0;
    height: 48px;
    margin: 0;
}

.rp .rp-linkbox__hint {
    margin-top: 10px !important;
    color: var(--tl-faint);
    font-size: 0.8125rem;
    line-height: 1.5 !important;
}

.rp-copy .rp-ico:nth-of-type(2),
.rp-copy.is-copied .rp-ico:nth-of-type(1) {
    display: none;
}

.rp-copy.is-copied .rp-ico:nth-of-type(2) {
    display: block;
}

.rp-share[hidden] {
    display: none;
}

/* Linked sub-account */
.rp-note {
    display: flex;
    gap: 12px;
    max-width: 540px;
    margin: 20px auto 0;
    padding: 12px 14px;
    border: 1px dashed var(--tl-bronze);
    border-radius: 4px;
    background: rgba(10, 9, 7, 0.55);
    color: var(--tl-muted);
    font-size: 0.9375rem;
    text-align: left;
}

.rp-note .rp-ico {
    margin-top: 2px;
    color: var(--tl-gold);
}

/* Numbers strip */
.rp-stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin: 24px 0 0;
    padding: 16px 0 0;
    border-top: 1px solid transparent;
    border-image: linear-gradient(90deg, transparent, rgba(201, 162, 39, 0.6), transparent) 1;
    list-style: none;
}

.rp-stats li {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 0 4px;
    line-height: 1.3;
}

.rp-stats li + li {
    border-left: 1px solid rgba(139, 111, 71, 0.35);
}

.rp-stats strong {
    color: var(--tl-gold-hero);
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 800;
    letter-spacing: 0.02em;
    white-space: nowrap;
}

.rp-stats span {
    color: var(--tl-muted);
    font-size: 0.8125rem;
}

/* ------------------------------------------------------------------
 * Sections
 * ------------------------------------------------------------------ */
.rp-sec {
    margin-top: 40px;
}

.rp-head {
    margin-bottom: 20px;
    text-align: center;
}

.rp-h2 {
    margin: 0;
    color: var(--tl-title);
    font-size: 1.3125rem;
    line-height: 1.2;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.rp-head .tl-orn {
    margin-top: 10px;
}

.rp .rp-head__sub {
    max-width: 52ch;
    margin: 12px auto 0 !important;
    color: var(--tl-muted);
    font-size: 0.9375rem;
}

/* ------------------------------------------------------------------
 * Two sides: you / your friend
 * ------------------------------------------------------------------ */
.rp-sides {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
}

.rp-side {
    padding: 22px 18px 20px;
    overflow: hidden;
}

.rp-side::before {
    content: '';
    position: absolute;
    top: 0;
    left: 12%;
    right: 12%;
    height: 1px;
    background: var(--tl-gold-line);
}

.rp-side--you {
    background:
        radial-gradient(90% 60% at 0% 0%, rgba(230, 195, 92, 0.12), transparent 65%) padding-box,
        linear-gradient(180deg, #1f1a14, #17140f 55%) padding-box,
        linear-gradient(180deg, rgba(201, 165, 122, 0.85), rgba(78, 62, 40, 0.9) 40%, rgba(58, 45, 32, 0.9)) border-box;
}

.rp-side--friend {
    background:
        radial-gradient(90% 60% at 100% 0%, rgba(230, 195, 92, 0.16), transparent 65%) padding-box,
        linear-gradient(180deg, #221b13, #17140f 55%) padding-box,
        linear-gradient(180deg, rgba(255, 230, 155, 0.9), rgba(140, 102, 52, 0.9) 45%, rgba(58, 45, 32, 0.9)) border-box;
}

.rp-side__who {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--tl-title);
    font-family: var(--font-heading);
    font-size: 0.875rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.rp-side__who .tl-slot {
    width: 42px;
    height: 42px;
}

.rp .rp-side__big {
    margin-top: 16px !important;
    color: var(--tl-gold-hero);
    background: linear-gradient(180deg, #fff3c4 0%, #f0cf6a 45%, #c9a227 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    font-family: var(--font-heading);
    font-size: 2.75rem;
    font-weight: 800;
    line-height: 1 !important;
    letter-spacing: 0.01em;
    filter: drop-shadow(0 2px 0 rgba(0, 0, 0, 0.5));
}

.rp .rp-side__cap {
    margin-top: 6px !important;
    color: var(--tl-muted);
    font-size: 0.9375rem;
    line-height: 1.45 !important;
}

.rp-list {
    display: grid;
    gap: 10px;
    margin: 18px 0 0;
    padding: 16px 0 0;
    border-top: 1px solid rgba(139, 111, 71, 0.3);
    list-style: none;
}

.rp-list li {
    display: flex;
    gap: 10px;
    font-size: 0.9375rem;
    line-height: 1.45;
}

.rp-list .rp-ico {
    width: 18px;
    height: 18px;
    margin-top: 2px;
    color: var(--tl-gold);
}

.rp-sides__link {
    position: relative;
    z-index: 2;
    display: grid;
    place-items: center;
    justify-self: center;
    width: 44px;
    height: 44px;
    margin: -12px 0;
    border-radius: 50%;
    background: radial-gradient(circle at 50% 35%, #3a2d20, #0a0907 80%);
    border: 1px solid var(--tl-gold-frame);
    box-shadow: 0 0 0 3px var(--tl-frame-outer), 0 0 18px rgba(230, 195, 92, 0.35);
    color: var(--tl-gold-pale);
}

.rp-sides__link .rp-ico {
    width: 20px;
    height: 20px;
}

/* Referral Starter Pack */
.rp-pack {
    margin-top: 18px;
    padding: 12px 14px 14px;
    border: 1px solid var(--tl-bronze-deep);
    border-radius: 4px;
    background: rgba(10, 9, 7, 0.55);
    box-shadow: inset 0 1px 0 rgba(255, 230, 155, 0.05);
}

.rp-pack__head {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--tl-title);
    font-family: var(--font-heading);
    font-size: 0.875rem;
    font-weight: 700;
    letter-spacing: 0.06em;
}

.rp-pack__head .rp-ico {
    color: var(--tl-gold-hero);
}

.rp-pack__head span {
    flex: 1;
}

.rp-pack__head b {
    padding: 2px 8px;
    border: 1px solid var(--tl-gold-pale);
    border-radius: 2px;
    background: linear-gradient(180deg, #f6dc8a, var(--tl-gold));
    color: var(--tl-ink);
    font-size: 0.75rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    white-space: nowrap;
}

.rp .rp-pack__sub {
    margin-top: 6px !important;
    color: var(--tl-faint);
    font-size: 0.8125rem;
}

.rp-pack__items {
    display: grid;
    gap: 6px;
    margin: 10px 0 0;
    padding: 0;
    list-style: none;
}

.rp-pack__items li {
    display: flex;
    gap: 10px;
    color: var(--tl-parchment);
    font-size: 0.875rem;
    line-height: 1.45;
}

.rp-pack__items li::before {
    content: '';
    flex: none;
    width: 6px;
    height: 6px;
    margin: 8px 2px 0;
    background: var(--tl-gold-hero);
    transform: rotate(45deg);
    box-shadow: 0 0 6px rgba(230, 195, 92, 0.6);
}

/* ------------------------------------------------------------------
 * How it works
 * ------------------------------------------------------------------ */
.rp-steps {
    position: relative;
    display: grid;
    gap: 18px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.rp-steps::before {
    content: '';
    position: absolute;
    top: 24px;
    bottom: 24px;
    left: 23px;
    width: 1px;
    background: linear-gradient(180deg, var(--tl-gold-frame), rgba(139, 111, 71, 0.25));
}

.rp-step {
    position: relative;
    display: grid;
    grid-template-columns: 48px minmax(0, 1fr);
    gap: 14px;
    align-items: start;
}

.rp-step__badge {
    position: relative;
    z-index: 1;
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: radial-gradient(circle at 50% 30%, #3a2d20, #0a0907 85%);
    border: 1px solid var(--tl-gold-frame);
    box-shadow: 0 0 0 3px var(--tl-frame-outer), 0 0 0 4px rgba(201, 162, 39, 0.35), 0 6px 14px -6px rgba(230, 195, 92, 0.5);
    color: var(--tl-gold-pale);
}

.rp-step__badge .rp-ico {
    width: 22px;
    height: 22px;
}

.rp-step__num {
    position: absolute;
    top: -6px;
    left: -6px;
    display: grid;
    place-items: center;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--tl-gold-button);
    box-shadow: 0 0 0 2px var(--tl-frame-outer);
    color: var(--tl-ink);
    font-family: var(--font-heading);
    font-size: 0.75rem;
    font-weight: 800;
    line-height: 1;
}

.rp-step__body {
    padding: 12px 14px 14px;
    border: 1px solid rgba(78, 62, 40, 0.8);
    border-radius: 4px;
    background: linear-gradient(180deg, rgba(31, 26, 20, 0.92), rgba(23, 20, 15, 0.92));
}

.rp .rp-step__title {
    margin: 0 0 6px !important;
    color: var(--tl-title);
    font-size: 1rem;
    line-height: 1.3;
    letter-spacing: 0.04em;
    text-shadow: none;
}

.rp-step p {
    color: var(--tl-muted);
    font-size: 0.9375rem;
    line-height: 1.55 !important;
}

/* ------------------------------------------------------------------
 * Tier medallions (same family as the referral panel: metal per tier, Diamond in cyan)
 * ------------------------------------------------------------------ */
.rp-tiers {
    position: relative;
    display: grid;
    gap: 12px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.rp-tiers::before {
    content: '';
    position: absolute;
    top: 32px;
    bottom: 32px;
    left: 31px;
    width: 2px;
    background: linear-gradient(180deg, #8b5a2b, #9e9e9e 22%, #c0c0c0 42%, #ffd700 62%, #e8f4ff 80%, #00e5ff);
    opacity: 0.45;
}

.rp-tier {
    position: relative;
    display: grid;
    grid-template-columns: 64px minmax(0, 1fr);
    gap: 14px;
    align-items: center;
}

.rp-tier__text {
    display: grid;
    gap: 1px;
    padding: 10px 12px;
    border: 1px solid rgba(78, 62, 40, 0.8);
    border-radius: 4px;
    background: linear-gradient(180deg, rgba(31, 26, 20, 0.92), rgba(23, 20, 15, 0.92));
}

.rp-tier__name {
    color: var(--m-label, var(--tl-title));
    font-family: var(--font-heading);
    font-size: 0.9375rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.rp-tier__range {
    color: var(--tl-faint);
    font-size: 0.8125rem;
}

.rp-tier__bonus {
    color: var(--tl-parchment);
    font-size: 0.875rem;
    font-weight: 600;
    line-height: 1.4;
}

.rp-tier__you {
    margin-left: 6px;
    padding: 1px 6px;
    border-radius: 2px;
    background: linear-gradient(180deg, #f6dc8a, var(--tl-gold));
    color: var(--tl-ink);
    font-size: 0.6875rem;
    font-style: normal;
    letter-spacing: 0.08em;
    vertical-align: 2px;
}

.rp-medal {
    --m-hi: #c48a52;
    --m-base: #8b5a2b;
    --m-lo: #4b2c12;
    --m-ink: #ffe9cc;
    --m-glow: rgba(139, 90, 43, 0.45);
    position: relative;
    z-index: 1;
    display: grid;
    place-items: center;
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background:
        radial-gradient(circle at 34% 26%, rgba(255, 255, 255, 0.5), transparent 38%),
        conic-gradient(from 210deg, var(--m-hi), var(--m-lo) 22%, var(--m-hi) 46%, var(--m-lo) 70%, var(--m-hi));
    box-shadow:
        0 0 0 2px var(--tl-frame-outer),
        0 0 0 3px rgba(255, 255, 255, 0.12),
        0 8px 18px -6px var(--m-glow),
        inset 0 -4px 8px rgba(0, 0, 0, 0.35);
    color: var(--m-ink);
}

.rp-medal::before {
    content: '';
    position: absolute;
    inset: 8px;
    border-radius: 50%;
    background: radial-gradient(circle at 40% 30%, var(--m-hi), var(--m-base) 52%, var(--m-lo) 100%);
    box-shadow: inset 0 2px 2px rgba(255, 255, 255, 0.35), inset 0 -3px 6px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(0, 0, 0, 0.4);
}

.rp-medal__mark {
    position: relative;
    font-family: var(--font-heading);
    font-size: 1.125rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    line-height: 1;
    text-shadow: 0 1px 0 var(--m-shade, rgba(0, 0, 0, 0.55));
}

.rp-medal > .rp-ico {
    position: relative;
    width: 26px;
    height: 26px;
    stroke-width: 2;
}

.rp-medal__shine {
    position: absolute;
    inset: 0;
    overflow: hidden;
    border-radius: 50%;
    pointer-events: none;
}

.rp-medal__shine::before {
    content: '';
    position: absolute;
    top: -20%;
    left: -70%;
    width: 45%;
    height: 140%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.6), transparent);
    transform: rotate(18deg);
    opacity: 0;
    animation: rp-shine 1.1s ease-out calc(0.4s + var(--rp-i, 0) * 0.14s) 1 both;
}

@keyframes rp-shine {
    0% { left: -70%; opacity: 1; }
    100% { left: 130%; opacity: 1; }
}

.rp-medal--wood::before {
    background:
        repeating-radial-gradient(ellipse 120% 70% at 30% 115%, transparent 0 3px, rgba(40, 20, 6, 0.28) 3px 4px),
        radial-gradient(circle at 40% 30%, var(--m-hi), var(--m-base) 52%, var(--m-lo) 100%);
}

.rp-medal--iron {
    --m-hi: #d6d6d6;
    --m-base: #9e9e9e;
    --m-lo: #4b4d50;
    --m-ink: #1e1f21;
    --m-shade: rgba(255, 255, 255, 0.45);
    --m-glow: rgba(158, 158, 158, 0.5);
}

.rp-medal--silver {
    --m-hi: #ffffff;
    --m-base: #c0c0c0;
    --m-lo: #73777e;
    --m-ink: #23262b;
    --m-shade: rgba(255, 255, 255, 0.6);
    --m-glow: rgba(192, 192, 192, 0.55);
}

.rp-medal--gold {
    --m-hi: #fff3a8;
    --m-base: #ffd700;
    --m-lo: #9c7400;
    --m-ink: #3a2800;
    --m-shade: rgba(255, 245, 190, 0.6);
    --m-glow: rgba(255, 215, 0, 0.6);
}

.rp-medal--platinum {
    --m-hi: #ffffff;
    --m-base: #e8f4ff;
    --m-lo: #8fa9be;
    --m-ink: #1d3446;
    --m-shade: rgba(255, 255, 255, 0.7);
    --m-glow: rgba(180, 220, 255, 0.6);
}

.rp-medal--diamond {
    --m-hi: #c8fdff;
    --m-base: #00e5ff;
    --m-lo: #006b78;
    --m-ink: #003a42;
    --m-glow: rgba(0, 229, 255, 0.7);
}

.rp-medal--diamond::after {
    content: '';
    position: absolute;
    top: 3px;
    right: 5px;
    z-index: 2;
    width: 14px;
    height: 14px;
    background: #ffffff;
    clip-path: polygon(50% 0, 60% 40%, 100% 50%, 60% 60%, 50% 100%, 40% 60%, 0 50%, 40% 40%);
    filter: drop-shadow(0 0 4px rgba(200, 255, 255, 0.95));
}

.rp-medal--xs {
    width: 24px;
    height: 24px;
    box-shadow: 0 0 0 1px var(--tl-frame-outer), 0 0 10px var(--m-glow);
}

.rp-medal--xs::before {
    inset: 4px;
}

.rp-medal--xs::after {
    display: none;
}

.rp-tier--wood { --m-label: #d9a46c; }
.rp-tier--iron { --m-label: #c9c9c9; }
.rp-tier--silver { --m-label: #e6e6e6; }
.rp-tier--gold { --m-label: #ffd700; }
.rp-tier--platinum { --m-label: #e8f4ff; }
.rp-tier--diamond { --m-label: #6ff2ff; }

.rp-tier--diamond .rp-tier__text {
    border-color: rgba(0, 229, 255, 0.45);
    background:
        radial-gradient(80% 120% at 0% 50%, rgba(0, 229, 255, 0.12), transparent 70%),
        linear-gradient(180deg, rgba(31, 26, 20, 0.92), rgba(23, 20, 15, 0.92));
}

.rp-tier.is-current .rp-medal {
    box-shadow:
        0 0 0 2px var(--tl-frame-outer),
        0 0 0 4px var(--m-base),
        0 0 26px 4px var(--m-glow),
        inset 0 -4px 8px rgba(0, 0, 0, 0.35);
}

.rp-tier.is-current .rp-tier__text {
    border-color: var(--tl-gold-frame);
}

.rp .rp-example {
    display: flex;
    gap: 10px;
    margin-top: 16px !important;
    padding: 12px 14px;
    border-left: 2px solid var(--tl-gold-frame);
    background: linear-gradient(90deg, rgba(201, 162, 39, 0.1), transparent);
    color: var(--tl-muted);
    font-size: 0.9375rem;
}

.rp-example .rp-ico {
    width: 18px;
    height: 18px;
    margin-top: 3px;
    color: var(--tl-gold-hero);
}

/* ------------------------------------------------------------------
 * Diamond showcase
 * ------------------------------------------------------------------ */
.rp-diamond {
    display: grid;
    gap: 18px;
    padding: 22px 18px;
    overflow: hidden;
    background:
        radial-gradient(70% 55% at 50% 18%, rgba(0, 229, 255, 0.13), transparent 70%) padding-box,
        linear-gradient(180deg, #1c1a17, #141210 60%) padding-box,
        linear-gradient(135deg, rgba(170, 248, 255, 0.85), rgba(0, 229, 255, 0.35) 30%, rgba(78, 62, 40, 0.9) 62%, rgba(201, 165, 122, 0.8)) border-box;
}

.rp-diamond__stage {
    position: relative;
    display: grid;
    place-items: center;
    width: 200px;
    height: 200px;
    margin: 0 auto;
}

.rp-diamond__stage::before {
    content: '';
    position: absolute;
    inset: 10px;
    border-radius: 50%;
    background:
        radial-gradient(circle, rgba(0, 229, 255, 0.28) 0%, rgba(0, 229, 255, 0.08) 45%, transparent 68%),
        radial-gradient(circle, #1b2a2d 0%, #0a0907 70%);
    box-shadow: 0 0 0 1px rgba(0, 229, 255, 0.35), 0 0 0 7px rgba(0, 0, 0, 0.35), 0 0 0 8px rgba(0, 229, 255, 0.18), 0 0 40px rgba(0, 229, 255, 0.18);
}

.rp-diamond__stage::after {
    content: '';
    position: absolute;
    left: 50%;
    bottom: 34px;
    width: 120px;
    height: 16px;
    border-radius: 50%;
    background: radial-gradient(ellipse, rgba(0, 0, 0, 0.75), transparent 70%);
    transform: translateX(-50%);
}

.rp .rp-diamond__stage img {
    position: relative;
    z-index: 1;
    max-width: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    image-rendering: pixelated;
    image-rendering: crisp-edges;
}

.rp .rp-diamond__rider {
    width: 192px;
    height: 192px;
    object-fit: contain;
    filter: drop-shadow(0 0 10px rgba(0, 229, 255, 0.35));
}

.rp-diamond__pair {
    display: none;
    position: relative;
    z-index: 1;
    gap: 0;
    align-items: end;
}

.rp-diamond__stage.is-fallback .rp-diamond__pair {
    display: flex;
}

.rp .rp-diamond__pair img {
    width: 96px;
    height: 96px;
    filter: drop-shadow(0 0 8px rgba(0, 229, 255, 0.3));
}

.rp-diamond__copy {
    display: grid;
    gap: 12px;
    align-content: center;
}

.rp-kicker--diamond {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #6ff2ff;
}

.rp-kicker--diamond .rp-ico {
    width: 18px;
    height: 18px;
}

.rp .rp-diamond__title {
    color: #e9feff;
    background: linear-gradient(180deg, #ffffff, #b5f7ff 55%, #4fdcf0);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    font-size: 1.375rem;
    letter-spacing: 0.06em;
    text-shadow: none;
}

.rp-diamond__copy > p {
    color: var(--tl-muted);
    font-size: 0.9375rem;
}

.rp-diamond__items {
    display: grid;
    gap: 8px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.rp-diamond__items li {
    display: flex;
    align-items: center;
    gap: 12px;
}

.rp-diamond__slot {
    display: grid;
    flex: none;
    place-items: center;
    width: 60px;
    height: 60px;
    border: 1px solid rgba(0, 229, 255, 0.45);
    border-radius: 4px;
    background: radial-gradient(circle at 50% 40%, #1d2a2c, #0a0907 80%);
    box-shadow: 0 0 0 1px var(--tl-frame-outer), inset 0 0 12px rgba(0, 0, 0, 0.8);
    overflow: hidden;
}

.rp .rp-diamond__slot img {
    width: 64px;
    height: 64px;
    max-width: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    image-rendering: pixelated;
}

.rp-diamond__items li > span:last-child {
    display: grid;
    line-height: 1.35;
}

.rp-diamond__items b {
    color: var(--tl-parchment);
    font-size: 0.9375rem;
}

.rp-diamond__items small {
    color: var(--tl-faint);
    font-size: 0.8125rem;
}

.rp .rp-diamond__req {
    padding: 10px 12px;
    border: 1px solid rgba(0, 229, 255, 0.35);
    border-radius: 4px;
    background: rgba(0, 229, 255, 0.06);
    color: #c9f9ff;
    font-size: 0.875rem;
    line-height: 1.5 !important;
}

/* ------------------------------------------------------------------
 * Rules
 * ------------------------------------------------------------------ */
.rp-rules {
    display: grid;
    gap: 10px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.rp-rule {
    display: flex;
    gap: 14px;
    padding: 14px;
    border: 1px solid var(--tl-bronze-deep);
    border-radius: 4px;
    background: linear-gradient(180deg, rgba(31, 26, 20, 0.85), rgba(16, 14, 11, 0.85));
    box-shadow: 0 0 0 1px var(--tl-frame-outer);
}

.rp-rule .tl-slot {
    width: 42px;
    height: 42px;
}

.rp-rule .rp-ico {
    width: 20px;
    height: 20px;
}

.rp .rp-rule__title {
    margin: 0 0 4px !important;
    color: var(--tl-title);
    font-size: 0.9375rem;
    letter-spacing: 0.04em;
    text-shadow: none;
}

.rp-rule p {
    color: var(--tl-muted);
    font-size: 0.875rem;
    line-height: 1.5 !important;
}

/* ------------------------------------------------------------------
 * FAQ
 * ------------------------------------------------------------------ */
.rp-faq {
    border-top: 1px solid var(--tl-line);
}

.rp-faq__item {
    border-bottom: 1px solid var(--tl-line);
}

.rp-faq__item summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    min-height: 52px;
    padding: 12px 4px;
    color: var(--tl-parchment);
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.4;
    cursor: pointer;
    list-style: none;
}

.rp-faq__item summary::-webkit-details-marker {
    display: none;
}

.rp-faq__item summary:hover,
.rp-faq__item[open] summary {
    color: var(--tl-gold-pale);
}

.rp-faq__item summary:focus-visible {
    outline: 2px solid rgba(230, 195, 92, 0.6);
    outline-offset: 2px;
}

.rp-faq__item summary .rp-ico {
    width: 18px;
    height: 18px;
    color: var(--tl-gold);
    transition: transform 0.2s ease;
}

.rp-faq__item[open] summary .rp-ico {
    transform: rotate(90deg);
}

.rp-faq__item p {
    padding: 0 4px 16px;
    color: var(--tl-muted);
    font-size: 0.9375rem;
}

/* ------------------------------------------------------------------
 * Closing call to action
 * ------------------------------------------------------------------ */
.rp-final {
    isolation: isolate;
    overflow: hidden;
    padding: 28px 16px 22px;
    text-align: center;
}

.rp-final::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: -1;
    background: radial-gradient(70% 70% at 50% 110%, rgba(230, 195, 92, 0.18), transparent 70%);
    pointer-events: none;
}

.rp-final .tl-orn {
    margin-top: 10px;
}

.rp .rp-final__text {
    max-width: 50ch;
    margin: 14px auto 0 !important;
    color: var(--tl-parchment);
    font-size: 1rem;
}

.rp .rp-final__more {
    margin-top: 18px !important;
    color: var(--tl-faint);
    font-size: 0.875rem;
}

/* ------------------------------------------------------------------
 * Wider column (main column on a tablet or computer)
 * ------------------------------------------------------------------ */
@container rp (min-width: 420px) {
    .rp-hero {
        padding: 34px 28px 24px;
    }

    .rp-crest {
        width: 108px;
        height: 108px;
    }

    .rp-title {
        font-size: 2.125rem;
    }

    .rp-cta .tl-btn {
        flex: 0 1 auto;
        padding: 0 22px;
    }

    .rp .rp-linkbox__row .rp-linkbox__field {
        flex: 1 1 240px;
        padding: 13px 14px;
        font-size: 1rem;
    }

    .rp-linkbox__row .tl-btn {
        flex: 0 0 auto;
    }

    .rp-stats strong {
        font-size: 1.625rem;
    }

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

    .rp-tiers {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 22px 12px;
    }

    .rp-tiers::before {
        display: none;
    }

    .rp-tier {
        grid-template-columns: minmax(0, 1fr);
        grid-template-rows: auto 1fr;
        align-items: start;
        justify-items: center;
        gap: 10px;
        text-align: center;
    }

    .rp-tier__text {
        align-self: stretch;
        align-content: start;
        width: 100%;
        padding: 10px 8px;
    }

    .rp-tier__you {
        display: block;
        width: max-content;
        margin: 4px auto 0;
    }

    .rp-rules {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .rp-final {
        padding: 34px 28px 26px;
    }
}

@container rp (min-width: 560px) {
    .rp-sides {
        grid-template-columns: minmax(0, 1fr) 16px minmax(0, 1fr);
        align-items: stretch;
    }

    .rp-sides__link {
        align-self: center;
        margin: 0 -14px;
    }

    .rp-side {
        padding: 24px 22px 22px;
    }

    .rp-side__big {
        font-size: 3.25rem;
    }

    .rp-steps {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 16px;
    }

    .rp-steps::before {
        top: 24px;
        bottom: auto;
        left: 16.66%;
        right: 16.66%;
        width: auto;
        height: 1px;
        background: linear-gradient(90deg, var(--tl-gold-frame), rgba(201, 162, 39, 0.35), var(--tl-gold-frame));
    }

    .rp-step {
        grid-template-columns: minmax(0, 1fr);
        grid-template-rows: auto 1fr;
        justify-items: center;
        gap: 12px;
        text-align: center;
    }

    .rp-step__body {
        align-self: stretch;
        width: 100%;
    }

    .rp-diamond {
        grid-template-columns: 210px minmax(0, 1fr);
        gap: 24px;
        padding: 26px 26px 26px 18px;
        background:
            radial-gradient(45% 75% at 18% 50%, rgba(0, 229, 255, 0.15), transparent 70%) padding-box,
            linear-gradient(180deg, #1c1a17, #141210 60%) padding-box,
            linear-gradient(135deg, rgba(170, 248, 255, 0.85), rgba(0, 229, 255, 0.35) 30%, rgba(78, 62, 40, 0.9) 62%, rgba(201, 165, 122, 0.8)) border-box;
    }

    .rp-diamond__stage {
        width: 210px;
        height: 210px;
    }

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

    .rp-diamond__items {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@container rp (min-width: 640px) {
    .rp-title {
        font-size: 2.375rem;
    }

    .rp-tiers {
        grid-template-columns: repeat(6, minmax(0, 1fr));
        gap: 8px;
    }

    .rp-tiers::before {
        display: block;
        top: 31px;
        bottom: auto;
        left: 8%;
        right: 8%;
        width: auto;
        height: 2px;
        background: linear-gradient(90deg, #8b5a2b, #9e9e9e 22%, #c0c0c0 42%, #ffd700 62%, #e8f4ff 80%, #00e5ff);
    }

    .rp-tier__text {
        padding: 10px 6px;
    }

    .rp-tier__name {
        font-size: 0.875rem;
        letter-spacing: 0.06em;
    }

    .rp-tier__bonus {
        font-size: 0.8125rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .rp-crest,
    .rp-medal__shine::before {
        animation: none;
    }

    .rp-faq__item summary .rp-ico {
        transition: none;
    }
}
