// syllabus-data.jsx
// All game content derived from the INFO-I 399 syllabus.

// ─── Datastream challenges: TRUE/FALSE fragments ───────────────────────────
// Each fragment is a "packet" intercepted from the Academy mainframe. Players
// triage: GENUINE (let through) or CORRUPTED (purge).
const DATASTREAM_PACKETS = [
  { id: 'd1', text: 'Late submissions get a 1% deduction per day for up to 7 days after a 3-day grace period.', truth: true, source: 'Late assignment policy' },
  { id: 'd2', text: 'The 3-day grace period requires a written explanation to your instructor.', truth: false, source: 'Late assignment policy', why: 'No explanation is required during the 3-day grace period.' },
  { id: 'd3', text: 'Each missed class session reduces your final course grade by 3%.', truth: true, source: 'Attendance Policy' },
  { id: 'd4', text: 'Assignments are due at 11:59 PM to give you maximum flexibility.', truth: false, source: 'Course Deadlines', why: 'Deadlines are 5:00 PM, chosen with student well-being in mind.' },
  { id: 'd5', text: 'Missing the Research Data Hackathon may result in failing the entire course.', truth: true, source: 'Required In-Person Events' },
  { id: 'd6', text: 'Generative AI is banned in this course.', truth: false, source: 'GAI Use Policy', why: 'GAI is permitted with acknowledgment, citation, and prompt disclosure.' },
  { id: 'd7', text: 'Spelling and grammar checks via AI do not require disclosure.', truth: true, source: 'GAI Use Policy' },
  { id: 'd8', text: 'Instructors will respond to weekend emails within 24 hours.', truth: false, source: 'Email Etiquette', why: 'Instructors do not respond to emails on Saturday or Sunday.' },
  { id: 'd9', text: 'The Research Poster is worth 30% of your final grade.', truth: true, source: 'Course Assessment' },
  { id: 'd10', text: 'Top Hat will be used for in-class quizzing and attendance tracking.', truth: true, source: 'Attendance Policy' },
  { id: 'd11', text: 'You can earn Top Hat credit remotely if you watch the recording later.', truth: false, source: 'Attendance Policy', why: 'Top Hat credit requires physical presence in class.' },
  { id: 'd12', text: 'The Hackathon Project is worth 20% of your final grade.', truth: true, source: 'Course Assessment' },
  { id: 'd13', text: 'Bringing your child to class is acceptable when childcare falls through.', truth: true, source: 'Childcare' },
  { id: 'd14', text: 'Religious observance accommodation forms must be submitted at least 1 week in advance.', truth: false, source: 'Religious Observances', why: 'The form must be submitted at least 2 weeks prior to the absence.' },
  { id: 'd15', text: 'Bi-weekly reports and in-class participation count for 15% of your grade.', truth: true, source: 'Course Assessment' },
  // ── Late work / deadlines ──────────────────────────────────────────────
  { id: 'd16', text: 'After day 10, late work is no longer accepted at all.', truth: true, source: 'Late assignment policy' },
  { id: 'd17', text: 'The 1% per day late penalty resets if you contact your instructor.', truth: false, source: 'Late assignment policy', why: 'The penalty is automatic; contact does not pause it.' },
  { id: 'd18', text: 'Hackathon and Poster deliverables follow the same late policy as bi-weekly reports.', truth: false, source: 'Late assignment policy', why: 'Major deliverables (Hackathon, Poster) cannot be submitted late.' },
  { id: 'd19', text: 'Top Hat in-class quizzes can be made up by emailing the instructor.', truth: false, source: 'Attendance Policy', why: 'Top Hat is participation-based and tied to physical presence; it cannot be made up.' },
  // ── Attendance edge cases ──────────────────────────────────────────────
  { id: 'd20', text: 'University-sanctioned absences (athletics, performances) are excused with documentation.', truth: true, source: 'Attendance Policy' },
  { id: 'd21', text: 'You can miss up to 2 classes per semester with no grade impact.', truth: false, source: 'Attendance Policy', why: 'There is no free-skip allowance; every unexcused absence costs 3%.' },
  { id: 'd22', text: 'Arriving more than 15 minutes late may be counted as an absence.', truth: true, source: 'Attendance Policy' },
  { id: 'd23', text: 'You are required to provide a medical excuse to document your illness.', truth: false, source: 'Attendance Policy', why: 'A medical note is not required to document illness — students self-report.' },
  // ── GAI / academic integrity ───────────────────────────────────────────
  { id: 'd24', text: 'Using AI to generate code for an assignment without disclosure is a violation.', truth: true, source: 'GAI Use Policy' },
  { id: 'd25', text: 'You must include the actual prompts you used when citing GAI.', truth: true, source: 'GAI Use Policy' },
  { id: 'd26', text: 'Translating your own writing with an AI tool is exempt from disclosure.', truth: false, source: 'GAI Use Policy', why: 'Translation by AI must still be disclosed; only spell/grammar checks are exempt.' },
  { id: 'd27', text: 'Plagiarism reports are escalated to the Office of Student Conduct.', truth: true, source: 'Academic Integrity' },
  { id: 'd28', text: 'Reusing your own paper from another course requires instructor approval.', truth: true, source: 'Academic Integrity' },
  // ── Communication & email ──────────────────────────────────────────────
  { id: 'd29', text: 'Emails should include the course number (INFO-I 399) in the subject line.', truth: true, source: 'Email Etiquette' },
  { id: 'd30', text: 'You can DM instructors on Slack instead of email for faster replies.', truth: false, source: 'Email Etiquette', why: 'Email is the official channel; instructors do not guarantee Slack responsiveness.' },
  { id: 'd31', text: 'Allow at least 24 hours for an email response before following up.', truth: true, source: 'Email Etiquette' },
  // ── Required events ────────────────────────────────────────────────────
  { id: 'd32', text: 'The Research Poster Symposium is held in late April.', truth: true, source: 'Required In-Person Events' },
  { id: 'd33', text: 'The 3 Minute Thesis is optional extra credit.', truth: false, source: 'Required In-Person Events', why: 'The 3MT is a graded course requirement, not extra credit.' },
  { id: 'd34', text: 'You may attend the Hackathon remotely via Zoom if needed.', truth: false, source: 'Required In-Person Events', why: 'The Hackathon requires in-person attendance.' },
  // ── Group work ─────────────────────────────────────────────────────────
  { id: 'd35', text: 'The Group Resume is the first major team deliverable of the semester.', truth: true, source: 'Course Assessment' },
  { id: 'd36', text: 'Hackathon team evaluations are anonymous and influence individual scores.', truth: true, source: 'Course Assessment' },
  { id: 'd37', text: 'You can choose your own Hackathon team without instructor approval.', truth: false, source: 'Course Assessment', why: 'Hackathon teams are assigned by the instructional staff.' },
  // ── Accommodations & inclusion ─────────────────────────────────────────
  { id: 'd38', text: 'Students registered with Disability Services receive accommodations confidentially.', truth: true, source: 'Accommodations' },
  { id: 'd39', text: 'You must disclose your disability to your classmates to receive group-work accommodations.', truth: false, source: 'Accommodations', why: 'Accommodations are confidential; classmate disclosure is never required.' },
  { id: 'd40', text: 'Religious observance forms must be submitted at least 2 weeks before the absence.', truth: true, source: 'Religious Observances' },
  { id: 'd41', text: 'Pronouns and chosen names should be respected by all course participants.', truth: true, source: 'Inclusive Classroom' },
  // ── Tech & resources ───────────────────────────────────────────────────
  { id: 'd42', text: 'Canvas is the primary platform for assignment submission.', truth: true, source: 'Course Tech' },
  { id: 'd43', text: 'You need a paid Top Hat subscription for the semester.', truth: true, source: 'Course Tech' },
  { id: 'd44', text: 'Required textbooks are provided free through the library.', truth: false, source: 'Course Tech', why: 'Course materials may include required purchases (Top Hat, etc.); not all are library-provided.' },
  { id: 'd45', text: 'IU Libraries offers free citation management tools (Zotero, EndNote).', truth: true, source: 'Course Tech' },
  // ── Wellness & support ─────────────────────────────────────────────────
  { id: 'd46', text: 'CAPS (Counseling and Psychological Services) is free for enrolled students.', truth: true, source: 'Student Wellbeing' },
  { id: 'd47', text: 'The 5 PM deadline was chosen specifically to protect student sleep and family time.', truth: true, source: 'Course Deadlines' },
  { id: 'd48', text: 'If you\'re overwhelmed, the instructor will lower your grade requirements on request.', truth: false, source: 'Student Wellbeing', why: 'Grades are not negotiated; but the team will connect you to support resources.' },
];

// ─── Deadline heist: real assignments to slot into weeks ───────────────────
// Players see fragments of the calendar and have to drop them into their
// correct week-slot before the firewall closes.
const DEADLINE_NODES = [
  { id: 'n1', label: 'Course Policies & Expectations Quiz', date: 'Sun Jan 18', week: 'Week 1' },
  { id: 'n2', label: 'Bi-weekly Report 1', date: 'Sun Jan 25', week: 'Week 2' },
  { id: 'n3', label: 'Group Resume', date: 'Sun Jan 25', week: 'Week 2' },
  { id: 'n4', label: 'Hackathon — PPT Slides', date: 'Sun Feb 8', week: 'Week 4' },
  { id: 'n5', label: 'Bi-weekly Report 2', date: 'Sun Feb 8', week: 'Week 4' },
  { id: 'n6', label: 'Hackathon Team Eval', date: 'Sun Feb 22', week: 'Week 6' },
  { id: 'n7', label: '3 Minute Thesis Practice #1', date: 'Sun Mar 1', week: 'Week 7' },
  { id: 'n8', label: 'Submit Message Box', date: 'Sun Mar 8', week: 'Week 8' },
  { id: 'n9', label: 'Poster Submission', date: 'Fri Apr 10', week: 'Week 13' },
  { id: 'n10', label: 'Final Spring Report', date: 'Wed May 6', week: 'Week 16' },
  { id: 'n11', label: 'Course Policy Acknowledgment', date: 'Sun Jan 18', week: 'Week 1' },
  { id: 'n12', label: 'Bi-weekly Report 3', date: 'Sun Feb 22', week: 'Week 6' },
  { id: 'n13', label: 'Hackathon — Final Submission', date: 'Sun Feb 15', week: 'Week 5' },
  { id: 'n14', label: '3 Minute Thesis Practice #2', date: 'Sun Mar 22', week: 'Week 10' },
  { id: 'n15', label: 'Poster Draft — Peer Review', date: 'Sun Mar 29', week: 'Week 11' },
  { id: 'n16', label: 'Bi-weekly Report 5', date: 'Sun Apr 5', week: 'Week 12' },
  { id: 'n17', label: '3 Minute Thesis — Final', date: 'Sun Apr 19', week: 'Week 14' },
  { id: 'n18', label: 'Group Reflection Memo', date: 'Sun Apr 26', week: 'Week 15' },
];

const WEEK_SLOTS = [
  { id: 'Week 1',  label: 'WK01',  range: 'Jan 12–18' },
  { id: 'Week 2',  label: 'WK02',  range: 'Jan 19–25' },
  { id: 'Week 4',  label: 'WK04',  range: 'Feb 2–8' },
  { id: 'Week 5',  label: 'WK05',  range: 'Feb 9–15' },
  { id: 'Week 6',  label: 'WK06',  range: 'Feb 16–22' },
  { id: 'Week 7',  label: 'WK07',  range: 'Feb 23–Mar 1' },
  { id: 'Week 8',  label: 'WK08',  range: 'Mar 2–8' },
  { id: 'Week 10', label: 'WK10',  range: 'Mar 16–22' },
  { id: 'Week 11', label: 'WK11',  range: 'Mar 23–29' },
  { id: 'Week 12', label: 'WK12',  range: 'Mar 30–Apr 5' },
  { id: 'Week 13', label: 'WK13',  range: 'Apr 6–12' },
  { id: 'Week 14', label: 'WK14',  range: 'Apr 13–19' },
  { id: 'Week 15', label: 'WK15',  range: 'Apr 20–26' },
  { id: 'Week 16', label: 'WK16',  range: 'May 4–10' },
];

// ─── Squad roles (cyberpunk team archetypes) ───────────────────────────────
const SQUAD_ROLES = [
  { id: 'netrunner',  glyph: 'N', name: 'NETRUNNER',  spec: 'Datastream', bio: 'Fast pattern-match. +5% combo on truth packets.', accent: '#22d3ee' },
  { id: 'cryptographer', glyph: 'C', name: 'CRYPTOGRAPHER', spec: 'Decryption', bio: 'Reads the policy fine print. Sees one extra hint per round.', accent: '#a78bfa' },
  { id: 'archivist',  glyph: 'A', name: 'ARCHIVIST',  spec: 'Calendar', bio: 'Knows every deadline. Time slows by 10% on heists.', accent: '#f472b6' },
  { id: 'fixer',      glyph: 'F', name: 'FIXER',      spec: 'Recovery', bio: 'Once per mission, restores a lost packet.', accent: '#fbbf24' },
];

// ─── Policy Firewall: scenario cards ───────────────────────────────────────
const POLICY_SCENARIOS = [
  {
    id: 'p1',
    prompt: 'Your kid had a fever last night. You overslept and missed class. What\'s the protocol?',
    options: [
      { id: 'a', text: 'Email the recording link request — the absence will be auto-excused.', correct: false },
      { id: 'b', text: 'Notify the instructional team; absence still counts unless documented.', correct: true },
      { id: 'c', text: 'Show up to the next class and explain — no need to email.', correct: false },
    ],
    why: 'Attendance is required; contact the team. Each missed session still costs 3% of your final grade.',
  },
  {
    id: 'p2',
    prompt: 'You used ChatGPT to brainstorm an outline for your bi-weekly report. What now?',
    options: [
      { id: 'a', text: 'Submit normally — brainstorming doesn\'t count as AI use.', correct: false },
      { id: 'b', text: 'Acknowledge, cite, and include the prompts you used.', correct: true },
      { id: 'c', text: 'Only cite if more than 25% of the text was AI-generated.', correct: false },
    ],
    why: 'Any GAI use beyond spelling/grammar must be acknowledged, cited, and include prompts.',
  },
  {
    id: 'p3',
    prompt: 'It\'s Saturday at 4 PM. You email Dr. Horton about Monday\'s deadline. When should you expect a reply?',
    options: [
      { id: 'a', text: 'Within an hour — instructors check email constantly.', correct: false },
      { id: 'b', text: 'By Sunday evening at the latest.', correct: false },
      { id: 'c', text: 'Monday or Tuesday — for weekend replies, allow 1 day.', correct: true },
    ],
    why: 'Weekend emails wait until the next business day; allow at least 24 hours for a reply.',
  },
  {
    id: 'p4',
    prompt: 'Your Hackathon teammate hasn\'t responded to the group chat in 5 days. Slides are due Sunday. What\'s the move?',
    options: [
      { id: 'a', text: 'Let faculty know, but keep working — call it out in the team eval.', correct: true },
      { id: 'b', text: 'Submit late so everyone can contribute equally.', correct: false },
      { id: 'c', text: 'Cover their portion silently and say nothing in team eval.', correct: false },
    ],
    why: 'Major deliverables can\'t be submitted late. Anonymous team evaluations are the right channel for unequal contribution.',
  },
  {
    id: 'p5',
    prompt: 'You realize at 4:55 PM that your bi-weekly report has a broken citation. Submit now or fix it?',
    options: [
      { id: 'a', text: 'Submit at 4:59 PM with the broken citation — penalty-free is the priority.', correct: false },
      { id: 'b', text: 'Fix it in 30 min and submit at 5:25 PM — 1% penalty is worth a clean cite.', correct: true },
      { id: 'c', text: 'Email the instructor for an extension to fix it.', correct: false },
    ],
    why: 'Within the 3-day grace, the penalty is just 1%/day. Quality of the deliverable matters more than perfect on-time.',
  },
  {
    id: 'p6',
    prompt: 'A peer asks to copy your Top Hat answer during a quiz. You decline; they say "everyone does it." What do you do next?',
    options: [
      { id: 'a', text: 'Nothing — you said no, end of story.', correct: false },
      { id: 'b', text: 'Report them to the instructional team after class.', correct: true },
      { id: 'c', text: 'Mention it casually in your bi-weekly report reflection.', correct: false },
    ],
    why: 'Top Hat answers tied to attendance are an integrity boundary. Witnessed cheating should be reported.',
  },
  {
    id: 'p7',
    prompt: 'You used Grammarly to polish your final paragraph. Disclosure required?',
    options: [
      { id: 'a', text: 'Yes — disclose and cite all prompts used.', correct: false },
      { id: 'b', text: 'No — spelling and grammar checks are exempt.', correct: true },
      { id: 'c', text: 'Only if Grammarly Premium\'s rewrite features were used.', correct: false },
    ],
    why: 'Spelling and grammar checks don\'t require disclosure. Substantive rewriting via AI does.',
  },
  {
    id: 'p8',
    prompt: 'A religious holiday falls on the day of the Hackathon. When do you submit the accommodation form?',
    options: [
      { id: 'a', text: 'The week before — instructors are flexible.', correct: false },
      { id: 'b', text: 'At least 2 weeks before the absence.', correct: true },
      { id: 'c', text: 'On the day, with a written explanation.', correct: false },
    ],
    why: 'Religious accommodation forms must be submitted at least 2 weeks prior to the absence.',
  },
];

Object.assign(window, {
  DATASTREAM_PACKETS, DEADLINE_NODES, WEEK_SLOTS,
  SQUAD_ROLES, POLICY_SCENARIOS,
  TRIAGE_SIGNALS, TRIAGE_NODES,
  HEX_NEEDS, HEX_RESOURCES,
});

// ─── Triage Mini-Game: distress signal → support resource ─────────────────
// Played between Protocol 01 and Protocol 02. Players route incoming
// distress signals from fellow operatives to the correct IU support uplink.

const TRIAGE_NODES = [
  { id: 'caps',       glyph: '◐', label: 'CAPS / TimelyCare',     desc: 'Mental health · 24/7 virtual', accent: '#22d3ee' },
  { id: 'aes',        glyph: '◈', label: 'AES + ATAC',            desc: 'Disability accommodations & assistive tech', accent: '#a78bfa' },
  { id: 'food',       glyph: '◆', label: 'Crimson Cupboard',       desc: 'Food pantry · free for IUB', accent: '#aaff00' },
  { id: 'emergency',  glyph: '$',  label: 'IU Emergency Funds',    desc: 'Up to $500 emergency funding', accent: '#fbbf24' },
  { id: 'tech',       glyph: '⌘', label: 'Loaner Laptop · UITS',   desc: 'Up to 2-week laptop loan', accent: '#ff2d95' },
  { id: 'advocate',   glyph: '⌬', label: 'Student Advocates',      desc: 'Academic + personal support', accent: '#22d3ee' },
  { id: 'care',       glyph: '◉', label: 'Care Referral',          desc: 'Concern about another student', accent: '#a78bfa' },
  { id: 'health',     glyph: '✚', label: 'Student Health Center',  desc: 'Medical care · in-person + virtual', accent: '#aaff00' },
  { id: 'legal',      glyph: '§',  label: 'Student Legal Services', desc: 'Free legal support', accent: '#fbbf24' },
  { id: '988',        glyph: '!',  label: '988 Crisis Lifeline',    desc: 'Suicide & crisis · 24/7', accent: '#ff2d95' },
];

const TRIAGE_SIGNALS = [
  { id: 't1',  text: 'Operative reports panic attacks before exams. Needs talk support tonight.', resource: 'caps' },
  { id: 't2',  text: 'Operative locked out of laptop. Paper due tomorrow. No backup device.', resource: 'tech' },
  { id: 't3',  text: 'Operative skipped meals 3 days. Funds depleted until next paycheck.', resource: 'food' },
  { id: 't4',  text: 'Operative\'s rent check bounced. Emergency unfunded shortfall ~$400.', resource: 'emergency' },
  { id: 't5',  text: 'Operative diagnosed with ADHD mid-semester. Needs exam accommodations.', resource: 'aes' },
  { id: 't6',  text: 'Operative\'s landlord is threatening eviction. Lease question is shaky.', resource: 'legal' },
  { id: 't7',  text: 'Operative running 102° fever. Hasn\'t seen a doctor in 18 months.', resource: 'health' },
  { id: 't8',  text: 'Operative\'s roommate has been silent for a week. Curtains drawn. Worried.', resource: 'care' },
  { id: 't9',  text: 'Operative spiraling. "Can\'t do this anymore." Active distress.', resource: '988' },
  { id: 't10', text: 'Operative facing academic probation + pregnancy. Needs someone who knows the system.', resource: 'advocate' },
  { id: 't11', text: 'Operative broke their reading glasses. Has dyslexia. Midterms in 4 days.', resource: 'aes' },
  { id: 't12', text: 'Operative texting at 3 AM. "I shouldn\'t even be here." Won\'t elaborate.', resource: '988' },
  { id: 't13', text: 'Operative\'s laptop fan died mid-presentation. Repair quote: $280.', resource: 'tech' },
  { id: 't14', text: 'Operative\'s family in crisis. Travel funds gone. Final next week.', resource: 'emergency' },
  { id: 't15', text: 'Operative grieving a sudden loss. Can\'t focus. Doesn\'t want medication.', resource: 'caps' },
  { id: 't16', text: 'Operative skipped 4 classes; doesn\'t know how to navigate makeup work.', resource: 'advocate' },
  { id: 't17', text: 'Operative running low on insulin. Pharmacy charge declined.', resource: 'health' },
  { id: 't18', text: 'Operative noticed teammate making concerning posts online. Unsure what to do.', resource: 'care' },
  { id: 't19', text: 'Operative needs notarized form for FAFSA appeal. No funds for a notary.', resource: 'advocate' },
  { id: 't20', text: 'Operative skipped breakfast + lunch all week. Embarrassed to ask for help.', resource: 'food' },
];

// ─── Hex Sweep Mini-Game: rotate resource hexes onto matching needs ──────
// Played between Protocol 02 and Protocol 03. A 3-cell stack of resource
// hexes drops; rotate to align the colored face with the matching need slot.

const HEX_NEEDS = [
  { id: 'mh',     label: 'MENTAL HEALTH',  glyph: '◐', accent: '#22d3ee' },
  { id: 'food',   label: 'FOOD',           glyph: '◆', accent: '#aaff00' },
  { id: 'funds',  label: 'FUNDS',          glyph: '$', accent: '#fbbf24' },
  { id: 'tech',   label: 'TECH',           glyph: '⌘', accent: '#ff2d95' },
  { id: 'access', label: 'ACCESS',         glyph: '◈', accent: '#a78bfa' },
];

const HEX_RESOURCES = [
  { id: 'caps',       face: 'mh',     name: 'CAPS' },
  { id: 'timely',     face: 'mh',     name: 'TIMELYCARE' },
  { id: 'welltrack',  face: 'mh',     name: 'WELLTRACK' },
  { id: 'cupboard',   face: 'food',   name: 'CRIMSON CUPBOARD' },
  { id: 'foodres',    face: 'food',   name: 'FOOD RESOURCES' },
  { id: 'emergency',  face: 'funds',  name: 'EMERGENCY FUNDS' },
  { id: 'money',      face: 'funds',  name: 'MONEYSMARTS' },
  { id: 'intl',       face: 'funds',  name: 'INTL HARDSHIP' },
  { id: 'laptop',     face: 'tech',   name: 'LOANER LAPTOP' },
  { id: 'uits',       face: 'tech',   name: 'UITS' },
  { id: 'aes',        face: 'access', name: 'AES' },
  { id: 'atac',       face: 'access', name: 'ATAC' },
];
