/* ============================================================
   SkinSignal / the landing's rank ladder section
   index.html #rankLadder. The hero (copy, the real Immortal emblem in
   a CSS room, where a rank shows) on the left; the full thirty-tier
   ladder on the right; the three-step loop underneath.
   js/rank-ladder.js builds the ladder from js/ranks.js.

   RANK IS THE FLEX. Real emblems, shown whole (contain, never cropped
   or stretched), on near black with a restrained blue and gold light.
   The room around Immortal is suggested, not painted: faint vertical
   lines, a floor light, a vignette and a few specks of gold.
   ============================================================ */

.rk {
  --rk-bg: #05080d;
  --rk-gold: #e4ae39;
  --rk-blue: #6a9fff;
  --rk-ink: #f1f3f6;
  --rk-ink-2: #b9bfca;
  --rk-ink-3: #8a919e;
  --rk-line: rgba(96, 140, 220, 0.15);
  --pad: clamp(20px, 3.8vw, 76px);

  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding: clamp(64px, 6vw, 112px) 0 clamp(56px, 5vw, 96px);
  background:
    radial-gradient(34% 44% at 44% 26%, rgba(61, 127, 255, var(--amb-blue, 0.08)), rgba(61, 127, 255, 0) 70%),
    radial-gradient(28% 36% at 44% 52%, rgba(228, 174, 57, var(--amb-gold, 0.07)), rgba(228, 174, 57, 0) 70%),
    var(--rk-bg);
  border-top: 1px solid rgba(255, 255, 255, 0.04);
}

.rk__inner { padding: 0 var(--pad); }

.rk__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(0, 0.85fr);
  gap: clamp(20px, 2vw, 36px);
  align-items: stretch;
}

/* ============================================================
   THE HERO
   ============================================================ */
.rk__hero {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: clamp(24px, 2.4vw, 44px);
}

.rk__copy { position: relative; z-index: 3; width: 47%; }

.rk__eyebrow {
  margin: 0 0 clamp(14px, 1.2vw, 20px);
  font-family: var(--font-display);
  font-stretch: 100%;
  font-weight: 600;
  font-size: clamp(12px, 0.8vw, 15px);
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--rk-blue);
}
.rk__eyebrow span { margin: 0 0.5em; color: var(--rk-ink-3); }

.rk__title {
  margin: 0;
  font-family: var(--font-display);
  font-stretch: 88%;
  font-weight: 800;
  font-size: clamp(42px, 4.2vw, 86px);
  line-height: 0.94;
  letter-spacing: -0.02em;
  text-transform: uppercase;
  color: var(--rk-ink);
}
.rk__line { display: block; white-space: nowrap; }
.rk__line--gold {
  color: var(--rk-gold);
  background: linear-gradient(180deg, #f6d27a 0%, #e8b544 52%, #c98a1c 100%);
  -webkit-background-clip: text;
          background-clip: text;
  -webkit-text-fill-color: transparent;
}

.rk__body {
  margin: clamp(16px, 1.4vw, 24px) 0 clamp(20px, 1.6vw, 28px);
  max-width: 500px;
  font-family: var(--font-body);
  font-size: clamp(15px, 1vw, 19px);
  line-height: 1.55;
  color: var(--rk-ink-2);
}

.rk__points {
  display: flex;
  flex-wrap: wrap;
  gap: 14px clamp(18px, 1.6vw, 30px);
  margin: 0 0 clamp(22px, 2vw, 34px);
  padding: 0;
  list-style: none;
  font-family: var(--font-body);
  font-size: clamp(12.5px, 0.74vw, 14px);
  line-height: 1.35;
  color: #c5cad3;
}
.rk__points li { display: flex; align-items: center; gap: 10px; }
.rk__points svg {
  flex: none;
  width: 26px;
  height: 26px;
  fill: none;
  stroke: var(--rk-gold);
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Outranks .cta--lg in css/buttons.css, which loads last. */
.rk .rk__cta {
  height: clamp(52px, 3.2vw, 60px);
  padding: 0 clamp(24px, 1.6vw, 30px);
  font-size: clamp(15px, 0.95vw, 17px);
}

/* ---------- The stage: Immortal in a suggested room ---------- */
.rk__stage {
  position: absolute;
  z-index: 1;
  top: calc(clamp(64px, 6vw, 112px) * -0.6);
  right: -3%;
  width: 58%;
  height: 84%;
}

/* Faint vertical architecture, fading out to every side, and a
   vignette so the room closes in on the emblem. */
.rk__env {
  position: absolute;
  inset: 0;
  background:
    repeating-linear-gradient(90deg, rgba(130, 160, 220, 0.07) 0 1px, rgba(130, 160, 220, 0) 1px 72px),
    linear-gradient(180deg, rgba(10, 16, 28, 0.6) 0%, rgba(10, 16, 28, 0) 40%);
  -webkit-mask-image: radial-gradient(56% 58% at 50% 42%, #000 30%, transparent 100%);
          mask-image: radial-gradient(56% 58% at 50% 42%, #000 30%, transparent 100%);
}

/* The floor light: a soft ellipse where the emblem would stand, with
   one bright hairline for a horizon. */
.rk__floor {
  position: absolute;
  left: 8%;
  right: 8%;
  bottom: 8%;
  height: 26%;
  background:
    radial-gradient(50% 42% at 50% 30%, rgba(228, 174, 57, 0.16), rgba(228, 174, 57, 0) 75%),
    radial-gradient(60% 50% at 50% 40%, rgba(61, 127, 255, 0.1), rgba(61, 127, 255, 0) 80%),
    linear-gradient(90deg, rgba(228, 174, 57, 0), rgba(228, 174, 57, 0.28) 50%, rgba(228, 174, 57, 0)) 50% 30% / 70% 1px no-repeat;
}

/* The light behind Immortal: blue with a gold heart. */
.rk__glow {
  position: absolute;
  left: 50%;
  top: 34%;
  width: 70%;
  aspect-ratio: 1 / 1;
  translate: -50% -50%;
  background:
    radial-gradient(closest-side, rgba(228, 174, 57, 0.2), rgba(228, 174, 57, 0.06) 45%, rgba(228, 174, 57, 0) 70%),
    radial-gradient(closest-side, rgba(76, 141, 255, 0.24), rgba(76, 141, 255, 0) 100%);
  filter: blur(10px);
  opacity: 0.9;
}

/* A few specks of gold, still. */
.rk__motes i {
  position: absolute;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: rgba(246, 210, 122, 0.8);
  box-shadow: 0 0 6px rgba(246, 210, 122, 0.6);
}
.rk__motes i:nth-child(1) { left: 18%; top: 22%; opacity: 0.5; }
.rk__motes i:nth-child(2) { left: 80%; top: 16%; opacity: 0.4; width: 2px; height: 2px; }
.rk__motes i:nth-child(3) { left: 26%; top: 52%; opacity: 0.35; }
.rk__motes i:nth-child(4) { left: 74%; top: 46%; opacity: 0.55; width: 2px; height: 2px; }
.rk__motes i:nth-child(5) { left: 62%; top: 8%; opacity: 0.3; }
.rk__motes i:nth-child(6) { left: 36%; top: 12%; opacity: 0.4; width: 2px; height: 2px; }
.rk__motes i:nth-child(7) { left: 88%; top: 60%; opacity: 0.3; }

.rk__immortal {
  position: absolute;
  left: 50%;
  top: 3%;
  z-index: 1;
  width: 66%;
  aspect-ratio: 1 / 1;
  translate: -50% 0;
}
.rk__immortal img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 24px 40px rgba(0, 0, 0, 0.7));
}

/* The nameplate: a raised panel with a gold hairline. No price. */
.rk__plate {
  position: absolute;
  left: 50%;
  top: 67%;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  margin: 0;
  padding: clamp(10px, 0.8vw, 14px) clamp(24px, 2vw, 38px);
  translate: -50% 0;
  border: 1px solid rgba(228, 174, 57, 0.55);
  border-radius: 8px;
  background: linear-gradient(180deg, #151d2c 0%, #0b1019 100%);
  box-shadow: 0 18px 40px -16px rgba(0, 0, 0, 0.95), 0 0 30px -10px rgba(228, 174, 57, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.05);
  white-space: nowrap;
}
.rk__plate-name {
  font-family: var(--font-display);
  font-stretch: 100%;
  font-weight: 700;
  font-size: clamp(20px, 1.5vw, 30px);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--rk-ink);
}
.rk__plate-tier {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-display);
  font-stretch: 100%;
  font-weight: 600;
  font-size: clamp(10.5px, 0.66vw, 12.5px);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--rk-gold);
}
.rk__plate-tier svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linejoin: round; }

/* ---------- Where a rank shows ---------- */
.rk__everywhere {
  position: relative;
  z-index: 3;
  width: 70%;
  padding: clamp(14px, 1.1vw, 20px);
  border: 1px solid rgba(96, 140, 220, 0.24);
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(14, 22, 38, 0.92) 0%, rgba(8, 13, 22, 0.94) 100%);
  box-shadow: 0 30px 60px -30px rgba(0, 0, 0, 0.9);
}
.rk__ev-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 0 0 clamp(12px, 0.9vw, 16px);
}
.rk__ev-title {
  font-family: var(--font-display);
  font-stretch: 100%;
  font-weight: 700;
  font-size: clamp(11.5px, 0.74vw, 14px);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--rk-gold);
}
.rk-example {
  padding: 2px 7px;
  border: 1px solid rgba(217, 200, 160, 0.3);
  border-radius: 4px;
  font-family: var(--font-display);
  font-stretch: 100%;
  font-weight: 600;
  font-size: 9.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #d9c8a0;
}

.rk__ev-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(8px, 0.7vw, 12px);
}
.rk-ev { margin: 0; min-width: 0; }
.rk-ev figcaption {
  margin-top: 8px;
  font-family: var(--font-body);
  font-size: 12px;
  text-align: center;
  color: var(--rk-ink-3);
}
.rk-ev__box {
  margin: 0;
  padding: 10px;
  min-height: clamp(118px, 7.4vw, 138px);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 9px;
  background: #0a101a;
  list-style: none;
}

/* The pictures in the previews: every one whole. */
.rk-ev picture,
.rk-ev img { display: block; width: 100%; height: 100%; object-fit: contain; }

.rk-ev__id { display: flex; align-items: center; gap: 9px; margin-bottom: 9px; }
.rk-ev__avatar {
  flex: none;
  width: 38px;
  height: 38px;
  padding: 2px;
  border: 1px solid rgba(120, 172, 255, 0.5);
  border-radius: 50%;
  background: #0b0e14;
}
.rk-ev__who { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.rk-ev__name {
  display: flex;
  align-items: center;
  gap: 5px;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 13px;
  color: var(--rk-ink);
  white-space: nowrap;
}
.rk-ev__member {
  padding: 1px 4px;
  border-radius: 3px;
  font-weight: 600;
  font-size: 8.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #0a1020;
  background: linear-gradient(180deg, #7eacff 0%, #4c8dff 100%);
}
.rk-ev__rank { display: flex; align-items: center; gap: 4px; font-family: var(--font-body); font-size: 10.5px; color: var(--rk-ink-3); white-space: nowrap; }
.rk-ev__mini { flex: none; width: 13px; height: 13px; }
.rk-ev__card {
  display: block;
  aspect-ratio: 3 / 1;
  border: 1px solid rgba(240, 180, 41, 0.6);
  border-radius: 4px;
  overflow: hidden;
  background: #0b0e14;
}

.rk-ev__board li,
.rk-ev__trades li {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 32px;
  padding: 0 6px;
  border-radius: 5px;
}
.rk-ev__board li + li,
.rk-ev__trades li + li { margin-top: 4px; }
.rk-ev__board li { background: rgba(255, 255, 255, 0.02); }
.rk-ev__board li.is-you { background: rgba(228, 174, 57, 0.08); box-shadow: inset 2px 0 0 var(--rk-gold); }
.rk-ev__pos {
  flex: none;
  width: 22px;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-weight: 500;
  font-size: 12px;
  color: var(--rk-ink-2);
}
.is-you .rk-ev__pos { color: var(--rk-gold); }
.rk-ev__em { flex: none; width: 26px; height: 26px; }
.rk-ev__em--sm { width: 20px; height: 20px; margin-left: auto; }
.rk-ev__item { flex: none; width: 38px; height: 26px; }
.rk-ev__item img { object-fit: cover; filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.5)); }
.rk-ev__trades li { background: rgba(255, 255, 255, 0.02); }
.rk-ev__trades li:nth-child(2) { box-shadow: inset 2px 0 0 rgba(76, 141, 255, 0.8); }

/* The name and value slots are blanks on purpose: no figures. */
.rk-ev__bars { display: flex; flex-direction: column; gap: 4px; flex: 1 1 auto; min-width: 0; }
.rk-ev__bars i { display: block; height: 4px; border-radius: 2px; background: rgba(255, 255, 255, 0.12); }
.rk-ev__bars i:first-child { width: 78%; }
.rk-ev__bars i:last-child { width: 48%; background: rgba(255, 255, 255, 0.07); }
.rk-ev__bars b {
  font-family: var(--font-display);
  font-stretch: 100%;
  font-weight: 700;
  font-size: 9.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--rk-gold);
}

/* ============================================================
   THE LADDER
   ============================================================ */
.rk__ladder {
  display: flex;
  flex-direction: column;
  padding: clamp(14px, 1.1vw, 20px);
  border: 1px solid rgba(96, 140, 220, 0.24);
  border-radius: 14px;
  background: linear-gradient(180deg, #0c1320 0%, #080d16 100%);
  box-shadow: 0 44px 90px -40px rgba(0, 0, 0, 0.9), inset 0 1px 0 rgba(255, 255, 255, 0.03);
}
.rk__ladder-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin: 2px 4px clamp(12px, 0.9vw, 16px);
}
.rk__ladder-title {
  font-family: var(--font-display);
  font-stretch: 100%;
  font-weight: 700;
  font-size: clamp(11.5px, 0.76vw, 14px);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--rk-ink);
}
.rk__ladder-hint { font-family: var(--font-body); font-size: 11.5px; color: var(--rk-ink-3); white-space: nowrap; }

.rk__bands { display: flex; flex-direction: column; gap: clamp(8px, 0.6vw, 10px); flex: 1 1 auto; }

.rk-band {
  display: grid;
  grid-template-columns: clamp(58px, 4vw, 76px) minmax(0, 1fr);
  align-items: center;
  flex: 1 1 auto;
  padding: clamp(8px, 0.6vw, 12px) clamp(8px, 0.6vw, 12px) clamp(8px, 0.6vw, 12px) clamp(12px, 0.9vw, 16px);
  border: 1px solid var(--rk-line);
  border-radius: 10px;
  background: linear-gradient(180deg, rgba(20, 30, 50, 0.45) 0%, rgba(12, 18, 30, 0.45) 100%);
}
.rk-band--top { border-color: rgba(228, 174, 57, 0.22); }
.rk-band__label {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin: 0;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-weight: 500;
  font-size: clamp(11.5px, 0.74vw, 14px);
  color: var(--rk-ink);
  white-space: nowrap;
}
.rk-band__label span {
  font-family: var(--font-display);
  font-stretch: 100%;
  font-weight: 600;
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--rk-ink-3);
}

.rk-band__row {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 4px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.rk-cell {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 6px 2px 4px;
  border-radius: 8px;
  text-decoration: none;
  transition: background-color var(--hover-dur, 200ms) ease, translate var(--hover-dur, 200ms) var(--ease);
}
.rk-cell__em {
  display: block;
  width: clamp(46px, 3.3vw, 66px);
  height: clamp(46px, 3.3vw, 66px);
}
.rk-cell__em picture,
.rk-cell__em img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.55));
}
.rk-band--top .rk-cell__em img { filter: drop-shadow(0 4px 10px rgba(228, 174, 57, 0.28)); }
/* The name is the rank: never cut short. Long ones (Diamond Hands,
   Exit Liquidity) tighten, then take a second line. */
.rk-cell__name {
  max-width: 100%;
  min-height: 2.4em;
  font-family: var(--font-display);
  font-stretch: 94%;
  font-weight: 700;
  font-size: clamp(9px, 0.56vw, 11px);
  letter-spacing: 0.03em;
  line-height: 1.2;
  text-align: center;
  text-transform: uppercase;
  overflow-wrap: anywhere;
  color: #c9d2e3;
  transition: color 200ms ease;
}
.rk-cell:hover,
.rk-cell:focus-visible { background: rgba(120, 160, 230, 0.07); translate: 0 var(--hover-lift, -2px); }
.rk-cell:hover .rk-cell__name,
.rk-cell:focus-visible .rk-cell__name { color: #ffffff; }
.rk-cell:focus-visible { outline: 2px solid rgba(118, 166, 255, 0.85); outline-offset: 1px; }

/* ============================================================
   THE LOOP
   ============================================================ */
.rk__steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: clamp(20px, 1.8vw, 32px) 0 0;
  padding: 0;
  list-style: none;
  border: 1px solid var(--rk-line);
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(14, 22, 38, 0.6) 0%, rgba(8, 13, 22, 0.6) 100%);
}
.rk-step {
  position: relative;
  display: flex;
  align-items: center;
  gap: clamp(14px, 1.2vw, 22px);
  padding: clamp(16px, 1.3vw, 24px) clamp(20px, 1.8vw, 34px);
}
.rk-step + .rk-step { border-left: 1px solid rgba(255, 255, 255, 0.05); }
/* The arrow between steps. */
.rk-step:not(:last-child)::after {
  content: "";
  position: absolute;
  right: clamp(16px, 1.4vw, 28px);
  top: 50%;
  width: 18px;
  height: 18px;
  translate: 0 -50%;
  background: rgba(106, 159, 255, 0.8);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M2.5 8h10M9 4.5 12.5 8 9 11.5' fill='none' stroke='%23000' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M2.5 8h10M9 4.5 12.5 8 9 11.5' fill='none' stroke='%23000' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
}
.rk-step__n {
  font-family: var(--font-display);
  font-stretch: 100%;
  font-weight: 600;
  font-size: clamp(20px, 1.4vw, 26px);
  color: var(--rk-ink-3);
}
.rk-step__icon {
  flex: none;
  width: clamp(30px, 2.2vw, 40px);
  height: clamp(30px, 2.2vw, 40px);
  fill: none;
  stroke: var(--rk-gold);
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.rk-step__text {
  max-width: 330px;
  padding-right: 34px;
  font-family: var(--font-body);
  font-size: clamp(12.5px, 0.78vw, 14.5px);
  line-height: 1.5;
  color: var(--rk-ink-2);
}
.rk-step__text b {
  display: block;
  margin-bottom: 6px;
  font-family: var(--font-display);
  font-stretch: 100%;
  font-weight: 700;
  font-size: clamp(12px, 0.8vw, 15px);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--rk-ink);
}

/* ============================================================
   MOTION, only when asked for (js/rank-ladder.js arms it)
   ============================================================ */
@media (prefers-reduced-motion: no-preference) {
  .rk__glow { animation: rkLight 13s ease-in-out infinite alternate; }

  .rk.is-armed .rk__copy,
  .rk.is-armed .rk__everywhere,
  .rk.is-armed .rk__steps { opacity: 0; translate: 0 var(--reveal-rise, 12px); }
  .rk.is-armed .rk__immortal { opacity: 0; scale: 0.94; }
  .rk.is-armed .rk-band { opacity: 0; translate: 0 var(--reveal-rise-sm, 8px); }

  .rk.is-in .rk__copy,
  .rk.is-in .rk__everywhere,
  .rk.is-in .rk__steps {
    opacity: 1;
    translate: 0 0;
    transition: opacity var(--reveal-fade, 550ms) ease, translate var(--reveal-dur, 650ms) var(--ease);
  }
  .rk.is-in .rk__everywhere { transition-delay: 300ms; }
  .rk.is-in .rk__steps { transition-delay: 460ms; }
  .rk.is-in .rk__immortal {
    opacity: 1;
    scale: 1;
    transition: opacity var(--reveal-fade, 550ms) ease 120ms, scale var(--reveal-dur, 650ms) var(--ease) 120ms;
  }
  .rk.is-in .rk-band {
    opacity: 1;
    translate: 0 0;
    transition: opacity var(--reveal-fade-sm, 420ms) ease, translate var(--reveal-dur-sm, 480ms) var(--ease);
    transition-delay: calc(200ms + var(--b, 0) * 40ms);
  }
}

@keyframes rkLight {
  from { opacity: 0.78; scale: 0.97; }
  to   { opacity: 1;    scale: 1.04; }
}

/* ============================================================
   NARROWER SCREENS
   ============================================================ */
@media (max-width: 1449px) {
  .rk__grid { grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); }
  .rk__copy { width: 54%; }
  .rk__title { font-size: clamp(38px, 4vw, 60px); }
  .rk__stage { width: 50%; height: 70%; right: -4%; }
  .rk__immortal { width: 66%; }
  .rk__everywhere { width: 100%; }
  .rk__eyebrow { letter-spacing: 0.18em; }
  /* The preview boxes are narrow here: the rank line wraps rather than
     being cut. */
  .rk-ev__rank { white-space: normal; flex-wrap: wrap; line-height: 1.3; }
}

/* STACKED: headline and copy, Immortal, the whole ladder, where a rank
   shows, the loop. All thirty ranks stay on the page. */
@media (max-width: 999px) {
  .rk__grid { grid-template-columns: minmax(0, 1fr); }
  .rk__hero { gap: 0; }
  .rk__copy { width: auto; max-width: 640px; }
  .rk__line { white-space: normal; }
  .rk__title { font-size: clamp(38px, 8vw, 60px); }
  .rk__stage {
    position: relative;
    top: auto;
    right: auto;
    order: 2;
    width: 100%;
    height: clamp(320px, 72vw, 500px);
    margin: 12px 0 8px;
  }
  .rk__immortal { width: min(62%, 340px); }
  .rk__plate { top: auto; bottom: 6%; }
  .rk__everywhere { order: 4; margin-top: 20px; }
  .rk__ladder { order: 3; }
  .rk__steps { grid-template-columns: minmax(0, 1fr); }
  .rk-step + .rk-step { border-left: 0; border-top: 1px solid rgba(255, 255, 255, 0.05); }
  .rk-step:not(:last-child)::after { right: auto; left: 50%; top: auto; bottom: -9px; translate: -50% 0; rotate: 90deg; }
}

/* The hero's parts join the grid's flow when stacked, so the ladder
   can sit between Immortal and the previews. */
@media (max-width: 999px) {
  .rk__grid { display: flex; flex-direction: column; }
  .rk__hero { display: contents; }
  .rk__copy { order: 1; }
}

/* PHONES: the bands stack their label over the row; the five-across
   grid stays, the emblems about 48px. */
@media (max-width: 639px) {
  .rk-band { grid-template-columns: minmax(0, 1fr); row-gap: 8px; padding: 10px; }
  .rk-band__label { flex-direction: row; gap: 8px; align-items: baseline; }
  .rk-cell__em { width: clamp(44px, 12vw, 52px); height: clamp(44px, 12vw, 52px); }
  .rk-cell__name { font-size: 8.5px; letter-spacing: 0.01em; }
  .rk__ladder-head { flex-direction: column; gap: 4px; }
  .rk__ev-grid { grid-template-columns: minmax(0, 1fr); }
  .rk__everywhere { padding: 12px; }
}

@media (prefers-reduced-motion: reduce) {
  .rk__glow { animation: none; }
  .rk__copy, .rk__everywhere, .rk__steps, .rk__immortal, .rk-band, .rk-cell { transition: none; }
  .rk-cell:hover, .rk-cell:focus-visible { translate: none; }
}
