/* Blades page (blades.html). Builds on site.css tokens. */
:root {
  --r-plain: #c9ccd1; --r-common: #9aa5b1; --r-uncommon: #4fc36b; --r-rare: #5b97ff;
  --r-legendary: #f0a830; --r-mythic: #d36bff; --r-limited: #ff5a6a; --r-seasonal: #3fd6d0;
}
[data-r="plain"] { --rc: var(--r-plain); } [data-r="common"] { --rc: var(--r-common); } [data-r="uncommon"] { --rc: var(--r-uncommon); }
[data-r="rare"] { --rc: var(--r-rare); } [data-r="legendary"] { --rc: var(--r-legendary); } [data-r="mythic"] { --rc: var(--r-mythic); }
[data-r="limited"] { --rc: var(--r-limited); } [data-r="seasonal"] { --rc: var(--r-seasonal); }

.pix { image-rendering: pixelated; image-rendering: crisp-edges; }

/* ---------------------------------------------------------------- hero */
.bl-hero { position: relative; overflow: hidden; padding: var(--sp-6, 40px) 0 var(--sp-5, 24px);
  background:
    radial-gradient(60% 90% at 85% 10%, color-mix(in oklch, var(--r-mythic) 22%, transparent), transparent 70%),
    radial-gradient(50% 80% at 10% 100%, color-mix(in oklch, var(--r-legendary) 14%, transparent), transparent 70%),
    var(--surface-1);
  border-bottom: 1px solid var(--border); }
.bl-hero-in { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 24px; align-items: center; }
.bl-kicker { margin: 0 0 6px; color: var(--reward); font-weight: 800; letter-spacing: .08em; text-transform: uppercase; font-size: 13px; }
.bl-hero h1 { margin: 0; font-size: clamp(44px, 8vw, 76px); line-height: 1; letter-spacing: -0.02em; }
.bl-lede { margin: 12px 0 14px; font-size: 18px; color: var(--fg-muted); max-width: 46ch; }
.bl-cmd { margin: 0; font-weight: 700; }
code { font-family: var(--font-mono); font-size: .92em; background: var(--surface-2); border: 1px solid var(--border); border-radius: 6px; padding: 1px 6px; }

.bl-showcase { position: relative; height: 230px; }
.bl-showcase img { position: absolute; width: 112px; height: 112px; filter: drop-shadow(0 8px 16px oklch(0% 0 0 / .5));
  animation: bl-float 6s var(--ease) infinite alternate; }
.bl-showcase img:nth-child(1) { left: 6%; top: 46%; animation-delay: -1s; }
.bl-showcase img:nth-child(2) { left: 28%; top: 6%; width: 136px; height: 136px; animation-delay: -3s; }
.bl-showcase img:nth-child(3) { left: 52%; top: 40%; animation-delay: -2s; }
.bl-showcase img:nth-child(4) { left: 72%; top: 2%; width: 100px; height: 100px; animation-delay: -4s; }
@keyframes bl-float { from { transform: translateY(0) rotate(-4deg); } to { transform: translateY(-12px) rotate(4deg); } }
@media (prefers-reduced-motion: reduce) { .bl-showcase img { animation: none; } }

.bl-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin: 22px 0 0; }
.bl-stats > div { background: oklch(0% 0 0 / .22); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 10px 14px; }
.bl-stats dt { font-size: 13px; color: var(--fg-muted); font-weight: 700; }
.bl-stats dd { margin: 2px 0 0; font-size: 26px; font-weight: 850; }

@media (max-width: 760px) {
  .bl-hero-in { grid-template-columns: minmax(0, 1fr); }
  .bl-showcase { height: 150px; order: -1; }
  .bl-showcase img { width: 76px; height: 76px; }
  .bl-showcase img:nth-child(2) { width: 92px; height: 92px; }
  .bl-showcase img:nth-child(4) { width: 70px; height: 70px; }
  .bl-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ---------------------------------------------------------------- layout */
.bl-main { display: grid; gap: var(--sp-5, 24px); padding-top: var(--sp-5, 24px); padding-bottom: 48px; }
.bl-status { margin: 0; color: var(--fg-muted); }
.bl-status:empty { display: none; }
.bl-status.err { color: var(--danger); }

.bl-steps { list-style: none; counter-reset: s; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; }
.bl-steps li { counter-increment: s; background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 14px; display: grid; gap: 6px; align-content: start; }
.bl-steps li::before { content: counter(s); display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--reward); color: var(--on-reward); font-weight: 900; }
.bl-steps span { color: var(--fg-muted); font-size: 15px; }
@media (max-width: 980px) { .bl-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) { .bl-steps { grid-template-columns: minmax(0, 1fr); } }

/* ---------------------------------------------------------------- crates */
.bl-crates { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; }
.bl-crate { background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px; display: grid; gap: 10px; align-content: start; }
.bl-crate.event { border-color: color-mix(in oklch, var(--r-limited) 55%, var(--border)); }
.bl-crate.closed { opacity: .72; }
.bl-crate-top { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; }
.bl-crate h3 { margin: 0; font-size: 18px; }
.bl-price { font-weight: 850; color: var(--reward); white-space: nowrap; }
.bl-crate .blurb { margin: 0; color: var(--fg-muted); font-size: 14px; }
.bl-when { font-size: 13px; font-weight: 750; color: var(--r-limited); margin: 0; }
.bl-when.open { color: var(--accent); }
.bl-bar { display: flex; height: 12px; border-radius: 999px; overflow: hidden; gap: 2px; background: var(--surface-1); }
.bl-bar span { background: var(--rc); min-width: 3px; }
.bl-odds { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; font-size: 14px; }
.bl-odds li { display: flex; justify-content: space-between; gap: 8px; }
.bl-odds .rn { color: var(--rc); font-weight: 750; }
.bl-odds .pool { color: var(--fg-muted); font-weight: 500; }

/* ---------------------------------------------------------------- value list */
.bl-tools { display: grid; gap: 6px; }
.bl-tools .seg button[data-r]::before { content: ""; display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: var(--rc); margin-right: 7px; vertical-align: 1px; }
.bl-tools .seg button[aria-pressed="true"][data-r] { background: var(--rc); border-color: var(--rc); color: #15161b; }
.bl-tools .seg button[aria-pressed="true"][data-r]::before { background: #15161b; }
.bl-tools-row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.bl-search { flex: 1 1 220px; }
.bl-search input, .bl-sort select { width: 100%; min-height: var(--tap); border-radius: var(--radius-sm); border: 1px solid var(--border-strong); background: var(--surface-2); color: var(--fg); padding: 0 12px; font: inherit; }
.bl-sort { display: flex; gap: 8px; align-items: center; color: var(--fg-muted); font-weight: 700; font-size: 14px; }
.bl-sort select { width: auto; }
.bl-count { margin: 10px 0; }

.bl-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); gap: 10px; }
.bl-card { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 4px 12px; padding: 12px; background: var(--surface-2); border: 1px solid var(--border);
  border-left: 4px solid var(--rc); border-radius: var(--radius-sm); }
.bl-card img { width: 64px; height: 64px; grid-row: span 2; background: radial-gradient(circle, color-mix(in oklch, var(--rc) 26%, transparent), transparent 70%); border-radius: 10px; }
.bl-card h3 { margin: 0; font-size: 17px; display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; }
.bl-tag { font-size: 11px; font-weight: 850; letter-spacing: .06em; text-transform: uppercase; color: var(--rc); }
.bl-val { display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; }
.bl-val strong { font-size: 22px; font-weight: 900; }
.bl-val .coins { color: var(--fg-muted); font-size: 14px; }
.bl-up { color: var(--accent); font-weight: 900; } .bl-down { color: var(--danger); font-weight: 900; }
.bl-meta { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 13px; color: var(--fg-muted); margin: 6px 0 0; }
.bl-meta b { color: var(--fg); font-weight: 750; }
.bl-desc { grid-column: 1 / -1; margin: 4px 0 0; font-size: 13px; color: var(--fg-muted); font-style: italic; }
.bl-explain { margin-top: 14px; color: var(--fg-muted); }
.bl-extinct { font-size: 11px; font-weight: 900; letter-spacing: .06em; text-transform: uppercase; color: #15161b; background: var(--r-limited); border-radius: 6px; padding: 1px 6px; }
.bl-meta a { color: var(--link); font-weight: 750; }
.bl-cta { display: inline-flex; align-items: center; gap: 8px; margin-top: 14px; min-height: 44px; padding: 0 18px; border-radius: 12px; font-weight: 850; text-decoration: none;
  background: linear-gradient(180deg, #ffc247, #f29a2e); color: #2a1600; }
.bl-explain summary { cursor: pointer; font-weight: 750; color: var(--fg); min-height: 32px; }
.bl-empty { color: var(--fg-muted); }

/* ---------------------------------------------------------------- feeds */
.bl-feed, .bl-top, .bl-sets { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.bl-feed li { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; gap: 10px; align-items: center; }
.bl-feed img { width: 40px; height: 40px; }
.bl-feed .who { font-weight: 750; }
.bl-feed .what { color: var(--rc); font-weight: 750; }
.bl-feed time { color: var(--fg-muted); font-size: 13px; white-space: nowrap; }
.bl-top { counter-reset: t; }
.bl-top li { counter-increment: t; display: grid; grid-template-columns: 28px 36px minmax(0, 1fr) auto; gap: 10px; align-items: center; }
.bl-top li::before { content: counter(t); font-weight: 900; color: var(--reward); text-align: center; }
.bl-top .n { font-weight: 850; }
.bl-top small { display: block; color: var(--fg-muted); }
.bl-two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.bl-two h3 { margin: 0 0 4px; }
.bl-sets { margin-top: 10px; }
.bl-sets li { display: flex; justify-content: space-between; gap: 10px; padding: 8px 12px; background: var(--surface-2); border-radius: var(--radius-sm); border-left: 4px solid var(--rc); }
.bl-sets .rn { color: var(--rc); font-weight: 800; }
@media (max-width: 700px) { .bl-two { grid-template-columns: minmax(0, 1fr); } }

.bl-foot { padding: 18px 0 calc(var(--tabbar-h, 0px) + 18px); color: var(--fg-muted); font-size: 13px; }
