:root {
  --paper: #ffffee;
  --paper-warm: #f0e0d6;
  --paper-blue: #d6daf0;
  --ink: #111111;
  --red: #800000;
  --green: #789922;
  --blue: #0000ee;
  --hair: #f5da52;
  --shadow: rgba(0, 0, 0, 0.2);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 19% 23%, rgba(128, 0, 0, 0.045) 0 1px, transparent 2px),
    radial-gradient(circle at 81% 62%, rgba(0, 0, 0, 0.04) 0 1px, transparent 2px),
    var(--paper);
  background-size: 27px 27px, 31px 31px, auto;
  font-family: Arial, Helvetica, sans-serif;
  min-width: 320px;
}

a {
  color: var(--blue);
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

.board-header {
  position: sticky;
  top: 0;
  z-index: 20;
  min-height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 10px clamp(14px, 3vw, 44px);
  border-bottom: 3px solid var(--red);
  background: rgba(255, 255, 238, 0.95);
  backdrop-filter: blur(6px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--red);
  text-decoration: none;
  font-weight: 900;
  letter-spacing: -0.04em;
  font-family: "Comic Sans MS", "Trebuchet MS", cursive;
  transform: rotate(-1deg);
}

.tiny-face {
  display: grid;
  place-items: center;
  width: 36px;
  height: 32px;
  border: 2px solid #111;
  border-radius: 48% 52% 45% 55%;
  background: white;
  color: #111;
  font: 700 12px/1 monospace;
  box-shadow: 2px 2px 0 var(--hair);
}

.nav-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px 18px;
  font: 700 12px/1.1 monospace;
}

.nav-links a {
  text-decoration: none;
}

.nav-links a:hover,
.final-links a:hover {
  color: var(--red);
  text-decoration: underline wavy;
}

main {
  width: min(1460px, calc(100% - 24px));
  margin: 24px auto 56px;
}

.thread-shell {
  position: relative;
  border: 3px solid #111;
  background: var(--paper-warm);
  box-shadow: 8px 9px 0 #111;
}

.thread-meta,
.post-head {
  display: flex;
  flex-wrap: wrap;
  gap: 7px 13px;
  align-items: center;
  font: 12px/1.2 monospace;
}

.thread-meta {
  padding: 9px 12px;
  border-bottom: 2px dashed #111;
  background: #fff;
}

.subject {
  color: var(--red);
  font-weight: 900;
}

.hero {
  overflow: hidden;
  transform: rotate(0.15deg);
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(380px, 1.1fr);
  min-height: 650px;
}

.hero-copy {
  position: relative;
  z-index: 2;
  padding: clamp(28px, 5vw, 74px);
  align-self: center;
}

.greentext {
  margin: 4px 0;
  color: var(--green);
  font: 700 clamp(14px, 1.45vw, 20px)/1.25 monospace;
}

h1,
h2,
.ticker,
.scribble,
.drawn-btn {
  font-family: "Comic Sans MS", "Trebuchet MS", cursive;
}

h1 {
  margin: 16px 0 0;
  color: #111;
  font-size: clamp(72px, 10vw, 164px);
  line-height: 0.72;
  letter-spacing: -0.085em;
  text-transform: uppercase;
  transform: skew(-2deg) rotate(-1deg);
}

h1 span {
  color: var(--hair);
  -webkit-text-stroke: 3px #111;
  text-shadow: 5px 5px 0 var(--red);
}

.ticker {
  display: inline-block;
  margin: 22px 0 10px 7px;
  padding: 5px 12px;
  border: 3px solid #111;
  border-radius: 51% 46% 52% 44%;
  background: #fff;
  color: var(--red);
  font-weight: 900;
  font-size: clamp(28px, 4vw, 58px);
  line-height: 1;
  transform: rotate(2deg);
}

.lede {
  max-width: 520px;
  margin: 13px 0 24px;
  font: 700 clamp(16px, 1.5vw, 21px)/1.35 monospace;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.drawn-btn,
.copy-btn {
  cursor: pointer;
  border: 3px solid #111;
  background: #fff;
  color: #111;
  box-shadow: 4px 5px 0 #111;
  text-decoration: none;
  font-weight: 900;
  transition: transform 100ms ease, box-shadow 100ms ease, background 100ms ease;
}

.drawn-btn {
  display: inline-flex;
  align-items: center;
  min-height: 52px;
  padding: 10px 17px;
  font-size: 16px;
  transform: rotate(-1deg);
}

.drawn-btn:nth-child(even) {
  transform: rotate(1deg);
}

.drawn-btn.primary {
  background: var(--hair);
}

.drawn-btn.small {
  min-height: 42px;
  padding: 7px 12px;
  font-size: 13px;
}

.drawn-btn:hover,
.copy-btn:hover {
  background: #fff9af;
  transform: translate(2px, 2px) rotate(0deg);
  box-shadow: 2px 3px 0 #111;
}

.drawn-btn:active,
.copy-btn:active {
  transform: translate(4px, 5px);
  box-shadow: none;
}

.hero-art-wrap {
  position: relative;
  display: grid;
  place-items: end center;
  min-height: 610px;
  overflow: hidden;
}

.hero-art-wrap::before {
  content: "";
  position: absolute;
  width: 69%;
  aspect-ratio: 1;
  border: 4px solid #111;
  border-radius: 45% 55% 49% 51%;
  background: var(--paper-blue);
  transform: rotate(8deg);
}

.hero-art {
  position: relative;
  z-index: 1;
  width: min(94%, 720px);
  max-height: 650px;
  object-fit: contain;
  object-position: center bottom;
  filter: saturate(0.93) contrast(1.05);
}

.scribble {
  position: absolute;
  z-index: 3;
  color: var(--red);
  font-weight: 900;
  font-size: clamp(17px, 2vw, 30px);
}

.s1 {
  top: 18%;
  left: 6%;
  transform: rotate(-13deg);
}

.s2 {
  top: 9%;
  right: 6%;
  transform: rotate(11deg);
}

.ca-strip {
  position: relative;
  z-index: 4;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: stretch;
  margin: 0 18px 18px;
  border: 3px solid #111;
  background: #fff;
  box-shadow: 5px 5px 0 var(--red);
  transform: rotate(-0.4deg);
}

.ca-label,
.ca-strip code,
.copy-btn {
  min-height: 54px;
  display: flex;
  align-items: center;
}

.ca-label {
  padding: 0 14px;
  border-right: 2px dashed #111;
  color: var(--red);
  font: 900 18px/1 monospace;
}

.ca-strip code {
  overflow: hidden;
  padding: 0 14px;
  white-space: nowrap;
  text-overflow: ellipsis;
  font: 700 15px/1 monospace;
}

.copy-btn {
  justify-content: center;
  min-width: 92px;
  margin: -3px -3px -3px 0;
  padding: 0 14px;
  font: 900 14px/1 monospace;
  box-shadow: none;
  background: var(--hair);
}

.posts {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 34px 26px;
  margin: 72px 3vw;
  align-items: start;
}

.post {
  position: relative;
  border: 2px solid #111;
  background: var(--paper-warm);
  box-shadow: 5px 5px 0 var(--shadow);
}

.post::after {
  content: "";
  position: absolute;
  inset: 5px -7px -8px 6px;
  z-index: -1;
  border: 2px solid rgba(0, 0, 0, 0.18);
}

.post-head {
  padding: 7px 9px;
  border-bottom: 1px solid #aaa;
}

.post-head b {
  color: #117743;
}

.post-body {
  padding: 14px 16px 18px;
  font: 15px/1.45 monospace;
}

.post-body p {
  margin: 6px 0;
}

.post-wide {
  grid-column: 1 / span 7;
}

.stats-post {
  grid-column: 8 / span 5;
  margin-top: 65px;
}

.image-post {
  grid-column: 3 / span 8;
}

.tilt-left {
  transform: rotate(-0.8deg);
}

.tilt-right {
  transform: rotate(0.9deg);
}

.with-thumb {
  display: grid;
  grid-template-columns: minmax(160px, 0.65fr) 1fr;
  gap: 20px;
  align-items: center;
}

.with-thumb img {
  width: 100%;
  max-height: 340px;
  object-fit: contain;
}

.token-stats {
  display: grid;
  gap: 7px;
  margin: 16px 0 0;
}

.token-stats div {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 8px 0;
  border-top: 1px dashed #777;
}

.token-stats dt {
  color: var(--red);
  font-weight: 900;
}

.token-stats dd {
  margin: 0;
  text-align: right;
  font-weight: 700;
}

.image-post .post-body > img {
  display: block;
  width: min(100%, 620px);
  max-height: 520px;
  margin: 16px auto 0;
  object-fit: contain;
}

.chart-section {
  margin: 90px 1.5vw 60px;
  background: var(--paper-blue);
  transform: rotate(-0.2deg);
}

.chart-title-row {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  padding: 24px 24px 14px;
}

.chart-title-row h2 {
  margin: 4px 0 0;
  color: var(--red);
  font-size: clamp(30px, 5vw, 68px);
  line-height: 0.9;
  letter-spacing: -0.06em;
}

.chart-frame {
  height: clamp(440px, 65vh, 720px);
  margin: 0 22px 24px;
  border: 3px solid #111;
  background: #111;
  overflow: hidden;
}

.chart-frame iframe {
  width: 100%;
  height: 100%;
  border: 0;
  background: #fff;
}

.chart-waiting {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 24px;
  background:
    repeating-linear-gradient(0deg, transparent 0 29px, rgba(120, 153, 34, 0.13) 30px 31px),
    #ffffee;
  text-align: center;
  font-family: monospace;
}

.waiting-face {
  color: var(--red);
  font-size: clamp(48px, 10vw, 130px);
  font-weight: 900;
  transform: rotate(-2deg);
}

.chart-waiting strong {
  font-size: clamp(20px, 3vw, 38px);
}

.final-post {
  width: min(980px, calc(100% - 40px));
  margin: 100px auto 70px;
  transform: rotate(0.7deg);
}

.final-grid {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 30px;
  align-items: end;
}

.final-grid h2 {
  margin: 24px 0 0;
  font-size: clamp(25px, 4vw, 48px);
  line-height: 0.95;
}

.final-links {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 12px;
  font: 900 14px/1.1 monospace;
}

footer {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 20px clamp(14px, 3vw, 44px) 36px;
  border-top: 2px dashed #888;
  color: #555;
  font: 11px/1.4 monospace;
}

.toast {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 50;
  padding: 12px 16px;
  border: 3px solid #111;
  background: var(--hair);
  box-shadow: 4px 4px 0 #111;
  font: 900 14px/1 monospace;
  opacity: 0;
  pointer-events: none;
  transform: translateY(14px) rotate(2deg);
  transition: opacity 150ms ease, transform 150ms ease;
}

.toast.show {
  opacity: 1;
  transform: translateY(0) rotate(-1deg);
}

@media (max-width: 860px) {
  .board-header {
    align-items: flex-start;
  }

  .brand {
    font-size: 13px;
  }

  .nav-links {
    max-width: 230px;
    gap: 7px 12px;
    font-size: 10px;
  }

  main {
    width: min(100% - 16px, 760px);
    margin-top: 12px;
  }

  .hero-grid {
    grid-template-columns: 1fr;
  }

  .hero-copy {
    padding: 28px 20px 5px;
  }

  h1 {
    font-size: clamp(70px, 24vw, 128px);
  }

  .hero-art-wrap {
    min-height: 400px;
  }

  .hero-art {
    max-height: 470px;
  }

  .ca-strip {
    margin: 0 10px 12px;
  }

  .posts {
    grid-template-columns: 1fr;
    margin: 55px 10px;
  }

  .post-wide,
  .stats-post,
  .image-post {
    grid-column: auto;
    margin-top: 0;
  }

  .chart-section {
    margin: 70px 2px 50px;
  }

  .chart-title-row {
    align-items: flex-start;
    flex-direction: column;
  }

  .chart-frame {
    height: 520px;
    margin: 0 12px 16px;
  }
}

@media (max-width: 560px) {
  .desktop-only {
    display: none;
  }

  .board-header {
    position: relative;
    display: block;
  }

  .nav-links {
    margin-top: 10px;
    justify-content: flex-start;
    max-width: none;
  }

  .hero-copy {
    padding-inline: 14px;
  }

  .greentext {
    font-size: 13px;
  }

  h1 {
    font-size: clamp(58px, 25vw, 96px);
  }

  h1 span {
    -webkit-text-stroke-width: 2px;
    text-shadow: 3px 3px 0 var(--red);
  }

  .hero-art-wrap {
    min-height: 320px;
  }

  .scribble {
    font-size: 14px;
  }

  .ca-strip {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .ca-strip code {
    padding-inline: 9px;
    font-size: 12px;
  }

  .copy-btn {
    grid-column: 1 / -1;
    min-height: 44px;
    width: calc(100% + 6px);
    margin: 0 -3px -3px;
  }

  .with-thumb {
    grid-template-columns: 1fr;
  }

  .with-thumb img {
    max-height: 290px;
  }

  .chart-frame {
    height: 430px;
  }

  .final-grid {
    grid-template-columns: 1fr;
  }

  .final-links {
    align-items: flex-start;
  }

  footer {
    flex-direction: column;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
  }
}
