:root {
  --bg: #000;
  --fg: #fafafa;
  --card: #161616;
  --secondary: #2b2b2b;
  --muted: #a3a3a3;
  --border: #2e2e2e;
  --input: #3a3a3a;
  --ring: #737373;
  --brand: #ffcb05;
  --green: #00c758;
  --red: #fb2c36;
  --amber: #f99c00;
  --blue: #2e90fa;
  --radius: 8px;
  --sans: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --mono: "JetBrains Mono", "SF Mono", Menlo, Consolas, monospace;
  --max: 1600px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
}
button, a, summary, label, select { cursor: pointer; }
button, input, select, textarea { font: inherit; color: inherit; }
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, p { margin: 0; }
button { background: none; border: 0; padding: 0; }
::selection { background: var(--fg); color: #171717; }
.pixel { image-rendering: pixelated; image-rendering: crisp-edges; }

.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  height: 56px;
  transition: background .2s, border-color .2s;
}
.site-header.scrolled {
  background: rgba(0, 0, 0, .8);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(255, 255, 255, .08);
}
.header-inner, .wrap {
  width: min(var(--max), calc(100% - 32px));
  margin: 0 auto;
}
.header-inner {
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  letter-spacing: -0.02em;
}
.brand em { font-style: italic; font-weight: 500; }
.brand em + span { margin-left: 3px; }
.nav {
  display: none;
  align-items: center;
  gap: 4px;
  margin-left: 12px;
}
.nav a, .menu-panel a {
  border-radius: 6px;
  padding: 6px 10px;
  font-size: 14px;
  color: var(--muted);
}
.nav a:hover, .nav a.active, .menu-panel a:hover, .menu-panel a.active { color: var(--fg); }
.header-actions { display: flex; align-items: center; gap: 8px; }
.contract-pill {
  display: none;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 4px 10px;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted);
}
.contract-pill b { font-family: var(--sans); color: var(--fg); }
.copy-btn {
  border-radius: 4px;
  padding: 2px 6px;
  font-size: 12px;
  color: var(--muted);
}
.copy-btn:hover { background: var(--secondary); color: var(--fg); }
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 999px;
  font-weight: 500;
  transition: .15s ease;
  white-space: nowrap;
}
.btn-lg { height: 48px; padding: 0 28px; font-size: 16px; }
.btn-md { height: 36px; padding: 0 16px; font-size: 14px; }
.btn-sm { height: 32px; padding: 0 16px; font-size: 14px; }
.btn-primary {
  position: relative;
  overflow: hidden;
  background: var(--fg);
  color: #000;
}
.btn-primary::after, .button-inner-shadow::after {
  content: "";
  position: absolute;
  left: 12%;
  right: 12%;
  bottom: 6px;
  height: 2px;
  border-radius: 2px;
  background: var(--brand);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .25s;
}
.btn-primary:hover::after, .button-inner-shadow:hover::after { transform: scaleX(1); }
.btn-ghost { color: var(--muted); }
.btn-ghost:hover { color: var(--fg); background: var(--secondary); }
.btn-outline {
  border: 1px solid var(--input);
  background: rgba(22, 22, 22, .6);
  backdrop-filter: blur(8px);
}
.btn-outline:hover { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(255, 203, 5, .18); }
.menu-btn {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  color: var(--fg);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.menu-btn:hover { background: var(--secondary); }
.menu-panel {
  display: none;
  position: absolute;
  top: 56px;
  left: 16px;
  right: 16px;
  padding: 8px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(0, 0, 0, .92);
  backdrop-filter: blur(16px);
}
.menu-panel.open { display: grid; }
.menu-panel a { padding: 10px 12px; }

main { flex: 1; }

.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 96px 16px 40px;
  border-bottom: 1px solid rgba(255, 255, 255, .1);
  background: #000;
  overflow: hidden;
}
.marquee-layer {
  pointer-events: none;
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  overflow: hidden;
  opacity: .7;
}
.marquee-row { display: flex; width: max-content; padding: 8px 0; animation: marquee 38s linear infinite; }
.marquee-row.reverse { animation-name: marquee-rev; }
.bubble {
  margin: 0 12px;
  width: 110px;
  height: 110px;
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, .1);
  background: rgba(255, 255, 255, .04);
}
.hero-fade {
  position: absolute;
  inset: 0;
  background: linear-gradient(rgba(0, 0, 0, .3), rgba(0, 0, 0, .6) 50%, #000 100%);
}
.hero-copy { position: relative; display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 24px; }
.hero h1 {
  font-size: clamp(48px, 8vw, 112px);
  font-weight: 500;
  letter-spacing: -0.025em;
  line-height: .9;
}
.lede { max-width: 560px; margin-top: 20px; color: rgba(255, 255, 255, .7); font-size: 18px; line-height: 1.5; }
.inline-logo { display: inline-flex; align-items: center; gap: .3em; vertical-align: -0.18em; font-weight: 500; }
.inline-logo img { width: 1.15em; height: 1.15em; object-fit: contain; border-radius: 2px; }
.hero-actions { display: flex; align-items: center; gap: 8px; }

.ticker-wrap {
  overflow: hidden;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: rgba(22, 22, 22, .4);
  mask-image: linear-gradient(90deg, transparent, #000 8% 92%, transparent);
}
.ticker { display: flex; width: max-content; align-items: center; gap: 24px; padding: 8px 24px 8px 0; animation: tape 60s linear infinite; }
.ticker:hover { animation-play-state: paused; }
.tick { display: flex; align-items: center; gap: 8px; white-space: nowrap; font-size: 12px; }
.tick img { width: 14px; height: 14px; object-fit: contain; }
.tick a { font-weight: 600; }
.tick a:hover { color: var(--brand); }
.tick .muted, .muted { color: var(--muted); }
.dot { color: var(--muted); }

.section { padding: 64px 0; }
.section.tight { padding-top: 28px; }
.kicker { color: var(--brand); font-size: 12px; font-weight: 600; letter-spacing: .2em; text-transform: uppercase; }
h2.display { margin-top: 12px; max-width: 720px; font-size: clamp(32px, 4vw, 48px); font-weight: 500; letter-spacing: -0.03em; line-height: 1.05; }
.sub { margin-top: 12px; max-width: 720px; color: rgba(255, 255, 255, .7); line-height: 1.6; }
.row-between { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; }

.stat-grid, .steps, .card-grid, .strategy-grid, .deal-grid { margin-top: 24px; }
.stat-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.stat {
  display: block;
  border: 1px solid var(--border);
  background: var(--card);
  border-radius: 6px;
  padding: 16px;
}
.stat:hover { background: rgba(250, 250, 250, .05); }
.stat span { display: block; font-size: 12px; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.stat b { display: block; margin-top: 4px; font-size: 30px; font-weight: 600; font-variant-numeric: tabular-nums; }

.steps { display: grid; gap: 12px; }
.step { border-top: 1px solid var(--border); padding-top: 24px; }
.step .num { font-family: var(--mono); font-size: 12px; color: var(--brand); }
.step h3 { margin: 8px 0; font-size: 18px; }
.step p { color: rgba(255, 255, 255, .7); line-height: 1.55; }

.card-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.slab {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.slab-art {
  position: relative;
  display: block;
  aspect-ratio: 3 / 4;
  background: var(--secondary);
  overflow: hidden;
}
.slab-art img.card-photo { width: 100%; height: 100%; object-fit: contain; padding: 16px; transition: transform .3s; }
.slab:hover .card-photo { transform: scale(1.05); }
.slab-source { position: absolute; top: 6px; left: 6px; }
.slab-source img { width: 18px; height: 18px; object-fit: contain; }
.deal-flag {
  position: absolute;
  top: 6px;
  right: 6px;
  background: var(--green);
  color: #04140a;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .04em;
  border-radius: 4px;
  padding: 3px 6px;
}
.slab-meta { padding: 12px; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.slab-title { font-size: 14px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.slab-title:hover { color: #fff; }
.tags { display: flex; flex-wrap: wrap; gap: 4px 8px; color: var(--muted); font-size: 11px; }
.price-line { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.price-line b { font-size: 18px; font-variant-numeric: tabular-nums; }
.price-line span, .seller { font-size: 11px; color: var(--muted); }
.discount { color: var(--green); font-weight: 600; font-size: 12px; }
.strat-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 4px;
  font-size: 12px;
}
.strat-foot a { font-weight: 600; }
.chip {
  display: inline-flex;
  align-items: center;
  height: 20px;
  padding: 0 7px;
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 500;
  white-space: nowrap;
}
.chip.on, .chip:hover { color: var(--fg); border-color: var(--ring); }
.chip-row { display: flex; gap: 6px; flex-wrap: wrap; }

.strategy-grid { display: grid; gap: 12px; }
.strategy-card {
  display: flex;
  gap: 16px;
  padding: 20px;
  border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, .08);
  background: linear-gradient(#0f0f0f, #1a1a1a);
}
.sprite-box {
  width: 80px;
  height: 80px;
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 16px;
  background: rgba(255, 255, 255, .04);
  transition: transform .35s cubic-bezier(.2, .8, .2, 1);
}
.strategy-card:hover .sprite-box { transform: translateY(-8px) rotate(-6deg) scale(1.06); }
.strategy-card h3 { font-size: 16px; display: flex; align-items: center; gap: 8px; min-width: 0; }
.strategy-card h3 span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.strategy-card .foot { margin-top: auto; padding-top: 8px; display: flex; justify-content: space-between; align-items: center; font-size: 12px; color: var(--muted); }
.strategy-card .foot b { color: var(--fg); font-variant-numeric: tabular-nums; }
.grow { display: flex; flex-direction: column; min-width: 0; flex: 1; }

.cta {
  margin: 24px auto 72px;
  padding: 40px 28px;
  border: 1px solid var(--border);
  border-radius: 24px;
  background:
    linear-gradient(rgba(0, 0, 0, .55), rgba(0, 0, 0, .82)),
    radial-gradient(600px 180px at 20% 0%, rgba(255, 203, 5, .16), transparent 70%);
}
.cta h2 { font-size: clamp(32px, 4vw, 48px); font-weight: 500; letter-spacing: -0.03em; }
.cta p { margin: 12px 0 20px; color: rgba(255, 255, 255, .7); }
.cta-actions { display: flex; gap: 8px; flex-wrap: wrap; }

.site-footer { border-top: 1px solid var(--border); padding: 40px 0 28px; margin-top: auto; }
.foot-grid { display: grid; gap: 28px; }
.foot-brand { max-width: 420px; }
.foot-brand p { margin-top: 8px; color: var(--muted); font-size: 14px; }
.built { margin-top: 16px; color: var(--muted); font-size: 13px; display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.built a:hover { color: var(--fg); }
.contract-block { margin-top: 16px; font-size: 13px; }
.contract-block .addr { font-family: var(--mono); font-size: 12px; color: var(--muted); word-break: break-all; }
.ext-links { display: flex; gap: 12px; margin-top: 8px; font-size: 13px; }
.ext-links a { color: var(--muted); }
.ext-links a:hover { color: var(--fg); }
.foot-nav { display: flex; flex-wrap: wrap; gap: 8px 16px; font-size: 14px; color: var(--muted); }
.foot-nav a:hover { color: var(--fg); }
.legal { margin-top: 28px; color: var(--muted); font-size: 12px; line-height: 1.5; }

.page { padding: 88px 0 48px; }
.page h1 { font-size: clamp(36px, 5vw, 64px); font-weight: 500; letter-spacing: -0.03em; line-height: .95; }
.filters { display: flex; flex-direction: column; gap: 14px; margin-top: 22px; }
.field label, .filter-label { display: block; margin-bottom: 6px; font-size: 12px; color: var(--muted); }
.field input, .field select, .field textarea {
  width: 100%;
  background: #0c0c0c;
  border: 1px solid var(--input);
  border-radius: 8px;
  padding: 10px 12px;
  outline: none;
}
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--ring); }
.grade-picks, .lang-picks { display: flex; flex-wrap: wrap; gap: 6px; }
.pick {
  border: 1px solid var(--border);
  background: transparent;
  color: var(--muted);
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 12px;
}
.pick.on { color: #000; background: var(--fg); border-color: var(--fg); }
.toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 14px;
}
.switch {
  width: 36px;
  height: 20px;
  border-radius: 999px;
  background: var(--secondary);
  position: relative;
}
.switch i {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--muted);
  transition: .15s;
}
.toggle.on .switch { background: var(--brand); }
.toggle.on .switch i { transform: translateX(16px); background: #000; }
.toggle.on { color: var(--fg); }

.toolbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin: 18px 0; flex-wrap: wrap; }
.seg { display: inline-flex; border: 1px solid var(--border); border-radius: 999px; overflow: hidden; }
.seg button { padding: 6px 12px; font-size: 13px; color: var(--muted); }
.seg button.on { background: var(--fg); color: #000; }

.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: 12px; }
table { width: 100%; border-collapse: collapse; min-width: 980px; font-size: 13px; }
th { text-align: left; color: var(--muted); font-weight: 500; font-size: 12px; padding: 10px 12px; border-bottom: 1px solid var(--border); }
td { padding: 12px; border-bottom: 1px solid var(--border); vertical-align: middle; }
tr:hover td { background: rgba(250, 250, 250, .04); }
.who { display: flex; align-items: center; gap: 10px; }
.who b { display: block; }
.up { color: var(--green); }
.down { color: var(--red); }
.mono { font-family: var(--mono); }

.layout-2 { display: grid; gap: 28px; }
.panel {
  border: 1px solid var(--border);
  background: #0c0c0c;
  border-radius: 16px;
  padding: 16px;
}
.panel h2 { font-size: 16px; margin-bottom: 12px; }
.preset { width: 100%; text-align: left; padding: 8px 10px; border-radius: 8px; color: var(--muted); font-size: 14px; }
.preset:hover, .preset.on { background: var(--secondary); color: var(--fg); }
.disabled-note { opacity: .45; }

.raffle {
  display: grid;
  grid-template-columns: 72px 1fr auto;
  gap: 14px;
  align-items: center;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
}
.raffle img { width: 72px; height: 96px; object-fit: contain; background: var(--secondary); border-radius: 8px; }
.raffle h3 { font-size: 14px; font-weight: 500; }
.count { text-align: right; font-variant-numeric: tabular-nums; }
.count b { display: block; font-size: 18px; }
.tabs { display: flex; gap: 6px; margin: 18px 0; flex-wrap: wrap; }
.tabs button {
  border-radius: 999px;
  padding: 6px 12px;
  color: var(--muted);
  border: 1px solid transparent;
}
.tabs button.on { color: var(--fg); border-color: var(--border); background: var(--card); }

.metric-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-top: 18px; }
.metric { border: 1px solid var(--border); border-radius: 12px; padding: 14px; background: var(--card); }
.metric span { color: var(--muted); font-size: 12px; }
.metric b { display: block; margin-top: 4px; font-size: 22px; font-variant-numeric: tabular-nums; }
.metric em { font-style: normal; font-size: 12px; margin-left: 6px; }

.fee { margin-top: 14px; }
.fee .top { display: flex; justify-content: space-between; font-size: 13px; margin-bottom: 6px; }
.bar { display: flex; height: 10px; border-radius: 999px; overflow: hidden; background: var(--secondary); }
.bar i { display: block; height: 100%; }
.bar .y { background: var(--brand); }
.bar .g { background: #3a3a3a; }
.bar .b { background: var(--blue); }
.legend { display: flex; gap: 14px; margin-top: 8px; color: var(--muted); font-size: 12px; }
.legend i { display: inline-block; width: 8px; height: 8px; border-radius: 2px; margin-right: 6px; }

.prose { max-width: 820px; }
.prose h2 { margin: 36px 0 10px; font-size: 28px; font-weight: 500; }
.prose h3 { margin: 22px 0 8px; font-size: 18px; }
.prose p, .prose li { color: rgba(255, 255, 255, .78); line-height: 1.65; }
.prose ol { padding-left: 18px; display: grid; gap: 10px; }
.loop {
  margin-top: 16px;
  padding: 14px 16px;
  border-left: 2px solid var(--brand);
  color: rgba(255, 255, 255, .8);
  line-height: 1.6;
}

.toast {
  position: fixed;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%) translateY(12px);
  background: var(--fg);
  color: #000;
  border-radius: 999px;
  padding: 10px 16px;
  font-size: 14px;
  opacity: 0;
  pointer-events: none;
  transition: .2s;
  z-index: 80;
  max-width: min(520px, calc(100% - 32px));
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

.empty { padding: 40px 12px; text-align: center; color: var(--muted); }

@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@keyframes marquee-rev { from { transform: translateX(-50%); } to { transform: translateX(0); } }
@keyframes tape { from { transform: translateX(0); } to { transform: translateX(-50%); } }

@media (min-width: 640px) {
  .nav { display: flex; }
  .menu-btn, .menu-panel { display: none !important; }
  .stat-grid { grid-template-columns: repeat(4, 1fr); }
  .card-grid { grid-template-columns: repeat(3, 1fr); }
  .strategy-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 900px) {
  .steps { grid-template-columns: repeat(4, 1fr); }
  .card-grid { grid-template-columns: repeat(6, 1fr); }
  .deal-grid { grid-template-columns: repeat(3, 1fr); }
  .strategy-grid { grid-template-columns: repeat(3, 1fr); }
  .layout-2 { grid-template-columns: 300px 1fr; align-items: start; }
  .layout-2 .panel { position: sticky; top: 72px; }
  .foot-grid { grid-template-columns: 1.4fr .8fr; }
  .metric-grid { grid-template-columns: repeat(4, 1fr); }
}
@media (min-width: 1024px) {
  .contract-pill { display: inline-flex; }
}
@media (max-width: 899px) {
  .card-grid.home-fresh { grid-template-columns: repeat(2, 1fr); }
}
