/* ---------------- Buttons ---------------- */
.btn {
  --h: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: var(--h);
  padding: 0 22px;
  border-radius: var(--pill);
  font-family: var(--ui);
  font-weight: 700;
  font-size: 15px;
  letter-spacing: -0.01em;
  white-space: nowrap;
  transition: transform 0.2s var(--ease-out), background-color 0.2s, border-color 0.2s, box-shadow 0.25s;
  -webkit-tap-highlight-color: transparent;
}
.btn img {
  width: 20px;
  height: 20px;
  transition: transform 0.35s var(--ease-spring);
}
.btn:active {
  transform: scale(0.97);
}
.btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}
.btn--sm {
  --h: 40px;
  padding: 0 16px;
  font-size: 14px;
}
.btn--lg {
  --h: 56px;
  padding: 0 28px;
  font-size: 16px;
}
.btn--light {
  background: var(--paper);
  color: var(--ink);
  box-shadow: 0 10px 30px -12px rgba(255, 124, 1, 0);
}
.btn--light:hover {
  background: #fff;
  transform: translateY(-1px);
  box-shadow: 0 14px 34px -12px rgba(255, 124, 1, 0.55);
}
.btn--light:hover img {
  transform: rotate(-12deg) scale(1.12);
}
.btn--ghost {
  background: rgba(29, 29, 29, 0.86);
  border: 1px solid var(--line);
  color: var(--paper);
}
.btn--ghost:hover:not(:disabled) {
  border-color: #5c5c5c;
  background: var(--graphite-2);
}

.icon-btn {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: rgba(18, 18, 18, 0.8);
  transition: border-color 0.2s;
}
.icon-btn svg {
  width: 16px;
  height: 16px;
}
.icon-btn:hover {
  border-color: #5c5c5c;
}

.text-link {
  color: var(--crate-hi);
  font-weight: 700;
  background: linear-gradient(currentColor, currentColor) 0 100% / 0 1.5px no-repeat;
  transition: background-size 0.3s var(--ease-out);
}
.text-link:hover {
  background-size: 100% 1.5px;
}

/* ---------------- Pills / eyebrows ---------------- */
.pill,
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 34px;
  padding: 0 14px 0 12px;
  border-radius: var(--pill);
  background: var(--graphite);
  border: 1px solid var(--line-soft);
  font-size: 13px;
  font-weight: 700;
  color: var(--paper);
}
.pill__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--crate);
  box-shadow: 0 0 0 4px rgba(255, 124, 1, 0.16);
}
.pill--live .pill__dot {
  animation: live 2s ease-in-out infinite;
}
@keyframes live {
  50% {
    box-shadow: 0 0 0 7px rgba(255, 124, 1, 0);
  }
}
.pill--sealed {
  border-color: rgba(255, 124, 1, 0.45);
  background: rgba(255, 124, 1, 0.08);
  color: var(--crate-hi);
}

/* ---------------- Contract chip ---------------- */
.ca-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 40px;
  padding: 0 12px 0 6px;
  border-radius: var(--r-sm);
  border: 1px solid var(--line);
  background: rgba(18, 18, 18, 0.8);
  font-size: 12.5px;
  font-weight: 700;
  color: var(--paper);
  transition: border-color 0.2s;
}
.ca-chip:hover {
  border-color: #5c5c5c;
}
.ca-chip__k {
  padding: 3px 7px;
  border-radius: 7px;
  background: rgba(255, 124, 1, 0.14);
  color: var(--crate);
  font-size: 11px;
}
.ca-chip .ico {
  width: 14px;
  height: 14px;
  color: var(--mute);
}
.ca-chip.is-copied {
  border-color: var(--done);
}
.ca-chip.is-copied .ca-chip__v {
  color: var(--done);
}
.ca-chip--full {
  margin-top: 12px;
  max-width: 100%;
}
.ca-chip--full .ca-chip__v {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ---------------- Meter (from the game's pip progress) ---------------- */
.meter {
  display: flex;
  gap: 6px;
  align-items: center;
}
.pip {
  width: 15px;
  height: 24px;
  border-radius: 5px;
  background: #242424;
  border: 1px solid #333;
  transition: background-color 0.35s, border-color 0.35s, box-shadow 0.35s, transform 0.35s var(--ease-spring);
  transition-delay: calc(var(--i) * 25ms);
}
.pip.is-on {
  background: var(--tier, var(--crate));
  border-color: transparent;
  box-shadow: 0 0 14px -2px color-mix(in srgb, var(--tier, var(--crate)) 60%, transparent);
}
[data-tier='platinum'] .pip.is-on {
  background: var(--holo);
  background-size: 1000% 100%;
  background-position: calc(var(--i) * 11%) 0;
}
.pip.is-sealed {
  background: linear-gradient(100deg, #202020 30%, #353535 50%, #202020 70%);
  background-size: 400% 100%;
  animation: shimmer 2.6s linear infinite;
  animation-delay: calc(var(--i) * 90ms);
}
@keyframes shimmer {
  from {
    background-position: 100% 0;
  }
  to {
    background-position: 0 0;
  }
}
.meter--sm {
  gap: 4px;
}
.meter--sm .pip {
  width: 11px;
  height: 18px;
  border-radius: 4px;
}

/* ---------------- Range ---------------- */
.range {
  --pct: 50%;
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 32px;
  background: transparent;
  cursor: pointer;
}
.range::-webkit-slider-runnable-track {
  height: 8px;
  border-radius: var(--pill);
  background: linear-gradient(90deg, var(--crate) var(--pct), #2c2c2c var(--pct));
}
.range::-moz-range-track {
  height: 8px;
  border-radius: var(--pill);
  background: #2c2c2c;
}
.range::-moz-range-progress {
  height: 8px;
  border-radius: var(--pill);
  background: var(--crate);
}
.range::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 26px;
  height: 26px;
  margin-top: -9px;
  border-radius: 50%;
  background: var(--paper);
  border: 5px solid var(--crate);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.5);
  transition: transform 0.2s var(--ease-spring);
}
.range::-moz-range-thumb {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--paper);
  border: 5px solid var(--crate);
}
.range:active::-webkit-slider-thumb {
  transform: scale(1.15);
}
.range:focus-visible {
  outline: none;
}
.range:focus-visible::-webkit-slider-thumb {
  box-shadow: 0 0 0 4px rgba(255, 124, 1, 0.35);
}
.range:focus-visible::-moz-range-thumb {
  box-shadow: 0 0 0 4px rgba(255, 124, 1, 0.35);
}

/* ---------------- Panels ---------------- */
.panel {
  background: var(--graphite);
  border: 1px solid var(--line-soft);
  border-radius: var(--r-xl);
  padding: clamp(22px, 3vw, 30px);
}
.panel__title {
  font-family: var(--display);
  font-weight: 800;
  font-size: 22px;
  letter-spacing: -0.02em;
  line-height: 1.15;
}
.panel__sub {
  margin-top: 6px;
  color: var(--mute);
  font-size: 14.5px;
}
.panel__foot {
  margin-top: 18px;
  color: var(--mute);
  font-size: 13.5px;
}

/* ---------------- Section headings ---------------- */
.section {
  position: relative;
  padding-block: var(--section-y);
}
.section-head {
  max-width: 640px;
  display: grid;
  gap: 18px;
  justify-items: start;
  margin-bottom: clamp(36px, 5vw, 60px);
}
.section-head--center {
  margin-inline: auto;
  text-align: center;
  justify-items: center;
}
.h2 {
  font-family: var(--display);
  font-weight: 900;
  font-size: clamp(36px, 4.8vw, 62px);
  line-height: 0.98;
  letter-spacing: -0.035em;
  text-wrap: balance;
}
.lede {
  color: var(--soft);
  font-size: clamp(16px, 1.3vw, 18px);
  max-width: 36em;
  text-wrap: pretty;
}
.fineprint {
  margin-top: 18px;
  text-align: center;
  color: var(--mute);
  font-size: 13px;
}
