40- Visual position: infer from source screenshots, brand assets, extracted design tokens, typography, and section rhythm.
41- Primary goal: preserve recognizable source brand while rebuilding as a Wix Headless Astro/Tailwind frontend.
42
43## Assets
44
45${(assets.assets || []).slice(0, 20).map((asset) => `- ${asset.type}: \`${asset.localPath}\` from ${asset.sourceUrl}`).join("\n") || "- No downloaded assets recorded yet."}
46
47## Color Tokens
48
49${list(tokens.colors, "No colors extracted. Inspect screenshots and CSS manually.")}
50
51Recommended Tailwind variables:
52
53${tailwindRecommendations(tokens)}
54
55## Typography
56
57Font families:
58
59${list(tokens.fontFamilies, "No font families extracted. Inspect computed styles and downloaded font files.")}
60
61Font sizes:
62
63${list(tokens.fontSizes, "No font sizes extracted. Use source screenshots and computed styles.")}
64
65- Copy the exact source \`@font-face\` blocks with local URLs substituted; do not pick a downloaded font file by family name alone.
66- Use \`docs/site-clone/fonts.json\` as the source of truth for \`font-family\`, \`font-style\`, \`font-weight\`, and \`unicode-range\`.
67- Map body and display roles from the extracted font families before building page sections.
68- Set body, headings, links, buttons, and small text explicitly.
69- Preserve source line-height and letter-spacing where the extracted tokens report them; otherwise derive them from screenshots and computed styles.
70
71### Extracted Font Faces
72
73${formatFontFaces(fonts)}
74
75## Layout And Spacing
76
77- Use source section order and rhythm as the baseline.
78- Define shared containers for narrow, default, and wide content.
79- Keep mobile and desktop layouts close enough rather than pixel-identical.
80- Avoid placeholder sections; every visible block should map back to source evidence.
81${tokens.spacing?.length ? `- Spacing scale: ${inlineList(tokens.spacing)}.` : "- Spacing scale: infer from section rhythm and component specs."}
82${tokens.breakpoints?.length ? `- Breakpoints: ${inlineList(tokens.breakpoints)}.` : "- Breakpoints: use desktop, tablet, and mobile screenshots as responsive checkpoints."}
83
84## Header And Navigation
85
86${chromeSummary(chrome)}
87
88## First Viewport Evidence
89
90${firstViewportSummary(chrome)}
91
92## Radii, Borders, Shadows
93
94Radii:
95
96${list(tokens.radii, "No radii extracted. Infer from cards, buttons, forms, and media corners.")}
97
98Shadows:
99
100${list(tokens.shadows, "No shadows extracted. Infer elevation from source UI.")}
101
102## Global CSS Recommendations
103
104- Define theme variables in one global stylesheet before writing sections.
105- Load local fonts from downloaded assets when available; otherwise use the closest source fallback stack.
106- Run \`node skills/wix-headless-replatform/scripts/validate-font-contract.mjs ${sourceUrl} --out ${outputDir}\` after implementing local \`@font-face\` declarations.
107- Set \`html\`, \`body\`, base text color, background color, link color, and focus styles globally.
108- Verify the implemented global font family and primary text color against extracted tokens before styling sections.
109- Add reusable utilities for source-aligned containers, section padding, product grids, and CTA groups.
110
111## Component Patterns
112
113- Header/nav: preserve menu labels, order, dropdown intent, and CTA priority.
114- Header behavior: if the source has a large static header and a smaller scrolled sticky/fixed header, approximate that pattern with a compact sticky state rather than pinning the large header.
115- Footer: preserve link groups, legal links, contact/social signals, and brand treatment.
116- Buttons/links: derive size, radius, colors, hover states, and typography from source CTAs.
153 "- Manually inspect source screenshots for header height, sticky behavior, logo scale, dropdown hierarchy, and mobile menu behavior before implementing shared chrome.",
165 lines.push(`- Do not keep a sticky/fixed header taller than about ${Math.round(stickyLimit * 100)}% of desktop viewport height unless source evidence shows that exact behavior.`);