:root {
  --black: #020000;
  --panel: #0a0202;
  --red: #ff1a13;
  --deep-red: #710600;
  --white: #fff4ef;
  --muted: #9e7772;
  --bar-accent: #ff1a13;
  --banner-hue: 0deg;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  background: var(--black);
}

body {
  margin: 0;
  color: var(--white);
  background:
    radial-gradient(circle at 80% 8%, rgba(255, 20, 10, 0.16), transparent 26rem),
    linear-gradient(#030000, #090000 45%, #020000);
  font-family: Arial, Helvetica, sans-serif;
  overflow-x: hidden;
}

button,
a {
  font: inherit;
}

a {
  color: inherit;
}

.noise {
  position: fixed;
  inset: 0;
  z-index: 50;
  opacity: 0.045;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.9'/%3E%3C/svg%3E");
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  height: 64px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 20px;
  padding: 0 28px;
  background: rgba(3, 0, 0, 0.91);
  border-bottom: 1px solid var(--bar-accent);
  backdrop-filter: blur(16px);
}

.mini-brand {
  width: fit-content;
  color: var(--bar-accent);
  font-family: Impact, "Arial Black", sans-serif;
  font-size: 30px;
  text-decoration: none;
  letter-spacing: -1px;
}

.mini-brand span {
  text-transform: lowercase;
}

.pulse {
  color: #d7b1ac;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.22em;
}

.pulse i {
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-right: 8px;
  border-radius: 50%;
  background: var(--bar-accent);
  box-shadow: 0 0 14px var(--bar-accent);
  animation: pulse 1s steps(2) infinite;
}

.top-buy {
  justify-self: end;
  padding: 10px 16px;
  color: #120000;
  background: var(--bar-accent);
  border: 1px solid var(--bar-accent);
  font-size: 12px;
  font-weight: 950;
  text-decoration: none;
  letter-spacing: 0.08em;
}

.top-buy[aria-disabled="true"] {
  opacity: 0.5;
  pointer-events: none;
}

main {
  width: min(1500px, 100%);
  margin: 0 auto;
}

.hero {
  position: relative;
  padding: 32px clamp(18px, 4vw, 64px) 80px;
  --red: #ff1a13;
  --deep-red: #710600;
}

.hero::before {
  display: none;
}

.hero-art {
  display: block;
  width: 100%;
  aspect-ratio: 3 / 1;
  object-fit: cover;
  border: 1px solid var(--deep-red);
  box-shadow: 0 35px 80px rgba(255, 0, 0, 0.14);
  filter: none;
}

.contract-bar {
  position: relative;
  z-index: 3;
  display: grid;
  grid-template-columns: minmax(260px, 1.7fr) repeat(3, minmax(120px, 0.65fr));
  gap: 8px;
  width: 100%;
  margin: 18px 0 0;
}

.contract,
.action {
  min-height: 58px;
  color: var(--white);
  background: rgba(11, 2, 2, 0.96);
  border: 1px solid #5f1713;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px 16px;
  text-decoration: none;
  font-size: 12px;
  font-weight: 950;
  letter-spacing: 0.08em;
  cursor: pointer;
  transition: 160ms ease;
}

.contract {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 14px;
  text-align: left;
}

.contract span,
.contract em {
  color: var(--red);
  font-style: normal;
  font-size: 10px;
}

.contract b {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-family: "Courier New", monospace;
  font-size: 12px;
}

.action-hot {
  color: #130000;
  background: var(--red);
  border-color: var(--red);
}

.contract:hover,
.action:hover,
footer button:hover {
  transform: translateY(-3px);
  border-color: var(--red);
  box-shadow: 0 10px 30px rgba(255, 20, 13, 0.2);
}

.action[aria-disabled="true"] {
  pointer-events: none;
  opacity: 0.48;
}

.copied {
  color: #170000 !important;
  background: var(--red) !important;
}

.incident-copy {
  display: grid;
  grid-template-columns: auto minmax(0, 820px);
  justify-content: space-between;
  align-items: start;
  gap: 40px;
  margin: 76px 2% 0 8%;
}

.incident-copy span {
  padding: 10px 14px;
  color: var(--red);
  border: 1px solid var(--deep-red);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.16em;
  transform: rotate(-2deg);
}

.incident-copy p {
  margin: 0;
  max-width: 800px;
  font-family: Impact, "Arial Black", sans-serif;
  font-size: clamp(31px, 4.4vw, 74px);
  line-height: 0.96;
  letter-spacing: -0.02em;
}

.market-scene {
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(330px, 0.75fr);
  gap: clamp(18px, 4vw, 64px);
  align-items: start;
  padding: 42px clamp(18px, 4vw, 64px) 100px;
  --red: #ff1a13;
  --deep-red: #710600;
}

.panel,
.receipt,
.dex-zone {
  border: 1px solid #4f110d;
  background: linear-gradient(145deg, rgba(18, 3, 3, 0.96), rgba(3, 0, 0, 0.96));
}

.sol-panel {
  --red: #ff1a13;
  --deep-red: #710600;
  transform: rotate(-0.55deg);
  box-shadow: -18px 22px 0 rgba(85, 4, 0, 0.38);
}

.panel-head {
  min-height: 82px;
  padding: 18px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  border-bottom: 1px solid #4f110d;
}

.panel-head small,
.dex-title span {
  color: var(--red);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.2em;
}

.panel-head h2,
.dex-title h2 {
  margin: 4px 0 0;
  font-family: Impact, "Arial Black", sans-serif;
  font-size: 34px;
  font-weight: 400;
  letter-spacing: 0.03em;
}

.panel-head strong {
  color: #ba8b86;
  font-size: 10px;
  letter-spacing: 0.08em;
}

.chart-frame {
  display: block;
  width: 100%;
  height: 520px;
  border: 0;
  background: #050101;
}

.receipt {
  position: relative;
  margin-top: 106px;
  padding: 20px;
  transform: rotate(1.4deg);
  box-shadow: 16px 18px 0 rgba(85, 4, 0, 0.34);
  --red: #ff1a13;
  --deep-red: #710600;
}

.receipt-tag {
  position: absolute;
  top: -16px;
  right: 22px;
  padding: 9px 14px;
  color: #160000;
  background: var(--red);
  font-size: 11px;
  font-weight: 950;
  letter-spacing: 0.13em;
}

.tweet-shell {
  min-height: 320px;
  display: grid;
  place-items: center;
}

.twitter-tweet {
  width: 100% !important;
  margin: 0 !important;
}

.twitter-tweet p {
  color: var(--white);
  font-size: 25px;
  font-weight: 900;
  line-height: 1.1;
}

.twitter-tweet a {
  color: var(--red);
}

.receipt-copy {
  margin: 20px 4px 2px;
  color: #c99d97;
  font-family: Impact, "Arial Black", sans-serif;
  font-size: 25px;
  line-height: 1.05;
}

.dex-zone {
  width: calc(100% - clamp(36px, 8vw, 128px));
  margin: 0 auto 100px;
  transform: rotate(0.35deg);
  box-shadow: 0 28px 80px rgba(255, 0, 0, 0.12);
  --red: #ff1a13;
  --deep-red: #710600;
}

.dex-title {
  min-height: 105px;
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: center;
  gap: 28px;
  padding: 18px 26px;
  border-bottom: 1px solid #4f110d;
}

.dex-title h2 {
  font-size: clamp(33px, 4vw, 58px);
}

.dex-title a {
  padding: 12px 16px;
  color: var(--red);
  border: 1px solid #6d1712;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.09em;
  text-decoration: none;
}

.dex-wrap {
  position: relative;
  min-height: 600px;
  background: #040000;
}

#dex-frame {
  display: block;
  width: 100%;
  height: 600px;
  border: 0;
}

.dex-wait {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  color: var(--red);
  background: radial-gradient(circle, #170000, #030000 60%);
  font-size: 13px;
  font-weight: 950;
  letter-spacing: 0.18em;
  transition: opacity 220ms ease;
}

.dex-wait img {
  width: min(260px, 52vw);
  filter: drop-shadow(0 0 25px rgba(255, 24, 15, 0.45));
}

.dex-wait.hidden {
  opacity: 0;
  pointer-events: none;
}

footer {
  min-height: 210px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 26px;
  margin: 0 clamp(18px, 4vw, 64px);
  padding: 40px 0;
  border-top: 1px solid #5a100b;
}

footer img {
  width: 88px;
}

footer div {
  display: flex;
  flex-direction: column;
}

footer strong {
  color: var(--red);
  font-family: Impact, "Arial Black", sans-serif;
  font-size: 58px;
  font-weight: 400;
  line-height: 0.9;
}

footer span {
  color: var(--muted);
  margin-top: 9px;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.15em;
}

footer button {
  padding: 14px 20px;
  color: var(--white);
  background: transparent;
  border: 1px solid #6d1712;
  font-size: 11px;
  font-weight: 950;
  letter-spacing: 0.1em;
  cursor: pointer;
}

.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;
}

.market-locked {
  overflow: hidden;
}

.market-loader {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  grid-template-rows: auto 1fr auto;
  min-height: 100dvh;
  padding: clamp(22px, 4vw, 64px);
  color: #eafff1;
  background:
    radial-gradient(circle at 74% 35%, rgba(32, 255, 122, 0.12), transparent 34rem),
    linear-gradient(145deg, #001108, #000603 68%);
  transform-origin: center;
  transition: transform 700ms cubic-bezier(0.8, 0, 0.2, 1), opacity 180ms 520ms linear;
  overflow: hidden;
}

.market-loader.done {
  transform: scaleY(0);
  opacity: 0;
  pointer-events: none;
  animation: none;
}

.loader-flash {
  position: absolute;
  inset: 0;
  opacity: 0;
  background: radial-gradient(circle at 84% 72%, rgba(255, 28, 18, 0.78), rgba(64, 0, 0, 0.4) 32%, transparent 68%);
  pointer-events: none;
}

.market-loader.crashing {
  background:
    radial-gradient(circle at 80% 66%, rgba(255, 20, 10, 0.17), transparent 30rem),
    linear-gradient(145deg, #170000, #040000 68%);
  animation: market-impact 360ms linear;
}

.market-loader.crashing .loader-flash {
  animation: loader-flash 620ms ease-out;
}

.loader-head,
.loader-bottom {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.loader-head span,
.loader-bottom strong {
  color: #20ff7a;
  font-size: clamp(11px, 1.2vw, 15px);
  font-weight: 950;
  letter-spacing: 0.22em;
}

.loader-head strong {
  color: #20ff7a;
  font-family: Impact, "Arial Black", sans-serif;
  font-size: clamp(40px, 7vw, 112px);
  font-weight: 400;
  letter-spacing: 0.01em;
  line-height: 0.9;
  text-shadow: 0 0 34px rgba(32, 255, 122, 0.32);
}

.market-loader.crashing .loader-head strong,
.market-loader.crashing .loader-bottom strong {
  color: var(--red);
  text-shadow: 0 0 34px rgba(255, 26, 19, 0.4);
}

.loader-chart {
  position: relative;
  z-index: 1;
  min-height: 0;
  margin: clamp(20px, 3vw, 46px) 0;
  border-top: 1px solid rgba(32, 255, 122, 0.18);
  border-bottom: 1px solid rgba(32, 255, 122, 0.18);
}

.loader-chart svg {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 300px;
  overflow: visible;
}

.loader-grid path {
  fill: none;
  stroke: rgba(53, 255, 134, 0.08);
  stroke-width: 1;
  vector-effect: non-scaling-stroke;
}

.loader-rise,
.loader-crash,
.loader-hundred {
  fill: none;
  vector-effect: non-scaling-stroke;
}

.loader-rise {
  stroke: #20ff7a;
  stroke-width: 5;
  stroke-linecap: square;
  stroke-linejoin: bevel;
  stroke-dasharray: 1800;
  stroke-dashoffset: 1800;
  filter: drop-shadow(0 0 10px rgba(32, 255, 122, 0.65));
  animation: draw-rise 1550ms cubic-bezier(0.18, 0.72, 0.22, 1) forwards;
}

.loader-crash {
  stroke: #ff1a13;
  stroke-width: 12;
  stroke-linecap: square;
  stroke-linejoin: bevel;
  stroke-dasharray: 800;
  stroke-dashoffset: 800;
  filter: drop-shadow(0 0 14px rgba(255, 26, 19, 0.78));
  animation: draw-crash 520ms 1660ms cubic-bezier(0.72, 0, 1, 0.42) forwards;
}

.loader-hundred {
  stroke: #20ff7a;
  stroke-width: 2;
  stroke-dasharray: 8 8;
  opacity: 0;
  animation: peak-arrives 300ms 1280ms forwards;
}

.loader-peak {
  fill: #20ff7a;
  opacity: 0;
  filter: drop-shadow(0 0 12px #20ff7a);
  animation: peak-arrives 240ms 1450ms forwards;
}

.loader-label {
  fill: #20ff7a;
  opacity: 0;
  font-family: Impact, "Arial Black", sans-serif;
  font-size: 42px;
  letter-spacing: 2px;
  animation: peak-arrives 240ms 1300ms forwards;
}

.loader-bottom button {
  padding: 10px 15px;
  color: rgba(234, 255, 241, 0.62);
  background: transparent;
  border: 1px solid rgba(32, 255, 122, 0.3);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.14em;
  cursor: pointer;
}

.market-loader.crashing .loader-bottom button {
  border-color: rgba(255, 26, 19, 0.45);
}

@keyframes draw-rise {
  to { stroke-dashoffset: 0; }
}

@keyframes draw-crash {
  to { stroke-dashoffset: 0; }
}

@keyframes peak-arrives {
  to { opacity: 1; }
}

@keyframes loader-flash {
  0% { opacity: 0; }
  14% { opacity: 1; }
  100% { opacity: 0; }
}

@keyframes market-impact {
  0%, 100% { transform: translate(0, 0); }
  20% { transform: translate(-8px, 3px); }
  40% { transform: translate(9px, -4px); }
  60% { transform: translate(-5px, -2px); }
  80% { transform: translate(4px, 2px); }
}

@keyframes pulse {
  50% { opacity: 0.25; }
}

@media (max-width: 900px) {
  .topbar {
    grid-template-columns: 1fr auto;
    padding: 0 16px;
  }

  .pulse {
    display: none;
  }

  .hero {
    padding: 18px 12px 54px;
  }

  .hero-art {
    min-height: 300px;
    object-position: center;
  }

  .contract-bar {
    width: calc(100% - 12px);
    margin: 14px auto 0;
    grid-template-columns: 1fr 1fr;
  }

  .contract {
    grid-column: 1 / -1;
  }

  .incident-copy {
    grid-template-columns: 1fr;
    margin: 50px 4% 0;
    gap: 24px;
  }

  .incident-copy span {
    width: fit-content;
  }

  .market-scene {
    grid-template-columns: 1fr;
    padding: 28px 18px 76px;
  }

  .sol-panel,
  .receipt,
  .dex-zone {
    transform: none;
  }

  .receipt {
    width: min(540px, 96%);
    margin: 24px 0 0 auto;
  }

  .dex-title {
    grid-template-columns: 1fr auto;
  }

  .dex-title span {
    grid-column: 1 / -1;
  }
}

@media (max-width: 560px) {
  .market-loader {
    padding: 22px 16px;
  }

  .loader-chart {
    margin-block: 16px;
  }

  .loader-chart svg {
    min-height: 360px;
  }

  .loader-head strong {
    font-size: 48px;
  }

  .top-buy {
    padding: 9px 11px;
  }

  .hero-art {
    aspect-ratio: 4 / 3;
    object-position: 51% center;
  }

  .contract-bar {
    margin-top: 12px;
  }

  .action {
    min-width: 0;
    padding-inline: 8px;
    font-size: 10px;
  }

  .contract {
    gap: 8px;
    padding-inline: 10px;
  }

  .incident-copy p {
    font-size: 40px;
  }

  .panel-head {
    align-items: flex-start;
  }

  .panel-head strong {
    max-width: 105px;
    text-align: right;
  }

  .chart-frame,
  #dex-frame,
  .dex-wrap {
    height: 460px;
    min-height: 460px;
  }

  .dex-title {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .dex-title span {
    grid-column: auto;
  }

  .dex-title a {
    width: fit-content;
  }

  footer {
    grid-template-columns: auto 1fr;
  }

  footer button {
    grid-column: 1 / -1;
    width: 100%;
  }
}

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