<?php
// ❌ session_start() remove pannrom
// session_start();

if (!isset($_SESSION)) {
    session_start();
}

// DEFAULT
$eligible = false;

// DEMO LOGIC (ippo)
$class = $_SESSION['class'] ?? null;
$stream = $_SESSION['stream'] ?? null;
$applied_thinking_completed = $_SESSION['track3_completed'] ?? false;

// REAL RULE
if (
    in_array($class, [11, 12]) &&
    $stream === 'CS' &&
    $applied_thinking_completed === true
) {
    $eligible = true;
}
