# Add the "Financial Aid Steps" block to this P1 project

Add a Puck component from P1 Blocks (https://p1-blocks.prolificdigital.io/blocks/financial-aid-steps) to this Pantheon Content Publisher (P1) Next.js project. Numbered FAFSA and financial aid steps with deadlines and links, beside a Federal School Code callout.

## Steps

1. Create `components/puck/financial-aid-steps-block.tsx` with the exact file contents below. If `components/puck/` doesn't exist, find the folder where this project keeps its Puck components (look at the imports in `puck.config.tsx`) and put it there.
2. In `puck.config.tsx`, import it: `import { financialAidStepsBlock } from "./components/puck/financial-aid-steps-block";`
3. Register it under `components` as `FinancialAidStepsBlock: financialAidStepsBlock`.
4. Add `"FinancialAidStepsBlock"` to the best-fitting entry in `categories` (this block's library category is "Higher ed"). Create a category only if none fits.
5. Run the project's type check (usually `pnpm typecheck`) and resolve anything project-specific.
6. If `package.json` has a `sync:registry` script, tell the user it must run (or that CI will run it) before the new component appears in the P1 editor.

## Rules

- Do not add dependencies. The block is self-contained by design: one type-only import from `@puckeditor/core`, Tailwind v4 classes, no client JavaScript.
- Keep the files as-is unless the user asks for changes. The accent color is `indigo-*`; if the project has brand colors, offer to swap them with a find-and-replace on `indigo-`.
- Images are plain `imageUrl` + `imageAlt` text fields. If this project defines a P1 media-library field (search for `"p1-media"`), offer to switch to it.
- Don't change prop names in `defaultProps`. Content editors' saved pages depend on them.

## File: `components/puck/financial-aid-steps-block.tsx`

```tsx
import type { ComponentConfig } from "@puckeditor/core";

/**
 * Financial Aid Steps — the FAFSA-to-award process as numbered steps, each with an optional
 * deadline and link, beside a callout showing the school's Federal School Code.
 * Register: `FinancialAidStepsBlock: financialAidStepsBlock` in puck.config.tsx.
 */

type Heading = "h1" | "h2" | "h3" | "h4";

type Step = {
  title: string;
  body: string;
  deadline: string;
  deadlineIso: string;
  linkLabel: string;
  linkHref: string;
};

export type FinancialAidStepsProps = {
  eyebrow: string;
  heading: string;
  headingLevel: Heading;
  intro: string;
  steps: Step[];
  codeLabel: string;
  code: string;
  codeNote: string;
  helpText: string;
  helpEmail: string;
  helpPhone: string;
  source: string;
};

const childHeading = { h1: "h2", h2: "h3", h3: "h4", h4: "h5" } as const;
const isoPattern = /^\d{4}-\d{2}-\d{2}/;

export const financialAidStepsBlock: ComponentConfig<FinancialAidStepsProps> = {
  label: "Financial Aid Steps",
  fields: {
    eyebrow: { type: "text", label: "Eyebrow", metadata: { help: "Small line above the heading. Leave blank to hide it." } },
    heading: { type: "text", label: "Heading" },
    headingLevel: {
      type: "select",
      label: "Heading level",
      options: [
        { label: "H1", value: "h1" },
        { label: "H2", value: "h2" },
        { label: "H3", value: "h3" },
        { label: "H4", value: "h4" },
      ],
      metadata: { help: "Sets the page outline for screen readers and search. The look doesn't change." },
    },
    intro: { type: "textarea", label: "Intro" },
    steps: {
      type: "array",
      label: "Steps",
      min: 1,
      max: 10,
      getItemSummary: (item, i) => item?.title || `Step ${(i ?? 0) + 1}`,
      defaultItemProps: { title: "New step", body: "", deadline: "", deadlineIso: "", linkLabel: "", linkHref: "" },
      arrayFields: {
        title: { type: "text", label: "Step title" },
        body: { type: "textarea", label: "Details" },
        deadline: { type: "text", label: "Deadline text", metadata: { help: "Such as Priority deadline: December 1, 2026. Leave blank if the step has no deadline." } },
        deadlineIso: { type: "text", label: "Deadline date (YYYY-MM-DD)", metadata: { help: "For calendars and screen readers. Optional." } },
        linkLabel: { type: "text", label: "Link text", metadata: { help: "Leave blank to hide the link." } },
        linkHref: { type: "text", label: "Link" },
      },
    },
    codeLabel: { type: "text", label: "Code label", metadata: { help: "Such as Northfield's Federal School Code. Leave the code blank to hide the callout." } },
    code: { type: "text", label: "Federal School Code", metadata: { help: "Your six-character code from the Federal Student Aid school code list." } },
    codeNote: { type: "textarea", label: "Code note", metadata: { help: "A line under the code. Leave blank to hide it." } },
    helpText: { type: "textarea", label: "Help text", metadata: { help: "Who to contact with questions. Leave blank to hide it." } },
    helpEmail: { type: "text", label: "Help email" },
    helpPhone: { type: "text", label: "Help phone" },
    source: { type: "text", label: "Source line", metadata: { help: "Where federal dates come from, such as Federal dates: StudentAid.gov. Leave blank to hide it." } },
  },
  defaultProps: {
    eyebrow: "Financial aid",
    heading: "Five steps to your aid offer",
    headingLevel: "h2",
    intro: "Most Northfield students receive some form of grant, scholarship, work-study or loan. It all starts with the FAFSA, and filing early puts you first in line for limited state and university grants.",
    steps: [
      {
        title: "Create your StudentAid.gov account",
        body: "You, and a parent if you're a dependent student, each need an account to sign the FAFSA. Set them up a few days early; identity checks can take time.",
        deadline: "",
        deadlineIso: "",
        linkLabel: "Create an account",
        linkHref: "https://studentaid.gov/fsa-id/create-account/launch",
      },
      {
        title: "Complete the 2027–28 FAFSA",
        body: "Add Northfield using our Federal School Code. Families are asked to consent to share federal tax information directly from the IRS, so most income questions fill themselves in.",
        deadline: "Northfield priority deadline: December 1, 2026",
        deadlineIso: "2026-12-01",
        linkLabel: "Start the FAFSA",
        linkHref: "https://studentaid.gov/h/apply-for-aid/fafsa",
      },
      {
        title: "Review your FAFSA Submission Summary",
        body: "You'll get it by email a few days after you submit. Check it for errors and your Student Aid Index, and fix anything that's wrong right away.",
        deadline: "",
        deadlineIso: "",
        linkLabel: "",
        linkHref: "",
      },
      {
        title: "Send any documents we request",
        body: "Some students are selected for verification. Watch your Northfield email and the To-Do list in the student portal, and upload what's asked within two weeks.",
        deadline: "",
        deadlineIso: "",
        linkLabel: "Open the student portal",
        linkHref: "/portal/financial-aid",
      },
      {
        title: "Accept your aid offer",
        body: "Admitted students receive offers starting in February. Accept, reduce or decline each item in the portal, and talk to a counselor if your family's situation has changed.",
        deadline: "Accept by May 1, 2027",
        deadlineIso: "2027-05-01",
        linkLabel: "",
        linkHref: "",
      },
    ],
    codeLabel: "Northfield's Federal School Code",
    code: "009876",
    codeNote: "Sample code for this demo. On the FAFSA, you can also search for Northfield State University by name.",
    helpText: "Stuck on a question? A financial aid counselor can walk through the form with you by phone, video or in person.",
    helpEmail: "finaid@northfield.example.edu",
    helpPhone: "(555) 555-0123",
    source: "Federal dates and links: StudentAid.gov, U.S. Department of Education.",
  },
  render: ({ eyebrow, heading, headingLevel, intro, steps, codeLabel, code, codeNote, helpText, helpEmail, helpPhone, source }) => {
    const H = headingLevel || "h2";
    const Sub = childHeading[headingLevel] || "h3";
    const list = (steps ?? []).filter((s) => s?.title);
    const hasAside = Boolean(code || helpText || helpEmail || helpPhone);
    const contactLink =
      "inline-flex min-h-11 max-w-full items-center gap-2 rounded-md text-sm font-semibold text-white underline decoration-neutral-500 underline-offset-4 hover:decoration-white focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-white";

    return (
      <section className="bg-white px-4 py-16 sm:px-6 sm:py-20 lg:px-8 lg:py-24">
        <div className="mx-auto grid max-w-7xl grid-cols-1 gap-12 lg:grid-cols-12 lg:gap-16">
          <div className={hasAside ? "lg:col-span-7" : "lg:col-span-10"}>
            {eyebrow ? <p className="text-sm font-semibold tracking-wide text-indigo-700 uppercase">{eyebrow}</p> : null}
            {heading ? (
              <H className={`text-3xl font-semibold tracking-tight text-balance text-neutral-950 sm:text-4xl lg:text-5xl ${eyebrow ? "mt-3" : ""}`}>{heading}</H>
            ) : null}
            {intro ? <p className="mt-5 text-lg leading-8 text-pretty text-neutral-600">{intro}</p> : null}

            {list.length ? (
              <ol role="list" className={eyebrow || heading || intro ? "mt-10 sm:mt-12" : ""}>
                {list.map((step, i) => {
                  const iso = isoPattern.test(step.deadlineIso || "") ? step.deadlineIso.slice(0, 10) : "";
                  const last = i === list.length - 1;
                  return (
                    <li key={`${step.title}-${i}`} className="relative flex gap-5 pb-10 last:pb-0 sm:gap-6">
                      {!last ? <span aria-hidden="true" className="absolute top-12 bottom-0 left-5 w-px bg-neutral-200" /> : null}
                      <span
                        aria-hidden="true"
                        className="relative grid size-10 shrink-0 place-items-center rounded-full bg-indigo-600 text-base font-semibold text-white tabular-nums ring-4 ring-white"
                      >
                        {i + 1}
                      </span>
                      <div className="min-w-0 flex-1 pt-1.5">
                        <Sub className="text-lg leading-7 font-semibold tracking-tight text-balance text-neutral-950 sm:text-xl">
                          <span className="sr-only">Step {i + 1}: </span>
                          {step.title}
                        </Sub>
                        {step.body ? <p className="mt-2 text-base leading-7 text-pretty text-neutral-600">{step.body}</p> : null}
                        {step.deadline || step.linkLabel ? (
                          <div className="mt-3 flex flex-col items-start gap-x-6 gap-y-2 sm:flex-row sm:flex-wrap sm:items-center">
                            {step.deadline ? (
                              <p className="inline-flex items-center gap-2 rounded-lg bg-indigo-50 px-3 py-1.5 text-sm font-semibold text-indigo-900 ring-1 ring-indigo-600/15 ring-inset">
                                <svg aria-hidden="true" viewBox="0 0 20 20" fill="currentColor" className="size-4 shrink-0 text-indigo-700">
                                  <path fillRule="evenodd" d="M5.75 2a.75.75 0 0 1 .75.75V4h7V2.75a.75.75 0 0 1 1.5 0V4h.25A2.75 2.75 0 0 1 18 6.75v8.5A2.75 2.75 0 0 1 15.25 18H4.75A2.75 2.75 0 0 1 2 15.25v-8.5A2.75 2.75 0 0 1 4.75 4H5V2.75A.75.75 0 0 1 5.75 2Zm-1 5.5c-.69 0-1.25.56-1.25 1.25v6.5c0 .69.56 1.25 1.25 1.25h10.5c.69 0 1.25-.56 1.25-1.25v-6.5c0-.69-.56-1.25-1.25-1.25H4.75Z" clipRule="evenodd" />
                                </svg>
                                {iso ? <time dateTime={iso}>{step.deadline}</time> : step.deadline}
                              </p>
                            ) : null}
                            {step.linkLabel ? (
                              <a
                                href={step.linkHref || "#"}
                                className="group inline-flex min-h-11 items-center gap-1.5 rounded-md text-sm font-semibold text-indigo-700 hover:text-indigo-900 focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-indigo-600"
                              >
                                {step.linkLabel}
                                <svg aria-hidden="true" viewBox="0 0 20 20" fill="currentColor" className="size-4 transition motion-safe:group-hover:translate-x-0.5">
                                  <path fillRule="evenodd" d="M3 10a.75.75 0 0 1 .75-.75h10.64l-3.22-3.22a.75.75 0 1 1 1.06-1.06l4.5 4.5a.75.75 0 0 1 0 1.06l-4.5 4.5a.75.75 0 1 1-1.06-1.06l3.22-3.22H3.75A.75.75 0 0 1 3 10Z" clipRule="evenodd" />
                                </svg>
                              </a>
                            ) : null}
                          </div>
                        ) : null}
                      </div>
                    </li>
                  );
                })}
              </ol>
            ) : null}
            {source ? <p className="mt-10 text-xs leading-5 text-neutral-600">{source}</p> : null}
          </div>

          {hasAside ? (
            <aside aria-label={codeLabel || "Financial aid help"} className="lg:col-span-5">
              <div className="space-y-4 lg:sticky lg:top-8">
                {code ? (
                  <div className="relative overflow-hidden rounded-2xl bg-indigo-50 p-6 ring-1 ring-indigo-600/15 sm:p-8">
                    <svg aria-hidden="true" viewBox="0 0 200 200" className="absolute -top-10 -right-10 size-48 text-indigo-100">
                      <circle cx="100" cy="100" r="96" fill="none" stroke="currentColor" strokeWidth="2" />
                      <circle cx="100" cy="100" r="70" fill="none" stroke="currentColor" strokeWidth="2" />
                      <circle cx="100" cy="100" r="44" fill="none" stroke="currentColor" strokeWidth="2" />
                    </svg>
                    <p className="relative text-sm font-semibold text-indigo-900">{codeLabel || "Federal School Code"}</p>
                    <p className="relative mt-3 font-mono text-4xl font-semibold tracking-widest break-all text-neutral-950 sm:text-5xl">{code}</p>
                    {codeNote ? <p className="relative mt-4 text-sm leading-6 text-pretty text-neutral-700">{codeNote}</p> : null}
                  </div>
                ) : null}
                {helpText || helpEmail || helpPhone ? (
                  <div className="rounded-2xl bg-neutral-950 p-6 sm:p-8">
                    {helpText ? <p className="text-base leading-7 text-pretty text-neutral-200">{helpText}</p> : null}
                    {helpEmail || helpPhone ? (
                      <ul role="list" className={helpText ? "mt-4" : ""}>
                        {helpEmail ? (
                          <li>
                            <a href={`mailto:${helpEmail}`} className={`${contactLink} break-all`}>
                              {helpEmail}
                            </a>
                          </li>
                        ) : null}
                        {helpPhone ? (
                          <li>
                            <a href={`tel:${helpPhone.replace(/[^0-9+]/g, "")}`} className={contactLink}>
                              {helpPhone}
                            </a>
                          </li>
                        ) : null}
                      </ul>
                    ) : null}
                  </div>
                ) : null}
              </div>
            </aside>
          ) : null}
        </div>
      </section>
    );
  },
};
```
