/* we all gonna mcdonalds it. made to look like somebody did it in paint in ten minutes. */
@font-face { font-family: "Comic Neue"; src: url("/fonts/comic neue 400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Comic Neue"; src: url("/fonts/comic neue 700.woff2") format("woff2"); font-weight: 700; font-display: swap; }

:root {
  --red: #da291c;
  --deep: #b01c14;
  --yellow: #ffc72c;
  --ink: #111;
  --paper: #fffdf2;
  --wobble: 255px 18px 225px 18px / 18px 225px 18px 255px;
  --wobble2: 18px 225px 18px 255px / 255px 18px 225px 18px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--red) url("/img/tile.png");
  color: var(--ink);
  font-family: "Comic Sans MS", "Comic Neue", "Chalkboard SE", cursive, sans-serif;
  font-weight: 700;
  font-size: 18px;
  line-height: 1.35;
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--deep); }
code { font-family: "Courier New", monospace; font-weight: 700; }
.hide { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
[hidden] { display: none !important; }

/* the strip on top */
.ticker { background: var(--yellow); border-bottom: 5px solid var(--ink); overflow: hidden; white-space: nowrap; }
.ticker-run { display: inline-block; padding: 6px 0; animation: run 26s linear infinite; }
.ticker-run span { margin: 0 14px; }
@keyframes run { from { transform: translateX(0); } to { transform: translateX(-50%); } }

.page { max-width: 1000px; margin: 0 auto; padding: 22px 14px 40px; }
.card {
  background: var(--paper);
  border: 5px solid var(--ink);
  border-radius: var(--wobble);
  box-shadow: 9px 9px 0 var(--ink);
  padding: 26px 26px 30px;
  margin: 0 0 34px;
}
.card:nth-of-type(even) { border-radius: var(--wobble2); }

h1, h2 {
  margin: 0;
  color: var(--yellow);
  -webkit-text-stroke: 9px var(--ink);
  paint-order: stroke fill;
  text-shadow: 5px 5px 0 var(--red);
  line-height: 1.02;
  letter-spacing: 0.5px;
}
h1 { font-size: clamp(40px, 6.2vw, 66px); }
h2 { font-size: clamp(34px, 6vw, 58px); margin-bottom: 14px; -webkit-text-stroke-width: 7px; }
h3 { font-size: 24px; margin: 26px 0 8px; text-decoration: underline wavy var(--red) 3px; text-underline-offset: 5px; }

/* buttons */
.btn {
  display: inline-block;
  font: inherit;
  color: var(--ink);
  background: var(--yellow);
  border: 4px solid var(--ink);
  border-radius: var(--wobble2);
  box-shadow: 4px 4px 0 var(--ink);
  padding: 9px 18px;
  text-decoration: none;
  cursor: pointer;
  user-select: none;
}
.btn:hover { background: #ffd95e; }
.btn:active { transform: translate(3px, 3px); box-shadow: 1px 1px 0 var(--ink); }
.btn.small { padding: 5px 12px; font-size: 16px; border-width: 3px; }
.btn.wide { display: block; width: 100%; text-align: center; }
.btn.go { background: var(--red); color: #fff; font-size: 26px; }
.btn.go:hover { background: #ee3a2c; }
.btn.off, .btn:disabled { background: #ddd; color: #666; cursor: default; box-shadow: 2px 2px 0 var(--ink); }
.btn:focus-visible, input:focus-visible, canvas:focus-visible { outline: 4px dashed var(--red); outline-offset: 3px; }

/* the top box */
.hero { display: grid; grid-template-columns: 1.25fr 1fr; gap: 26px; align-items: center; }
.tick { font-size: clamp(34px, 6vw, 60px); margin: 10px 0 0; color: #fff; -webkit-text-stroke: 7px var(--ink); paint-order: stroke fill; text-shadow: 4px 4px 0 var(--red); line-height: 1; }
.say { font-size: 22px; margin: 16px 0 14px; }
.ca-box { background: #fff; border: 4px dashed var(--ink); padding: 10px 12px; display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; }
.ca-label { font-size: 15px; width: 100%; }
#ca { font-size: 16px; word-break: break-all; flex: 1 1 200px; }
.links { display: flex; flex-wrap: wrap; gap: 12px; margin: 18px 0 0; }

/* photos look like prints from the drugstore */
.snap { margin: 0; background: #fff; padding: 10px 10px 8px; border: 2px solid #cfcab8; box-shadow: 6px 7px 0 rgba(0, 0, 0, 0.55); }
.snap figcaption { font-size: 17px; text-align: center; padding: 8px 2px 2px; }
.tilt-l { transform: rotate(-1.6deg); }
.tilt-r { transform: rotate(1.8deg); }
.hero-pic { justify-self: center; max-width: 400px; }

/* the hat tool */
.tool { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 24px; align-items: start; }
.stage-wrap { border: 5px solid var(--ink); background: #fff; line-height: 0; box-shadow: 6px 6px 0 var(--ink); }
#stage { width: 100%; height: auto; display: block; touch-action: none; cursor: grab; }
#stage.grab { cursor: grabbing; }
.step { margin: 16px 0 8px; font-size: 19px; }
.step:first-child { margin-top: 0; }
.step b { background: var(--red); color: #fff; padding: 0 9px; border: 3px solid var(--ink); border-radius: 50%; margin-right: 4px; }
.picker { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.picker button { background: #fff; border: 3px solid var(--ink); padding: 5px; cursor: pointer; aspect-ratio: 1; display: flex; align-items: center; justify-content: center; border-radius: 10px; }
.picker button:hover { background: #fff1bd; }
.picker button img { max-height: 100%; width: auto; image-rendering: pixelated; pointer-events: none; }
.slide { display: grid; grid-template-columns: 124px 1fr; align-items: center; gap: 10px; margin: 8px 0; font-size: 16px; }
input[type=range] { width: 100%; accent-color: var(--red); height: 26px; }
.row { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0; }
.check { display: flex; align-items: center; gap: 10px; margin: 12px 0 0; cursor: pointer; }
.check input { width: 26px; height: 26px; accent-color: var(--red); }
.fine { font-size: 14px; font-weight: 400; margin: 8px 0 0; }
.result { margin-top: 22px; }
.result img { width: min(100%, 420px); border: 5px solid var(--ink); }

/* the tracker */
.live { display: inline-flex; align-items: center; gap: 8px; font-size: 20px; color: #fff; background: var(--red); -webkit-text-stroke: 0; text-shadow: none; border: 3px solid var(--ink); padding: 2px 12px 3px; vertical-align: middle; letter-spacing: 1px; }
.live i { width: 13px; height: 13px; border-radius: 50%; background: #fff; animation: blink 1s steps(2, start) infinite; }
@keyframes blink { to { visibility: hidden; } }
.state { font-size: 26px; margin: 4px 0 14px; }
.state:empty { display: none; }
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.cell { background: var(--yellow); border: 4px solid var(--ink); border-radius: 12px; padding: 10px 12px 12px; min-width: 0; }
.cell.big { grid-column: 1 / -1; background: var(--red); color: #fff; text-align: center; }
.cell .k { font-size: 15px; }
.cell .v { font-size: 30px; line-height: 1.1; margin-top: 2px; overflow-wrap: anywhere; }
.cell.big .v { font-size: clamp(40px, 9vw, 76px); color: var(--yellow); -webkit-text-stroke: 6px var(--ink); paint-order: stroke fill; }
.cell .s { font-size: 14px; font-weight: 400; margin-top: 3px; }
.tablewrap { overflow-x: auto; border: 4px solid var(--ink); background: #fff; }
.feed { border-collapse: collapse; width: 100%; font-size: 16px; }
.feed th, .feed td { padding: 7px 10px; text-align: left; border-bottom: 2px solid #ddd; white-space: nowrap; }
.feed th { background: var(--yellow); border-bottom: 3px solid var(--ink); }
.wallet { display: flex; gap: 10px; flex-wrap: wrap; }
.wallet input { flex: 1 1 260px; font: 700 15px "Courier New", monospace; padding: 9px 10px; border: 4px solid var(--ink); min-width: 0; }
.wallet-out { min-height: 1.4em; margin: 10px 0 0; }
.bad { color: var(--deep); }
.how { margin: 6px 0 0; padding-left: 26px; }
.how li { margin: 6px 0; }

/* the photo wall */
.lore { font-size: 22px; margin: 0 0 20px; }
.wall { display: grid; grid-template-columns: 1fr 1fr; gap: 26px 22px; }
.wall .wide { grid-column: 1 / -1; justify-self: center; max-width: 760px; }

.foot { text-align: center; color: #fff; text-shadow: 2px 2px 0 var(--ink); font-size: 18px; }
.foot p { margin: 6px 0; }
#hits { font-family: "Courier New", monospace; background: var(--ink); color: var(--yellow); padding: 1px 7px; text-shadow: none; }

@media (max-width: 760px) {
  body { font-size: 17px; }
  .page { padding: 16px 10px 30px; }
  .card { padding: 18px 16px 22px; box-shadow: 6px 6px 0 var(--ink); margin-bottom: 26px; }
  .hero { grid-template-columns: 1fr; }
  .hero-pic { order: -1; max-width: 300px; }
  h1, h2 { -webkit-text-stroke-width: 6px; text-shadow: 3px 3px 0 var(--red); }
  .tool { grid-template-columns: 1fr; }
  .stage-wrap { max-width: min(100%, 62vh); margin: 0 auto; }
  .grid { grid-template-columns: 1fr 1fr; }
  .wall { grid-template-columns: 1fr; }
  .slide { grid-template-columns: 108px 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  .ticker-run, .live i { animation: none; }
  html { scroll-behavior: auto; }
}
