{
  "id": "zigzag-section-divider",
  "kind": "element",
  "title": "Zigzag section divider",
  "summary": "Two full-width bands joined by a wide, flat, uniform zigzag edge drawn with one stretched SVG polygon.",
  "url": "https://enrichr.dev/elements/zigzag-section-divider.html",
  "section": "band",
  "techniques": [
    "reveal"
  ],
  "stack": [
    "Vanilla JS",
    "SVG"
  ],
  "frameworks": [
    "React",
    "Next.js",
    "Vanilla"
  ],
  "mood": [
    "bold",
    "playful"
  ],
  "intents": [
    "zigzag section divider",
    "svg zigzag border between sections",
    "jagged edge section separator",
    "sawtooth divider between bands",
    "zigzag edge full width band"
  ],
  "status": "tested",
  "params": [
    {
      "key": "topTitle",
      "label": "Top heading",
      "type": "text",
      "value": "Build the top half"
    },
    {
      "key": "topText",
      "label": "Top text",
      "type": "text",
      "value": "A full-width band, joined to the next one by a wide zigzag edge."
    },
    {
      "key": "bottomTitle",
      "label": "Bottom heading",
      "type": "text",
      "value": "Then the bottom half"
    },
    {
      "key": "bottomText",
      "label": "Bottom text",
      "type": "text",
      "value": "The second band picks up where the teeth leave off."
    },
    {
      "key": "teeth",
      "label": "Teeth",
      "type": "range",
      "min": 1,
      "max": 20,
      "step": 1,
      "value": 5
    },
    {
      "key": "edge",
      "label": "Edge height (px)",
      "type": "range",
      "min": 10,
      "max": 120,
      "step": 2,
      "value": 40
    },
    {
      "key": "top",
      "label": "Top band",
      "type": "color",
      "value": "#005236"
    },
    {
      "key": "bottom",
      "label": "Bottom band",
      "type": "color",
      "value": "#e6ff55"
    },
    {
      "key": "light",
      "label": "Text on the top band",
      "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 \"Zigzag section divider\" element to this project.\n\nThis is the \"Zigzag section divider\" element from the Enrichr Library: Two full-width bands joined by a wide, flat, uniform zigzag edge drawn with one stretched SVG polygon.\nPage: https://enrichr.dev/elements/zigzag-section-divider.html\nMachine-readable spec: https://enrichr.dev/elements/zigzag-section-divider.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/zigzag-section-divider.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 \"Zigzag section divider\" 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 \"Zigzag section divider\" element from the Enrichr Library: Two full-width bands joined by a wide, flat, uniform zigzag edge drawn with one stretched SVG polygon.\nPage: https://enrichr.dev/elements/zigzag-section-divider.html\nMachine-readable spec: https://enrichr.dev/elements/zigzag-section-divider.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 \"Zigzag section divider\" element to this codebase.\n\nThis is the \"Zigzag section divider\" element from the Enrichr Library: Two full-width bands joined by a wide, flat, uniform zigzag edge drawn with one stretched SVG polygon.\nPage: https://enrichr.dev/elements/zigzag-section-divider.html\nMachine-readable spec: https://enrichr.dev/elements/zigzag-section-divider.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-zigzag-section-divider.mdc so the rule stays with the project:\n---\ndescription: How to use the Enrichr Zigzag section divider 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 \"Zigzag section divider\" element. Tailwind is available but this component needs no utility classes.\n\nThis is the \"Zigzag section divider\" element from the Enrichr Library: Two full-width bands joined by a wide, flat, uniform zigzag edge drawn with one stretched SVG polygon.\nPage: https://enrichr.dev/elements/zigzag-section-divider.html\nMachine-readable spec: https://enrichr.dev/elements/zigzag-section-divider.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- zigzag-section-divider.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 \"./zigzag-section-divider\"; // markup is the HTML string; mount is the JavaScript's mount function\n\nexport default function ZigzagSectionDivider(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 \"Zigzag section divider\" element to this React + Vite + TypeScript + Tailwind project. Do not install any packages.\n\nThis is the \"Zigzag section divider\" element from the Enrichr Library: Two full-width bands joined by a wide, flat, uniform zigzag edge drawn with one stretched SVG polygon.\nPage: https://enrichr.dev/elements/zigzag-section-divider.html\nMachine-readable spec: https://enrichr.dev/elements/zigzag-section-divider.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- zigzag-section-divider.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/ZigzagSectionDivider.tsx):\n```tsx\n\"use client\";\nimport { useEffect, useRef } from \"react\";\nimport { markup, mount } from \"./zigzag-section-divider\"; // markup is the HTML string; mount is the JavaScript's mount function\n\nexport default function ZigzagSectionDivider(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 \"Zigzag section divider\" element.\n\nThis is the \"Zigzag section divider\" element from the Enrichr Library: Two full-width bands joined by a wide, flat, uniform zigzag edge drawn with one stretched SVG polygon.\nPage: https://enrichr.dev/elements/zigzag-section-divider.html\nMachine-readable spec: https://enrichr.dev/elements/zigzag-section-divider.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), zigzag-section-divider.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 \"Zigzag section divider\" element. No packages, no server code.\n\nThis is the \"Zigzag section divider\" element from the Enrichr Library: Two full-width bands joined by a wide, flat, uniform zigzag edge drawn with one stretched SVG polygon.\nPage: https://enrichr.dev/elements/zigzag-section-divider.html\nMachine-readable spec: https://enrichr.dev/elements/zigzag-section-divider.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 zigzag-section-divider.js and then main.js), style.css (the CSS below), zigzag-section-divider.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 \"Zigzag section divider\" 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 \"Zigzag section divider\" element from the Enrichr Library: Two full-width bands joined by a wide, flat, uniform zigzag edge drawn with one stretched SVG polygon.\nPage: https://enrichr.dev/elements/zigzag-section-divider.html\nMachine-readable spec: https://enrichr.dev/elements/zigzag-section-divider.json\n\nWhat it does: Between the two bands sits a strip in the bottom band's colour holding one SVG polygon in the top band's colour. The polygon's points zigzag between the bottom and top of a 1000 by 40 viewBox and then close along the top edge, and preserveAspectRatio none stretches it to the full width and the chosen height, so the teeth stay wide and flat at any size. Changing the tooth count rebuilds the points. Nothing animates, exactly like the original pen.\nAccessibility: The zigzag is decorative and hidden from assistive technology; the two bands hold real headings and paragraphs. Nothing moves, so reduced motion needs no change, and nothing needs keyboard input. Check the contrast of the text colours if you change the band colours.\n\nTunable settings:\n- Top heading: text, default Build the top half\n- Top text: text, default A full-width band, joined to the next one by a wide zigzag edge.\n- Bottom heading: text, default Then the bottom half\n- Bottom text: text, default The second band picks up where the teeth leave off.\n- Teeth: range 1 to 20, step 1, default 5\n- Edge height (px): range 10 to 120, step 2, default 40\n- Top band: color, default #005236\n- Bottom band: color, default #e6ff55\n- Text on the top band: 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/zigzag-section-divider.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 \"Zigzag section divider\" 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 \"Zigzag section divider\" element from the Enrichr Library: Two full-width bands joined by a wide, flat, uniform zigzag edge drawn with one stretched SVG polygon.\nPage: https://enrichr.dev/elements/zigzag-section-divider.html\nMachine-readable spec: https://enrichr.dev/elements/zigzag-section-divider.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 ZigzagSectionDivider.\n2. Paste the JavaScript below into a separate code file named zigzag-section-divider.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 \"./zigzag-section-divider\"; // markup is the HTML string; mount is the JavaScript's mount function\n\nexport default function ZigzagSectionDivider(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(ZigzagSectionDivider, {\n  topTitle: { type: ControlType.String, title: \"Top heading\", defaultValue: \"Build the top half\" },\n  topText: { type: ControlType.String, title: \"Top text\", defaultValue: \"A full-width band, joined to the next one by a wide zigzag edge.\" },\n  bottomTitle: { type: ControlType.String, title: \"Bottom heading\", defaultValue: \"Then the bottom half\" },\n  bottomText: { type: ControlType.String, title: \"Bottom text\", defaultValue: \"The second band picks up where the teeth leave off.\" },\n  teeth: { type: ControlType.Number, title: \"Teeth\", min: 1, max: 20, step: 1, defaultValue: 5 },\n  edge: { type: ControlType.Number, title: \"Edge height\", min: 10, max: 120, step: 2, defaultValue: 40 },\n  top: { type: ControlType.Color, title: \"Top band\", defaultValue: \"#005236\" },\n  bottom: { type: ControlType.Color, title: \"Bottom band\", defaultValue: \"#e6ff55\" },\n  light: { type: ControlType.Color, title: \"Text on the top band\", 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 \"Zigzag section divider\" 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 \"Zigzag section divider\" element from the Enrichr Library: Two full-width bands joined by a wide, flat, uniform zigzag edge drawn with one stretched SVG polygon.\nPage: https://enrichr.dev/elements/zigzag-section-divider.html\nMachine-readable spec: https://enrichr.dev/elements/zigzag-section-divider.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-zigzag-section-divider\"></div>, and a <script> block with the JavaScript followed by:\n   mount(document.getElementById(\"enrichr-zigzag-section-divider\"), { ...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": "The zigzag is decorative and hidden from assistive technology; the two bands hold real headings and paragraphs. Nothing moves, so reduced motion needs no change, and nothing needs keyboard input. Check the contrast of the text colours if you change the band colours.",
  "performance": "One small static SVG and plain CSS. No script runs after the first render, apart from rebuilding the points when a setting changes.",
  "dependencies": [],
  "codepen": "https://codepen.io/Enrichr-Dev/pen/OPprwdd",
  "source": {
    "markup": "<div class=\"ef-zsd\">\n  <section class=\"ef-zsd__top\">\n    <div class=\"ef-zsd__in\">\n      <h2 class=\"ef-zsd__h ef-zsd__th\">Build the top half</h2>\n      <p class=\"ef-zsd__p ef-zsd__tp\">A full-width band, joined to the next one by a wide zigzag edge.</p>\n    </div>\n  </section>\n  <div class=\"ef-zsd__edge\">\n    <svg class=\"ef-zsd__svg\" viewBox=\"0 0 1000 40\" preserveAspectRatio=\"none\" aria-hidden=\"true\" focusable=\"false\"><polygon class=\"ef-zsd__poly\" points=\"0,40 100,0 200,40 300,0 400,40 500,0 600,40 700,0 800,40 900,0 1000,40 1000,0 0,0\"/></svg>\n  </div>\n  <section class=\"ef-zsd__bot\">\n    <div class=\"ef-zsd__in\">\n      <h2 class=\"ef-zsd__h ef-zsd__bh\">Then the bottom half</h2>\n      <p class=\"ef-zsd__p ef-zsd__bp\">The second band picks up where the teeth leave off.</p>\n    </div>\n  </section>\n</div>",
    "css": "/* Enrichr Library · https://enrichr.dev */\n.ef-zsd { --ef-zsd-top: #005236; --ef-zsd-bot: #e6ff55; --ef-zsd-light: #fbf8f1; --ef-zsd-edge: 40px; width: 100%; box-sizing: border-box; overflow: hidden; border-radius: 1rem; background: var(--ef-zsd-bot); container-type: inline-size; font-family: 'Instrument Sans', system-ui, sans-serif; }\n.ef-zsd .ef-zsd__top, .ef-zsd .ef-zsd__bot { width: 100%; box-sizing: border-box; padding: 6rem 1.5rem; text-align: center; }\n.ef-zsd .ef-zsd__top { background: var(--ef-zsd-top); color: var(--ef-zsd-light); }\n.ef-zsd .ef-zsd__bot { background: var(--ef-zsd-bot); color: var(--ef-zsd-top); }\n.ef-zsd .ef-zsd__in { max-width: 56rem; margin: 0 auto; }\n.ef-zsd .ef-zsd__h { margin: 0 0 1.5rem; padding: 0; opacity: 1; color: inherit; font-family: 'Parkinsans', 'Space Grotesk', sans-serif; font-size: clamp(2rem, 7cqw, 3rem); font-weight: 800; line-height: 1; letter-spacing: normal; text-transform: none; }\n.ef-zsd .ef-zsd__p { margin: 0; padding: 0; opacity: 0.9; color: inherit; font-size: 1.25rem; line-height: 1.75rem; }\n.ef-zsd .ef-zsd__bp { font-weight: 500; }\n.ef-zsd .ef-zsd__edge { width: 100%; height: var(--ef-zsd-edge); background: var(--ef-zsd-bot); }\n.ef-zsd .ef-zsd__svg { display: block; width: 100%; height: var(--ef-zsd-edge); }\n.ef-zsd .ef-zsd__poly { fill: var(--ef-zsd-top); }",
    "js": "// Enrichr Library · https://enrichr.dev\n// Zigzag section divider: two full-width bands joined by a wide, flat, uniform zigzag. The edge is one SVG polygon in a\n// 1000 by 40 viewBox, stretched to the full width with preserveAspectRatio none, filled with the top band's colour and\n// sitting on a strip of the bottom band's colour, so the teeth of the top band bite into the one below. Nothing moves, as\n// in the original pen; reduced motion changes nothing. Changing the tooth count or edge height rebuilds the points.\n// mount(root, { topTitle, topText, bottomTitle, bottomText, teeth (count), edge (height, px), top (top band colour),\n//               bottom (bottom band colour), light (text on the top band) })\nfunction mount(root, o) {\n  var box = root.querySelector(\".ef-zsd\");\n  var poly = root.querySelector(\".ef-zsd__poly\");\n  var parts = { topTitle: \".ef-zsd__th\", topText: \".ef-zsd__tp\", bottomTitle: \".ef-zsd__bh\", bottomText: \".ef-zsd__bp\" };\n  var opts = {};\n\n  function num(v, d) { v = Number(v); return isFinite(v) ? v : d; }\n  // n teeth = 2n straight runs across the 1000 unit width, alternating bottom (40) and top (0), then closed along the top\n  function points(n) {\n    var p = [], k, step = 1000 / (2 * n);\n    for (k = 0; k <= 2 * n; k++) p.push((Math.round(k * step * 100) / 100) + \",\" + (k % 2 ? 0 : 40));\n    return p.join(\" \") + \" 1000,0 0,0\";\n  }\n  function update(partial) {\n    opts = Object.assign({\n      topTitle: \"Build the top half\", topText: \"A full-width band, joined to the next one by a wide zigzag edge.\",\n      bottomTitle: \"Then the bottom half\", bottomText: \"The second band picks up where the teeth leave off.\",\n      teeth: 5, edge: 40, top: \"#005236\", bottom: \"#e6ff55\", light: \"#fbf8f1\"\n    }, opts, partial || {});\n    opts.teeth = Math.max(1, Math.min(40, Math.round(num(opts.teeth, 5))));\n    opts.edge = Math.max(4, Math.min(200, num(opts.edge, 40)));\n    for (var k in parts) { var el = root.querySelector(parts[k]); if (el && el.textContent !== String(opts[k])) el.textContent = String(opts[k]); }\n    poly.setAttribute(\"points\", points(opts.teeth));\n    box.style.setProperty(\"--ef-zsd-edge\", opts.edge + \"px\");\n    box.style.setProperty(\"--ef-zsd-top\", opts.top);\n    box.style.setProperty(\"--ef-zsd-bot\", opts.bottom);\n    box.style.setProperty(\"--ef-zsd-light\", opts.light);\n  }\n  update(o);\n  return { update: update, destroy: function () {} };\n}"
  }
}