/* Your level (/dashboard/rewards/level/): the hero with the badge, the level and the XP bar, the next levels and what
   they pay, how to earn XP, recent XP and level-ups, and every tier and level. Colours and fonts come from
   /css/txlist.css (.ycp), the badge, bar and dialog from /css/levels.css. Tier colours (--tc, --tc2, --tc3) come
   from the lv-t1 to lv-t6 classes. */
body { background-color: #11141A; }


.lv { padding: 30px 32px 70px; max-width: 1240px; }
.lv-crumb { display: inline-flex; align-items: center; gap: 6px; margin-bottom: 10px; font-size: 13px; color: var(--muted) !important; }
.lv-crumb:hover { color: var(--text-2) !important; }
.lv-head { margin-bottom: 22px; }
.lv-head h1 { margin: 0; font-family: "titles", sans-serif !important; font-weight: 400; font-size: 32px; color: #E4E8EF; }
.lv-head p { margin: 8px 0 0; font-size: 15px; color: #A5ACB9; max-width: 760px; }
.lv-card { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 20px 22px; }
.lv-sec { margin-top: 28px; }
.lv-sec > h2 { margin: 0 0 4px; font-size: 20px; font-weight: 600; color: var(--text); }
.lv-sec > p { margin: 0 0 14px; font-size: 13.5px; color: var(--muted); }
.lv .num { font-variant-numeric: tabular-nums; }
.lv .in { color: var(--in); }
.lv .cur { font-weight: 500; opacity: .75; font-size: .72em; letter-spacing: .02em; }

/* Not loaded, and Levels switched off */
.lv-note { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; padding: 18px 20px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); font-size: 13.5px; color: var(--text-2); }
.lv-note.bad { border-color: #4A2A33; }
.lv-note b { font-size: 15px; font-weight: 600; color: var(--text); }
.lv-note .btn { margin-top: 6px; }
.lv-off { flex-direction: row; align-items: center; gap: 16px; padding: 22px; max-width: 760px; }
.lv-off .lv-off-ic { flex: none; width: 64px; opacity: .5; filter: grayscale(.8); }
.lv-off > div { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; }

/* Loading */
.sk { display: block; height: 14px; width: 60%; margin: 10px 0; border-radius: 6px; background: var(--surface-3); animation: lv-pulse 1.2s ease-in-out infinite; }
.lv-hero.is-loading { display: flex; align-items: center; gap: 28px; min-height: 196px; }
.lv-hero.is-loading .sk-badge { flex: none; width: 140px; height: 150px; margin: 0; border-radius: 40px 40px 70px 70px; }
.lv-hero.is-loading > div { flex: 1; }
.lv-hero.is-loading .sk.w1 { height: 30px; width: 220px; }
.lv-hero.is-loading .sk.w3 { height: 14px; width: 100%; max-width: 520px; }
@keyframes lv-pulse { 50% { opacity: .5; } }
@media (prefers-reduced-motion: reduce) { .sk { animation: none; } }

/* Hero: the badge, the level and the bar */
.lv-hero { position: relative; overflow: hidden; display: grid; grid-template-columns: auto minmax(0, 1fr) 300px; gap: 28px; align-items: center; padding: 26px 28px;
  background: radial-gradient(120% 140% at 0% 0%, color-mix(in srgb, var(--tc) 14%, transparent), transparent 55%), var(--surface);
  border-color: color-mix(in srgb, var(--tc) 30%, var(--line)); }
.lv-hero::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 3px; background: linear-gradient(90deg, var(--tc3), var(--tc), var(--tc3)); }
.lv-hero.is-loading::before { display: none; }
.lv-hero .lv-big { position: relative; z-index: 1; width: 176px; margin: -10px -6px -14px -10px; filter: drop-shadow(0 10px 22px rgba(0,0,0,.45)); }
.lv-main { position: relative; z-index: 1; min-width: 0; }
.lv-title { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 12px; }
.lv-title h2 { margin: 0; font-size: 34px; font-weight: 700; letter-spacing: -.01em; color: var(--text); }
.lv-tier { font-size: 13px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--tc); }
.lv-xp { margin: 4px 0 16px; font-size: 14px; color: var(--muted); }
.lv-xp b { color: var(--text-2); font-weight: 600; }
.lv-barrow { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; }
.lv-ends { display: flex; justify-content: space-between; gap: 10px; font-size: 12.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.lv-ends b { color: var(--text-2); font-weight: 600; }
.lv-next { margin-top: 14px; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; font-size: 14px; color: var(--text-2); }
.lv-next b { color: var(--text); font-weight: 600; }
.lv-next .in { font-weight: 600; }
.lv-chip { display: inline-flex; align-items: center; gap: 6px; min-height: 26px; padding: 3px 10px; border-radius: 99px; font-size: 12.5px; font-weight: 500; color: var(--text-2); background: var(--surface-2); border: 1px solid var(--line-2); }
.lv-chip.on { color: var(--in); background: rgba(61, 214, 140, .08); border-color: rgba(61, 214, 140, .3); }
a.lv-chip:hover { border-color: #3A4257; }
.lv-side { position: relative; z-index: 1; display: flex; flex-direction: column; padding-left: 24px; border-left: 1px solid var(--line-2); }
.lv-stat { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 11px 0; font-size: 13.5px; color: var(--muted); }
.lv-stat + .lv-stat { border-top: 1px solid var(--line); }
.lv-stat b { color: var(--text); font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.lv-stat a { color: var(--link) !important; font-weight: 500; white-space: nowrap; }

/* Coming up: the next levels and what they pay */
.lv-road { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; }
.lv-stop { position: relative; display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 16px 10px 14px; text-align: center; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; }
.lv-stop .lv-mini { width: 54px; }
.lv-stop.tierup .lv-mini { width: 80px; margin: -14px 0 -12px; }
.lv-stop .lv-l { font-size: 13px; font-weight: 600; color: var(--text-2); }
.lv-stop .lv-r { font-size: 15px; font-weight: 600; color: var(--in); font-variant-numeric: tabular-nums; }
.lv-stop .lv-r.none { font-size: 12.5px; font-weight: 500; color: var(--muted-2); }
.lv-stop .lv-x { font-size: 11.5px; color: var(--muted-2); font-variant-numeric: tabular-nums; }
.lv-stop.next { border-color: color-mix(in srgb, var(--tc) 55%, var(--line)); }
.lv-stop.tierup { background: linear-gradient(180deg, color-mix(in srgb, var(--tc) 16%, var(--surface)), var(--surface) 70%); border-color: color-mix(in srgb, var(--tc) 50%, var(--line)); }
.lv-flag { position: absolute; top: -10px; left: 50%; transform: translateX(-50%); height: 20px; padding: 0 8px; border-radius: 99px; font-size: 10.5px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; line-height: 20px; white-space: nowrap; color: #11141A; background: var(--tc); }
.lv-flag.next { background: var(--surface-3); color: var(--text-2); }
.lv-top { display: flex; align-items: center; gap: 14px; font-size: 14px; color: var(--text-2); }

/* How to earn XP */
.lv-earn { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.lv-earn.solo { grid-template-columns: minmax(0, 1fr); }
.lv-earn h3 { margin: 0 0 4px; font-size: 16px; font-weight: 600; color: var(--text); }
.lv-earn .lv-card > p { margin: 0 0 12px; font-size: 13.5px; color: var(--muted); }
.lv-rate { display: inline-flex; align-items: baseline; flex-wrap: wrap; gap: 6px; margin: 2px 0 12px; padding: 8px 12px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line-2); font-size: 13.5px; color: var(--text-2); }
.lv-rate b { font-size: 18px; color: var(--text); }
.lv-row { display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 10px 0; }
.lv-row.money { grid-template-columns: 34px minmax(0, 1fr); }
.lv-row + .lv-row { border-top: 1px solid var(--line); }
.lv-ic { width: 34px; height: 34px; border-radius: 10px; display: flex; align-items: center; justify-content: center; }
.lv-ic svg { width: 17px; height: 17px; }
.lv-what { min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 1px; font-size: 14px; color: var(--text); }
.lv-what small { font-size: 12.5px; color: var(--muted); }
.lv-what small.off { color: var(--muted-2); }
.lv-what a { color: var(--link) !important; font-size: 12.5px; font-weight: 500; }
.lv-what a:hover { text-decoration: underline; }
.lv-gain { font-size: 14px; font-weight: 600; color: var(--text); white-space: nowrap; font-variant-numeric: tabular-nums; text-align: right; }
.lv-gain small { display: block; font-size: 11px; font-weight: 500; color: var(--muted-2); }
.lv-boost { display: inline-flex; align-items: center; gap: 4px; height: 18px; margin-left: 6px; padding: 0 7px; border-radius: 99px; font-size: 10.5px; font-weight: 600; letter-spacing: .03em; text-transform: uppercase; vertical-align: 1px; color: #fff; background: var(--grad); }
.lv-check { width: 22px; height: 22px; border-radius: 50%; display: flex; align-items: center; justify-content: center; border: 1.5px solid var(--line-2); color: transparent; justify-self: center; }
.lv-check.done { border: 0; background: rgba(61, 214, 140, .16); color: var(--in); }
.lv-row.done .lv-gain { color: var(--muted-2); }
.lv-row.done .lv-what { color: var(--text-2); }
.lv-foot { margin: 14px 0 0; padding: 12px 14px; border-radius: 12px; background: var(--surface-2); font-size: 12.5px; color: var(--muted); line-height: 1.55; }
.lv-foot b { color: var(--text-2); font-weight: 600; }

/* Recent XP and level-ups */
.lv-feed .f-row { cursor: default; }
.lv-feed .f-row:hover { background: none; }
.lv-feed .xp { font-size: 14.5px; font-weight: 600; color: var(--text); white-space: nowrap; font-variant-numeric: tabular-nums; }
.lv-feed .xp.neg { color: var(--text-2); }
.lv-feed .xp small { font-size: 11px; font-weight: 500; color: var(--muted); margin-left: 2px; }
.lv-feed .f-ic.badge { background: none; }
.lv-feed .f-ic.badge .lv-badge { width: 34px; }
.lv-feed .lvup .f-title { color: var(--text); font-weight: 600; }
.lv-feed .amt .cur { font-size: .72em; }

/* All levels: a card per tier, then every level */
.lv-tiers { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.lv-tc { display: grid; grid-template-columns: 62px minmax(0, 1fr); gap: 14px; align-items: center; padding: 14px 16px; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; }
.lv-tc.here { border-color: color-mix(in srgb, var(--tc) 60%, var(--line)); box-shadow: 0 0 0 1px color-mix(in srgb, var(--tc) 30%, transparent) inset; }
.lv-tc .lv-mini { width: 76px; margin: -8px -6px -8px -10px; }
.lv-tc.locked .lv-mini { opacity: .45; filter: grayscale(.7); }
.lv-tc > div > b { display: block; font-size: 14.5px; font-weight: 600; color: var(--text); }
.lv-tc.locked > div > b { color: var(--text-2); }
.lv-tc > div > span { display: block; font-size: 12.5px; color: var(--muted); line-height: 1.5; }
.lv-tc span .in { font-weight: 600; }
.lv-tc em { display: block; font-style: normal; font-size: 11px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: var(--tc); }

.lv-all-btn { margin-top: 14px; }
.lv-all-btn svg { transition: transform .15s; }
.lv-all-btn[aria-expanded="true"] svg { transform: rotate(180deg); }
.lv-all { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; margin: 12px 0 0; padding: 0; list-style: none; }
.lv-all li { display: grid; grid-template-columns: 26px minmax(0, 1fr); grid-template-rows: auto auto; column-gap: 10px; align-items: center; padding: 9px 12px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); }
.lv-all li .lv-badge { grid-row: 1 / 3; width: 26px; }
.lv-all li b { font-size: 13px; font-weight: 600; color: var(--text); }
.lv-all li span { font-size: 11.5px; color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lv-all li span .in { font-weight: 600; }
.lv-all li.here { border-color: color-mix(in srgb, var(--tc) 60%, var(--line)); background: color-mix(in srgb, var(--tc) 8%, var(--surface)); }
.lv-all li.locked .lv-badge { opacity: .45; filter: grayscale(.7); }
.lv-all li.locked b { color: var(--text-2); }

/* ---------- Narrower screens ---------- */
@media (max-width: 1100px) {
  .lv-all { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .lv-hero { grid-template-columns: auto minmax(0, 1fr); }
  .lv-side { grid-column: 1 / -1; padding-left: 0; padding-top: 6px; border-left: 0; border-top: 1px solid var(--line-2); }
  .lv-earn { grid-template-columns: minmax(0, 1fr); }
  .lv-tiers { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .lv-all { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 750px) {
  .lv { padding: 22px 16px 120px; }
  .lv-head h1 { font-size: 26px; }
  .lv-head p { font-size: 14px; }
  .lv-hero { grid-template-columns: minmax(0, 1fr); justify-items: center; text-align: center; gap: 16px; padding: 22px 18px; }
  .lv-hero .lv-big { width: 136px; margin: 0; }
  .lv-hero.is-loading .sk-badge { width: 110px; height: 120px; }
  .lv-main { width: 100%; }
  .lv-title { justify-content: center; }
  .lv-title h2 { font-size: 28px; }
  .lv-next { justify-content: center; }
  .lv-side { width: 100%; text-align: left; }
  .lv-road { grid-template-columns: repeat(3, minmax(0, 1fr)); row-gap: 18px; }
  .lv-tiers { grid-template-columns: minmax(0, 1fr); }
  .lv-card { padding: 16px; }
  .lv-all { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .lv-off { align-items: flex-start; }
  .lv-off .lv-off-ic { width: 48px; }
}
@media (max-width: 400px) {
  .lv-ends { font-size: 11.5px; }
}
