/* FUDPAD: three acts, black stage, paper strike, red launch. One squarish grotesk, one red. */
@font-face {
  font-family: "Archivo FUD";
  src: url("/assets/fonts/archivo-var.woff2") format("woff2");
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-display: swap;
}

:root {
  --ink: #0b0a0a;
  --red: #f92917;
  --red-deep: #b30000;
  --paper: #f4f1ea;
  --cream: #ede6d6;
  --dock: #161515;
  --line: #2b2a2a;
  --grey: #8a8783;
  --hud: clamp(11px, .58vw, 15px);
  --m: clamp(16px, 2vw, 32px);
  --dock-h: 46px;
  --font: "Archivo FUD", "Arial Narrow", Arial, sans-serif;
  --ease: cubic-bezier(.16, 1, .3, 1);
  --mute-3: #4b4845;
  --mute: #6d6965;
  --rule-paper: #cfcac0;
  --c-ddd8cd: #ddd8cd;
  --mute-2: #a8a39b;
  --soft: #b9b2a4;
  --rule-dark: #4a4747;
  --hint: #6a6560;
  --c-5d5853: #5d5853;
  --soft-2: #d8d1c3;
  --c-3ccf6e: #3ccf6e;
  --err: #ff8a7d;
  --c-c21f10: #c21f10;
  --rule-dock: #3d3a3a;
}

*, *::before, *::after { box-sizing: border-box; }
html { overflow-x: clip; }
html { -webkit-text-size-adjust: 100%; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
body {
  margin: 0;
  background: var(--ink);
  color: var(--cream);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.4;
  overflow-x: clip;
  padding-bottom: var(--dock-h);
}
img { display: block; max-width: 100%; }
a { color: inherit; }
button, input, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--red); outline-offset: 3px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: fixed; left: 12px; top: -60px; z-index: 50; background: var(--cream); color: var(--ink); padding: 10px 14px; }
.skip:focus { top: 12px; }
b { font-weight: 700; }
[hidden] { display: none !important; }

.act { position: relative; overflow: clip; }
.terrain { position: absolute; left: 0; right: 0; bottom: 0; width: 100%; height: 34vh; pointer-events: none; }

/* ---------- Act one: the stage ---------- */
.act-stage { background: var(--ink); color: var(--cream); min-height: 190vh; }
.stage-view { position: sticky; top: 0; height: calc(100vh - var(--dock-h)); min-height: 560px; overflow: hidden; container-type: size; }
/* The cover's strike: a red X across the target's scan (the disc is 70% of the stage height), then the FUD stamp */
.xmark { position: absolute; left: 50%; top: 50%; width: 70cqh; height: 70cqh; translate: -50% -50%; z-index: 1; pointer-events: none; }
.xs { position: absolute; left: -5%; top: 45%; width: 110%; height: 10%; background: var(--red); }
.xs-a { rotate: 45deg; animation: xs-a .5s var(--ease) 1.5s both; }
.xs-b { rotate: -45deg; animation: xs-b .5s var(--ease) 1.8s both; }
@keyframes xs-a { from { clip-path: inset(0 100% 0 0); } }
@keyframes xs-b { from { clip-path: inset(0 0 0 100%); } }
.stamp {
  --sw: 30cqh;
  position: absolute; z-index: 1; margin: 0; pointer-events: none;
  top: 50%; translate: 0 -50%;
  left: min(calc(50% + 35cqh + 3vw), calc(100% - var(--sw) - var(--m) - 2vw));
  width: var(--sw); padding: 2.2cqh;
  background: var(--red); rotate: -4deg;
  animation: stamp-in .42s cubic-bezier(.3, 1.6, .5, 1) 2.2s both;
}
.stamp span {
  display: block; border: 1.4cqh solid var(--ink); color: var(--ink);
  font-size: 15cqh; font-weight: 900; font-stretch: 62%; line-height: 1; text-align: center;
  padding: .5cqh 0 1cqh;
}
@keyframes stamp-in { from { opacity: 0; transform: scale(1.7); } 60% { opacity: 1; } }
.xmark.again .xs, .stamp.again { animation: none; }
.scan { position: absolute; inset: 0; width: 100%; height: 100%; }
.hud { position: absolute; font-size: var(--hud); line-height: 1.45; z-index: 2; }
.hud p { margin: 0 0 14px; }
.hud b { font-weight: 600; font-size: 1.18em; letter-spacing: 0; }
.hud-tl { top: var(--m); left: var(--m); display: flex; gap: 12px; align-items: flex-start; }
.hud-tl b { font-weight: 800; font-stretch: 75%; font-size: 15px; }
.brandmark { width: 34px; height: 34px; }
.hud-tr { top: var(--m); right: var(--m); text-align: right; }
.hud-bl { left: var(--m); bottom: var(--m); max-width: min(34rem, 44vw); }
.hud-br { right: var(--m); bottom: var(--m); text-align: right; }
.hud-br b { font-size: clamp(18px, 1.6vw, 26px); font-stretch: 80%; font-weight: 800; }
.stage-h {
  margin: 0;
  font-size: clamp(24px, 2.7vw, 48px);
  line-height: .98;
  font-weight: 800;
  font-stretch: 78%;
  letter-spacing: -.01em;
  text-wrap: balance;
}
.wall {
  position: relative;
  z-index: 3;
  margin: 6vh auto 0;
  width: min(680px, 86vw);
  padding-bottom: 18vh;
  mix-blend-mode: difference;
}
.wall-text {
  margin: 0;
  font-size: 13px;
  line-height: 1.6;
  text-align: justify;
  text-align-last: center;
  hyphens: auto;
  color: var(--cream);
}
.wall-text a { text-decoration: none; }
.wall-text a:hover { background: var(--cream); color: var(--ink); }
.wall-text .mc { color: var(--grey); }

/* ---------- Act two: the strike ---------- */
.act-strike { background: var(--paper); color: var(--ink); height: 260vh; }
.strike-pin { position: sticky; top: 0; height: calc(100vh - var(--dock-h)); min-height: 600px; overflow: hidden; }
.disc {
  position: absolute;
  --d: min(54vh, 40vw);
  left: calc(50% - var(--d) / 2); top: calc(47% - var(--d) / 2);
  width: var(--d);
  aspect-ratio: 1;
  border-radius: 50%;
  border: 1.5px solid var(--ink);
}
.disc img {
  position: absolute; inset: 9%;
  width: 82%; height: 82%;
  border-radius: 50%;
  object-fit: cover;
  filter: grayscale(1) contrast(1.15);
  mix-blend-mode: multiply;
  opacity: .9;
}
.slab {
  position: absolute;
  left: -25%; top: 42.5%;
  width: 150%; height: 15%;
  background: var(--red);
  will-change: transform;
}
.slab-a { transform: rotate(45deg); }
.slab-b { transform: rotate(-45deg); }
.vcount {
  position: absolute;
  right: calc(var(--m) * .6);
  top: 50%;
  margin: 0;
  writing-mode: vertical-rl;
  translate: 0 -50%;
  font-size: clamp(80px, 15vh, 190px);
  line-height: .8;
  font-weight: 900;
  font-stretch: 62%;
  letter-spacing: -.02em;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.strike-copy {
  position: absolute;
  left: var(--m); bottom: var(--m);
  width: min(30rem, 34vw);
  font-size: 13px;
}
.strike-copy h2 {
  margin: 0 0 12px;
  font-size: clamp(28px, 3.4vw, 60px);
  line-height: .92;
  font-weight: 900;
  font-stretch: 70%;
  letter-spacing: -.01em;
}
.strike-copy p { margin: 0 0 10px; max-width: 46ch; }
.strike-proof { color: var(--mute-3); }
.stream {
  position: absolute; top: 0;
  margin: 0; padding: 0;
  list-style: none;
  font-size: 12px;
  line-height: 1.9;
  will-change: transform;
}
.stream-l { left: var(--m); }
.stream-r { left: calc(var(--m) + 9rem); }
.stream a { text-decoration: none; }
.stream a:hover, .stream a:focus-visible { background: var(--ink); color: var(--paper); }
.stream .n { color: var(--mute); }

/* ---------- Board ---------- */
.act-board { background: var(--paper); color: var(--ink); padding: 14vh var(--m) 16vh; border-top: 1.5px solid var(--ink); }
.board-head { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: var(--m); align-items: end; margin-bottom: 7vh; }
.board-head h2 {
  margin: 0;
  font-size: clamp(64px, 11vw, 210px);
  line-height: .82;
  font-weight: 900;
  font-stretch: 62%;
  letter-spacing: -.02em;
}
.board-head p { margin: 0; font-size: 13px; max-width: 44ch; justify-self: end; }
.board { width: 100%; border-collapse: collapse; font-size: 13px; }
.board th { text-align: left; font-weight: 500; font-size: 11px; color: var(--mute); padding: 0 12px 10px 0; border-bottom: 1.5px solid var(--ink); }
.board td { padding: 14px 12px 14px 0; border-bottom: 1px solid var(--rule-paper); vertical-align: middle; }
.board .num { text-align: right; }
.board td.num {
  font-size: clamp(30px, 3.6vw, 64px);
  font-weight: 900;
  font-stretch: 62%;
  line-height: .9;
  font-variant-numeric: tabular-nums;
}
.coin { display: flex; gap: 12px; align-items: center; min-width: 0; }
.coin img { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; filter: grayscale(1); background: var(--c-ddd8cd); }
.coin b { font-size: 16px; font-stretch: 80%; }
.coin span { color: var(--mute); display: block; font-size: 11px; max-width: 18ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.board tr.row { cursor: pointer; }
.board tr.row:hover td { background: var(--ink); color: var(--paper); }
.board tr.row:hover .coin img { filter: none; }
.board tr.row:hover .coin span, .board tr.row:hover .dim { color: var(--mute-2); }
.dim { color: var(--mute); }
.board td.num .dim { font-size: 13px; font-weight: 400; font-stretch: 100%; }
.fud-btn {
  border: 0; background: var(--red); color: var(--ink);
  padding: 9px 14px; font-weight: 700; font-size: 13px; cursor: pointer; white-space: nowrap;
}
.fud-btn:hover { background: var(--ink); color: var(--red); }
.board tr.row:hover .fud-btn { background: var(--red); color: var(--ink); }
.empty { color: var(--mute); padding: 22px 0; }

/* ---------- Act three: the launch ---------- */
.act-launch { background: var(--red); color: var(--ink); padding: 8vh var(--m) 30vh; }
.act-launch .terrain { height: 28vh; }
.finale {
  position: relative; z-index: 1;
  margin: 0 0 6vh;
  text-align: center;
  font-size: clamp(84px, 19vw, 360px);
  line-height: .8;
  font-weight: 900;
  font-stretch: 62%;
  letter-spacing: -.025em;
}
.finale .ln { display: block; overflow: hidden; padding-bottom: .04em; }
.finale .ln > span { display: inline-block; }
.bar {
  position: relative; z-index: 1;
  background: var(--ink);
  color: var(--cream);
  display: grid;
  grid-template-columns: minmax(160px, 22vw) minmax(0, 1fr);
  margin: 0 calc(var(--m) * -1);
}
.bar-disc { display: grid; place-items: center; padding: 4vh 0; border-right: 1px solid var(--line); }
.bar-disc span {
  display: block;
  width: min(15vw, 210px); aspect-ratio: 1.5;
  background: var(--red);
  border-radius: 50%;
  animation: wob 7s linear infinite;
}
.bar-disc.busy span { animation-duration: .9s; }
@keyframes wob {
  0% { transform: rotate(0) scaleX(1); }
  25% { transform: rotate(90deg) scaleX(.55); }
  50% { transform: rotate(180deg) scaleX(1); }
  75% { transform: rotate(270deg) scaleX(.55); }
  100% { transform: rotate(360deg) scaleX(1); }
}
.console {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr);
  grid-template-areas: "t c" "g g";
  gap: 0;
}
.console fieldset { border: 0; margin: 0; padding: 28px var(--m); min-width: 0; }
.field-target { grid-area: t; border-right: 1px solid var(--line) !important; }
.field-coin { grid-area: c; display: grid; grid-template-columns: 1fr 1fr; gap: 14px 18px; align-content: start; }
.console legend {
  float: left; width: 100%;
  padding: 0; margin-bottom: 16px;
  font-size: clamp(22px, 2vw, 34px);
  font-weight: 800; font-stretch: 75%;
  line-height: 1;
}
.field-coin legend { grid-column: 1 / -1; margin-bottom: 4px; }
.console label { display: grid; gap: 6px; font-size: 12px; color: var(--soft); }
.console label.wide { grid-column: 1 / -1; }
.console input, .console textarea {
  width: 100%;
  background: transparent;
  border: 0; border-bottom: 1px solid var(--rule-dark);
  padding: 8px 0;
  color: var(--cream);
  font-size: 16px;
  border-radius: 0;
}
.console textarea { resize: vertical; min-height: 64px; }
.console input:focus, .console textarea:focus { outline: none; border-bottom-color: var(--red); }
.console input::placeholder, .console textarea::placeholder { color: var(--hint); }
.console .file input { border: 1px dashed var(--rule-dark); padding: 10px; font-size: 13px; }
.pick { position: relative; clear: both; }
.results {
  position: absolute; z-index: 5; left: 0; right: 0; top: 100%;
  margin: 0; padding: 0; list-style: none;
  background: var(--cream); color: var(--ink);
  max-height: 300px; overflow: auto;
}
.results button {
  width: 100%; display: flex; gap: 10px; align-items: center; text-align: left;
  border: 0; background: none; padding: 9px 12px; cursor: pointer; font-size: 13px;
}
.results button:hover, .results button:focus-visible { background: var(--ink); color: var(--cream); outline: none; }
.results img { width: 24px; height: 24px; border-radius: 50%; object-fit: cover; }
.results .dim { margin-left: auto; }
.sugg { margin: 14px 0 0; font-size: 13px; line-height: 1.9; color: var(--soft); }
.sugg button { border: 0; background: none; padding: 0 2px; margin-right: 8px; color: var(--cream); cursor: pointer; text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--c-5d5853); }
.sugg button:hover { background: var(--cream); color: var(--ink); }
.chosen { clear: both; display: flex; gap: 14px; align-items: center; margin: 4px 0 0; padding: 14px 0; border-bottom: 1px solid var(--line); font-size: 13px; color: var(--soft); }
.chosen img { width: 52px; height: 52px; flex: none; border-radius: 50%; object-fit: cover; background: var(--dock); }
.chosen b { font-size: 26px; font-stretch: 78%; color: var(--cream); }
.chosen.empty img { opacity: .35; filter: grayscale(1); }
.pick { margin-top: 18px; }
.verdict { margin: 14px 0 0; font-size: 13px; max-width: 46ch; color: var(--soft-2); }
.verdict.ok::before, .verdict.no::before { content: ""; display: inline-block; width: 9px; height: 9px; margin-right: 8px; border-radius: 50%; background: var(--c-3ccf6e); }
.verdict.no::before { background: var(--red); }
.go { grid-area: g; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px 24px; align-items: center; padding: 22px var(--m) 28px; border-top: 1px solid var(--line); }
.terms { margin: 0; font-size: 12px; color: var(--soft); max-width: 70ch; }
.launch-btn {
  border: 0; cursor: pointer;
  background: var(--red); color: var(--ink);
  padding: 16px 26px;
  font-size: 17px; font-weight: 800; font-stretch: 80%;
}
.launch-btn:hover { background: var(--cream); }
.launch-btn[disabled] { opacity: .55; cursor: progress; }
.status { grid-column: 1 / -1; margin: 0; font-size: 13px; min-height: 1.4em; color: var(--cream); }
.status.err { color: var(--err); }

.share { position: relative; z-index: 1; margin: 5vh 0 0; padding: 26px 0; border-top: 1.5px solid var(--ink); border-bottom: 1.5px solid var(--ink); }
.share-line { margin: 0 0 12px; font-size: clamp(26px, 3.4vw, 56px); font-weight: 900; font-stretch: 66%; line-height: .95; max-width: 22ch; }
.share-links { margin: 0; display: flex; flex-wrap: wrap; gap: 8px 22px; font-size: 14px; }
.share-links a:hover { background: var(--ink); color: var(--red); }

.recent { position: relative; z-index: 1; margin-top: 8vh; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2.4fr); gap: var(--m); }
.recent h3 { margin: 0; font-size: clamp(22px, 2vw, 34px); font-weight: 800; font-stretch: 75%; line-height: 1; }
.recent ul { margin: 0; padding: 0; list-style: none; font-size: 13px; }
.recent li { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) minmax(0, 1fr) auto; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--c-c21f10); align-items: baseline; }
.recent li.empty { display: block; color: var(--ink); border-bottom: 0; padding: 0; }
.recent a { text-decoration: none; }
.recent a:hover { background: var(--ink); color: var(--red); }
.foot { position: relative; z-index: 1; margin-top: 14vh; padding-bottom: 2vh; font-size: 11px; max-width: 70ch; }

/* ---------- The fixed bottom bar ---------- */
.dock {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
  height: var(--dock-h);
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  padding: 0 10px 0 var(--m);
  background: var(--dock);
  border-top: 1px solid var(--line);
  color: var(--cream);
  font-size: 12px;
}
.dock-l, .dock-r { display: flex; align-items: center; gap: 18px; min-width: 0; }
.dock a { text-decoration: none; white-space: nowrap; }
.dock-l > a:not(.ico):not(.dock-brand):hover { background: var(--cream); color: var(--ink); }
.dock-brand { display: flex; align-items: center; gap: 8px; font-weight: 800; font-stretch: 75%; font-size: 14px; }
.dock-brand img { width: 22px; height: 22px; }
.ico { display: grid; place-items: center; width: 26px; height: 26px; }
.ico svg { width: 16px; height: 16px; fill: currentColor; }
.ico:hover { background: var(--cream); color: var(--ink); }
.ca, .wallet {
  border: 1px solid var(--rule-dock); background: none; cursor: pointer;
  padding: 6px 10px; font-size: 12px; white-space: nowrap;
}
.ca:hover, .wallet:hover { background: var(--cream); color: var(--ink); border-color: var(--cream); }
.pairnote { color: var(--soft); white-space: nowrap; }
.clock { font-variant-numeric: tabular-nums; color: var(--soft); }
.buy {
  background: var(--cream); color: var(--ink) !important;
  padding: 8px 16px; border-radius: 999px; font-weight: 700;
}
.buy:hover { background: var(--red); }

/* ---------- Smaller screens ---------- */
@media (max-width: 1100px) {
  .pairnote, .clock { display: none; }
  .stream-r { display: none; }
}
@media (max-width: 860px) {
  .xmark { top: 34.8%; }
  .stamp { --sw: 34vw; left: auto; right: var(--m); top: 58%; padding: 2vw; }
  .stamp span { font-size: 17vw; border-width: 1.6vw; padding: .5vw 0 1.5vw; }
  :root { --dock-h: 52px; }
  .dock-l > a:not(.dock-brand):not(.ico) { display: none; }
  .dock { gap: 8px; padding-left: 12px; }
  .dock-r { gap: 8px; }
  .wallet { display: none; }
  .hud-bl { max-width: none; right: var(--m); bottom: 30%; }
  .hud-br { bottom: var(--m); }
  .hud-tr { display: none; }
  .act-strike { height: auto; }
  .strike-pin { position: relative; height: auto; min-height: 0; padding: 12vh var(--m) 10vh; display: grid; gap: 28px; }
  .disc { position: relative; left: auto; top: auto; --d: min(78vw, 360px); margin: 0 auto; }
  .vcount { position: relative; right: auto; top: auto; translate: none; writing-mode: horizontal-tb; font-size: 22vw; text-align: center; }
  .strike-copy { position: relative; left: auto; bottom: auto; width: auto; }
  .stream { display: none; }
  .board-head { grid-template-columns: 1fr; }
  .board-head p { justify-self: start; }
  .board thead { display: none; }
  .board, .board tbody, .board tr, .board td { display: block; }
  .board tr.row { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; padding: 14px 0; border-bottom: 1px solid var(--rule-paper); }
  .board td { border: 0; padding: 0; }
  .board td.num { grid-column: 2; grid-row: 1 / span 2; align-self: center; }
  .board td.c-vol, .board td.c-here { display: none; }
  .board td.c-act { grid-column: 1 / -1; }
  .bar { grid-template-columns: 1fr; }
  .bar-disc { border-right: 0; border-bottom: 1px solid var(--line); padding: 3vh 0; }
  .bar-disc span { width: 120px; }
  .console { grid-template-columns: 1fr; grid-template-areas: "t" "c" "g"; }
  .field-target { border-right: 0 !important; border-bottom: 1px solid var(--line) !important; }
  .field-coin { grid-template-columns: 1fr; }
  .go { grid-template-columns: 1fr; }
  .recent { grid-template-columns: 1fr; }
  .recent li { grid-template-columns: 1fr auto; }
  .recent li .r-mc, .recent li .r-by { display: none; }
}
@media (max-width: 420px) {
  .dock-brand span { display: none; }
  .ca { max-width: 30vw; overflow: hidden; text-overflow: ellipsis; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* Initial buy: sized in the paired coin, priced live on the fresh curve */
.ibuy { grid-column: 1 / -1; display: grid; gap: 10px; padding: 16px 0 18px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.ibuy-in { display: grid; grid-template-columns: minmax(0, 1fr) 7.5em; gap: 18px; }
.ibuy #fBuy { font-size: clamp(26px, 2.2vw, 38px); font-weight: 800; font-stretch: 75%; padding: 4px 0 6px; font-variant-numeric: tabular-nums; }
.ibuy #fSlip { font-variant-numeric: tabular-nums; }
.buy-est { margin: 0; font-size: 13px; line-height: 1.5; color: var(--soft); max-width: 62ch; }
.buy-est b { color: var(--cream); font-size: 22px; font-weight: 800; font-stretch: 75%; font-variant-numeric: tabular-nums; }
.buy-est .hit { color: var(--red); }
.buy-est.err { color: var(--err); }
.buy-bal { margin: 0; font-size: 12px; color: var(--soft); min-height: 1.3em; }
.buy-bal.short { color: var(--red); }
.swap-btn { justify-self: start; border: 1.5px solid var(--red); background: none; color: var(--red); padding: 10px 16px; font-size: 14px; font-weight: 700; font-stretch: 85%; cursor: pointer; white-space: nowrap; }
.swap-btn:hover, .swap-btn:focus-visible { background: var(--red); color: var(--ink); }
.swap-btn[disabled] { opacity: .55; cursor: progress; }
@media (max-width: 760px) { .ibuy-in { grid-template-columns: minmax(0, 1fr) 6em; } }
