+ {mission.checkpoints.map((_, i) => {
+ const st = getCheckpointStatus(i);
+ let bg = "rgba(255,255,255,0.08)";
+ if (st === "completed") bg = "#1dbb7e";
+ if (st === "active") bg = "#1496ff";
+ return (
+
+ );
+ })}
+
- Abandon Mission
-
- ) : (
+ Checkpoint {currentCheckpoint + 1}
+
+
+
+ {cpStatus === "completed" || completedCheckpoints.includes(currentCheckpoint) ? (
+ /* ── Completed state ── */
-
This will end your mission.
-
- navigate("/missions")}
+ ✓
+
+ Checkpoint Complete
+
+
+ +{checkpoint?.points ?? 0} pts
+
+
+ ) : checkpoint ? (
+ <>
+ {/* Section label */}
+
+ {checkpoint.title}
+
+
+ {/* Question text */}
+
+ {renderInstruction(checkpoint.instruction)}
+
+
+ {/* Hint revealed */}
+ {hintRevealed && (
+
- Confirm
-
+ {checkpoint.hint}
+
+ )}
+
+ {/* Multiple choice options */}
+ {isMultipleChoice && checkpoint.choices && (
+
+ {checkpoint.choices.map((option, i) => {
+ const isSelected = selectedAnswer === option;
+ return (
+
{
+ console.log("choice clicked:", option);
+ setSelectedAnswer(option);
+ }}
+ style={{
+ padding: "6px 10px",
+ borderRadius: 4,
+ border: isSelected
+ ? "1px solid rgba(20,150,255,0.45)"
+ : "1px solid rgba(255,255,255,0.07)",
+ fontSize: 11,
+ color: isSelected ? "#c8d4e8" : "rgba(210,225,240,0.85)",
+ background: isSelected
+ ? "rgba(20,150,255,0.1)"
+ : "rgba(255,255,255,0.025)",
+ cursor: "pointer",
+ display: "flex",
+ alignItems: "center",
+ gap: 8,
+ }}
+ >
+
+ {CHOICE_KEYS[i] ?? String(i + 1)}
+
+ {option}
+
+ );
+ })}
+
+ )}
+
+ {/* Answer error */}
+ {answerError && (
+
{answerError}
+ )}
+
+ {/* Action row */}
+
+ {/* Hint button */}
+
+ {hintAvailable && !hintRevealed && (
+ handleRequestHint(mission.checkpoints[currentCheckpoint].id)}
+ style={{
+ fontSize: 11,
+ fontWeight: 600,
+ textTransform: "uppercase",
+ color: "rgba(255,255,255,0.8)",
+ cursor: "pointer",
+ letterSpacing: "0.08em",
+ border: "1px solid rgba(255,255,255,0.3)",
+ padding: "6px 12px",
+ borderRadius: 3,
+ background: "rgba(255,255,255,0.08)",
+ }}
+ >
+ ⊹ Request intel (−{HINT_PENALTY} pts)
+
+ )}
+
+ {/* Validate button */}
setAbandonConfirm(false)}
+ onClick={() => handleValidate(currentCheckpoint)}
+ disabled={isValidating || (isMultipleChoice && !selectedAnswer)}
style={{
- background: "transparent",
- border: "none",
- color: "var(--dt-colors-text-neutral-default)",
- fontSize: "20px",
- fontWeight: "600",
- cursor: "pointer",
- letterSpacing: "0.3px",
- padding: "0",
+ fontSize: 11,
+ fontWeight: 600,
+ padding: "8px 20px",
+ borderRadius: 3,
+ background: "rgba(20,150,255,0.35)",
+ border: "1px solid rgba(20,150,255,0.8)",
+ color: "#ffffff",
+ letterSpacing: "0.1em",
+ textTransform: "uppercase",
+ cursor:
+ isValidating || (isMultipleChoice && !selectedAnswer)
+ ? "default"
+ : "pointer",
+ opacity:
+ isValidating || (isMultipleChoice && !selectedAnswer) ? 0.4 : 1,
}}
>
- Cancel
+ {isValidating ? "Confirming..." : "Validate →"}
-