/* com_rachedpoints — ترتيب الأسبوع. Same design language as ركن الهدايا and the live sessions,
   inside the tasi3a template. Everything is scoped under .rp */

@font-face { font-family: "Changa"; font-style: normal; font-weight: 400; font-display: swap; src: url("../fonts/changa-arabic-400-normal.woff2") format("woff2"); unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC; }
@font-face { font-family: "Changa"; font-style: normal; font-weight: 600; font-display: swap; src: url("../fonts/changa-arabic-600-normal.woff2") format("woff2"); unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC; }
@font-face { font-family: "Changa"; font-style: normal; font-weight: 800; font-display: swap; src: url("../fonts/changa-arabic-800-normal.woff2") format("woff2"); unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC; }
@font-face { font-family: "Changa"; font-style: normal; font-weight: 400; font-display: swap; src: url("../fonts/changa-latin-400-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Changa"; font-style: normal; font-weight: 600; font-display: swap; src: url("../fonts/changa-latin-600-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Changa"; font-style: normal; font-weight: 800; font-display: swap; src: url("../fonts/changa-latin-800-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

/* the template wraps components in a white notebook sheet: this page draws its own */
.tsa-component.tsa-sheet:has(> .rp) { padding: 0; background: none; border: 0; box-shadow: none; }
.tsa-component.tsa-sheet:has(> .rp)::before { display: none; }
.tsa-component.tsa-sheet .rp :is(h1, h2, h3), .rp :is(h1, h2, h3) { display: block; background: none; box-decoration-break: slice; -webkit-box-decoration-break: slice; }
.tsa-component.tsa-sheet .rp h1 + * { margin-top: 0; }

.rp {
  --ink: #142c45; --blue: #1249d8; --blue-d: #0f39ae; --navy: #0d2350; --red: #ed202a; --muted: #5f6c85;
  --line: #e2e7f2; --gold: #ffc83d; --gold-d: #e0a100; --ok: #1f7a4d;
  color: var(--ink); font-family: Changa, Tajawal, Tahoma, Arial, sans-serif; line-height: 1.7;
  display: grid; gap: clamp(18px, 2.5vw, 28px);
}
.rp *, .rp *::before, .rp *::after { box-sizing: border-box; }
.rp a { color: inherit; text-decoration: none; }
.rp img { border-radius: 0; max-width: none; }
.rp h1, .rp h2, .rp h3 { font-family: inherit; color: var(--ink); background: none; }
.rp :focus-visible { outline: 3px solid #f3b731; outline-offset: 4px; border-radius: 8px; }
.rp-red { color: var(--red); }
.rp bdi { unicode-bidi: isolate; }

.rp-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 9px 20px; border-radius: 14px; border: 1px solid transparent; font: 600 15px/1.2 Changa, Tahoma, sans-serif; cursor: pointer; transition: transform .18s, box-shadow .18s; }
.rp-btn:hover { transform: translateY(-2px); }
.rp-btn.is-gold { background: linear-gradient(180deg, #ffd65c, var(--gold)); color: #3b2a00; box-shadow: 0 4px 0 var(--gold-d), 0 10px 22px #e0a10040; }
.rp-btn.is-ghost { background: #fff; color: var(--ink); border-color: #d6def0; }
.rp-btns { display: flex; flex-wrap: wrap; gap: 10px; }

/* hero */
.rp-hero { position: relative; isolation: isolate; overflow: hidden; display: flex; align-items: center; justify-content: center; text-align: center;
  min-height: 400px; padding: 42px 230px 48px; border-radius: 28px; border: 1px solid var(--line);
  background: radial-gradient(ellipse at 50% 100%, #fff3cc, transparent 62%), radial-gradient(ellipse at 50% 120%, #dfe9ff, transparent 70%), #fff;
  box-shadow: 0 1px 2px #0d235012, 0 14px 40px #0d235012; }
.rp-hero::after { content: "★"; position: absolute; left: 12%; top: 40px; font: 64px Arial; color: #fff0c2; transform: rotate(15deg); z-index: -1; }
.rp-hero::before { content: "+"; position: absolute; right: 16%; top: 28px; font: 60px Arial; color: #e4eaff; transform: rotate(-12deg); z-index: -1; }
.rp-hero-copy { position: relative; z-index: 2; max-width: 620px; }
.rp-eyebrow { color: #6b4a00; font-size: 13px; font-weight: 600; display: inline-flex; gap: 8px; align-items: center; background: #fff4cf; border-radius: 50px; padding: 6px 16px; }
.rp h1 { font-size: clamp(32px, 4.4vw, 54px); font-weight: 800; line-height: 1.45; margin: 16px 0 14px; }
.rp h1 em { color: var(--blue); font-style: normal; position: relative; }
.rp h1 em::after { content: ""; position: absolute; bottom: 2px; right: 0; width: 100%; height: 5px; background: var(--gold); border-radius: 100%; transform: rotate(-2deg); }
.rp-intro { color: var(--muted); font-size: 16px; line-height: 1.9; margin: 8px auto 18px; max-width: 540px; }
.rp-reset { display: inline-grid; gap: 2px; padding: 10px 24px; border-radius: 18px; background: linear-gradient(135deg, #0d2350, #1239a0); color: #fff; box-shadow: 0 12px 26px #0d235033; }
.rp-reset span { font-size: 13px; opacity: .85; }
.rp-reset b { font: 800 26px/1.2 Changa, Arial, sans-serif; color: #ffd65c; font-variant-numeric: tabular-nums; }
.rp-reset b small { font-size: 15px; font-weight: 600; color: #fff; }
.rp-reset bdi { letter-spacing: 1px; }
.rp-mascot { position: absolute; bottom: 0; z-index: 1; width: auto; height: 340px; pointer-events: none; animation: rp-float 6s ease-in-out infinite; }
.rp-mascot.is-boy { right: 8px; }
.rp-mascot.is-girl { left: 8px; animation-delay: -3s; }
@keyframes rp-float { 0%, 100% { translate: 0 0; } 50% { translate: 0 -6px; } }

/* my points */
.rp-me { display: grid; grid-template-columns: 200px 1fr; gap: 0; border-radius: 24px; overflow: hidden; border: 1px solid #c9d8ff; background: #fff; box-shadow: 0 8px 26px #1249d812; }
.rp-me.is-guest { grid-template-columns: 1fr; border-style: dashed; background: #f6f9ff; }
.rp-me-score { display: grid; place-content: center; justify-items: center; gap: 2px; padding: 20px 12px; color: #fff; text-align: center;
  background: radial-gradient(circle at 70% 15%, #3a6cf0 0, transparent 55%), linear-gradient(160deg, #0d2350, #1239a0 70%, #1249d8); }
.rp-me-score small { font-size: 13px; color: #ffd65c; }
.rp-me-score b { font: 800 58px/1 Changa, Arial, sans-serif; }
.rp-me-score span { font-size: 13px; opacity: .9; }
.rp-me-copy { display: grid; gap: 6px; align-content: center; padding: 18px 24px; }
.rp-me-copy p { margin: 0; }
.rp-me-hello { font-size: 18px; font-weight: 800; }
.rp-me-goal { font-size: 16px; }
.rp-me-goal b { color: var(--blue); }
.rp-me-goal.is-in { color: var(--ok); font-weight: 600; }
.rp-me-streak { font-size: 14px; color: #8a4b00; }
.rp-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.rp-chip { display: inline-flex; align-items: center; gap: 5px; padding: 3px 12px; border-radius: 30px; font-size: 12px; background: #f2f5fc; border: 1px solid #e1e8f6; }
.rp-chip b { color: var(--ok); }

/* board */
.rp-section-top { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 12px; }
.rp-overline { font-family: Arial, sans-serif; letter-spacing: 2px; color: var(--gold-d); font-size: 10px; font-weight: 700; }
.rp-section-top h2 { font-size: 28px; font-weight: 800; margin: 4px 0; }
.rp-section-top p { font-size: 13px; color: var(--muted); margin: 0; }
.rp-empty { text-align: center; color: var(--muted); padding: 30px 10px; border: 1px dashed #c3cfe8; border-radius: 20px; background: #f3f6fd; margin: 0; }

.rp-podium { list-style: none; margin: 0 0 16px; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: end; gap: 12px; }
.rp-step { display: grid; justify-items: center; gap: 2px; text-align: center; }
.rp-step.is-1 { order: 2; } .rp-step.is-2 { order: 1; } .rp-step.is-3 { order: 3; }
.rp-medal { font-size: 40px; line-height: 1; filter: drop-shadow(0 4px 6px #0d235026); }
.rp-step.is-1 .rp-medal { font-size: 52px; animation: rp-float 3s ease-in-out infinite; }
.rp-name { font-size: 16px; font-weight: 800; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rp-points { font-size: 13px; color: var(--muted); }
.rp-block { display: grid; place-items: center; width: 100%; margin-top: 6px; border-radius: 16px 16px 6px 6px; color: #fff; font: 800 26px/1 Changa, Arial; }
.rp-step.is-1 .rp-block { height: 120px; background: linear-gradient(180deg, #ffd65c, #e0a100); color: #3b2a00; }
.rp-step.is-2 .rp-block { height: 90px; background: linear-gradient(180deg, #c9d3e6, #8f9bb3); }
.rp-step.is-3 .rp-block { height: 70px; background: linear-gradient(180deg, #f0b48a, #c4773f); }
.rp-step.is-me .rp-name { color: var(--blue); }

.rp-rows { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.rp-rows li { display: flex; align-items: center; gap: 14px; padding: 9px 16px; border-radius: 14px; background: #fff; border: 1px solid #e1e8f6; }
.rp-rows li.is-top { border-color: #ffe08a; background: #fffcf2; }
.rp-rows li.is-me { border: 2px solid var(--blue); background: #f0f5ff; }
.rp-rows li.rp-gap { justify-content: center; border: 0; background: none; padding: 0; color: var(--muted); }
.rp-rank { flex: none; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: #edf2ff; color: var(--blue); font-weight: 800; font-size: 14px; }
.rp-rows li.is-top .rp-rank { background: #fff4cf; color: #6b4a00; }
.rp-row-name { flex: 1; min-width: 0; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rp-row-name small { color: var(--blue); }
.rp-row-pts { font-size: 18px; font-weight: 800; }

/* reward */
.rp-reward { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 22px; padding: 20px 26px; border-radius: 24px; color: #fff;
  background: radial-gradient(circle at 15% 20%, #3a6cf0 0, transparent 45%), linear-gradient(135deg, #0d2350, #1239a0 60%, #1249d8); box-shadow: 0 16px 36px #0d235038; }
.rp-reward > div:nth-child(2) { flex: 1 1 320px; }
.rp-reward h2 { color: #fff; font-size: 22px; font-weight: 800; margin: 0 0 4px; }
.rp-reward p { margin: 0; color: #d9e3ff; font-size: 15px; }
.rp-reward-ic { display: grid; place-items: center; width: 64px; height: 64px; border-radius: 20px; font-size: 32px; background: linear-gradient(180deg, #ffd65c, var(--gold)); box-shadow: inset 0 -4px 0 #e0a100; }

/* champions */
.rp-champs { padding: 18px 22px; border-radius: 22px; background: #fffaf0; border: 1px solid #ffe08a; }
.rp-champs h2 { font-size: 20px; font-weight: 800; margin: 0 0 10px; }
.rp-champs ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.rp-champs li { padding: 5px 14px; border-radius: 30px; background: #fff; border: 1px solid #f3d27a; font-weight: 600; font-size: 14px; }
.rp-champs li.is-me { background: #fff4cf; border-color: var(--gold-d); }

/* how */
.rp-how h2 { font-size: 24px; font-weight: 800; margin: 0 0 12px; }
.rp-how-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; }
.rp-how-card { position: relative; display: grid; gap: 2px; align-content: start; padding: 16px 16px 14px; border-radius: 18px; background: #fff; border: 1px solid #dfe6f5; transition: transform .2s, border-color .2s; }
a.rp-how-card:hover { transform: translateY(-3px); border-color: var(--blue); }
.rp-how-ic { font-size: 28px; line-height: 1.2; }
.rp-how-card b { font-size: 16px; }
.rp-how-card small { color: var(--muted); font-size: 13px; line-height: 1.6; }
.rp-how-pts { margin-top: 6px; font: 800 22px/1.2 Changa, Arial; color: var(--ok); }
.rp-how-pts small { font: 600 12px Changa, Arial; color: var(--ok); }
.rp-how-cap { font-size: 11px; color: #7b869d; }
.rp-fair { margin: 14px 0 0; padding: 12px 16px; border-radius: 14px; background: #edf3ff; color: #526888; font-size: 14px; }

@media (max-width: 1100px) { .rp-hero { padding-inline: 180px; } .rp-mascot { height: 290px; } }
@media (max-width: 767px) {
  .rp-hero { min-height: 0; padding: 30px 14px 190px; align-items: flex-start; border-radius: 22px; }
  .rp-mascot { height: 190px; }
  .rp-mascot.is-boy { right: calc(50% - 150px); }
  .rp-mascot.is-girl { left: calc(50% - 150px); }
  .rp h1 { font-size: 32px; }
  .rp-intro { font-size: 14px; }
  .rp-me { grid-template-columns: 1fr; }
  .rp-me-score { grid-auto-flow: column; gap: 12px; align-items: center; padding: 14px; }
  .rp-me-score b { font-size: 40px; }
  .rp-me-copy { padding: 16px; }
  .rp-podium { gap: 6px; }
  .rp-name { font-size: 14px; }
  .rp-medal { font-size: 32px; }
  .rp-step.is-1 .rp-medal { font-size: 40px; }
  .rp-how-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (prefers-reduced-motion: reduce) { .rp *, .rp *::before, .rp *::after { animation: none !important; transition: none !important; } }
