/* Greatest Meme Ever — shared visual system
   White / #111 / GameStop red #CF0A0A / panels #F4F4F4 / rules #E5E5E5 / up-green #1A8F45 */

:root {
  --bg: #ffffff;
  --ink: #111111;
  --ink-2: #555555;
  --ink-3: #8a8a8a;
  --red: #cf0a0a;
  --red-dark: #a80808;
  --panel: #f4f4f4;
  --rule: #e5e5e5;
  --up: #1a8f45;
  --max: 1120px;
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  font-feature-settings: "tnum" 1, "cv11" 1;
  font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    transition: none !important;
    animation: none !important;
  }
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

[hidden] {
  display: none !important;
}

a {
  color: inherit;
  text-decoration: underline;
  text-decoration-color: var(--rule);
  text-underline-offset: 3px;
  transition: text-decoration-color 120ms ease;
}
a:hover {
  text-decoration-color: var(--ink);
}

:focus {
  outline: none;
}
:focus-visible {
  outline: 2px solid var(--red);
  outline-offset: 3px;
}

button {
  font: inherit;
  color: inherit;
  cursor: pointer;
}

/* ---------- typography ---------- */

h1,
h2,
h3 {
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin: 0;
}
h1 {
  font-size: clamp(1.5rem, 1.1rem + 1.8vw, 2.125rem);
  max-width: 28ch;
}
h2 {
  font-size: clamp(1.25rem, 1.05rem + 0.9vw, 1.625rem);
}
h3 {
  font-size: 1rem;
}

p {
  margin: 0 0 1em;
  max-width: 65ch;
}

.small {
  font-size: 0.8125rem;
  line-height: 1.5;
  color: var(--ink-2);
}
.muted {
  color: var(--ink-3);
}
.up {
  color: var(--up);
}
.mono {
  font-family: var(--mono);
  font-size: 0.875em;
  word-break: break-all;
}

/* ---------- layout ---------- */

.wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 24px;
}
@media (max-width: 480px) {
  .wrap {
    padding: 0 16px;
  }
}

.rule {
  border: 0;
  border-top: 1px solid var(--rule);
  margin: 0;
}

section {
  padding: 56px 0;
  border-top: 1px solid var(--rule);
}
@media (max-width: 640px) {
  section {
    padding: 40px 0;
  }
}

.section-head {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: baseline;
  gap: 16px;
  margin-bottom: 28px;
}
.section-head .meta {
  font-size: 0.8125rem;
  color: var(--ink-3);
  white-space: nowrap;
}

/* ---------- header ---------- */

.site-header {
  border-bottom: 1px solid var(--rule);
  background: var(--bg);
}
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 72px;
  padding-top: 12px;
  padding-bottom: 12px;
  flex-wrap: wrap;
}
.brand {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}
.brand img {
  width: 160px;
}
.nav {
  display: flex;
  align-items: center;
  gap: 28px;
  flex-wrap: wrap;
}
.nav a:not(.btn) {
  text-decoration: none;
  font-size: 0.9375rem;
  color: var(--ink-2);
  padding: 4px 0;
}
.nav a:not(.btn):hover {
  color: var(--ink);
}
.nav .btn {
  text-decoration: none;
}
@media (max-width: 640px) {
  .site-header .wrap {
    gap: 12px 18px;
    padding-top: 10px;
    padding-bottom: 10px;
  }
  .brand {
    order: 0;
  }
  .brand img {
    width: 132px;
  }
  /* Row 1: logo + red button. Row 2: text links. */
  .nav {
    display: contents;
  }
  .nav .btn {
    order: 1;
    margin-left: auto;
    flex: 0 0 auto;
  }
  .nav::before {
    content: "";
    order: 2;
    flex-basis: 100%;
    height: 0;
  }
  .nav a:not(.btn) {
    order: 3;
    font-size: 0.875rem;
    margin-right: 6px;
  }
}

/* ---------- buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 40px;
  padding: 0 18px;
  border: 1px solid var(--ink);
  background: var(--bg);
  color: var(--ink);
  font-weight: 500;
  font-size: 0.9375rem;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color 120ms ease, color 120ms ease, border-color 120ms ease;
}
.btn:hover {
  background: var(--panel);
}
.btn-red {
  background: var(--red);
  border-color: var(--red);
  color: #fff;
}
.btn-red:hover {
  background: var(--red-dark);
  border-color: var(--red-dark);
}
.btn-lg {
  min-height: 48px;
  padding: 0 28px;
  font-size: 1rem;
}
.btn[aria-disabled="true"],
.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  pointer-events: none;
}
.btn-small {
  min-height: 30px;
  padding: 0 10px;
  font-size: 0.8125rem;
}

/* ---------- hero ---------- */

.hero {
  border-top: 0;
  padding: 64px 0 48px;
}
.hero-logo {
  width: min(560px, 100%);
  margin: 0 auto 32px;
}
.hero h1 {
  text-align: center;
  margin: 0 auto;
  max-width: 34ch;
  font-weight: 500;
}
@media (max-width: 640px) {
  .hero {
    padding: 40px 0 32px;
  }
}

/* ---------- stat strip ---------- */

.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  background: var(--panel);
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  margin-top: 40px;
}
.stat {
  padding: 22px 24px 20px;
  border-left: 1px solid var(--rule);
  min-width: 0;
}
.stat:first-child {
  border-left: 0;
}
.stat .label {
  font-size: 0.8125rem;
  color: var(--ink-2);
  margin-bottom: 8px;
}
.stat .value {
  font-size: clamp(1.5rem, 1.2rem + 1.2vw, 2rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.1;
  word-break: break-word;
}
.stat .value .unit {
  font-size: 0.55em;
  font-weight: 500;
  color: var(--ink-2);
  margin-left: 4px;
  letter-spacing: 0;
}
.stat .sub {
  font-size: 0.8125rem;
  color: var(--ink-3);
  margin-top: 6px;
}
.stat .usd {
  font-size: 0.875rem;
  color: var(--ink-2);
  font-weight: 500;
  margin-top: 2px;
}
@media (max-width: 900px) {
  .stats {
    grid-template-columns: repeat(2, 1fr);
  }
  .stat:nth-child(3) {
    border-left: 0;
  }
  .stat:nth-child(n + 3) {
    border-top: 1px solid var(--rule);
  }
}
@media (max-width: 480px) {
  .stats {
    grid-template-columns: 1fr;
  }
  .stat {
    border-left: 0;
    padding: 18px 16px;
  }
  .stat + .stat {
    border-top: 1px solid var(--rule);
  }
}

/* ---------- story ---------- */

.story {
  font-size: 1.125rem;
  line-height: 1.65;
  max-width: 62ch;
}
.story p {
  max-width: none;
  margin-bottom: 1.1em;
}
.story p:last-child {
  margin-bottom: 0;
}

/* ---------- how it works ---------- */

.how {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  border-top: 1px solid var(--rule);
  border-left: 1px solid var(--rule);
}
.how .cell {
  padding: 32px 28px 28px;
  border-right: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}
.how .figure {
  font-size: clamp(2.25rem, 1.6rem + 2.4vw, 3.5rem);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1;
  margin-bottom: 14px;
}
.how .figure.red {
  color: var(--red);
}
.how p {
  margin: 0;
  color: var(--ink-2);
}
@media (max-width: 640px) {
  .how {
    grid-template-columns: 1fr;
  }
  .how .cell {
    padding: 24px 20px;
  }
}

/* ---------- tables ---------- */

.table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-top: 1px solid var(--ink);
}
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9375rem;
  min-width: 560px;
}
th,
td {
  text-align: left;
  padding: 12px 14px 12px 0;
  border-bottom: 1px solid var(--rule);
  vertical-align: top;
  white-space: nowrap;
}
th {
  font-weight: 500;
  font-size: 0.8125rem;
  color: var(--ink-2);
  padding-top: 10px;
  padding-bottom: 10px;
}
th.num,
td.num {
  text-align: right;
  padding-right: 0;
}
td.num {
  font-variant-numeric: tabular-nums;
}
tr > :last-child {
  padding-right: 0;
}
.empty {
  padding: 28px 0;
  color: var(--ink-2);
  border-bottom: 1px solid var(--rule);
}

/* ---------- receipts ---------- */

.receipts {
  border-top: 1px solid var(--ink);
}
.receipt {
  display: grid;
  grid-template-columns: minmax(200px, 1fr) minmax(0, 2fr);
  gap: 16px 32px;
  padding: 16px 0;
  border-bottom: 1px solid var(--rule);
  align-items: baseline;
}
.receipt .k {
  color: var(--ink-2);
  font-size: 0.9375rem;
}
.receipt .v {
  min-width: 0;
  overflow-wrap: anywhere;
}
.receipt .v a {
  font-family: var(--mono);
  font-size: 0.875rem;
}
.receipt .v .pending {
  color: var(--ink-3);
}
.receipt.wide {
  grid-template-columns: 1fr;
  gap: 6px;
}
@media (max-width: 640px) {
  .receipt {
    grid-template-columns: 1fr;
    gap: 4px;
  }
}

/* ---------- buy ---------- */

.buy-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 24px 40px;
}
.addr-box {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  flex: 1 1 320px;
  border: 1px solid var(--rule);
  background: var(--panel);
  padding: 10px 12px;
}
.addr-box code {
  font-family: var(--mono);
  font-size: 0.875rem;
  overflow-wrap: anywhere;
  flex: 1 1 auto;
  min-width: 0;
}
.copy-btn {
  flex: 0 0 auto;
  border: 1px solid var(--ink);
  background: var(--bg);
  min-height: 30px;
  padding: 0 10px;
  font-size: 0.8125rem;
  font-weight: 500;
}
.copy-btn:hover {
  background: #fff;
}

/* ---------- disclaimer / footer ---------- */

.disclaimer {
  padding: 32px 0;
  border-top: 1px solid var(--rule);
}
.disclaimer p {
  max-width: 80ch;
  margin: 0;
}

.site-footer {
  border-top: 1px solid var(--rule);
  padding: 24px 0 40px;
  font-size: 0.875rem;
  color: var(--ink-2);
}
.site-footer .wrap {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px 32px;
  flex-wrap: wrap;
}
.site-footer nav {
  display: flex;
  gap: 24px;
}
.site-footer a {
  text-decoration: none;
}
.site-footer a:hover {
  text-decoration: underline;
}

/* ---------- status line ---------- */

.status {
  font-size: 0.8125rem;
  color: var(--ink-3);
}
.status[data-state="error"] {
  color: var(--red);
}

/* ---------- preview banner ---------- */

.preview-banner {
  background: var(--red);
  color: #fff;
  font-size: 0.8125rem;
  font-weight: 500;
  text-align: center;
  padding: 8px 16px;
  line-height: 1.4;
}

/* ---------- status row / link-style buttons ---------- */

.status-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  margin-top: 12px;
  flex-wrap: wrap;
}
.status-row .status {
  margin: 0;
}
.linklike {
  background: none;
  border: 0;
  padding: 0;
  font-size: 0.8125rem;
  color: var(--ink-2);
  text-decoration: underline;
  text-decoration-color: var(--rule);
  text-underline-offset: 3px;
}
.linklike:hover {
  color: var(--ink);
  text-decoration-color: var(--ink);
}

/* ---------- statement ---------- */

.statement {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 48px;
  border-top: 1px solid var(--ink);
}
.stmt-col {
  min-width: 0;
}
.stmt-title {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--ink-2);
  padding: 10px 0 6px;
  border-bottom: 1px solid var(--rule);
}
.lines {
  margin: 0;
}
.lines .line {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  padding: 9px 0;
  border-bottom: 1px solid var(--rule);
}
.lines dt {
  color: var(--ink-2);
  font-size: 0.9375rem;
}
.lines dd {
  margin: 0;
  font-variant-numeric: tabular-nums;
  text-align: right;
  white-space: nowrap;
  font-weight: 500;
}
.lines dd .unit {
  color: var(--ink-3);
  font-weight: 400;
  font-size: 0.8125rem;
  margin-left: 4px;
}
.lines dd .pending,
.pending {
  color: var(--ink-3);
  font-weight: 400;
}
.lines .line.total {
  border-bottom: 2px solid var(--ink);
  border-top: 1px solid var(--ink);
  margin-top: -1px;
}
.lines .line.total dd {
  font-weight: 600;
}
@media (max-width: 720px) {
  .statement {
    grid-template-columns: 1fr;
  }
  .lines dt {
    font-size: 0.875rem;
  }
}

/* ---------- flow ---------- */

.flow {
  list-style: none;
  margin: 0 0 28px;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  border: 1px solid var(--rule);
  background: var(--panel);
}
.flow-step {
  position: relative;
  padding: 16px 18px 16px 18px;
  border-left: 1px solid var(--rule);
  font-size: 0.875rem;
  line-height: 1.45;
  min-width: 0;
}
.flow-step:first-child {
  border-left: 0;
}
.flow-step .n {
  display: block;
  font-size: 0.6875rem;
  font-weight: 600;
  color: var(--red);
  letter-spacing: 0.06em;
  margin-bottom: 6px;
}
.flow-step strong {
  display: block;
  font-weight: 600;
  margin-bottom: 2px;
}
.flow-step span:last-child {
  color: var(--ink-2);
}
@media (max-width: 900px) {
  .flow {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .flow-step:nth-child(odd) {
    border-left: 0;
  }
  .flow-step:nth-child(n + 3) {
    border-top: 1px solid var(--rule);
  }
}
@media (max-width: 520px) {
  .flow {
    grid-template-columns: 1fr;
  }
  .flow-step {
    border-left: 0;
  }
  .flow-step + .flow-step {
    border-top: 1px solid var(--rule);
  }
}

/* ---------- race meter ---------- */

.race {
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid var(--rule);
}
.race-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  margin-bottom: 10px;
}
.race-head h3 {
  font-size: 1rem;
  white-space: nowrap;
}
.race-head .meta {
  font-size: 0.8125rem;
  color: var(--ink-3);
  text-align: right;
}
.meter {
  height: 12px;
  background: #f3d3d3;
  border: 1px solid #e9b9b9;
  overflow: hidden;
}
.meter-fill {
  height: 100%;
  background: var(--red);
  transition: width 240ms ease;
}
.race-legend {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  font-size: 0.8125rem;
  color: var(--ink-2);
  margin-top: 6px;
  font-variant-numeric: tabular-nums;
}

/* ---------- chart ---------- */

.chart {
  margin: 0 0 20px;
}
.chart-title {
  font-size: 0.8125rem;
  color: var(--ink-2);
  margin-bottom: 6px;
}
.chart-body {
  position: relative;
  width: 100%;
  height: 220px;
  border-bottom: 1px solid var(--rule);
}
.chart-body:focus-visible {
  outline: 2px solid var(--red);
  outline-offset: 4px;
}
.chart-body svg {
  display: block;
  width: 100%;
  height: 100%;
}
.chart-body .grid {
  stroke: var(--rule);
  stroke-width: 1;
}
.chart-body .axis-text {
  fill: var(--ink-3);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}
.chart-body .series {
  fill: none;
  stroke: var(--red);
  stroke-width: 2;
  stroke-linejoin: round;
  stroke-linecap: round;
}
.chart-body .area {
  fill: var(--red);
  fill-opacity: 0.08;
}
.chart-body .dot {
  fill: var(--red);
  stroke: #fff;
  stroke-width: 2;
}
.chart-body .crosshair {
  stroke: var(--ink-3);
  stroke-width: 1;
}
.chart-body .end-label {
  fill: var(--ink);
  font-size: 12px;
  font-weight: 600;
}
.chart-tip {
  position: absolute;
  top: 8px;
  pointer-events: none;
  background: #fff;
  border: 1px solid var(--ink);
  padding: 6px 10px;
  font-size: 0.8125rem;
  line-height: 1.4;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.chart-tip strong {
  display: block;
  font-size: 0.9375rem;
}
.chart-tip .k {
  color: var(--ink-2);
}
.chart-help {
  margin: 8px 0 0;
}

/* ---------- toolbars / chips / segmented ---------- */

.toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}
.seg {
  display: inline-flex;
  border: 1px solid var(--rule);
}
.seg-btn {
  background: var(--bg);
  border: 0;
  padding: 4px 12px;
  font-size: 0.8125rem;
  color: var(--ink-2);
}
.seg-btn + .seg-btn {
  border-left: 1px solid var(--rule);
}
.seg-btn.is-on {
  background: var(--ink);
  color: #fff;
}
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}
.chip {
  border: 1px solid var(--rule);
  background: var(--bg);
  padding: 4px 12px;
  font-size: 0.8125rem;
  color: var(--ink-2);
}
.chip:hover {
  border-color: var(--ink);
  color: var(--ink);
}
.chip.is-on {
  background: var(--ink);
  border-color: var(--ink);
  color: #fff;
}
.chip .count {
  color: inherit;
  opacity: 0.7;
  margin-left: 4px;
}
.more-row {
  margin-top: 12px;
}
tfoot td {
  font-weight: 600;
  border-bottom: 2px solid var(--ink);
}
.tag {
  display: inline-block;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 2px 6px;
  border: 1px solid var(--rule);
  color: var(--ink-2);
}
.tag.owner {
  border-color: var(--red);
  color: var(--red);
}
.tag.buy {
  border-color: var(--up);
  color: var(--up);
}
td.detail {
  white-space: normal;
  min-width: 260px;
  overflow-wrap: anywhere;
}
td .mono {
  font-size: 0.8125rem;
}

/* ---------- receipts copy ---------- */

.receipt .v {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.receipt .v .copy-btn {
  min-height: 24px;
  padding: 0 8px;
  font-size: 0.75rem;
}

/* ---------- verify ---------- */

.verify {
  border: 1px solid var(--rule);
  background: var(--panel);
  padding: 16px;
  display: grid;
  gap: 14px;
}
.verify-controls {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}
.verify-controls select {
  font: inherit;
  font-size: 0.875rem;
  padding: 6px 10px;
  border: 1px solid #bdbdbd;
  background: #fff;
  color: var(--ink);
  min-width: 260px;
  border-radius: 0;
}
.verify-out {
  display: grid;
  gap: 8px;
}
.verify-row {
  display: grid;
  grid-template-columns: 90px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: start;
}
.verify-row .k {
  font-size: 0.8125rem;
  color: var(--ink-2);
  padding-top: 2px;
}
.verify-row code {
  overflow-wrap: anywhere;
  white-space: pre-wrap;
  background: #fff;
  border: 1px solid var(--rule);
  padding: 6px 8px;
  display: block;
}
@media (max-width: 520px) {
  .verify-row {
    grid-template-columns: 1fr;
  }
}

/* ---------- faq ---------- */

.faq {
  border-top: 1px solid var(--ink);
}
.faq details {
  border-bottom: 1px solid var(--rule);
}
.faq summary {
  cursor: pointer;
  padding: 14px 32px 14px 0;
  font-weight: 500;
  list-style: none;
  position: relative;
}
.faq summary::-webkit-details-marker {
  display: none;
}
.faq summary::after {
  content: "+";
  position: absolute;
  right: 4px;
  top: 12px;
  font-size: 1.125rem;
  color: var(--ink-3);
}
.faq details[open] summary::after {
  content: "−";
}
.faq summary:hover {
  color: var(--red);
}
.faq-body {
  padding: 0 0 16px;
  color: var(--ink-2);
}
.faq-body p {
  margin: 0;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
