:root {
  color-scheme: dark;
  --bg: #0c0d10;
  --surface: #15171b;
  --line: #24262c;
  --text: #ececef;
  --prose: #c4c7ce;
  --muted: #a1a5ae;
  --faint: #8d919a;
  --edge: #63676f;
  --core: #5aa9ff;
  --good: #4fd18b;
  --bad: #f27b7b;
  --focus: #8ab4ff;
  --tier-splus: #ff9f5a;
  --tier-s: #f2c14e;
  --tier-a: #9db9ff;
  --tier-b: #b4b8c0;
  --tier-c: #969aa3;
  --tier-d: #868a93;
  --prismatic: #cfaaff;
  --gold: #e8c06a;
  --silver: #b8bec8;
  --radius: 8px;
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  interpolate-size: allow-keywords;
  font-family: "Inter", system-ui, sans-serif;
  font-size: 15px;
  line-height: 1.5;
  background: var(--bg);
  color: var(--text);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
}

h1,
h2,
h3,
p,
ol,
ul,
dl,
dd {
  margin: 0;
  padding: 0;
}

ol,
ul {
  list-style: none;
}

h1,
h2,
h3 {
  line-height: 1.2;
  text-wrap: balance;
}

a {
  color: inherit;
}

button {
  font: inherit;
  color: inherit;
}

:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
  border-radius: 4px;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.muted {
  color: var(--muted);
}

.truncate {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.truncate::before {
  content: attr(data-text);
}

.truncate > span {
  display: inline-block;
}

.truncate:not(:has(> [hidden]))::before {
  content: none;
}

.truncate:not(:has(> [hidden])) {
  white-space: normal;
}

details::details-content {
  block-size: 0;
  overflow-y: clip;
  opacity: 0;
  transition:
    block-size 150ms var(--ease-out),
    opacity 150ms var(--ease-out),
    content-visibility 150ms allow-discrete;
}

details[open]::details-content {
  block-size: auto;
  opacity: 1;
  transition-duration: 200ms;
}

.pressable {
  transition: transform 160ms var(--ease-out);
}

.pressable:active {
  transform: scale(0.97);
}

.champion.pressable:active {
  transform: scale(0.98);
}

@media (prefers-reduced-motion: reduce) {
  details::details-content {
    transition-property: opacity, content-visibility;
  }

  .pressable:active,
  .champion.pressable:active {
    transform: none;
  }
}

.tooltip {
  position: fixed;
  z-index: 100;
  max-width: min(360px, calc(100vw - 32px));
  padding: 6px 10px;
  border: 1px solid var(--edge);
  border-radius: 6px;
  background: #1d1f24;
  font-size: 14px;
  line-height: 1.4;
  color: var(--text);
  pointer-events: none;
  opacity: 0;
  transform: translateY(calc(-100% - 6px)) scale(0.97);
  transform-origin: bottom left;
  transition:
    opacity 125ms var(--ease-out),
    transform 125ms var(--ease-out);
}

.tooltip[data-open] {
  opacity: 1;
  transform: translateY(calc(-100% - 6px));
}

.tooltip[data-instant] {
  transition-duration: 0ms;
}

@media (prefers-reduced-motion: reduce) {
  .tooltip {
    transform: translateY(calc(-100% - 6px));
  }
}

.page {
  max-width: 1320px;
  margin: 0 auto;
  padding: 48px 24px 64px;
  display: flex;
  flex-direction: column;
  gap: 48px;
}

.icon {
  display: block;
  flex: none;
  border-radius: 6px;
  background: var(--surface);
}

.icon--asset {
  border-radius: 50%;
}

.wr {
  font-variant-numeric: tabular-nums;
  font-weight: 500;
}

.wr--good {
  color: var(--good);
}

.wr--bad {
  color: var(--bad);
}

.tier {
  font-weight: 700;
}

.tier--s {
  color: var(--tier-s);
}

.tier--a {
  color: var(--tier-a);
}

.tier--b {
  color: var(--tier-b);
}

.tier--splus {
  color: var(--tier-splus);
}

.tier--c {
  color: var(--tier-c);
}

.tier--d {
  color: var(--tier-d);
}

.back {
  align-self: flex-start;
  margin-bottom: -24px;
  font-size: 14px;
  color: var(--muted);
  text-decoration: none;
}

.back::before {
  content: "‹ ";
}

.back:hover {
  color: var(--text);
}

/* Tier list */

.filters {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 16px;
}

.search input {
  width: 240px;
  max-width: 100%;
  padding: 8px 12px;
  border: 1px solid var(--edge);
  border-radius: var(--radius);
  background: var(--surface);
  font: inherit;
  font-size: 14px;
  color: var(--text);
}

.search input::placeholder {
  color: var(--faint);
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.chip {
  padding: 6px 12px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: none;
  font-size: 14px;
  color: var(--muted);
  cursor: pointer;
}

.chip:hover {
  color: var(--text);
}

.chip[aria-pressed="true"],
.chip--outline {
  border-color: var(--edge);
  color: var(--text);
}

.page[aria-busy="true"] {
  cursor: progress;
}

.error {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
  color: var(--prose);
}

.filters__count {
  font-size: 13px;
}

.tiers {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.tier-band {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  gap: 16px;
}

.tier-band[hidden] {
  display: none;
}

.tier-band h2 {
  padding-top: 8px;
  font-size: 24px;
}

.champions {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 4px 16px;
}

.champions li[hidden] {
  display: none;
}

.champion {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 6px 8px;
  margin: 0 -8px;
  border-radius: var(--radius);
  font-size: 15px;
  color: var(--text);
  text-decoration: none;
}

a.champion:hover {
  background: var(--surface);
}

.champion__wr {
  font-size: 14px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

/* Header */

.hero {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.hero h1 {
  font-size: clamp(22px, 3vw, 28px);
  font-weight: 700;
  letter-spacing: -0.01em;
}

.hero .hero__name {
  font-size: clamp(40px, 7vw, 64px);
  letter-spacing: -0.02em;
}

.hero:has(.hero__name) {
  padding-bottom: 40px;
  text-shadow: 0 1px 16px rgb(0 0 0 / 0.6);
}

.backdrop {
  position: absolute;
  z-index: -1;
  inset: 0 0 auto;
  height: clamp(300px, 34vw, 460px);
  overflow: hidden;
  pointer-events: none;
  mask-image: linear-gradient(to bottom, #000 30%, transparent 85%);
}

.backdrop__art {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 20%;
  opacity: 0;
  mask-image: linear-gradient(to right, transparent 40%, #000 85%);
  transition: opacity 300ms var(--ease-out);
}

.backdrop__art.is-loaded {
  opacity: 0.75;
}

.stats {
  display: flex;
  align-items: center;
  gap: clamp(24px, 4vw, 40px);
}

.stats__tier {
  font-size: 40px;
  line-height: 1;
}

.stats__list {
  display: flex;
  flex-wrap: wrap;
  gap: 16px clamp(24px, 4vw, 40px);
}

.stats__list dt {
  font-size: 13px;
  color: var(--muted);
}

.stats__list dd {
  font-size: clamp(18px, 5vw, 22px);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

/* Layout */

.layout {
  display: flex;
  flex-wrap: wrap;
  gap: 56px;
}

.layout__main {
  flex: 999 1 0;
  min-inline-size: 55%;
  display: flex;
  flex-direction: column;
  gap: 48px;
}

.layout__side {
  flex: 1 1 400px;
  display: flex;
  flex-direction: column;
  gap: 40px;
}

.section {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.section h2.label {
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
}

/* Tabs */

.tabs {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(240px, 1fr);
  gap: 24px;
  overflow-x: auto;
  scrollbar-width: none;
  border-bottom: 1px solid var(--line);
}

.tab {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 0 0 12px;
  text-align: left;
  margin-bottom: -1px;
  border: none;
  border-bottom: 2px solid transparent;
  background: none;
  font-weight: 500;
  color: var(--muted);
  cursor: pointer;
}

.tab__icons {
  display: flex;
  flex: none;
  gap: 4px;
}

.tab__text {
  display: flex;
  flex-direction: column;
  min-width: 0;
  gap: 2px;
  line-height: 1.35;
}

.tab .icon {
  transition: opacity 150ms ease;
}

.tab:not([aria-selected="true"]) .icon {
  opacity: 0.6;
}

.tab .wr {
  font-size: 14px;
}

.tab:focus-visible {
  outline-offset: -2px;
}

@media (hover: hover) and (pointer: fine) {
  .tab:hover {
    color: var(--text);
  }

  .tab:hover .icon {
    opacity: 1;
  }
}

.tab[aria-selected="true"] {
  color: var(--text);
  border-bottom-color: var(--text);
}

/* Build */

.build {
  display: flex;
  flex-wrap: wrap;
  gap: 16px 40px;
  padding-top: 24px;
}

.slot--core .icon {
  outline: 2px solid var(--core);
  outline-offset: 2px;
}

.slots {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.slot {
  width: 72px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.slot__name {
  font-size: 13px;
  line-height: 1.3;
  color: var(--muted);
  text-align: center;
  text-wrap: balance;
}

@media (max-width: 480px) {
  .slots {
    gap: 8px;
  }

  .slot {
    width: 60px;
  }
}

/* Augments */

.augments {
  container-type: inline-size;
}

.rarities {
  display: grid;
  gap: 32px;
}

@container (min-width: 720px) {
  .rarities {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.rarity {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.rarity__title {
  font-size: 14px;
  font-weight: 600;
}

.rarity__title--prismatic {
  color: var(--prismatic);
}

.rarity__title--gold {
  color: var(--gold);
}

.rarity__title--silver {
  color: var(--silver);
}

.ranked__row {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 6px 0;
}

.ranked__name {
  font-size: 15px;
}

/* Playstyles */

.playstyles {
  display: flex;
  flex-direction: column;
}

.badge {
  display: inline-flex;
  flex: none;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  height: 20px;
  border-radius: 4px;
  background: color-mix(in srgb, currentColor 14%, transparent);
  font-size: 12px;
  line-height: 1;
}

.playstyle {
  margin-inline: -16px;
  padding-inline: 16px;
  border-radius: 12px;
}

.playstyle[open] {
  margin-block: 4px;
  background: var(--surface);
}

.playstyle[open] .stack .icon {
  outline-color: var(--surface);
}

.playstyle__head {
  display: grid;
  grid-template-columns: 28px auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  font-size: 16px;
  font-weight: 500;
  color: var(--prose);
  cursor: pointer;
  list-style: none;
}

.playstyle[open] > .playstyle__head {
  padding-top: 14px;
}

.playstyle__head::-webkit-details-marker,
.fold__head::-webkit-details-marker {
  display: none;
}

.playstyle__head::after,
.fold__head::after {
  content: "";
  width: 7px;
  height: 7px;
  margin: 0 4px;
  border-right: 1.5px solid var(--muted);
  border-bottom: 1.5px solid var(--muted);
  transform: translateY(-2px) rotate(45deg);
  transition: transform 200ms var(--ease-out);
}

.playstyle[open] > .playstyle__head::after,
.fold[open] > .fold__head::after {
  transform: translateY(1px) rotate(-135deg);
}

.playstyle__head:hover,
.playstyle[open] .playstyle__head {
  color: var(--text);
}

.playstyle__body {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 6px 0 24px 40px;
}

@media (max-width: 720px) {
  .playstyle__body {
    padding-left: 0;
  }
}

.group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.group h4 {
  margin: 0;
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
}

.folds {
  display: flex;
  flex-direction: column;
}

.fold__head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 10px;
  padding: 6px 0;
  color: var(--muted);
  cursor: pointer;
  list-style: none;
}

.fold__head::after {
  margin-top: 7px;
}

.combo__head {
  grid-template-columns: 28px 72px minmax(0, 1fr) auto;
}

.combo__head .badge {
  margin-top: 2px;
}

.fold__title {
  padding-top: 1px;
  font-size: 15px;
  line-height: 22px;
}

.fold__head:hover,
.fold[open] > .fold__head {
  color: var(--text);
}

.fold__body {
  padding: 2px 0 12px;
}

.stack {
  display: flex;
}

.stack > * + * {
  margin-left: -8px;
}

.stack .icon {
  outline: 2px solid var(--bg);
}

.prose {
  max-width: 68ch;
  font-size: 15px;
  line-height: 1.7;
  color: var(--prose);
  text-wrap: pretty;
}

.mention .icon {
  display: inline-block;
  margin-right: 4px;
  border-radius: 4px;
  vertical-align: -4px;
}

.mention .icon--asset {
  border-radius: 50%;
}

.mention strong {
  font-weight: 600;
  color: var(--text);
}

.mention kbd {
  padding: 0 4px;
  border: 1px solid var(--edge);
  border-radius: 4px;
  font: inherit;
  font-size: 12px;
  color: var(--muted);
}

/* Tables */

.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
}

.table thead th {
  padding: 0 0 6px;
  font-size: 13px;
  font-weight: 400;
  color: var(--faint);
  text-align: right;
  white-space: nowrap;
}

.table thead th:first-child {
  text-align: left;
}

.table tbody th,
.table td {
  padding: 6px 0;
  font-weight: 400;
  text-align: right;
  white-space: nowrap;
}

.table tbody th {
  width: 100%;
  max-width: 0;
  text-align: left;
}

.table td + td,
.table th + td,
.table th + th {
  padding-left: 12px;
}

.table__item {
  display: flex;
  align-items: center;
  gap: 10px;
}

.table__icons {
  display: flex;
  flex: none;
  gap: 4px;
}

.pick {
  display: inline-block;
  width: 44px;
  height: 4px;
  border-radius: 2px;
  vertical-align: middle;
  background: linear-gradient(to right, var(--muted) calc(var(--fill) * 100%), var(--line) 0);
}

.footer {
  font-size: 13px;
}
