:root {
  --cobalt: #2338ff;
  --cobalt-deep: #1626c7;
  --butter: #ffe14d;
  --bubble: #ff9bd2;
  --paper: #ffffff;
  --ink: #000000;
  --muted: #3c3f66;

  --display: "Bricolage Grotesque", "Arial Black", system-ui, sans-serif;
  --body: "Onest", system-ui, -apple-system, sans-serif;

  --hard: 5px 5px 0 var(--ink);
  --hard-sm: 3px 3px 0 var(--ink);
  --border: 3px solid var(--ink);
  --gutter: clamp(16px, 4vw, 56px);
  --max: 1240px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; overflow-x: clip; }
body {
  margin: 0;
  background: var(--cobalt);
  color: var(--paper);
  font-family: var(--body);
  font-size: 1.0625rem;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
img, svg { display: block; max-width: 100%; }
h1, h2, h3 { font-family: var(--display); margin: 0; line-height: 1; }
p { margin: 0; }
a { color: inherit; }

:focus-visible { outline: 3px solid var(--butter); outline-offset: 3px; border-radius: 4px; }
.sim :focus-visible, .section.use :focus-visible, .faq :focus-visible { outline-color: var(--ink); }

.skip { position: absolute; left: -999px; top: 8px; background: var(--butter); color: var(--ink); padding: 8px 12px; z-index: 100; }
.skip:focus { left: 8px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  font: 700 1.05rem/1 var(--display);
  font-stretch: 90%;
  padding: 16px 26px;
  background: var(--butter); color: var(--ink);
  border: var(--border); border-radius: 999px;
  box-shadow: var(--hard);
  text-decoration: none; cursor: pointer;
  transition: transform .12s ease, box-shadow .12s ease;
}
.btn:hover { transform: translate(-2px, -2px); box-shadow: 7px 7px 0 var(--ink); }
.btn:active { transform: translate(5px, 5px); box-shadow: 0 0 0 var(--ink); }
.btn-small { padding: 10px 18px; font-size: .95rem; box-shadow: var(--hard-sm); }
.btn-small:hover { box-shadow: 5px 5px 0 var(--ink); }
.btn-block { width: 100%; margin-top: 22px; }
.btn-invert { background: var(--paper); }
.link { font-weight: 600; text-underline-offset: 5px; text-decoration-thickness: 2px; }
.link:hover { color: var(--butter); }

/* ---------- Nav ---------- */
.nav {
  max-width: var(--max); margin: 0 auto;
  display: flex; align-items: center; gap: 32px;
  padding: 22px var(--gutter);
}
.logo {
  display: inline-flex; align-items: center; gap: 10px;
  font: 800 1.6rem/1 var(--display); letter-spacing: -.02em;
  text-decoration: none;
}
.logo svg { width: 38px; height: 38px; }
.nav nav { display: flex; gap: 26px; margin-left: auto; }
.nav nav a { text-decoration: none; font-weight: 500; opacity: .9; }
.nav nav a:hover { opacity: 1; text-decoration: underline; text-underline-offset: 6px; text-decoration-thickness: 2px; }

/* ---------- Hero ---------- */
.hero {
  max-width: var(--max); margin: 0 auto;
  padding: clamp(32px, 6vw, 80px) var(--gutter) clamp(56px, 8vw, 110px);
  display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  gap: clamp(32px, 5vw, 72px); align-items: center;
}
.hero-title {
  font-size: clamp(3.2rem, 8.4vw, 7.4rem);
  font-weight: 800;
  font-stretch: 78%;
  letter-spacing: -.035em;
  line-height: .9;
}
.hero-title .line { display: block; }
.hero-title .line-2 {
  color: var(--butter);
  -webkit-text-stroke: 0;
  text-shadow: 5px 5px 0 var(--ink);
}
.lede { margin-top: 28px; max-width: 34em; font-size: 1.2rem; line-height: 1.5; color: #e6e9ff; }
.hero-actions { margin-top: 36px; display: flex; gap: 28px; align-items: center; flex-wrap: wrap; }

/* ---------- Simulator ---------- */
.sim {
  background: var(--paper); color: var(--ink);
  border: var(--border); border-radius: 28px;
  box-shadow: 10px 10px 0 var(--ink);
  padding: 26px 26px 28px;
  transform: rotate(1.2deg);
  scroll-margin-top: 24px;
}
.sim-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 18px; }
.sim-head h2 { font-size: 1.5rem; font-stretch: 90%; }
.tag {
  font-size: .8rem; font-weight: 600;
  background: var(--bubble); border: 2px solid var(--ink);
  padding: 4px 10px; border-radius: 999px;
}
.field > span, .receive > span, .projection > div > span, .durations legend { font-size: .9rem; font-weight: 500; color: var(--muted); }
.input-wrap {
  margin-top: 6px;
  display: flex; align-items: center;
  border: var(--border); border-radius: 16px;
  padding: 6px 14px; background: #fff;
}
.input-wrap:focus-within { box-shadow: var(--hard-sm); }
.input-wrap input {
  flex: 1; min-width: 0; border: 0; outline: 0; background: transparent;
  font: 800 1.9rem/1.2 var(--display); font-stretch: 85%; color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.unit { font-weight: 700; font-family: var(--display); }
.range { width: 100%; margin: 16px 0 4px; accent-color: var(--cobalt); height: 22px; }
.help { font-size: .82rem; color: var(--muted); }

.swap-arrow {
  width: 44px; height: 44px; margin: 14px auto;
  display: grid; place-items: center;
  background: var(--butter); border: var(--border); border-radius: 50%;
}
.swap-arrow svg { width: 22px; }

.receive {
  background: var(--cobalt); color: var(--paper);
  border: var(--border); border-radius: 16px;
  padding: 14px 16px;
  display: grid; gap: 2px;
}
.receive > span { color: #cfd4ff; }
.receive strong { font: 800 2.1rem/1.1 var(--display); font-stretch: 85%; font-variant-numeric: tabular-nums; }
.receive small { font-size: 1.05rem; font-weight: 700; }
.receive .rate { font-size: .85rem; }

.durations { border: 0; padding: 0; margin: 20px 0 0; display: flex; flex-wrap: wrap; gap: 8px; }
.durations legend { margin-bottom: 8px; padding: 0; }
.durations label { position: relative; cursor: pointer; }
.durations input { position: absolute; opacity: 0; inset: 0; }
.durations span {
  display: block; padding: 7px 14px;
  border: 2px solid var(--ink); border-radius: 999px;
  font-weight: 600; font-size: .92rem;
}
.durations input:checked + span { background: var(--ink); color: var(--butter); }
.durations input:focus-visible + span { outline: 3px solid var(--cobalt); outline-offset: 2px; }

.projection { margin-top: 18px; display: grid; grid-template-columns: 1.4fr 1fr; gap: 12px; }
.projection > div { display: grid; gap: 2px; }
.projection strong { font: 800 1.45rem/1.15 var(--display); font-stretch: 88%; font-variant-numeric: tabular-nums; }
.projection > div:first-child strong { color: var(--cobalt); }

/* ---------- Strip ---------- */
.strip {
  background: var(--butter); color: var(--ink);
  border-block: var(--border);
  overflow: hidden; transform: rotate(-1.5deg); margin: 0 -20px;
}
.strip-track {
  display: flex; width: max-content;
  animation: slide 28s linear infinite;
}
.strip span {
  font: 800 clamp(1.4rem, 3vw, 2.2rem)/1 var(--display); font-stretch: 80%;
  padding: 16px 0; white-space: nowrap;
}
.strip span::after { content: "✺"; margin: 0 28px; color: var(--cobalt); }
@keyframes slide { to { transform: translateX(-50%); } }

/* ---------- Sections ---------- */
.section {
  max-width: var(--max); margin: 0 auto;
  padding: clamp(72px, 10vw, 130px) var(--gutter) 0;
  scroll-margin-top: 10px;
}
.section-title {
  font-size: clamp(2.3rem, 5.2vw, 4.2rem);
  font-weight: 800; font-stretch: 80%;
  letter-spacing: -.03em; line-height: .95;
  max-width: 14em;
}

/* Steps */
.steps {
  list-style: none; padding: 0; margin: 48px 0 0;
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0;
  border-top: var(--border); border-color: var(--paper);
}
.step { padding: 28px 24px 8px 0; position: relative; }
.step + .step { padding-left: 24px; border-left: 2px solid rgba(255,255,255,.35); }
.step-n {
  display: inline-grid; place-items: center;
  width: 54px; height: 54px; border-radius: 50%;
  background: var(--butter); color: var(--ink);
  border: var(--border); box-shadow: var(--hard-sm);
  font: 800 1.6rem/1 var(--display);
}
.step h3 { margin-top: 22px; font-size: 1.5rem; font-stretch: 88%; letter-spacing: -.01em; }
.step p { margin-top: 10px; color: #e2e6ff; max-width: 28em; }

/* Use stMEME */
.section.use {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.5fr); gap: clamp(32px, 5vw, 64px);
  align-items: start;
}
.use-intro { position: sticky; top: 32px; }
.use-intro p { margin-top: 22px; color: #e2e6ff; max-width: 30em; }
.uses { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.use-card {
  color: var(--ink); border: var(--border); box-shadow: var(--hard);
  padding: 26px 22px 28px; border-radius: 22px;
  min-height: 220px; display: flex; flex-direction: column; justify-content: flex-end;
}
.use-card h3 { font-size: 1.75rem; font-stretch: 85%; letter-spacing: -.02em; }
.use-card p { margin-top: 10px; }
.use-trade { background: var(--butter); border-radius: 22px 22px 22px 4px; }
.use-lp { background: var(--bubble); transform: translateY(28px); }
.use-lend { background: var(--paper); }
.use-hold { background: var(--ink); color: var(--paper); border-color: var(--ink); transform: translateY(28px); box-shadow: 5px 5px 0 var(--butter); }

/* Rewards */
.section.rewards {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
  gap: clamp(32px, 5vw, 72px); align-items: center;
  padding-top: clamp(110px, 13vw, 170px);
}
.rewards-copy > p { margin-top: 22px; color: #e2e6ff; max-width: 32em; }
.facts { margin: 30px 0 0; display: grid; gap: 0; }
.facts div { display: flex; justify-content: space-between; gap: 16px; padding: 12px 0; border-bottom: 2px solid rgba(255,255,255,.3); }
.facts dt { color: #cfd4ff; }
.facts dd { margin: 0; font-weight: 600; text-align: right; }

.chart {
  margin: 0; background: var(--paper); color: var(--ink);
  border: var(--border); border-radius: 24px; box-shadow: 10px 10px 0 var(--ink);
  padding: 20px 20px 16px;
}
.chart .grid line { stroke: #dfe2f5; stroke-width: 1.5; }
.chart .axis-labels text { font: 500 13px var(--body); fill: var(--muted); }
.chart .area { fill: var(--butter); }
.chart .curve { fill: none; stroke: var(--ink); stroke-width: 4; stroke-linejoin: round; stroke-linecap: round; }
.chart .dot { fill: var(--bubble); stroke: var(--ink); stroke-width: 3; }
.chart figcaption { font-size: .88rem; color: var(--muted); margin-top: 6px; }

/* Stats */
.stat-list {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  border-block: var(--border); border-color: var(--paper);
}
.stat-list li { padding: 26px 20px 26px 0; display: grid; gap: 4px; }
.stat-list li + li { padding-left: 20px; border-left: 2px solid rgba(255,255,255,.35); }
.stat-list strong { font: 800 clamp(2rem, 4.4vw, 3.4rem)/1 var(--display); font-stretch: 80%; letter-spacing: -.02em; color: var(--butter); }
.stat-list span { color: #e2e6ff; }
.note { margin-top: 12px; font-size: .85rem; color: #c3c9ff; }

/* FAQ */
.faq-list { margin-top: 40px; display: grid; gap: 14px; max-width: 860px; }
.faq details {
  background: var(--paper); color: var(--ink);
  border: var(--border); border-radius: 18px; box-shadow: var(--hard-sm);
}
.faq summary {
  list-style: none; cursor: pointer;
  padding: 20px 64px 20px 22px; position: relative;
  font: 700 1.25rem/1.2 var(--display); font-stretch: 90%;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; position: absolute; right: 20px; top: 50%;
  width: 28px; height: 28px; margin-top: -14px;
  border: 2.5px solid var(--ink); border-radius: 50%;
  background:
    linear-gradient(var(--ink), var(--ink)) center / 12px 2.5px no-repeat,
    linear-gradient(var(--ink), var(--ink)) center / 2.5px 12px no-repeat,
    var(--butter);
  transition: transform .2s ease;
}
.faq details[open] summary::after {
  transform: rotate(45deg);
  background-color: var(--bubble);
}
.faq details p { padding: 0 22px 22px; max-width: 62ch; color: #23264a; }

/* CTA */
.cta {
  max-width: var(--max); margin: clamp(80px, 10vw, 130px) auto 0;
  padding: 0 var(--gutter);
  display: flex; flex-direction: column; align-items: flex-start; gap: 32px;
}
.cta h2 {
  font-size: clamp(2.6rem, 6.6vw, 5.6rem); font-weight: 800; font-stretch: 78%;
  letter-spacing: -.035em; line-height: .92; max-width: 13em;
}

/* Footer */
.footer {
  max-width: var(--max); margin: clamp(80px, 10vw, 130px) auto 0;
  padding: 36px var(--gutter) 48px;
  border-top: 2px solid rgba(255,255,255,.35);
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 32px; align-items: start;
}
.logo-footer { font-size: 1.4rem; }
.footer p { font-size: .88rem; color: #c3c9ff; max-width: 60ch; }
.footer nav { display: flex; gap: 20px; }
.footer nav a { font-weight: 500; }

/* Toast */
.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%);
  background: var(--ink); color: var(--paper);
  border: 3px solid var(--butter); border-radius: 999px;
  padding: 14px 22px; font-weight: 600; z-index: 50;
  max-width: calc(100vw - 32px); text-align: center;
}

/* ---------- Hero load moment ---------- */
@media (prefers-reduced-motion: no-preference) {
  .hero-title .line { animation: drop .7s cubic-bezier(.2,1.4,.4,1) both; }
  .hero-title .line-2 { animation-delay: .12s; }
  .sim { animation: land .8s .25s cubic-bezier(.2,1.3,.4,1) both; }
  @keyframes drop { from { opacity: 0; transform: translateY(-40px) rotate(-3deg); } }
  @keyframes land { from { opacity: 0; transform: translateY(60px) rotate(-6deg); } }
}
@media (prefers-reduced-motion: reduce) {
  .strip-track { animation: none; }
  html { scroll-behavior: auto; }
  .btn, .faq summary::after { transition: none; }
}

/* ---------- Responsive ---------- */
@media (max-width: 1000px) {
  .hero { grid-template-columns: 1fr; }
  .sim { max-width: 520px; transform: none; }
  .steps { grid-template-columns: 1fr 1fr; }
  .step:nth-child(3) { padding-left: 0; border-left: 0; }
  .step:nth-child(n+3) { border-top: 2px solid rgba(255,255,255,.35); margin-top: 16px; }
  .section.use, .section.rewards { grid-template-columns: 1fr; }
  .use-intro { position: static; }
  .stat-list { grid-template-columns: 1fr 1fr; }
  .stat-list li:nth-child(3) { padding-left: 0; border-left: 0; }
  .stat-list li:nth-child(n+3) { border-top: 2px solid rgba(255,255,255,.35); }
}
@media (max-width: 760px) {
  .nav nav { display: none; }
  .nav .btn-small { margin-left: auto; }
  .footer { grid-template-columns: 1fr; gap: 18px; }
}
@media (max-width: 560px) {
  .steps { grid-template-columns: 1fr; }
  .step, .step + .step { padding-left: 0; border-left: 0; }
  .step + .step { border-top: 2px solid rgba(255,255,255,.35); margin-top: 8px; }
  .uses { grid-template-columns: 1fr; }
  .use-lp, .use-hold { transform: none; }
  .use-card { min-height: 0; }
  .sim { padding: 20px 18px 22px; border-radius: 22px; box-shadow: 6px 6px 0 var(--ink); }
  .input-wrap input { font-size: 1.5rem; }
  .receive strong { font-size: 1.7rem; }
  .projection { grid-template-columns: 1fr; }
  .nav .btn-small { padding: 9px 14px; font-size: .85rem; }
}

/* ---------- Solana wallet ---------- */
.wallet-btn.is-connected { background: var(--paper); gap: 8px; font-variant-numeric: tabular-nums; }
.wallet-btn.is-connected::before {
  content: ""; width: 9px; height: 9px; border-radius: 50%;
  background: #14c784; border: 2px solid var(--ink);
}

.wallet-modal {
  width: min(440px, calc(100vw - 32px));
  padding: 24px 24px 20px;
  background: var(--paper); color: var(--ink);
  border: var(--border); border-radius: 26px;
  box-shadow: 10px 10px 0 var(--ink);
}
.wallet-modal::backdrop { background: rgba(10, 18, 120, .55); }
.wallet-modal :focus-visible { outline-color: var(--cobalt); }
.wm-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.wm-head h2 { font-size: 1.6rem; font-stretch: 85%; letter-spacing: -.02em; }
.wm-close {
  flex: none; width: 38px; height: 38px; display: grid; place-items: center;
  border: 2.5px solid var(--ink); border-radius: 50%; background: var(--paper); color: var(--ink); cursor: pointer;
}
.wm-close:hover { background: var(--bubble); }
.wm-close svg { width: 18px; }
.wm-sub { margin-top: 8px; color: var(--muted); }
.wm-list { list-style: none; margin: 20px 0 0; padding: 0; display: grid; gap: 10px; }
.wm-item {
  width: 100%; display: flex; align-items: center; gap: 14px;
  padding: 12px 14px; text-align: left; text-decoration: none; cursor: pointer;
  background: var(--paper); color: var(--ink);
  border: 2.5px solid var(--ink); border-radius: 16px;
  font: 700 1.15rem/1.1 var(--display); font-stretch: 90%;
  transition: transform .12s ease, box-shadow .12s ease;
}
.wm-item:hover { transform: translate(-2px, -2px); box-shadow: var(--hard-sm); }
.wm-item[aria-busy="true"] { cursor: progress; opacity: .7; }
.wm-icon {
  flex: none; width: 40px; height: 40px; border-radius: 12px; border: 2px solid var(--ink);
  display: grid; place-items: center; overflow: hidden;
  font: 800 1.15rem/1 var(--display); color: var(--paper);
}
.wm-icon img { width: 100%; height: 100%; object-fit: cover; }
.wm-status { margin-left: auto; font: 600 .8rem/1 var(--body); color: var(--muted); }
.wm-status.ready { color: #0a8a5a; }
.wm-error {
  margin-top: 14px; padding: 10px 12px; border-radius: 12px;
  background: #ffe1ef; border: 2px solid var(--ink); font-size: .92rem;
}
.wm-foot { margin-top: 16px; font-size: .82rem; color: var(--muted); }

.account-address {
  display: block; margin-top: 16px; padding: 12px 14px;
  background: var(--butter); border: 2.5px solid var(--ink); border-radius: 14px;
  font: 600 .92rem/1.4 ui-monospace, SFMono-Regular, Menlo, monospace; word-break: break-all;
}
.account-actions { margin-top: 18px; display: flex; gap: 12px; flex-wrap: wrap; }

@media (prefers-reduced-motion: no-preference) {
  .wallet-modal[open] { animation: pop .22s cubic-bezier(.2,1.3,.4,1); }
  @keyframes pop { from { opacity: 0; transform: translateY(16px) scale(.97); } }
}
