Legal Page 1
Legal page block (refund policy, privacy, terms, earnings disclaimer). A centred policy masthead sits on the band, and a raised
Use it in a prompt
Use content/legal-page from the FunnelDNA library. Follow the skill and theme contract. Ask me for the copy, images, and brand details you need; do not invent proof.
Paste into Claude or ChatGPT with FunnelDNA connected (MCP setup), or alongside the skill.
Use it in code
- Save
component.tsx(Code tab) ascomponents/funneldna/content/legal-page.tsx. - Import it and pass your copy and images (Props tab):
import { LegalPage } from "@/components/funneldna/content/legal-page"
It restyles from the theme tokens on any wrapper (Theme tab). The specimen source is a complete working example.
pieces/content/legal-page/component.tsx 579 lines
// layout: classic-centred-stack
// Legal page block (refund policy, privacy, terms, earnings disclaimer). A centred policy masthead sits on the band, and a raised
// document sheet overlaps it with a live reading-progress contents list, bold lead-in plain-English sections and a contact route, so the reader trusts the offer.
import * as React from "react"
import { BookOpen, CalendarDays, Check, ChevronDown, Clock, Mail, MapPin, Phone } from "lucide-react"
export type LegalParagraph = {
/** Bold lead-in phrase that opens the paragraph */
lead?: React.ReactNode
text: React.ReactNode
}
export type LegalSection = {
/** Anchor id, also the contents link target */
id: string
title: string
paragraphs?: LegalParagraph[]
/** Optional bullet list shown after the paragraphs */
list?: React.ReactNode[]
}
export type LegalPolicyLink = { label: string; href: string; current?: boolean }
export type LegalContact = {
heading?: string
text?: React.ReactNode
email?: string
phone?: string
address?: string
hours?: string
/** Button label; an empty string hides the button */
buttonLabel?: string
/** Defaults to a mailto: link for the email */
buttonHref?: string
/** One short line beside the button */
note?: string
}
export type LegalPageCopy = {
updatedLabel: string
tocLabel: string
nowReading: string
/** "{percent}" is replaced with the reading progress */
progress: string
summaryHeading: string
policiesLabel: string
emailLabel: string
phoneLabel: string
addressLabel: string
hoursLabel: string
contactHeading: string
contactButton: string
backToTop: string
}
export type LegalPageProps = {
title?: string
lead?: React.ReactNode
/** Date the policy last changed, shown after copy.updatedLabel */
updated?: string
readTime?: string
/** Sibling policies; mark the one this page shows with current */
policies?: LegalPolicyLink[]
/** Plain-English summary shown above the full text */
summary?: { heading?: string; points: React.ReactNode[] }
sections?: LegalSection[]
contact?: LegalContact
/** Slot "seal-guarantee": transparent seal or emblem above the title */
sealImage?: string
sealAlt?: string
copy?: Partial<LegalPageCopy>
onAction?: (event: React.MouseEvent<HTMLElement>) => void
state?: "default" | "hover" | "active" | "disabled"
className?: string
}
export function LegalPage(props: LegalPageProps) {
const {
title = "Refund Policy",
lead = "How refunds work for your purchase, in plain English.",
updated = "",
readTime = "",
policies = [],
summary,
sections = DEFAULT_SECTIONS,
contact,
sealImage,
sealAlt = "",
onAction,
state = "default",
className,
} = props
const copy: LegalPageCopy = { ...DEFAULT_COPY, ...props.copy }
const uid = React.useId().replace(/[^a-zA-Z0-9_-]/g, "")
const rootId = `cf-lp-${uid}`
const rootRef = React.useRef<HTMLElement>(null)
const articleRef = React.useRef<HTMLDivElement>(null)
const detailsRef = React.useRef<HTMLDetailsElement>(null)
const sectionRefs = React.useRef<(HTMLElement | null)[]>([])
const [active, setActive] = React.useState(0)
const [progress, setProgress] = React.useState(0)
const sectionKey = sections.map((s) => s.id).join("|")
React.useEffect(() => {
const article = articleRef.current
if (!article) return
const count = sectionKey ? sectionKey.split("|").length : 0
let frame = 0
const measure = () => {
frame = 0
const vh = window.innerHeight || 800
const rect = article.getBoundingClientRect()
const span = rect.height - vh * 0.5
let p = span > 0 ? (vh * 0.35 - rect.top) / span : 1
if (rect.bottom <= vh) p = 1
setProgress(Math.round(Math.min(1, Math.max(0, p)) * 100))
let index = 0
for (let i = 0; i < count; i++) {
const el = sectionRefs.current[i]
if (el && el.getBoundingClientRect().top <= vh * 0.32) index = i
}
setActive(index)
}
const onScroll = () => {
if (!frame) frame = window.requestAnimationFrame(measure)
}
measure()
document.addEventListener("scroll", onScroll, { passive: true, capture: true })
window.addEventListener("resize", onScroll)
return () => {
document.removeEventListener("scroll", onScroll, { capture: true })
window.removeEventListener("resize", onScroll)
if (frame) window.cancelAnimationFrame(frame)
}
}, [sectionKey])
const go = (event: React.MouseEvent<HTMLAnchorElement>, index: number) => {
const el = sectionRefs.current[index]
if (!el) return
event.preventDefault()
scrollToEl(el)
el.querySelector<HTMLElement>("h2")?.focus({ preventScroll: true })
setActive(index)
if (detailsRef.current) detailsRef.current.open = false
}
const toTop = (event: React.MouseEvent<HTMLAnchorElement>) => {
const el = rootRef.current
if (!el) return
event.preventDefault()
scrollToEl(el)
}
const percentText = copy.progress.replace("{percent}", String(progress))
const current = sections[active]
const toc = (
<ol className="cf-lp-toc">
{sections.map((s, i) => (
<li key={s.id}>
<a
href={`#${s.id}`}
className={`cf-lp-toc-link${i === active ? " is-active" : ""}`}
aria-current={i === active ? "location" : undefined}
onClick={(event) => go(event, i)}
>
<span className="cf-lp-toc-num">{pad(i)}</span>
<span>{s.title}</span>
</a>
</li>
))}
</ol>
)
const buttonLabel = contact?.buttonLabel ?? copy.contactButton
const buttonHref = contact?.buttonHref ?? (contact?.email ? `mailto:${contact.email}` : undefined)
const buttonClass = ["cf-lp-btn", state === "hover" && "is-hover", state === "active" && "is-active"].filter(Boolean).join(" ")
const buttonInner = (
<>
<Mail size={20} strokeWidth={2.5} aria-hidden="true" />
<span>{buttonLabel}</span>
</>
)
const button = !buttonLabel ? null : state === "disabled" ? (
<button type="button" className={buttonClass} disabled>
{buttonInner}
</button>
) : buttonHref ? (
<a className={buttonClass} href={buttonHref} onClick={onAction}>
{buttonInner}
</a>
) : (
<button type="button" className={buttonClass} onClick={onAction}>
{buttonInner}
</button>
)
const rows = contact
? [
contact.email && {
key: "email",
icon: <Mail size={20} strokeWidth={2.5} />,
label: copy.emailLabel,
value: <a href={`mailto:${contact.email}`}>{breakEmail(contact.email)}</a>,
},
contact.phone && {
key: "phone",
icon: <Phone size={20} strokeWidth={2.5} />,
label: copy.phoneLabel,
value: <a href={`tel:${contact.phone.replace(/[^0-9+]/g, "")}`}>{contact.phone}</a>,
},
contact.hours && { key: "hours", icon: <Clock size={20} strokeWidth={2.5} />, label: copy.hoursLabel, value: contact.hours },
contact.address && { key: "address", icon: <MapPin size={20} strokeWidth={2.5} />, label: copy.addressLabel, value: contact.address },
].filter(Boolean) as { key: string; icon: React.ReactNode; label: string; value: React.ReactNode }[]
: []
return (
<section
id={rootId}
ref={rootRef}
className={`cf-legal-page${className ? ` ${className}` : ""}`}
aria-labelledby={`${uid}-title`}
style={{ ["--lp-p" as string]: String(progress / 100) } as React.CSSProperties}
>
<style>{CSS}</style>
<header className="cf-lp-head">
<div className="cf-lp-head-in">
{sealImage ? <img className="cf-lp-seal" src={sealImage} alt={sealAlt} width={112} height={112} /> : null}
<h1 id={`${uid}-title`} className="cf-lp-title">{title}</h1>
{lead ? <p className="cf-lp-lead">{lead}</p> : null}
{updated || readTime ? (
<ul className="cf-lp-meta">
{updated ? (
<li>
<CalendarDays size={16} strokeWidth={2.5} aria-hidden="true" />
<span>
{copy.updatedLabel} <time>{updated}</time>
</span>
</li>
) : null}
{readTime ? (
<li>
<BookOpen size={16} strokeWidth={2.5} aria-hidden="true" />
<span>{readTime}</span>
</li>
) : null}
</ul>
) : null}
{policies.length > 0 ? (
<nav className="cf-lp-policies" aria-label={copy.policiesLabel}>
<ul>
{policies.map((p) => (
<li key={p.label}>
<a href={p.href} className={p.current ? "is-current" : undefined} aria-current={p.current ? "page" : undefined}>
{p.label}
</a>
</li>
))}
</ul>
</nav>
) : null}
</div>
</header>
<div className="cf-lp-body">
<div className={`cf-lp-doc${sections.length ? "" : " is-single"}`}>
{sections.length > 0 ? (
<aside className="cf-lp-aside">
<p className="cf-lp-toc-label" id={`${uid}-toc`}>{copy.tocLabel}</p>
<div className="cf-lp-meter">
<span className="cf-lp-track" aria-hidden="true">
<span className="cf-lp-fill" />
</span>
<span>{percentText}</span>
</div>
<nav aria-labelledby={`${uid}-toc`}>{toc}</nav>
</aside>
) : null}
<div className="cf-lp-article" ref={articleRef}>
{sections.length > 0 ? (
<details className="cf-lp-mtoc" ref={detailsRef}>
<summary className="cf-lp-mtoc-sum">
<span className="cf-lp-mtoc-text">
<span className="cf-lp-mtoc-label">
{copy.nowReading} · {percentText}
</span>
<span className="cf-lp-mtoc-title">
<span className="cf-lp-mtoc-num">{pad(active)}</span> {current?.title}
</span>
</span>
<ChevronDown className="cf-lp-chev" size={20} strokeWidth={2.5} aria-hidden="true" />
<span className="cf-lp-track cf-lp-mtrack" aria-hidden="true">
<span className="cf-lp-fill" />
</span>
</summary>
<nav aria-label={copy.tocLabel}>{toc}</nav>
</details>
) : null}
{summary && summary.points.length > 0 ? (
<section className="cf-lp-summary" aria-labelledby={`${uid}-sum`}>
<h2 id={`${uid}-sum`}>{summary.heading ?? copy.summaryHeading}</h2>
<ul>
{summary.points.map((point, i) => (
<li key={i}>
<span className="cf-lp-tick" aria-hidden="true">
<Check size={14} strokeWidth={3} />
</span>
<span>{point}</span>
</li>
))}
</ul>
</section>
) : null}
{sections.map((s, i) => (
<section
key={s.id}
id={s.id}
ref={(el) => {
sectionRefs.current[i] = el
}}
className="cf-lp-sec"
aria-labelledby={`${uid}-h-${i}`}
>
<div className="cf-lp-sec-head">
<span className="cf-lp-sec-num" aria-hidden="true">{pad(i)}</span>
<h2 id={`${uid}-h-${i}`} tabIndex={-1}>{s.title}</h2>
</div>
{s.paragraphs?.map((p, j) => (
<p key={j}>
{p.lead ? (
<>
<strong className="cf-lp-lead-in">{p.lead}</strong>{" "}
</>
) : null}
{p.text}
</p>
))}
{s.list && s.list.length > 0 ? (
<ul className="cf-lp-list">
{s.list.map((item, j) => (
<li key={j}>{item}</li>
))}
</ul>
) : null}
</section>
))}
{contact ? (
<section className="cf-lp-contact" aria-labelledby={`${uid}-contact`}>
<h2 id={`${uid}-contact`}>{contact.heading ?? copy.contactHeading}</h2>
{contact.text ? <p className="cf-lp-contact-text">{contact.text}</p> : null}
{rows.length > 0 ? (
<ul className="cf-lp-rows">
{rows.map((r) => (
<li key={r.key} className="cf-lp-row">
<span className="cf-lp-disc" aria-hidden="true">{r.icon}</span>
<span className="cf-lp-row-text">
<span className="cf-lp-row-label">{r.label}</span>
<span className="cf-lp-row-value">{r.value}</span>
</span>
</li>
))}
</ul>
) : null}
{button ? (
<div className="cf-lp-actions">
{button}
{contact.note ? <p className="cf-lp-note">{contact.note}</p> : null}
</div>
) : null}
</section>
) : null}
<a className="cf-lp-top" href={`#${rootId}`} onClick={toTop}>
{copy.backToTop}
</a>
</div>
</div>
</div>
</section>
)
}
export default LegalPage
function pad(index: number) {
return String(index + 1).padStart(2, "0")
}
// Lets a long address wrap after the @ on phones instead of mid-word ("support@example.co / m").
function breakEmail(email: string) {
const at = email.indexOf("@")
if (at < 0) return email
return (
<>
{email.slice(0, at + 1)}
<wbr />
{email.slice(at + 1)}
</>
)
}
function scrollToEl(el: HTMLElement) {
const reduce = typeof window.matchMedia === "function" && window.matchMedia("(prefers-reduced-motion: reduce)").matches
el.scrollIntoView({ behavior: reduce ? "auto" : "smooth", block: "start" })
}
const DEFAULT_COPY: LegalPageCopy = {
updatedLabel: "Last updated",
tocLabel: "On this page",
nowReading: "Now reading",
progress: "{percent}% read",
summaryHeading: "Here's the deal in plain English",
policiesLabel: "Our policies",
emailLabel: "Email",
phoneLabel: "Phone",
addressLabel: "Mailing address",
hoursLabel: "Support hours",
contactHeading: "Questions about this policy?",
contactButton: "Email Support",
backToTop: "Back to top",
}
const DEFAULT_SECTIONS: LegalSection[] = [
{
id: "refund-window",
title: "Your refund window",
paragraphs: [{ lead: "Ask within the window.", text: "Request a refund within the period shown at checkout and we will review it promptly." }],
},
{
id: "refund-request",
title: "How to request a refund",
paragraphs: [{ lead: "Send one email.", text: "Contact our support team from the address you used at checkout, or include your order number." }],
},
{
id: "refund-changes",
title: "Changes to this policy",
paragraphs: [{ lead: "We keep this page current.", text: "When this policy changes, the date at the top of this page changes too." }],
},
]
// Theme: every colour reads the contract tokens (hex only as var() fallbacks). The band lead blends band-ink into band in
// oklab (two hues), shadows are dark recipes on --shadow, and the summary ticks are solid --success badges with a white glyph.
// --link is only guaranteed on card and surface, so links inside the grey wells (summary, contact) blend 18% of --ink into
// the link in oklab: darker on light themes, lighter on dark themes, same hue, always at least the card contrast.
const CSS = `
.cf-legal-page{--lp-shade:var(--shadow,oklch(0.22 0.03 260));--lp-hair:oklch(from var(--ink,#152033) l c h / 0.12);--lp-well:color-mix(in oklch,var(--ink,#152033) 4%,var(--card,#ffffff));--lp-ring:oklch(from var(--field-focus,var(--accent,#2563eb)) l c h / 0.55);--lp-well-link:color-mix(in oklab,var(--link,var(--accent,#2563eb)) 82%,var(--ink,#152033));--lp-ease:cubic-bezier(.2,.7,.2,1);background:var(--surface,#ffffff);color:var(--ink,#152033);font-family:var(--font-body);font-size:clamp(1.0625rem,1.25vw,1.125rem);line-height:1.5}
.cf-legal-page *,.cf-legal-page *::before,.cf-legal-page *::after{box-sizing:border-box}
.cf-lp-head{background:var(--band,#16244a);color:var(--band-ink,#ffffff);padding:clamp(56px,8vw,112px) clamp(16px,5vw,48px) calc(clamp(56px,8vw,112px) + 64px);text-align:center}
.cf-lp-head-in{max-width:46rem;margin:0 auto;display:flex;flex-direction:column;align-items:center}
.cf-lp-seal{display:block;width:clamp(88px,9vw,112px);height:auto;aspect-ratio:1;object-fit:contain;margin:0 0 24px;filter:drop-shadow(0 2px 3px oklch(from var(--lp-shade) l c h / 0.45)) drop-shadow(0 10px 14px oklch(from var(--lp-shade) l c h / 0.35))}
.cf-lp-title{margin:0 0 20px;font-family:var(--font-display);font-weight:var(--display-weight,800);letter-spacing:var(--display-tracking,-0.025em);text-transform:var(--display-case,none);font-size:clamp(2.5rem,5.4vw,4.875rem);line-height:1.04;color:var(--band-ink,#ffffff);text-wrap:balance}
.cf-lp-lead{margin:0 0 28px;max-width:40rem;font-size:clamp(1.125rem,1.5vw,1.375rem);font-weight:500;line-height:1.4;color:color-mix(in oklab,var(--band-ink,#ffffff) 90%,var(--band,#16244a));text-wrap:pretty}
.cf-lp-meta{display:flex;flex-wrap:wrap;justify-content:center;gap:8px;margin:0;padding:0;list-style:none}
.cf-lp-meta li{display:inline-flex;align-items:center;gap:8px;min-height:32px;padding:4px 12px;border-radius:999px;background:oklch(from var(--band-ink,#ffffff) l c h / 0.12);color:var(--band-ink,#ffffff);font-size:.875rem;font-weight:800;line-height:1.2;white-space:nowrap}
.cf-lp-meta svg{flex:none}
.cf-lp-policies{margin-top:24px}
.cf-lp-policies ul{display:flex;flex-wrap:wrap;justify-content:center;gap:8px;margin:0;padding:0;list-style:none}
.cf-lp-policies a{display:inline-flex;align-items:center;min-height:44px;padding:0 16px;border-radius:999px;border:1px solid oklch(from var(--band-ink,#ffffff) l c h / 0.3);color:var(--band-ink,#ffffff);font-size:.9375rem;font-weight:700;text-decoration:none;transition:background .16s ease,border-color .16s ease}
.cf-lp-policies a:hover{background:oklch(from var(--band-ink,#ffffff) l c h / 0.12);border-color:oklch(from var(--band-ink,#ffffff) l c h / 0.5)}
.cf-lp-policies a:active{background:oklch(from var(--band-ink,#ffffff) l c h / 0.2)}
.cf-lp-policies a:focus-visible{outline:3px solid var(--band-ink,#ffffff);outline-offset:2px}
.cf-lp-policies a.is-current{background:var(--band-ink,#ffffff);color:var(--band,#16244a);border-color:transparent;font-weight:800}
.cf-lp-body{padding:0 clamp(16px,5vw,48px) clamp(64px,8.5vw,120px)}
.cf-lp-doc{position:relative;max-width:1120px;margin:-64px auto 0;display:grid;grid-template-columns:minmax(0,248px) minmax(0,1fr);gap:clamp(32px,5vw,72px);align-items:start;padding:clamp(24px,4.4vw,64px);background:var(--card,#ffffff);color:var(--ink,#152033);border:1px solid var(--card-border,oklch(from var(--ink,#152033) l c h / 0.12));border-radius:var(--card-radius,var(--radius,14px));box-shadow:var(--card-shadow,var(--shadow-lg,0 1px 3px oklch(from var(--lp-shade) l c h / 0.22),0 12px 24px -8px oklch(from var(--lp-shade) l c h / 0.32)))}
.cf-lp-doc.is-single{grid-template-columns:minmax(0,1fr)}
.cf-lp-aside{position:sticky;top:24px;max-height:calc(100vh - 48px);overflow:auto}
.cf-lp-toc-label{margin:0 0 12px;font-size:.875rem;font-weight:800;line-height:1.2;letter-spacing:.08em;text-transform:uppercase;color:var(--ink,#152033)}
.cf-lp-meter{display:flex;align-items:center;gap:12px;margin:0 0 16px;font-size:.875rem;font-weight:700;line-height:1.2;color:var(--ink,#152033);font-variant-numeric:tabular-nums;white-space:nowrap}
.cf-lp-track{position:relative;display:block;flex:1;height:6px;border-radius:999px;background:oklch(from var(--ink,#152033) l c h / 0.1);overflow:hidden}
.cf-lp-fill{position:absolute;inset:0;border-radius:inherit;background:var(--accent-fill,var(--accent,#2563eb));transform:scaleX(var(--lp-p,0));transform-origin:left center;transition:transform .2s ease}
.cf-lp-toc{display:grid;gap:2px;margin:0;padding:0;list-style:none}
.cf-lp-toc-link{display:grid;grid-template-columns:28px minmax(0,1fr);gap:8px;align-items:baseline;padding:10px 12px;border-radius:8px;color:var(--ink,#152033);font-size:.9375rem;font-weight:600;line-height:1.35;text-decoration:none;text-wrap:pretty;transition:background .16s ease}
.cf-lp-toc-num{font-family:var(--font-display);font-weight:800;font-variant-numeric:tabular-nums;color:var(--muted,#4b5563)}
.cf-lp-toc-link:hover{background:color-mix(in oklch,var(--ink,#152033) 5%,var(--card,#ffffff))}
.cf-lp-toc-link:focus-visible{outline:3px solid var(--lp-ring);outline-offset:2px}
.cf-lp-toc-link.is-active{background:color-mix(in oklch,var(--accent,#2563eb) 10%,var(--card,#ffffff));font-weight:800}
.cf-lp-toc-link.is-active .cf-lp-toc-num{color:var(--ink,#152033)}
.cf-lp-article{min-width:0;max-width:68ch}
.cf-lp-mtoc{display:none}
.cf-lp-summary{margin:0 0 48px;padding:clamp(20px,3vw,32px);border-radius:10px;background:var(--lp-well)}
.cf-lp-summary h2,.cf-lp-contact h2{margin:0 0 16px;font-family:var(--font-display);font-weight:var(--display-weight,800);letter-spacing:-0.01em;text-transform:var(--display-case,none);font-size:clamp(1.3125rem,1.8vw,1.625rem);line-height:1.15;color:var(--ink,#152033);text-wrap:balance}
.cf-lp-summary ul{display:grid;gap:12px;margin:0;padding:0;list-style:none}
.cf-lp-summary li{display:flex;align-items:flex-start;gap:12px;font-weight:600;line-height:1.45;text-wrap:pretty}
.cf-lp-tick{flex:none;display:inline-flex;align-items:center;justify-content:center;width:24px;height:24px;margin-top:1px;border-radius:999px;background:var(--success,#1f7a3e);color:var(--success-ink,#ffffff)}
.cf-lp-sec{scroll-margin-top:24px}
.cf-lp-sec + .cf-lp-sec{margin-top:48px;padding-top:48px;border-top:1px solid var(--lp-hair)}
.cf-lp-sec-head{display:flex;align-items:baseline;gap:16px;margin:0 0 16px}
.cf-lp-sec-num{flex:none;font-family:var(--font-display);font-weight:800;font-size:clamp(1.3125rem,1.8vw,1.625rem);line-height:1.15;font-variant-numeric:tabular-nums;color:var(--accent,#2563eb)}
.cf-lp-sec h2{margin:0;font-family:var(--font-display);font-weight:var(--display-weight,800);letter-spacing:-0.01em;text-transform:var(--display-case,none);font-size:clamp(1.3125rem,1.8vw,1.625rem);line-height:1.15;color:var(--ink,#152033);text-wrap:balance}
.cf-lp-sec h2:focus{outline:none}
.cf-lp-sec h2:focus-visible{outline:3px solid var(--lp-ring);outline-offset:4px;border-radius:4px}
.cf-lp-sec p{margin:0 0 16px;line-height:1.65;text-wrap:pretty}
.cf-lp-sec p:last-child{margin-bottom:0}
.cf-lp-lead-in{font-weight:800;color:var(--ink,#152033)}
.cf-lp-list{display:grid;gap:10px;margin:0 0 16px;padding:0;list-style:none}
.cf-lp-list:last-child{margin-bottom:0}
.cf-lp-list li{position:relative;padding-left:28px;line-height:1.55;text-wrap:pretty}
.cf-lp-list li::before{content:"";position:absolute;left:6px;top:.62em;width:8px;height:8px;border-radius:999px;background:var(--accent-fill,var(--accent,#2563eb))}
.cf-lp-article a:not(.cf-lp-btn):not(.cf-lp-toc-link){color:var(--link,var(--accent,#2563eb));font-weight:600;text-decoration:underline;text-decoration-color:oklch(from var(--link,var(--accent,#2563eb)) l c h / 0.45);text-underline-offset:.18em;transition:color .16s ease}
.cf-lp-article a:not(.cf-lp-btn):not(.cf-lp-toc-link):hover{color:oklch(from var(--link,var(--accent,#2563eb)) calc(l - 0.08) c h);text-decoration-color:currentColor}
.cf-lp-article a:not(.cf-lp-btn):not(.cf-lp-toc-link):focus-visible{outline:3px solid var(--lp-ring);outline-offset:2px;border-radius:4px}
.cf-lp-article .cf-lp-summary a:not(.cf-lp-btn):not(.cf-lp-toc-link),.cf-lp-article .cf-lp-contact a:not(.cf-lp-btn):not(.cf-lp-toc-link){color:var(--lp-well-link);text-decoration-color:oklch(from var(--lp-well-link) l c h / 0.45)}
.cf-lp-article .cf-lp-summary a:not(.cf-lp-btn):not(.cf-lp-toc-link):hover,.cf-lp-article .cf-lp-contact a:not(.cf-lp-btn):not(.cf-lp-toc-link):hover{color:color-mix(in oklab,var(--link,var(--accent,#2563eb)) 68%,var(--ink,#152033));text-decoration-color:currentColor}
.cf-lp-contact{margin-top:56px;padding:clamp(20px,3vw,32px);border-radius:10px;background:var(--lp-well)}
.cf-lp-contact h2{margin-bottom:12px}
.cf-lp-contact-text{margin:0 0 24px;line-height:1.55;text-wrap:pretty}
.cf-lp-rows{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:20px 24px;margin:0 0 28px;padding:0;list-style:none}
.cf-lp-row{display:grid;grid-template-columns:40px minmax(0,1fr);gap:12px;align-items:start}
.cf-lp-disc{display:inline-flex;align-items:center;justify-content:center;width:40px;height:40px;border-radius:999px;background:var(--accent-fill,var(--accent,#2563eb));color:var(--accent-fill-ink,var(--card,#ffffff))}
.cf-lp-row-text{display:flex;flex-direction:column;gap:4px;min-width:0;padding-top:1px}
.cf-lp-row-label{font-size:.875rem;font-weight:800;line-height:1.2;letter-spacing:.06em;text-transform:uppercase;color:var(--ink,#152033)}
.cf-lp-row-value{font-size:1.0625rem;font-weight:600;line-height:1.4;overflow-wrap:break-word;text-wrap:pretty}
.cf-lp-actions{display:flex;flex-wrap:wrap;align-items:center;gap:12px 20px}
.cf-lp-note{margin:0;font-size:.9375rem;font-weight:500;line-height:1.4;color:var(--ink,#152033);text-wrap:pretty}
.cf-lp-btn{display:inline-flex;align-items:center;justify-content:center;gap:10px;min-height:64px;padding:0 28px;border:0;border-radius:var(--button-radius,var(--radius,12px));background:linear-gradient(oklch(from var(--button-bg,var(--cta,#d62f24)) calc(l + 0.04) c h),oklch(from var(--button-bg-2,var(--cta-2,#b3261d)) calc(l - 0.02) c h));color:var(--button-ink,var(--cta-ink,#ffffff));font-family:var(--button-font,var(--font-display));font-weight:var(--button-weight,800);text-transform:var(--button-case,none);font-size:clamp(1.125rem,1.55vw,1.375rem);line-height:1.15;text-align:center;text-decoration:none;text-shadow:var(--button-text-shadow,none);box-shadow:var(--button-shadow,inset 0 1px 0 oklch(from var(--button-bg,var(--cta,#d62f24)) calc(l + 0.14) c h / 0.7),inset 0 -3px 0 oklch(from var(--button-bg,var(--cta,#d62f24)) calc(l - 0.16) c h),0 1px 2px oklch(from var(--lp-shade) l c h / 0.3),0 8px 16px -6px oklch(from var(--lp-shade) l c h / 0.45));cursor:pointer;transition:transform .16s ease,box-shadow .16s ease,background .16s ease}
.cf-lp-btn svg{flex:none}
.cf-lp-btn span{white-space:nowrap}
.cf-lp-btn:not(:disabled):hover,.cf-lp-btn.is-hover:not(:disabled){background:linear-gradient(oklch(from var(--button-bg,var(--cta,#d62f24)) calc(l - 0.01) c h),oklch(from var(--button-bg-2,var(--cta-2,#b3261d)) calc(l - 0.07) c h));box-shadow:inset 0 1px 0 oklch(from var(--button-bg,var(--cta,#d62f24)) calc(l + 0.12) c h / 0.6),inset 0 -3px 0 oklch(from var(--button-bg,var(--cta,#d62f24)) calc(l - 0.2) c h),0 1px 2px oklch(from var(--lp-shade) l c h / 0.32),0 10px 20px -6px oklch(from var(--lp-shade) l c h / 0.52)}
.cf-lp-btn:not(:disabled):active,.cf-lp-btn.is-active:not(:disabled){transform:translateY(1px);background:linear-gradient(oklch(from var(--button-bg,var(--cta,#d62f24)) calc(l - 0.06) c h),oklch(from var(--button-bg-2,var(--cta-2,#b3261d)) calc(l - 0.1) c h));box-shadow:inset 0 2px 4px oklch(from var(--button-bg,var(--cta,#d62f24)) calc(l - 0.22) c h / 0.5),inset 0 -2px 0 oklch(from var(--button-bg,var(--cta,#d62f24)) calc(l - 0.18) c h),0 1px 2px oklch(from var(--lp-shade) l c h / 0.3)}
.cf-lp-btn:focus-visible{outline:3px solid var(--lp-ring);outline-offset:3px}
.cf-lp-btn:disabled{background:var(--button-2-bg,var(--secondary,#e6e9ef));color:var(--button-2-ink,var(--secondary-ink,#152033));text-shadow:none;box-shadow:var(--button-2-shadow,var(--shadow-sm,0 1px 2px oklch(from var(--lp-shade) l c h / 0.2)));cursor:not-allowed;transform:none}
.cf-lp-top{display:inline-block;margin-top:32px;font-size:.9375rem}
@media (max-width:900px){
.cf-lp-head{padding-bottom:calc(clamp(56px,8vw,112px) + 48px)}
.cf-lp-doc{grid-template-columns:minmax(0,1fr);gap:0;margin-top:-48px}
.cf-lp-aside{display:none}
.cf-lp-article{max-width:none}
.cf-lp-mtoc{display:block;position:sticky;top:8px;z-index:2;margin:0 0 32px;border-radius:10px;background:var(--lp-well);border:1px solid var(--lp-hair);box-shadow:var(--shadow-sm,0 1px 2px oklch(from var(--lp-shade) l c h / 0.2))}
.cf-lp-mtoc-sum{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:10px 12px;align-items:center;padding:12px 16px 14px;list-style:none;cursor:pointer;border-radius:10px}
.cf-lp-mtoc-sum::-webkit-details-marker{display:none}
.cf-lp-mtoc-sum:focus-visible{outline:3px solid var(--lp-ring);outline-offset:2px}
.cf-lp-mtoc-text{display:flex;flex-direction:column;gap:4px;min-width:0}
.cf-lp-mtoc-label{font-size:.875rem;font-weight:800;line-height:1.2;letter-spacing:.06em;text-transform:uppercase;color:var(--ink,#152033);font-variant-numeric:tabular-nums}
.cf-lp-mtoc-title{font-size:1.0625rem;font-weight:700;line-height:1.3;color:var(--ink,#152033);text-wrap:pretty}
.cf-lp-mtoc-num{font-family:var(--font-display);font-weight:800;font-variant-numeric:tabular-nums;color:var(--ink,#152033)}
.cf-lp-chev{color:var(--ink,#152033);transition:transform .2s ease}
.cf-lp-mtoc[open] .cf-lp-chev{transform:rotate(180deg)}
.cf-lp-mtrack{grid-column:1 / -1;height:4px;flex:none}
.cf-lp-mtoc nav{max-height:min(60vh,420px);overflow:auto;padding:0 8px 12px}
.cf-lp-mtoc .cf-lp-toc-num{color:var(--ink,#152033)}
.cf-lp-mtoc .cf-lp-toc-link:hover{background:color-mix(in oklch,var(--ink,#152033) 7%,var(--card,#ffffff))}
.cf-lp-sec{scroll-margin-top:112px}
}
@media (max-width:560px){
.cf-lp-doc{padding:24px 20px}
.cf-lp-summary{margin-bottom:32px;padding:20px 16px}
.cf-lp-sec + .cf-lp-sec{margin-top:32px;padding-top:32px}
.cf-lp-sec-head{gap:12px}
.cf-lp-contact{margin-top:40px;padding:20px 16px}
.cf-lp-contact-text{margin-bottom:20px}
.cf-lp-rows{grid-template-columns:minmax(0,1fr);gap:16px;margin-bottom:24px}
.cf-lp-btn{width:100%;padding:0 20px}
.cf-lp-actions{flex-direction:column;align-items:stretch;text-align:center}
.cf-lp-top{margin-top:24px}
}
@media (prefers-reduced-motion:no-preference){
.cf-lp-head-in > *{animation:cf-lp-rise .45s var(--lp-ease) both}
.cf-lp-head-in > *:nth-child(2){animation-delay:.07s}
.cf-lp-head-in > *:nth-child(3){animation-delay:.14s}
.cf-lp-head-in > *:nth-child(4){animation-delay:.21s}
.cf-lp-head-in > *:nth-child(5){animation-delay:.28s}
.cf-lp-doc{animation:cf-lp-rise .45s var(--lp-ease) .21s both}
}
@keyframes cf-lp-rise{from{opacity:.82;transform:translateY(8px)}}
@media (prefers-reduced-motion:reduce){
.cf-legal-page *,.cf-legal-page *::before,.cf-legal-page *::after{transition:none !important;animation:none !important}
}
@media print{
.cf-lp-aside,.cf-lp-mtoc,.cf-lp-policies,.cf-lp-actions,.cf-lp-top{display:none}
.cf-lp-head{background:none;padding:24px 0}
.cf-lp-title,.cf-lp-lead{color:inherit}
.cf-lp-meta li{background:none;color:inherit;padding:0}
.cf-lp-doc{display:block;margin:0;border:0;box-shadow:none;padding:0}
}
`
pieces/content/legal-page/specimen.tsx 166 lines
import __studioImage72dcf4eb from "../assets/d04c37f4f47d2306.webp";
import * as React from "react"
import LegalPage, { type LegalPageProps } from "../legal-page"
import defaults from "../../studio-defaults.json"
import { slot } from "../../slots"
export const states = ["default", "hover", "active", "disabled"]
const SUPPORT_EMAIL = "support@example.com"
export default function LegalPageSpecimen({ state = "default" }: { state?: string }) {
const s = defaults.sample
return (
<LegalPage
state={state as LegalPageProps["state"]}
title="Refund Policy"
lead={
<>
Simple, fair terms for {s.name}, backed by our {s.guarantee}.
</>
}
updated="November 21, 2026"
readTime="4 min read"
sealImage={slot(
"seal-guarantee",
__studioImage72dcf4eb
)}
sealAlt="Money-back guarantee seal"
policies={[
{ label: "Privacy Policy", href: "#privacy" },
{ label: "Terms of Service", href: "#terms" },
{ label: "Earnings Disclaimer", href: "#earnings" },
{ label: "Refund Policy", href: "#refund", current: true },
]}
summary={{
heading: "Try it for 30 days, risk free",
points: [
"30 days to try the complete kit",
`A full ${s.price} refund, no reason required`,
<>
One email to <a href={`mailto:${SUPPORT_EMAIL}`}>{SUPPORT_EMAIL}</a> starts it
</>,
],
}}
sections={[
{
id: "guarantee",
title: "Your 30-day money-back guarantee",
paragraphs: [
{
lead: "Try everything for 30 days.",
text: `Download ${s.name}, work through the guide, the workbook and the checklist, and put them to use on your own funnel.`,
},
{
lead: "Not right for you? Get your money back.",
text: `Email us within 30 days of your purchase and we'll refund your ${s.price} payment in full.`,
},
{
lead: "No reason required.",
text: "Telling us what didn't work helps us improve the kit, but you never have to explain a refund request.",
},
],
},
{
id: "coverage",
title: "What your purchase includes",
paragraphs: [
{
lead: "One payment covers the complete kit.",
text: `${s.name} is a single ${s.price} payment with lifetime access to:`,
},
],
list: s.items.map((item) => (
<>
<strong>{item.name}</strong>: {item.detail}
</>
)),
},
{
id: "request",
title: "How to request a refund",
paragraphs: [
{
lead: "Send one email.",
text: (
<>
Write to <a href={`mailto:${SUPPORT_EMAIL}`}>{SUPPORT_EMAIL}</a> from the address you used at checkout, or include your order number.
</>
),
},
{
lead: "We confirm by reply.",
text: "You'll get an email from our team as soon as your refund has been issued.",
},
{
lead: "Your money goes back the way it came.",
text: "Refunds return to the original payment method. We can't send a refund to a different card or account.",
},
],
},
{
id: "timing",
title: "When your refund arrives",
paragraphs: [
{
lead: "We issue it within 2 business days.",
text: "Requests that reach us on a weekend are handled first thing Monday.",
},
{
lead: "Your bank takes it from there.",
text: "Most banks post a refund to your statement within 5 to 10 business days.",
},
],
},
{
id: "access",
title: "What happens after a refund",
paragraphs: [
{
lead: "Access to the kit ends.",
text: "Download links stop working once a refund is issued, and we ask that you delete any copies you saved.",
},
{
lead: "You're always welcome back.",
text: "You can buy the kit again at any time at the current price.",
},
],
},
{
id: "disputes",
title: "Disputes and chargebacks",
paragraphs: [
{
lead: "Talk to us first.",
text: "A refund through our team is faster than a bank dispute. If something went wrong with your order, email us and we'll put it right.",
},
],
},
{
id: "changes",
title: "Changes to this policy",
paragraphs: [
{
lead: "We keep this page current.",
text: "If we update this policy, the date at the top of this page changes too.",
},
{
lead: "Your purchase keeps its terms.",
text: "Every order is covered by the refund policy in place on the day you bought.",
},
],
},
]}
contact={{
heading: "Questions about a refund? Email a real person.",
text: "Our support team handles every refund request and every question about this policy.",
email: SUPPORT_EMAIL,
phone: "(555) 123-4567",
hours: "Monday to Friday, 9am to 5pm ET",
address: "Funnel Starter Co., 100 Market Street, Suite 200, Springfield, IL 62701",
buttonLabel: "Email Support",
note: "Include your order number for the fastest reply.",
}}
/>
)
}
| Name | Type | Details |
|---|---|---|
title OptionalLegalPage |
string |
|
lead OptionalLegalPage |
React.ReactNode |
|
updated OptionalLegalPage |
string |
|
readTime OptionalLegalPage |
string |
|
policies OptionalLegalPage |
LegalPolicyLink[] |
|
summary OptionalLegalPage |
{ heading?: string; points: React.ReactNode[] } |
|
sections OptionalLegalPage |
LegalSection[] |
|
contact OptionalLegalPage |
LegalContact |
|
sealImage OptionalLegalPage |
string |
|
sealAlt OptionalLegalPage |
string |
|
copy OptionalLegalPage |
Partial<LegalPageCopy> |
|
onAction OptionalLegalPage |
(event: React.MouseEvent<HTMLElement>) => void |
|
state OptionalLegalPage |
"default" | "hover" | "active" | "disabled" |
|
className OptionalLegalPage |
string |
Theme roles it reads
Set by the theme bar, a preset or your brand. Colours come from the base tokens (--surface, --ink, --cta…) every piece uses.
--button-bg--button-bg-2--button-case--button-font--button-ink--button-radius--button-shadow--button-text-shadow--button-weight- Main CTA button: background, ink, font, weight, case, radius and shadow.
--button-2-bg--button-2-ink--button-2-shadow- Secondary button.
--card-border--card-radius--card-shadow- Cards and panels: radius, border and shadow.
--display-case--display-tracking--display-weight- Headlines: weight, letter case and tracking.
--field-focus- Form inputs: background, ink, border, radius and focus colour.
Image slots
Filled from the brand’s images; the specimen ships its own defaults.
seal-guarantee- The money-back guarantee seal, on a transparent background.
-
b77916eca54aa689.webp
image/webp · 8.32 KB
-
d04c37f4f47d2306.webp
image/webp · 179 KB
-
d435db6662febfcf.webp
image/webp · 10 KB
-
f0a5d3e1e61804ba.webp
image/webp · 11.6 KB