/* RoyaltyTube.
 *
 * A committed dark identity, and a deliberately DIFFERENT one from
 * MillionaireTube's. The two sites sit in the same family and must not be
 * mistaken for each other: MillionaireTube is warm brass on near-black — a
 * struck medal for one achievement. RoyaltyTube is cool indigo with a pale
 * platinum accent — an institution, a standing, something held rather than won
 * once. Same restraint in both: one accent, used on the thing that was earned
 * and nothing else. No crowns scattered about, no purple velvet, no heraldry.
 *
 * Nothing here is shared with mt.css or public/app/app.css. Each Hosting site
 * serves only its own root, so a shared stylesheet is not merely undesirable —
 * it is unreachable. See README.md.
 */

:root {
  /* Canvas. Blue-shifted near-black, distinct at a glance from MT's neutral. */
  --rt-bg:            #0a0c14;
  --rt-bg-raised:     #12151f;
  --rt-bg-sunk:       #070911;
  --rt-line:          #232739;
  --rt-line-strong:   #343a52;

  --rt-text:          #eef0f6;
  --rt-text-dim:      #a2a8bd;
  --rt-text-faint:    #6c7288;

  /* The one accent. Pale platinum with a cool cast — reads as sterling rather
   * than as gold, which is the whole distinction from MillionaireTube. */
  --rt-accent:        #b9c4e0;
  --rt-accent-bright: #dfe6f7;
  --rt-accent-deep:   #7f8db4;
  --rt-accent-sunk:   rgba(185, 196, 224, 0.12);

  --rt-radius:        14px;
  --rt-radius-sm:     9px;
  --rt-maxw:          1180px;

  --rt-focus:         0 0 0 2px var(--rt-bg), 0 0 0 4px var(--rt-accent-bright);

  --rt-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
             "Helvetica Neue", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

/* The `hidden` attribute must win. Every `display:` rule below outranks the
 * user agent's `[hidden] { display: none }` on specificity alone — the exact
 * bug that left MillionaireTube's Username field on screen in sign-in mode. */
[hidden] { display: none !important; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--rt-bg);
  color: var(--rt-text);
  font-family: var(--rt-sans);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  /* Every number here is compared against another number. Tabular figures stop
   * them jittering between renders. */
  font-variant-numeric: tabular-nums;
}

img { max-width: 100%; display: block; }
a { color: inherit; }

:focus-visible { outline: none; box-shadow: var(--rt-focus); border-radius: 6px; }

.rt-skip {
  position: absolute; left: -9999px; top: 0;
  background: var(--rt-accent); color: #0a0c14;
  padding: .7rem 1.1rem; font-weight: 650; z-index: 100;
}
.rt-skip:focus { left: 8px; top: 8px; }

.rt-shell { display: flex; flex-direction: column; min-height: 100vh; }
.rt-main { flex: 1; }
.rt-wrap { max-width: var(--rt-maxw); margin: 0 auto; padding: 0 clamp(1rem, 4vw, 2rem); }

/* ---- header --------------------------------------------------------------- */

.rt-header {
  position: sticky; top: 0; z-index: 40;
  background: rgba(10, 12, 20, 0.86);
  backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid var(--rt-line);
}

.rt-header__inner {
  max-width: var(--rt-maxw); margin: 0 auto;
  padding: .7rem clamp(1rem, 4vw, 2rem);
  display: flex; align-items: center; gap: 1rem;
}

.rt-logo {
  display: inline-flex; align-items: center; gap: .55rem;
  text-decoration: none; font-weight: 700; letter-spacing: -0.02em;
  font-size: 1.06rem; color: var(--rt-text); flex: 0 0 auto;
}
.rt-logo__mark { color: var(--rt-accent); display: inline-flex; }
.rt-logo__tube { color: var(--rt-accent); }

.rt-nav {
  margin-left: auto; display: flex; align-items: center;
  gap: clamp(.35rem, 1.6vw, 1.15rem);
}

.rt-nav__link {
  text-decoration: none; color: var(--rt-text-dim);
  font-size: .93rem; font-weight: 520; padding: .45rem .1rem;
  border-bottom: 2px solid transparent; white-space: nowrap;
  transition: color .15s ease, border-color .15s ease;
}
.rt-nav__link:hover { color: var(--rt-text); }
.rt-nav__link.is-active { color: var(--rt-text); border-bottom-color: var(--rt-accent); }

.rt-nav__auth { display: inline-flex; align-items: center; gap: .5rem; margin-left: .4rem; }

.rt-nav__pending {
  width: 74px; height: 32px; border-radius: 999px;
  background: var(--rt-bg-raised); animation: rt-pulse 1.4s ease-in-out infinite;
}

.rt-nav__number { font-size: .78rem; font-weight: 650; color: var(--rt-accent); letter-spacing: .02em; }

.rt-nav__toggle { display: none; }

/* ---- buttons -------------------------------------------------------------- */

.rt-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  padding: .62rem 1.1rem; border-radius: 999px; border: 1px solid transparent;
  font: inherit; font-size: .92rem; font-weight: 600; line-height: 1;
  text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: background .15s ease, border-color .15s ease, color .15s ease, transform .1s ease;
}
.rt-btn:active { transform: translateY(1px); }
.rt-btn[disabled], .rt-btn[aria-disabled="true"] { opacity: .5; cursor: not-allowed; transform: none; }

.rt-btn--solid { background: var(--rt-accent); color: #0a0c14; }
.rt-btn--solid:hover:not([disabled]) { background: var(--rt-accent-bright); }

.rt-btn--ghost { background: transparent; color: var(--rt-text); border-color: var(--rt-line-strong); }
.rt-btn--ghost:hover:not([disabled]) { border-color: var(--rt-text-faint); background: var(--rt-bg-raised); }

.rt-btn--lg { padding: .85rem 1.6rem; font-size: 1rem; }
.rt-btn--block { width: 100%; }

/* ---- hero ----------------------------------------------------------------- */

.rt-hero {
  padding: clamp(3.5rem, 11vw, 7.5rem) 0 clamp(2.5rem, 6vw, 4rem);
  border-bottom: 1px solid var(--rt-line);
  position: relative; overflow: hidden;
}
/* One cool pool of light behind the headline. The only decorative gradient on
 * the site, and it sits behind text rather than on a card. */
.rt-hero::before {
  content: "";
  position: absolute; inset: -40% 20% auto -10%; height: 70%;
  background: radial-gradient(ellipse at 30% 40%, rgba(127, 141, 180, .18), transparent 62%);
  pointer-events: none;
}

.rt-hero__inner { position: relative; max-width: 44rem; }

.rt-hero__eyebrow {
  font-size: .78rem; letter-spacing: .16em; text-transform: uppercase;
  color: var(--rt-accent); font-weight: 650; margin: 0 0 1.1rem;
}

.rt-hero__title {
  font-size: clamp(2.3rem, 7.2vw, 4.3rem); line-height: 1.04;
  letter-spacing: -0.035em; font-weight: 760; margin: 0 0 1.2rem;
  text-wrap: balance;
}

.rt-hero__lede {
  font-size: clamp(1.02rem, 2.3vw, 1.22rem); color: var(--rt-text-dim);
  margin: 0 0 1.6rem; max-width: 34rem;
}
.rt-hero__lede strong { color: var(--rt-text); font-weight: 620; }

.rt-hero__actions { display: flex; flex-wrap: wrap; gap: .75rem; align-items: center; }

.rt-hero__stats {
  margin-top: 2.6rem; display: flex; flex-wrap: wrap; gap: clamp(1.5rem, 5vw, 3.5rem);
  border-top: 1px solid var(--rt-line); padding-top: 1.4rem;
}
.rt-hero__stat { display: flex; flex-direction: column; gap: .25rem; }
.rt-hero__statNum {
  font-size: clamp(1.7rem, 5vw, 2.6rem); font-weight: 750;
  letter-spacing: -0.03em; line-height: 1;
}
.rt-hero__statLabel {
  font-size: .76rem; letter-spacing: .14em; text-transform: uppercase;
  color: var(--rt-text-faint); font-weight: 600;
}

/* ---- sections ------------------------------------------------------------- */

.rt-section { padding: clamp(2.75rem, 7vw, 4.5rem) 0; }
.rt-section + .rt-section { border-top: 1px solid var(--rt-line); }

.rt-section__head {
  display: flex; flex-wrap: wrap; align-items: baseline;
  justify-content: space-between; gap: .75rem; margin-bottom: 1.9rem;
}
.rt-section__title {
  font-size: clamp(1.35rem, 3.4vw, 1.85rem); font-weight: 700;
  letter-spacing: -0.022em; margin: 0;
}
.rt-section__note { font-size: .9rem; color: var(--rt-text-faint); margin: 0; }

/* ---- the ranking ---------------------------------------------------------- */

.rt-rank { list-style: none; margin: 0; padding: 0; display: grid; gap: .5rem; }

.rt-rank__row {
  display: grid;
  grid-template-columns: 2.2rem auto 1fr auto;
  gap: 1rem; align-items: center;
  padding: .9rem 1rem;
  background: var(--rt-bg-raised);
  border: 1px solid var(--rt-line);
  border-radius: var(--rt-radius);
  transition: border-color .15s ease;
}
.rt-rank__row:hover { border-color: var(--rt-line-strong); }

.rt-rank__pos {
  font-size: 1.05rem; font-weight: 700; color: var(--rt-text-faint); text-align: center;
}

.rt-rank__body { min-width: 0; }

.rt-rank__name { font-size: 1.02rem; font-weight: 650; margin: 0; line-height: 1.3; }
.rt-rank__name a { text-decoration: none; }
.rt-rank__name a:hover { text-decoration: underline; }

.rt-rank__handle { margin: 0 0 .5rem; font-size: .83rem; color: var(--rt-text-faint); }

.rt-progress {
  height: 6px; background: var(--rt-bg-sunk); border-radius: 999px;
  overflow: hidden; margin-bottom: .45rem;
}
.rt-progress__fill {
  display: block; height: 100%; border-radius: 999px;
  background: linear-gradient(90deg, var(--rt-accent-deep), var(--rt-accent-bright));
}

.rt-rank__count {
  margin: 0; font-size: .87rem; color: var(--rt-text-faint);
  display: flex; gap: .4rem; align-items: baseline; flex-wrap: wrap;
}
.rt-rank__count strong { color: var(--rt-text); font-weight: 650; font-size: .95rem; }
.rt-rank__pct { margin-left: auto; color: var(--rt-accent); font-weight: 650; }

.rt-rank__cta { flex: 0 0 auto; }

/* ---- cards ---------------------------------------------------------------- */

.rt-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(255px, 1fr));
  gap: 1.5rem 1.25rem; margin: 0; padding: 0; list-style: none;
}

.rt-card { min-width: 0; }
.rt-card__link { text-decoration: none; display: block; }

.rt-card__thumb {
  display: block; position: relative; aspect-ratio: 16 / 9;
  border-radius: var(--rt-radius); overflow: hidden;
  background: var(--rt-bg-raised); margin-bottom: .7rem;
}
.rt-card__img { width: 100%; height: 100%; object-fit: cover; }

.rt-card__duration {
  position: absolute; right: .5rem; bottom: .5rem;
  background: rgba(0,0,0,.78); color: #fff; font-size: .74rem;
  font-weight: 600; padding: .15rem .38rem; border-radius: 5px;
}

.rt-card__title {
  font-size: .98rem; font-weight: 620; line-height: 1.35; margin: 0 0 .5rem;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.rt-card__link:hover .rt-card__title { color: var(--rt-accent-bright); }

.rt-card__by { display: flex; gap: .55rem; align-items: center; }
.rt-card__byText { display: flex; align-items: center; gap: .4rem; min-width: 0; flex-wrap: wrap; }
.rt-card__creator { font-size: .85rem; color: var(--rt-text-dim); text-decoration: none; }
.rt-card__creator:hover { color: var(--rt-text); text-decoration: underline; }

/* ---- avatar --------------------------------------------------------------- */

.rt-avatar {
  border-radius: 50%; object-fit: cover; flex: 0 0 auto;
  background: var(--rt-bg-raised);
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 650; color: var(--rt-text-dim);
}
.rt-avatar--sm { width: 26px; height: 26px; font-size: .8rem; }
.rt-avatar--md { width: 46px; height: 46px; font-size: 1.15rem; }
.rt-avatar--lg { width: 92px; height: 92px; font-size: 2.2rem; }
.rt-avatar--letter { border: 1px solid var(--rt-line); }

/* ---- badge ---------------------------------------------------------------- */

.rt-badge {
  display: inline-flex; align-items: center; gap: .35rem;
  padding: .2rem .5rem; border-radius: 999px;
  background: var(--rt-accent-sunk);
  border: 1px solid rgba(185, 196, 224, .32);
  color: var(--rt-accent-bright);
  font-size: .72rem; font-weight: 650; letter-spacing: .01em;
  line-height: 1.4; white-space: nowrap;
}
.rt-badge__mark { flex: 0 0 auto; }
.rt-badge--sm .rt-badge__number { font-size: .7rem; }
.rt-badge--lg { font-size: .84rem; padding: .3rem .7rem; }
.rt-badge__number { opacity: .82; }

/* ---- panels, empty, error ------------------------------------------------- */

.rt-panel {
  background: var(--rt-bg-raised); border: 1px solid var(--rt-line);
  border-radius: var(--rt-radius); padding: clamp(1.2rem, 3.5vw, 1.9rem);
}

.rt-empty {
  border: 1px dashed var(--rt-line-strong); border-radius: var(--rt-radius);
  padding: clamp(1.8rem, 5vw, 3rem); text-align: center;
}
.rt-empty__title { font-size: 1.1rem; font-weight: 650; margin: 0 0 .5rem; }
.rt-empty__body {
  color: var(--rt-text-dim); margin: 0 auto 1.3rem; max-width: 34rem; font-size: .96rem;
}
.rt-empty__body:last-child { margin-bottom: 0; }
.rt-empty--error { border-color: rgba(220,90,90,.4); }

/* ---- dashboard ------------------------------------------------------------ */

.rt-status { display: grid; gap: 1.1rem; }
.rt-status__head {
  display: flex; flex-wrap: wrap; align-items: center; gap: .75rem; justify-content: space-between;
}
.rt-status__title { font-size: 1.15rem; font-weight: 680; margin: 0; letter-spacing: -0.015em; }
.rt-status__sub { color: var(--rt-text-dim); margin: 0; font-size: .94rem; }

.rt-status__figure { display: flex; align-items: baseline; gap: .5rem; flex-wrap: wrap; }
.rt-status__big {
  font-size: clamp(1.7rem, 5vw, 2.4rem); font-weight: 730;
  letter-spacing: -0.028em; line-height: 1;
}
.rt-status__of { color: var(--rt-text-faint); font-size: 1rem; }
.rt-status__pct { margin-left: auto; color: var(--rt-accent); font-weight: 680; font-size: 1.05rem; }
.rt-status__remaining { color: var(--rt-text-dim); font-size: .92rem; margin: 0; }
.rt-status__actions { display: flex; flex-wrap: wrap; gap: .6rem; }

/* ---- auth ----------------------------------------------------------------- */

.rt-auth {
  min-height: calc(100vh - 64px); display: grid; place-items: center;
  padding: clamp(2rem, 7vw, 4.5rem) 0;
}
.rt-auth__card { width: min(27rem, 100%); }
.rt-auth__title {
  font-size: clamp(1.5rem, 5vw, 2rem); font-weight: 720;
  letter-spacing: -0.028em; margin: 0 0 .45rem; text-align: center;
}
.rt-auth__sub {
  color: var(--rt-text-dim); text-align: center; margin: 0 0 1.7rem; font-size: .94rem;
}
.rt-auth__sub strong { color: var(--rt-text); font-weight: 600; }

.rt-field { display: grid; gap: .35rem; margin-bottom: .95rem; }
.rt-field label { font-size: .84rem; font-weight: 600; color: var(--rt-text-dim); }
.rt-field input {
  font: inherit; font-size: .96rem; padding: .7rem .85rem;
  border-radius: var(--rt-radius-sm); border: 1px solid var(--rt-line-strong);
  background: var(--rt-bg-sunk); color: var(--rt-text);
}
.rt-field input:focus-visible { border-color: var(--rt-accent); }
.rt-field__hint { font-size: .78rem; color: var(--rt-text-faint); }

.rt-auth__divider {
  display: flex; align-items: center; gap: .8rem; color: var(--rt-text-faint);
  font-size: .78rem; text-transform: uppercase; letter-spacing: .12em; margin: 1.2rem 0;
}
.rt-auth__divider::before, .rt-auth__divider::after {
  content: ""; flex: 1; height: 1px; background: var(--rt-line);
}

.rt-auth__switch { text-align: center; margin: 1.3rem 0 0; font-size: .9rem; color: var(--rt-text-dim); }
.rt-auth__switch button {
  background: none; border: none; padding: 0; font: inherit;
  color: var(--rt-accent); cursor: pointer; font-weight: 600;
}
.rt-auth__switch button:hover { text-decoration: underline; }

.rt-status-msg {
  margin: 0 0 1rem; font-size: .89rem; padding: .65rem .8rem;
  border-radius: var(--rt-radius-sm); background: var(--rt-bg-sunk);
  border: 1px solid var(--rt-line); color: var(--rt-text-dim);
}
.rt-status-msg--error { border-color: rgba(220,90,90,.45); color: #f0a8a8; }
.rt-status-msg--ok { border-color: rgba(185,196,224,.45); color: var(--rt-accent-bright); }

/* ---- creator profile ------------------------------------------------------ */

.rt-profile__head {
  display: flex; gap: 1.4rem; align-items: flex-start; flex-wrap: wrap;
  padding: clamp(2rem, 6vw, 3.4rem) 0 clamp(1.5rem, 4vw, 2.2rem);
}
.rt-profile__id { min-width: 0; flex: 1 1 18rem; }
.rt-profile__name {
  font-size: clamp(1.6rem, 5vw, 2.3rem); font-weight: 730;
  letter-spacing: -0.03em; margin: 0 0 .3rem;
}
.rt-profile__handle { color: var(--rt-text-faint); margin: 0 0 .8rem; font-size: .95rem; }
.rt-profile__bio { color: var(--rt-text-dim); margin: .8rem 0 0; max-width: 42rem; }

.rt-qual { display: grid; gap: 1rem; }
.rt-qual__label {
  font-size: .74rem; letter-spacing: .14em; text-transform: uppercase;
  color: var(--rt-accent); font-weight: 650; margin: 0;
}
.rt-qual__figures { display: flex; flex-wrap: wrap; gap: clamp(1.5rem, 5vw, 3.5rem); }
.rt-qual__figure { display: flex; flex-direction: column; gap: .25rem; }
.rt-qual__num {
  font-size: clamp(1.5rem, 4.5vw, 2.1rem); font-weight: 740;
  letter-spacing: -0.028em; line-height: 1;
}
.rt-qual__cap {
  font-size: .76rem; letter-spacing: .12em; text-transform: uppercase;
  color: var(--rt-text-faint); font-weight: 600;
}

/* ---- future sections ------------------------------------------------------ */

.rt-future { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 1rem; }
.rt-future__item {
  border: 1px solid var(--rt-line); border-radius: var(--rt-radius);
  padding: 1.2rem; background: var(--rt-bg-raised);
}
.rt-future__title {
  font-size: .98rem; font-weight: 650; margin: 0 0 .35rem;
  display: flex; align-items: center; gap: .5rem;
}
.rt-future__tag {
  font-size: .66rem; letter-spacing: .1em; text-transform: uppercase;
  color: var(--rt-text-faint); border: 1px solid var(--rt-line-strong);
  border-radius: 999px; padding: .1rem .45rem; font-weight: 600;
}
.rt-future__body { color: var(--rt-text-faint); font-size: .89rem; margin: 0; }

/* ---- studio --------------------------------------------------------------- */

.rt-pub { list-style: none; margin: 0; padding: 0; display: grid; gap: .6rem; }
.rt-pub__row {
  display: grid; grid-template-columns: 8.5rem 1fr auto; gap: 1rem; align-items: center;
  padding: .8rem; background: var(--rt-bg-raised);
  border: 1px solid var(--rt-line); border-radius: var(--rt-radius);
}
.rt-pub__thumb {
  aspect-ratio: 16/9; border-radius: var(--rt-radius-sm);
  overflow: hidden; background: var(--rt-bg-sunk);
}
.rt-pub__thumb img { width: 100%; height: 100%; object-fit: cover; }
.rt-pub__title { font-size: .96rem; font-weight: 620; margin: 0 0 .25rem; }
.rt-pub__meta { font-size: .84rem; color: var(--rt-text-faint); margin: 0; }
.rt-pub__meta--live { color: var(--rt-accent); }

/* ---- watch ---------------------------------------------------------------- */

.rt-player {
  aspect-ratio: 16 / 9; width: 100%; background: #000;
  border-radius: var(--rt-radius); overflow: hidden; border: 1px solid var(--rt-line);
}
.rt-player iframe, .rt-player video { width: 100%; height: 100%; border: 0; display: block; }

.rt-watch__title {
  font-size: clamp(1.25rem, 3.6vw, 1.7rem); font-weight: 700;
  letter-spacing: -0.022em; margin: 1.3rem 0 .6rem;
}
.rt-watch__by { display: flex; align-items: center; gap: .7rem; flex-wrap: wrap; }
.rt-watch__desc {
  color: var(--rt-text-dim); white-space: pre-wrap; margin: 1.4rem 0 0; max-width: 52rem;
}

/* ---- footer --------------------------------------------------------------- */

.rt-footer { border-top: 1px solid var(--rt-line); background: var(--rt-bg-sunk); margin-top: 3rem; }
.rt-footer__inner { max-width: var(--rt-maxw); margin: 0 auto; padding: 2.4rem clamp(1rem, 4vw, 2rem); }
.rt-footer__line { margin: 0 0 .4rem; color: var(--rt-text-dim); font-size: .93rem; }
.rt-footer__line a { color: var(--rt-accent); }
.rt-footer__meta { margin: 0 0 1.2rem; color: var(--rt-text-faint); font-size: .85rem; }
.rt-footer__links { display: flex; gap: 1.2rem; flex-wrap: wrap; }
.rt-footer__links a { color: var(--rt-text-faint); text-decoration: none; font-size: .87rem; }
.rt-footer__links a:hover { color: var(--rt-text); text-decoration: underline; }

/* ---- skeletons ------------------------------------------------------------ */

@keyframes rt-pulse { 0%, 100% { opacity: .45; } 50% { opacity: .85; } }

.rt-skeleton { pointer-events: none; }
.rt-skeleton__block, .rt-skeleton__line {
  display: block; background: var(--rt-bg-raised);
  border-radius: var(--rt-radius-sm); animation: rt-pulse 1.4s ease-in-out infinite;
}
.rt-skeleton__line { height: .82rem; margin-bottom: .5rem; }
.rt-skeleton__line--short { width: 42%; }
.rt-skeleton__line--bar { height: 6px; border-radius: 999px; }
.rt-skeleton .rt-card__thumb { animation: rt-pulse 1.4s ease-in-out infinite; }
.rt-skeleton .rt-avatar { border-radius: 50%; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
}

/* ---- responsive ----------------------------------------------------------- */

@media (max-width: 900px) {
  .rt-rank__cta { display: none; }
  .rt-rank__row { grid-template-columns: 2rem auto 1fr; }
}

@media (max-width: 820px) {
  .rt-nav__toggle {
    display: inline-flex; flex-direction: column; justify-content: center; gap: 4px;
    margin-left: auto; width: 40px; height: 38px; padding: 0 8px;
    background: transparent; border: 1px solid var(--rt-line-strong);
    border-radius: 9px; cursor: pointer;
  }
  .rt-nav__toggle span { display: block; height: 2px; background: var(--rt-text); border-radius: 2px; }

  .rt-nav {
    display: none; position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: .15rem;
    padding: .75rem clamp(1rem, 4vw, 2rem) 1.1rem;
    background: var(--rt-bg); border-bottom: 1px solid var(--rt-line); margin-left: 0;
  }
  .rt-nav.is-open { display: flex; }
  .rt-nav__link { padding: .7rem 0; border-bottom: 1px solid var(--rt-line); }
  .rt-nav__link.is-active { border-bottom-color: var(--rt-accent); }
  .rt-nav__auth { margin: .8rem 0 0; flex-wrap: wrap; }
  .rt-nav__cta { flex: 1 1 auto; }
  .rt-header__inner { position: relative; }
}

@media (max-width: 620px) {
  .rt-rank__row { grid-template-columns: 1.6rem auto 1fr; gap: .7rem; padding: .75rem; }
  .rt-avatar--md { width: 38px; height: 38px; font-size: 1rem; }
  .rt-rank__name { font-size: .95rem; }
  .rt-rank__count { font-size: .8rem; }
  .rt-rank__of { display: none; }
  .rt-pub__row { grid-template-columns: 6.5rem 1fr; }
  .rt-pub__row .rt-btn { grid-column: 1 / -1; }
  .rt-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 1.2rem .9rem; }
  .rt-card__title { font-size: .9rem; }
  .rt-hero__stats { gap: 1.5rem; }
}
