/* V123 — the server-rendered Rift Lab hub body.
   Scoped entirely to .rl-hub so it cannot reach the tool panels above it.
   Direction is handled with logical properties (inline-start/end, text-align:start)
   so the whole section mirrors under html[dir="rtl"] without a mirrored ruleset;
   the only explicit RTL rules are the two that swap the bilingual data spans. */

.rl-hub {
  --rlh-line: var(--rl-border, rgba(55, 239, 129, .18));
  --rlh-key: var(--rl-green, #35ef82);
  --rlh-dim: var(--rl-muted, #8f9aa5);
  --rlh-card: var(--rl-panel, #0c1218);
  --rlh-card2: var(--rl-panel2, #101820);
  margin-top: 28px;
  padding: 26px;
  border: 1px solid var(--rlh-line);
  border-radius: 20px;
  background: linear-gradient(160deg, var(--rlh-card2), var(--rlh-card));
  text-align: start;
}

/* ---------- head ---------- */
.rl-hub-head { max-width: 74ch; }
.rl-hub-kicker {
  display: inline-block;
  margin-bottom: 10px;
  color: var(--rlh-key);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
}
.rl-hub-head h2 { margin: 0 0 12px; font-size: 27px; line-height: 1.25; }
.rl-hub-head > p { margin: 0; color: var(--rlh-dim); font-size: 15px; line-height: 1.75; }

/* ---------- figure strip ---------- */
.rl-hub-figures {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
  margin: 22px 0 0;
  padding: 0;
  list-style: none;
}
.rl-hub-figures li {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px;
  padding: 14px 16px;
  border: 1px solid var(--rlh-line);
  border-radius: 14px;
  background: rgba(255, 255, 255, .02);
}
.rl-hub-figures b {
  flex: 0 0 100%;
  color: var(--rlh-key);
  font-size: 26px;
  font-weight: 800;
  line-height: 1.1;
}
.rl-hub-figures span { color: var(--rlh-dim); font-size: 13px; line-height: 1.5; }

/* ---------- section headings ---------- */
.rl-hub > h3 {
  margin: 30px 0 14px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--rlh-line);
  font-size: 19px;
}

/* ---------- lane / tier / category cards ---------- */
.rl-hub-lanes, .rl-hub-tiers, .rl-hub-cats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 14px;
  margin-top: 20px;
}
.rl-hub-tiers, .rl-hub-cats { grid-template-columns: 1fr; }
.rl-hub-lane, .rl-hub-tier, .rl-hub-cat {
  padding: 18px;
  border: 1px solid var(--rlh-line);
  border-radius: 16px;
  background: rgba(255, 255, 255, .02);
}
.rl-hub-lane header, .rl-hub-tier header, .rl-hub-cat header {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--rlh-line);
}
.rl-hub-lane h3, .rl-hub-tier h3, .rl-hub-cat h3, .rl-hub-lane h4 { margin: 0; font-size: 17px; }
.rl-hub-tier h3 { color: var(--rlh-key); font-size: 22px; font-weight: 800; }
.rl-hub-lane header p, .rl-hub-tier header p, .rl-hub-cat header p {
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin: 0;
  color: var(--rlh-dim);
  font-size: 13px;
}
.rl-hub-lane header b, .rl-hub-tier header b, .rl-hub-cat header b { color: #fff; font-weight: 700; }
.rl-hub-lane h4 { margin: 16px 0 8px; color: var(--rlh-dim); font-size: 13px; font-weight: 600; }

/* ---------- tier spread pills ---------- */
.rl-hub-tierspread { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.rl-hub-tierspread li {
  display: flex;
  align-items: baseline;
  gap: 6px;
  padding: 5px 10px;
  border: 1px solid var(--rlh-line);
  border-radius: 999px;
  font-size: 12px;
}
.rl-hub-tierspread em { color: var(--rlh-key); font-style: normal; font-weight: 800; }
.rl-hub-tierspread b { color: var(--rlh-dim); font-weight: 600; }

/* ---------- ordered / ranked lists ---------- */
.rl-hub-list, .rl-hub-ranked {
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: rlh;
}
.rl-hub-list li, .rl-hub-ranked li {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px;
  padding: 8px 0;
  border-bottom: 1px solid var(--rlh-line);
  font-size: 14px;
}
.rl-hub-list li:last-child, .rl-hub-ranked li:last-child { border-bottom: 0; }
.rl-hub-ranked li::before {
  counter-increment: rlh;
  content: counter(rlh);
  min-width: 22px;
  color: var(--rlh-dim);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}
.rl-hub-list a, .rl-hub-ranked a { color: #fff; font-weight: 600; text-decoration: none; }
.rl-hub-list a:hover, .rl-hub-ranked a:hover, .rl-hub-chips a:hover, .rl-hub-roster a:hover,
.rl-hub-runes a:hover, .rl-hub-defs a:hover { color: var(--rlh-key); text-decoration: underline; }
.rl-hub-list b, .rl-hub-ranked b { color: var(--rlh-key); font-weight: 700; font-variant-numeric: tabular-nums; }
.rl-hub-list span, .rl-hub-ranked span, .rl-hub-ranked small { color: var(--rlh-dim); font-size: 12px; }
.rl-hub-ranked small { margin-inline-end: auto; }

/* ---------- chip lists (tier rosters, gaps) ---------- */
.rl-hub-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.rl-hub-chips li {
  display: flex;
  align-items: baseline;
  gap: 6px;
  padding: 6px 12px;
  border: 1px solid var(--rlh-line);
  border-radius: 999px;
  background: rgba(0, 0, 0, .25);
}
.rl-hub-chips a { color: #fff; font-size: 13px; font-weight: 600; text-decoration: none; }
.rl-hub-chips small { color: var(--rlh-dim); font-size: 11px; }

/* ---------- champion roster ---------- */
.rl-hub-roster { margin: 0; padding: 0; list-style: none; }
.rl-hub-roster li {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px;
  padding: 9px 0;
  border-bottom: 1px solid var(--rlh-line);
}
.rl-hub-roster li:last-child { border-bottom: 0; }
.rl-hub-roster a { color: #fff; font-size: 14px; font-weight: 600; text-decoration: none; }
.rl-hub-roster small { flex: 1 1 auto; color: var(--rlh-dim); font-size: 12px; }
.rl-hub-roster em {
  padding: 2px 8px;
  border: 1px solid var(--rlh-line);
  border-radius: 999px;
  color: var(--rlh-key);
  font-size: 11px;
  font-style: normal;
  font-weight: 800;
}
.rl-hub-roster i { color: var(--rlh-dim); font-size: 11px; font-style: normal; }

/* ---------- rune index ---------- */
.rl-hub-runes {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 10px;
  margin: 20px 0 0;
  padding: 0;
  list-style: none;
}
.rl-hub-runes li {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px;
  padding: 12px 14px;
  border: 1px solid var(--rlh-line);
  border-radius: 14px;
  background: rgba(255, 255, 255, .02);
}
.rl-hub-runes a { flex: 0 0 100%; color: #fff; font-size: 15px; font-weight: 700; text-decoration: none; }
.rl-hub-runes .rl-hub-bi { flex: 1 1 auto; color: var(--rlh-dim); font-size: 13px; line-height: 1.6; }
.rl-hub-runes b { color: var(--rlh-key); font-weight: 700; font-variant-numeric: tabular-nums; }
.rl-hub-runes span:not([class]) { color: var(--rlh-dim); font-size: 12px; }

/* ---------- item library ---------- */
.rl-hub-defs { margin: 0; }
.rl-hub-defs dt {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 10px;
  margin-top: 14px;
}
.rl-hub-defs dt:first-child { margin-top: 0; }
.rl-hub-defs a { color: #fff; font-size: 15px; font-weight: 700; text-decoration: none; }
.rl-hub-defs em { color: var(--rlh-key); font-size: 12px; font-style: normal; }
.rl-hub-defs dd {
  margin: 4px 0 0;
  padding-bottom: 12px;
  padding-inline-start: 0;
  border-bottom: 1px solid var(--rlh-line);
  color: var(--rlh-dim);
  font-size: 13px;
  line-height: 1.7;
}
.rl-hub-defs dd:last-child { border-bottom: 0; padding-bottom: 0; }

/* ---------- gaps + provenance ---------- */
.rl-hub-gap { margin-top: 26px; padding: 16px 18px; border: 1px dashed var(--rlh-line); border-radius: 14px; }
.rl-hub-gap h3 { margin: 0 0 6px; font-size: 16px; }
.rl-hub-gap p { margin: 0 0 12px; color: var(--rlh-dim); font-size: 13px; line-height: 1.7; }
.rl-hub-source {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px;
  margin: 20px 0 0;
  color: var(--rlh-dim);
  font-size: 12.5px;
  line-height: 1.7;
}
.rl-hub-source b { color: var(--rlh-key); font-weight: 700; }

/* ---------- bilingual data prose ----------
   Both languages ship in the HTML with their own lang/dir, so a crawler reads the
   pair without running a script. CSS shows the one matching the document
   direction. A row the dataset carries no Arabic for keeps its English visible in
   both directions rather than being machine-translated into unreviewed text. */
.rl-hub-bi-ar { display: none; }
html[dir="rtl"] .rl-hub-bi-en { display: none; }
html[dir="rtl"] .rl-hub-bi-ar { display: inline; }

@media (max-width: 720px) {
  .rl-hub { padding: 18px; border-radius: 16px; }
  .rl-hub-head h2 { font-size: 22px; }
  .rl-hub-lanes, .rl-hub-runes { grid-template-columns: 1fr; }
}
