:root {
  --paper: #e8e5dc;
  --ink: #171715;
  --blue: #1747ff;
  --acid: #d9ff45;
  --red: #f2442e;
  --line: #a6a39a;
  --white: #f8f6ef;
}

* { box-sizing: border-box; }

html, body { height: 100%; }

body {
  margin: 0;
  overflow: hidden;
  background: var(--paper);
  color: var(--ink);
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  overscroll-behavior: none;
}

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

.noise {
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: .16;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 120 120' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.25'/%3E%3C/svg%3E");
  mix-blend-mode: multiply;
  z-index: 20;
}

.desktop { width: min(1180px, calc(100% - 32px)); height: 100vh; height: 100dvh; margin: 0 auto; padding: 24px 0 18px; display: grid; grid-template-rows: auto minmax(0, 1fr) auto; }
.site-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.wordmark { display: flex; align-items: baseline; color: inherit; text-decoration: none; font-family: "Arial Black", Impact, sans-serif; letter-spacing: -.07em; font-size: clamp(21px, 3vw, 34px); }
.wordmark span { font-weight: 600; }
.wordmark b { font-weight: 800; color: var(--blue); }
.wordmark i { display: grid; place-items: center; width: 30px; height: 30px; margin-left: 9px; border: 2px solid; border-radius: 50%; font-size: 17px; font-style: normal; }
.trust-seal { display: flex; align-items: center; gap: 8px; font-size: 9px; line-height: 1.05; font-weight: 500; transform: rotate(2deg); }
.trust-seal span { display: grid; place-items: center; width: 32px; height: 32px; color: var(--acid); background: var(--ink); border-radius: 50%; font-size: 18px; }

.game-shell { min-height: 0; overflow: hidden; display: grid; grid-template-rows: auto auto auto auto minmax(0, 1fr) auto; background: var(--white); border: 2px solid var(--ink); border-radius: 7px; box-shadow: 8px 8px 0 var(--ink); }
.browser-bar { height: 38px; display: grid; grid-template-columns: 70px 1fr 44px; align-items: center; gap: 10px; padding: 0 12px; background: #cac7be; border-bottom: 2px solid var(--ink); }
.lights { display: flex; gap: 6px; }
.lights i { width: 10px; height: 10px; border: 1px solid var(--ink); border-radius: 50%; background: var(--red); }
.lights i:nth-child(2) { background: #ffc928; }
.lights i:nth-child(3) { background: #62ca51; }
.address { max-width: 580px; width: 100%; justify-self: center; padding: 4px 12px; background: var(--white); border: 1px solid #77746d; border-radius: 3px; font-size: 10px; color: #6d6b65; }
.dots { text-align: right; letter-spacing: 3px; }

.hud { display: grid; grid-template-columns: 1fr .7fr 1.25fr 1fr auto; border-bottom: 1px solid var(--ink); }
.hud > div { padding: 12px 16px; border-right: 1px solid var(--ink); }
.hud span, .challenge-clock span { display: block; font-size: 9px; letter-spacing: .12em; color: #5f5d57; }
.hud strong { font-family: "Arial Black", Impact, sans-serif; font-size: 17px; letter-spacing: -.04em; }
.credibility #hearts { color: var(--red); font-size: 19px; letter-spacing: 4px; line-height: 1; }
.text-button { min-width: 92px; border: 0; background: var(--acid); font-size: 10px; font-weight: 500; cursor: pointer; }
.text-button:hover, .text-button:focus-visible { background: var(--ink); color: var(--acid); }

.challenge-head { min-height: 102px; display: flex; align-items: end; justify-content: space-between; gap: 30px; padding: 20px 28px 16px; }
.challenge-head p { margin: 0 0 8px; color: var(--blue); font-size: 10px; font-weight: 500; letter-spacing: .12em; }
.challenge-head h1 { margin: 0; font-family: "Arial Black", Impact, sans-serif; font-size: clamp(20px, 3vw, 36px); line-height: 1.05; letter-spacing: -.035em; }
.challenge-clock { min-width: 112px; text-align: right; }
.challenge-clock b { font: 900 24px "Arial Black", Impact, sans-serif; }
.timer-track { height: 9px; margin: 0 28px; background: #d2cfc6; border: 1px solid var(--ink); }
.timer-track i { display: block; width: 100%; height: 100%; background: var(--blue); transform-origin: left; }
.timer-track i.danger { background: var(--red); }

.stage { min-height: 0; overflow: auto; display: grid; place-items: center; padding: 24px 28px; }
.stage.grid-stage { overflow: hidden; container-type: size; }
.panel { width: min(720px, 100%); }
.micro-note { margin: 0 0 15px; color: #696760; font-size: 11px; text-align: center; }

.tile-grid { width: min(480px, 100%); margin: auto; display: grid; grid-template-columns: repeat(3, 1fr); border-top: 2px solid var(--ink); border-left: 2px solid var(--ink); }
.tile { aspect-ratio: 1.3; border: 0; border-right: 2px solid var(--ink); border-bottom: 2px solid var(--ink); background: #d5d2ca; font-size: clamp(28px, 6vw, 54px); cursor: pointer; transition: transform .08s, background .08s; }
.tile:hover { background: var(--acid); }
.tile.selected { background: var(--blue); color: white; box-shadow: inset 0 0 0 5px var(--acid); transform: scale(.94); }

.choice-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.choice { min-height: 86px; padding: 16px; border: 2px solid var(--ink); background: white; box-shadow: 4px 4px 0 var(--ink); font: 900 clamp(15px, 3vw, 23px) "Arial Black", Impact, sans-serif; cursor: pointer; }
.choice:hover, .choice:focus-visible { background: var(--acid); transform: translate(2px, 2px); box-shadow: 2px 2px 0 var(--ink); }
.choice.selected { background: var(--blue); color: white; box-shadow: none; transform: translate(4px, 4px); }

.slider-wrap { padding: 10px; }
.slider-labels { display: flex; justify-content: space-between; margin-top: 11px; font-size: 11px; }
.target-flag, .range-thumb { left: calc(var(--range-border-width) + var(--range-thumb-width) / 2 + (100% - 2 * var(--range-border-width) - var(--range-thumb-width)) * var(--position-ratio)); }
.target-flag { --position-ratio: var(--target-ratio); position: absolute; top: -43px; translate: -50% 0; padding: 6px 9px; background: var(--red); color: white; font-weight: 500; }
.target-flag::after { content: ""; position: absolute; top: 100%; left: 50%; border: 6px solid transparent; border-top-color: var(--red); translate: -50% 0; }
.range-box { --range-thumb-width: 32px; --range-border-width: 2px; position: relative; }
input[type="range"] { display: block; width: 100%; height: 16px; margin: 0; padding: 0; appearance: none; border: var(--range-border-width) solid var(--ink); background: #d5d2ca; }
input[type="range"]::-webkit-slider-thumb { appearance: none; width: var(--range-thumb-width); height: 46px; opacity: 0; cursor: ew-resize; }
input[type="range"]::-moz-range-thumb { width: var(--range-thumb-width); height: 46px; border: 0; opacity: 0; cursor: ew-resize; }
.range-thumb { --position-ratio: var(--value-ratio); position: absolute; top: 50%; width: var(--range-thumb-width); height: 46px; translate: -50% -50%; border: 2px solid var(--ink); background: var(--acid); box-shadow: 3px 3px 0 var(--ink); pointer-events: none; }
input[type="range"]:focus-visible + .range-thumb { outline: 3px solid var(--blue); outline-offset: 2px; }
.range-readout { display: block; margin-bottom: 54px; text-align: center; font: 900 42px "Arial Black", Impact, sans-serif; letter-spacing: -.05em; }

.code-card { padding: 28px; border: 2px solid var(--ink); background: #cbc8bf; box-shadow: 7px 7px 0 var(--blue); text-align: center; transform: rotate(-1deg); }
.code { margin-bottom: 22px; font: 900 clamp(30px, 7vw, 64px) "Arial Black", Impact, sans-serif; letter-spacing: .12em; text-decoration: line-through 2px var(--red); text-shadow: 3px 3px 0 white; user-select: none; }
.code-input { width: min(380px, 100%); padding: 13px; border: 2px solid var(--ink); border-radius: 0; background: var(--white); text-align: center; text-transform: uppercase; font: 900 20px "Arial Black", Impact, sans-serif; outline: none; }
.code-input:focus { box-shadow: 0 0 0 4px var(--acid); }

.memory-grid { width: min(420px, 100%); max-width: 100cqh; margin: auto; display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.memory-cell { aspect-ratio: 1; border: 2px solid var(--ink); background: #cbc8bf; cursor: pointer; }
.memory-cell.flash { background: var(--blue); box-shadow: inset 0 0 0 7px var(--acid); }
.memory-cell.selected { background: var(--ink); }
.memory-cell:disabled { cursor: wait; }

.chase-zone { position: relative; width: 100%; height: 230px; overflow: hidden; border: 2px dashed var(--ink); background: repeating-linear-gradient(135deg, #ece9e1 0 12px, #dfdcd3 12px 24px); }
.chase { position: absolute; width: 150px; min-height: 48px; display: flex; align-items: center; gap: 9px; padding: 8px 10px; border: 2px solid var(--ink); background: white; box-shadow: 4px 4px 0 var(--ink); font-size: 11px; cursor: pointer; transition: left .1s, top .1s; }
.fake-check { width: 24px; height: 24px; flex: 0 0 auto; border: 2px solid var(--ink); background: var(--acid); }

.rotate-card, .hold-card, .balance-card, .silhouette-card, .arrow-card { display: grid; justify-items: center; gap: 24px; }
.rotate-object { font: 900 100px/1 "Arial Black", Impact, sans-serif; color: var(--blue); filter: drop-shadow(5px 5px 0 var(--acid)); }
.rotate-range { width: min(520px, 100%); }
.rotate-readout { margin-top: 8px; font: 900 22px "Arial Black", Impact, sans-serif; }

.order-grid { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }
.order-item, .binary-actions button, .symbol-options button, .arrow-pad button, .stop-button { min-width: 82px; min-height: 66px; border: 2px solid var(--ink); background: white; box-shadow: 4px 4px 0 var(--ink); font: 900 22px "Arial Black", Impact, sans-serif; cursor: pointer; }
.order-item.done { background: var(--acid); box-shadow: none; transform: translate(4px, 4px); }
.order-item.wrong { background: var(--red); color: white; }

.truth-card, .consent-card { padding: 28px; border: 2px solid var(--ink); background: #dedbd3; box-shadow: 7px 7px 0 var(--ink); text-align: center; }
.truth-card blockquote, .consent-card p { margin: 0 0 24px; font: 900 clamp(20px, 4vw, 34px)/1.2 "Arial Black", Impact, sans-serif; }
.binary-actions { display: flex; justify-content: center; gap: 14px; }
.binary-actions button { min-width: min(190px, 45%); font-size: 14px; }
.binary-actions button.selected, .symbol-options button.selected { background: var(--blue); color: white; box-shadow: none; transform: translate(4px, 4px); }

.silhouette-source { font-size: 100px; line-height: 1; color: var(--ink); transform: skew(18deg) scaleX(.72) rotate(-9deg); filter: blur(3px); text-shadow: 8px 5px 0 #aaa; }
.symbol-options, .arrow-pad { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }
.symbol-options button { font-size: 38px; }

.hold-button { width: min(420px, 100%); min-height: 110px; border: 3px solid var(--ink); background: var(--acid); box-shadow: 8px 8px 0 var(--ink); font: 900 clamp(20px, 4vw, 34px) "Arial Black", Impact, sans-serif; touch-action: none; user-select: none; }
.hold-button.holding { background: var(--red); color: white; transform: translate(6px, 6px); box-shadow: 2px 2px 0 var(--ink); }
.hold-card output { font: 900 30px "Arial Black", Impact, sans-serif; }

.balance-track { position: relative; width: min(620px, 100%); height: 70px; border: 3px solid var(--ink); background: #cbc8bf; overflow: hidden; }
.balance-track i { position: absolute; inset: 0 auto 0 var(--target-start); width: 18%; background: repeating-linear-gradient(135deg, var(--acid) 0 8px, #b8d936 8px 16px); border-inline: 2px solid var(--ink); }
.balance-track b { position: absolute; top: 5px; bottom: 5px; left: var(--marker); width: 10px; translate: -50% 0; background: var(--blue); border: 2px solid var(--ink); }
.stop-button { min-width: 180px; background: var(--red); color: white; font-size: 18px; }

.arrow-sequence { padding: 16px 22px; border: 2px solid var(--ink); background: white; font: 900 clamp(26px, 6vw, 52px) "Arial Black", Impact, sans-serif; letter-spacing: .18em; }
.arrow-progress { min-height: 25px; color: var(--blue); font-weight: 900; letter-spacing: .2em; }
.arrow-pad button { font-size: 30px; }

.consent-card > span { display: block; margin-bottom: 15px; color: var(--red); font-size: 10px; letter-spacing: .15em; }

.maze-card { display: grid; justify-items: center; }
.maze-grid { width: min(330px, 80vw); display: grid; grid-template-columns: repeat(5, 1fr); border: 3px solid var(--ink); touch-action: none; outline: none; }
.maze-grid span { aspect-ratio: 1; display: grid; place-items: center; border: 1px solid #b2afa7; user-select: none; }
.maze-grid .wall { background: var(--ink); }
.maze-grid .route { background: #dedbd3; }
.maze-grid .active { background: var(--acid); }
.maze-grid .start, .maze-grid .exit { font-weight: 900; }
.maze-grid.failed { box-shadow: 0 0 0 7px var(--red); }

.status-row { min-height: 63px; display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 10px 28px; border-top: 1px solid var(--ink); background: #dedbd3; }
.status-row p { margin: 0; color: #615f59; font-size: 11px; }
.verify-button, .start-button { border: 2px solid var(--ink); background: var(--blue); color: white; box-shadow: 4px 4px 0 var(--ink); font-weight: 500; cursor: pointer; }
.verify-button { min-width: 146px; padding: 11px 16px; }
.verify-button span, .start-button span { float: right; }
.verify-button:hover, .verify-button:focus-visible, .start-button:hover, .start-button:focus-visible { background: var(--acid); color: var(--ink); transform: translate(2px, 2px); box-shadow: 2px 2px 0 var(--ink); }
.verify-button:disabled { opacity: .35; cursor: not-allowed; transform: none; }

.page-footer { display: flex; justify-content: space-between; margin-top: 20px; font-size: 8px; letter-spacing: .08em; }

.overlay { position: fixed; inset: 0; z-index: 10; display: grid; place-items: center; padding: 22px; background: rgba(232, 229, 220, .76); backdrop-filter: blur(8px); transition: opacity .2s; }
.overlay:not(.visible) { opacity: 0; pointer-events: none; }
.modal { position: relative; width: min(630px, 100%); padding: clamp(28px, 5vw, 50px); border: 2px solid var(--ink); background: var(--white); box-shadow: 12px 12px 0 var(--ink); }
.modal-x { position: absolute; top: 10px; right: 12px; border: 0; background: none; font: 26px Arial; }
.stamp { position: absolute; top: 42px; right: 42px; display: grid; place-items: center; width: 92px; height: 92px; border: 4px double var(--red); border-radius: 50%; color: var(--red); font-weight: 500; text-align: center; transform: rotate(11deg); }
.kicker { margin: 0 0 12px; color: var(--blue); font-size: 10px; font-weight: 500; letter-spacing: .14em; }
.modal h2 { margin: 0; font: 900 clamp(40px, 8vw, 76px)/.83 "Arial Black", Impact, sans-serif; letter-spacing: -.07em; }
.modal h2 em { color: var(--blue); font-style: normal; }
.modal-copy { max-width: 49ch; margin: 24px 0; font-size: 12px; line-height: 1.65; }
.rules { display: grid; gap: 7px; padding: 15px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); font-size: 9px; }
.rules b { display: inline-block; width: 30px; color: var(--blue); }
.start-button { width: 100%; margin-top: 22px; padding: 15px 18px; text-align: left; }
.best-line { margin: 14px 0 0; font-size: 9px; text-align: center; }

.toast { position: fixed; z-index: 30; left: 50%; top: 18%; padding: 12px 18px; border: 2px solid var(--ink); background: var(--acid); box-shadow: 5px 5px 0 var(--ink); font: 900 14px "Arial Black", Impact, sans-serif; transform: translate(-50%, -30px) rotate(-2deg); opacity: 0; pointer-events: none; transition: .16s; }
.toast.show { opacity: 1; transform: translate(-50%, 0) rotate(-2deg); }
.toast.bad { background: var(--red); color: white; }
.fever .game-shell { animation: fever .42s steps(2) infinite; }
@keyframes fever { 50% { box-shadow: 8px 8px 0 var(--blue), -6px -6px 0 var(--acid); } }
.shake { animation: shake .22s linear; }
@keyframes shake { 25% { transform: translateX(-7px); } 75% { transform: translateX(7px); } }

@media (max-width: 700px) {
  .desktop { width: min(100% - 18px, 1180px); padding-top: 10px; }
  .site-header { margin-bottom: 10px; }
  .hud { grid-template-columns: repeat(4, 1fr); }
  .hud > div { padding: 9px 7px; }
  .hud span { font-size: 7px; }
  .hud strong { font-size: 12px; }
  .text-button { grid-column: 1 / -1; min-height: 29px; border-top: 1px solid var(--ink); }
  .challenge-head { min-height: 89px; padding: 13px 14px 11px; gap: 8px; }
  .challenge-head p { font-size: 8px; }
  .challenge-clock { min-width: 70px; }
  .challenge-clock span { font-size: 7px; }
  .challenge-clock b { font-size: 18px; }
  .timer-track { margin: 0 14px; }
  .stage { padding: 16px 14px; }
  .status-row { padding: 9px 14px; }
  .status-row p { display: none; }
  .verify-button { width: 100%; }
  .page-footer span:nth-child(2) { display: none; }
  .modal { padding: 28px 23px; box-shadow: 7px 7px 0 var(--ink); }
  .stamp { top: 22px; right: 23px; width: 66px; height: 66px; font-size: 10px; }
  .modal-copy { max-width: 35ch; }
  .truth-card, .consent-card { padding: 18px 12px; }
  .binary-actions button { min-height: 56px; }
}

@media (max-height: 720px) and (min-width: 701px) {
  .desktop { padding-top: 10px; }
  .site-header, .page-footer { display: none; }
}

@media (max-height: 600px) {
  .desktop { padding: 6px 0; }
  .site-header, .page-footer, .browser-bar { display: none; }
  .challenge-head { min-height: 60px; padding-top: 8px; padding-bottom: 8px; }
  .stage { padding-top: 8px; padding-bottom: 8px; }
  .status-row { min-height: 48px; padding-top: 6px; padding-bottom: 6px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
