{
  "id": "editorial-accordion",
  "kind": "element",
  "title": "Editorial accordion",
  "summary": "Big numbered rows that open to reveal a short text and a drawn glyph, with a smooth height animation and no measuring.",
  "url": "https://enrichr.dev/elements/editorial-accordion.html",
  "section": "text",
  "techniques": [
    "reveal"
  ],
  "stack": [
    "Vanilla JS",
    "CSS"
  ],
  "frameworks": [
    "React",
    "Next.js",
    "Vanilla"
  ],
  "mood": [
    "editorial",
    "confident"
  ],
  "intents": [
    "animated accordion",
    "FAQ accordion with smooth height",
    "expanding list rows",
    "collapsible sections with big type",
    "accessible accordion component"
  ],
  "status": "tested",
  "params": [
    {
      "key": "items",
      "label": "Items (Title: text, separated by |)",
      "type": "text",
      "value": "Explore: Look closer at the movement, rhythm and structure behind a page you remember. | Experiment: Change the timing, push the shape, and make a small interaction feel like your own. | Build: Turn the idea into a component you can reuse, then sweat the details."
    },
    {
      "key": "single",
      "label": "Open rows",
      "type": "select",
      "options": [
        [
          "1",
          "One at a time"
        ],
        [
          "0",
          "Many at once"
        ]
      ],
      "value": "1"
    },
    {
      "key": "open",
      "label": "Row open at start (0 = none)",
      "type": "range",
      "min": 0,
      "max": 5,
      "step": 1,
      "value": 1
    },
    {
      "key": "duration",
      "label": "Duration (ms)",
      "type": "range",
      "min": 0,
      "max": 1500,
      "step": 50,
      "value": 650
    },
    {
      "key": "accent",
      "label": "Accent colour",
      "type": "color",
      "value": "#e6ff55"
    },
    {
      "key": "background",
      "label": "Background",
      "type": "color",
      "value": "#0c1e18"
    },
    {
      "key": "ink",
      "label": "Text colour",
      "type": "color",
      "value": "#fbf8f1"
    }
  ],
  "license": "Free to use in personal and client projects during the preview. Final licence terms will be published here before any paid tier starts; ask before reselling the code as a collection.",
  "contract": "function mount(root, opts) -> { update(partialOpts), destroy() }; root must contain the element markup",
  "exports": {
    "claude": "Add the \"Editorial accordion\" element to this project.\n\nThis is the \"Editorial accordion\" element from the Enrichr Library: Big numbered rows that open to reveal a short text and a drawn glyph, with a smooth height animation and no measuring.\nPage: https://enrichr.dev/elements/editorial-accordion.html\nMachine-readable spec: https://enrichr.dev/elements/editorial-accordion.json\n\nElement contract (vanilla JavaScript, no dependencies):\n- The JavaScript defines a function mount(root, opts).\n- root is an empty container element. Set root.innerHTML to the markup first, then call mount(root, opts).\n- It returns an object with update(partialOpts) and destroy(). Call destroy() when the element is removed. Some elements also return replay().\n- The CSS classes all start with \"ef-\" so they will not collide with your styles.\n\nSteps:\n1. Look at the project first to see its framework and where components, styles and static files live. Follow its conventions.\n2. Fetch https://enrichr.dev/elements/editorial-accordion.json if you can read URLs (fields: source.markup, source.css, source.js, params); otherwise use the source at the end of this message.\n3. Add the files, mount it where I tell you (default: the top of the home page), and pass the settings below as the opts.\n4. Keep the behaviour of the source unchanged. Do not add dependencies. Respect prefers-reduced-motion. Keep text as real HTML.\n5. Run the dev server and check it. with reduced motion on, nothing moves; it works at 375px wide and with touch only; there are no console errors; scrolling stays smooth; destroy() is called when it unmounts.\n\nSettings:\n{{SETTINGS}}\n\nSource:\n{{CODE}}",
    "chatgpt": "I want the \"Editorial accordion\" element on my website. Below is its complete source. Please:\n1. Build one self-contained index.html that I can open locally to see it working (put the CSS in a <style> tag and the JavaScript in a <script> tag, with the markup in the body).\n2. Then explain, step by step, which parts go where in my own site, and how to mount it. My stack is: [tell me yours, or say \"plain HTML\"].\n3. Keep the behaviour of the source unchanged. Do not add dependencies. Respect prefers-reduced-motion. Keep text as real HTML.\n\nThis is the \"Editorial accordion\" element from the Enrichr Library: Big numbered rows that open to reveal a short text and a drawn glyph, with a smooth height animation and no measuring.\nPage: https://enrichr.dev/elements/editorial-accordion.html\nMachine-readable spec: https://enrichr.dev/elements/editorial-accordion.json\n\nElement contract (vanilla JavaScript, no dependencies):\n- The JavaScript defines a function mount(root, opts).\n- root is an empty container element. Set root.innerHTML to the markup first, then call mount(root, opts).\n- It returns an object with update(partialOpts) and destroy(). Call destroy() when the element is removed. Some elements also return replay().\n- The CSS classes all start with \"ef-\" so they will not collide with your styles.\n\nSettings:\n{{SETTINGS}}\n\nSource:\n{{CODE}}\n\nVerify: with reduced motion on, nothing moves; it works at 375px wide and with touch only; there are no console errors; scrolling stays smooth; destroy() is called when it unmounts.",
    "cursor": "Add the \"Editorial accordion\" element to this codebase.\n\nThis is the \"Editorial accordion\" element from the Enrichr Library: Big numbered rows that open to reveal a short text and a drawn glyph, with a smooth height animation and no measuring.\nPage: https://enrichr.dev/elements/editorial-accordion.html\nMachine-readable spec: https://enrichr.dev/elements/editorial-accordion.json\n\nElement contract (vanilla JavaScript, no dependencies):\n- The JavaScript defines a function mount(root, opts).\n- root is an empty container element. Set root.innerHTML to the markup first, then call mount(root, opts).\n- It returns an object with update(partialOpts) and destroy(). Call destroy() when the element is removed. Some elements also return replay().\n- The CSS classes all start with \"ef-\" so they will not collide with your styles.\n\nUse Composer / agent mode. First search the repo for how components, styles and scripts are organised, then add the files in the matching places, mount it on the page I name, and run the app to confirm it works. Keep the behaviour of the source unchanged. Do not add dependencies. Respect prefers-reduced-motion. Keep text as real HTML.\n\nSettings:\n{{SETTINGS}}\n\nSource:\n{{CODE}}\n\nVerify: with reduced motion on, nothing moves; it works at 375px wide and with touch only; there are no console errors; scrolling stays smooth; destroy() is called when it unmounts.\n\nOptional: save this as .cursor/rules/enrichr-editorial-accordion.mdc so the rule stays with the project:\n---\ndescription: How to use the Enrichr Editorial accordion element\nalwaysApply: false\n---\nmount(root, opts) expects the element markup inside root and returns { update, destroy }. Always call destroy() on unmount and never edit the ef- class names.",
    "v0": "Create a Next.js (App Router) client component for the \"Editorial accordion\" element. Tailwind is available but this component needs no utility classes.\n\nThis is the \"Editorial accordion\" element from the Enrichr Library: Big numbered rows that open to reveal a short text and a drawn glyph, with a smooth height animation and no measuring.\nPage: https://enrichr.dev/elements/editorial-accordion.html\nMachine-readable spec: https://enrichr.dev/elements/editorial-accordion.json\n\nElement contract (vanilla JavaScript, no dependencies):\n- The JavaScript defines a function mount(root, opts).\n- root is an empty container element. Set root.innerHTML to the markup first, then call mount(root, opts).\n- It returns an object with update(partialOpts) and destroy(). Call destroy() when the element is removed. Some elements also return replay().\n- The CSS classes all start with \"ef-\" so they will not collide with your styles.\n\nFiles to create:\n- editorial-accordion.js : the JavaScript below, with one line appended at the end: export { mount };  (and the markup exported as: export const markup = \"<the markup string>\";). If the project uses TypeScript and does not allow JS imports, put // @ts-nocheck on the first line.\n- the CSS below goes in your global stylesheet (or a plain .css file imported once at the app root). The class names are global and start with ef-.\n\nUse this component as the wrapper (adjust the import paths):\n```tsx\n\"use client\";\nimport { useEffect, useRef } from \"react\";\nimport { markup, mount } from \"./editorial-accordion\"; // markup is the HTML string; mount is the JavaScript's mount function\n\nexport default function EditorialAccordion(props: Record<string, unknown>) {\n  const ref = useRef<HTMLDivElement>(null);\n  const fx = useRef<{ update: (o: object) => void; destroy: () => void } | null>(null);\n  useEffect(() => {\n    const root = ref.current;\n    if (!root) return;\n    root.innerHTML = markup;\n    fx.current = mount(root, props);\n    return () => { fx.current?.destroy(); fx.current = null; root.innerHTML = \"\"; };\n  }, []);\n  useEffect(() => { fx.current?.update(props); }, [JSON.stringify(props)]);\n  return <div ref={ref} />;\n}\n```\n\nRender it on the home page so I can see it. Keep the behaviour of the source unchanged. Do not add dependencies. Respect prefers-reduced-motion. Keep text as real HTML.\n\nSettings:\n{{SETTINGS}}\n\nSource:\n{{CODE}}",
    "lovable": "Add the \"Editorial accordion\" element to this React + Vite + TypeScript + Tailwind project. Do not install any packages.\n\nThis is the \"Editorial accordion\" element from the Enrichr Library: Big numbered rows that open to reveal a short text and a drawn glyph, with a smooth height animation and no measuring.\nPage: https://enrichr.dev/elements/editorial-accordion.html\nMachine-readable spec: https://enrichr.dev/elements/editorial-accordion.json\n\nElement contract (vanilla JavaScript, no dependencies):\n- The JavaScript defines a function mount(root, opts).\n- root is an empty container element. Set root.innerHTML to the markup first, then call mount(root, opts).\n- It returns an object with update(partialOpts) and destroy(). Call destroy() when the element is removed. Some elements also return replay().\n- The CSS classes all start with \"ef-\" so they will not collide with your styles.\n\nFiles to create:\n- editorial-accordion.js : the JavaScript below, with one line appended at the end: export { mount };  (and the markup exported as: export const markup = \"<the markup string>\";). If the project uses TypeScript and does not allow JS imports, put // @ts-nocheck on the first line.\n- the CSS below goes in your global stylesheet (or a plain .css file imported once at the app root). The class names are global and start with ef-.\n\nWrapper component (src/components/EditorialAccordion.tsx):\n```tsx\n\"use client\";\nimport { useEffect, useRef } from \"react\";\nimport { markup, mount } from \"./editorial-accordion\"; // markup is the HTML string; mount is the JavaScript's mount function\n\nexport default function EditorialAccordion(props: Record<string, unknown>) {\n  const ref = useRef<HTMLDivElement>(null);\n  const fx = useRef<{ update: (o: object) => void; destroy: () => void } | null>(null);\n  useEffect(() => {\n    const root = ref.current;\n    if (!root) return;\n    root.innerHTML = markup;\n    fx.current = mount(root, props);\n    return () => { fx.current?.destroy(); fx.current = null; root.innerHTML = \"\"; };\n  }, []);\n  useEffect(() => { fx.current?.update(props); }, [JSON.stringify(props)]);\n  return <div ref={ref} />;\n}\n```\n\nRemove the \"use client\" line if it is not needed. Show it on the home page. Keep the behaviour of the source unchanged. Do not add dependencies. Respect prefers-reduced-motion. Keep text as real HTML.\n\nSettings:\n{{SETTINGS}}\n\nSource:\n{{CODE}}",
    "bolt": "Create a small Vite project (vanilla JavaScript, no framework unless I already have one) that shows the \"Editorial accordion\" element.\n\nThis is the \"Editorial accordion\" element from the Enrichr Library: Big numbered rows that open to reveal a short text and a drawn glyph, with a smooth height animation and no measuring.\nPage: https://enrichr.dev/elements/editorial-accordion.html\nMachine-readable spec: https://enrichr.dev/elements/editorial-accordion.json\n\nElement contract (vanilla JavaScript, no dependencies):\n- The JavaScript defines a function mount(root, opts).\n- root is an empty container element. Set root.innerHTML to the markup first, then call mount(root, opts).\n- It returns an object with update(partialOpts) and destroy(). Call destroy() when the element is removed. Some elements also return replay().\n- The CSS classes all start with \"ef-\" so they will not collide with your styles.\n\nFiles: index.html (a container element, then a script tag), style.css (the CSS below), editorial-accordion.js (the JavaScript below) and main.js that sets the container's innerHTML to the markup and calls mount(container, opts) with the settings below. Keep the behaviour of the source unchanged. Do not add dependencies. Respect prefers-reduced-motion. Keep text as real HTML.\n\nSettings:\n{{SETTINGS}}\n\nSource:\n{{CODE}}\n\nVerify: with reduced motion on, nothing moves; it works at 375px wide and with touch only; there are no console errors; scrolling stays smooth; destroy() is called when it unmounts.",
    "replit": "Create a new HTML, CSS and JavaScript Repl that shows the \"Editorial accordion\" element. No packages, no server code.\n\nThis is the \"Editorial accordion\" element from the Enrichr Library: Big numbered rows that open to reveal a short text and a drawn glyph, with a smooth height animation and no measuring.\nPage: https://enrichr.dev/elements/editorial-accordion.html\nMachine-readable spec: https://enrichr.dev/elements/editorial-accordion.json\n\nElement contract (vanilla JavaScript, no dependencies):\n- The JavaScript defines a function mount(root, opts).\n- root is an empty container element. Set root.innerHTML to the markup first, then call mount(root, opts).\n- It returns an object with update(partialOpts) and destroy(). Call destroy() when the element is removed. Some elements also return replay().\n- The CSS classes all start with \"ef-\" so they will not collide with your styles.\n\nFiles: index.html (a container element, link style.css, load editorial-accordion.js and then main.js), style.css (the CSS below), editorial-accordion.js (the JavaScript below), main.js (sets the container's innerHTML to the markup, then calls mount(container, opts) with the settings below). Press Run to preview. Keep the behaviour of the source unchanged. Do not add dependencies. Respect prefers-reduced-motion. Keep text as real HTML.\n\nSettings:\n{{SETTINGS}}\n\nSource:\n{{CODE}}",
    "figma": "Designer handoff notes for the \"Editorial accordion\" element (Enrichr Library). Figma cannot run this JavaScript inside a design file, so use it as a motion reference and hand the code to a developer.\n\nThis is the \"Editorial accordion\" element from the Enrichr Library: Big numbered rows that open to reveal a short text and a drawn glyph, with a smooth height animation and no measuring.\nPage: https://enrichr.dev/elements/editorial-accordion.html\nMachine-readable spec: https://enrichr.dev/elements/editorial-accordion.json\n\nWhat it does: Each panel is a one-column CSS grid whose single row animates from 0fr to 1fr, with the content inside set to min-height: 0 and overflow: hidden. The browser animates to the content's natural height without any JavaScript measuring, so it stays right when text wraps or fonts load. The content slides up and fades in a beat after the panel starts opening, and the glyph springs in on an overshooting curve. The plus icon is two bars, one of which rotates flat to make the minus. In one-at-a-time mode opening a row closes the others.\nAccessibility: Each header is a real button inside a heading, with aria-expanded and aria-controls, and each panel is a region labelled by its button. Closed panels become visibility: hidden after their transition, so their content leaves the tab order and the accessibility tree. Up and Down arrows, Home and End move between headers. With prefers-reduced-motion rows open instantly.\n\nTunable settings:\n- Items (Title: text, separated by |): text, default Explore: Look closer at the movement, rhythm and structure behind a page you remember. | Experiment: Change the timing, push the shape, and make a small interaction feel like your own. | Build: Turn the idea into a component you can reuse, then sweat the details.\n- Open rows: select (One at a time / Many at once), default 1\n- Row open at start (0 = none): range 0 to 5, step 1, default 1\n- Duration (ms): range 0 to 1500, step 50, default 650\n- Accent colour: color, default #e6ff55\n- Background: color, default #0c1e18\n- Text colour: color, default #fbf8f1\n\nCurrent settings:\n{{SETTINGS}}\n\nFor the developer: Element contract (vanilla JavaScript, no dependencies):\n- The JavaScript defines a function mount(root, opts).\n- root is an empty container element. Set root.innerHTML to the markup first, then call mount(root, opts).\n- It returns an object with update(partialOpts) and destroy(). Call destroy() when the element is removed. Some elements also return replay().\n- The CSS classes all start with \"ef-\" so they will not collide with your styles.\n\nIn Figma:\n- Draw the resting state as a frame and the end state as a second frame; link them with Smart Animate to show the motion in a prototype.\n- Put the settings above in the frame's notes or Dev Mode annotations so the developer matches them.\n- Link https://enrichr.dev/elements/editorial-accordion.html in the handoff: the live demo and the copy-ready code are there. Developers can paste the prompts for Claude, Cursor or v0 from the Export menu.\nNothing is copied from another designer's file; this is original code from Enrichr.",
    "framer": "Add the \"Editorial accordion\" element to Framer as a code component. Framer code components are React, so wrap the vanilla code like this. Check it in the Framer editor, as Framer's component API can change.\n\nThis is the \"Editorial accordion\" element from the Enrichr Library: Big numbered rows that open to reveal a short text and a drawn glyph, with a smooth height animation and no measuring.\nPage: https://enrichr.dev/elements/editorial-accordion.html\nMachine-readable spec: https://enrichr.dev/elements/editorial-accordion.json\n\nElement contract (vanilla JavaScript, no dependencies):\n- The JavaScript defines a function mount(root, opts).\n- root is an empty container element. Set root.innerHTML to the markup first, then call mount(root, opts).\n- It returns an object with update(partialOpts) and destroy(). Call destroy() when the element is removed. Some elements also return replay().\n- The CSS classes all start with \"ef-\" so they will not collide with your styles.\n\n1. In Framer: Assets > Code > New component. Name it EditorialAccordion.\n2. Paste the JavaScript below into a separate code file named editorial-accordion.js in the same project, with  export { mount };  and  export const markup = \"<the markup string>\";  added. Put the CSS into the component as a <style> tag.\n3. Component:\n```tsx\nimport { addPropertyControls, ControlType } from \"framer\"\nimport { useEffect, useRef } from \"react\";\nimport { markup, mount } from \"./editorial-accordion\"; // markup is the HTML string; mount is the JavaScript's mount function\n\nexport default function EditorialAccordion(props: any) {\n  const ref = useRef<HTMLDivElement>(null);\n  const fx = useRef<{ update: (o: object) => void; destroy: () => void } | null>(null);\n  useEffect(() => {\n    const root = ref.current;\n    if (!root) return;\n    root.innerHTML = markup;\n    fx.current = mount(root, props);\n    return () => { fx.current?.destroy(); fx.current = null; root.innerHTML = \"\"; };\n  }, []);\n  useEffect(() => { fx.current?.update(props); }, [JSON.stringify(props)]);\n  return <div ref={ref} />;\n}\n\naddPropertyControls(EditorialAccordion, {\n  items: { type: ControlType.String, title: \"Items (Title: text, separated by |)\", defaultValue: \"Explore: Look closer at the movement, rhythm and structure behind a page you remember. | Experiment: Change the timing, push the shape, and make a small interaction feel like your own. | Build: Turn the idea into a component you can reuse, then sweat the details.\" },\n  single: { type: ControlType.Enum, title: \"Open rows\", options: [\"1\",\"0\"], optionTitles: [\"One at a time\",\"Many at once\"], defaultValue: \"1\" },\n  open: { type: ControlType.Number, title: \"Row open at start\", min: 0, max: 5, step: 1, defaultValue: 1 },\n  duration: { type: ControlType.Number, title: \"Duration\", min: 0, max: 1500, step: 50, defaultValue: 650 },\n  accent: { type: ControlType.Color, title: \"Accent colour\", defaultValue: \"#e6ff55\" },\n  background: { type: ControlType.Color, title: \"Background\", defaultValue: \"#0c1e18\" },\n  ink: { type: ControlType.Color, title: \"Text colour\", defaultValue: \"#fbf8f1\" },\n})\n```\n4. Keep the behaviour of the source unchanged. Do not add dependencies. Respect prefers-reduced-motion. Keep text as real HTML.\n\nSettings:\n{{SETTINGS}}\n\nSource:\n{{CODE}}",
    "webflow": "Add the \"Editorial accordion\" element to a Webflow site with an Embed element. Test it on the published or preview site: scripts in embeds may not run inside the Designer canvas.\n\nThis is the \"Editorial accordion\" element from the Enrichr Library: Big numbered rows that open to reveal a short text and a drawn glyph, with a smooth height animation and no measuring.\nPage: https://enrichr.dev/elements/editorial-accordion.html\nMachine-readable spec: https://enrichr.dev/elements/editorial-accordion.json\n\nElement contract (vanilla JavaScript, no dependencies):\n- The JavaScript defines a function mount(root, opts).\n- root is an empty container element. Set root.innerHTML to the markup first, then call mount(root, opts).\n- It returns an object with update(partialOpts) and destroy(). Call destroy() when the element is removed. Some elements also return replay().\n- The CSS classes all start with \"ef-\" so they will not collide with your styles.\n\n1. Add an Embed element where it should appear. Paste a <style> block with the CSS, one container <div id=\"enrichr-editorial-accordion\"></div>, and a <script> block with the JavaScript followed by:\n   mount(document.getElementById(\"enrichr-editorial-accordion\"), { ...your settings... });\n   (set the container's innerHTML to the markup first, as in the contract).\n2. Embed elements have a size limit (check Webflow's current number). If the code is longer, host the JS and CSS as files and link them from Custom code in the page settings, then keep only the container and the mount call in the Embed.\n3. Keep the behaviour of the source unchanged. Do not add dependencies. Respect prefers-reduced-motion. Keep text as real HTML.\n\nSettings:\n{{SETTINGS}}\n\nSource:\n{{CODE}}"
  },
  "exportTools": [
    "claude",
    "chatgpt",
    "cursor",
    "v0",
    "lovable",
    "bolt",
    "replit",
    "figma",
    "framer",
    "webflow"
  ],
  "accessibility": "Each header is a real button inside a heading, with aria-expanded and aria-controls, and each panel is a region labelled by its button. Closed panels become visibility: hidden after their transition, so their content leaves the tab order and the accessibility tree. Up and Down arrows, Home and End move between headers. With prefers-reduced-motion rows open instantly.",
  "performance": "Only CSS transitions run; the script toggles a class and an attribute. Animating grid rows causes layout inside the accordion while it moves, which is cheap for a handful of rows, and nothing runs at rest.",
  "dependencies": [],
  "source": {
    "markup": "<div class=\"ef-eda\">\n  <div class=\"ef-eda__list\"></div>\n</div>",
    "css": "/* Enrichr Library · https://enrichr.dev */\n.ef-eda { --ef-eda-bg: #0c1e18; --ef-eda-acc: #e6ff55; --ef-eda-ink: #fbf8f1; --ef-eda-d: 650ms; --ef-eda-e: cubic-bezier(0.65, 0, 0.35, 1); width: 100%; box-sizing: border-box; padding: 0.5rem 1.4rem; border-radius: 1rem; background: var(--ef-eda-bg); color: var(--ef-eda-ink); font-family: \"Helvetica Neue\", Arial, \"Segoe UI\", system-ui, sans-serif; container-type: inline-size; }\n.ef-eda__item { border-top: 1px solid color-mix(in srgb, var(--ef-eda-ink) 22%, transparent); }\n.ef-eda__item:last-child { border-bottom: 1px solid color-mix(in srgb, var(--ef-eda-ink) 22%, transparent); }\n.ef-eda__h { margin: 0; font: inherit; }\n.ef-eda__btn { display: flex; align-items: center; gap: 1.2rem; width: 100%; padding: 1.1rem 0; border: 0; background: none; color: inherit; font: inherit; text-align: left; cursor: pointer; transition: color 300ms; }\n.ef-eda__n { flex: none; font: 600 0.72rem/1 ui-monospace, \"SFMono-Regular\", Menlo, monospace; letter-spacing: 0.1em; opacity: 0.7; }\n.ef-eda__t { font-size: clamp(1.8rem, 8cqi, 4.6rem); font-weight: 800; line-height: 1; letter-spacing: -0.05em; }\n.ef-eda__ico { position: relative; flex: none; margin-left: auto; width: 1.6rem; height: 1.6rem; }\n.ef-eda__ico::before, .ef-eda__ico::after { content: \"\"; position: absolute; left: 0; top: 50%; width: 100%; height: 2px; margin-top: -1px; background: currentColor; transition: transform var(--ef-eda-d) var(--ef-eda-e); }\n.ef-eda__ico::after { transform: rotate(90deg); }\n.ef-eda__btn[aria-expanded=\"true\"] { color: var(--ef-eda-acc); }\n.ef-eda__btn[aria-expanded=\"true\"] .ef-eda__ico::after { transform: rotate(0deg); }\n.ef-eda__btn[aria-expanded=\"true\"] .ef-eda__ico::before { transform: rotate(180deg); }\n.ef-eda__btn:hover .ef-eda__t { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 0.12em; }\n.ef-eda__btn:focus-visible { outline: 3px solid var(--ef-eda-acc); outline-offset: 4px; border-radius: 4px; }\n.ef-eda__panel { display: grid; grid-template-rows: 0fr; visibility: hidden; transition: grid-template-rows var(--ef-eda-d) var(--ef-eda-e), visibility 0s linear var(--ef-eda-d); }\n.ef-eda__panel.is-open { grid-template-rows: 1fr; visibility: visible; transition: grid-template-rows var(--ef-eda-d) var(--ef-eda-e), visibility 0s; }\n.ef-eda__inner { min-height: 0; overflow: hidden; }\n.ef-eda__body { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; padding: 0 0 1.6rem 2.6rem; opacity: 0; transform: translateY(1.2rem); transition: opacity calc(var(--ef-eda-d) * 0.5) ease, transform calc(var(--ef-eda-d) * 0.7) var(--ef-eda-e); }\n.ef-eda__panel.is-open .ef-eda__body { opacity: 1; transform: none; transition-delay: calc(var(--ef-eda-d) * 0.25); }\n.ef-eda__p { margin: 0; max-width: 34ch; font-size: clamp(1rem, 2.6cqi, 1.3rem); line-height: 1.5; opacity: 0.85; }\n.ef-eda__glyph { flex: none; width: clamp(4rem, 16cqi, 8.5rem); height: auto; color: var(--ef-eda-acc); transform: rotate(-90deg) scale(0.4); transition: transform var(--ef-eda-d) cubic-bezier(0.34, 1.56, 0.64, 1); }\n.ef-eda__panel.is-open .ef-eda__glyph { transform: none; transition-delay: calc(var(--ef-eda-d) * 0.2); }\n@container (max-width: 30rem) { .ef-eda__body { padding-left: 0; } .ef-eda__glyph { width: 3.5rem; } }\n@media (prefers-reduced-motion: reduce) { .ef-eda { --ef-eda-d: 0ms; } .ef-eda__body, .ef-eda__glyph { transform: none; } }",
    "js": "// Enrichr Library · https://enrichr.dev\n// Editorial accordion: big numbered rows that open to reveal a short text and a drawn glyph. The panel height animates with\n// the CSS grid-template-rows 0fr to 1fr trick, so there is no height measuring, and the content slides up a beat later.\n// Closed panels are visibility: hidden, which takes their content out of the tab order and the accessibility tree.\n// Headers are real buttons with aria-expanded and aria-controls; arrow keys, Home and End move between them.\n// mount(root, { items (\"Title: text\" pairs separated by |), single (\"1\" = one open at a time, \"0\" = many), open (row to open first, 0 = none),\n//               duration (ms), accent, background, ink })\nfunction mount(root, o) {\n  var list = root.querySelector(\".ef-eda__list\");\n  var box = root.querySelector(\".ef-eda\");\n  var uid = \"ef-eda-\" + Math.random().toString(36).slice(2, 8);\n  var opts = {}, rows = [], offs = [];\n  var NS = \"http://www.w3.org/2000/svg\";\n  var GLYPHS = [\n    '<g stroke-width=\"11\" stroke-linecap=\"round\"><path d=\"M50 8V92M8 50H92M20 20L80 80M80 20L20 80\"/></g>',\n    '<circle cx=\"50\" cy=\"50\" r=\"40\" fill=\"none\" stroke-width=\"8\"/><path d=\"M50 10a40 40 0 0 1 0 80z\" stroke=\"none\" fill=\"currentColor\"/>',\n    '<path d=\"M22 78L78 22M36 22h42v42\" fill=\"none\" stroke-width=\"11\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/>',\n    '<circle cx=\"50\" cy=\"50\" r=\"40\" fill=\"none\" stroke-width=\"7\"/><circle cx=\"50\" cy=\"50\" r=\"22\" fill=\"none\" stroke-width=\"7\"/><circle cx=\"50\" cy=\"50\" r=\"6\" stroke=\"none\" fill=\"currentColor\"/>',\n    '<path d=\"M50 6L94 50L50 94L6 50Z\" fill=\"none\" stroke-width=\"8\" stroke-linejoin=\"round\"/><path d=\"M50 30L70 50L50 70L30 50Z\" stroke=\"none\" fill=\"currentColor\"/>'\n  ];\n  function glyph(i) {\n    var svg = document.createElementNS(NS, \"svg\");\n    svg.setAttribute(\"viewBox\", \"0 0 100 100\"); svg.setAttribute(\"class\", \"ef-eda__glyph\");\n    svg.setAttribute(\"aria-hidden\", \"true\"); svg.setAttribute(\"focusable\", \"false\");\n    svg.setAttribute(\"stroke\", \"currentColor\"); svg.setAttribute(\"fill\", \"none\");\n    svg.innerHTML = GLYPHS[i % GLYPHS.length];\n    return svg;\n  }\n  function parse(str) {\n    return String(str).split(\"|\").map(function (c) {\n      var k = c.indexOf(\":\");\n      return k < 0 ? { t: c.trim(), b: \"\" } : { t: c.slice(0, k).trim(), b: c.slice(k + 1).trim() };\n    }).filter(function (i) { return i.t; }).slice(0, 8);\n  }\n  function set(row, open) {\n    row.btn.setAttribute(\"aria-expanded\", open ? \"true\" : \"false\");\n    row.panel.classList.toggle(\"is-open\", open);\n  }\n  function toggle(i) {\n    var open = rows[i].btn.getAttribute(\"aria-expanded\") !== \"true\";\n    if (open && String(opts.single) === \"1\") rows.forEach(function (r, j) { if (j !== i) set(r, false); });\n    set(rows[i], open);\n  }\n  function build() {\n    list.textContent = \"\";\n    rows = [];\n    var items = parse(opts.items);\n    if (!items.length) items = [{ t: \"Item\", b: \"Add items as Title: text, separated by |\" }];\n    items.forEach(function (it, i) {\n      var sec = document.createElement(\"section\"); sec.className = \"ef-eda__item\";\n      var h = document.createElement(\"h3\"); h.className = \"ef-eda__h\";\n      var btn = document.createElement(\"button\"); btn.type = \"button\"; btn.className = \"ef-eda__btn\";\n      btn.id = uid + \"-b\" + i; btn.setAttribute(\"aria-controls\", uid + \"-p\" + i);\n      var n = document.createElement(\"span\"); n.className = \"ef-eda__n\"; n.setAttribute(\"aria-hidden\", \"true\"); n.textContent = String(i + 1).padStart(2, \"0\");\n      var t = document.createElement(\"span\"); t.className = \"ef-eda__t\"; t.textContent = it.t;\n      var ico = document.createElement(\"span\"); ico.className = \"ef-eda__ico\"; ico.setAttribute(\"aria-hidden\", \"true\");\n      btn.appendChild(n); btn.appendChild(t); btn.appendChild(ico);\n      h.appendChild(btn);\n      var panel = document.createElement(\"div\"); panel.className = \"ef-eda__panel\"; panel.id = uid + \"-p\" + i;\n      panel.setAttribute(\"role\", \"region\"); panel.setAttribute(\"aria-labelledby\", btn.id);\n      var inner = document.createElement(\"div\"); inner.className = \"ef-eda__inner\";\n      var body = document.createElement(\"div\"); body.className = \"ef-eda__body\";\n      var p = document.createElement(\"p\"); p.className = \"ef-eda__p\"; p.textContent = it.b;\n      body.appendChild(p); body.appendChild(glyph(i));\n      inner.appendChild(body); panel.appendChild(inner);\n      sec.appendChild(h); sec.appendChild(panel);\n      list.appendChild(sec);\n      var row = { btn: btn, panel: panel };\n      rows.push(row);\n      btn.addEventListener(\"click\", function () { toggle(i); });\n      set(row, Number(opts.open) === i + 1);\n    });\n  }\n  function onKey(e) {\n    var i = rows.map(function (r) { return r.btn; }).indexOf(document.activeElement);\n    if (i < 0) return;\n    var to = e.key === \"ArrowDown\" ? (i + 1) % rows.length : e.key === \"ArrowUp\" ? (i - 1 + rows.length) % rows.length : e.key === \"Home\" ? 0 : e.key === \"End\" ? rows.length - 1 : -1;\n    if (to < 0) return;\n    e.preventDefault();\n    rows[to].btn.focus();\n  }\n  list.addEventListener(\"keydown\", onKey);\n  offs.push(function () { list.removeEventListener(\"keydown\", onKey); });\n\n  function update(next) {\n    opts = Object.assign({ items: \"Explore: Look closer at the movement, rhythm and structure behind a page you remember. | Experiment: Change the timing, push the shape, and make a small interaction feel like your own. | Build: Turn the idea into a component you can reuse, then sweat the details.\", single: \"1\", open: 1, duration: 650, accent: \"#e6ff55\", background: \"#0c1e18\", ink: \"#fbf8f1\" }, opts, next || {});\n    box.style.setProperty(\"--ef-eda-d\", Math.max(0, Number(opts.duration) || 0) + \"ms\");\n    box.style.setProperty(\"--ef-eda-acc\", opts.accent);\n    box.style.setProperty(\"--ef-eda-bg\", opts.background);\n    box.style.setProperty(\"--ef-eda-ink\", opts.ink);\n    build();\n  }\n  update(o);\n  return { update: update, destroy: function () { offs.forEach(function (f) { f(); }); offs = []; } };\n}"
  }
}