/* EquiWork website, Training: landing + four audience track pages. Deck slides framed as inset exhibits. */
const trnDS = window.EquiWorkDesignSystem_e8fee2;
const A = "assets/";

const TRACKS = [
  {
    slug: "employees", name: "All Employees", format: "Instructor-led · on-site or remote", duration: "60–90 minutes",
    blurb: "Recognise conduct early, know how to report, understand what confidentiality protects.",
    outcomes: [
      "Recognise the conduct the Act covers, early, not in hindsight",
      "Know where and how to complain, and within what time",
      "Understand what confidentiality protects, and what it does not",
    ],
    intro: [
      "Most employees have never read the Act, and should not need to. What they need is the ability to recognise a pattern while it is still small, and a clear picture of what happens if they raise it, who hears them, how long it takes, and what stays confidential.",
      "This session is scenario-based and plainly spoken. It does not lecture, and it does not dramatise; it walks through the situations people actually encounter and the process the law provides.",
    ],
    sections: [
      { h: "Dignity is a right, not a perk", p: "The Act begins from the Constitution: equality, dignity, and the right to practise a profession in an environment free from sexual harassment. The session opens here, not with rules, but with the reason for them.", img: "slide-dignity.jpg", cap: "Training slide: Dignity is a right, not a perk." },
      { h: "What counts as sexual harassment", p: "The statutory definition turns on one word: unwelcome. Physical contact and advances, demands for sexual favours, sexually coloured remarks, pornography, and any other unwelcome conduct of a sexual nature, direct or by implication (s. 2(n)).", img: "slide-unwelcome.jpg", cap: "Training slide: What counts as sexual harassment." },
      { h: "'Workplace' is far wider than the office", p: "The definition reaches any place visited arising out of or during the course of employment, client sites, off-sites, work travel, and employer-provided transport (s. 2(o)(v)). Working from home does not switch the protection off.", img: "slide-workplace.jpg", cap: "Training slide: 'Workplace' is far wider than the office." },
      { h: "Common myths, and the facts", p: "\u201CIt was a compliment.\u201D \u201CShe never objected.\u201D \u201CIt happened outside office hours.\u201D The session takes the most common defences and tests each one against the Act's actual text.", img: "slide-myths.jpg", cap: "Training slide: Common myths and the facts." },
      { h: "Making a complaint", p: "A written complaint to the Internal Committee within three months of the incident (or of the last incident in a series), with assistance available if writing it is difficult, and a further three-month extension for recorded reasons (s. 9(1)).", img: "slide-complaint.jpg", cap: "Training slide: Making a complaint." },
      { h: "Where to get help", p: "The session closes with the practical map: the committee's names and contact details, the SHe-Box portal, and the Local Committee for workplaces without an IC. No one leaves without knowing whom to approach.", img: "slide-helpline.jpg", cap: "Training slide: Where to get help." },
    ],
  },
  {
    slug: "managers", name: "Managers & Leadership", format: "Instructor-led · on-site or remote", duration: "Half day",
    blurb: "The duty to act on what you see, what not to do, and how to escalate without contaminating the record.",
    outcomes: [
      "Act on what you observe, the duty does not wait for a formal complaint",
      "Avoid the classic mis-steps: minimising, mediating privately, promising secrecy",
      "Escalate to the Internal Committee without contaminating the record",
    ],
    intro: [
      "Managers are where most complaints surface first, and where most compliance failures begin. A well-meaning manager who mediates privately, promises confidentiality he cannot keep, or sits on a disclosure for three weeks has already damaged the process before the committee ever sees it.",
      "This track is built around four situations a manager must handle correctly. Each is worked through as it unfolds: what you notice, what you must do, what you must not do, and what you say to the person in front of you.",
    ],
    sections: [
      { h: "The cost of getting it wrong", p: "Before the scenarios: what failure costs. An invalid process exposes the organisation to appeal and penalty, and exposes the people involved to an inquiry re-run, the worst outcome for everyone, including the aggrieved woman.", img: "slide-cost.jpg", cap: "Training slide: The cost of getting it wrong." },
      { h: "Scenario 1: Power and quid pro quo", p: "Late evenings, a senior colleague, and requests that slide from professional to personal. The scenario examines implied promise and implied threat, the circumstances s. 3(2) says may amount to sexual harassment.", img: "slide-scenario-power.jpg", cap: "Scenario 1: Power & quid pro quo. A situation a manager must handle correctly." },
      { h: "Scenario 2: 'Just banter'", p: "A team where the jokes have an audience and a target. The manager's instinct is to calm it down; the duty is to recognise a hostile environment forming and act before it hardens.", img: "slide-scenario-banter.jpg", cap: "Scenario 2: 'Just banter'. A situation a manager must handle correctly." },
      { h: "Scenario 3: Remote and digital workplace", p: "Late-night messages, video calls, and a pattern that never once happens in the office. The workplace definition follows the work; so does the manager's duty.", img: "slide-scenario-remote.jpg", cap: "Scenario 3: Remote / digital workplace. A situation a manager must handle correctly." },
      { h: "Scenario 4: Third party at a client site", p: "The respondent is the client's employee, on the client's premises. The duty to act does not lapse because the perpetrator is not on your payroll, the employer must assist, and may initiate action where the woman desires it (s. 19(g)–(h)).", img: "slide-scenario-client.jpg", cap: "Scenario 4: Third party at client site. A situation a manager must handle correctly." },
      { h: "Building a respectful workplace", p: "The close turns from redressal to prevention: the manager's daily behaviours that make reporting safe and patterns visible, and the record-keeping that protects everyone if a complaint ever comes.", img: "slide-respect.jpg", cap: "Training slide: Building a respectful workplace." },
    ],
  },
  {
    slug: "board", name: "Employer / Board", format: "Boardroom briefing", duration: "60–90 minutes",
    blurb: "Statutory duties, personal and corporate exposure, and the annual return.",
    outcomes: [
      "Know the employer's ten duties under s. 19, and who owns each",
      "Understand exposure: the fine up to \u20B950,000, repeat-offence escalation, and licence consequences (s. 26)",
      "Read the annual return and the board-report disclosure correctly",
    ],
    intro: [
      "Under the Act the employer is not a bystander to the committee's work, it is the duty-holder. The employer constitutes the committee, funds it, trains it, displays the consequences of harassment at the workplace, acts on recommendations within sixty days, and answers for the numbers in its annual report.",
      "This briefing gives the board the whole obligation set in one sitting, with the two Supreme Court decisions every director should be able to summarise.",
    ],
    sections: [
      { h: "Duties of the employer", p: "Section 19 lists the duties in full: a safe working environment, display of penal consequences and the IC order, regular workshops and awareness programmes, facilities and information for the committee, assistance to the woman, and treating harassment as misconduct under service rules.", img: "slide-employer.jpg", cap: "Training slide: Duties of the employer." },
      { h: "The Internal Committee", p: "What the board must ensure about the committee it constitutes: a senior woman presiding, at least half women members, an external member, tenure within three years, and what happens to every inquiry the committee touches if any of it is wrong.", img: "slide-ic.jpg", cap: "Training slide: The Internal Committee." },
      { h: "The annual return and the board report", p: "The committee's annual report goes to the employer and the District Officer each calendar year (s. 21); the employer's own annual report must state the number of cases filed and disposed (s. 22). For companies, the board report carries a statement of compliance with the Act, the bundled Companies Act amendment sets out the requirement." },
      { h: "Building a respectful workplace", p: "Tone from the top is a duty, not a slogan: what boards of well-run organisations do quarterly (review the register, hear the committee, and fund the training) so compliance is a habit rather than a reaction.", img: "slide-respect.jpg", cap: "Training slide: Building a respectful workplace." },
    ],
  },
  {
    slug: "ic", name: "IC Members", format: "Deep-dive workshop", duration: "Full day",
    blurb: "Running a defensible inquiry: natural justice, evidence, timelines, and report writing.",
    outcomes: [
      "Constitute correctly and know the committee's civil-court powers",
      "Run an inquiry that respects natural justice, notice, hearing, and representation against findings",
      "Keep the statutory clock: 90-day inquiry, 10-day report, 60-day employer action",
      "Write a report that survives appeal",
    ],
    intro: [
      "The Internal Committee does quasi-judicial work with none of a court's infrastructure. Its members are asked to summon and examine, weigh evidence, protect confidentiality, and write findings that may end a career, and to do it all inside ninety days.",
      "This is the deep-dive track: a full working day on procedure, from the moment a complaint is received to the report and beyond, grounded in the two Supreme Court decisions that define what the courts now expect of a committee.",
    ],
    sections: [
      { h: "Composition and powers", p: "The committee's validity is the first question an appellate forum will ask. Composition under s. 4, tenure, quorum, and the civil-court powers under s. 11(3): summoning and enforcing attendance, and requiring discovery and production of documents.", img: "slide-ic.jpg", cap: "Training slide: The Internal Committee." },
      { h: "Conciliation", p: "Before inquiry, and only at the aggrieved woman's request, the committee may attempt settlement, but no monetary settlement may be its basis (s. 10(1)). The session covers recording the settlement and what happens when its terms are breached.", img: "slide-conciliation.jpg", cap: "Training slide: Conciliation." },
      { h: "The inquiry", p: "Notice, hearings, evidence, and the second proviso to s. 11(1): both parties are heard, and a copy of the findings goes to both, enabling representation against the findings before the committee, the step most often skipped and most often fatal.", img: "slide-inquiry.jpg", cap: "Training slide: The inquiry." },
      { h: "Protection during the inquiry", p: "On the aggrieved woman's written request the committee may recommend transfer, leave of up to three months, or other prescribed relief (s. 12), and the employer must implement the recommendation and report back.", img: "slide-protection.jpg", cap: "Training slide: Protection during the inquiry." },
      { h: "Confidentiality", p: "Section 16 prohibits publication of the complaint's contents, identities, inquiry proceedings, and recommendations, notwithstanding the RTI Act. Members handle the most common leaks: the corridor conversation, the forwarded email, the well-meaning update.", img: "slide-confidentiality.jpg", cap: "Training slide: Confidentiality." },
      { h: "What the courts require", p: "Aureliano Fernandes (2023), where the Supreme Court found implementation wanting and directed employers to familiarise IC members with the manner in which an inquiry ought to be conducted. Dr Sohail Malik (2025), where it held the committee at the aggrieved woman's workplace may inquire even when the respondent works elsewhere.", img: "slide-case-aureliano.jpg", cap: "Training slide: Case law: Aureliano Fernandes (2023).", img2: "slide-case-malik.jpg", cap2: "Training slide: Case law: Dr Sohail Malik (2025)." },
    ],
  },
];

function TrackCard({ t, onNavigate }) {
  return (
    <trnDS.Card variant="service" title={t.name} eyebrow={t.format + " · " + t.duration}
      footer={<trnDS.Button variant="ghost" size="sm" onClick={() => onNavigate("training/" + t.slug)}>View this track</trnDS.Button>}>
      <ul style={{ margin: 0, padding: "0 0 0 18px", display: "grid", gap: 8 }}>
        {t.outcomes.slice(0, 4).map((o) => <li key={o} style={{ fontSize: 15, lineHeight: 1.5, color: "var(--ink-700)" }}>{o}</li>)}
      </ul>
    </trnDS.Card>
  );
}

function TrainingLanding({ onNavigate }) {
  const { Section, CtaBand, PageHead, Exhibit } = window;
  return (
    <div className="page-training">
      <PageHead crumbs={[{ label: "Home", href: "#home" }, { label: "Training" }]} eyebrow="Training" title="Training that prepares people for the real thing"
        standfirst="Four audience tracks, because the employee who must recognise a pattern, the manager who must act on it, and the committee member who must inquire into it need different material at different depths." wide />
      <Section bg="var(--canvas)">
        <div className="grid-split copy-left" style={{ marginBottom: 56 }}>
          <div>
            <p style={{ margin: "0 0 18px", maxWidth: "62ch", fontSize: 18, lineHeight: 1.62, color: "var(--ink-900)" }}>
              Every session is instructor-led and scenario-based, drawn from a professional deck built for Indian workplaces, sober, plainly spoken, and grounded in the Act, the Rules, and the courts' expectations. Attendance and completion records are produced for the annual return.
            </p>
            <trnDS.StatuteCallout citation="s. 19(c), PoSH Act 2013">
              organise workshops and awareness programmes at regular intervals for sensitising the employees with the provisions of the Act and orientation programmes for the members of the Internal Committee in the manner as may be prescribed
            </trnDS.StatuteCallout>
          </div>
          <Exhibit src={A + "deck-title.jpg"} caption="From the EquiWork training deck: title slide." />
        </div>
        <div className="grid-2">
          {TRACKS.map((t) => <TrackCard key={t.slug} t={t} onNavigate={onNavigate} />)}
        </div>
      </Section>
      <CtaBand title="Arrange a session." lead="Tell us the audience and the dates; we will propose the track, the format, and the records you will hold at the end." ctaLabel="Arrange this session" onClick={() => onNavigate("engage")} />
    </div>
  );
}

function TrackPage({ t, onNavigate }) {
  const { Section, CtaBand, PageHead, Exhibit, proseStyles: ps } = window;
  return (
    <div className="page-training">
      <PageHead crumbs={[{ label: "Home", href: "#home" }, { label: "Training", href: "#training" }, { label: t.name }]}
        eyebrow={"Training track · " + t.format + " · " + t.duration} title={t.name} standfirst={t.blurb} wide />
      <Section bg="var(--canvas)">
        <div style={{ maxWidth: 860, margin: "0 auto" }}>
          {t.intro.map((x, i) => <p key={i} style={ps.p}>{x}</p>)}
          <div style={{ margin: "26px 0 8px", padding: "18px 22px", background: "var(--parchment)", border: "1px solid var(--hairline)", borderRadius: "var(--radius-lg)" }}>
            <p style={{ margin: "0 0 10px", fontSize: 13, fontWeight: 600, letterSpacing: "1.2px", textTransform: "uppercase", color: "var(--brass-700)" }}>Outcomes</p>
            <ul style={{ margin: 0, padding: "0 0 0 18px", display: "grid", gap: 6 }}>
              {t.outcomes.map((o) => <li key={o} style={{ fontSize: 16, lineHeight: 1.55, color: "var(--ink-800)" }}>{o}</li>)}
            </ul>
          </div>
          {t.sections.map((s) => (
            <div key={s.h} style={{ marginTop: 48 }}>
              <h2 style={{ ...ps.h2, marginTop: 0 }}>{s.h}</h2>
              <p style={ps.p}>{s.p}</p>
              {s.img && <Exhibit src={A + s.img} caption={s.cap} />}
              {s.img2 && <div style={{ marginTop: 20 }}><Exhibit src={A + s.img2} caption={s.cap2} /></div>}
            </div>
          ))}
        </div>
      </Section>
      <CtaBand title="Arrange this session." lead={"The " + t.name + " track runs " + t.duration.toLowerCase() + ", on-site or remote, with completion records for your annual return."} ctaLabel="Arrange this session" onClick={() => onNavigate("engage")} />
    </div>
  );
}

function TrainingScreen({ route = "training", onNavigate }) {
  const slug = route.split("/")[1];
  const t = TRACKS.find((x) => x.slug === slug);
  return t ? <TrackPage t={t} onNavigate={onNavigate} /> : <TrainingLanding onNavigate={onNavigate} />;
}

Object.assign(window, { TrainingScreen });
