/* ==========================================================================
   Check Your Result (result.html). Loads after modern.css, only on that page.
   The lookup card, the result card and the grade scale. Everything is scoped with .rs-.
   ========================================================================== */

.rs-page { --rs-violet: #7B5CF0; --rs-pop: cubic-bezier(.34, 1.56, .64, 1); }

/* ---------- The lookup card, riding up over the hero ---------- */
.rs-lookup { position: relative; z-index: 3; margin-top: clamp(-84px, -6vw, -44px); padding-bottom: clamp(40px, 5vw, 72px); }
.rs-form {
  position: relative; overflow: hidden;
  padding: clamp(24px, 3.4vw, 46px);
  border-radius: clamp(26px, 3vw, 40px);
  background: #fff;
  box-shadow: 0 54px 90px -50px rgba(46, 31, 122, .62), 0 0 0 1px rgba(30, 36, 86, .06);
}
.rs-form::before {
  content: ""; position: absolute; inset: 0 0 auto 0; height: 8px;
  background: linear-gradient(90deg, #E5306C, #EE6C12, #FFC53D, #4CA82A, #119DB0, #3466E0, #7B5CF0);
}
.rs-form::after {
  content: ""; position: absolute; right: -70px; top: -70px; width: 260px; height: 260px; border-radius: 50%; pointer-events: none;
  background: radial-gradient(circle, rgba(123, 92, 240, .16), transparent 66%);
}
.rs-form-head { position: relative; z-index: 1; display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 14px 24px; }
.rs-form-title { margin: 10px 0 0; font-family: var(--font-display); font-weight: 700; font-size: clamp(1.7rem, 1.05rem + 2vw, 2.55rem); line-height: 1.1; color: var(--ink); }
.rs-declared {
  display: inline-flex; align-items: center; gap: 9px; margin: 0; padding: 9px 18px 9px 14px; border-radius: 999px;
  background: #F3F0FF; color: #4632AE; font-weight: 800; font-size: 14.5px;
}
.rs-declared svg { width: 19px; height: 19px; }
.rs-nojs { position: relative; z-index: 1; margin: 18px 0 0; padding: 14px 18px; border-radius: 16px; background: #FFF2F6; color: #B02156; font-weight: 800; }

.rs-grid { position: relative; z-index: 1; display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(280px, 1fr); gap: clamp(22px, 3vw, 46px); margin-top: clamp(22px, 2.6vw, 34px); align-items: start; }
@media (max-width: 899.98px) { .rs-grid { grid-template-columns: minmax(0, 1fr); } }
.rs-left, .rs-right { min-width: 0; }
.rs-left { display: grid; gap: clamp(22px, 2.6vw, 32px); }

/* A step: a numbered bubble and its title */
.rs-step { margin: 0; padding: 0; border: 0; min-width: 0; }
.rs-step > legend, .rs-roll-label {
  display: flex; align-items: center; gap: 12px; margin: 0 0 14px; padding: 0;
  font-family: var(--font-display); font-weight: 600; font-size: 1.14rem; color: var(--ink);
}
.rs-num {
  display: grid; place-items: center; flex: none; width: 34px; height: 34px; border-radius: 12px;
  background: linear-gradient(135deg, var(--n1, #2EC4D6), var(--n2, #3466E0)); color: #fff; font-weight: 700; font-size: 1rem;
  box-shadow: 0 10px 18px -10px var(--n2, #3466E0);
}
.rs-step-exam .rs-num { --n1: #FFC53D; --n2: #EE6C12; }
.rs-roll .rs-num { --n1: #FF6B9A; --n2: #7B5CF0; }

/* Step 1: the exams */
.rs-exams { display: flex; flex-wrap: wrap; gap: 12px; }
.rs-exam { position: relative; cursor: pointer; }
.rs-exam input, .rs-class input { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
.rs-exam-body {
  display: flex; align-items: center; gap: 12px; padding: 11px 20px 11px 14px; border-radius: 20px;
  border: 2px solid #ECE8FB; background: #fff; transition: transform .25s var(--rs-pop), border-color .2s, background-color .2s, box-shadow .25s;
}
.rs-exam-ic {
  display: grid; place-items: center; width: 38px; height: 38px; border-radius: 13px; flex: none;
  background: #F3F0FF; color: var(--rs-violet); transition: background-color .2s, color .2s;
}
.rs-exam-ic svg { width: 20px; height: 20px; }
.rs-exam-body b { display: block; font-family: var(--font-display); font-weight: 600; font-size: 1.04rem; line-height: 1.2; color: var(--ink); }
.rs-exam-body small { display: block; font-size: 13px; font-weight: 700; color: var(--muted); }
.rs-exam:hover .rs-exam-body { transform: translateY(-2px); border-color: #CFC4F8; }
.rs-exam input:checked + .rs-exam-body { border-color: var(--rs-violet); background: #F7F4FF; box-shadow: 0 16px 26px -20px rgba(123, 92, 240, .9); }
.rs-exam input:checked + .rs-exam-body .rs-exam-ic { background: var(--rs-violet); color: #fff; }
.rs-exam input:focus-visible + .rs-exam-body, .rs-class input:focus-visible + .rs-class-tile { outline: 3px solid var(--blue); outline-offset: 3px; }

/* Step 2: the classes, grouped by stage in the stage's own colour */
.rs-classes { display: grid; gap: 14px; }
.rs-stage { display: grid; grid-template-columns: 138px minmax(0, 1fr); align-items: center; gap: 12px; }
.rs-stage-name {
  display: inline-flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase;
  color: color-mix(in srgb, var(--c) 80%, #000);
}
.rs-stage-name::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--c); flex: none; box-shadow: 0 0 0 4px color-mix(in srgb, var(--c) 18%, transparent); }
.rs-stage-tiles { display: flex; flex-wrap: wrap; gap: 10px; }
@media (max-width: 639.98px) { .rs-stage { grid-template-columns: minmax(0, 1fr); gap: 8px; } }
.rs-class { position: relative; cursor: pointer; }
.rs-class-tile {
  display: grid; place-items: center; min-width: 58px; height: 58px; padding: 0 12px; border-radius: 18px;
  border: 2px solid color-mix(in srgb, var(--c) 26%, #fff); background: color-mix(in srgb, var(--c) 9%, #fff);
  color: color-mix(in srgb, var(--c) 82%, #000);
  font-family: var(--font-display); font-weight: 600; font-size: 1.28rem; line-height: 1;
  transition: transform .25s var(--rs-pop), background-color .2s, color .2s, border-color .2s, box-shadow .25s;
}
.rs-class-tile small { display: block; font-family: var(--font-body); font-size: 9.5px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; opacity: .75; margin-bottom: 2px; }
.rs-class-tile .rs-word { font-size: 1.02rem; }
.rs-class:hover .rs-class-tile { transform: translateY(-3px); background: color-mix(in srgb, var(--c) 16%, #fff); }
.rs-class input:checked + .rs-class-tile {
  transform: translateY(-3px) scale(1.06); border-color: transparent; color: #fff;
  background: linear-gradient(150deg, color-mix(in srgb, var(--c) 70%, #fff), var(--c));
  box-shadow: 0 18px 26px -14px var(--c);
}
.rs-class input:checked + .rs-class-tile small { opacity: .9; }
.rs-class.soon { cursor: not-allowed; }
.rs-class.soon .rs-class-tile { border-style: dashed; border-color: #DEDBEA; background: #FAF9FD; color: #A9A6BD; }
.rs-class.soon:hover .rs-class-tile { transform: none; background: #FAF9FD; }

/* Step 3: the roll number, in a ticket-like box */
.rs-roll {
  position: relative; padding: clamp(20px, 2.4vw, 30px); border-radius: 30px;
  background: linear-gradient(160deg, #F5F1FF 0%, #FFF1F6 100%); border: 2px dashed #D6CCF8;
}
.rs-roll-box {
  display: flex; align-items: center; gap: 10px; padding: 2px 18px; border-radius: 22px; background: #fff; border: 3px solid #E4DDFB;
  box-shadow: 0 16px 30px -24px rgba(123, 92, 240, .9); transition: border-color .2s, box-shadow .25s;
}
.rs-roll-box:focus-within { border-color: var(--rs-violet); box-shadow: 0 0 0 6px rgba(123, 92, 240, .16), 0 16px 30px -24px rgba(123, 92, 240, .9); }
.rs-roll-box > span { font-family: var(--font-display); font-weight: 600; font-size: 2rem; color: var(--rs-violet); }
.rs-roll-box input {
  flex: 1; min-width: 0; padding: 10px 0; border: 0; outline: 0; background: transparent;
  font-family: var(--font-display); font-weight: 600; font-size: clamp(1.9rem, 1.4rem + 1.4vw, 2.7rem); letter-spacing: .05em; color: var(--ink);
}
.rs-roll-box input::placeholder { font-size: 1.1rem; letter-spacing: 0; font-weight: 600; color: #B5B1CB; }
.rs-roll-box.bad { border-color: #E5306C; animation: rs-shake .4s; }
.rs-error { display: flex; align-items: flex-start; gap: 8px; margin: 12px 0 0; font-weight: 800; font-size: 14.5px; line-height: 1.45; color: #B02156; }
.rs-error[hidden] { display: none; }
.rs-go { width: 100%; margin-top: 16px; }
.rs-try { margin-top: 20px; }
.rs-try[hidden] { display: none; }
.rs-try-label { display: block; margin-bottom: 9px; font-size: 12px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.rs-try-list { display: flex; flex-wrap: wrap; gap: 8px; }
.rs-sample {
  display: inline-flex; align-items: center; gap: 8px; padding: 7px 14px 7px 11px; border-radius: 999px; background: #fff;
  border: 2px solid #ECE8FB; font-weight: 800; font-size: 13.5px; color: var(--ink-soft); transition: transform .25s var(--rs-pop), border-color .2s, background-color .2s;
}
.rs-sample i { width: 10px; height: 10px; border-radius: 50%; background: var(--c); }
.rs-sample:hover { transform: translateY(-2px) rotate(-1.5deg); border-color: var(--c); background: color-mix(in srgb, var(--c) 8%, #fff); }

/* ---------- The result ---------- */
.rs-out { margin-top: clamp(26px, 3vw, 40px); scroll-margin-top: 110px; }
.rs-out:empty { display: none; }
.rs-report { display: grid; grid-template-columns: minmax(300px, 410px) minmax(0, 1fr); gap: clamp(18px, 2.4vw, 32px); align-items: start; animation: rs-rise .7s var(--ease) both; }
@media (max-width: 899.98px) { .rs-report { grid-template-columns: minmax(0, 1fr); } }
.rs-printhead { display: none; }
.rs-out:focus { outline: none; }
.rs-out h3:focus { outline: none; }

/* Who: the identity card */
.rs-id { position: relative; overflow: hidden; border-radius: 34px; background: #fff; box-shadow: 0 44px 70px -46px rgba(30, 36, 86, .6), 0 0 0 1px rgba(30, 36, 86, .06); }
.rs-id-top {
  position: relative; overflow: hidden; padding: 30px 26px 78px; color: #fff;
  background:
    radial-gradient(60% 90% at 100% 0, rgba(255, 255, 255, .3), transparent 62%),
    linear-gradient(150deg, color-mix(in srgb, var(--c) 76%, #fff), var(--c) 52%, color-mix(in srgb, var(--c) 68%, #1E2456));
}
.rs-id-top::before {
  content: ""; position: absolute; inset: 0; opacity: .5; pointer-events: none;
  background-image: radial-gradient(rgba(255, 255, 255, .42) 2px, transparent 3px), radial-gradient(rgba(255, 255, 255, .25) 1.5px, transparent 2.5px);
  background-size: 34px 34px, 52px 52px; background-position: 0 0, 17px 21px;
}
.rs-id-top > * { position: relative; }
.rs-avatar {
  display: grid; place-items: center; width: 92px; height: 92px; border-radius: 50%; background: #fff; color: var(--c);
  font-family: var(--font-display); font-weight: 700; font-size: 2.3rem; letter-spacing: .02em;
  border: 5px solid rgba(255, 255, 255, .5); box-shadow: 0 18px 30px -14px rgba(0, 0, 0, .55);
}
.rs-name { margin: 16px 0 0; font-family: var(--font-display); font-weight: 700; font-size: clamp(1.5rem, 1.2rem + .9vw, 1.9rem); line-height: 1.15; color: #fff; overflow-wrap: anywhere; }
.rs-name:focus { outline: none; }
.rs-meta { margin: 8px 0 0; display: flex; flex-wrap: wrap; gap: 8px; }
.rs-meta span { padding: 4px 12px; border-radius: 999px; background: rgba(255, 255, 255, .22); font-weight: 800; font-size: 13.5px; backdrop-filter: blur(2px); }
.rs-father { margin: 12px 0 0; font-weight: 700; font-size: 14.5px; opacity: .95; }
.rs-medal {
  position: absolute !important; right: 22px; top: 24px; display: grid; place-items: center; width: 62px; height: 62px; border-radius: 50%;
  font-family: var(--font-display); font-weight: 700; font-size: 1.5rem; color: #5B3A00;
  background: radial-gradient(circle at 32% 28%, #fff 0 8%, var(--m1) 28%, var(--m2) 100%);
  box-shadow: inset -6px -8px 14px rgba(0, 0, 0, .2), 0 16px 24px -10px rgba(0, 0, 0, .55); animation: rs-pop .8s .5s var(--rs-pop) both;
}
.rs-medal small { position: absolute; bottom: -9px; padding: 1px 8px; border-radius: 999px; background: #fff; color: var(--ink); font-family: var(--font-body); font-weight: 800; font-size: 10px; letter-spacing: .06em; text-transform: uppercase; box-shadow: 0 6px 10px -6px rgba(0, 0, 0, .5); }
.rs-medal.r1 { --m1: #FFD75E; --m2: #E09A00; }
.rs-medal.r2 { --m1: #F1F3F8; --m2: #9AA3B8; color: #3A4258; }
.rs-medal.r3 { --m1: #F2B17A; --m2: #B5651D; color: #4A2200; }
.rs-confetti { position: absolute !important; inset: 0; overflow: hidden; pointer-events: none; z-index: 2; }
.rs-confetti i { position: absolute; top: -14px; width: 9px; height: 14px; border-radius: 3px; background: var(--k); opacity: 0; animation: rs-fall var(--d, 2.6s) var(--t, 0s) ease-in forwards; }

.rs-id-body { position: relative; margin-top: -50px; padding: 0 18px 22px; }
.rs-score {
  display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 18px; padding: 16px 18px; border-radius: 26px; background: #fff;
  box-shadow: 0 26px 40px -26px rgba(30, 36, 86, .55), 0 0 0 1px rgba(30, 36, 86, .06);
}
.rs-ring { position: relative; width: 124px; height: 124px; flex: none; }
.rs-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.rs-ring .trk { fill: none; stroke: #EFEBFB; stroke-width: 12; }
.rs-ring .bar { fill: none; stroke: url(#rs-grad); stroke-width: 12; stroke-linecap: round; stroke-dasharray: 327; stroke-dashoffset: 327; transition: stroke-dashoffset 1.4s .25s var(--ease); }
.rs-go-on .rs-ring .bar { stroke-dashoffset: var(--off); }
.rs-ring-num { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; font-family: var(--font-display); font-weight: 700; font-size: 1.8rem; line-height: 1; color: var(--ink); font-variant-numeric: tabular-nums; }
.rs-ring-num small { display: block; margin-top: 3px; font-family: var(--font-body); font-size: 10.5px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.rs-status { display: grid; gap: 8px; min-width: 0; }
.rs-pill {
  display: inline-flex; align-items: center; gap: 8px; width: fit-content; max-width: 100%; padding: 7px 14px 7px 10px; border-radius: 999px;
  font-family: var(--font-display); font-weight: 600; font-size: 1.02rem; line-height: 1.2; color: #fff;
}
.rs-pill svg { width: 20px; height: 20px; flex: none; stroke-width: 3; }
.rs-pill.pass { background: linear-gradient(135deg, #5CC23A, #2F9A5B); box-shadow: 0 12px 20px -12px #2F9A5B; }
.rs-pill.retest { background: linear-gradient(135deg, #FF8A3D, #E5306C); box-shadow: 0 12px 20px -12px #E5306C; }
.rs-status p { margin: 0; font-size: 13.5px; line-height: 1.5; font-weight: 700; color: var(--text); }
.rs-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 14px; }
.rs-stat { padding: 12px 8px; border-radius: 20px; text-align: center; background: color-mix(in srgb, var(--s) 11%, #fff); }
.rs-stat small { display: block; font-size: 10.5px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: color-mix(in srgb, var(--s) 70%, #000); }
.rs-stat b { display: block; margin-top: 3px; font-family: var(--font-display); font-weight: 700; font-size: 1.28rem; line-height: 1.1; color: var(--ink); font-variant-numeric: tabular-nums; }
.rs-stat b i { font-style: normal; font-size: .72em; opacity: .6; }
.rs-remark {
  position: relative; margin-top: 14px; padding: 16px 18px 16px 52px; border-radius: 22px; background: #FFF6DC; color: #6B4600; font-weight: 700; font-size: 14.5px; line-height: 1.6;
}
.rs-remark svg { position: absolute; left: 16px; top: 16px; width: 24px; height: 24px; color: #FFAB1A; fill: currentColor; stroke: none; }
.rs-remark small { display: block; margin-bottom: 3px; font-size: 11px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: #A06A00; }

/* What: the subject-wise marks */
.rs-marks { border-radius: 34px; background: #fff; padding: clamp(20px, 2.6vw, 34px); box-shadow: 0 44px 70px -46px rgba(30, 36, 86, .6), 0 0 0 1px rgba(30, 36, 86, .06); }
.rs-marks-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; margin-bottom: 8px; }
.rs-marks-head h3 { margin: 0; font-family: var(--font-display); font-weight: 700; font-size: 1.45rem; color: var(--ink); }
.rs-exam-chip { padding: 6px 14px; border-radius: 999px; background: #F3F0FF; color: #4632AE; font-weight: 800; font-size: 13.5px; }
.rs-tag { display: inline-flex; align-items: center; padding: 5px 12px; border-radius: 999px; background: #FFF1CC; color: #8A5A00; font-weight: 800; font-size: 12px; letter-spacing: .06em; text-transform: uppercase; }
.rs-declared .rs-tag { margin-left: 6px; }
.rs-rows { margin: 0; padding: 0; list-style: none; }
.rs-row { display: grid; grid-template-columns: minmax(110px, 1.1fr) minmax(0, 3fr) auto auto; align-items: center; gap: 8px 18px; padding: 15px 0; border-top: 1px dashed #E7E3F5; }
.rs-row:first-child { border-top: 0; }
.rs-sub { min-width: 0; font-weight: 800; color: var(--ink); overflow-wrap: break-word; }
.rs-sub small { display: block; font-size: 12px; font-weight: 700; color: var(--muted); }
.rs-bar { position: relative; height: 14px; border-radius: 99px; background: color-mix(in srgb, var(--g) 15%, #fff); }
.rs-bar i { display: block; height: 100%; width: 0; border-radius: inherit; background: linear-gradient(90deg, color-mix(in srgb, var(--g) 62%, #fff), var(--g)); transition: width 1.1s var(--ease); transition-delay: var(--dl, 0s); }
.rs-go-on .rs-bar i { width: var(--w); }
.rs-bar b { position: absolute; top: -4px; bottom: -4px; width: 3px; border-radius: 3px; background: var(--ink); opacity: .45; left: var(--avg); }
.rs-got { min-width: 74px; text-align: right; font-family: var(--font-display); font-weight: 700; font-size: 1.1rem; color: var(--ink); font-variant-numeric: tabular-nums; white-space: nowrap; }
.rs-got small { font-family: var(--font-body); font-size: 13px; font-weight: 700; color: var(--muted); }
.rs-got.ab { color: #B02156; }
.rs-g {
  display: inline-grid; place-items: center; min-width: 44px; height: 32px; padding: 0 10px; border-radius: 11px;
  background: color-mix(in srgb, var(--g) 14%, #fff); color: color-mix(in srgb, var(--g) 78%, #000);
  border: 1.5px solid color-mix(in srgb, var(--g) 32%, #fff); font-weight: 800; font-size: 14px;
}
@media (max-width: 599.98px) {
  .rs-row { grid-template-columns: minmax(0, 1fr) auto auto; padding: 13px 0; }
  .rs-row .rs-bar { grid-column: 1 / -1; grid-row: 2; }
}
.rs-legend { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 4px 0 0; font-size: 12.5px; font-weight: 700; color: var(--muted); }
.rs-legend span { display: inline-flex; align-items: center; gap: 7px; }
.rs-legend b { width: 3px; height: 14px; border-radius: 3px; background: var(--ink); opacity: .45; }
.rs-total {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 20px; margin-top: 20px; padding: 18px 22px; border-radius: 24px; color: #fff;
  background: linear-gradient(120deg, #2E1F7A, #5B3FD1 60%, #8B5CF0);
}
.rs-total div { min-width: 0; }
.rs-total small { display: block; font-size: 11px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; opacity: .78; }
.rs-total b { display: block; margin-top: 2px; font-family: var(--font-display); font-weight: 700; font-size: 1.6rem; line-height: 1.1; font-variant-numeric: tabular-nums; }
.rs-total b i { font-style: normal; font-size: .62em; opacity: .7; }
.rs-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 22px; }
.rs-ghost {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px; padding: 13px 24px; border-radius: 999px; background: #fff; color: var(--ink);
  border: 2px solid #DCD6F2; font-family: var(--font-display); font-weight: 600; transition: transform .3s var(--rs-pop), border-color .2s, background-color .2s;
}
.rs-ghost svg { width: 18px; height: 18px; }
.rs-ghost:hover { transform: translateY(-2px); border-color: var(--rs-violet); background: #F7F4FF; }
.rs-fine { margin: 16px 0 0; font-size: 12.5px; line-height: 1.6; font-weight: 700; color: var(--muted); }

/* Not found / not published */
.rs-miss {
  display: grid; justify-items: center; gap: 6px; padding: clamp(28px, 4vw, 48px) 24px; border-radius: 34px; text-align: center; background: #fff;
  border: 3px dashed #E2DCF6; animation: rs-rise .6s var(--ease) both;
}
.rs-miss-art { display: grid; place-items: center; width: 92px; height: 92px; margin-bottom: 8px; border-radius: 50%; background: linear-gradient(145deg, #FFE9F0, #F1ECFF); color: var(--rs-violet); }
.rs-miss-art svg { width: 44px; height: 44px; stroke-width: 2; }
.rs-miss h3 { margin: 0; font-family: var(--font-display); font-weight: 700; font-size: 1.5rem; color: var(--ink); }
.rs-miss p { max-width: 36em; margin: 0; line-height: 1.7; }
.rs-miss .rs-actions { justify-content: center; }

/* ---------- The grade scale ---------- */
.rs-scale .section-head p { margin-top: 14px; }
.rs-scale-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: clamp(12px, 1.6vw, 20px); }
@media (max-width: 899.98px) { .rs-scale-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.rs-grade {
  position: relative; overflow: hidden; display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 4px 16px; padding: 18px 20px; border-radius: 26px; background: #fff;
  border: 2px solid color-mix(in srgb, var(--g) 22%, #fff); box-shadow: 0 24px 40px -34px color-mix(in srgb, var(--g) 80%, #000);
  transition: transform .3s var(--rs-pop), box-shadow .3s;
}
.rs-grade::after { content: ""; position: absolute; right: -26px; top: -26px; width: 90px; height: 90px; border-radius: 50%; background: color-mix(in srgb, var(--g) 12%, transparent); }
.rs-grade:hover { transform: translateY(-5px) rotate(-.8deg); }
@media (max-width: 599.98px) {
  .rs-grade { grid-template-columns: minmax(0, 1fr); gap: 2px; padding: 16px; }
  .rs-grade-letter { grid-row: auto; width: 46px; height: 46px; margin-bottom: 8px; border-radius: 15px; font-size: 1.25rem; }
}
.rs-grade-letter {
  grid-row: span 2; display: grid; place-items: center; width: 58px; height: 58px; border-radius: 19px; color: #fff;
  background: linear-gradient(145deg, color-mix(in srgb, var(--g) 70%, #fff), var(--g)); font-family: var(--font-display); font-weight: 700; font-size: 1.5rem;
  box-shadow: 0 14px 20px -12px var(--g);
}
.rs-grade b { align-self: end; font-family: var(--font-display); font-weight: 600; font-size: 1.1rem; color: var(--ink); line-height: 1.2; }
.rs-grade small { align-self: start; font-weight: 800; color: var(--muted); font-size: 13px; }
.rs-pass-note { display: flex; justify-content: center; margin-top: clamp(20px, 2.4vw, 30px); }
.rs-pass-note span { display: inline-flex; align-items: center; gap: 10px; padding: 11px 22px; border-radius: 999px; background: #E9F7E2; color: #2B6F12; font-weight: 800; }
.rs-pass-note svg { width: 20px; height: 20px; stroke-width: 3; }

/* ---------- Motion ---------- */
@keyframes rs-rise { from { opacity: 0; transform: translateY(26px) scale(.985); } to { opacity: 1; transform: none; } }
@keyframes rs-pop { from { opacity: 0; transform: scale(.2) rotate(-24deg); } to { opacity: 1; transform: none; } }
@keyframes rs-shake { 0%, 100% { translate: 0; } 20% { translate: -7px; } 40% { translate: 7px; } 60% { translate: -5px; } 80% { translate: 4px; } }
@keyframes rs-fall { 0% { opacity: 0; transform: translateY(0) rotate(0); } 12% { opacity: 1; } 100% { opacity: 0; transform: translateY(340px) rotate(var(--r, 420deg)); } }
@media (prefers-reduced-motion: reduce) {
  .rs-report, .rs-miss, .rs-medal { animation: none; }
  .rs-ring .bar, .rs-bar i { transition: none; }
  .rs-confetti { display: none !important; }
}

/* ---------- Printing: only the result, on one A4 page ---------- */
@page { size: A4; margin: 10mm; }
@media print {
  /* display:none (not visibility:hidden), so the parts that stay home do not leave blank sheets behind */
  .skip-link, .topbar, .site-header, .hero-dark, .rs-form, .rs-lookup ~ section, .cta-wrap, .site-footer, .to-top, .nav-backdrop { display: none !important; }
  body { background: #fff; }
  .rs-lookup { margin: 0 !important; padding: 0 !important; }
  .rs-out { margin: 0; }
  /* the two cards side by side, so the whole result fits one page; plain fills, no shadows or blurs (a small file) */
  .rs-report { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.3fr); gap: 12px; align-items: start; animation: none; }
  .rs-out *, .rs-out *::before, .rs-out *::after { box-shadow: none !important; text-shadow: none !important; backdrop-filter: none !important; }
  .rs-id-top::before { display: none; }
  .rs-id, .rs-marks { border: 1px solid #cfcfe0; break-inside: avoid; }
  .rs-printhead { display: block; grid-column: 1 / -1; padding-bottom: 8px; border-bottom: 2px solid #1E2456; color: #1E2456; }
  .rs-printhead b { display: block; font-family: var(--font-display); font-size: 20px; }
  .rs-printhead span { font-size: 12px; font-weight: 700; }
  .rs-id-top { padding: 16px 14px 56px; }
  .rs-avatar { width: 58px; height: 58px; border-width: 3px; font-size: 1.45rem; }
  .rs-name { margin-top: 10px; font-size: 1.2rem; }
  .rs-meta span { font-size: 12px; }
  .rs-father { margin-top: 8px; font-size: 12.5px; }
  .rs-medal { right: 12px; top: 14px; width: 48px; height: 48px; font-size: 1.15rem; animation: none; }
  .rs-id-body { margin-top: -42px; padding: 0 12px 14px; }
  .rs-score { grid-template-columns: auto 1fr; gap: 10px; padding: 10px 12px; }
  .rs-ring { width: 88px; height: 88px; }
  .rs-ring .trk, .rs-ring .bar { stroke-width: 11; }
  .rs-ring .bar { stroke-dashoffset: var(--off); transition: none; }
  .rs-ring-num { font-size: 1.2rem; }
  .rs-ring-num small { font-size: 8.5px; }
  .rs-pill { font-size: .88rem; padding: 5px 11px 5px 8px; }
  .rs-status p { font-size: 11.5px; }
  .rs-stats { gap: 6px; margin-top: 10px; }
  .rs-stat { padding: 8px 4px; }
  .rs-stat b { font-size: 1.05rem; }
  .rs-remark { margin-top: 10px; padding: 10px 12px 10px 38px; font-size: 12px; line-height: 1.5; }
  .rs-remark svg { left: 11px; top: 11px; width: 18px; height: 18px; }
  .rs-marks { padding: 14px 16px; }
  .rs-marks-head h3 { font-size: 1.1rem; }
  .rs-row { grid-template-columns: minmax(0, 1fr) auto auto; padding: 7px 0; gap: 4px 10px; }
  .rs-row .rs-bar { grid-column: 1 / -1; grid-row: 2; }
  .rs-bar { height: 11px; }
  .rs-bar i { width: var(--w); transition: none; }
  .rs-got { min-width: 58px; font-size: .95rem; }
  .rs-g { min-width: 36px; height: 26px; font-size: 12.5px; }
  .rs-total { margin-top: 12px; padding: 12px 14px; gap: 8px 12px; }
  .rs-total b { font-size: 1.2rem; }
  .rs-fine { margin-top: 10px; font-size: 11px; }
  .rs-actions, .rs-confetti, .rs-medal small { display: none !important; }
  * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}
