# Add the "Rankings & Accolades" block to this P1 project

Add a Puck component from P1 Blocks (https://p1-blocks.prolificdigital.io/blocks/rankings-accolades) to this Pantheon Content Publisher (P1) Next.js project. Oversized ranking and outcome figures, each with what it measures and a visible source line.

## Steps

1. Create `components/puck/rankings-accolades-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 { rankingsAccoladesBlock } from "./components/puck/rankings-accolades-block";`
3. Register it under `components` as `RankingsAccoladesBlock: rankingsAccoladesBlock`.
4. Add `"RankingsAccoladesBlock"` 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/rankings-accolades-block.tsx`

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

/**
 * Rankings & Accolades — oversized figures (#12, Top 5%) with what they mean and where
 * they come from. Every accolade carries a visible source line. Grid or list layout.
 * Register: `RankingsAccoladesBlock: rankingsAccoladesBlock` in puck.config.tsx.
 */

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

type Accolade = { figure: string; description: string; source: string };

export type RankingsAccoladesProps = {
  eyebrow: string;
  heading: string;
  headingLevel: Heading;
  intro: string;
  accolades: Accolade[];
  layout: "grid" | "list";
  note: string;
};

export const rankingsAccoladesBlock: ComponentConfig<RankingsAccoladesProps> = {
  label: "Rankings & Accolades",
  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" },
    accolades: {
      type: "array",
      label: "Accolades",
      min: 1,
      max: 9,
      getItemSummary: (item) => [item?.figure, item?.description].filter(Boolean).join(" · ").slice(0, 56) || "Accolade",
      defaultItemProps: {
        figure: "#1",
        description: "What this ranking or figure measures",
        source: "Publisher, ranking name, year",
      },
      arrayFields: {
        figure: { type: "text", label: "Figure", metadata: { help: "Keep it short: #12, Top 5%, 94% or 1 of 40." } },
        description: { type: "textarea", label: "What it means" },
        source: {
          type: "text",
          label: "Source",
          metadata: { help: "Required for credibility: who published it and when, such as the ranking's name and edition year. Shown under every accolade." },
        },
      },
    },
    layout: {
      type: "radio",
      label: "Layout",
      options: [
        { label: "Grid", value: "grid" },
        { label: "List", value: "list" },
      ],
      metadata: { help: "Grid suits three to six short accolades. List gives longer descriptions more room." },
    },
    note: { type: "textarea", label: "Footnote", metadata: { help: "Small print under the accolades. Leave blank to hide it." } },
  },
  defaultProps: {
    eyebrow: "Recognition",
    heading: "A public university that punches above its weight",
    headingLevel: "h2",
    intro: "Independent rankings and our own outcomes data tell the same story: Northfield State students get a strong return on a public-university price.",
    accolades: [
      {
        figure: "#12",
        description: "Among public regional universities in the Midwest for undergraduate teaching",
        source: "Regional university rankings, 2026 edition (sample)",
      },
      {
        figure: "Top 5%",
        description: "Nationally for social mobility, enrolling and graduating Pell Grant recipients",
        source: "Social mobility index, 2025 (sample)",
      },
      {
        figure: "94%",
        description: "Of the Class of 2025 employed or in graduate school within six months",
        source: "Northfield State Career Outcomes Survey, Class of 2025 (sample)",
      },
      {
        figure: "16:1",
        description: "Student-to-faculty ratio, with no classes taught by graduate assistants in the major",
        source: "Sample source line. Name your real source and year, such as your IPEDS submission.",
      },
      {
        figure: "3rd",
        description: "Straight year named a Green Campus for energy and water reduction",
        source: "Campus sustainability ratings, 2026 (sample)",
      },
      {
        figure: "$0",
        description: "Tuition for in-state students from families earning under $65,000",
        source: "Northfield Promise program terms, 2026–27 (sample)",
      },
    ],
    layout: "grid",
    note: "Figures shown are sample data for illustration. Replace each one with your institution's current ranking and its published source.",
  },
  render: ({ eyebrow, heading, headingLevel, intro, accolades, layout, note }) => {
    const H = headingLevel || "h2";
    const list = (accolades ?? []).filter((a) => a?.figure);
    const isList = layout === "list";
    const hasHeader = Boolean(eyebrow || heading || intro);
    return (
      <section className="bg-neutral-950 px-4 py-16 sm:px-6 sm:py-20 lg:px-8 lg:py-24">
        <div className="mx-auto max-w-7xl">
          {hasHeader ? (
            <div className="max-w-3xl">
              {eyebrow ? (
                <p className="flex items-center gap-3 text-sm font-semibold tracking-widest text-indigo-300 uppercase">
                  <span aria-hidden="true" className="h-px w-8 bg-indigo-400" />
                  {eyebrow}
                </p>
              ) : null}
              {heading ? (
                <H className={`text-3xl font-semibold tracking-tight text-balance text-white sm:text-4xl lg:text-5xl ${eyebrow ? "mt-4" : ""}`}>{heading}</H>
              ) : null}
              {intro ? <p className="mt-5 max-w-2xl text-lg leading-8 text-pretty text-neutral-300">{intro}</p> : null}
            </div>
          ) : null}
          {list.length ? (
            <ul
              role="list"
              className={`${hasHeader ? "mt-12 sm:mt-16" : ""} ${
                isList
                  ? "divide-y divide-white/10 border-y border-white/10"
                  : "grid gap-px overflow-hidden rounded-2xl bg-white/10 ring-1 ring-white/10 sm:grid-cols-2 lg:grid-cols-3"
              }`}
            >
              {list.map((accolade, i) => (
                <li
                  key={`${accolade.figure}-${i}`}
                  className={
                    isList
                      ? "grid gap-3 py-8 sm:grid-cols-12 sm:items-baseline sm:gap-8 sm:py-10"
                      : "flex flex-col bg-neutral-950 p-6 sm:p-8 lg:p-10"
                  }
                >
                  <p
                    className={`font-semibold tracking-tighter text-white tabular-nums ${
                      isList ? "text-5xl sm:col-span-4 sm:text-6xl lg:col-span-3 lg:text-7xl" : "text-5xl sm:text-6xl"
                    }`}
                  >
                    {accolade.figure}
                  </p>
                  <div className={isList ? "sm:col-span-8 lg:col-span-9" : "mt-4 flex flex-1 flex-col"}>
                    {accolade.description ? (
                      <p className={`leading-7 text-pretty text-neutral-200 ${isList ? "max-w-2xl text-lg" : "mb-6 text-base"}`}>{accolade.description}</p>
                    ) : null}
                    {accolade.source ? (
                      <p className={`flex gap-2 text-sm leading-6 text-neutral-400 ${isList ? "mt-3" : "mt-auto border-t border-white/10 pt-4"}`}>
                        <svg aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" className="mt-1 size-3.5 shrink-0 text-indigo-300">
                          <path d="M3 3.5A1.5 1.5 0 0 1 4.5 2h7A1.5 1.5 0 0 1 13 3.5v10.25a.75.75 0 0 1-1.183.613L8 11.67l-3.817 2.693A.75.75 0 0 1 3 13.75V3.5Z" />
                        </svg>
                        <span>
                          <span className="font-medium text-neutral-300">Source: </span>
                          <cite className="not-italic">{accolade.source}</cite>
                        </span>
                      </p>
                    ) : null}
                  </div>
                </li>
              ))}
            </ul>
          ) : null}
          {note ? <p className="mt-10 max-w-3xl text-sm leading-6 text-pretty text-neutral-400">{note}</p> : null}
        </div>
      </section>
    );
  },
};
```
