:root {
  --paper: #f3f0e8;
  --card: #fffdf8;
  --ink: #171713;
  --muted: #6b6961;
  --line: #cbc7bc;
  --yellow: #ffd84d;
  --green: #20a464;
  --green-dark: #117745;
  --coral: #ff5b4a;
  --blue: #3155d9;
  --plot-top: 35;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at 1px 1px, rgb(23 23 19 / 7%) 1px, transparent 1.2px) 0 0 / 22px 22px,
    var(--paper);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}

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

button {
  color: inherit;
  font: inherit;
}

button:focus-visible,
a:focus-visible,
[tabindex]:focus-visible {
  outline: 3px solid var(--blue);
  outline-offset: 3px;
}

.site-header {
  width: min(1440px, calc(100% - 48px));
  min-height: 92px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 2px solid var(--ink);
}

.header-brand {
  display: flex;
  align-items: center;
  gap: 18px;
  min-width: 0;
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: inherit;
  font-size: 18px;
  font-weight: 850;
  letter-spacing: -0.04em;
  text-decoration: none;
  text-transform: uppercase;
}

.wordmark svg {
  width: 34px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 3.5;
}

.header-credit {
  padding-left: 18px;
  border-left: 1px solid var(--line);
  color: var(--muted);
  font-size: 10px;
  font-weight: 750;
  letter-spacing: 0.07em;
  line-height: 1.3;
  text-decoration: none;
  text-transform: uppercase;
  transition: color 150ms ease;
}

.header-credit:hover {
  color: var(--ink);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 24px;
}

.local-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border: 1.5px solid var(--ink);
  border-radius: 999px;
  background: var(--card);
  font-size: 12px;
  font-weight: 750;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.local-pill i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 3px rgb(32 164 100 / 18%);
}

.text-button {
  padding: 8px 0;
  border: 0;
  border-bottom: 1.5px solid var(--ink);
  background: transparent;
  cursor: pointer;
  font-size: 14px;
  font-weight: 700;
}

main {
  overflow: hidden;
}

.hero {
  position: relative;
  z-index: 2;
  width: min(1280px, calc(100% - 48px));
  min-height: 650px;
  margin: 0 auto;
  padding: 96px 0 120px;
}

.kicker,
.challenge-meta,
.round-label {
  margin: 0;
  color: var(--green-dark);
  font-size: 12px;
  font-weight: 850;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.kicker span {
  color: var(--coral);
}

.hero h1 {
  max-width: 900px;
  margin: 22px 0 0;
  font-size: clamp(64px, 9.25vw, 134px);
  font-weight: 900;
  letter-spacing: -0.085em;
  line-height: 0.86;
  text-transform: uppercase;
}

.hero-copy {
  width: min(390px, 100%);
  margin: 56px 4% 0 auto;
  font-size: 18px;
}

.hero-copy p {
  margin: 0 0 24px;
}

.hero-copy a,
.manifesto a {
  display: inline-flex;
  align-items: center;
  gap: 18px;
  color: inherit;
  font-size: 14px;
  font-weight: 800;
  text-decoration-thickness: 2px;
  text-underline-offset: 5px;
}

.hero-copy a {
  min-width: 250px;
  min-height: 58px;
  justify-content: space-between;
  padding: 0 18px;
  border: 2px solid var(--ink);
  background: var(--yellow);
  box-shadow: 5px 5px 0 var(--ink);
  font-size: 15px;
  letter-spacing: 0.035em;
  text-decoration: none;
  text-transform: uppercase;
  transition: box-shadow 140ms ease, transform 140ms ease;
}

.hero-copy a span {
  font-size: 20px;
}

.hero-copy a:hover {
  box-shadow: 7px 7px 0 var(--ink);
  transform: translate(-2px, -2px);
}

.hero-copy a:focus-visible {
  outline: 4px solid var(--blue);
  outline-offset: 4px;
}

.hero-duel {
  position: absolute;
  z-index: 3;
  bottom: -100px;
  left: 0;
  width: min(700px, 57%);
  pointer-events: none;
}

.hero-duel img {
  width: 100%;
  height: auto;
  display: block;
  filter: drop-shadow(6px 8px 0 rgb(23 23 19 / 10%));
}

.hero-duel-vs {
  position: absolute;
  top: 28%;
  left: 50%;
  width: 118px;
  height: 96px;
  display: grid;
  place-items: center;
  background: var(--ink);
  clip-path: polygon(50% 0, 61% 18%, 79% 5%, 81% 27%, 100% 25%, 87% 45%, 100% 59%, 78% 64%, 83% 87%, 61% 78%, 50% 100%, 39% 79%, 18% 91%, 22% 66%, 0 61%, 15% 45%, 0 27%, 21% 27%, 20% 5%, 40% 18%);
  color: var(--card);
  font-size: 43px;
  font-style: italic;
  font-weight: 950;
  letter-spacing: -0.08em;
  line-height: 1;
  transform: translate(-50%, -50%) rotate(-7deg);
}

.hero-duel-mobile-card {
  display: none;
}

@media (max-width: 900px) {
  .hero-duel {
    display: none;
  }
}

.game-wrap {
  position: relative;
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  padding: 40px 0 112px;
  scroll-margin-top: 24px;
}

.game-wrap::before {
  position: absolute;
  z-index: -1;
  inset: 4px -50vw 0;
  background: var(--yellow);
  border-block: 2px solid var(--ink);
  content: "";
}

.game-topline {
  min-height: 74px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.round-pips {
  display: flex;
  gap: 6px;
  margin-top: 8px;
}

.round-pips i {
  width: 32px;
  height: 5px;
  background: rgb(23 23 19 / 22%);
}

.round-label {
  font-size: 13px;
}

.round-pips i.active,
.round-pips i.done {
  background: var(--ink);
}

.match-score {
  display: flex;
  align-items: baseline;
  gap: 13px;
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
}

.match-score strong {
  margin-inline: 5px;
  font-size: 26px;
}

.match-score i {
  color: rgb(23 23 19 / 45%);
  font-style: normal;
}

.game-card {
  position: relative;
  min-height: 760px;
  padding: clamp(24px, 4vw, 54px);
  border: 2px solid var(--ink);
  background: var(--card);
  box-shadow: 10px 10px 0 var(--ink);
}

.challenge-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 18px;
}

.challenge-heading h2,
.about-dialog h2 {
  margin: 5px 0 0;
  font-size: clamp(24px, 3.5vw, 42px);
  letter-spacing: -0.045em;
  line-height: 1.05;
}

.no-peeking {
  flex: 0 0 auto;
  margin-top: 8px;
  padding: 9px 13px;
  border: 2px solid var(--ink);
  background: var(--coral);
  color: #fff;
  font-family: "Comic Sans MS", "Bradley Hand", cursive;
  font-size: 15px;
  font-weight: 800;
  transform: rotate(3deg);
}

.no-peeking.is-cheating {
  background: var(--yellow);
  color: var(--ink);
  transform: rotate(-2deg);
}

.peek-status {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 11px;
}

.peek-status .no-peeking {
  margin-top: 0;
}

.peek-status .coach-feedback {
  max-width: 220px;
}

.challenge-aside {
  display: flex;
  align-items: flex-end;
  flex: 0 0 auto;
  flex-direction: column;
  gap: 14px;
}

.coach-toggle {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  cursor: pointer;
  user-select: none;
}

.coach-toggle:has(input:disabled) {
  cursor: not-allowed;
  opacity: 0.5;
}

.coach-toggle input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.coach-switch {
  position: relative;
  width: 40px;
  height: 23px;
  flex: 0 0 auto;
  border: 2px solid var(--ink);
  border-radius: 999px;
  background: var(--card);
  transition: background 140ms ease;
}

.coach-switch i {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: var(--ink);
  transition: transform 140ms ease;
}

.coach-toggle input:checked + .coach-switch {
  background: var(--yellow);
}

.coach-toggle input:checked + .coach-switch i {
  transform: translateX(17px);
}

.coach-toggle input:focus-visible + .coach-switch {
  outline: 3px solid var(--blue);
  outline-offset: 3px;
}

.coach-toggle-copy {
  display: grid;
  line-height: 1.05;
}

.coach-toggle-copy strong {
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.coach-toggle-copy small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.chart-frame {
  position: relative;
  border-top: 1.5px solid var(--ink);
}

.model-loader {
  position: absolute;
  z-index: 7;
  top: 50%;
  left: 50%;
  width: min(520px, calc(100% - 36px));
  padding: 22px 24px 20px;
  border: 3px solid var(--ink);
  background: var(--card);
  box-shadow: 8px 8px 0 var(--ink);
  pointer-events: none;
  transform: translate(-50%, -50%) rotate(-0.5deg);
}

.model-loader-heading {
  display: flex;
  align-items: center;
  gap: 11px;
}

.model-loader-heading p {
  margin: 0;
  color: var(--green-dark);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.model-loader-mark {
  height: 22px;
  display: inline-flex;
  align-items: flex-end;
  gap: 3px;
}

.model-loader-mark i {
  width: 5px;
  border: 1.5px solid var(--ink);
  background: var(--yellow);
  animation: model-bars 700ms ease-in-out infinite alternate;
}

.model-loader-mark i:nth-child(1) {
  height: 9px;
}

.model-loader-mark i:nth-child(2) {
  height: 17px;
  animation-delay: -400ms;
}

.model-loader-mark i:nth-child(3) {
  height: 13px;
  animation-delay: -200ms;
}

.model-loader h3 {
  margin: 12px 0 7px;
  font-size: clamp(22px, 3vw, 32px);
  letter-spacing: -0.045em;
  line-height: 1;
}

.model-loader > p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.model-progress-track {
  --model-progress: 0%;
  height: 15px;
  margin-top: 18px;
  overflow: hidden;
  border: 2px solid var(--ink);
  background: var(--paper);
}

.model-progress-track > i {
  width: var(--model-progress);
  height: 100%;
  display: block;
  background: var(--green);
  transition: width 140ms linear;
}

.model-progress-track.is-indeterminate > i {
  width: 32%;
  animation: model-indeterminate 1s ease-in-out infinite alternate;
}

.model-progress-meta {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-top: 7px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.model-progress-meta span {
  color: var(--muted);
  text-align: right;
}

.model-loader.is-fallback .model-loader-mark i {
  background: var(--coral);
  animation: none;
}

.model-loader.is-fallback .model-progress-track,
.model-loader.is-fallback .model-progress-meta {
  display: none;
}

.model-notice {
  margin-top: 16px;
  padding: 12px 15px;
  border: 2px solid var(--ink);
  border-left: 10px solid var(--coral);
  background: #fff5db;
  font-size: 12px;
}

.model-notice strong {
  margin-right: 5px;
  text-transform: uppercase;
}

@keyframes model-bars {
  to {
    height: 20px;
  }
}

@keyframes model-indeterminate {
  from {
    transform: translateX(-20%);
  }

  to {
    transform: translateX(230%);
  }
}

.chart-next-button {
  position: absolute;
  z-index: 6;
  right: 16px;
  bottom: 46px;
  min-width: 176px;
  padding: 13px 16px 14px;
  border: 3px solid var(--ink);
  background: var(--yellow);
  box-shadow: 6px 6px 0 var(--ink);
  color: var(--ink);
  cursor: pointer;
  text-align: left;
  transform: rotate(-1deg);
  animation: chart-next-in 300ms cubic-bezier(0.16, 0.8, 0.3, 1) 700ms backwards;
}

.chart-next-button span,
.chart-next-button strong {
  display: block;
}

.chart-next-button span {
  margin-bottom: 5px;
  font-size: 9px;
  font-weight: 850;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.chart-next-button strong {
  font-size: 18px;
  letter-spacing: -0.02em;
  text-transform: uppercase;
}

.chart-next-button i {
  margin-left: 8px;
  font-style: normal;
}

.chart-next-button:hover {
  box-shadow: 8px 8px 0 var(--ink);
  transform: translate(-2px, -2px) rotate(-1deg);
}

.chart-next-button:focus-visible {
  outline: 4px solid var(--blue);
  outline-offset: 4px;
}

@keyframes chart-next-in {
  from {
    opacity: 0;
    transform: translate(18px, 8px) rotate(2deg);
  }
}

.forecast-chart {
  width: 100%;
  height: auto;
  display: block;
  overflow: visible;
  user-select: none;
}

.grid line {
  stroke: var(--line);
  stroke-dasharray: 3 7;
  stroke-width: 1;
}

.axis-labels text {
  fill: var(--muted);
  font-family: inherit;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.09em;
}

.axis-labels .future-label {
  fill: var(--coral);
}

.future-zone {
  fill: #fff9e5;
}

.future-hatch {
  fill: url(#hatch);
  opacity: 0.42;
}

.backtrack-zone {
  fill: rgb(23 23 19 / 12%);
  opacity: 0;
  pointer-events: none;
  transition: opacity 100ms ease;
}

#hatch line {
  stroke: #dbd3ba;
  stroke-width: 2;
}

.series-path {
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.history-path {
  stroke: var(--ink);
  stroke-width: 4;
}

.user-path {
  stroke: var(--coral);
  stroke-width: 6;
}

.backtrack-path {
  fill: none;
  opacity: 0;
  stroke: #7f7b70;
  stroke-dasharray: 7 8;
  stroke-linecap: round;
  stroke-width: 5;
  pointer-events: none;
}

.backtrack-hint {
  display: none;
  pointer-events: none;
}

.backtrack-hint rect {
  fill: #66645e;
}

.backtrack-hint text {
  fill: #fff;
  font-family: inherit;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.06em;
}

.model-path {
  opacity: 0;
  stroke: var(--green);
  stroke-dasharray: 10 8;
  stroke-width: 5;
  transition: opacity 300ms ease;
}

.actual-path {
  opacity: 0;
  stroke: var(--ink);
  stroke-width: 5;
  transition: opacity 300ms ease 120ms;
}

.actual-path.drawing-reveal {
  transition: opacity 180ms ease, stroke-dashoffset 820ms cubic-bezier(0.22, 1, 0.36, 1);
}

.interval-band {
  opacity: 0;
  fill: rgb(32 164 100 / 14%);
  transition: opacity 300ms ease;
}

.forecast-chart.revealed .model-path,
.forecast-chart.revealed .actual-path,
.forecast-chart.revealed .interval-band {
  opacity: 1;
}

.forecast-chart.revealed .future-hatch,
.forecast-chart.revealed .draw-prompt {
  opacity: 0;
}

.cutoff-line {
  stroke: var(--ink);
  stroke-dasharray: 5 6;
  stroke-width: 2;
}

.now-tag rect {
  fill: var(--ink);
}

.now-tag text {
  fill: #fff;
  font-family: inherit;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.draw-prompt {
  fill: #9b7836;
  font-family: inherit;
  font-size: 17px;
  font-weight: 850;
  letter-spacing: 0.08em;
  pointer-events: none;
  transition: opacity 180ms ease;
}

.anchor-dot {
  fill: var(--card);
  stroke: var(--ink);
  stroke-width: 4;
  pointer-events: none;
}

.cursor-dot {
  display: none;
  fill: var(--coral);
  stroke: var(--card);
  stroke-width: 3;
  pointer-events: none;
}

.draw-surface {
  fill: transparent;
  cursor:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24'%3E%3Cpath d='m4 20 1-5L16.8 3.2a2 2 0 0 1 2.8 0l1.2 1.2a2 2 0 0 1 0 2.8L9 19l-5 1Z' fill='%23ffd84d' stroke='%23171713' stroke-width='1.8'/%3E%3Cpath d='m14.5 5.5 4 4M5 15l4 4' fill='none' stroke='%23171713' stroke-width='1.8'/%3E%3C/svg%3E") 3 21,
    crosshair;
  touch-action: none;
}

.forecast-chart.drawing .draw-prompt {
  opacity: 0;
}

.forecast-chart.drawing .cursor-dot {
  display: block;
}

.forecast-chart.backtracking .backtrack-zone,
.forecast-chart.backtracking .backtrack-path {
  opacity: 1;
}

.forecast-chart.backtracking .backtrack-hint {
  display: block;
}

.forecast-chart.backtracking .cursor-dot {
  fill: #7f7b70;
}

.game-controls {
  min-height: 94px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  padding-top: 24px;
}

.draw-guidance {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: 24px;
}

.draw-status {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.coach-feedback {
  display: flex;
  align-items: center;
  flex: 0 0 auto;
  gap: 9px;
  color: var(--ink);
  font-size: 12px;
  font-weight: 800;
}

.coach-face {
  width: 45px;
  height: 45px;
  overflow: visible;
  filter: drop-shadow(2px 2px 0 var(--ink));
}

.coach-head {
  fill: var(--card);
  stroke: var(--ink);
  stroke-width: 2.2;
  transition: fill 160ms ease;
}

.coach-eye {
  fill: #fffdf8;
  stroke: var(--ink);
  stroke-width: 1.5;
}

.coach-pupil {
  fill: var(--ink);
  transform-box: fill-box;
  transform-origin: center;
  transition: transform 140ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.coach-face[data-direction="up"] .coach-pupil {
  transform: translateY(-2px);
}

.coach-face[data-direction="down"] .coach-pupil {
  transform: translateY(2px);
}

.coach-mouth {
  fill: none;
  stroke: var(--ink);
  stroke-linecap: round;
  stroke-width: 2.5;
  transition: d 160ms ease;
}

.coach-face[data-mood="hot"] .coach-head {
  fill: var(--coral);
}

.coach-face[data-mood="warm"] .coach-head {
  fill: var(--yellow);
}

.coach-face[data-mood="unsure"] .coach-head {
  fill: #f3d8a4;
}

.coach-face[data-mood="cold"] .coach-head {
  fill: #a9c9ff;
}

.mouse-icon {
  position: relative;
  width: 20px;
  height: 27px;
  flex: 0 0 auto;
  border: 2px solid currentColor;
  border-radius: 11px;
}

.mouse-icon::before {
  position: absolute;
  top: 4px;
  left: 8px;
  width: 2px;
  height: 6px;
  border-radius: 2px;
  background: currentColor;
  content: "";
}

.control-buttons,
.final-actions {
  display: flex;
  gap: 12px;
}

.product-nudge {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 14px 16px;
  border: 1.5px solid var(--ink);
  background: #fff9e5;
  text-align: left;
}

.product-nudge p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.product-nudge p strong {
  display: block;
  margin-bottom: 3px;
  color: var(--ink);
  font-size: 11px;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.product-nudge nav {
  display: flex;
  flex: 0 0 auto;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 9px 17px;
}

.product-nudge a {
  color: var(--ink);
  font-size: 12px;
  font-weight: 850;
  text-decoration-thickness: 1.5px;
  text-underline-offset: 4px;
  white-space: nowrap;
}

.play-nudge {
  margin-top: 4px;
  border-color: color-mix(in srgb, var(--ink), transparent 58%);
  background: transparent;
}

.final-nudge {
  width: min(680px, 100%);
  margin: 34px auto 0;
  padding: 20px 22px;
  border: 2px solid var(--ink);
  background: var(--yellow);
  box-shadow: 5px 5px 0 var(--ink);
}

.final-nudge p {
  color: var(--ink);
  font-size: 14px;
}

.final-nudge p strong {
  font-size: 13px;
}

.primary-button,
.secondary-button {
  min-height: 48px;
  padding: 12px 20px;
  border: 2px solid var(--ink);
  cursor: pointer;
  font-size: 13px;
  font-weight: 850;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  transition: transform 120ms ease, box-shadow 120ms ease, opacity 120ms ease;
}

.primary-button {
  background: var(--ink);
  color: #fff;
}

.secondary-button {
  background: var(--card);
}

.primary-button:not(:disabled):hover,
.secondary-button:not(:disabled):hover {
  box-shadow: 4px 4px 0 var(--coral);
  transform: translate(-2px, -2px);
}

.primary-button:disabled,
.secondary-button:disabled {
  cursor: not-allowed;
  opacity: 0.35;
}

#submitButton {
  --draw-progress: 0%;
  position: relative;
  isolation: isolate;
  overflow: hidden;
}

#submitButton::before {
  position: absolute;
  z-index: -1;
  inset: 0 auto 0 0;
  width: var(--draw-progress);
  background: var(--yellow);
  content: "";
  transition: width 90ms linear, opacity 120ms ease;
}

#submitButton .button-label {
  position: relative;
  z-index: 1;
}

#submitButton .button-label i {
  margin-left: 7px;
  font-style: normal;
}

#submitButton:disabled {
  background: color-mix(in srgb, var(--card), var(--ink) 7%);
  color: var(--ink);
  opacity: 1;
}

#submitButton:not(:disabled)::before,
#submitButton.is-thinking::before {
  opacity: 0;
}

#submitButton.is-thinking:disabled {
  background: var(--ink);
  color: #fff;
}

.round-result {
  margin-top: 26px;
  padding-top: 28px;
  border-top: 2px solid var(--ink);
}

.result-heading h3 {
  margin: 0;
  font-size: clamp(24px, 4vw, 42px);
  letter-spacing: -0.04em;
}

.score-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 22px;
}

.score-card {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: end;
  padding: 16px 18px;
  border: 1.5px solid var(--ink);
}

.score-card span {
  align-self: center;
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
}

.score-card strong {
  grid-row: span 2;
  font-size: 46px;
  letter-spacing: -0.06em;
  line-height: 0.9;
}

.score-card small {
  color: var(--muted);
  font-size: 11px;
}

.human-score {
  box-shadow: inset 5px 0 0 var(--coral);
}

.model-score {
  box-shadow: inset 5px 0 0 var(--green);
}

.result-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-top: 20px;
}

.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.legend-item::before {
  width: 20px;
  height: 3px;
  display: inline-block;
  margin: 0 7px 3px 0;
  background: currentColor;
  content: "";
}

.legend-item.human {
  color: var(--coral);
}

.legend-item.model {
  color: var(--green);
}

.final-result {
  min-height: 640px;
  padding: clamp(56px, 9vw, 110px) max(0px, calc((100% - 780px) / 2));
  text-align: center;
}

.final-result h2 {
  margin: 16px 0;
  font-size: clamp(48px, 8vw, 94px);
  letter-spacing: -0.07em;
  line-height: 0.9;
  text-transform: uppercase;
}

.final-result > p:not(.challenge-meta) {
  max-width: 560px;
  margin: 24px auto 0;
  color: var(--muted);
  font-size: 18px;
}

.final-scoreline {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(24px, 6vw, 72px);
  margin: 44px 0 30px;
}

.final-scoreline div {
  display: grid;
}

.final-scoreline span {
  font-size: 12px;
  font-weight: 850;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.final-scoreline strong {
  font-size: clamp(54px, 8vw, 88px);
  letter-spacing: -0.08em;
  line-height: 1;
}

.final-scoreline div:first-child strong {
  color: var(--coral);
}

.final-scoreline div:last-child strong {
  color: var(--green-dark);
}

.final-scoreline i {
  color: var(--muted);
  font-family: Georgia, serif;
}

.share-badge-preview {
  width: min(560px, 100%);
  margin: 0 auto 30px;
  padding: 8px;
  border: 2px solid var(--ink);
  background: var(--paper-light);
  box-shadow: 7px 7px 0 var(--ink);
  transform: rotate(-0.5deg);
}

.share-badge-preview img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid color-mix(in srgb, var(--ink), transparent 70%);
}

.share-badge-preview figcaption {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 9px 4px 2px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.share-badge-preview figcaption button {
  padding: 2px 0;
  border: 0;
  border-bottom: 1.5px solid currentColor;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  font-size: inherit;
  font-weight: 900;
  letter-spacing: inherit;
  text-transform: inherit;
}

.final-actions {
  justify-content: center;
}

#shareButton {
  min-width: 184px;
}

.confetti-layer {
  position: absolute;
  z-index: 8;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.confetti-piece {
  position: absolute;
  top: 12%;
  left: var(--x);
  width: 9px;
  height: 17px;
  border: 1px solid var(--ink);
  background: var(--color);
  opacity: 0;
  transform: translateY(-40px) rotate(0);
  animation: confetti-fall var(--duration) cubic-bezier(0.16, 0.7, 0.3, 1) var(--delay) forwards;
}

@keyframes confetti-fall {
  8% { opacity: 1; }
  100% {
    opacity: 0;
    transform: translate(var(--drift), 580px) rotate(var(--spin));
  }
}

.prototype-note {
  display: grid;
  grid-template-columns: 140px minmax(0, 620px);
  gap: 24px;
  margin: 34px 12px 0;
  font-size: 13px;
}

.prototype-note span {
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.prototype-note p {
  margin: 0;
}

.manifesto {
  width: min(920px, calc(100% - 48px));
  margin: 0 auto;
  padding: 150px 0;
}

.manifesto > p:not(.kicker) {
  max-width: 680px;
  margin: 24px 0;
  color: var(--muted);
  font-size: 22px;
  line-height: 1.45;
}

.tech-proof {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin: 56px 0 46px;
  border: 2px solid var(--ink);
  background: var(--card);
  box-shadow: 8px 8px 0 var(--ink);
}

.tech-proof div {
  min-width: 0;
  padding: 24px;
}

.tech-proof div + div {
  border-left: 2px solid var(--ink);
}

.tech-proof strong,
.tech-proof span {
  display: block;
}

.tech-proof strong {
  margin-bottom: 8px;
  color: var(--green-dark);
  font-size: clamp(30px, 4vw, 50px);
  letter-spacing: -0.06em;
  line-height: 0.95;
}

.tech-proof span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  line-height: 1.35;
  text-transform: uppercase;
}

.manifesto > a {
  margin-left: 0;
}

.site-footer {
  width: min(1440px, calc(100% - 48px));
  min-height: 100px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 2px solid var(--ink);
  font-size: 12px;
  font-weight: 750;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.company-link {
  color: inherit;
  text-decoration: none;
}

.company-link span {
  display: inline-block;
  margin-left: 5px;
  transition: transform 140ms ease;
}

.company-link:hover {
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 5px;
}

.company-link:hover span {
  transform: translate(2px, -2px);
}

.company-link:focus-visible {
  outline: 3px solid var(--blue);
  outline-offset: 5px;
}

.about-dialog {
  width: min(620px, calc(100% - 32px));
  padding: clamp(30px, 6vw, 56px);
  border: 2px solid var(--ink);
  background: var(--card);
  box-shadow: 10px 10px 0 var(--ink);
  color: var(--ink);
}

.about-dialog::backdrop {
  background: rgb(23 23 19 / 55%);
  backdrop-filter: blur(3px);
}

.dialog-close {
  position: absolute;
  top: 12px;
  right: 16px;
  width: 44px;
  height: 44px;
  border: 0;
  background: transparent;
  cursor: pointer;
  font-size: 32px;
}

.about-dialog ol {
  margin: 32px 0;
  padding-left: 22px;
}

.about-dialog li {
  margin: 18px 0;
  padding-left: 8px;
}

.dialog-footnote {
  margin: 0;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
}

.toast {
  position: fixed;
  z-index: 20;
  right: 20px;
  bottom: 20px;
  max-width: min(360px, calc(100% - 40px));
  padding: 13px 18px;
  border: 2px solid var(--ink);
  background: var(--ink);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px);
  transition: opacity 180ms ease, transform 180ms ease;
}

.toast.visible {
  opacity: 1;
  transform: translateY(0);
}

[hidden] {
  display: none !important;
}

@media (max-width: 720px) {
  .site-header,
  .hero,
  .site-footer {
    width: calc(100% - 28px);
  }

  .site-header {
    position: relative;
    min-height: 72px;
  }

  .local-pill {
    display: none;
  }

  .wordmark {
    gap: 8px;
    font-size: 14px;
    letter-spacing: -0.035em;
  }

  .wordmark svg {
    width: 27px;
  }

  .header-brand {
    display: block;
  }

  .header-credit {
    position: absolute;
    bottom: 15px;
    left: 35px;
    margin-left: 0;
    padding-left: 0;
    border-left: 0;
    font-size: 8px;
    letter-spacing: 0.055em;
    white-space: nowrap;
  }

  .header-actions {
    gap: 14px;
  }

  .hero {
    min-height: 520px;
    padding: 72px 0 80px;
  }

  .hero h1 {
    font-size: clamp(54px, 15vw, 70px);
    line-height: 0.9;
  }

  .hero-copy {
    margin: 44px 0 0;
  }

  .hero-copy a {
    width: 100%;
    min-width: 0;
  }

  .hero-duel-mobile-card {
    position: absolute;
    z-index: 3;
    bottom: -36px;
    left: 50%;
    width: 212px;
    height: 110px;
    display: block;
    overflow: hidden;
    border: 2px solid var(--ink);
    background: var(--yellow);
    box-shadow: 5px 5px 0 var(--ink);
    pointer-events: none;
    transform: translateX(-50%) rotate(-1.5deg);
  }

  .hero-duel-mobile-card img {
    position: absolute;
    right: -4px;
    bottom: -4px;
    width: 435px;
    max-width: none;
    height: auto;
  }

  .game-wrap {
    width: calc(100% - 20px);
    padding-top: 24px;
  }

  .game-topline {
    gap: 10px;
    min-height: 64px;
  }

  .game-topline > div:first-child {
    min-width: 0;
  }

  .round-label {
    display: block;
    font-size: 10.5px;
    letter-spacing: 0.09em;
    white-space: nowrap;
  }

  .match-score {
    flex: 0 0 auto;
    gap: 5px;
    font-size: 9px;
  }

  .match-score strong {
    margin-inline: 2px;
    font-size: 22px;
  }

  .game-card {
    min-height: 600px;
    padding: 20px 14px 24px;
    box-shadow: 6px 6px 0 var(--ink);
  }

  .challenge-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
    margin-inline: 4px;
  }

  .no-peeking {
    display: none;
  }

  .challenge-aside {
    align-items: flex-start;
  }

  .peek-status {
    justify-content: flex-start;
  }

  .chart-frame {
    margin-inline: -6px;
  }

  .model-loader {
    width: calc(100% - 20px);
    padding: 18px 16px 16px;
    box-shadow: 5px 5px 0 var(--ink);
    transform: translate(-50%, -50%);
  }

  .model-loader h3 {
    font-size: 22px;
  }

  .model-loader > p {
    font-size: 12px;
  }

  .model-notice {
    margin-inline: -2px;
  }

  .chart-next-button {
    position: relative;
    right: auto;
    bottom: auto;
    width: 100%;
    min-width: 0;
    margin-top: -1px;
    box-shadow: 4px 4px 0 var(--ink);
    text-align: center;
    transform: none;
  }

  .chart-next-button:hover {
    box-shadow: 4px 4px 0 var(--ink);
    transform: none;
  }

  .forecast-chart {
    min-height: 290px;
  }

  .axis-labels text {
    font-size: 26px;
    font-weight: 800;
    letter-spacing: 0.055em;
  }

  .axis-labels .range-label {
    font-size: 22px;
  }

  .now-tag rect {
    x: -44px;
    y: -21px;
    width: 88px;
    height: 42px;
    rx: 21px;
  }

  .now-tag text {
    font-size: 22px;
    letter-spacing: 0.055em;
    transform: translateY(3px);
  }

  .draw-prompt {
    font-size: 24px;
    letter-spacing: 0.055em;
  }

  .game-controls,
  .result-footer {
    align-items: stretch;
    flex-direction: column;
  }

  .draw-guidance {
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
  }

  .control-buttons {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
  }

  .product-nudge {
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
  }

  .product-nudge nav {
    justify-content: flex-start;
  }

  .play-nudge {
    margin-top: 12px;
  }

  .final-nudge {
    margin-top: 30px;
    padding: 18px;
  }

  .primary-button,
  .secondary-button {
    min-height: 52px;
  }

  .result-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
  }

  .score-card {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .score-card strong {
    grid-row: auto;
  }

  .result-footer .primary-button {
    width: 100%;
  }

  .prototype-note {
    grid-template-columns: 1fr;
    gap: 8px;
    margin-inline: 4px;
  }

  .manifesto {
    width: calc(100% - 32px);
    padding: 110px 0;
  }

  .manifesto > p:not(.kicker),
  .manifesto > a {
    margin-left: 0;
  }

  .tech-proof {
    grid-template-columns: 1fr;
    margin: 48px 0 38px;
  }

  .tech-proof div + div {
    border-top: 2px solid var(--ink);
    border-left: 0;
  }

  .site-footer {
    align-items: flex-start;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
  }

  .final-actions {
    display: grid;
  }
}

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

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