/* ==========================================================================
   Theme c (Dusk), page group 4: Results, Results 2026
   Page-only layout. Shared tokens and components live in theme-c.css.
   ========================================================================== */

/* ---------- Shared on both results pages ---------- */

/* small pills on topper cards and in the table (Block Topper, HS + Inter) */
.rs-pill {
  display: inline-block;
  padding: 2px 9px;
  border-radius: 3px;
  font-family: var(--f-body);
  font-size: 0.8rem;
  font-weight: 600;
  line-height: 1.45;
  white-space: nowrap;
}
.rs-pill--bt { background: var(--maroon); color: #fff; }
.rs-pill--double { background: var(--brass); color: var(--night); }
:lang(hi) .rs-pill { line-height: 1.55; padding-block: 3px; }

/* rank medallion: the gold thread that runs through every topper */
.rs-medal {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 3.6em;
  margin: -17px auto 0;
  padding: 3px 12px 4px;
  border: 1px solid var(--brass);
  border-radius: 999px;
  background: var(--night);
  color: var(--brass-light);
  font-family: var(--f-latin);
  font-style: italic;
  font-size: 1.05rem;
  line-height: 1.3;
  font-variant-numeric: lining-nums;
}
.rank-top10 .rs-medal {
  background: linear-gradient(180deg, var(--brass-light), var(--brass));
  border-color: var(--brass-light);
  color: var(--night);
  box-shadow: 0 0 22px rgba(255, 199, 44, 0.36);
}

/* arched topper card (hall of fame on night ground) */
.rs-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 0;
  text-align: center;
  color: var(--fg-soft);
}
.rs-portrait {
  width: min(100%, 184px);
  aspect-ratio: 4 / 5;
  overflow: hidden;
  border-radius: 999px 999px var(--radius) var(--radius);
  background: var(--slate);
  outline: 1px solid rgba(235, 203, 138, 0.34);
  outline-offset: 5px;
}
.rank-top10 .rs-portrait { outline-color: rgba(235, 203, 138, 0.7); }
.rs-portrait img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 22%;
  /* if a portrait fails to load, its name shows quietly inside the arch */
  color: var(--on-dark-3);
  font: italic 0.95rem/1.3 var(--f-latin);
  text-align: center;
}
.rs-name {
  margin-top: 14px;
  font-family: var(--f-latin);
  font-size: 1.14rem;
  font-weight: 600;
  line-height: 1.25;
  color: var(--fg-strong);
  text-wrap: balance;
}
.rs-exam {
  margin: 4px 0 0;
  max-width: calc(26 * 0.575em);
  font-size: 0.88rem;
  line-height: 1.45;
  color: var(--fg-soft);
}
/* exam colour key: mist dot for High School, brass dot for Intermediate */
.rs-exam::before, .rs-chip::before {
  content: "";
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-right: 7px;
  border-radius: 50%;
  vertical-align: 0.08em;
  background: var(--brass);
}
.is-x .rs-exam::before, .rs-chip--x::before { background: #b9c1e2; }
.rs-pct {
  margin: 8px 0 0;
  font-family: var(--f-latin);
  font-size: 1.8rem;
  font-weight: 520;
  line-height: 1.05;
  color: var(--fg-strong);
  font-variant-numeric: lining-nums;
  font-optical-sizing: none;
  font-variation-settings: "opsz" 18;
}
.rs-rank {
  margin: 4px 0 0;
  font-family: var(--f-latin);
  font-style: italic;
  font-size: 1.02rem;
  line-height: 1.35;
  color: var(--accent);
}
/* arches side by side (tablet and up): a rank with its marks always breaks after the dot,
   "22nd in Uttarakhand ·" then "466/500" under it. Between 960 and 1099 px the card is just wide
   enough for one row, which then ran edge to edge and under the floating buttons. */
@media (min-width: 721px) {
  .rs-rank { max-width: 12em; }
}
/* the narrowest four-across cards: a hair smaller, so the dot stays at the end of the first row */
@media (min-width: 721px) and (max-width: 759px) {
  .rs-rank { font-size: 0.97rem; }
}
.rs-badges { margin-top: 12px; }
.rs-badges .topper-badges { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; }
/* Himani's seven badge groups sit in one place, as in the original row:
   each later group covers the one before, so one clean pair shows */
.rs-badges.is-stacked { display: inline-grid; }
.rs-badges.is-stacked > .topper-badges { grid-area: 1 / 1; justify-self: end; flex-wrap: nowrap; background: var(--night); }

/* ---------- Results: title band with the lit "20" ---------- */
.rs-hero { padding-top: clamp(34px, 4.6vw, 72px); }
.rs-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 6fr) minmax(0, 5fr);
  gap: clamp(32px, 5vw, 80px);
  align-items: end;
}
.rs-hero .gold { color: var(--brass-light); }
.rs-figures {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  color: var(--on-dark-2);
}
.rs-figure {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
  padding: 16px 16px 4px;
  border-top: 1px solid var(--hair-dark);
  border-left: 1px solid var(--hair-dark);
}
.rs-figure:nth-child(2) { border-left: 0; padding-left: 0; }
.rs-fig-num {
  font-family: var(--f-latin);
  font-size: clamp(1.7rem, 2.4vw, 2.2rem);
  font-weight: 520;
  line-height: 1;
  color: var(--paper);
  font-variant-numeric: lining-nums;
  font-optical-sizing: none;
  font-variation-settings: "opsz" 30;
}
.rs-fig-label { font-size: 0.92rem; line-height: 1.4; }
.rs-figure--lead {
  grid-column: 1 / -1;
  flex-direction: row;
  align-items: flex-end;
  gap: clamp(14px, 2vw, 24px);
  padding: 0 0 clamp(14px, 1.6vw, 22px);
  border: 0;
}
.rs-figure--lead .rs-fig-num {
  font-size: clamp(6.4rem, 12.5vw, 11.5rem);
  font-weight: 500;
  line-height: 0.8;
  letter-spacing: -0.02em;
  color: var(--brass-light);
  text-shadow: 0 0 46px rgba(255, 199, 44, 0.34), 0 0 2px rgba(255, 199, 44, 0.2);
}
.rs-figure--lead .rs-fig-label {
  padding-bottom: 0.3em;
  font-family: var(--f-latin);
  font-style: italic;
  font-size: clamp(1.15rem, 1.6vw, 1.45rem);
  line-height: 1.25;
  color: var(--paper);
}

/* ---------- Results: the award as a brass plaque ---------- */
body.inner .rs-award-sec { padding-block: clamp(48px, 6vw, 84px); }
.rs-award {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: clamp(20px, 3vw, 40px);
  align-items: center;
  max-width: 980px;
  margin-inline: auto;
  padding: clamp(26px, 3.4vw, 40px) 0;
  border-top: 1px solid var(--brass);
  border-bottom: 1px solid var(--brass);
  position: relative;
}
.rs-award::before, .rs-award::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  height: 1px;
  background: color-mix(in srgb, var(--brass) 40%, transparent);
}
.rs-award::before { top: 4px; }
.rs-award::after { bottom: 4px; }
.rs-award-icon, .rs-legacy-icon {
  display: grid;
  place-items: center;
  width: 84px;
  height: 84px;
  border-radius: 50%;
  border: 1px solid var(--brass);
  box-shadow: inset 0 0 0 5px var(--paper), inset 0 0 0 6px color-mix(in srgb, var(--brass) 55%, transparent);
  font-size: 2.3rem;
  line-height: 1;
}
.rs-award-title {
  font-family: var(--f-latin);
  font-size: clamp(1.55rem, 2.6vw, 2.3rem);
  font-weight: 500;
  line-height: 1.14;
  color: var(--fg-strong);
}
.rs-award-text p { margin-top: 12px; max-width: calc(68 * 0.575em); color: var(--fg-soft); font-size: 1.04rem; }
.rs-award-text strong { color: var(--fg-strong); }

/* ---------- Results: hall of fame, the year stands still ---------- */
.rs-session {
  display: grid;
  grid-template-columns: minmax(0, 236px) minmax(0, 1fr);
  gap: 0 clamp(28px, 3.4vw, 56px);
  padding-block: clamp(40px, 5vw, 64px);
  border-top: 1px solid var(--hair);
}
.rs-session:first-child { padding-top: 0; border-top: 0; }
.rs-session:last-child { padding-bottom: 0; }
.rs-session-head { align-self: start; position: sticky; top: 112px; }
.rs-year { display: flex; flex-direction: column; gap: 2px; color: var(--fg-strong); }
.rs-year-word {
  font-family: var(--f-latin);
  font-style: italic;
  font-weight: 400;
  font-size: 1.25rem;
  line-height: 1.2;
  color: var(--accent);
}
.rs-year-num {
  font-family: var(--f-latin);
  font-size: clamp(2.5rem, 3.6vw, 3.25rem);
  font-weight: 500;
  line-height: 1;
  letter-spacing: -0.01em;
  white-space: nowrap;
  font-variant-numeric: lining-nums;
  font-optical-sizing: none;
  font-variation-settings: "opsz" 40;
}
.rs-session-tags { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 18px; }
.rs-chip {
  display: inline-flex;
  align-items: center;
  padding: 2px 11px;
  border: 1px solid var(--hair);
  border-radius: 999px;
  font-size: 0.84rem;
  font-weight: 600;
  line-height: 1.5;
  color: var(--fg-soft);
}
.rs-chip::before { margin-right: 7px; vertical-align: 0; }
.rs-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(36px, 4vw, 52px) clamp(16px, 2vw, 28px);
  min-width: 0;
}
/* the newest session sits a touch larger */
.rs-session--lead .rs-portrait { width: min(100%, 190px); }

/* ---------- Results: at a glance ---------- */
.rs-glance-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px 32px;
}
.rs-glance-head h2 { color: var(--fg-strong); }
.rs-legend { margin: 0; color: var(--fg-soft); font-size: 1rem; }
.rs-star { color: var(--brass-deep); }
.rs-dot { color: var(--maroon); }
.rs-table .num, .rs-table thead th.num { text-align: right; }
.rs-table tbody th { font-weight: 400; }
.rs-table tbody th strong { font-weight: 600; }
.rs-table .rs-star { font-size: 0.9em; margin-left: 2px; }
.rs-table td.highlight-score { color: var(--brass-deep); font-weight: 600; }
.rs-table tbody tr.rs-now > th { box-shadow: inset 3px 0 0 var(--brass); }
.rs-table td { white-space: nowrap; }

/* ---------- Results: legacy band ---------- */
.rs-legacy-inner {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  gap: clamp(32px, 5vw, 80px);
  align-items: start;
}
.rs-legacy-icon { box-shadow: inset 0 0 0 5px var(--dusk), inset 0 0 0 6px rgba(235, 203, 138, 0.45); margin-bottom: 26px; }
.rs-legacy h2 {
  font-size: clamp(2.3rem, 4.6vw, 4rem);
  line-height: 1.06;
  color: var(--paper);
  max-width: 14ch;
}
.rs-legacy-body > p { font-size: 1.1rem; line-height: 1.7; color: var(--on-dark-2); max-width: calc(60 * 0.575em); }
.rs-lit { color: var(--brass-light); font-weight: 600; }
.rs-legacy-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: clamp(28px, 3.4vw, 44px);
  border-top: 1px solid var(--hair);
}
.rs-ls { display: flex; flex-direction: column; min-width: 0; padding: 20px 18px 0; border-left: 1px solid var(--hair); }
.rs-ls:first-child { border-left: 0; padding-left: 0; }
.rs-ls-num {
  display: flex;
  align-items: flex-end;
  min-height: 1.05em;
  font-family: var(--f-latin);
  font-size: clamp(2.2rem, 3.4vw, 3rem);
  font-weight: 500;
  line-height: 1;
  color: var(--brass-light);
  font-variant-numeric: lining-nums;
}
.rs-ls--word .rs-ls-num { font-style: italic; font-size: clamp(1.6rem, 2.4vw, 2.1rem); min-height: calc(clamp(2.2rem, 3.4vw, 3rem) * 1.05); }
.rs-ls-label { margin-top: 10px; font-size: 0.94rem; line-height: 1.45; color: var(--on-dark-2); }

/* ---------- Press block (both pages) ---------- */
.rs-press-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(20px, 2.4vw, 32px);
  align-items: start;
}
.rs-press-feature { display: flex; flex-direction: column; padding: clamp(26px, 3vw, 38px); }
.rs-source {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 12px;
  font-size: 0.92rem;
  font-weight: 600;
  line-height: 1.4;
  color: var(--accent);
}
.rs-source svg { width: 18px; height: 18px; flex-shrink: 0; }
.rs-press-title {
  margin: 0 0 12px;
  font-family: var(--f-display);
  font-size: 1.3rem;
  font-weight: 400;
  line-height: 1.45;
  color: var(--fg-strong);
}
.rs-press-feature .rs-press-title { font-size: clamp(1.45rem, 2vw, 1.75rem); line-height: 1.4; }
.rs-press-quote {
  margin: 6px 0 20px;
  padding-left: 18px;
  border-left: 2px solid var(--spark);
  font-family: var(--f-display);
  font-size: 1.18rem;
  line-height: 1.8;
  color: var(--fg);
}
.rs-press-excerpt { margin: 0; font-size: 1rem; line-height: 1.6; color: var(--fg-soft); }
.rs-press-link { align-self: flex-start; margin-top: 26px; }
.rs-press-link svg { width: 16px; height: 16px; }
.rs-clip { min-width: 0; background: var(--surface); border: 1px solid var(--hair); border-radius: var(--radius); }
.rs-clip-mat { padding: 12px; border-bottom: 1px solid var(--hair); background: #fff; }
.rs-clip-mat img { width: 100%; height: auto; outline: 1px solid rgba(30, 35, 70, 0.08); }
.rs-clip-body { padding: 20px 22px 24px; }

/* ---------- Results 2026: title band with the giant "4" ---------- */
.rs26-hero { padding-top: clamp(28px, 4vw, 60px); }
.rs26-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 4fr);
  gap: clamp(28px, 5vw, 80px);
  align-items: center;
}
.rs26-back { margin-bottom: clamp(18px, 2.4vw, 30px); min-height: 44px; color: var(--on-dark); border-bottom-color: var(--brass); font-size: 0.98rem; }
.rs26-back:hover { color: var(--brass-light); }
.rs26-hero h1 { max-width: 17ch; }
.rs26-hero h1 .gold { color: var(--brass-light); }
.rs26-hero h1 + p { max-width: calc(60 * 0.575em); }
.rs26-four {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-self: center;
  text-align: center;
}
.rs26-four-num {
  display: grid;
  place-items: center;
  width: clamp(190px, 20vw, 280px);
  aspect-ratio: 4 / 5;
  border-radius: 999px 999px var(--radius) var(--radius);
  border: 1px solid rgba(235, 203, 138, 0.55);
  outline: 1px solid rgba(235, 203, 138, 0.22);
  outline-offset: 10px;
  background:
    radial-gradient(60% 50% at 50% 44%, rgba(255, 199, 44, 0.2), rgba(255, 199, 44, 0) 70%),
    rgba(238, 240, 246, 0.04);
  font-family: var(--f-latin);
  font-size: clamp(8rem, 15vw, 12.5rem);
  font-weight: 500;
  line-height: 1;
  color: var(--brass-light);
  text-shadow: 0 0 50px rgba(255, 199, 44, 0.4);
  font-variant-numeric: lining-nums;
  font-optical-sizing: none;
  font-variation-settings: "opsz" 40;
}
.rs26-four-label {
  margin-top: 22px;
  font-family: var(--f-latin);
  font-style: italic;
  font-size: clamp(1.1rem, 1.5vw, 1.3rem);
  line-height: 1.3;
  color: var(--paper);
}

/* stat strip under the band */
body.inner .rs26-stats-sec { padding-block: clamp(36px, 4.4vw, 60px); }
.rs26-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-top: 1px solid var(--hair);
  border-bottom: 1px solid var(--hair);
}
.rs26-stat { display: flex; flex-direction: column; min-width: 0; padding: 22px 22px 24px; border-left: 1px solid var(--hair); }
.rs26-stat:first-child { border-left: 0; padding-left: 0; }
.rs26-stat-num {
  font-family: var(--f-latin);
  font-size: clamp(2rem, 3.2vw, 2.8rem);
  font-weight: 500;
  line-height: 1;
  color: var(--fg-strong);
  font-variant-numeric: lining-nums;
  font-optical-sizing: none;
  font-variation-settings: "opsz" 40;
}
.rs26-stat-num.is-lit { color: var(--brass-deep); }
.rs26-stat-label { margin-top: 10px; font-size: 0.96rem; line-height: 1.45; color: var(--fg-soft); }

/* achievers: Daksh as the lead portrait, then three arches */
.rs26-lead {
  display: grid;
  grid-template-columns: minmax(0, 4fr) minmax(0, 7fr);
  gap: clamp(32px, 5vw, 80px);
  align-items: center;
  padding-bottom: clamp(48px, 6vw, 80px);
  border-bottom: 1px solid var(--hair);
}
.rs26-lead-photo {
  justify-self: center;
  width: min(100%, 280px);
  aspect-ratio: 4 / 5;
  object-fit: cover;
  object-position: 50% 22%;
  border-radius: 999px 999px var(--radius) var(--radius);
  background: var(--slate);
  outline: 2px solid rgba(235, 203, 138, 0.75);
  outline-offset: 9px;
  box-shadow: 0 0 70px -10px rgba(255, 199, 44, 0.32);
}
.rs26-badges { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.rs26-badges .pill { white-space: normal; }
.rs26-lead h3 { font-family: var(--f-latin); font-size: clamp(2.2rem, 4vw, 3.4rem); font-weight: 500; line-height: 1.05; color: var(--paper); }
.rs26-exam { margin: 10px 0 0; color: var(--fg-soft); font-size: 1.02rem; }
.rs26-scores {
  display: grid;
  grid-template-columns: repeat(3, auto);
  justify-content: start;
  gap: 0 clamp(24px, 3.4vw, 48px);
  margin-top: 26px;
  padding-top: 20px;
  border-top: 1px solid var(--hair);
}
.rs26-score { display: flex; flex-direction: column; }
.rs26-val {
  font-family: var(--f-latin);
  font-size: clamp(1.9rem, 3vw, 2.6rem);
  font-weight: 500;
  line-height: 1;
  color: var(--brass-light);
  font-variant-numeric: lining-nums;
}
.rs26-lbl { margin-top: 8px; font-size: 0.9rem; line-height: 1.4; color: var(--fg-soft); }
.rs26-desc { margin: 24px 0 0; max-width: calc(60 * 0.575em); color: var(--fg); font-size: 1.06rem; line-height: 1.7; }
.rs26-others {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(36px, 4vw, 56px) clamp(20px, 3vw, 44px);
  margin-top: clamp(48px, 6vw, 80px);
}
.rs26-others .rs-portrait { width: min(100%, 190px); }
.rs26-others .rs-exam { max-width: calc(32 * 0.575em); }
.rs26-note {
  margin: 8px 0 0;
  display: inline-block;
  padding: 2px 10px;
  border: 1px solid var(--brass);
  border-radius: 3px;
  font-size: 0.86rem;
  font-weight: 600;
  line-height: 1.45;
  color: var(--brass-light);
}

/* class summary: two ledgers, calm ink on paper */
.rs26-classes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(36px, 5vw, 80px); }
.rs26-class { min-width: 0; padding-top: 22px; border-top: 2px solid var(--fg-strong); position: relative; }
.rs26-class::before { content: ""; position: absolute; left: 0; top: -2px; width: 56px; height: 2px; background: linear-gradient(90deg, var(--brass), var(--bus)); }
.rs26-class h3 { font-family: var(--f-latin); font-size: clamp(1.6rem, 2.4vw, 2.1rem); font-weight: 500; color: var(--fg-strong); }
.rs26-class-sub { margin: 12px 0 0; max-width: calc(56 * 0.575em); color: var(--fg-soft); }
.rs26-class-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: 26px; border-top: 1px solid var(--hair); }
.rs26-class-stat { display: flex; flex-direction: column; min-width: 0; padding: 18px 18px 20px 0; border-bottom: 1px solid var(--hair); }
.rs26-class-stat:nth-child(even) { padding-left: 18px; border-left: 1px solid var(--hair); }
.rs26-class-val {
  font-family: var(--f-latin);
  font-size: clamp(1.9rem, 2.8vw, 2.4rem);
  font-weight: 500;
  line-height: 1;
  color: var(--fg-strong);
  font-variant-numeric: lining-nums;
}
.rs26-class-val.is-lit { color: var(--brass-deep); }
.rs26-class-lbl { margin-top: 8px; font-size: 0.95rem; line-height: 1.45; color: var(--fg); }

/* closing letter on dusk */
.rs26-closing { text-align: center; }
.rs26-closing h2 { color: var(--paper); font-size: clamp(2rem, 3.8vw, 3.2rem); max-width: 20ch; margin-inline: auto; }
.rs26-closing p { margin: 20px auto 0; max-width: calc(64 * 0.575em); font-size: 1.1rem; line-height: 1.75; color: var(--on-dark-2); }
.rs26-closing .button-row { justify-content: center; margin-top: 32px; }

.rs26-source {
  margin: clamp(40px, 5vw, 64px) 0 0;
  padding-top: 18px;
  border-top: 1px solid var(--hair);
  text-align: center;
  font-size: 0.95rem;
  color: var(--fg-soft);
}
.rs26-source a { color: var(--fg-strong); text-decoration-color: var(--brass-deep); text-underline-offset: 3px; }
.rs26-source a:hover { color: var(--brass-deep); }

/* ---------- Responsive ---------- */
@media (max-width: 1099px) {
  .rs-session { grid-template-columns: minmax(0, 1fr); row-gap: 28px; }
  .rs-session-head { position: static; display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px 24px; }
  .rs-year { flex-direction: row; align-items: baseline; gap: 12px; }
  .rs-session-tags { margin-top: 0; }
  .rs-press-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rs-press-feature { grid-column: 1 / -1; }
  .rs26-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rs26-stat:nth-child(odd) { border-left: 0; padding-left: 0; }
  .rs26-stat:nth-child(n + 3) { border-top: 1px solid var(--hair); }
}
@media (max-width: 959px) {
  .rs-hero-grid, .rs26-hero-grid { grid-template-columns: minmax(0, 1fr); }
  .rs-legacy-inner { grid-template-columns: minmax(0, 1fr); }
  .rs26-lead { grid-template-columns: minmax(0, 1fr); text-align: center; justify-items: center; }
  .rs26-badges, .rs26-scores { justify-content: center; }
  .rs26-desc { margin-inline: auto; }
  .rs26-classes { grid-template-columns: minmax(0, 1fr); }
  .rs26-four { justify-self: start; flex-direction: row; align-items: center; gap: 24px; text-align: left; }
  .rs26-four-num { width: 150px; font-size: 7rem; }
  .rs26-four-label { margin-top: 0; }
}
@media (max-width: 720px) {
  .rs-award { grid-template-columns: minmax(0, 1fr); justify-items: start; }
  .rs-award-icon { width: 68px; height: 68px; font-size: 1.9rem; }
  .rs-figure--lead .rs-fig-num { font-size: 6.6rem; }
  .rs-figure { padding: 14px 10px 2px; }
  .rs-fig-num { font-size: 1.6rem; }
  .rs-fig-label { font-size: 0.86rem; }

  /* newest session: 2 by 2 arches */
  .rs-session--lead .rs-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 34px 14px; }
  .rs-session--lead .rs-pct { font-size: 1.6rem; }
  .rs-session--lead .rs-portrait { width: calc(100% - 14px); }

  /* older sessions: compact rows, arch on the left, medal on the arch */
  .rs-session--rows .rs-grid { grid-template-columns: minmax(0, 1fr); gap: 0; border-top: 1px solid var(--hair); }
  .rs-session--rows .rs-card {
    display: grid;
    grid-template-columns: 72px minmax(0, 1fr) auto;
    grid-template-rows: auto auto auto 1fr;
    grid-template-areas:
      "photo name pct"
      "photo exam exam"
      "photo rank rank"
      "photo badges badges";
    column-gap: 16px;
    align-items: start;
    padding: 18px 0 20px;
    border-bottom: 1px solid var(--hair);
    text-align: left;
  }
  .rs-session--rows .rs-card:last-child { border-bottom: 0; padding-bottom: 0; }
  .rs-session--rows .rs-portrait { grid-area: photo; width: 72px; outline-offset: 3px; }
  .rs-session--rows .rs-medal { grid-area: photo; align-self: start; justify-self: center; margin: 76px 0 0; min-width: 0; padding: 1px 8px 2px; font-size: 0.9rem; }
  .rs-session--rows .rs-name { grid-area: name; margin: 0; align-self: baseline; }
  .rs-session--rows .rs-pct { grid-area: pct; margin: 0; font-size: 1.45rem; align-self: baseline; }
  .rs-session--rows .rs-exam { grid-area: exam; max-width: none; }
  .rs-session--rows .rs-rank { grid-area: rank; }
  .rs-session--rows .rs-badges { grid-area: badges; justify-self: start; margin-top: 8px; }
  .rs-session--rows .rs-badges .topper-badges { justify-content: flex-start; }
  .rs-session--rows .rs-badges.is-stacked > .topper-badges { justify-self: end; }

  .rs-legacy-stats { grid-template-columns: minmax(0, 1fr); }
  .rs-ls, .rs-ls:first-child { display: grid; grid-template-columns: 8.4rem minmax(0, 1fr); align-items: end; gap: 0 16px; padding: 16px 0; border-left: 0; border-bottom: 1px solid var(--hair); }
  .rs-ls-num, .rs-ls--word .rs-ls-num { min-height: 0; font-size: 2.3rem; }
  .rs-ls--word .rs-ls-num { font-size: 1.7rem; }
  .rs-ls-label { margin-top: 0; }

  .rs-press-grid { grid-template-columns: minmax(0, 1fr); }

  .rs26-others { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 40px 14px; }
  .rs26-others .rs-card:first-child { grid-column: 1 / -1; }
  .rs26-scores { grid-template-columns: repeat(3, minmax(0, 1fr)); width: 100%; gap: 0 12px; }
  .rs26-val { font-size: 1.75rem; }
  .rs26-lead-photo { width: min(78%, 240px); }
}
@media (max-width: 519px) {
  .rs-figures { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .rs-figure--lead { flex-direction: column; align-items: flex-start; gap: 10px; }
  .rs-figure--lead .rs-fig-num { font-size: 6rem; }
  .rs26-stats { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .rs26-stat { padding: 18px 12px 20px; }
  .rs26-stat-num { font-size: 1.85rem; }
  .rs26-class-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .rs26-class-stat { padding-right: 10px; }
  .rs26-class-stat:nth-child(even) { padding-left: 12px; }
  .rs26-four { gap: 18px; }
  .rs26-four-num { width: 120px; font-size: 5.6rem; outline-offset: 6px; }
}

@media print {
  .rs-session-head { position: static; }
  .rs-medal { box-shadow: none; }
}

/* the two class ledgers share rows, so their figures line up */
@media (min-width: 960px) {
  @supports (grid-template-rows: subgrid) {
    .rs26-classes { grid-template-rows: auto auto auto; row-gap: 0; }
    .rs26-class { display: grid; grid-row: span 3; grid-template-rows: subgrid; align-content: start; }
    .rs26-class-grid { align-self: start; }
  }
}

/* keep keyboard focus clear of the WhatsApp button in the lower right corner */
.rs-cta .btn, .rs26-closing .btn, .rs-press-link, .rs26-source a { scroll-margin-bottom: 104px; }

/* ==========================================================================
   Light and motion on the two results pages.
   Works with dusk/core.js (the engine attributes) and dusk/fame.js.
   The resting CSS of every rule is its finished state. A start state exists
   only inside prefers-reduced-motion: no-preference, and only on an element
   the engine has armed (.kb-arm, below the first screen), or as decoration
   that runs once from the first paint and hides no words and no photo.
   ========================================================================== */

/* ---------- Results: twenty windows, one for each placement ----------
   Twenty small arched windows stand in a row between the figures and the
   ridge. Each carries data-kb-switch="settle": it flickers on in bus yellow,
   60 ms after the one before, and rests in brass. The "20" above stays
   readable from the first frame and comes up to full light with them. */
.rs-figures { position: relative; }
.rs-windows {
  --kb-step: 60ms;
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + clamp(10px, 2.2vw, 30px));
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  pointer-events: none;
}
.rs-windows i {
  flex: none;
  width: clamp(7px, 0.7vw, 10px);
  aspect-ratio: 5 / 8;
  border-radius: 999px 999px 1px 1px;
  background: var(--kb-light, #ebcb8a);
  box-shadow: 0 0 9px 1px rgba(235, 203, 138, calc(0.42 * var(--lamp, 0.55)));
}
@media (prefers-reduced-motion: no-preference) {
  .rs-figure--lead .rs-fig-num { animation: rs-light-up 2200ms ease-out backwards; }
}
@keyframes rs-light-up {
  from { color: #a8905f; text-shadow: 0 0 0 rgba(255, 199, 44, 0), 0 0 0 rgba(255, 199, 44, 0); }
}

/* ---------- Results: the award ----------
   The two pairs of hairlines are drawn lines, so they can draw outward from the centre. */
.rs-award[data-kb-rule] { border-color: transparent; }
.rs-award[data-kb-rule]::before, .rs-award[data-kb-rule]::after {
  height: 6px;
  background:
    linear-gradient(var(--brass) 0 0) 0 0 / 100% 1px no-repeat,
    linear-gradient(color-mix(in srgb, var(--brass) 40%, transparent) 0 0) 0 100% / 100% 1px no-repeat;
}
.rs-award[data-kb-rule]::before { top: -1px; }
.rs-award[data-kb-rule]::after { bottom: -1px; background-position: 0 100%, 0 0; }

/* ---------- Roll of honour (both pages) ---------- */
/* stars in the top of the hall only, clear of the cards */
.rs-sky {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  z-index: -1;
  height: min(320px, 30%);
  pointer-events: none;
}
.rs-portrait { position: relative; }
/* the arch under the pointer (or holding focus) is lit: its hairline warms to brass, and the
   engine's rim light ([data-kb-rim=".rs-portrait"]) glances along the edge of the arch */
.rs-portrait { transition: outline-color 250ms var(--ease); }
.rs-card:hover .rs-portrait, .rs-card:focus-within .rs-portrait { outline-color: rgba(235, 203, 138, 0.85); }
/* a top-ten arch: one sheen pass across its rim once it has opened */
.rank-top10 .rs-portrait::after {
  content: "";
  position: absolute;
  inset: 0;
  padding: 2px;
  border-radius: inherit;
  background: linear-gradient(115deg, rgba(255, 243, 207, 0) 42%, #fff3cf 50%, rgba(255, 243, 207, 0) 58%) no-repeat 220% 0 / 300% 100%;
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
  pointer-events: none;
}
@media (prefers-reduced-motion: no-preference) {
  /* the arch opens together with the hairline that stands off it, so the rim never pops in */
  .rs-portrait.kb-arm[data-kb-arch].is-in { animation-name: rs-arch; }
  /* the rank chip lands after its arch has opened */
  .rs-card .rs-medal.kb-arm[data-kb-seal].is-in { animation-delay: calc(var(--i, 0) * var(--kb-step, 70ms) + 380ms); }
  .rank-top10 .rs-portrait.is-in::after { animation: rs-rim-sheen 1400ms var(--ease) calc(var(--i, 0) * var(--kb-step, 70ms) + 800ms) 1 both; }
  /* the year gains weight as it rises */
  .rs-year.kb-arm.is-in .rs-year-num { animation: rs-year-weight 700ms var(--ease-rise, ease-out) 120ms backwards; }
}
@keyframes rs-arch {
  from { clip-path: inset(38% 34% -8px 34% round 999px 999px 0 0); opacity: 0; }
  30% { opacity: 1; }
  to { clip-path: inset(-8px -8px -8px -8px round 999px 999px 10px 10px); }
}
@keyframes rs-rim-sheen { from { background-position: 220% 0; } to { background-position: -120% 0; } }
@keyframes rs-year-weight { from { font-weight: 440; } }

/* the NEW tag and the centum note: one sheen pass after they come into view (fame.js adds .is-sheen) */
.new-tag.is-sheen, .rs26-note.is-sheen {
  background-image: linear-gradient(105deg, rgba(255, 255, 255, 0) 38%, rgba(255, 255, 255, 0.8) 50%, rgba(255, 255, 255, 0) 62%);
  background-repeat: no-repeat;
  background-size: 300% 100%;
  background-position: 160% 0;
  animation: rs-sheen 900ms var(--ease) 1200ms 1 both;
}
.rs26-note.is-sheen { background-image: linear-gradient(105deg, rgba(235, 203, 138, 0) 38%, rgba(235, 203, 138, 0.5) 50%, rgba(235, 203, 138, 0) 62%); animation-delay: 700ms; }
@keyframes rs-sheen { from { background-position: 160% 0; } to { background-position: -60% 0; } }

/* ---------- Results: at a glance ----------
   The row under the pointer gets a brass rule on its left and a faint warm ground.
   The warm ground is a brass shade laid inside the cell (an inset shadow), so box-shadow is the
   only thing that moves. The cell's own ground follows the evening light (--eve); a transition
   on it started again in sixty cells at every step of that light, all the way down the page. */
.rs-ledger { position: relative; }
.rs-table tbody tr > * { box-shadow: inset 0 0 0 100vmax rgba(210, 162, 76, 0); transition: box-shadow var(--t-ui, 220ms) var(--ease); }
.rs-table tbody tr > th { box-shadow: inset 2px 0 0 rgba(210, 162, 76, 0), inset 0 0 0 100vmax rgba(210, 162, 76, 0); }
.rs-table tbody tr.rs-now > th { box-shadow: inset 3px 0 0 var(--brass), inset 0 0 0 100vmax rgba(210, 162, 76, 0); }
.rs-table tbody tr:hover > * { box-shadow: inset 0 0 0 100vmax rgba(210, 162, 76, 0.1); }
.rs-table tbody tr:hover > th { box-shadow: inset 2px 0 0 var(--brass), inset 0 0 0 100vmax rgba(210, 162, 76, 0.1); }
.rs-table tbody tr.rs-now:hover > th { box-shadow: inset 3px 0 0 var(--brass), inset 0 0 0 100vmax rgba(210, 162, 76, 0.1); }

/* ---------- Press ---------- */
.rs-press-link svg { transition: translate 180ms var(--ease); }
.rs-press-link:hover svg, .rs-press-link:focus-visible svg { translate: 3px -3px; }

/* ---------- Results 2026: the niche ----------
   The arch that holds the "4" is a lamp niche: a brass light rises inside it from
   the base, once, from the first paint. The numeral is there from the first frame. */
.rs26-four-num {
  background:
    radial-gradient(60% 50% at 50% 44%, rgba(255, 199, 44, 0.2), rgba(255, 199, 44, 0) 70%),
    radial-gradient(120% 78% at 50% 100%, rgba(235, 203, 138, 0.3), rgba(235, 203, 138, 0) 72%) 50% 100% / 100% 100% no-repeat,
    rgba(238, 240, 246, 0.04);
}
@media (prefers-reduced-motion: no-preference) {
  .rs26-four-num { animation: rs26-niche var(--t-arrive, 1100ms) var(--ease-rise, ease-out) 200ms backwards; }
}
@keyframes rs26-niche {
  from { background-size: auto, 100% 0%, auto; color: #a8905f; text-shadow: 0 0 0 rgba(255, 199, 44, 0); }
}
/* the words of the title already set in brass get the numeral glow */
.rs26-hero h1 .gold { text-shadow: var(--kb-glow, none); }

/* the lit figure of the strip carries the brass-to-yellow rule of the class ledgers */
.rs26-stat[data-kb-rule] { position: relative; }
.rs26-stat[data-kb-rule]::before {
  content: "";
  position: absolute;
  left: 22px;
  top: -1px;
  width: 56px;
  height: 2px;
  background: linear-gradient(90deg, var(--brass), var(--bus));
}
@media (max-width: 519px) { .rs26-stat[data-kb-rule]::before { left: 12px; } }

/* ---------- Results 2026: the halo ----------
   The lead achiever's arch is held in a ring of brass, bus yellow and mist.
   The ring turns once in 12 s when the portrait comes into view (fame.js adds
   .is-turning), then rests. The photo itself is untouched. */
@property --rs-a { syntax: "<angle>"; inherits: false; initial-value: 0deg; }
.kb-halo {
  position: relative;
  display: block;
  justify-self: center;
  width: min(100%, 280px);
  border-radius: 999px 999px var(--radius) var(--radius);
  isolation: isolate;
}
.kb-halo > .rs26-lead-photo { display: block; width: 100%; outline-color: transparent; }
.kb-halo::before, .kb-halo::after {
  content: "";
  position: absolute;
  inset: -11px;
  padding: 2px;
  border-radius: 999px 999px calc(var(--radius) + 11px) calc(var(--radius) + 11px);
  background: conic-gradient(from var(--rs-a), #d2a24c, #ffc72c, #edeff5, #d2a24c);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
  pointer-events: none;
}
/* a soft copy behind the ring, for bloom */
.kb-halo::after { z-index: -1; inset: -13px; padding: 6px; filter: blur(9px); opacity: calc(0.55 * var(--lamp, 0.55)); }
@media (prefers-reduced-motion: no-preference) {
  .kb-halo.is-turning::before, .kb-halo.is-turning::after { animation: rs26-halo 12s cubic-bezier(0.45, 0, 0.2, 1) 1; }
  .kb-halo.can-burst > .rs26-lead-photo { cursor: pointer; }
}
@keyframes rs26-halo { to { --rs-a: 360deg; } }
/* the petals of the one celebration fall over the whole card (fame.js) */
.rs26-lead { position: relative; }
.rs26-petals { position: absolute; inset: -40px 0 0; pointer-events: none; }
@media (max-width: 720px) { .kb-halo { width: min(78%, 240px); } .kb-halo > .rs26-lead-photo { width: 100%; } }

@media print {
  .kb-halo::after, .rank-top10 .rs-portrait::after { display: none !important; }
  .rs-figure--lead .rs-fig-num, .rs26-four-num, .rs-portrait { animation: none !important; clip-path: none !important; }
}

/* cards arrive in rank order, 70 ms apart, and the count starts again on every row
   (the engine numbers the cards of a grid straight through; --i is set per row here) */
@media (min-width: 721px) {
  .rs-grid > :nth-child(4n + 1) { --i: 0 !important; }
  .rs-grid > :nth-child(4n + 2) { --i: 1 !important; }
  .rs-grid > :nth-child(4n + 3) { --i: 2 !important; }
  .rs-grid > :nth-child(4n) { --i: 3 !important; }
}
@media (max-width: 720px) {
  .rs-session--lead .rs-grid > :nth-child(odd) { --i: 0 !important; }
  .rs-session--lead .rs-grid > :nth-child(even) { --i: 1 !important; }
  /* older sessions are one card to a row on phones: no wait */
  .rs-session--rows .rs-grid > * { --i: 0 !important; }
}

/* ---------- Print: black on white, every number final ---------- */
@media print {
  /* a number that has not rolled yet prints as its real text, never as the rolling copy */
  .kbfx-sr.kbfx-sr { position: static !important; width: auto; height: auto; margin: 0; overflow: visible; clip: auto; }
  .kbfx-sr + [aria-hidden="true"] { display: none !important; }
  .rs-hero :is(h1, p, span), .rs26-hero :is(h1, p, span, a), .rs-hall :is(h2, h3, p, span), .rs26-achievers :is(h2, h3, p, span),
  .rs-legacy :is(h2, p, span, strong), .rs26-closing :is(h2, p), .rs-cta :is(h2, p) { color: #000 !important; text-shadow: none !important; }
  .rs26-four-num { background: none !important; border-color: #999; outline-color: transparent; }
  .rs-medal, .rank-top10 .rs-medal, .rs-pill, .pill, .rs-chip, .new-tag, .rs26-note {
    background: #fff !important;
    color: #000 !important;
    border: 1px solid #999;
    box-shadow: none !important;
  }
  .rs-portrait, .rs26-lead-photo { outline-color: #999; box-shadow: none; }
  .kb-halo::before { background: #999; }
}

/* a number that did not roll (it was on the first screen, or motion is off) carries the same glow */
[data-kb-roll]:not([data-kb-odo]) { text-shadow: var(--kb-glow, none); }
/* a number that has rolled: its glow comes up once, as an animation, and no transition stays on it.
   The glow follows the evening light (--lamp), so a transition would start again at every step of it. */
[data-kb-roll][data-kb-odo] { transition: none; }
@media (prefers-reduced-motion: no-preference) {
  [data-kb-roll][data-kb-odo].is-rolled { animation: rs-glow-in 400ms ease backwards; }
}
@keyframes rs-glow-in { from { text-shadow: 0 0 0 transparent; } }

/* Results title band: main.js swaps the long headline for its short one ("Board Results &
   Merit List"). The shared sheet keeps those lines out of sight until then; here their boxes
   are held at the size the final wording takes (--hl and --pl lines), so the band does not
   shrink when it lands. If the script is very late the hold and the shared sheet's "show
   anyway" let go together after 5 s; with scripts off nothing is held or hidden. */
.page-results .rs-hero { --hl: 2; --pl: 1; }
@media (max-width: 559.98px) { .page-results .rs-hero { --pl: 2; } }
@media (min-width: 640px) and (max-width: 723.98px) { .page-results .rs-hero { --hl: 1; } }
@media (min-width: 960px) and (max-width: 1227.98px) { .page-results .rs-hero { --pl: 2; } }
html.c-js:not(.c-live) .page-results .rs-hero-copy .kicker { animation-delay: 5s; }
html.c-js:not(.c-live) .page-results .rs-hero-copy h1 { animation: c-safe 0s linear 5s forwards, rs-hold-h 5s step-end; }
html.c-js:not(.c-live) .page-results .rs-hero-copy h1 + p { animation: c-safe 0s linear 5s forwards, rs-hold-p 5s step-end; }
@keyframes rs-hold-h { from { max-height: calc(var(--hl) * 1lh); overflow: clip; } }
@keyframes rs-hold-p { from { max-height: calc(var(--pl) * 1lh); overflow: clip; } }
/* "Class 10 & 12, 2026" fits its column in Mukta but is 9% wider in the stand-in font, so on
   phones it wrapped to a third line until the font arrived and the band then shrank by a
   line. From 384px up (where the real font fits) the label keeps its two lines. */
@media (min-width: 384px) { .page-results .rs-figure:nth-child(2) .rs-fig-label { white-space: nowrap; } }
