@font-face {
  font-family: "Alfa Slab One";
  src: url("/assets/alfa-slab-one.woff2") format("woff2");
  font-display: swap;
}
:root {
  --bg: #fff4e2;
  --ink: #221b2e;
  --muted: #6b6273;
  --paper: #ffffff;
  --hit: #ffd23f;
  --hit-ink: #221b2e;
  --display: "Alfa Slab One", Georgia, serif;
  --sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  color-scheme: light;
}
* {
  box-sizing: border-box;
}
[hidden] {
  display: none !important;
}
html,
body {
  margin: 0;
  overflow-x: hidden;
}
body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.5 var(--sans);
  -webkit-text-size-adjust: 100%;
}
a {
  color: inherit;
}
button {
  font: inherit;
  color: inherit;
}
:focus-visible {
  outline: 3px solid var(--ink);
  outline-offset: 3px;
}

/* Header */
.top {
  padding: 36px 20px 8px;
  text-align: center;
}
h1 {
  display: inline-flex;
  align-items: center;
  gap: 0.18em;
  margin: 0;
  font: 400 clamp(34px, 7vw, 64px) / 1 var(--display);
  letter-spacing: 0.01em;
}
h1 .at {
  color: #ef3e36;
}
.goat {
  width: 1.15em;
  height: 1.15em;
  flex: none;
  overflow: visible;
  transform-origin: 50% 90%;
}
.goat path,
.goat circle,
.goat rect {
  stroke: var(--ink);
  stroke-width: 2.6;
  stroke-linejoin: round;
  stroke-linecap: round;
}
.goat .horn {
  fill: none;
  stroke-width: 5;
}
.goat .face,
.goat .ear,
.goat .eye {
  fill: var(--paper);
}
.goat .ear {
  fill: #ffd23f;
}
.goat .snout {
  fill: #ff9fb8;
}
.goat .beard,
.goat .pupil,
.goat .nostril {
  fill: var(--ink);
  stroke-width: 0;
}
.goat .beard {
  stroke-width: 2.6;
}
/* Now and then the goat blinks or glances aside; funhouse.js picks when and where. */
.goat .eyes {
  transform-box: fill-box;
  transform-origin: center;
}
.goat .eyes.blink {
  animation: blink 0.16s ease-in-out;
}
@keyframes blink {
  50% {
    transform: scaleY(0.1);
  }
}
.goat .pupils {
  transition: transform 0.18s ease-out;
}
/* The goat bleats when the wheel lands. */
.goat.bleat {
  animation: bleat 0.6s ease-in-out;
}
@keyframes bleat {
  25% {
    transform: rotate(-10deg);
  }
  60% {
    transform: rotate(8deg);
  }
}

/* Stage: the wheel on the front, the startup on the back. */
.stage {
  flex: 1;
  display: grid;
  justify-items: center;
  align-content: start;
  padding: 20px 16px 40px;
  perspective: 1400px;
}
.face {
  width: 100%;
  transform-origin: 50% 50%;
}

/* Wheel */
.front {
  display: grid;
  justify-items: center;
  gap: 18px;
  max-width: 520px;
}
.wheel-box {
  position: relative;
  width: min(100%, 520px);
  aspect-ratio: 1;
}
.wheel {
  display: block;
  width: 100%;
  height: 100%;
}
.rim {
  fill: none;
  stroke: var(--ink);
  stroke-width: 7;
}
#wheel-spin path {
  stroke: var(--paper);
  stroke-width: 1.5;
  stroke-linejoin: round;
}
.pointer {
  position: absolute;
  z-index: 2;
  top: -4%;
  left: 50%;
  width: 9%;
  translate: -50% 0;
  fill: var(--ink);
  stroke: var(--paper);
  stroke-width: 3;
  stroke-linejoin: round;
  transform-origin: 50% 10%;
}
.pointer.tick {
  animation: tick 0.12s ease-out;
}
@keyframes tick {
  50% {
    transform: rotate(-14deg);
  }
}
.hub {
  position: absolute;
  inset: 50% auto auto 50%;
  width: 27%;
  aspect-ratio: 1;
  translate: -50% -50%;
  border: 5px solid var(--ink);
  border-radius: 50%;
  background: var(--paper);
  font: 400 clamp(18px, 5vw, 30px) / 1 var(--display);
  cursor: pointer;
  transition: scale 0.15s;
}
.hub:hover:not(:disabled) {
  scale: 1.05;
}
.hub:disabled {
  cursor: default;
}
.ticker {
  min-height: 2.2em;
  max-width: 100%;
  margin: 0;
  padding: 6px 18px;
  border: 2px solid var(--ink);
  border-radius: 999px;
  background: var(--hit);
  color: var(--hit-ink);
  font: 400 clamp(17px, 4.4vw, 22px) / 1.3 var(--display);
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
/* The bot check: invisible unless Cloudflare wants a click. */
.check:empty {
  display: none;
}

/* Card */
.card {
  max-width: 980px;
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  overflow: hidden;
  border: 3px solid var(--ink);
  border-radius: 20px;
  background: var(--paper);
  box-shadow: 8px 8px 0 var(--ink);
}
.shot {
  display: flex;
  flex-direction: column;
  border-right: 3px solid var(--ink);
  background: var(--hit);
}
.shot-bar {
  padding: 10px 14px;
  border-bottom: 3px solid var(--ink);
}
.shot-bar span {
  display: block;
  padding: 4px 12px;
  border: 2px solid var(--ink);
  border-radius: 999px;
  background: var(--paper);
  color: var(--ink);
  font: 13px var(--mono);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.shot-view {
  position: relative;
  flex: 1;
  min-height: 0;
  aspect-ratio: 16 / 10;
  background: var(--paper);
}
.shot-view img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: left top;
}
.shot-note {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  gap: 4px;
  margin: 0;
  padding: 20px;
  text-align: center;
  color: var(--muted);
}
.shot-note b {
  font: 400 20px var(--display);
  color: var(--ink);
}
.card-body {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 22px 24px 24px;
}
.card h2 {
  margin: 0;
  font: 400 clamp(26px, 5vw, 34px) / 1.1 var(--display);
  overflow-wrap: anywhere;
}
.domain {
  margin: -6px 0 0;
  font: 14px var(--mono);
  color: var(--muted);
  overflow-wrap: anywhere;
}
.pitch {
  margin: 0;
  overflow-wrap: anywhere;
}
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.chips li {
  padding: 2px 10px;
  border: 2px solid var(--ink);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
}
.chips li.ai {
  background: var(--ink);
  color: var(--paper);
}
.meter {
  margin-top: auto;
  padding-top: 6px;
}
.meter-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-weight: 700;
  font-size: 14px;
}
.meter-head b {
  font: 400 28px var(--display);
}
.meter-bar {
  position: relative;
  height: 14px;
  margin: 6px 0 4px;
  border: 2px solid var(--ink);
  border-radius: 999px;
  background: linear-gradient(90deg, #2bb673 0 25%, #a8d84e 25% 50%, #ffb703 50% 75%, #ef3e36 75%);
}
.meter-bar i {
  position: absolute;
  top: -8px;
  bottom: -8px;
  left: 0;
  width: 6px;
  translate: -50% 0;
  border: 2px solid var(--paper);
  border-radius: 3px;
  background: var(--ink);
  transition: left 0.9s cubic-bezier(0.2, 1.4, 0.4, 1);
}
.verdict {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}
.actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.btn {
  display: block;
  padding: 12px 10px;
  border: 3px solid var(--ink);
  border-radius: 12px;
  background: var(--paper);
  font: 400 17px / 1.2 var(--display);
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 3px 3px 0 var(--ink);
}
.btn:active {
  translate: 2px 2px;
  box-shadow: 1px 1px 0 var(--ink);
}
.btn.primary {
  background: var(--ink);
  color: var(--paper);
}

.react {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 12px;
}
.react-row {
  display: inline-flex;
  overflow: hidden;
  border: 2px solid var(--ink);
  border-radius: 999px;
}
.react-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border: 0;
  border-left: 2px solid var(--ink);
  background: var(--paper);
  font: 700 13px/1 var(--mono);
  cursor: pointer;
}
.react-btn:first-child {
  border-left: 0;
}
.react-btn span[aria-hidden] {
  font-size: 18px;
  line-height: 1.2;
}
.react-btn:hover:not(:disabled) {
  background: #fff4e2;
}
.react-btn[aria-pressed="true"] {
  background: #ffd23f;
}
.react-btn.pop span[aria-hidden] {
  animation: pop 0.35s ease-out;
}
@keyframes pop {
  40% {
    transform: scale(1.5) rotate(-12deg);
  }
}
.react-btn:disabled {
  cursor: default;
}
.react-btn:disabled span {
  opacity: 0.4;
  filter: grayscale(1);
}
.react-hint {
  color: var(--muted);
  font-size: 14px;
}

@media (max-width: 760px) {
  .top {
    padding: 28px 16px 4px;
  }
  .stage {
    padding-top: 14px;
  }
  .card {
    grid-template-columns: minmax(0, 1fr);
    border-radius: 16px;
    box-shadow: 5px 5px 0 var(--ink);
  }
  .shot {
    border-right: 0;
    border-bottom: 3px solid var(--ink);
  }
  .card-body {
    padding: 18px;
  }
}
@media (max-width: 400px) {
  .actions {
    grid-template-columns: 1fr;
  }
}
@media (prefers-reduced-motion: reduce) {
  .pointer.tick {
    animation: none;
  }
  .meter-bar i {
    transition: none;
  }
  .react-btn.pop span[aria-hidden],
  .goat.bleat,
  .goat .eyes.blink {
    animation: none;
  }
}
