:root {
  --sky: #1a86ff;
  --sky-deep: #0f6fe0;
  --grass: #2ba33c;
  --grass-deep: #1f8a2f;
  --paper: #fff8e4;
  --cloud: #ffffff;
  --yellow: #ffe14d;
  --pink: #e35bd6;
  --orange: #ff9a1f;
  --violet: #7b4dff;
  --ink: #000;
  --ink-soft: rgba(0, 0, 0, 0.7);
  --up: #0b7a26;
  --down: #c2182b;
  --grid: rgba(26, 134, 255, 0.16);
  --fat: "Titan One", "Arial Rounded MT Bold", "Arial Black", sans-serif;
  --hand: "Gochi Hand", "Comic Sans MS", cursive;
  --plain: "Atkinson Hyperlegible", "Segoe UI", sans-serif;
  --line: 3px solid var(--ink);
  --pop: 6px 6px 0 var(--ink);
}

* { box-sizing: border-box; }

html { background: var(--grass); }

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: var(--plain);
  font-size: 18px;
  line-height: 1.5;
  overflow-x: hidden;
}

::selection { background: var(--yellow); color: var(--ink); }

:focus-visible {
  outline: 3px solid var(--ink);
  outline-offset: 3px;
  box-shadow: 0 0 0 6px var(--yellow);
}

button, input { font: inherit; color: inherit; }

a { color: inherit; text-underline-offset: 3px; text-decoration-thickness: 2px; }
a:hover { background: var(--yellow); }

h1, h2 {
  font-family: var(--fat);
  font-weight: 400;
  line-height: 1;
  margin: 0;
}

/* buttons */

.btn {
  font-family: var(--fat);
  font-size: 18px;
  color: var(--ink);
  background: var(--yellow);
  border: var(--line);
  border-radius: 999px;
  padding: 10px 22px;
  box-shadow: 4px 4px 0 var(--ink);
  cursor: pointer;
  transition: transform 80ms ease, box-shadow 80ms ease;
}

.btn:hover { transform: translate(-1px, -1px); box-shadow: 5px 5px 0 var(--ink); }
.btn:active { transform: translate(3px, 3px); box-shadow: 1px 1px 0 var(--ink); }

.btn-pink { background: var(--pink); color: #fff; }
.btn-small { font-size: 15px; padding: 7px 16px; }

/* ticker */

.ticker {
  background: var(--yellow);
  border-bottom: var(--line);
  overflow: hidden;
  white-space: nowrap;
  font-family: var(--fat);
  font-size: 16px;
  padding: 7px 0;
}

.ticker-track {
  display: inline-flex;
  animation: ticker 40s linear infinite;
}

.ticker-track span { padding: 0 18px; }
.ticker-track span::after { content: "★"; margin-left: 36px; color: var(--pink); -webkit-text-stroke: 1px var(--ink); }
.ticker-track .up { color: var(--up); }
.ticker-track .down { color: var(--down); }

.ticker:hover .ticker-track { animation-play-state: paused; }

@keyframes ticker {
  to { transform: translateX(-50%); }
}

/* sky hero */

.sky {
  position: relative;
  background: var(--sky);
  overflow: hidden;
  padding: 48px 20px 0;
}

.clouds {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.cloud path { fill: var(--cloud); }
.cloud { animation: drift 60s ease-in-out infinite alternate; }
.cloud.c2 { animation-duration: 75s; animation-direction: alternate-reverse; }
.cloud.c3 { animation-duration: 50s; }
.cloud.c4 { animation-duration: 90s; animation-direction: alternate-reverse; }

@keyframes drift {
  to { transform: translateX(80px); }
}

.sky-inner {
  position: relative;
  z-index: 1;
  max-width: 1180px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  gap: 24px;
  align-items: end;
}

.brand { padding-bottom: 120px; }

h1 {
  font-size: clamp(64px, 11vw, 148px);
  line-height: 0.88;
  color: var(--cloud);
  -webkit-text-stroke: 4px var(--ink);
  paint-order: stroke fill;
  text-shadow: 7px 7px 0 var(--ink);
  letter-spacing: -0.01em;
  transform: rotate(-3deg);
  transform-origin: left bottom;
}

.lede {
  max-width: 46ch;
  margin: 28px 0 0;
  padding: 14px 18px;
  background: var(--paper);
  border: var(--line);
  border-radius: 18px;
  box-shadow: var(--pop);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  margin-top: 24px;
}

.checked {
  margin: 0;
  font-family: var(--hand);
  font-size: 21px;
  color: var(--cloud);
  text-shadow: 2px 2px 0 var(--ink);
}

.mascot {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-bottom: 64px;
  z-index: 2;
}

.sign {
  position: relative;
  background: var(--paper);
  border: 4px solid var(--ink);
  border-radius: 8px 22px 10px 18px;
  box-shadow: 8px 8px 0 var(--ink);
  padding: 18px 28px 14px;
  transform: rotate(2.5deg);
  text-align: center;
  margin-bottom: -18px;
  z-index: 2;
  min-width: min(100%, 360px);
}

.sign-price {
  margin: 0;
  font-family: var(--fat);
  font-size: clamp(44px, 6vw, 76px);
  line-height: 1;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}

.sign-how {
  margin: 6px 0 0;
  font-family: var(--hand);
  font-size: 22px;
  line-height: 1.15;
}

.holder { position: relative; }

.holder img {
  display: block;
  width: 300px;
  height: auto;
  image-rendering: pixelated;
  border: 4px solid var(--ink);
  border-radius: 50%;
  box-shadow: 8px 8px 0 var(--ink);
  background: #8b92ac;
}

.bark {
  position: absolute;
  left: -70px;
  top: 40px;
  margin: 0;
  background: var(--cloud);
  border: var(--line);
  border-radius: 24px 24px 4px 24px;
  padding: 6px 18px;
  font-family: var(--fat);
  font-size: 26px;
  transform: rotate(-8deg);
  box-shadow: 4px 4px 0 var(--ink);
  white-space: nowrap;
  z-index: 3;
}

.hill {
  position: relative;
  display: block;
  width: calc(100% + 40px);
  height: 140px;
  margin: -110px -20px 0;
  z-index: 0;
}

.hill-fill { fill: var(--grass); }
.hill-edge { fill: none; stroke: var(--ink); stroke-width: 4; vector-effect: non-scaling-stroke; }

/* price tags on the grass */

.field {
  background: var(--grass);
  padding: 0 20px 56px;
  border-bottom: 0;
}

.tags {
  max-width: 1180px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
  align-items: start;
}

.tag {
  position: relative;
  background: var(--paper);
  border: var(--line);
  border-radius: 16px;
  box-shadow: var(--pop);
  padding: 18px 20px 20px;
  min-height: 200px;
}

.tag::before {
  content: "";
  position: absolute;
  left: 20px;
  top: -3px;
  width: 64px;
  height: 14px;
  border: var(--line);
  border-top: 0;
  border-radius: 0 0 10px 10px;
}

.tag.sol::before { background: var(--pink); }
.tag.rune::before { background: var(--orange); }
.tag.kraken::before { background: var(--violet); }

.tag.sol { transform: rotate(-2deg); }
.tag.rune { transform: rotate(1deg) translateY(10px); }
.tag.kraken { transform: rotate(-1deg) translateY(-4px); }

.tag h2 {
  font-size: 22px;
  margin-top: 10px;
}

.tag-open {
  font: inherit;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
  text-align: left;
}

.tag-open::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 16px;
}

.tag-open:focus-visible { outline: none; box-shadow: none; }
.tag:has(.tag-open:focus-visible) { outline: 3px solid var(--ink); outline-offset: 4px; }

.tag:hover { background: #fff; }
.tag.open { background: #fff; transform: rotate(0deg); }

.tag-cue {
  margin: 12px 0 0;
  font-family: var(--hand);
  font-size: 19px;
  line-height: 1;
}

.tag.open .tag-cue { display: none; }

.buy {
  position: relative;
  z-index: 1;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 3px dotted var(--ink);
}

.buy .btn { display: inline-block; text-decoration: none; }
.buy .btn:hover { background: var(--pink); }

.buy p {
  margin: 12px 0 0;
  font-size: 14px;
  color: var(--ink-soft);
}

.px {
  margin: 12px 0 0;
  font-family: var(--fat);
  font-size: clamp(30px, 3.4vw, 44px);
  line-height: 1;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}

.px-label {
  margin-left: 8px;
  font-family: var(--hand);
  font-size: 18px;
  letter-spacing: 0;
}

.chg {
  display: inline-block;
  margin: 12px 0 0;
  font-weight: 700;
  font-size: 15px;
}

.chg:empty { display: none; }

.chg.up, .chg.down {
  color: #fff;
  border: 2px solid var(--ink);
  border-radius: 999px;
  padding: 1px 10px;
}

.chg.up { background: var(--up); }
.chg.down { background: var(--down); }

.meta {
  margin: 10px 0 0;
  font-size: 15px;
  color: var(--ink-soft);
}

.sticker {
  pointer-events: none;
  position: absolute;
  top: -16px;
  right: -12px;
  background: var(--yellow);
  border: var(--line);
  border-radius: 50%;
  width: 76px;
  height: 76px;
  display: grid;
  place-items: center;
  font-family: var(--fat);
  font-size: 15px;
  transform: rotate(12deg);
  box-shadow: 3px 3px 0 var(--ink);
}

/* spread line */

.lineup-wrap {
  max-width: 1180px;
  margin: 56px auto 0;
  background: var(--paper);
  border: var(--line);
  border-radius: 16px;
  box-shadow: var(--pop);
  padding: 18px 24px 20px;
}

.scribble {
  font-family: var(--hand);
  font-size: 28px;
}

.lineup {
  position: relative;
  height: 96px;
  margin: 0 12px;
}

.bar {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 26px;
  height: 8px;
  background: var(--yellow);
  border: 2px solid var(--ink);
  border-radius: 999px;
}

.peg {
  position: absolute;
  bottom: 20px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: var(--line);
  transform: translateX(-50%);
}

.peg.sol { background: var(--pink); }
.peg.rune { background: var(--orange); }
.peg.kraken { background: var(--violet); }

.peg span {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  white-space: nowrap;
  font-family: var(--fat);
  font-size: 16px;
  margin-bottom: 6px;
}

.ends {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  justify-content: space-between;
  font-size: 14px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

#lineup-read { margin: 10px 0 0; max-width: 70ch; }

/* river */

.river {
  display: block;
  width: 100%;
  height: 90px;
  background: var(--grass);
}

.river-bank { fill: var(--paper); }
.river-water { fill: var(--sky); stroke: var(--ink); stroke-width: 3; vector-effect: non-scaling-stroke; }

/* yard: chart and friends, on grid paper */

.yard {
  background-color: var(--paper);
  background-image:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 28px 28px;
  padding: 24px 20px 72px;
}

.sheet {
  max-width: 1180px;
  margin: 0 auto;
  background: #fff;
  border: var(--line);
  border-radius: 18px;
  box-shadow: 8px 8px 0 var(--ink);
  padding: 24px;
}

.sheet h2 { font-size: clamp(30px, 4vw, 44px); }

.chart-sheet { box-shadow: 10px 10px 0 var(--pink), 10px 10px 0 3px var(--ink); }

.sheet-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 320px);
  gap: 24px;
  align-items: start;
}

#chart-caption { margin: 12px 0 0; max-width: 62ch; }

.note {
  background: var(--yellow);
  border: var(--line);
  border-radius: 4px;
  box-shadow: 4px 4px 0 var(--ink);
  padding: 14px 16px;
  transform: rotate(2deg);
}

.note p {
  margin: 0;
  font-family: var(--hand);
  font-size: 20px;
  line-height: 1.25;
}

.controls {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 20px;
  margin-top: 22px;
}

.group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip {
  font-family: var(--fat);
  font-size: 15px;
  background: var(--paper);
  border: 2px solid var(--ink);
  border-radius: 999px;
  padding: 6px 14px;
  box-shadow: 3px 3px 0 var(--ink);
  cursor: pointer;
}

.chip:hover { background: var(--yellow); }
.chip:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--ink); }

.chip[aria-pressed="true"] {
  background: var(--sky);
  color: #fff;
}

.chip-toggle[aria-pressed="true"] { background: var(--pink); }

.plot {
  position: relative;
  height: 460px;
  margin-top: 18px;
  border: 2px solid var(--ink);
  border-radius: 12px;
  background: var(--paper);
  overflow: hidden;
}

#chart, #chart svg {
  width: 100%;
  height: 100%;
  display: block;
  touch-action: pan-y;
}

.tick { stroke: var(--ink); stroke-width: 2; }
.tick-label { fill: var(--ink-soft); font-size: 12px; font-family: var(--plain); font-weight: 700; }
.line { fill: none; stroke-linecap: round; stroke-linejoin: round; }
.main-line { stroke: var(--ink); stroke-width: 3.6; }
.wick { stroke: var(--pink); stroke-width: 3; }
.wick-label, .join-label, .chart-note { fill: var(--ink); font-family: var(--hand); font-size: 17px; }
.join { stroke: var(--ink); stroke-width: 2; stroke-dasharray: 5 7; opacity: 0.6; }
.old-line { stroke: var(--orange); stroke-width: 3; stroke-dasharray: 1.5 7; }
.kraken-line { stroke: var(--sky-deep); stroke-width: 2.6; stroke-dasharray: 8 6; }

.hover-line { stroke: var(--ink); stroke-width: 2; stroke-dasharray: 3 4; }
.hover-dot { fill: var(--pink); stroke: var(--ink); stroke-width: 3; }

.tip {
  position: absolute;
  z-index: 2;
  min-width: 170px;
  background: var(--cloud);
  border: var(--line);
  border-radius: 12px;
  box-shadow: 4px 4px 0 var(--ink);
  padding: 8px 12px;
  pointer-events: none;
}

.tip p { margin: 0; font-size: 14px; white-space: nowrap; }
.tip-date { font-family: var(--fat); margin-bottom: 4px; }

.fine {
  color: var(--ink-soft);
  font-size: 14px;
  max-width: 80ch;
  margin: 14px 0 0;
}

/* bottom pair */

.bottom {
  max-width: 1180px;
  margin: 48px auto 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr);
  gap: 32px;
  align-items: start;
}

.bottom .sheet { margin: 0; }

.count {
  position: relative;
  background: var(--orange);
  transform: rotate(-1deg);
}

.count-pup {
  position: absolute;
  right: -18px;
  top: -30px;
  width: 120px;
  height: 120px;
  object-fit: cover;
  border: var(--line);
  border-radius: 12px;
  box-shadow: 4px 4px 0 var(--ink);
  transform: rotate(7deg);
}

.count label {
  display: block;
  margin-top: 20px;
  font-family: var(--hand);
  font-size: 22px;
}

.money {
  display: inline-flex;
  align-items: center;
  margin-top: 6px;
  background: #fff;
  border: var(--line);
  border-radius: 14px;
  box-shadow: 4px 4px 0 var(--ink);
  padding: 4px 14px;
  font-family: var(--fat);
  font-size: 30px;
}

.money input {
  width: 160px;
  border: 0;
  background: transparent;
  font-family: var(--fat);
  font-size: 30px;
  padding: 4px 6px;
  font-variant-numeric: tabular-nums;
}

.money input:focus,
.money input:focus-visible { outline: none; box-shadow: none; }

.money input { -moz-appearance: textfield; appearance: textfield; }
.money input::-webkit-inner-spin-button,
.money input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.money:focus-within { outline: 3px solid var(--ink); outline-offset: 3px; }

.calc {
  display: grid;
  gap: 14px;
  margin-top: 22px;
}

.calc-row {
  background: var(--paper);
  border: var(--line);
  border-radius: 14px;
  padding: 12px 16px 14px;
}

.calc-ath {
  background: var(--yellow);
  box-shadow: 4px 4px 0 var(--ink);
  transform: rotate(0.8deg);
}

.calc-say {
  margin: 0;
  font-family: var(--hand);
  font-size: 21px;
  line-height: 1.1;
}

.calc-big {
  margin: 4px 0 0;
  font-family: var(--fat);
  font-size: clamp(28px, 3.4vw, 40px);
  line-height: 1.05;
  letter-spacing: -0.01em;
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}

.calc-ath .calc-big { font-size: clamp(34px, 4.4vw, 52px); }

.calc-small {
  margin: 6px 0 0;
  font-size: 14px;
  color: var(--ink-soft);
}

#btc-line { margin-top: 16px; color: var(--ink); }

.lore { background: var(--paper); }

.lore-list {
  list-style: none;
  margin: 20px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.lore-list li {
  position: relative;
  padding-left: 28px;
}

.lore-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 6px;
  width: 14px;
  height: 14px;
  border: var(--line);
  border-radius: 50%;
  background: var(--grass);
}

.lore-list li:not(:last-child)::after {
  content: "";
  position: absolute;
  left: 8px;
  top: 26px;
  bottom: -14px;
  border-left: 3px dotted var(--ink);
}

.lore time {
  display: inline-block;
  font-family: var(--fat);
  background: var(--yellow);
  border: 2px solid var(--ink);
  border-radius: 6px;
  padding: 0 8px;
}

.lore p { margin: 6px 0 0; }

/* footer */

.grass {
  background: var(--grass);
  border-top: 4px solid var(--ink);
  color: #fff;
  padding: 48px 20px 56px;
}

.grass-inner {
  max-width: 1180px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 36px;
  align-items: center;
}

.couch {
  width: 100%;
  height: auto;
  border: var(--line);
  border-radius: 18px;
  box-shadow: var(--pop);
  transform: rotate(-3deg);
}

.foot-copy { max-width: 74ch; }
.foot-copy p { margin: 0; }
.grass a:hover { color: var(--ink); }

.links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  padding: 0;
  margin: 16px 0;
  list-style: none;
  font-family: var(--fat);
}

.ids {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 12px;
}

.grass .fine { color: rgba(255, 255, 255, 0.85); }

/* small screens */

@media (max-width: 900px) {
  .sky-inner { grid-template-columns: 1fr; }
  .brand { padding-bottom: 0; }
  .mascot { padding-bottom: 60px; }
  .tags, .sheet-head, .bottom { grid-template-columns: 1fr; }
  .tag.sol, .tag.rune, .tag.kraken { transform: none; }
  .plot { height: 320px; }
  .grass-inner { grid-template-columns: 1fr; }
  .couch { max-width: 220px; }
}

@media (max-width: 560px) {
  body { font-size: 17px; }
  .sky { padding-top: 32px; }
  h1 { -webkit-text-stroke-width: 3px; text-shadow: 5px 5px 0 var(--ink); }
  .holder img { width: 190px; }
  .bark { left: -40px; }
  .sheet { padding: 18px; }
  .count-pup { width: 84px; height: 84px; right: -8px; top: -20px; }
  .money input { width: 120px; }
}

@media (prefers-reduced-motion: reduce) {
  .ticker-track, .cloud { animation: none; }
  .btn, .chip { transition: none; }
}
