:root {
  color-scheme: dark;
  /* surfaces */
  --ground: #000000;
  --band: #000000;
  --card: #0C0C0C;
  --card-2: #141414;
  --raised: #1F1F1F;
  --line: #262626;
  --line-2: #1A1A1A;
  --soft: #161616;
  /* text */
  --ink: #FFFFFF;
  --ink-2: #E5E5E5;
  --muted: #A3A3A3;
  /* purple accent */
  --accent: #8B5CF6;
  --accent-hi: #A78BFA;
  --accent-text: #C4B5FD;
  --accent-soft: #2A1650;
  /* results */
  --green-text: #34D399;
  --red-text: #F87171;
  --red: #F43F5E;
  --mono: "JetBrains Mono", ui-monospace, monospace;
  --display: "Bricolage Grotesque", system-ui, sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--ground); color: var(--ink); font: 15px/1.45 Inter, system-ui, sans-serif; }
a { color: var(--accent-text); text-decoration: none; }
a:hover { text-decoration: underline; }
img { display: block; max-width: 100%; }
button { font: inherit; cursor: pointer; }
.wrap { max-width: 1280px; margin: 0 auto; padding: 0 32px; }
@media (max-width: 640px) { .wrap { padding: 0 16px; } }
.mono { font-family: var(--mono); }
.label { font-family: var(--mono); font-size: 11px; font-weight: 700; letter-spacing: 1.2px; color: var(--muted); text-transform: uppercase; }
.pos { color: var(--green-text); }
.neg { color: var(--red-text); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* top band */
.band { background: var(--band); color: var(--ink); border-bottom: 1px solid var(--line); }
.ticker { border-bottom: 1px solid var(--line-2); overflow: hidden; }
.ticker .wrap { display: flex; gap: 28px; align-items: center; white-space: nowrap; padding-top: 8px; padding-bottom: 8px; font: 12px var(--mono); overflow: hidden; }
.ticker .tag { display: flex; align-items: center; gap: 6px; font-weight: 700; color: var(--accent-hi); flex: none; }
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--red); display: inline-block; }
.ticker span.item { color: var(--muted); }
.ticker span.item b { color: var(--ink); }
header.top .wrap { display: flex; flex-wrap: wrap; align-items: center; gap: 20px; padding-top: 16px; padding-bottom: 16px; }
.logo { display: flex; align-items: center; gap: 10px; color: var(--ink); font: 800 24px var(--display); letter-spacing: -0.5px; }
.logo:hover { text-decoration: none; }
nav.main { display: flex; flex-wrap: wrap; gap: 4px; flex: 1 1 auto; }
nav.main a { padding: 10px 14px; border-radius: 10px; color: var(--muted); font-weight: 500; }
nav.main a.on { background: var(--accent-soft); color: var(--accent-text); font-weight: 600; }
nav.main a:hover { text-decoration: none; color: var(--ink); }
.btn { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 12px 18px; border-radius: 12px; font-weight: 700; border: none; }
.btn:hover { text-decoration: none; }
.btn-accent { background: var(--accent); color: #fff; }
.btn-accent:hover { background: #7C4DEB; }
.btn-ghost { border: 1px solid var(--line); color: var(--ink); font-weight: 600; }
.btn-ghost:hover { border-color: var(--accent-hi); }
.btn-dark { background: var(--accent); color: #fff; }

.hero .wrap { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(300px, 1fr); gap: 40px; align-items: center; padding-top: 28px; padding-bottom: 60px; }
.hero .copy { min-width: 0; }
@media (max-width: 800px) { .hero .wrap { grid-template-columns: 1fr; gap: 28px; } .hero-card { max-width: none !important; } }
.kicker { margin: 0 0 12px; font: 700 12px var(--mono); letter-spacing: 1.5px; color: var(--accent-hi); }
.hero h1 { margin: 0; font: 800 clamp(38px, 5.2vw, 56px)/1.03 var(--display); letter-spacing: -1.5px; }
.hero h1 em { font-style: normal; color: var(--accent-hi); }
@media (max-width: 640px) { .hero h1 { font-size: 38px; } }
.hero p.sub { margin: 16px 0 0; color: var(--ink-2); font-size: 18px; max-width: 540px; }
.hero .ctas { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }
.hero .small { margin: 18px 0 0; font-size: 13px; color: var(--muted); }

.hero-card { max-width: 460px; width: 100%; justify-self: end; background: var(--card-2); border: 2px solid var(--accent); box-shadow: 0 0 0 6px var(--accent-soft); border-radius: 22px; padding: 22px; color: var(--ink); display: flex; flex-direction: column; gap: 14px; }
.hero-card:hover { text-decoration: none; border-color: var(--accent-hi); }
.hero-card .row { display: flex; gap: 14px; align-items: center; }
.hero-card .big { font: 700 50px/1 var(--mono); color: var(--accent-hi); }
.hero-card .grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; padding-top: 14px; border-top: 1px solid var(--line); }
.hero-card .k { font-size: 12px; color: var(--muted); }
.hero-card .v { font: 700 15px var(--mono); }
.pill { display: inline-block; font-size: 12px; font-weight: 700; padding: 3px 10px; border-radius: 999px; white-space: nowrap; }
.pill-green { background: #0F2E24; color: #6EE7B7; }
.pill-green-dark { background: #0F2E24; color: #6EE7B7; }
.pill-grey { background: var(--soft); color: var(--ink-2); }
.pill-accent { background: var(--accent); color: #fff; }
.pill-red { background: #3A1519; color: #FCA5A5; }

.slab { background: #000000; border-radius: 8px; overflow: hidden; flex: none; display: flex; align-items: center; justify-content: center; }
.slab img { width: 100%; height: 100%; object-fit: contain; }
.slab.ph { background: var(--raised); }

main { padding-bottom: 40px; }
main > .wrap { display: flex; flex-direction: column; gap: 28px; }
.panel { background: var(--card); border: 1px solid var(--line); border-radius: 20px; }
.summary { margin-top: -28px; display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); box-shadow: 0 10px 30px rgba(139, 92, 246, 0.12); overflow: hidden; }
.summary > div { padding: 16px 20px; border-right: 1px solid var(--line-2); }
.summary > div:last-child { border-right: none; }
.summary .num { font: 700 24px var(--mono); }

h2.sec { margin: 0; font: 800 26px var(--display); }
.sec-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px; }
.sec-head p { margin: 2px 0 0; font-size: 14px; color: var(--muted); }

.controls { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; padding: 12px 20px 16px; border-bottom: 1px solid var(--line); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { min-height: 40px; padding: 8px 14px; border-radius: 10px; font-weight: 600; font-size: 14px; background: var(--card-2); color: var(--ink-2); border: 1px solid var(--line); }
.chip[aria-pressed="true"] { background: var(--accent); color: #fff; border-color: var(--accent); }
.seg { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; background: var(--soft); padding: 4px; border-radius: 12px; }
.seg span { font-size: 13px; color: var(--muted); padding: 0 8px; }
.seg button { min-height: 36px; padding: 6px 12px; border-radius: 9px; border: none; font-weight: 600; font-size: 14px; background: transparent; color: var(--muted); }
.seg button:hover { color: var(--ink); }
.seg button[aria-pressed="true"] { background: var(--raised); color: var(--ink); box-shadow: inset 0 0 0 1px var(--accent); }

.note { margin: 14px 20px 0; padding: 10px 14px; border-radius: 12px; background: #231A0C; border: 1px solid #5C4512; font-size: 13px; color: #F3D9A4; }
.warnbox { padding: 16px 20px; background: #231A0C; border: 1px solid #5C4512; border-radius: 16px; font-size: 14px; color: #F3D9A4; }
.warnbox strong { color: #FFF1D6; }

.table { overflow-x: auto; margin-top: 10px; }
.table .inner { min-width: 1040px; }
.trow { display: grid; grid-template-columns: 36px 2.1fr 0.7fr 1.25fr 1.5fr 0.85fr 1.6fr; gap: 12px; align-items: center; padding: 12px 20px; border-bottom: 1px solid var(--line-2); color: var(--ink); }
.thead { background: var(--band); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding-top: 10px; padding-bottom: 10px; }
a.trow:hover { background: var(--card-2); text-decoration: none; }
.mach { display: flex; align-items: center; gap: 12px; min-width: 0; }
.mach .thumb { width: 40px; height: 40px; border-radius: 8px; flex: none; object-fit: cover; background: var(--soft); border: 1px solid var(--line); }
.mach .name { font-weight: 600; }
.mach .sub { font-size: 13px; color: var(--muted); }
.r { text-align: right; }
.bestcard { display: flex; align-items: center; gap: 10px; min-width: 0; }
.bestcard .slab { width: 34px; height: 46px; border-radius: 5px; }
.bestcard .t { font-size: 13px; font-weight: 600; line-height: 1.25; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.bar { height: 6px; background: var(--line-2); border-radius: 3px; overflow: hidden; margin-top: 6px; }
.bar > i { display: block; height: 100%; background: var(--accent); border-radius: 3px; }
.foot { padding: 12px 20px; font-size: 13px; color: var(--muted); }
.unranked { background: var(--band); border-top: 1px solid var(--line); }
.unranked .head { padding: 16px 20px 6px; display: flex; flex-wrap: wrap; gap: 10px; align-items: baseline; }
.unranked .head h3 { margin: 0; font: 800 17px var(--display); }
.unranked .item { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; padding: 12px 20px; border-top: 1px solid var(--line-2); }

.pulls { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 14px; }
.pull { background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 14px; display: flex; flex-direction: column; gap: 10px; color: var(--ink); }
.pull .frame { position: relative; aspect-ratio: 5 / 7; border-radius: 12px; border: 2px solid var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); background: #000000; overflow: hidden; }
.pull .frame img { width: 100%; height: 100%; object-fit: contain; }
.pull .rank { position: absolute; top: 8px; left: 8px; width: 28px; height: 28px; border-radius: 50%; background: var(--accent); color: #fff; display: flex; align-items: center; justify-content: center; font: 700 13px var(--mono); }
.pull .nm { font-weight: 600; font-size: 14px; line-height: 1.3; }
.pull .meta { font-size: 12px; color: var(--muted); }
.pull .val { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.pull .val b { font: 700 20px var(--mono); }
.mult { font: 700 12px var(--mono); color: #6EE7B7; background: #0F2E24; padding: 2px 7px; border-radius: 6px; }
.pull .when { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); border-top: 1px solid var(--line-2); padding-top: 8px; }

.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; }
.step { background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 20px; }
.step .label { color: var(--accent-hi); }
.step h3 { margin: 6px 0 4px; font: 800 20px var(--display); }
.step p { margin: 0; color: var(--ink-2); }
.step.dark { background: var(--accent-soft); border: 1px solid var(--accent); color: var(--ink); }
.step.dark .label { color: var(--accent-text); }
.step.dark p { color: var(--ink-2); }

.disc { padding: 24px; }
.disc h2 { margin: 0 0 14px; font: 800 22px var(--display); }
.disc .grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px 32px; font-size: 14px; color: var(--ink-2); }
.disc .grid strong { color: var(--ink); }
.help { margin-top: 18px; padding: 14px 16px; border-radius: 12px; background: var(--accent-soft); border: 1px solid var(--accent); color: var(--ink); display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; font-size: 14px; }
.help span { color: var(--ink-2); }
.help a { color: var(--accent-text); }

footer.site { border-top: 1px solid var(--line); background: var(--band); }
footer.site .wrap { display: flex; flex-wrap: wrap; gap: 8px 20px; justify-content: space-between; padding-top: 18px; padding-bottom: 28px; font-size: 13px; color: var(--muted); }

.loading { padding: 40px 20px; text-align: center; color: var(--muted); }
.error { padding: 16px 20px; color: var(--red-text); }

/* machine page */
.mhead { display: flex; flex-wrap: wrap; gap: 20px; align-items: center; justify-content: space-between; }
.mhead .left { display: flex; gap: 18px; align-items: center; }
.mhead img.thumb { width: 72px; height: 72px; border-radius: 12px; object-fit: cover; border: 2px solid var(--accent); background: var(--raised); }
.mhead h1 { margin: 0; font: 800 36px var(--display); letter-spacing: -0.8px; }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; }
.kpi { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 16px 18px; }
.kpi .n { font: 700 28px var(--mono); }
.kpi .s { font-size: 13px; color: var(--muted); }
.tiers { padding: 20px; display: flex; flex-direction: column; gap: 14px; }
.tier .top { display: flex; justify-content: space-between; gap: 12px; font-size: 14px; margin-bottom: 6px; flex-wrap: wrap; }
.tier .bar { height: 10px; border-radius: 5px; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 14px; padding: 0 20px 20px; }
.cardtile { display: flex; flex-direction: column; gap: 8px; }
.cardtile .frame { aspect-ratio: 5 / 7; border-radius: 10px; border: 2px solid var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); background: #000000; overflow: hidden; }
.cardtile .frame img { width: 100%; height: 100%; object-fit: contain; }
.cardtile .nm { font-size: 13px; font-weight: 600; line-height: 1.3; }
.cardtile .v { font: 700 16px var(--mono); }

.avg { font: 700 10px var(--mono); letter-spacing: 0.6px; text-transform: uppercase; opacity: 0.7; margin-right: 5px; vertical-align: 0.15em; }
.big .avg { font-size: 14px; vertical-align: 0.6em; }
.heroslab { width: 54px; height: 74px; }

.rr { display: flex; flex-direction: column; gap: 5px; }
.rr-top { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.rr-badge { font: 700 12px Inter, system-ui, sans-serif; padding: 2px 9px; border-radius: 999px; }
.rr-good { background: #0F2E24; color: #6EE7B7; }
.rr-ok { background: #1C2A14; color: #B5E48C; }
.rr-thin { background: #33270C; color: #F8CF6B; }
.rr-bad { background: #3A1519; color: #FCA5A5; }
.rr-na { background: var(--soft); color: var(--ink-2); }
.split { display: grid; grid-template-columns: 1fr 1fr; height: 8px; gap: 2px; }
.split .l { display: flex; justify-content: flex-end; background: var(--line-2); border-radius: 4px 0 0 4px; overflow: hidden; }
.split .r { display: flex; background: var(--line-2); border-radius: 0 4px 4px 0; overflow: hidden; }
.split .l i { background: #F87171; display: block; height: 100%; }
.split .r i { background: #34D399; display: block; height: 100%; }
.rr-legend { display: flex; flex-wrap: wrap; gap: 14px; font-size: 13px; color: var(--ink-2); margin-top: 8px; }
.rr-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 6px; vertical-align: -1px; }
.rrpanel { padding: 20px; display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; align-items: start; }
.rrpanel .line { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line-2); font-size: 14px; }
.rrpanel .line:last-child { border-bottom: none; }
.rrbars { display: flex; flex-direction: column; gap: 4px; }
.rrbar { display: grid; grid-template-columns: 150px 1fr 140px; align-items: center; gap: 14px; padding: 8px 6px; border-radius: 8px; color: var(--ink); text-decoration: none; }
a.rrbar:hover { background: #141414; }
.rrbar .nm { font-weight: 600; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rrbar .track { position: relative; height: 12px; background: #1A1A1A; border-radius: 6px; }
.rrbar .track i { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 6px; }
.rrbar .track b { position: absolute; top: -5px; bottom: -5px; border-left: 2px dashed #E5E5E5; }
.rrbar .val { display: flex; align-items: center; justify-content: flex-end; gap: 8px; font-size: 14px; font-weight: 700; }
.rrscale { padding-top: 0; }
.rrscale .track { background: none; height: 18px; }
.rrscale .track b { top: -6px; bottom: 12px; }
.rrscale em { position: absolute; top: 4px; transform: translateX(-50%); font-style: normal; font-size: 12px; color: var(--ink-2); white-space: nowrap; }
.rrbar .go { color: var(--muted); font-weight: 400; }
a.rrbar:hover .go { color: var(--accent-hi); }
.rrnote { font-size: 13px; color: var(--muted); margin: 6px 0 0; }
@media (max-width: 640px) {
  .rrbar { grid-template-columns: 1fr auto; gap: 6px 10px; }
  .rrbar .nm { grid-column: 1; }
  .rrbar .val { grid-column: 2; grid-row: 1; }
  .rrbar .track { grid-column: 1 / -1; }
  .rrscale span:empty { display: none; }
}

.disc-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 10px 32px; font-size: 14px; color: var(--ink-2); }
.disc-list strong { color: var(--ink); }
.trow { grid-template-columns: 36px 2.2fr 0.7fr 1.3fr 1.2fr 1.6fr; }
.table .inner { min-width: 880px; }

.chip .n { opacity: .6; font-weight: 500; margin-left: 2px; }
.rrmore { margin-top: 12px; background: transparent; border: 1px solid #2A2A2A; color: var(--ink); }
.rrmore:hover { border-color: var(--accent); }
a.rrbar:hover, a.rrbar:hover * { text-decoration: none; }

/* ---------- Demo pull ---------- */
.demo { padding: 20px; }
.demo-head p { margin: 4px 0 0; color: var(--ink-2); font-size: 14px; }
.demo-body { display: grid; grid-template-columns: minmax(0, 1fr) 260px; gap: 24px; align-items: center; margin-top: 16px; }
@media (max-width: 720px) { .demo-body { grid-template-columns: 1fr; } }
.stage { position: relative; height: 340px; border-radius: 16px; background: radial-gradient(circle at 50% 45%, #1A1030 0%, #050505 70%); display: grid; place-items: center; overflow: hidden; }
.pack { --glow: #8B5CF6; position: relative; width: 170px; height: 250px; border-radius: 12px; transition: transform .3s, opacity .3s, filter .3s; }
.pack .foil { position: absolute; inset: 0; border-radius: 12px; padding: 22px 14px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; text-align: center; color: #fff;
  background: linear-gradient(135deg, #5B21B6 0%, #8B5CF6 35%, #C4B5FD 50%, #8B5CF6 65%, #4C1D95 100%); background-size: 220% 220%; animation: foil 4s linear infinite;
  box-shadow: inset 0 0 0 2px rgba(255,255,255,.25), 0 10px 30px rgba(0,0,0,.6); }
.pack .foil::before, .pack .foil::after { content: ""; position: absolute; left: 0; right: 0; height: 12px; background: repeating-linear-gradient(90deg, rgba(255,255,255,.35) 0 4px, transparent 4px 8px); }
.pack .foil::before { top: 0; border-radius: 12px 12px 0 0; }
.pack .foil::after { bottom: 0; border-radius: 0 0 12px 12px; }
.pack .flap { position: absolute; left: 0; right: 0; top: 0; height: 34px; border-radius: 12px 12px 0 0; z-index: 2; background: linear-gradient(135deg, #6D28D9, #A78BFA); box-shadow: inset 0 -2px 0 rgba(0,0,0,.25); transform-origin: 10% 100%; opacity: 0; }
.pack .brand { font: 800 15px var(--display); letter-spacing: .5px; opacity: .9; }
.pack .pname { font: 800 18px/1.15 var(--display); }
.pack .pprice { font: 700 14px var(--mono); }
.pack .demo-tag { margin-top: 6px; font: 700 10px var(--mono); letter-spacing: 2px; padding: 3px 8px; border-radius: 99px; background: rgba(0,0,0,.35); }
@keyframes foil { to { background-position: 220% 0; } }
.pack.shake { animation: shake .9s ease-in-out; }
@keyframes shake { 0%,100% { transform: rotate(0) } 15% { transform: rotate(-6deg) } 30% { transform: rotate(6deg) } 45% { transform: rotate(-5deg) } 60% { transform: rotate(5deg) } 75% { transform: rotate(-3deg) translateY(-4px) } 90% { transform: rotate(2deg) } }
.pack.charge { filter: drop-shadow(0 0 22px var(--glow)) brightness(1.15); transform: scale(1.05); }
.pack.tear .flap { opacity: 1; animation: tear .45s ease-in forwards; }
@keyframes tear { to { transform: translate(60px, -140px) rotate(35deg); opacity: 0; } }
.pack.gone { transform: translateY(80px) scale(.9); opacity: 0; }
.reveal { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; gap: 22px; padding: 16px; }
.reveal::before { content: ""; position: absolute; width: 320px; height: 320px; border-radius: 50%; background: radial-gradient(circle, var(--glow) 0%, transparent 65%); opacity: 0; transition: opacity .6s; }
.reveal.in::before { opacity: .35; }
.flip { position: relative; width: 150px; height: 230px; perspective: 900px; transform: translateY(60px) scale(.8); opacity: 0; transition: transform .6s cubic-bezier(.2,1.4,.4,1), opacity .4s; flex: none; }
.reveal.in .flip { transform: none; opacity: 1; }
.flip .face { position: absolute; inset: 0; border-radius: 10px; backface-visibility: hidden; transition: transform .6s; overflow: hidden; }
.flip .back { background: repeating-linear-gradient(45deg, #2E1065 0 10px, #3B0764 10px 20px); border: 2px solid #8B5CF6; display: grid; place-items: center; color: #C4B5FD; font: 800 16px var(--display); }
.flip .front { transform: rotateY(180deg); background: #0C0C0C; border: 2px solid var(--glow); box-shadow: 0 0 24px var(--glow); }
.flip .front img { width: 100%; height: 100%; object-fit: contain; }
.flip .noimg { padding: 12px; font-size: 13px; display: grid; place-items: center; height: 100%; text-align: center; }
.reveal.flipped .back { transform: rotateY(-180deg); }
.reveal.flipped .front { transform: rotateY(0); }
.result { position: relative; max-width: 220px; opacity: 0; transform: translateX(-10px); transition: opacity .4s .5s, transform .4s .5s; }
.reveal.flipped .result { opacity: 1; transform: none; }
.result .tiername { font: 800 22px var(--display); }
.result .cname { font-size: 14px; color: var(--ink-2); margin: 4px 0 10px; }
.result .vals { display: flex; gap: 14px; align-items: baseline; font-size: 14px; flex-wrap: wrap; }
.result .vals > .mono { font-size: 20px; font-weight: 700; }
@media (max-width: 520px) { .reveal { flex-direction: column; gap: 10px; } .flip { width: 110px; height: 170px; } .result { text-align: center; } .result .vals { justify-content: center; } .stage { height: 380px; } }
.demo-side { display: flex; flex-direction: column; gap: 14px; }
.demo-btn { width: 100%; justify-content: center; font-size: 16px; min-height: 48px; }
.demo-btn:disabled { opacity: .6; cursor: default; }
.tally { display: flex; flex-direction: column; }
.trow2 { display: flex; justify-content: space-between; padding: 7px 0; border-bottom: 1px solid var(--line-2); font-size: 14px; }
.trow2:last-child { border-bottom: none; }
.demo-note { margin: 0; font-size: 13px; color: var(--muted); }
@media (prefers-reduced-motion: reduce) { .pack .foil { animation: none; } }

/* ---------- Demo shelf + modal (home) ---------- */
.btn-demo { background: transparent; color: var(--ink); border: 2px solid var(--accent); box-shadow: 0 0 18px rgba(139,92,246,.35); cursor: pointer; }
.btn-demo:hover { background: rgba(139,92,246,.15); }
.btn-demo svg { color: var(--accent-hi); }
.shelf-panel { padding: 20px; }
.shelf { display: grid; grid-template-columns: repeat(auto-fit, minmax(118px, 1fr)); gap: 12px; margin-top: 14px; }
@media (max-width: 640px) { .shelf { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 6px; } .shelf-pack { flex: 0 0 132px; scroll-snap-align: start; } }
.shelf-pack { --hue: 265; display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 14px 8px 12px; border-radius: 14px; border: 1px solid #222; background: #0A0A0A; color: var(--ink); cursor: pointer; font: inherit; transition: transform .2s, border-color .2s, box-shadow .2s; }
.shelf-pack:hover, .shelf-pack:focus-visible { transform: translateY(-4px); border-color: var(--accent); box-shadow: 0 8px 24px rgba(139,92,246,.3); outline: none; }
.shelf-pack:hover .mini { animation: wiggle .5s ease-in-out; }
@keyframes wiggle { 25% { transform: rotate(-4deg) } 75% { transform: rotate(4deg) } }
.mini { position: relative; width: 84px; height: 120px; border-radius: 8px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; padding: 10px 6px; text-align: center; color: #fff;
  background: linear-gradient(135deg, hsl(var(--hue) 70% 32%) 0%, hsl(var(--hue) 85% 62%) 40%, hsl(var(--hue) 90% 82%) 52%, hsl(var(--hue) 85% 62%) 64%, hsl(var(--hue) 70% 28%) 100%); background-size: 220% 220%; animation: foil 5s linear infinite;
  box-shadow: inset 0 0 0 1.5px rgba(255,255,255,.25), 0 6px 16px rgba(0,0,0,.6); }
.mini::before, .mini::after { content: ""; position: absolute; left: 0; right: 0; height: 7px; background: repeating-linear-gradient(90deg, rgba(255,255,255,.35) 0 3px, transparent 3px 6px); }
.mini::before { top: 0; border-radius: 8px 8px 0 0; } .mini::after { bottom: 0; border-radius: 0 0 8px 8px; }
.mini-brand { font: 800 9px var(--display); opacity: .85; }
.mini-name { font: 800 12px/1.1 var(--display); }
.mini-price { font: 700 10px var(--mono); }
.shelf-cta { font-weight: 700; font-size: 14px; color: var(--accent-hi); }
.shelf-sub { font-size: 11px; color: var(--muted); text-align: center; }
.demo-modal { width: min(860px, calc(100vw - 24px)); max-height: calc(100vh - 24px); padding: 0; border: 1px solid #2A2A2A; border-radius: 18px; background: var(--card, #0C0C0C); color: var(--ink); overflow: auto; }
.demo-modal::backdrop { background: rgba(0,0,0,.75); backdrop-filter: blur(3px); }
.demo-modal .demo { border: none; margin: 0; }
.modal-x { position: absolute; top: 10px; right: 12px; z-index: 5; width: 40px; height: 40px; border-radius: 50%; border: 1px solid #2A2A2A; background: #111; color: var(--ink); font-size: 22px; line-height: 1; cursor: pointer; }
.modal-more { display: block; padding: 0 20px 20px; font-weight: 600; font-size: 14px; }
@media (prefers-reduced-motion: reduce) { .mini { animation: none; } .shelf-pack:hover .mini { animation: none; } }

/* ---------- Token ---------- */
.token { position: relative; overflow: hidden; display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(220px, 1fr); gap: 24px; align-items: center; padding: 28px;
  border: 1px solid rgba(139,92,246,.5); background: radial-gradient(circle at 85% 40%, rgba(139,92,246,.28), transparent 55%), radial-gradient(circle at 95% 90%, rgba(245,196,81,.14), transparent 45%), var(--card, #0C0C0C); }
.token-h { margin: 0; font: 800 clamp(32px, 4.4vw, 48px)/1.05 var(--display); letter-spacing: -1px; }
.token-h .tk { color: var(--accent-hi); }
.token-h .cardstk { color: #F5C451; }
.token-sub { margin: 12px 0 0; color: var(--ink-2); font-size: 17px; max-width: 460px; }
.token-steps { list-style: none; margin: 18px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.token-steps li { display: flex; align-items: center; gap: 8px; padding: 8px 14px 8px 8px; border-radius: 99px; background: #141414; border: 1px solid #262626; font-weight: 600; font-size: 14px; }
.token-steps b { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--accent); color: #fff; font: 700 12px var(--mono); }
.token-ctas { margin-top: 20px; display: flex; gap: 10px; flex-wrap: wrap; }
.token-buy[aria-disabled="true"] { opacity: .75; cursor: default; pointer-events: none; }
.token-art { display: flex; align-items: center; justify-content: center; gap: 14px; }
.coin { width: 118px; height: 118px; border-radius: 50%; display: grid; place-items: center; font: 800 14px var(--display); color: #fff; text-align: center; padding: 8px; flex: none; animation: bob 3.2s ease-in-out infinite; }
.coin-a { background: radial-gradient(circle at 35% 30%, #C4B5FD, #7C3AED 55%, #3B0764); box-shadow: 0 0 0 4px rgba(167,139,250,.25), 0 0 40px rgba(139,92,246,.55); }
.coin-b { background: radial-gradient(circle at 35% 30%, #FDE68A, #F5C451 50%, #92400E); color: #1C1100; box-shadow: 0 0 0 4px rgba(245,196,81,.25), 0 0 40px rgba(245,196,81,.45); animation-delay: -1.6s; }
.flow { display: flex; gap: 6px; }
.flow i { width: 8px; height: 8px; border-radius: 50%; background: #F5C451; opacity: .25; animation: flow 1.2s infinite; }
.flow i:nth-child(2) { animation-delay: .2s; } .flow i:nth-child(3) { animation-delay: .4s; }
@keyframes flow { 50% { opacity: 1; transform: scale(1.3); } }
@keyframes bob { 50% { transform: translateY(-6px); } }
.token-small { grid-column: 1 / -1; margin: 0; font-size: 12px; color: var(--muted); }
@media (max-width: 720px) { .token { grid-template-columns: 1fr; padding: 22px; } .token-art { order: -1; } .coin { width: 92px; height: 92px; font-size: 12px; } }
@media (prefers-reduced-motion: reduce) { .coin, .flow i { animation: none; } }

/* Sort direction arrow on the active "Rank by" button */
.seg .dir-btn { margin-left: 4px; border: 1px solid #2A2A2A; color: var(--ink); background: #141414; white-space: nowrap; }
.seg .dir-btn:hover { border-color: var(--accent); }

/* Demo: 1 or 3 packs side by side */
.slots { display: flex; width: 100%; height: 100%; align-items: stretch; justify-content: center; gap: 10px; padding: 0 10px; }
.slot { position: relative; flex: 1 1 0; min-width: 0; display: grid; place-items: center; }
.slots.n3 .pack { width: 112px; height: 166px; }
.slots.n3 .pack .foil { padding: 14px 8px; gap: 5px; }
.slots.n3 .pack .brand { font-size: 11px; }
.slots.n3 .pack .pname { font-size: 13px; }
.slots.n3 .pack .pprice { font-size: 11px; }
.slots.n3 .pack .demo-tag { font-size: 8px; padding: 2px 6px; }
.slots.n3 .pack .flap { height: 24px; }
.slots.n3 .reveal { flex-direction: column; gap: 8px; padding: 10px 4px; }
.slots.n3 .reveal::before { width: 200px; height: 200px; }
.slots.n3 .flip { width: 104px; height: 160px; }
.slots.n3 .result { max-width: 100%; text-align: center; transform: translateY(6px); }
.slots.n3 .result .tiername { font-size: 16px; }
.slots.n3 .result .cname { font-size: 12px; margin: 2px 0 4px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.slots.n3 .result .vals { justify-content: center; gap: 4px 8px; font-size: 12px; }
.slots.n3 .result .vals > .mono { font-size: 15px; }
.demo-btns { display: flex; flex-direction: column; gap: 8px; }
.demo-btn3 { background: transparent; color: var(--ink); border: 1px solid var(--accent); }
.demo-btn3:hover { background: rgba(139,92,246,.15); }
@media (max-width: 520px) {
  .slots.n3 { gap: 4px; padding: 0 4px; }
  .slots.n3 .pack { width: 92px; height: 136px; }
  .slots.n3 .flip { width: 88px; height: 136px; }
  .slots.n3 .result .tiername { font-size: 13px; }
  .slots.n3 .result .cname { display: none; }
  .slots.n3 .result .vals { flex-direction: column; gap: 0; }
}

/* Demo: possible pulls */
.pulls-panel { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line-2, #1F1F1F); }
.pp-h { margin: 0 0 10px; font: 800 18px var(--display); }
.pp-tier { padding: 10px 0; border-bottom: 1px solid var(--line-2, #1F1F1F); }
.pp-tier:last-of-type { border-bottom: none; }
.pp-head { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.pp-name { font-weight: 700; display: inline-flex; align-items: center; gap: 8px; color: var(--glow); }
.pp-name i { width: 10px; height: 10px; border-radius: 50%; background: var(--glow); box-shadow: 0 0 8px var(--glow); }
.pp-odds { font-weight: 700; font-size: 16px; }
.pp-range { font-size: 13px; color: var(--muted); }
.pp-cards { display: flex; gap: 10px; margin-top: 8px; overflow-x: auto; padding-bottom: 2px; }
.pp-card { flex: 0 0 auto; width: 74px; text-align: center; }
.pp-img { width: 74px; height: 110px; border-radius: 6px; background: #111; border: 1px solid var(--glow); overflow: hidden; }
.pp-img img { width: 100%; height: 100%; object-fit: contain; }
.pp-v { font-size: 12px; font-weight: 700; margin-top: 4px; }
.pp-p { font-size: 10px; color: var(--muted); line-height: 1.25; }
.pp-note { margin: 8px 0 0; font-size: 12px; color: var(--muted); }
@media (min-width: 760px) {
  .pulls-panel { display: grid; grid-template-columns: 1fr 1fr; column-gap: 28px; }
  .pp-h, .pp-note { grid-column: 1 / -1; }
  .pp-tier:last-of-type { border-bottom: 1px solid var(--line-2, #1F1F1F); }
}

/* Live indicator + pulled cards */
.live-dot { display: inline-block; width: 9px; height: 9px; margin-right: 8px; border-radius: 50%; background: #34D399; box-shadow: 0 0 0 0 rgba(52,211,153,.6); animation: livepulse 2s infinite; vertical-align: 2px; }
@keyframes livepulse { 70% { box-shadow: 0 0 0 8px rgba(52,211,153,0); } 100% { box-shadow: 0 0 0 0 rgba(52,211,153,0); } }
.cardtile.pulled { opacity: .35; position: relative; }
.cardtile.pulled::after { content: "Just pulled"; position: absolute; top: 8px; left: 8px; padding: 2px 8px; border-radius: 99px; background: #F87171; color: #000; font: 700 11px var(--mono); }
@media (prefers-reduced-motion: reduce) { .live-dot { animation: none; } }

/* Contract address box */
.ca-box { display: flex; align-items: center; gap: 10px; margin-top: 14px; padding: 8px 8px 8px 14px; border: 1px solid var(--line); border-radius: 12px; max-width: 100%; }
.ca-box code { font-family: var(--mono); font-size: 13px; color: var(--ink); overflow-wrap: anywhere; min-width: 0; flex: 1; }
.ca-copy { flex: none; min-height: 36px; padding: 6px 14px; border-radius: 9px; border: none; background: var(--accent-soft); color: var(--accent-text); font-weight: 700; cursor: pointer; }
.ca-copy:hover { background: var(--accent); color: #fff; }
