/* =========================================================
   RASonly — RAS Pre 2026 Score & Rank Predictor
   Loaded after style.css; reuses its theme tokens & components.
   ========================================================= */

/* ---------- Shared bits ---------- */

.rp-eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  margin-bottom: 14px;
  padding: 5px 14px;
  border-radius: 50px;
  background: var(--gold-soft);
  color: #b26b0a;
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: .8px;
  text-transform: uppercase;
}
.rp-eyebrow--light { background: rgba(241, 164, 59, .16); color: var(--gold); }
.rp-mt { margin-top: 28px; }

/* ---------- Hero: light, centred calculator (differs from index.html) ---------- */
.rp-hero {
  padding: 56px 0 64px;
  text-align: center;
  background:
    radial-gradient(circle at 12% 18%, rgba(241, 164, 59, .20), transparent 38%),
    radial-gradient(circle at 90% 30%, rgba(59, 84, 216, .12), transparent 40%),
    linear-gradient(180deg, #fffaf1 0%, #fff 100%);
}
.rp-hero::before { /* OMR bubbles across the top */
  width: 100%; height: 70%;
  background: radial-gradient(circle, transparent 5px, rgba(44, 80, 156, .10) 5.5px, rgba(44, 80, 156, .10) 7px, transparent 7.5px) 0 0 / 26px 26px;
  -webkit-mask-image: radial-gradient(ellipse at 50% 0%, #000 0%, transparent 70%);
  mask-image: radial-gradient(ellipse at 50% 0%, #000 0%, transparent 70%);
}
.rp-hero::after { display: none; }
.rp-hero__inner { position: relative; z-index: 1; }
.rp-hero .hero__badge {
  background: #fff;
  border-color: rgba(241, 164, 59, .6);
  color: #b26b0a;
  box-shadow: 0 6px 16px rgba(241, 164, 59, .18);
}
.rp-hero .rp-hero__badge {
  position: relative;
  overflow: hidden;
  margin: 0;
  gap: 16px;
  padding: 20px 44px;
  font-family: var(--font-head);
  font-size: clamp(24px, 3.4vw, 42px);
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -.4px;
  color: #fff;
  background: linear-gradient(135deg, #f7a531 0%, #e8800c 55%, #c9650a 100%);
  border: 3px solid #fff;
  border-radius: 999px;
  text-shadow: 0 2px 4px rgba(120, 60, 0, .35);
  box-shadow:
    0 0 0 6px rgba(241, 164, 59, .25),
    0 14px 36px rgba(232, 128, 12, .45);
  animation: rpBadgeGlow 2.4s ease-in-out infinite;
}
.rp-hero .rp-hero__badge i { color: #fff; font-size: 1.05em; }
.rp-hero .rp-hero__badge::after {
  content: "";
  position: absolute;
  top: 0; left: -60%;
  width: 40%; height: 100%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .45), transparent);
  transform: skewX(-20deg);
  animation: rpBadgeShine 3.2s ease-in-out infinite;
  pointer-events: none;
}
@keyframes rpBadgeGlow {
  0%, 100% { box-shadow: 0 0 0 6px rgba(241, 164, 59, .25), 0 14px 36px rgba(232, 128, 12, .45); }
  50%      { box-shadow: 0 0 0 12px rgba(241, 164, 59, .12), 0 18px 48px rgba(232, 128, 12, .6); }
}
@keyframes rpBadgeShine {
  0%, 60% { left: -60%; }
  100%    { left: 130%; }
}
@media (prefers-reduced-motion: reduce) {
  .rp-hero .rp-hero__badge, .rp-hero .rp-hero__badge::after { animation: none; }
}

/* Calculator panel */
.rp-calc {
  position: relative;
  max-width: 1080px;
  margin: 36px auto 0;
  text-align: left;
  background: #fff;
  border-radius: 24px;
  border: 1px solid var(--border);
  box-shadow: 0 30px 70px rgba(4, 44, 84, .16);
  overflow: hidden;
  scroll-margin-top: 100px;
}
.rp-calc::before { /* gold top edge */
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 5px;
  background: linear-gradient(90deg, var(--gold), var(--gold-dark), var(--navy));
}
.rp-calc__head {
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px 20px;
  padding: 22px 28px 18px;
  border-bottom: 2px dashed var(--border);
}
.rp-calc__tag {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 11.5px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase;
  color: #b26b0a;
}
.rp-calc__head h2 { margin-top: 2px; font-size: 22px; font-weight: 700; color: var(--navy-dark); }
.rp-calc__head p { margin: 0; display: flex; align-items: center; gap: 7px; font-size: 13.5px; font-weight: 500; color: var(--muted); }
.rp-calc__head p i { color: var(--navy); }

.rp-calc__form {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr)) 150px auto;
  align-items: end;
  gap: 16px;
  padding: 22px 28px 8px;
}
.rp-field { display: grid; gap: 7px; cursor: text; min-width: 0; }
.rp-field__label { font-size: 13px; font-weight: 600; color: var(--navy-dark); line-height: 1.3; }
.rp-field input[type="number"] { -moz-appearance: textfield; appearance: textfield; font-weight: 600; }
.rp-field input::-webkit-outer-spin-button,
.rp-field input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.rp-calc .field { min-height: 52px; border-radius: 12px; }
.rp-calc .field input { font-size: 16px; }
.rp-auto {
  display: flex; align-items: center; gap: 10px;
  min-height: 52px;
  padding: 0 14px;
  border-radius: 12px;
  border: 1.5px dashed #cbd5ec;
  color: var(--muted);
}
.rp-auto i { color: var(--navy); }
.rp-auto strong { font-family: var(--font-head); font-size: 18px; color: var(--navy-dark); }
.rp-auto.is-bad { border-color: #dc2626; background: #fff5f5; }
.rp-auto.is-bad strong { color: #dc2626; }
.rp-calc__submit { min-height: 52px; padding: 0 26px; white-space: nowrap; }
.rp-calc .lead__error { grid-column: 1 / -1; margin: 0; }
.rp-calc__foot {
  list-style: none; margin: 0; padding: 14px 28px 20px;
  display: flex; flex-wrap: wrap; gap: 8px 26px;
}
.rp-calc__foot li { display: inline-flex; align-items: center; gap: 7px; font-size: 13.5px; font-weight: 500; color: var(--muted); }
.rp-calc__foot i { color: #16a34a; }

@media (max-width: 991.98px) {
  .rp-calc__form { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rp-calc__submit { width: 100%; grid-column: 1 / -1; }
}
@media (max-width: 575.98px) {
  .rp-hero { padding: 28px 0 36px; }
  .rp-hero .hero__badge { font-size: 11px; padding: 5px 10px; }
  .rp-hero .rp-hero__badge { font-size: 21px; padding: 14px 22px; gap: 10px; white-space: normal; border-width: 2px; }
  .rp-calc { margin-top: 24px; border-radius: 18px; }
  .rp-calc__head { padding: 18px 16px 14px; }
  .rp-calc__head h2 { font-size: 19px; }
  .rp-calc__head p { font-size: 12px; }
  .rp-calc__form { grid-template-columns: 1fr; gap: 12px; padding: 16px 16px 4px; }
  .rp-calc .field, .rp-auto, .rp-calc__submit { min-height: 48px; }
  .rp-calc__foot { padding: 12px 16px 16px; gap: 6px 16px; }
  .rp-calc__foot li { font-size: 12.5px; }
}

/* ---------- Result popup ---------- */
.rp-modal {
  width: min(460px, calc(100% - 32px));
  max-width: none;
  max-height: calc(100dvh - 32px);
  padding: 0;
  border: 0;
  background: transparent;
  overflow: visible;
}
.rp-modal[open] { animation: rpModalIn .3s cubic-bezier(.2, .8, .3, 1); }
.rp-modal::backdrop { background: rgba(4, 44, 84, .55); backdrop-filter: blur(4px); }
body:has(.rp-modal[open]) { overflow: hidden; }
@keyframes rpModalIn {
  from { opacity: 0; transform: translateY(20px) scale(.97); }
  to { opacity: 1; transform: none; }
}

.rp-card {
  position: relative;
  max-height: calc(100dvh - 32px);
  overflow-y: auto;
  padding: 36px 32px 24px;
  background: #fff;
  border-radius: 24px;
  box-shadow: 0 30px 80px rgba(4, 44, 84, .28);
}
.rp-card__hero { display: flex; flex-direction: column; align-items: center; text-align: center; }
.rp-card__icon {
  width: 72px; height: 72px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: var(--gold-soft);
  box-shadow: 0 0 0 8px rgba(241, 164, 59, .08);
  color: var(--gold);
  font-size: 30px;
}
.rp-card__title { margin-top: 18px; font-size: 15px; font-weight: 600; color: var(--muted); }
.rp-card__rank {
  margin-top: 4px;
  font-family: var(--font-head);
  font-size: clamp(34px, 8vw, 44px);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -1px;
  color: var(--navy-dark);
  white-space: nowrap;
}
.rp-card__pill {
  margin-top: 10px;
  padding: 5px 14px;
  border-radius: 50px;
  background: #ecfdf3;
  color: #15803d;
  font-size: 13.5px;
  font-weight: 500;
}
.rp-card__pill b { font-weight: 700; }

.rp-rows { margin: 26px 0 0; border-top: 1px solid var(--border); }
.rp-rows__item {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 14px 2px;
  border-bottom: 1px solid var(--border);
}
.rp-rows dt { font-size: 14.5px; color: var(--muted); }
.rp-rows dd { margin: 0; font-family: var(--font-head); font-size: 17px; font-weight: 700; color: var(--navy-dark); text-align: right; }
.rp-rows dd small { font-size: 13px; font-weight: 500; color: var(--muted); }
.rp-rows__qs { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; }
.rp-rows__qs span {
  padding: 3px 10px;
  border-radius: 50px;
  font-family: var(--font-body);
  font-size: 12.5px;
  font-weight: 500;
}
.rp-rows__qs b { font-family: var(--font-head); font-weight: 700; }
.rp-rows__qs .is-ok { background: #ecfdf3; color: #15803d; }
.rp-rows__qs .is-bad { background: #fef2f2; color: #b91c1c; }
.rp-rows__qs .is-empty { background: var(--tint); color: var(--muted); }

.rp-card__actions { display: flex; gap: 10px; margin-top: 24px; }
.rp-card__actions .btn { flex: 1; justify-content: center; padding: 12px 18px; font-size: 14.5px; }
.rp-card__ghost { background: #fff; border: 1px solid var(--border); color: var(--navy-dark); }
.rp-card__ghost:hover { background: var(--tint); }
.rp-modal__note { margin: 14px 0 0; text-align: center; font-size: 12px; color: var(--muted); }

.rp-modal__close {
  position: absolute;
  top: 14px; right: 14px;
  width: 36px; height: 36px;
  display: grid; place-items: center;
  border: 0;
  border-radius: 50%;
  background: var(--tint);
  color: var(--muted);
  font-size: 15px;
  cursor: pointer;
  transition: background .2s, color .2s;
}
.rp-modal__close:hover, .rp-modal__close:focus-visible { background: var(--border); color: var(--navy-dark); outline: none; }
.rp-how:first-child { margin-top: 0; }

@media (max-width: 575.98px) {
  .rp-modal { width: calc(100% - 20px); max-height: calc(100dvh - 20px); }
  .rp-card { max-height: calc(100dvh - 20px); padding: 28px 18px 18px; border-radius: 20px; }
  .rp-card__icon { width: 60px; height: 60px; font-size: 25px; }
  .rp-rows__item { padding: 12px 0; }
  .rp-rows dt { font-size: 13.5px; }
  .rp-rows dd { font-size: 16px; }
  .rp-rows__item:last-child { flex-direction: column; align-items: flex-start; gap: 8px; }
  .rp-rows__qs { justify-content: flex-start; }
}

/* ---------- Paper solution (re-uses dark .centres bg) ---------- */
.rp-solution { padding: 90px 0; }
.rp-solution__grid { display: grid; grid-template-columns: 1fr 1.05fr; gap: 56px; align-items: center; }
.rp-light { color: #fff; }
.rp-solution .section-title::after {
  content: ""; display: block;
  width: 64px; height: 4px; margin-top: 16px;
  border-radius: 4px;
  background: linear-gradient(90deg, var(--gold), var(--gold-dark));
}
.rp-solution__text > p { color: #dbe4ff; margin: 18px 0 0; font-size: 16.5px; }
.rp-ticks { list-style: none; padding: 0; margin: 22px 0 0; display: grid; grid-template-columns: 1fr 1fr; gap: 12px 20px; }
.rp-ticks li { display: flex; gap: 10px; align-items: flex-start; font-weight: 500; color: #fff; }
.rp-ticks i { color: var(--gold); margin-top: 2px; }

.rp-video {
  position: relative;
  display: block;
  aspect-ratio: 16 / 9;
  border-radius: 20px;
  overflow: hidden;
  border: 6px solid rgba(255, 255, 255, .12);
  box-shadow: 0 30px 60px rgba(0, 0, 0, .4);
}
.rp-video img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.rp-video::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(4, 44, 84, .15), rgba(4, 44, 84, .75)); }
.rp-video:hover img { transform: scale(1.05); }
.rp-video__play {
  position: absolute; z-index: 1;
  top: 50%; left: 50%;
  width: 84px; height: 84px;
  margin: -42px 0 0 -42px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: var(--gold);
  color: var(--navy-dark);
  font-size: 40px;
  box-shadow: 0 0 0 12px rgba(241, 164, 59, .25);
  animation: rpPulse 2.2s ease-in-out infinite;
}
@keyframes rpPulse {
  0%, 100% { box-shadow: 0 0 0 10px rgba(241, 164, 59, .28); }
  50% { box-shadow: 0 0 0 22px rgba(241, 164, 59, 0); }
}
.rp-video__caption {
  position: absolute; z-index: 1;
  left: 18px; right: 18px; bottom: 16px;
  display: flex; align-items: center; gap: 8px;
  color: #fff;
  font-weight: 600;
  font-size: 14.5px;
}
.rp-video__caption i { color: #ff3b3b; font-size: 20px; }

/* ---------- Exam analysis ---------- */
.rp-analysis { max-width: 1000px; margin: 0 auto; }
.rp-difficulty {
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 14px 24px;
  padding: 18px 22px;
  margin-bottom: 20px;
  border-radius: 16px;
  background: linear-gradient(120deg, var(--navy-dark), var(--navy));
  color: #fff;
}
.rp-difficulty__label { display: flex; align-items: center; gap: 10px; font-family: var(--font-head); font-weight: 600; font-size: 17px; }
.rp-difficulty__label i { color: var(--gold); font-size: 20px; }
.rp-difficulty__scale { display: flex; gap: 8px; padding: 5px; border-radius: 50px; background: rgba(255, 255, 255, .1); }
.rp-difficulty__scale span {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 7px 16px;
  border-radius: 50px;
  font-weight: 600; font-size: 14px;
  color: #c8d3f0;
}
.rp-difficulty__scale span::before {
  content: "";
  width: 10px; height: 10px; border-radius: 50%;
  border: 2px solid currentColor;
}
.rp-difficulty__scale .is-easy::before { color: #4ade80; }
.rp-difficulty__scale .is-moderate::before { color: var(--gold); }
.rp-difficulty__scale .is-difficult::before { color: #f87171; }
.rp-difficulty__scale[data-level="easy"] .is-easy,
.rp-difficulty__scale[data-level="moderate"] .is-moderate,
.rp-difficulty__scale[data-level="difficult"] .is-difficult { background: #fff; color: var(--navy-dark); }
.rp-difficulty__scale[data-level="easy"] .is-easy::before,
.rp-difficulty__scale[data-level="moderate"] .is-moderate::before,
.rp-difficulty__scale[data-level="difficult"] .is-difficult::before { background: currentColor; }

.rp-table-wrap {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 18px;
  box-shadow: var(--shadow);
  overflow: hidden;
}
.rp-table { width: 100%; border-collapse: collapse; }
.rp-table th, .rp-table td { padding: 14px 22px; text-align: left; border-bottom: 1px solid var(--border); }
.rp-table thead th {
  background: var(--tint);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--navy-dark);
  border-bottom: 2px solid var(--navy-dark);
}
.rp-table tbody th { font-family: var(--font-head); font-weight: 600; color: var(--navy-dark); font-size: 15.5px; }
.rp-table tbody th::before { /* OMR bubble bullet */
  content: "";
  display: inline-block;
  vertical-align: -2px;
  width: 14px; height: 14px;
  margin-right: 12px;
  border-radius: 50%;
  border: 2px solid var(--navy);
}
.rp-table tbody td { color: var(--muted); font-weight: 600; width: 22%; }
.rp-table tbody tr:last-child > * { border-bottom: 0; }
.rp-table tbody tr:hover { background: #fafbff; }
.rp-table tbody tr:hover th::before { background: radial-gradient(circle, var(--gold-dark) 3.5px, transparent 4px); border-color: var(--gold-dark); }
.rp-analysis .note { max-width: none; justify-content: center; }

/* ---------- Mains CTA ---------- */
.register__title span { margin-top: 6px; }
.rp-cta-row { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 24px; }
.rp-call { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; color: #fff; }
.rp-call > span:first-child {
  width: 56px; height: 56px;
  display: grid; place-items: center;
  border-radius: 50%;
  border: 2px solid rgba(241, 164, 59, .6);
  color: var(--gold);
  font-size: 22px;
}
.rp-call small { display: block; font-size: 14px; color: #c8d3f0; letter-spacing: .5px; }
.rp-call strong { font-family: var(--font-head); font-size: 28px; line-height: 1.2; letter-spacing: 1px; }
@media (max-width: 575.98px) { .rp-call strong { font-size: 24px; } }
.rp-call:hover strong { color: var(--gold); }
.rp-pass__tag {
  padding: 4px 12px;
  border-radius: 50px;
  background: var(--navy-dark);
  color: var(--gold);
  font-size: 12px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase;
}
.rp-pass__rows { grid-template-columns: 1fr 1fr; padding-bottom: 22px; gap: 12px 14px; }
.rp-pass__rows li { font-size: 14.5px; }
.rp-pass__wide { grid-column: 1 / -1; }

/* ---------- Responsive ---------- */
@media (max-width: 991.98px) {
  .rp-solution { padding: 70px 0; }
  .rp-solution__grid { grid-template-columns: 1fr; gap: 36px; }
}
@media (max-width: 767.98px) {
  .rp-solution { padding: 48px 0; }
  .rp-table th, .rp-table td { padding: 12px 14px; }
  .rp-difficulty { flex-direction: column; align-items: flex-start; }
}
@media (max-width: 575.98px) {
  .rp-solution { padding: 36px 0; }
  .rp-solution__text > p { font-size: 15px; }
  .rp-ticks { grid-template-columns: 1fr; gap: 8px; font-size: 14.5px; }
  .rp-video { border-width: 4px; border-radius: 14px; }
  .rp-video__play { width: 64px; height: 64px; margin: -32px 0 0 -32px; font-size: 30px; }
  .rp-video__caption { font-size: 12.5px; left: 12px; bottom: 10px; }
  .rp-difficulty { padding: 14px; }
  .rp-difficulty__scale span { padding: 6px 10px; font-size: 13px; }
  .rp-table th, .rp-table td { padding: 10px; }
  .rp-table thead th { font-size: 10px; letter-spacing: .6px; }
  .rp-table tbody th { font-size: 13.5px; }
  .rp-table tbody th::before { display: none; }
  .rp-table tbody td { font-size: 13.5px; text-align: center; }
  .rp-table thead th:not(:first-child) { text-align: center; }
  .rp-cta-row { flex-direction: column; align-items: stretch; }
  .rp-call { justify-content: center; }
  .rp-pass__rows { grid-template-columns: 1fr; }
  .rp-pass__rows li { font-size: 13.5px; }
  .register .btn--lg { white-space: normal; }
}

/* =========================================================
   Image-led sections
   ========================================================= */

/* Floating chip on split images */
.rp-media-chip {
  position: absolute;
  left: -14px; bottom: 26px;
  display: flex; align-items: center; gap: 12px;
  padding: 10px 18px 10px 10px;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 16px 36px rgba(4, 44, 84, .22);
  animation: float 5s ease-in-out infinite;
}
.rp-media-chip--right { left: auto; right: -14px; }
.rp-media-chip > i {
  width: 42px; height: 42px;
  display: grid; place-items: center;
  border-radius: 12px;
  background: var(--gold);
  color: var(--navy-dark);
  font-size: 19px;
}
.rp-media-chip small { display: block; font-size: 11px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; color: var(--muted); }
.rp-media-chip strong { font-family: var(--font-head); font-size: 15px; color: var(--navy-dark); }

/* How it works */
.rp-how { margin-top: 80px; }
.rp-flow {
  list-style: none; margin: 22px 0 0; padding: 0;
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px 8px;
}
.rp-flow li {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 8px 14px;
  border-radius: 50px;
  background: var(--tint);
  border: 1px solid var(--border);
  font-size: 14px; font-weight: 600; color: var(--navy-dark);
}
.rp-flow li i { color: var(--navy); }
.rp-flow li + li::before {
  content: "\F138"; /* bi-arrow-right */
  font-family: "bootstrap-icons";
  margin: 0 6px 0 -4px;
  color: var(--gold-dark);
}
.rp-flow li:last-child { background: var(--navy-dark); border-color: var(--navy-dark); color: #fff; }
.rp-flow li:last-child i { color: var(--gold); }
.rp-how .callout { margin-top: 22px; font-weight: 500; font-size: 15px; }

/* Important note: compact alert strip */
.rp-alert {
  display: flex; align-items: center; gap: 18px;
  margin: 56px auto 0;
  padding: 20px 24px;
  border-radius: 16px;
  background: linear-gradient(90deg, #fff7ea, #fffdf8);
  border: 1px solid rgba(241, 164, 59, .45);
  border-left: 6px solid var(--gold);
  box-shadow: var(--shadow);
}
.rp-alert__icon {
  flex-shrink: 0;
  width: 50px; height: 50px;
  display: grid; place-items: center;
  border-radius: 14px;
  background: var(--gold);
  color: var(--navy-dark);
  font-size: 22px;
}
.rp-alert__body { flex: 1; min-width: 0; }
.rp-alert__title { font-family: var(--font-head); font-size: 17px; color: var(--navy-dark); }
.rp-alert__body p { margin: 2px 0 0; color: var(--muted); font-size: 15px; }
.rp-alert__stamp {
  flex-shrink: 0;
  display: inline-flex; align-items: center; gap: 7px;
  padding: 8px 14px;
  border: 2px solid #dc2626;
  border-radius: 10px;
  color: #dc2626;
  font-family: var(--font-head);
  font-size: 13px; font-weight: 700; letter-spacing: .5px; text-transform: uppercase;
  transform: rotate(-3deg);
}

/* OMR steps: 3 x 2 cards with OMR-bubble numbers */
.rp-steps {
  list-style: none; margin: 56px 0 0; padding: 0;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px;
}
.rp-steps li {
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr;
  column-gap: 14px;
  align-items: center;
  padding: 22px 22px 22px 20px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: var(--shadow);
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s;
}
.rp-steps li:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); border-color: var(--gold); }
.rp-steps li > i {
  grid-row: 1 / span 2;
  width: 52px; height: 52px;
  display: grid; place-items: center;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--navy), var(--blue));
  color: #fff;
  font-size: 22px;
}
.rp-steps li:last-child > i { background: var(--gold); color: var(--navy-dark); }
.rp-steps strong { font-family: var(--font-head); font-weight: 600; color: var(--navy-dark); font-size: 16px; line-height: 1.3; }
.rp-steps small { color: var(--muted); font-size: 13.5px; }
.rp-steps__n { /* filled OMR bubble in the corner */
  position: absolute;
  top: -12px; right: 16px;
  width: 30px; height: 30px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: var(--navy-dark);
  color: #fff;
  font-family: var(--font-head);
  font-weight: 700; font-size: 13px;
  box-shadow: 0 0 0 4px var(--tint);
}

/* Exam analysis: image aside + table */
.rp-analysis-grid {
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: 28px;
  align-items: stretch;
  max-width: 1140px;
  margin: 0 auto;
}
.rp-analysis-grid .rp-analysis { max-width: none; margin: 0; }
.rp-analysis__aside {
  position: relative;
  border-radius: 20px;
  overflow: hidden;
  min-height: 420px;
  box-shadow: var(--shadow-lg);
  color: #fff;
}
.rp-analysis__aside img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.rp-analysis__aside::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(4, 44, 84, .15) 0%, rgba(4, 44, 84, .7) 45%, rgba(4, 44, 84, .97) 100%);
}
.rp-analysis__aside-text { position: absolute; z-index: 1; left: 0; right: 0; bottom: 0; padding: 26px; }
.rp-analysis__aside h3 { font-size: 22px; font-weight: 700; color: #fff; }
.rp-analysis__aside ul { list-style: none; margin: 14px 0 0; padding: 0; display: grid; gap: 8px; }
.rp-analysis__aside li { display: flex; gap: 10px; font-weight: 500; color: #e6ecfb; font-size: 15px; }
.rp-analysis__aside li i { color: var(--gold); }

/* Mains CTA: Hawa Mahal backdrop (Rajasthan-specific) */
.register-card {
  background:
    linear-gradient(120deg, rgba(4, 44, 84, .96) 0%, rgba(44, 80, 156, .88) 100%),
    url("../images/hero-hawa-mahal.jpg") center / cover no-repeat;
}

@media (max-width: 991.98px) {
  .rp-how { margin-top: 56px; }
  .rp-steps { grid-template-columns: repeat(2, 1fr); }
  .rp-analysis-grid { grid-template-columns: 1fr; }
  .rp-analysis__aside { min-height: 280px; }
  .rp-alert { flex-wrap: wrap; }
  .rp-alert__body { flex-basis: calc(100% - 70px); }
  .rp-alert__stamp { margin-left: 68px; }
}
@media (max-width: 575.98px) {
  .rp-how { margin-top: 40px; }
  .rp-media-chip { left: 10px; bottom: 12px; padding: 7px 12px 7px 7px; gap: 8px; }
  .rp-media-chip--right { left: auto; right: 10px; }
  .rp-media-chip > i { width: 32px; height: 32px; font-size: 15px; border-radius: 9px; }
  .rp-media-chip small { font-size: 9.5px; }
  .rp-media-chip strong { font-size: 13px; }
  .rp-flow li { font-size: 12.5px; padding: 6px 10px; }
  .rp-how .callout { font-size: 13.5px; }
  .rp-alert { margin-top: 32px; padding: 16px; gap: 12px; }
  .rp-alert__icon { width: 40px; height: 40px; font-size: 18px; border-radius: 11px; }
  .rp-alert__body { flex-basis: calc(100% - 56px); }
  .rp-alert__title { font-size: 15.5px; }
  .rp-alert__body p { font-size: 13.5px; }
  .rp-alert__stamp { margin-left: 0; font-size: 11.5px; padding: 6px 10px; }
  .rp-steps { grid-template-columns: 1fr; gap: 14px; margin-top: 36px; }
  .rp-steps li { padding: 14px; }
  .rp-steps li > i { width: 42px; height: 42px; font-size: 18px; border-radius: 12px; }
  .rp-steps strong { font-size: 14.5px; }
  .rp-steps small { font-size: 12.5px; }
  .rp-analysis__aside { min-height: 240px; }
  .rp-analysis__aside-text { padding: 18px; }
  .rp-analysis__aside h3 { font-size: 18px; }
  .rp-analysis__aside li { font-size: 13.5px; }
}
.split__media img { height: auto; }

/* Eyebrow pills: fit on one line on phones, wrap cleanly if they must */
@media (max-width: 575.98px) {
  .rp-eyebrow {
    max-width: 100%;
    align-items: flex-start;
    gap: 6px;
    padding: 5px 11px;
    border-radius: 10px;
    font-size: 10.5px;
    letter-spacing: .4px;
    line-height: 1.45;
    text-align: left;
    margin-bottom: 10px;
  }
  .rp-eyebrow i { line-height: 1.45; flex-shrink: 0; }
}

/* Calculator: compact rows on phones (label left, input right) */
@media (max-width: 575.98px) {
  .rp-calc__head { padding: 14px 14px 10px; gap: 2px; }
  .rp-calc__tag { font-size: 10.5px; }
  .rp-calc__head h2 { font-size: 17px; }
  .rp-calc__head p { font-size: 11.5px; }
  .rp-calc__form { gap: 8px; padding: 12px 14px 4px; }
  .rp-field { grid-template-columns: 1fr 116px; align-items: center; column-gap: 10px; }
  .rp-field__label { font-size: 13px; line-height: 1.3; }
  .rp-calc .field { min-height: 42px; padding: 0 10px; gap: 6px; border-radius: 10px; }
  .rp-calc .field > i { font-size: 14px; }
  .rp-calc .field input { padding: 8px 0; font-size: 16px; } /* 16px stops iOS zoom */
  .rp-auto { min-height: 38px; padding: 0 12px; gap: 6px; border-radius: 10px; }
  .rp-auto strong { font-size: 16px; }
  .rp-calc__submit { min-height: 46px; margin-top: 4px; font-size: 15px; }
  .rp-calc__foot { padding: 8px 14px 12px; justify-content: center; }
  .rp-calc__foot li:not(:last-child) { display: none; }
  .rp-calc__foot li { font-size: 12px; }
}
.rp-formats { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; color: var(--navy-dark); margin-top: 8px; }
.rp-formats i { color: var(--gold); font-size: 16px; }

/* =========================================================
   Student details row (name / roll no / mobile)
   ========================================================= */
.rp-you {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}
.rp-field input[type="text"], .rp-field input[type="tel"] { font-weight: 600; }
@media (max-width: 767.98px) {
  .rp-you { grid-template-columns: 1fr; gap: 12px; }
}
@media (max-width: 575.98px) {
  .rp-you { gap: 8px; padding-bottom: 10px; }
  .rp-you .rp-field { grid-template-columns: 104px minmax(0, 1fr); }
}
.rp-calc__submit[disabled] { opacity: .7; cursor: wait; transform: none; }

/* =========================================================
   "Students already checked" live counter
   ========================================================= */
.rp-counter {
  display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 6px 10px;
  margin: 0;
  padding: 10px 20px;
  background: #fff7ea;
  border-bottom: 1px solid #fde4bf;
  font-size: 14.5px; font-weight: 500; color: var(--navy-dark);
  text-align: center;
}
.rp-counter strong {
  font-family: var(--font-head); font-size: 18px; font-weight: 800; color: #c2410c;
  font-variant-numeric: tabular-nums;
}
.rp-counter__dot {
  width: 9px; height: 9px; border-radius: 50%; background: #16a34a; flex-shrink: 0;
  box-shadow: 0 0 0 0 rgba(22, 163, 74, .5);
  animation: rpLiveDot 1.8s ease-out infinite;
}
@keyframes rpLiveDot {
  0%   { box-shadow: 0 0 0 0 rgba(22, 163, 74, .5); }
  100% { box-shadow: 0 0 0 10px rgba(22, 163, 74, 0); }
}
@media (prefers-reduced-motion: reduce) { .rp-counter__dot { animation: none; } }
@media (max-width: 575.98px) {
  .rp-counter { font-size: 12.5px; padding: 8px 12px; }
  .rp-counter strong { font-size: 16px; }
}

/* Result card additions */
.rp-card__who {
  margin: 0 0 4px; font-size: 13.5px; font-weight: 600; color: var(--muted);
  overflow-wrap: anywhere;
}
.rp-card__checked {
  margin: 12px 0 0; font-size: 13px; font-weight: 500; color: var(--muted);
  display: flex; align-items: center; justify-content: center; gap: 6px;
}
.rp-card__checked i { color: var(--gold-dark); }
.rp-card__checked b { color: var(--navy-dark); }

/* =========================================================
   RAS 2023-24 selected candidates
   ========================================================= */
.rp-achievers { background: linear-gradient(180deg, #fff 0%, var(--tint) 100%); }
.rp-achievers .section-head .rp-achievers__eyebrow {
  margin: 0 0 10px; color: #b26b0a; font-size: 13px; font-weight: 700; letter-spacing: 1.2px; text-transform: uppercase;
}
.rp-achievers__track {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 22px;
}
.rp-achiever {
  margin: 0;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 14px 14px 16px;
  text-align: center;
  box-shadow: var(--shadow);
  transition: transform .2s ease, box-shadow .2s ease;
}
.rp-achiever:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.rp-achiever__photo {
  position: relative;
  aspect-ratio: 1;
  border-radius: 14px;
  overflow: hidden;
  background: linear-gradient(160deg, var(--gold-soft), #e8eefc);
}
.rp-achiever__photo img { width: 100%; height: 100%; object-fit: cover; object-position: top center; }
.rp-achiever__rank {
  position: absolute; left: 50%; bottom: 8px; transform: translateX(-50%);
  padding: 4px 12px;
  border-radius: 999px;
  background: linear-gradient(135deg, #f7a531, #e8800c);
  color: #fff; font-family: var(--font-head); font-size: 13px; font-weight: 700;
  white-space: nowrap;
  box-shadow: 0 4px 12px rgba(232, 128, 12, .4);
}
.rp-achiever figcaption {
  margin-top: 12px;
  font-family: var(--font-head); font-size: 15.5px; font-weight: 600; color: var(--navy-dark);
  line-height: 1.3;
}
/* Phones: one swipeable row */
@media (max-width: 767.98px) {
  .rp-achievers__track {
    display: flex;
    gap: 14px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding: 4px 4px 14px;
    margin: 0 -4px;
    -webkit-overflow-scrolling: touch;
  }
  .rp-achiever { flex: 0 0 158px; scroll-snap-align: start; padding: 10px 10px 12px; }
  .rp-achiever figcaption { font-size: 14px; margin-top: 10px; }
  .rp-achiever__rank { font-size: 12px; padding: 3px 10px; }
}

/* =========================================================
   Split hero: intro (left) + form card (right)
   ========================================================= */
.rp-split { text-align: left; padding: 60px 0 72px; }
.rp-split__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  gap: 56px;
  align-items: center;
}

/* Left: intro */
.rp-split__eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 7px 14px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid #f6d3a1;
  color: #b26b0a; font-size: 13px; font-weight: 700; letter-spacing: .4px;
  box-shadow: 0 4px 12px rgba(241, 164, 59, .15);
}
.rp-split__eyebrow i { color: #e8800c; }
.rp-split .rp-split__title {
  margin: 18px 0 0;
  font-size: clamp(34px, 4.4vw, 56px);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -1.2px;
  color: var(--navy-dark);
}
.rp-split__title span {
  display: block;
  color: #e8800c;
  background: linear-gradient(90deg, #f7a531, #e8800c 60%, #c9650a);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}
.rp-split .rp-split__lead {
  margin: 18px 0 0;
  max-width: 520px;
  font-size: 18px; line-height: 1.6; color: var(--muted);
}
.rp-split__points { list-style: none; margin: 28px 0 0; padding: 0; display: grid; gap: 14px; }
.rp-split__points li { display: flex; align-items: center; gap: 14px; }
.rp-split__ico {
  flex-shrink: 0;
  width: 46px; height: 46px;
  display: grid; place-items: center;
  border-radius: 14px;
  background: #fff;
  border: 1px solid var(--border);
  color: var(--navy); font-size: 20px;
  box-shadow: 0 6px 16px rgba(4, 44, 84, .07);
}
.rp-split__points strong { display: block; font-family: var(--font-head); font-size: 16px; font-weight: 600; color: var(--navy-dark); line-height: 1.3; }
.rp-split__points small { display: block; font-size: 14px; color: var(--muted); line-height: 1.4; }
.rp-split__counter {
  display: inline-flex; align-items: center; gap: 10px;
  margin-top: 30px;
  padding: 12px 18px;
  border-radius: 14px;
  background: #fff;
  border: 1px solid #fde4bf;
  box-shadow: 0 8px 20px rgba(241, 164, 59, .14);
  font-size: 15px; font-weight: 500; color: var(--navy-dark);
}
.rp-split__counter strong { font-family: var(--font-head); font-size: 19px; font-weight: 800; color: #c2410c; font-variant-numeric: tabular-nums; }
.rp-split__counter--plain i { color: #16a34a; font-size: 17px; }

/* Right: form card */
.rpf {
  position: relative;
  background: #fff;
  border-radius: 24px;
  border: 1px solid var(--border);
  box-shadow: 0 30px 70px rgba(4, 44, 84, .16);
  padding: 28px 28px 22px;
  scroll-margin-top: 100px;
}
.rpf::before { /* gold top edge */
  content: ""; position: absolute; left: 28px; right: 28px; top: -1px; height: 4px;
  border-radius: 0 0 6px 6px;
  background: linear-gradient(90deg, #f7a531, #e8800c);
}
.rpf__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.rpf .rpf__head h2 { margin: 0; font-size: 24px; font-weight: 800; letter-spacing: -.3px; color: var(--navy-dark); }
.rpf__time {
  flex-shrink: 0;
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 11px; border-radius: 999px;
  background: #ecfdf3; color: #15803d; font-size: 12.5px; font-weight: 600;
}
.rpf .rpf__step {
  display: flex; align-items: center; gap: 10px;
  margin: 22px 0 12px;
  font-family: var(--font-head); font-size: 14px; font-weight: 700; color: var(--navy-dark);
  text-transform: uppercase; letter-spacing: .6px;
}
.rpf__step span {
  width: 24px; height: 24px; display: grid; place-items: center;
  border-radius: 50%; background: var(--navy-dark); color: #fff; font-size: 12.5px;
}
.rpf__step small { margin-left: auto; font-family: var(--font-body); font-size: 12.5px; font-weight: 500; color: var(--muted); text-transform: none; letter-spacing: 0; }
.rpf__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 14px; }
.rpf__full { grid-column: 1 / -1; }
.rpf__grid > * { min-width: 0; }
.rpf .rp-field { grid-template-columns: minmax(0, 1fr); gap: 6px; align-items: stretch; min-width: 0; }
.rpf .field { min-width: 0; width: 100%; box-sizing: border-box; }
.rpf .field input { width: 100%; min-width: 0; }
.rpf .rp-field__label { font-size: 13px; font-weight: 600; color: var(--navy-dark); }
.rpf .rp-field__label em { font-style: normal; font-weight: 500; color: var(--muted); }
.rpf .field { min-height: 50px; padding: 0 14px; border-radius: 12px; gap: 10px; }
.rpf .field > i { font-size: 16px; }
.rpf .field input { padding: 12px 0; font-size: 16px; font-weight: 600; }
.rpf .rp-auto { min-height: 50px; padding: 0 14px; border-radius: 12px; }
.rpf .rp-calc__submit {
  width: 100%;
  min-height: 56px;
  margin-top: 20px;
  justify-content: center;
  font-size: 17px; letter-spacing: .4px;
  border-radius: 14px;
}
.rpf .lead__error { margin: 10px 0 0; }
.rpf .rpf__note {
  display: flex; align-items: center; justify-content: center; gap: 6px;
  margin: 12px 0 0;
  font-size: 12.5px; color: var(--muted);
}

/* Tablet: stack, form first after a short intro */
@media (max-width: 991.98px) {
  .rp-split { padding: 40px 0 56px; }
  .rp-split__grid { grid-template-columns: 1fr; gap: 32px; }
  .rp-split__intro { text-align: center; }
  .rp-split .rp-split__lead { margin-left: auto; margin-right: auto; }
  .rp-split__points { max-width: 460px; margin-left: auto; margin-right: auto; text-align: left; }
  .rpf { max-width: 620px; width: 100%; margin: 0 auto; }
}
/* Phone */
@media (max-width: 575.98px) {
  .rp-split { padding: 24px 0 40px; }
  .rp-split__grid { gap: 22px; }
  .rp-split__eyebrow { font-size: 11.5px; padding: 6px 12px; }
  .rp-split .rp-split__title { margin-top: 12px; font-size: 32px; letter-spacing: -.6px; }
  .rp-split .rp-split__lead { margin-top: 10px; font-size: 15px; }
  .rp-split__points { display: none; } /* keep the form near the top on phones */
  .rp-split__counter { margin-top: 14px; padding: 9px 14px; font-size: 13px; }
  .rp-split__counter strong { font-size: 16px; }
  .rpf { padding: 20px 16px 16px; border-radius: 18px; }
  .rpf::before { left: 16px; right: 16px; }
  .rpf .rpf__head h2 { font-size: 20px; }
  .rpf .rpf__step { margin: 16px 0 10px; font-size: 13px; }
  .rpf__grid { gap: 10px; }
  .rpf .field, .rpf .rp-auto { min-height: 46px; }
  .rpf .field input { padding: 10px 0; }
  .rpf .rp-calc__submit { min-height: 52px; margin-top: 16px; font-size: 16px; }
}

/* Result popup: make the "students already filled" line stand out */
.rp-card .rp-card__checked {
  margin: 14px auto 0;
  width: fit-content;
  max-width: 100%;
  padding: 10px 16px;
  border-radius: 12px;
  background: #fff4e3;
  border: 1.5px solid #f6c77d;
  font-size: 14.5px; font-weight: 600; color: var(--navy-dark);
  gap: 8px;
}
.rp-card .rp-card__checked i { color: #e8800c; font-size: 18px; }
.rp-card .rp-card__checked b {
  font-family: var(--font-head); font-size: 20px; font-weight: 800; color: #c2410c;
  font-variant-numeric: tabular-nums;
}
.rp-card .rp-card__checked[hidden] { display: none; }

/* =========================================================
   Result popup: fit on screen (no scrollbar) + stable buttons
   ========================================================= */
.rp-modal .rp-card {
  padding: 26px 28px 18px;
  /* slim, rounded scrollbar (only appears when the content is taller than the screen) */
  scrollbar-width: thin;                              /* Firefox */
  scrollbar-color: rgba(44, 80, 156, .35) transparent;
  scrollbar-gutter: auto;
}
.rp-modal .rp-card::-webkit-scrollbar { width: 6px; }
.rp-modal .rp-card::-webkit-scrollbar-track { background: transparent; margin: 18px 0; }
.rp-modal .rp-card::-webkit-scrollbar-thumb { background: rgba(44, 80, 156, .3); border-radius: 999px; }
.rp-modal .rp-card::-webkit-scrollbar-thumb:hover { background: rgba(44, 80, 156, .5); }
.rp-modal .rp-card__icon { width: 60px; height: 60px; font-size: 25px; }
.rp-modal .rp-card__who { margin-top: 10px; }
.rp-modal .rp-card__title { margin-top: 10px; }
.rp-modal .rp-card .rp-card__checked { margin-top: 12px; padding: 8px 14px; font-size: 13.5px; }
.rp-modal .rp-card .rp-card__checked b { font-size: 18px; }
.rp-modal .rp-rows { margin-top: 18px; }
.rp-modal .rp-rows__item { padding: 11px 2px; }
.rp-modal .rp-card__actions { margin-top: 18px; }
.rp-modal .rp-modal__note { margin-top: 10px; }

/* Buttons: same colours in every state (the site theme recolours .btn on hover/focus/click) */
.rp-modal .rp-card__actions .btn.rp-card__ghost,
.rp-modal .rp-card__actions .btn.rp-card__ghost:hover,
.rp-modal .rp-card__actions .btn.rp-card__ghost:focus,
.rp-modal .rp-card__actions .btn.rp-card__ghost:focus-visible,
.rp-modal .rp-card__actions .btn.rp-card__ghost:active {
  color: var(--navy-dark);
  border: 1px solid var(--border);
  box-shadow: none;
  outline: 0;
}
.rp-modal .rp-card__actions .btn.rp-card__ghost { background: #fff; }
.rp-modal .rp-card__actions .btn.rp-card__ghost:hover,
.rp-modal .rp-card__actions .btn.rp-card__ghost:active { background: var(--tint); border-color: #cfd6e6; }
.rp-modal .rp-card__actions .btn.rp-card__ghost:focus-visible { box-shadow: 0 0 0 3px rgba(44, 80, 156, .25); }

.rp-modal .rp-card__actions .btn.btn--navy,
.rp-modal .rp-card__actions .btn.btn--navy:hover,
.rp-modal .rp-card__actions .btn.btn--navy:focus,
.rp-modal .rp-card__actions .btn.btn--navy:focus-visible,
.rp-modal .rp-card__actions .btn.btn--navy:active {
  color: #fff;
  border: 0;
  outline: 0;
}
.rp-modal .rp-card__actions .btn.btn--navy { background: var(--navy-dark); }
.rp-modal .rp-card__actions .btn.btn--navy:hover,
.rp-modal .rp-card__actions .btn.btn--navy:active { background: var(--navy); }
.rp-modal .rp-card__actions .btn.btn--navy:focus-visible { box-shadow: 0 0 0 3px rgba(44, 80, 156, .35); }

@media (max-width: 575.98px) {
  .rp-modal .rp-card { padding: 22px 16px 14px; }
  .rp-modal .rp-card__icon { width: 52px; height: 52px; font-size: 22px; }
  .rp-modal .rp-rows__item { padding: 9px 0; }
}

/* =========================================================
   Result page (shareable link ?roll=...&key=...)
   ========================================================= */
.rp-result {
  padding: 40px 0 48px;
  background:
    radial-gradient(circle at 15% 10%, rgba(241, 164, 59, .22), transparent 40%),
    radial-gradient(circle at 85% 30%, rgba(59, 84, 216, .12), transparent 42%),
    linear-gradient(180deg, #fffaf1 0%, #fff 100%);
  scroll-margin-top: 90px;
}
.rp-result__wrap { max-width: 560px; margin: 0 auto; }
.rp-result .rp-card.rp-result__card {
  max-height: none;
  overflow: visible;
  padding: 30px 30px 20px;
  border: 1px solid var(--border);
  box-shadow: 0 24px 60px rgba(4, 44, 84, .14);
}
.rp-result .rp-card__icon { width: 64px; height: 64px; font-size: 27px; }
.rp-result .rp-card__who { margin-top: 12px; font-size: 14.5px; }
.rp-result h1.rp-card__title { margin: 8px 0 0; font-size: 15px; font-weight: 600; color: var(--muted); }
.rp-result .rp-card .rp-card__checked { margin-top: 14px; }
.rp-result .rp-rows { margin-top: 20px; }
.rp-result .rp-card__actions .btn { flex: 1; justify-content: center; text-decoration: none; }
.rp-result .rp-card__actions .btn.btn--navy,
.rp-result .rp-card__actions .btn.btn--navy:hover,
.rp-result .rp-card__actions .btn.btn--navy:focus,
.rp-result .rp-card__actions .btn.btn--navy:active { color: #fff; border: 0; }
.rp-result .rp-card__actions .btn.btn--navy:hover { background: var(--navy); }

/* Share block */
.rp-share {
  margin-top: 20px;
  padding: 16px;
  border-radius: 16px;
  background: var(--tint);
  border: 1px solid var(--border);
}
.rp-share .rp-share__label {
  display: flex; align-items: center; gap: 8px;
  margin: 0 0 12px;
  font-family: var(--font-head); font-size: 14.5px; font-weight: 700; color: var(--navy-dark);
}
.rp-share__label i { color: #e8800c; }
.rp-share__buttons { display: flex; flex-wrap: wrap; gap: 8px; }
.rp-share__btn {
  flex: 1 1 120px;
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  min-height: 44px;
  padding: 0 14px;
  border-radius: 11px;
  border: 1.5px solid transparent;
  font-family: var(--font-head); font-size: 14.5px; font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: transform .15s ease, background .2s ease, border-color .2s ease;
}
.rp-share__btn i { font-size: 17px; }
.rp-share__btn:hover { transform: translateY(-1px); }
.rp-share__btn[hidden] { display: none; }
.rp-share__btn--wa, .rp-share__btn--wa:hover, .rp-share__btn--wa:focus { background: #25d366; color: #fff; }
.rp-share__btn--wa:hover { background: #1ebe5b; }
.rp-share__btn--copy, .rp-share__btn--more { background: #fff; color: var(--navy-dark); border-color: #cfd6e6; }
.rp-share__btn--copy:hover, .rp-share__btn--more:hover { border-color: var(--navy); }
.rp-share__btn--copy.is-done { background: #ecfdf3; border-color: #16a34a; color: #15803d; }
.rp-share__link { margin-top: 10px; }
.rp-share__link input {
  width: 100%;
  min-height: 40px;
  padding: 0 12px;
  border-radius: 10px;
  border: 1px dashed #cfd6e6;
  background: #fff;
  font: inherit; font-size: 12.5px; color: var(--muted);
  text-overflow: ellipsis;
}

/* Invalid / expired link notice */
.rp-result-missing { background: #fff5f5; border-bottom: 1px solid #fecaca; }
.rp-result-missing p {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  margin: 0; padding: 12px 0;
  font-size: 14.5px; font-weight: 500; color: #b91c1c; text-align: center;
}

@media (max-width: 575.98px) {
  .rp-result { padding: 20px 0 32px; }
  .rp-result .rp-card.rp-result__card { padding: 22px 16px 16px; border-radius: 20px; }
  .rp-share { padding: 12px; }
  .rp-share__btn { flex-basis: 100px; font-size: 14px; }
}

/* Result link opened as a popup */
.rp-modal--result { width: min(500px, calc(100% - 32px)); }
.rp-modal h1.rp-card__title { margin: 8px 0 0; font-size: 15px; font-weight: 600; color: var(--muted); }
.rp-modal .rp-share { margin-top: 18px; }
.rp-modal .rp-card__actions .btn { flex: 1; justify-content: center; text-decoration: none; }
.rp-modal:not([open]) { display: none; }
@media (max-width: 575.98px) {
  .rp-modal--result { width: calc(100% - 20px); }
}

/* =========================================================
   Result page (/ras-rank-predictor?roll=...)
   ========================================================= */
.rp-respage { padding: 28px 0 64px; }
.rp-respage .rp-respage__back {
  display: inline-flex; align-items: center; gap: 8px;
  margin-bottom: 18px;
  font-size: 14px; font-weight: 600; color: var(--navy); text-decoration: none;
}
.rp-respage .rp-respage__back:hover { color: #e8800c; }
.rp-respage__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr);
  gap: 28px;
  align-items: start;
}
.rp-respage .rp-card.rp-result__card { max-height: none; overflow: visible; }

/* Empty / invalid states */
.rp-respage__empty { text-align: center; padding: 40px 30px 34px; }
.rp-respage__empty-icon {
  display: inline-grid; place-items: center;
  width: 68px; height: 68px; border-radius: 50%;
  background: var(--gold-soft); color: #e8800c; font-size: 30px;
}
.rp-respage__empty--bad .rp-respage__empty-icon { background: #fff1f2; color: #dc2626; }
.rp-respage .rp-respage__empty h1 { margin: 16px 0 0; font-size: 24px; font-weight: 800; color: var(--navy-dark); overflow-wrap: anywhere; }
.rp-respage .rp-respage__empty p { margin: 10px auto 22px; max-width: 420px; color: var(--muted); font-size: 15.5px; }
.rp-respage__empty .btn { text-decoration: none; }

/* Side cards */
.rp-respage__side { display: grid; gap: 20px; }
.rp-side-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 22px;
  box-shadow: 0 16px 40px rgba(4, 44, 84, .1);
}
.rp-side-card h2 {
  display: flex; align-items: center; gap: 9px;
  margin: 0; font-size: 19px; font-weight: 800; color: var(--navy-dark);
}
.rp-side-card h2 i { color: #e8800c; }
.rp-side-card > p { margin: 6px 0 14px; font-size: 14px; color: var(--muted); }

.rp-friend { display: flex; gap: 10px; flex-wrap: wrap; }
.rp-friend .field { flex: 1 1 190px; min-width: 0; min-height: 48px; }
.rp-friend .field input { width: 100%; min-width: 0; font-size: 16px; font-weight: 600; }
.rp-friend .btn { min-height: 48px; padding: 0 20px; justify-content: center; }
.rp-friend .btn.btn--navy, .rp-friend .btn.btn--navy:hover, .rp-friend .btn.btn--navy:focus, .rp-friend .btn.btn--navy:active { color: #fff; border: 0; }
.rp-friend .btn.btn--navy:hover { background: var(--navy); }
.rp-friend .rp-friend__error { flex-basis: 100%; margin: 0; font-size: 13px; color: #dc2626; }

/* Leaderboard */
.rp-leader__list { list-style: none; margin: 14px 0 0; padding: 0; display: grid; gap: 8px; }
.rp-leader__row {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 12px;
  border-radius: 12px;
  background: var(--tint);
  border: 1px solid transparent;
}
.rp-leader__pos {
  flex-shrink: 0;
  width: 30px; height: 30px; display: grid; place-items: center;
  border-radius: 50%;
  background: #fff; border: 1px solid var(--border);
  font-family: var(--font-head); font-size: 13.5px; font-weight: 700; color: var(--navy-dark);
}
.rp-leader__row.is-top { background: #fffaf2; border-color: #fde4bf; }
.rp-leader__row.is-top-1 .rp-leader__pos { background: linear-gradient(135deg, #fcd34d, #f59e0b); border: 0; color: #fff; }
.rp-leader__row.is-top-2 .rp-leader__pos { background: linear-gradient(135deg, #e5e7eb, #9ca3af); border: 0; color: #fff; }
.rp-leader__row.is-top-3 .rp-leader__pos { background: linear-gradient(135deg, #fdba74, #c2410c); border: 0; color: #fff; }
.rp-leader__who { flex: 1; min-width: 0; }
.rp-leader__who strong { display: block; font-size: 14.5px; font-weight: 600; color: var(--navy-dark); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rp-leader__who small { display: block; font-size: 12px; color: var(--muted); }
.rp-leader__score { flex-shrink: 0; font-family: var(--font-head); font-size: 16px; font-weight: 800; color: #c2410c; }

.rp-leader__soon {
  margin-top: 14px;
  padding: 22px 18px;
  border-radius: 14px;
  background: linear-gradient(160deg, #fffaf2, #f6f7fb);
  border: 1px dashed #f6c77d;
  text-align: center;
}
.rp-leader__soon-icon {
  display: inline-grid; place-items: center;
  width: 50px; height: 50px; border-radius: 50%;
  background: #fff; color: #e8800c; font-size: 22px;
  box-shadow: 0 6px 16px rgba(241, 164, 59, .25);
}
.rp-leader__soon p { margin: 10px 0 0; font-size: 14px; color: var(--muted); line-height: 1.55; }
.rp-leader__soon p strong { color: var(--navy-dark); font-size: 15.5px; }

/* "Already checked" link shown under the form */
.rp-existing-link { color: var(--navy); font-weight: 600; word-break: break-all; }

@media (max-width: 991.98px) {
  .rp-respage__grid { grid-template-columns: 1fr; }
  .rp-respage__main, .rp-respage__side { max-width: 620px; width: 100%; margin: 0 auto; }
}
@media (max-width: 575.98px) {
  .rp-respage { padding: 18px 0 40px; }
  .rp-side-card { padding: 18px 16px; border-radius: 18px; }
  .rp-friend .btn { width: 100%; }
}

/* Main page: "Check a friend's rank" card — under the intro on desktop, after the form on phones */
@media (min-width: 992px) {
  .rp-split__grid { grid-template-rows: auto auto; align-items: start; }
  .rp-split__intro { grid-column: 1; grid-row: 1; align-self: end; }
  .rp-split .rpf { grid-column: 2; grid-row: 1 / span 2; align-self: center; }
  .rp-split__friend { grid-column: 1; grid-row: 2; align-self: start; max-width: 520px; }
}
.rp-split__friend { text-align: left; }
@media (max-width: 991.98px) {
  .rp-split__friend { max-width: 620px; width: 100%; margin: 0 auto; }
}

/* Result page disclaimer (shown for every result state) */
.rp-respage .rp-respage__disclaimer {
  display: flex; align-items: flex-start; gap: 10px;
  margin: 16px 0 0;
  padding: 12px 16px;
  border-radius: 14px;
  background: #fff8e6;
  border: 1px solid #f6d58f;
  font-size: 13.5px; line-height: 1.5; color: #7a5200;
}
.rp-respage__disclaimer i { color: #e8800c; font-size: 16px; margin-top: 1px; flex-shrink: 0; }
.rp-respage__disclaimer strong { color: #8a4b00; }

/* Result page: score band message */
.rp-card .rp-card__verdict {
  display: inline-flex; align-items: center; gap: 8px;
  margin: 12px 0 0;
  font-family: var(--font-head); font-size: 16px; font-weight: 700; color: var(--navy-dark);
}
.rp-card__verdict i { color: #e8800c; }
