/* The survey: a red event field (the question, on a white board) beside a navy panel. Base in ../style.css. */
.stage { display: grid; }
.field { position: relative; overflow: hidden; background: var(--red); color: #fff; padding: 0 var(--pad) 22px; display: flex; flex-direction: column; }
.field > * { position: relative; }
.giant { position: absolute; top: 62px; right: calc(-1 * clamp(28px, 5vw, 80px)); width: clamp(120px, 22vw, 300px); aspect-ratio: 1; color: #fff; }
.giant svg { width: 100%; height: 100%; display: block; }
@media (max-width: 899px) { .giant { top: 36px; right: -22vw; width: 64vw; color: rgba(255, 255, 255, 0.16); } }
.field h1 { font-size: clamp(36px, 9vw, 68px); margin: 22px 0 20px; max-width: min(8em, calc(100% - clamp(80px, 16vw, 220px))); }

.quiz { max-width: 640px; }
.count { display: flex; justify-content: space-between; gap: 12px; color: rgba(255, 255, 255, 0.9); }
.bar { height: 6px; margin-top: 8px; background: rgba(255, 255, 255, 0.25); }
.bar i { display: block; height: 100%; width: 0; background: #fff; transition: width 0.3s var(--ease); }
.ask { margin-top: 18px; font-size: clamp(26px, 4.4vw, 40px); font-weight: 800; letter-spacing: -0.03em; line-height: 1; text-wrap: balance; }
.ask u { text-decoration-thickness: 4px; text-underline-offset: 4px; }
.rule { margin-top: 8px; font-size: 17px; line-height: 1.35; color: rgba(255, 255, 255, 0.9); }

/* The board: white, navy ink. Every question's controls sit on it, so the six pad colors read the same on any field. */
.board { margin-top: 14px; background: #fff; color: var(--ink); padding: 14px; min-height: 150px; display: grid; gap: 12px; align-content: start; touch-action: manipulation; }
.board .ev { color: var(--ink-soft); }
.board button { font: 800 13px var(--font); letter-spacing: 0.08em; text-transform: uppercase; border: 2px solid var(--ink); border-radius: 0; background: #fff; color: var(--ink); padding: 12px 14px; cursor: pointer; }
.board button:active:not(:disabled) { transform: scale(0.97); }
.board button:disabled { opacity: 0.35; cursor: default; }
@media (hover: hover) { .board button:hover:not(:disabled):not(.pad):not(.cell) { background: var(--orange); } }
.board button.primary { background: var(--ink); color: #fff; }
@media (hover: hover) { .board button.primary:hover:not(:disabled) { background: var(--orange); color: var(--ink); } }
.row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.row.spread { justify-content: space-between; }
.note { font-size: 15px; line-height: 1.3; color: var(--ink-soft); }

/* Pads: flat color tiles, two or three across. A pattern is white shapes over the color. */
.pads { display: grid; gap: 8px; grid-template-columns: repeat(var(--n, 2), 1fr); align-items: center; }
.board button.pad { border: 0; padding: 10px 8px; min-height: 108px; display: grid; place-content: center; gap: 4px; text-align: center; color: var(--ink); background-color: var(--c); background-size: 44px 44px; text-transform: none; letter-spacing: -0.01em; font-size: 20px; line-height: 1.05; }
.pad small { display: block; font-size: 13px; font-weight: 700; letter-spacing: 0; }
.board button.pad.c-red, .board button.pad.c-kelly, .board button.pad.c-navy { color: #fff; }
.pad.c-navy .cupart { background-color: #fff; --paint: var(--navy); }
.pad.on { outline: 4px solid var(--ink); outline-offset: -4px; }
.pad:disabled { opacity: 1 !important; }
.pad.dim { opacity: 0.35 !important; }
.c-red { --c: var(--red); } .c-sky { --c: var(--sky); } .c-kelly { --c: var(--green); } .c-yellow { --c: var(--yellow); } .c-orange { --c: var(--orange); } .c-pink { --c: var(--pink); } .c-navy { --c: var(--navy); }
.spaces { display: grid; grid-template-columns: repeat(10, 6px); gap: 3px; justify-content: center; margin-top: 4px; }
.spaces i { width: 6px; height: 6px; background: currentColor; }

/* A number: the value big, a slider, and nudges either side. */
.value { font-size: clamp(44px, 9vw, 64px); font-weight: 800; letter-spacing: -0.04em; line-height: 1; font-variant-numeric: tabular-nums; text-align: center; }
.slider { width: 100%; margin: 0; accent-color: var(--ink); height: 34px; }
.nudges { display: grid; grid-template-columns: repeat(var(--n, 4), 1fr); gap: 6px; }
.board .nudges button { padding: 10px 0; }
.ticks { display: flex; justify-content: space-between; font-size: 12px; font-weight: 800; color: var(--ink-soft); font-variant-numeric: tabular-nums; }

/* Grids: memory tiles, the maze, the boat and bomb grids, the keypad, dice, lanes, letters. */
.grid { display: grid; grid-template-columns: repeat(var(--n), 1fr); gap: 4px; max-width: min(340px, 70vw); width: 100%; margin: 0 auto; }
.board button.cell { aspect-ratio: 1; padding: 0; border: 2px solid var(--ink); font-size: 18px; letter-spacing: 0; display: grid; place-content: center; }
.cell.safe { background: var(--green); color: #fff; } .cell.unsafe { background: var(--red); color: #fff; }
.cell.shut { background: var(--ink); } .cell.on { background: var(--orange); } .cell.boat { background: var(--sky); } .cell.hit { background: var(--red); color: #fff; }
.keys { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.dots { position: relative; aspect-ratio: 1.25; background: var(--ink); }
.dots i { position: absolute; width: 8px; height: 8px; margin: -4px; border-radius: 50%; background: var(--yellow); }
.drain { height: 6px; background: var(--ground); } .drain i { display: block; height: 100%; background: var(--ink); width: 100%; }
.dice { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.die { width: 52px; height: 52px; border: 2px solid var(--ink); display: grid; grid-template: repeat(3, 1fr) / repeat(3, 1fr); padding: 6px; background: #fff; }
.board button.die { padding: 6px; }
.die i { width: 8px; height: 8px; background: var(--ink); place-self: center; visibility: hidden; }
.die i.p { visibility: visible; }
.die.on { background: var(--orange); }
.die.rolled { outline: 4px solid var(--orange); outline-offset: -2px; }
/* The boat on the grid, from above: hull (pointed bow), then a white cabin. It lies over three squares and lets taps through. */
.grid { position: relative; }
.ship { position: relative; pointer-events: none; z-index: 1; }
.ship b { position: absolute; inset: 10% 3%; background: var(--ink); clip-path: polygon(0 28%, 9% 0, 66% 0, 100% 50%, 66% 100%, 9% 100%, 0 72%); }
.ship i { position: absolute; left: 14%; top: 30%; width: 24%; height: 40%; background: #fff; }
.ship i::after { content: ""; position: absolute; left: 135%; top: 22%; width: 42%; height: 56%; background: #fff; }
.ship.down b { inset: 3% 10%; clip-path: polygon(28% 0, 0 9%, 0 66%, 50% 100%, 100% 66%, 100% 9%, 72% 0); }
.ship.down i { left: 30%; top: 14%; width: 40%; height: 24%; }
.ship.down i::after { left: 22%; top: 135%; width: 56%; height: 42%; }
.die.q { place-content: center; display: grid; font-weight: 800; font-size: 22px; color: var(--ink-soft); grid-template: none; }
.letters { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.board .letters button { padding: 0; aspect-ratio: 1; font-size: 22px; letter-spacing: 0; }
.typed { min-height: 46px; font-size: 38px; font-weight: 800; letter-spacing: 0.04em; line-height: 1.2; text-align: center; border-bottom: 2px solid var(--ink); }

/* The maze: 7 by 7, walls as thick navy edges, you as an orange square, your trail dashed. */
.maze { display: grid; grid-template-columns: repeat(7, 1fr); max-width: min(340px, 66vw); width: 100%; margin: 0 auto; border: 3px solid var(--ink); touch-action: none; }
.maze i { aspect-ratio: 1; border: 1px solid var(--ground); box-sizing: border-box; }
.maze i.r { border-right: 3px solid var(--ink); } .maze i.b { border-bottom: 3px solid var(--ink); }
.maze i.mid { background: var(--ground); } .maze i.trail { background: var(--yellow); } .maze i.me { background: var(--orange); }
.arrows { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }

/* Timing: a clock and one big button. */
.clock { font-size: clamp(54px, 12vw, 84px); font-weight: 800; letter-spacing: -0.04em; line-height: 1; font-variant-numeric: tabular-nums; text-align: center; }
.board button.big { padding: 26px 14px; font-size: 20px; background: var(--red); border-color: var(--red); color: #fff; }
.board button.big:disabled { background: var(--ground); border-color: var(--ground); color: var(--ink-soft); opacity: 1; }

/* Cups: three in a row for the shell game (they slide), four to choose from for the poison. */
.cups { position: relative; height: 120px; }
.cup { position: absolute; top: 14px; width: 26%; height: 92px; transition: left var(--t, 0.22s) ease-in-out, top 0.3s var(--ease); }
.cup b { position: absolute; inset: 0; background: var(--c, var(--ink)); clip-path: polygon(18% 0, 82% 0, 100% 100%, 0 100%); }
.cup u { position: absolute; left: 50%; bottom: 4px; width: 22px; height: 22px; margin-left: -11px; border-radius: 50%; background: var(--orange); }
.cup.up b { transform: translateY(-34px); }
.cup b { transition: transform 0.3s var(--ease); }
.board button.slot { position: absolute; top: 0; width: 26%; height: 120px; background: transparent; border: 0; }
.cupart { width: 64px; height: 64px; margin: 0 auto; background-color: var(--ink); --paint: #fff; }
/* Each cup's paint (striped, spotted, zigzag, checked, banded), in white on the navy cup. */
.cupart.paint-stripes { background-image: repeating-linear-gradient(90deg, transparent 0 7px, var(--paint) 7px 11px); }
.cupart.paint-band { background-image: linear-gradient(transparent 40%, var(--paint) 40% 58%, transparent 58%); }
.cupart.paint-dots { background-image: radial-gradient(var(--paint) 2.6px, transparent 3.2px); background-size: 12px 12px; }
.cupart.paint-checks { background-image: conic-gradient(var(--paint) 25%, transparent 0 50%, var(--paint) 0 75%, transparent 0); background-size: 16px 16px; }
.cupart.paint-zigzag { background-image: linear-gradient(135deg, transparent 75%, var(--paint) 75%), linear-gradient(225deg, transparent 75%, var(--paint) 75%); background-size: 12px 16px; }
.cupart.mug { clip-path: polygon(10% 10%, 70% 10%, 70% 25%, 95% 25%, 95% 65%, 70% 65%, 70% 90%, 10% 90%); }
.cupart.tumbler { clip-path: polygon(15% 5%, 85% 5%, 72% 95%, 28% 95%); }
.cupart.glass { clip-path: polygon(25% 5%, 75% 5%, 75% 95%, 25% 95%); }
.cupart.teacup { clip-path: polygon(5% 30%, 75% 30%, 75% 40%, 95% 40%, 95% 60%, 72% 60%, 60% 80%, 20% 80%); }
.cupart.chalice { clip-path: polygon(15% 5%, 85% 5%, 60% 50%, 60% 82%, 80% 82%, 80% 95%, 20% 95%, 20% 82%, 40% 82%, 40% 50%); }

.after { margin-top: 12px; }
.explain { font-size: 18px; line-height: 1.4; }
.explain b { font-weight: 800; }
.explain .chip { display: inline-block; padding: 3px 9px; margin-right: 8px; font-size: 12px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; vertical-align: 2px; }
.explain .chip.win { background: #fff; color: var(--ink); } .explain .chip.miss { background: var(--ink); color: #fff; }
.next { margin-top: 12px; padding: 12px 18px; min-width: 140px; border: 2px solid #fff; border-radius: 0; background: #fff; color: var(--ink); font: 800 13px var(--font); letter-spacing: 0.08em; text-transform: uppercase; cursor: pointer; }
@media (hover: hover) { .next:hover { background: var(--orange); border-color: var(--orange); } }
.go { display: flex; gap: 8px; flex-wrap: wrap; }
.next.quit { background: transparent; color: #fff; min-width: 0; }
@media (hover: hover) { .next.quit:hover { color: var(--ink); } }
.result { margin-top: 8px; font-size: 18px; }
.result b { font-size: clamp(32px, 6vw, 48px); font-weight: 800; letter-spacing: -0.03em; }
.result a { color: inherit; }

.panel { background: var(--navy); color: #fff; padding: 24px var(--pad) 28px; }
.soft, .ev.soft { color: var(--navy-soft); }
.panel-title { font-size: clamp(28px, 5vw, 38px); letter-spacing: -0.02em; line-height: 1.05; }
.panel .hook { margin-top: 12px; font-size: 18px; }
/* What the answers are for: said plainly, in full-strength white, right above the button that starts it. */
.panel .use { margin-top: 18px; padding: 14px 16px; border: 2px solid #fff; font-size: 16px; line-height: 1.4; }
.cta { display: inline-block; margin-top: 18px; padding: 16px 24px; border: 2px solid #fff; border-radius: 0; background: #fff; color: var(--ink); font: 800 14px var(--font); letter-spacing: 0.08em; text-transform: uppercase; cursor: pointer; transition: background 0.15s var(--ease), border-color 0.15s var(--ease); }
@media (hover: hover) { .cta:hover:not(:disabled) { background: var(--orange); border-color: var(--orange); } }
.cta:active { transform: scale(0.97); }
.cta:disabled { opacity: 0.5; cursor: default; }
.end .big { font-size: clamp(44px, 5.6vw, 84px); font-weight: 800; letter-spacing: -0.05em; line-height: 0.9; margin: 12px 0 6px; font-variant-numeric: tabular-nums; }
.end .line { font-size: 18px; margin-top: 14px; }
.end .actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 20px; }
.end button { padding: 14px 20px; border: 2px solid #fff; border-radius: 0; background: transparent; color: #fff; font: 800 13px var(--font); letter-spacing: 0.08em; text-transform: uppercase; cursor: pointer; }
.end button.primary { background: #fff; color: var(--ink); }
@media (hover: hover) { .end button:hover { background: var(--orange); border-color: var(--orange); color: var(--ink); } }
.review { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 8px; }
.review li { display: grid; grid-template-columns: 76px 1fr; gap: 12px; align-items: start; font-size: 16px; line-height: 1.35; }
.review .chip { display: block; padding: 4px 0; text-align: center; font-size: 11px; }
.review .chip.win { background: #fff; color: var(--ink); } .review .chip.miss { background: var(--orange); color: var(--ink); } .review .chip.skip { outline: 2px solid var(--navy-soft); outline-offset: -2px; color: var(--navy-soft); }
.end .list-head { margin-top: 28px; padding-top: 10px; border-top: 2px solid rgba(255, 255, 255, 0.3); }

@media (min-width: 900px) {
  .stage { grid-template-columns: minmax(0, 1.55fr) minmax(380px, 1fr); min-height: 100svh; }
  .field { padding-bottom: 36px; }
  .panel { padding-top: 76px; padding-bottom: 36px; }
}
/* Mid-survey the giant pictogram fades: white text was running over its white shape on desktop. */
.playing .giant { color: rgba(255, 255, 255, 0.16); }
/* Phones, mid-survey: the title and giant pictogram give their room to the question. */
@media (max-width: 899px) {
  .playing .field h1, .playing .giant { display: none; }
  .playing .quiz { margin-top: 14px; }
  .playing .panel { display: none; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
