/* global PROFILE_RESUMES */
// ============================================================
//  Profiles — career personas. Each bundles:
//   • profile-specific résumé data (see profile-data.jsx)
//   • 5 curated résumé designs (existing layout engine templates)
//   • a profile-specific cover-letter draft (metrics & language
//     that match the field)
//  Plus COVER_TEMPLATES: cover-letter layout descriptors rendered
//  by CoverLetter.jsx.
// ============================================================

const PROFILES = [
  {
    id: "swe", name: "Software Engineer", icon: "layers", tag: "Tech",
    accent: "#2563eb", accent2: "#06b6d4",
    blurb: "Backend, full-stack & platform roles. Latency, scale and uptime up front.",
    designs: ["cobalt", "terminal", "helix", "vertex", "onyx", "nova-electric", "mirage", "brut-cobalt", "neon-acid", "carbon-azure", "blueprint-cobalt", "split-indigo"],
  },
  {
    id: "design", name: "Product Designer", icon: "pen", tag: "Design",
    accent: "#6d5cff", accent2: "#ff5ca8",
    blurb: "UX & product design. Portfolio-ready layouts that show craft and impact.",
    designs: ["pixel", "spectrum", "meridian", "prism", "aurora", "nova-magenta", "mirage", "luxe-orchid", "zine-rust", "bauhaus-red", "aperture-plum", "pastel-lavender", "gradrail-violet"],
  },
  {
    id: "finance", name: "Finance & Banking", icon: "brief", tag: "Finance",
    accent: "#14233f", accent2: "#b8924f",
    blurb: "IB, PE & corporate finance. Dense, conservative, deal-value forward.",
    designs: ["wolfe", "ledger", "slate", "summit", "veritas", "crest-navy", "dossier-navy", "gazette-ink"],
  },
  {
    id: "marketing", name: "Marketing & Growth", icon: "spark", tag: "Marketing",
    accent: "#c026d3", accent2: "#f97316",
    blurb: "Demand, brand & growth. Funnel metrics and campaigns front and center.",
    designs: ["canvas", "marigold", "bolt", "prism", "aurora", "nova-magenta", "pop-punch", "zine-rust", "bauhaus-blue", "memphis-pop", "ribbon-coral", "mesh-magma"],
  },
  {
    id: "sales", name: "Sales & Biz Dev", icon: "bolt", tag: "Sales",
    accent: "#ef5b2b", accent2: "#ffb020",
    blurb: "AE & BD roles. Quota attainment, ARR and President's Club, loud and proud.",
    designs: ["bolt", "vertex", "summit", "canvas", "veritas", "pop-punch", "nova-electric", "split-crimson", "crest-burgundy", "ribbon-cobalt"],
  },
  {
    id: "health", name: "Healthcare & Nursing", icon: "heart", tag: "Healthcare",
    accent: "#117a8b", accent2: "#3aa7a0",
    blurb: "Nursing & allied health. Licenses, certifications and clinical care first.",
    designs: ["vitals", "ledger", "connect", "slate", "veritas", "split-forest", "dossier-espresso", "kraft-olive"],
  },
  {
    id: "data", name: "Data & Analytics", icon: "grid", tag: "Data",
    accent: "#4f46e5", accent2: "#06b6d4",
    blurb: "Data science & analytics. Model lift, experiments and business impact.",
    designs: ["cobalt", "helix", "quartz", "veritas", "meridian", "nova-electric", "luxe-gold", "neon-magenta", "brut-ink", "carbon-lime", "blueprint-slate", "mesh-aurora"],
  },
  {
    id: "grad", name: "Recent Graduate", icon: "cap", tag: "Entry-level",
    accent: "#2563eb", accent2: "#7c3aed",
    blurb: "New grads & early career. Education, projects and internships do the lifting.",
    designs: ["quartz", "mono", "cascade", "pixel", "aurora", "pop-cyan", "nova-magenta", "zine-ink", "bauhaus-red", "pastel-mint", "index-teal", "bento-teal"],
  },
];

// attach the data object + a paired cover-letter layout to each profile
const COVER_PAIR = {
  swe: "cl-modern", design: "cl-creative", finance: "cl-classic", marketing: "cl-bold",
  sales: "cl-bold", health: "cl-classic", data: "cl-modern", grad: "cl-minimal",
};
PROFILES.forEach((p) => { p.data = PROFILE_RESUMES[p.id]; p.coverTpl = "cl-" + (p.designs[0] || "spectrum"); });

const getProfile = (id) => PROFILES.find((p) => p.id === id) || PROFILES[0];
// which profile "owns" a résumé template id (for default data when picking from the flat list)
const profileForTemplate = (tid) => PROFILES.find((p) => p.designs.includes(tid));

// ---- cover-letter layout templates -------------------------------------
//  layout: classic | modern | minimal | bold | executive | creative | dark | mono
//  serif: true/false overrides the layout's default type voice.
//  100 designs — one matched to each résumé template (id: cl-<resumeId>).
const COVER_TEMPLATES = [
  { id: "cl-spectrum", name: "Spectrum", tag: "Creative", layout: "modern", match: "spectrum", accent: "#6d5cff", accent2: "#ff5ca8", swatch: ["#6d5cff", "#ff5ca8", "#0f1020"], blurb: "Matches your Spectrum résumé — a colored contact rail in the same palette." },
  { id: "cl-aurora", name: "Aurora", tag: "Modern", layout: "bold", serif: false, match: "aurora", accent: "#13b6a8", accent2: "#5b8cff", swatch: ["#13b6a8", "#5b8cff", "#f7fbfb"], blurb: "Matches your Aurora résumé — a color-blocked header band in the same palette." },
  { id: "cl-ember", name: "Ember", tag: "Editorial", layout: "creative", serif: true, match: "ember", accent: "#f4663a", accent2: "#ffb43d", swatch: ["#f4663a", "#ffb43d", "#fffaf4"], blurb: "Matches your Ember résumé — a two-tone display header in the same palette." },
  { id: "cl-mono", name: "Mono", tag: "Minimal", layout: "minimal", serif: false, match: "mono", accent: "#111111", accent2: "#6b6b6b", swatch: ["#111111", "#6b6b6b", "#ffffff"], blurb: "Matches your Mono résumé — a quiet typographic letter in the same palette." },
  { id: "cl-prism", name: "Prism", tag: "Playful", layout: "creative", serif: true, match: "prism", accent: "#7c3aed", accent2: "#06b6d4", swatch: ["#7c3aed", "#06b6d4", "#fef9c3"], blurb: "Matches your Prism résumé — a two-tone display header in the same palette." },
  { id: "cl-atlas", name: "Atlas", tag: "Modern", layout: "modern", match: "atlas", accent: "#e0b020", accent2: "#2b2b2f", swatch: ["#e0b020", "#1c1c20", "#f5f5f3"], blurb: "Matches your Atlas résumé — a colored contact rail in the same palette." },
  { id: "cl-onyx", name: "Onyx", tag: "Creative", layout: "dark", serif: false, match: "onyx", accent: "#7c6cff", accent2: "#3ad6c0", swatch: ["#7c6cff", "#3ad6c0", "#161b29"], blurb: "Matches your Onyx résumé — a premium dark letter in the same palette." },
  { id: "cl-quill", name: "Quill", tag: "Editorial", layout: "classic", serif: true, match: "quill", accent: "#7a2e3a", accent2: "#b08a5a", swatch: ["#7a2e3a", "#b08a5a", "#fbf9f5"], blurb: "Matches your Quill résumé — a centered serif letterhead in the same palette." },
  { id: "cl-wolfe", name: "Wolfe", tag: "Finance", layout: "executive", serif: true, match: "wolfe", accent: "#14233f", accent2: "#5a6678", swatch: ["#14233f", "#5a6678", "#ffffff"], blurb: "Matches your Wolfe résumé — a monogram letterhead in the same palette." },
  { id: "cl-ledger", name: "Ledger", tag: "Finance", layout: "classic", serif: true, match: "ledger", accent: "#20493f", accent2: "#6f8a82", swatch: ["#20493f", "#6f8a82", "#ffffff"], blurb: "Matches your Ledger résumé — a centered serif letterhead in the same palette." },
  { id: "cl-beacon", name: "Beacon", tag: "Consulting", layout: "classic", serif: true, match: "beacon", accent: "#15425c", accent2: "#3f7da0", swatch: ["#15425c", "#3f7da0", "#ffffff"], blurb: "Matches your Beacon résumé — a centered serif letterhead in the same palette." },
  { id: "cl-summit", name: "Summit", tag: "Executive", layout: "executive", serif: true, match: "summit", accent: "#2a2a2e", accent2: "#b8924f", swatch: ["#2a2a2e", "#b8924f", "#faf9f6"], blurb: "Matches your Summit résumé — a monogram letterhead in the same palette." },
  { id: "cl-bolt", name: "Bolt", tag: "Sales", layout: "bold", serif: false, match: "bolt", accent: "#ef5b2b", accent2: "#ffb020", swatch: ["#ef5b2b", "#ffb020", "#0e0f14"], blurb: "Matches your Bolt résumé — a color-blocked header band in the same palette." },
  { id: "cl-cobalt", name: "Cobalt", tag: "Tech", layout: "minimal", serif: false, match: "cobalt", accent: "#2563eb", accent2: "#475569", swatch: ["#2563eb", "#0f172a", "#ffffff"], blurb: "Matches your Cobalt résumé — a quiet typographic letter in the same palette." },
  { id: "cl-terminal", name: "Terminal", tag: "Tech", layout: "mono", match: "terminal", accent: "#1f8a5b", accent2: "#0f8a7a", swatch: ["#1f8a5b", "#0f1b14", "#f3f6f3"], blurb: "Matches your Terminal résumé — a monospace developer letter in the same palette." },
  { id: "cl-forge", name: "Forge", tag: "Engineering", layout: "modern", match: "forge", accent: "#c2691c", accent2: "#2b2f36", swatch: ["#c2691c", "#2b2f36", "#f5f5f3"], blurb: "Matches your Forge résumé — a colored contact rail in the same palette." },
  { id: "cl-vertex", name: "Vertex", tag: "Bold", layout: "bold", serif: false, match: "vertex", accent: "#2f4bff", accent2: "#00c2ff", swatch: ["#2f4bff", "#00c2ff", "#0a0e1f"], blurb: "Matches your Vertex résumé — a color-blocked header band in the same palette." },
  { id: "cl-scholar", name: "Scholar", tag: "Academic", layout: "classic", serif: true, match: "scholar", accent: "#5b2333", accent2: "#8a6d4f", swatch: ["#5b2333", "#8a6d4f", "#fbf9f6"], blurb: "Matches your Scholar résumé — a centered serif letterhead in the same palette." },
  { id: "cl-statute", name: "Statute", tag: "Legal", layout: "classic", serif: true, match: "statute", accent: "#20283f", accent2: "#7a3b46", swatch: ["#20283f", "#7a3b46", "#fbfaf7"], blurb: "Matches your Statute résumé — a centered serif letterhead in the same palette." },
  { id: "cl-vitals", name: "Vitals", tag: "Healthcare", layout: "minimal", serif: false, match: "vitals", accent: "#117a8b", accent2: "#3aa7a0", swatch: ["#117a8b", "#3aa7a0", "#f4fbfb"], blurb: "Matches your Vitals résumé — a quiet typographic letter in the same palette." },
  { id: "cl-federal", name: "Federal", tag: "Government", layout: "classic", serif: true, match: "federal", accent: "#13315c", accent2: "#8a1f2b", swatch: ["#13315c", "#8a1f2b", "#ffffff"], blurb: "Matches your Federal résumé — a centered serif letterhead in the same palette." },
  { id: "cl-canvas", name: "Canvas", tag: "Marketing", layout: "bold", serif: false, match: "canvas", accent: "#c026d3", accent2: "#f97316", swatch: ["#c026d3", "#f97316", "#fff7fb"], blurb: "Matches your Canvas résumé — a color-blocked header band in the same palette." },
  { id: "cl-pixel", name: "Pixel", tag: "Design", layout: "creative", serif: true, match: "pixel", accent: "#5b5bd6", accent2: "#00b3a4", swatch: ["#5b5bd6", "#00b3a4", "#ffffff"], blurb: "Matches your Pixel résumé — a two-tone display header in the same palette." },
  { id: "cl-connect", name: "Connect", tag: "BPO", layout: "modern", match: "connect", accent: "#0e8aa0", accent2: "#16b3b0", swatch: ["#0e8aa0", "#16b3b0", "#f3fbfb"], blurb: "Matches your Connect résumé — a colored contact rail in the same palette." },
  { id: "cl-globe", name: "Globe", tag: "International", layout: "modern", match: "globe", accent: "#2557a7", accent2: "#2aa39a", swatch: ["#2557a7", "#2aa39a", "#f5f8fc"], blurb: "Matches your Globe résumé — a colored contact rail in the same palette." },
  { id: "cl-slate", name: "Slate", tag: "Professional", layout: "classic", serif: true, match: "slate", accent: "#1f3a5f", accent2: "#5a7a9c", swatch: ["#1f3a5f", "#5a7a9c", "#ffffff"], blurb: "Matches your Slate résumé — a centered serif letterhead in the same palette." },
  { id: "cl-meridian", name: "Meridian", tag: "Modern", layout: "modern", match: "meridian", accent: "#4f46e5", accent2: "#06b6d4", swatch: ["#4f46e5", "#06b6d4", "#f6f7fb"], blurb: "Matches your Meridian résumé — a colored contact rail in the same palette." },
  { id: "cl-quartz", name: "Quartz", tag: "Minimal", layout: "minimal", serif: false, match: "quartz", accent: "#2d2d33", accent2: "#8a8a94", swatch: ["#2d2d33", "#8a8a94", "#ffffff"], blurb: "Matches your Quartz résumé — a quiet typographic letter in the same palette." },
  { id: "cl-helix", name: "Helix", tag: "Tech", layout: "bold", serif: false, match: "helix", accent: "#6d28d9", accent2: "#14b8a6", swatch: ["#6d28d9", "#14b8a6", "#f7f7fb"], blurb: "Matches your Helix résumé — a color-blocked header band in the same palette." },
  { id: "cl-marigold", name: "Marigold", tag: "Bold", layout: "bold", serif: false, match: "marigold", accent: "#ea8c00", accent2: "#e0492b", swatch: ["#ea8c00", "#e0492b", "#fffaf2"], blurb: "Matches your Marigold résumé — a color-blocked header band in the same palette." },
  { id: "cl-veritas", name: "Veritas", tag: "Professional", layout: "classic", serif: true, match: "veritas", accent: "#0e7490", accent2: "#155e75", swatch: ["#0e7490", "#155e75", "#ffffff"], blurb: "Matches your Veritas résumé — a centered serif letterhead in the same palette." },
  { id: "cl-cascade", name: "Cascade", tag: "Modern", layout: "classic", serif: true, match: "cascade", accent: "#2563eb", accent2: "#7c3aed", swatch: ["#2563eb", "#7c3aed", "#f7f9fc"], blurb: "Matches your Cascade résumé — a centered serif letterhead in the same palette." },
  { id: "cl-horizon-azure", name: "Horizon Azure", tag: "Modern", layout: "bold", serif: false, match: "horizon-azure", accent: "#2563eb", accent2: "#06b6d4", swatch: ["#2563eb", "#06b6d4", "#ffffff"], blurb: "Matches your Horizon Azure résumé — a color-blocked header band in the same palette." },
  { id: "cl-horizon-plum", name: "Horizon Plum", tag: "Bold", layout: "bold", serif: false, match: "horizon-plum", accent: "#7c3aed", accent2: "#db2777", swatch: ["#7c3aed", "#db2777", "#ffffff"], blurb: "Matches your Horizon Plum résumé — a color-blocked header band in the same palette." },
  { id: "cl-horizon-pine", name: "Horizon Pine", tag: "Modern", layout: "bold", serif: false, match: "horizon-pine", accent: "#0f766e", accent2: "#22c55e", swatch: ["#0f766e", "#22c55e", "#ffffff"], blurb: "Matches your Horizon Pine résumé — a color-blocked header band in the same palette." },
  { id: "cl-margin-slate", name: "Margin Slate", tag: "Professional", layout: "minimal", serif: false, match: "margin-slate", accent: "#334155", accent2: "#0ea5e9", swatch: ["#334155", "#0ea5e9", "#ffffff"], blurb: "Matches your Margin Slate résumé — a quiet typographic letter in the same palette." },
  { id: "cl-margin-clay", name: "Margin Clay", tag: "Professional", layout: "minimal", serif: false, match: "margin-clay", accent: "#b45309", accent2: "#ea580c", swatch: ["#b45309", "#ea580c", "#fffdf8"], blurb: "Matches your Margin Clay résumé — a quiet typographic letter in the same palette." },
  { id: "cl-margin-berry", name: "Margin Berry", tag: "Professional", layout: "minimal", serif: false, match: "margin-berry", accent: "#9d174d", accent2: "#db2777", swatch: ["#9d174d", "#db2777", "#fff8fb"], blurb: "Matches your Margin Berry résumé — a quiet typographic letter in the same palette." },
  { id: "cl-tabbed-indigo", name: "Tabbed Indigo", tag: "Modern", layout: "modern", match: "tabbed-indigo", accent: "#4f46e5", accent2: "#06b6d4", swatch: ["#4f46e5", "#06b6d4", "#f4f5fd"], blurb: "Matches your Tabbed Indigo résumé — a colored contact rail in the same palette." },
  { id: "cl-tabbed-teal", name: "Tabbed Teal", tag: "Modern", layout: "modern", match: "tabbed-teal", accent: "#0d9488", accent2: "#14b8a6", swatch: ["#0d9488", "#14b8a6", "#f1faf9"], blurb: "Matches your Tabbed Teal résumé — a colored contact rail in the same palette." },
  { id: "cl-tabbed-graphite", name: "Tabbed Graphite", tag: "Professional", layout: "modern", match: "tabbed-graphite", accent: "#374151", accent2: "#6b7280", swatch: ["#374151", "#6b7280", "#f5f6f7"], blurb: "Matches your Tabbed Graphite résumé — a colored contact rail in the same palette." },
  { id: "cl-underscore-ink", name: "Underscore Ink", tag: "Minimal", layout: "minimal", serif: false, match: "underscore-ink", accent: "#111827", accent2: "#6b7280", swatch: ["#111827", "#6b7280", "#ffffff"], blurb: "Matches your Underscore Ink résumé — a quiet typographic letter in the same palette." },
  { id: "cl-underscore-blue", name: "Underscore Blue", tag: "Minimal", layout: "minimal", serif: false, match: "underscore-blue", accent: "#1d4ed8", accent2: "#3b82f6", swatch: ["#1d4ed8", "#3b82f6", "#ffffff"], blurb: "Matches your Underscore Blue résumé — a quiet typographic letter in the same palette." },
  { id: "cl-underscore-rose", name: "Underscore Rose", tag: "Minimal", layout: "minimal", serif: false, match: "underscore-rose", accent: "#be123c", accent2: "#fb7185", swatch: ["#be123c", "#fb7185", "#fffafb"], blurb: "Matches your Underscore Rose résumé — a quiet typographic letter in the same palette." },
  { id: "cl-postcard-bordeaux", name: "Postcard Bordeaux", tag: "Editorial", layout: "creative", serif: true, match: "postcard-bordeaux", accent: "#7a2e3a", accent2: "#b08a5a", swatch: ["#7a2e3a", "#b08a5a", "#fbf9f5"], blurb: "Matches your Postcard Bordeaux résumé — a two-tone display header in the same palette." },
  { id: "cl-postcard-forest", name: "Postcard Forest", tag: "Editorial", layout: "creative", serif: true, match: "postcard-forest", accent: "#1f4d3a", accent2: "#6f8a82", swatch: ["#1f4d3a", "#6f8a82", "#ffffff"], blurb: "Matches your Postcard Forest résumé — a two-tone display header in the same palette." },
  { id: "cl-postcard-navy", name: "Postcard Navy", tag: "Editorial", layout: "creative", serif: true, match: "postcard-navy", accent: "#1e293b", accent2: "#64748b", swatch: ["#1e293b", "#64748b", "#ffffff"], blurb: "Matches your Postcard Navy résumé — a two-tone display header in the same palette." },
  { id: "cl-signal-violet", name: "Signal Violet", tag: "Tech", layout: "modern", match: "signal-violet", accent: "#6d28d9", accent2: "#14b8a6", swatch: ["#6d28d9", "#14b8a6", "#f8f7fc"], blurb: "Matches your Signal Violet résumé — a colored contact rail in the same palette." },
  { id: "cl-signal-amber", name: "Signal Amber", tag: "Bold", layout: "modern", match: "signal-amber", accent: "#d97706", accent2: "#f59e0b", swatch: ["#d97706", "#f59e0b", "#fffdf7"], blurb: "Matches your Signal Amber résumé — a colored contact rail in the same palette." },
  { id: "cl-signal-cyan", name: "Signal Cyan", tag: "Tech", layout: "modern", match: "signal-cyan", accent: "#0891b2", accent2: "#22d3ee", swatch: ["#0891b2", "#22d3ee", "#f4fdff"], blurb: "Matches your Signal Cyan résumé — a colored contact rail in the same palette." },
  { id: "cl-nova-magenta", name: "Nova Magenta", tag: "Flamboyant", layout: "dark", serif: false, match: "nova-magenta", accent: "#d6249f", accent2: "#fd5949", swatch: ["#d6249f", "#fd5949", "#ffffff"], blurb: "Matches your Nova Magenta résumé — a premium dark letter in the same palette." },
  { id: "cl-nova-electric", name: "Nova Electric", tag: "Flamboyant", layout: "dark", serif: false, match: "nova-electric", accent: "#5b3df5", accent2: "#11d0e6", swatch: ["#5b3df5", "#11d0e6", "#ffffff"], blurb: "Matches your Nova Electric résumé — a premium dark letter in the same palette." },
  { id: "cl-luxe-gold", name: "Luxe Gold", tag: "Flamboyant", layout: "executive", serif: true, match: "luxe-gold", accent: "#f0c040", accent2: "#e0872f", swatch: ["#f0c040", "#e0872f", "#141019"], blurb: "Matches your Luxe Gold résumé — a monogram letterhead in the same palette." },
  { id: "cl-luxe-orchid", name: "Luxe Orchid", tag: "Flamboyant", layout: "executive", serif: true, match: "luxe-orchid", accent: "#b66bff", accent2: "#ff5cc0", swatch: ["#b66bff", "#ff5cc0", "#141019"], blurb: "Matches your Luxe Orchid résumé — a monogram letterhead in the same palette." },
  { id: "cl-pop-punch", name: "Pop Punch", tag: "Flamboyant", layout: "creative", serif: true, match: "pop-punch", accent: "#ff2e63", accent2: "#ffb703", swatch: ["#ff2e63", "#ffb703", "#fffdf8"], blurb: "Matches your Pop Punch résumé — a two-tone display header in the same palette." },
  { id: "cl-pop-cyan", name: "Pop Cyan", tag: "Flamboyant", layout: "creative", serif: true, match: "pop-cyan", accent: "#08a6c2", accent2: "#ff4d8d", swatch: ["#08a6c2", "#ff4d8d", "#fffdf8"], blurb: "Matches your Pop Cyan résumé — a two-tone display header in the same palette." },
  { id: "cl-mirage", name: "Mirage", tag: "Flamboyant", layout: "dark", serif: false, match: "mirage", accent: "#7c3aed", accent2: "#14b8a6", swatch: ["#7c3aed", "#14b8a6", "#14121f"], blurb: "Matches your Mirage résumé — a premium dark letter in the same palette." },
  { id: "cl-brut-ink", name: "Brutalist Ink", tag: "New age", layout: "bold", serif: false, match: "brut-ink", accent: "#e4002b", accent2: "#16150f", swatch: ["#e4002b", "#16150f", "#f4f3ee"], blurb: "Matches your Brutalist Ink résumé — a color-blocked header band in the same palette." },
  { id: "cl-brut-cobalt", name: "Brutalist Cobalt", tag: "New age", layout: "bold", serif: false, match: "brut-cobalt", accent: "#1f4dff", accent2: "#16150f", swatch: ["#1f4dff", "#16150f", "#f4f3ee"], blurb: "Matches your Brutalist Cobalt résumé — a color-blocked header band in the same palette." },
  { id: "cl-zine-rust", name: "Editorial Rust", tag: "New age", layout: "creative", serif: true, match: "zine-rust", accent: "#b6452c", accent2: "#d98a3d", swatch: ["#b6452c", "#d98a3d", "#fbf8f3"], blurb: "Matches your Editorial Rust résumé — a two-tone display header in the same palette." },
  { id: "cl-zine-ink", name: "Editorial Ink", tag: "New age", layout: "creative", serif: true, match: "zine-ink", accent: "#3b3a8c", accent2: "#7b79c4", swatch: ["#3b3a8c", "#7b79c4", "#fbf8f3"], blurb: "Matches your Editorial Ink résumé — a two-tone display header in the same palette." },
  { id: "cl-neon-acid", name: "Neon Acid", tag: "New age", layout: "dark", serif: false, match: "neon-acid", accent: "#39ff8b", accent2: "#28d0ff", swatch: ["#39ff8b", "#28d0ff", "#0a0e16"], blurb: "Matches your Neon Acid résumé — a premium dark letter in the same palette." },
  { id: "cl-neon-magenta", name: "Neon Pulse", tag: "New age", layout: "dark", serif: false, match: "neon-magenta", accent: "#ff2bd6", accent2: "#5cf0ff", swatch: ["#ff2bd6", "#5cf0ff", "#0a0e16"], blurb: "Matches your Neon Pulse résumé — a premium dark letter in the same palette." },
  { id: "cl-bauhaus-red", name: "Bauhaus Red", tag: "New age", layout: "bold", serif: false, match: "bauhaus-red", accent: "#d62828", accent2: "#f4b400", swatch: ["#d62828", "#f4b400", "#1b1b1b"], blurb: "Matches your Bauhaus Red résumé — a color-blocked header band in the same palette." },
  { id: "cl-bauhaus-blue", name: "Bauhaus Blue", tag: "New age", layout: "bold", serif: false, match: "bauhaus-blue", accent: "#1d4ed8", accent2: "#f4b400", swatch: ["#1d4ed8", "#f4b400", "#1b1b1b"], blurb: "Matches your Bauhaus Blue résumé — a color-blocked header band in the same palette." },
  { id: "cl-split-indigo", name: "Split Indigo", tag: "Modern", layout: "bold", serif: false, match: "split-indigo", accent: "#4338ca", accent2: "#22d3ee", swatch: ["#4338ca", "#22d3ee", "#ffffff"], blurb: "Matches your Split Indigo résumé — a color-blocked header band in the same palette." },
  { id: "cl-split-forest", name: "Split Forest", tag: "Professional", layout: "bold", serif: false, match: "split-forest", accent: "#166534", accent2: "#84cc16", swatch: ["#166534", "#84cc16", "#ffffff"], blurb: "Matches your Split Forest résumé — a color-blocked header band in the same palette." },
  { id: "cl-split-crimson", name: "Split Crimson", tag: "Bold", layout: "bold", serif: false, match: "split-crimson", accent: "#be123c", accent2: "#fb923c", swatch: ["#be123c", "#fb923c", "#ffffff"], blurb: "Matches your Split Crimson résumé — a color-blocked header band in the same palette." },
  { id: "cl-blueprint-cobalt", name: "Blueprint Cobalt", tag: "Engineering", layout: "mono", match: "blueprint-cobalt", accent: "#1f4dff", accent2: "#0ea5e9", swatch: ["#1f4dff", "#0ea5e9", "#f3f6fb"], blurb: "Matches your Blueprint Cobalt résumé — a monospace developer letter in the same palette." },
  { id: "cl-blueprint-slate", name: "Blueprint Slate", tag: "Engineering", layout: "mono", match: "blueprint-slate", accent: "#334155", accent2: "#0891b2", swatch: ["#334155", "#0891b2", "#f3f6fb"], blurb: "Matches your Blueprint Slate résumé — a monospace developer letter in the same palette." },
  { id: "cl-gradrail-sunset", name: "Gradient Sunset", tag: "Bold", layout: "modern", match: "gradrail-sunset", accent: "#f97316", accent2: "#ec4899", swatch: ["#f97316", "#ec4899", "#ffffff"], blurb: "Matches your Gradient Sunset résumé — a colored contact rail in the same palette." },
  { id: "cl-gradrail-ocean", name: "Gradient Ocean", tag: "Modern", layout: "modern", match: "gradrail-ocean", accent: "#2563eb", accent2: "#14b8a6", swatch: ["#2563eb", "#14b8a6", "#ffffff"], blurb: "Matches your Gradient Ocean résumé — a colored contact rail in the same palette." },
  { id: "cl-gradrail-violet", name: "Gradient Violet", tag: "Creative", layout: "modern", match: "gradrail-violet", accent: "#7c3aed", accent2: "#d946ef", swatch: ["#7c3aed", "#d946ef", "#ffffff"], blurb: "Matches your Gradient Violet résumé — a colored contact rail in the same palette." },
  { id: "cl-bento-indigo", name: "Bento Indigo", tag: "Modern", layout: "modern", match: "bento-indigo", accent: "#4f46e5", accent2: "#fcd34d", swatch: ["#4f46e5", "#fcd34d", "#f2f2f0"], blurb: "Matches your Bento Indigo résumé — a colored contact rail in the same palette." },
  { id: "cl-bento-teal", name: "Bento Teal", tag: "Modern", layout: "modern", match: "bento-teal", accent: "#0d9488", accent2: "#bef264", swatch: ["#0d9488", "#bef264", "#f2f2f0"], blurb: "Matches your Bento Teal résumé — a colored contact rail in the same palette." },
  { id: "cl-gazette-ink", name: "Gazette Ink", tag: "Editorial", layout: "classic", serif: true, match: "gazette-ink", accent: "#1a1a17", accent2: "#7a2e2e", swatch: ["#1a1a17", "#7a2e2e", "#fbfaf6"], blurb: "Matches your Gazette Ink résumé — a centered serif letterhead in the same palette." },
  { id: "cl-gazette-oxblood", name: "Gazette Oxblood", tag: "Editorial", layout: "classic", serif: true, match: "gazette-oxblood", accent: "#7a2e2e", accent2: "#b08a5a", swatch: ["#7a2e2e", "#b08a5a", "#fbfaf6"], blurb: "Matches your Gazette Oxblood résumé — a centered serif letterhead in the same palette." },
  { id: "cl-crest-navy", name: "Crest Navy", tag: "Executive", layout: "executive", serif: true, match: "crest-navy", accent: "#1e3a5f", accent2: "#b8924f", swatch: ["#1e3a5f", "#b8924f", "#ffffff"], blurb: "Matches your Crest Navy résumé — a monogram letterhead in the same palette." },
  { id: "cl-crest-burgundy", name: "Crest Burgundy", tag: "Executive", layout: "executive", serif: true, match: "crest-burgundy", accent: "#6d1f33", accent2: "#b8924f", swatch: ["#6d1f33", "#b8924f", "#ffffff"], blurb: "Matches your Crest Burgundy résumé — a monogram letterhead in the same palette." },
  { id: "cl-outline-amber", name: "Outline Amber", tag: "Bold", layout: "minimal", serif: false, match: "outline-amber", accent: "#f59e0b", accent2: "#f59e0b", swatch: ["#f59e0b", "#1f1f25", "#15151a"], blurb: "Matches your Outline Amber résumé — a quiet typographic letter in the same palette." },
  { id: "cl-outline-cyan", name: "Outline Cyan", tag: "Bold", layout: "minimal", serif: false, match: "outline-cyan", accent: "#22d3ee", accent2: "#22d3ee", swatch: ["#22d3ee", "#1f1f25", "#15151a"], blurb: "Matches your Outline Cyan résumé — a quiet typographic letter in the same palette." },
  { id: "cl-carbon-lime", name: "Carbon Lime", tag: "Tech", layout: "dark", serif: false, match: "carbon-lime", accent: "#84cc16", accent2: "#5eead4", swatch: ["#84cc16", "#5eead4", "#111418"], blurb: "Matches your Carbon Lime résumé — a premium dark letter in the same palette." },
  { id: "cl-carbon-azure", name: "Carbon Azure", tag: "Tech", layout: "dark", serif: false, match: "carbon-azure", accent: "#3b82f6", accent2: "#67e8f9", swatch: ["#3b82f6", "#67e8f9", "#111418"], blurb: "Matches your Carbon Azure résumé — a premium dark letter in the same palette." },
  { id: "cl-kraft-clay", name: "Kraft Clay", tag: "Editorial", layout: "minimal", serif: false, match: "kraft-clay", accent: "#a8512c", accent2: "#7a6a3f", swatch: ["#a8512c", "#7a6a3f", "#efe7d6"], blurb: "Matches your Kraft Clay résumé — a quiet typographic letter in the same palette." },
  { id: "cl-kraft-olive", name: "Kraft Olive", tag: "Editorial", layout: "minimal", serif: false, match: "kraft-olive", accent: "#5a6b2f", accent2: "#9a7b3f", swatch: ["#5a6b2f", "#9a7b3f", "#efe7d6"], blurb: "Matches your Kraft Olive résumé — a quiet typographic letter in the same palette." },
  { id: "cl-pastel-lavender", name: "Pastel Lavender", tag: "Creative", layout: "creative", serif: true, match: "pastel-lavender", accent: "#8b5cf6", accent2: "#f0abfc", swatch: ["#8b5cf6", "#f0abfc", "#f7f4fe"], blurb: "Matches your Pastel Lavender résumé — a two-tone display header in the same palette." },
  { id: "cl-pastel-mint", name: "Pastel Mint", tag: "Creative", layout: "creative", serif: true, match: "pastel-mint", accent: "#10b981", accent2: "#86efac", swatch: ["#10b981", "#86efac", "#f1fbf6"], blurb: "Matches your Pastel Mint résumé — a two-tone display header in the same palette." },
  { id: "cl-pastel-peach", name: "Pastel Peach", tag: "Creative", layout: "creative", serif: true, match: "pastel-peach", accent: "#fb7185", accent2: "#fdba74", swatch: ["#fb7185", "#fdba74", "#fff5f3"], blurb: "Matches your Pastel Peach résumé — a two-tone display header in the same palette." },
  { id: "cl-memphis-pop", name: "Memphis Pop", tag: "Playful", layout: "creative", serif: true, match: "memphis-pop", accent: "#7c3aed", accent2: "#f59e0b", swatch: ["#7c3aed", "#f59e0b", "#fffdf5"], blurb: "Matches your Memphis Pop résumé — a two-tone display header in the same palette." },
  { id: "cl-memphis-electric", name: "Memphis Electric", tag: "Playful", layout: "creative", serif: true, match: "memphis-electric", accent: "#2563eb", accent2: "#fb7185", swatch: ["#2563eb", "#fb7185", "#fffdf5"], blurb: "Matches your Memphis Electric résumé — a two-tone display header in the same palette." },
  { id: "cl-dossier-navy", name: "Dossier Navy", tag: "Professional", layout: "executive", serif: true, match: "dossier-navy", accent: "#1e3a5f", accent2: "#5a7a9c", swatch: ["#1e3a5f", "#5a7a9c", "#f6f5f1"], blurb: "Matches your Dossier Navy résumé — a monogram letterhead in the same palette." },
  { id: "cl-dossier-espresso", name: "Dossier Espresso", tag: "Professional", layout: "executive", serif: true, match: "dossier-espresso", accent: "#5b3a29", accent2: "#a07a55", swatch: ["#5b3a29", "#a07a55", "#f6f5f1"], blurb: "Matches your Dossier Espresso résumé — a monogram letterhead in the same palette." },
  { id: "cl-aperture-plum", name: "Aperture Plum", tag: "Creative", layout: "creative", serif: true, match: "aperture-plum", accent: "#9333ea", accent2: "#ec4899", swatch: ["#9333ea", "#ec4899", "#ffffff"], blurb: "Matches your Aperture Plum résumé — a two-tone display header in the same palette." },
  { id: "cl-aperture-azure", name: "Aperture Azure", tag: "Creative", layout: "creative", serif: true, match: "aperture-azure", accent: "#2563eb", accent2: "#06b6d4", swatch: ["#2563eb", "#06b6d4", "#ffffff"], blurb: "Matches your Aperture Azure résumé — a two-tone display header in the same palette." },
  { id: "cl-ribbon-coral", name: "Ribbon Coral", tag: "Modern", layout: "bold", serif: false, match: "ribbon-coral", accent: "#f43f5e", accent2: "#fb923c", swatch: ["#f43f5e", "#fb923c", "#ffffff"], blurb: "Matches your Ribbon Coral résumé — a color-blocked header band in the same palette." },
  { id: "cl-ribbon-cobalt", name: "Ribbon Cobalt", tag: "Modern", layout: "bold", serif: false, match: "ribbon-cobalt", accent: "#2563eb", accent2: "#38bdf8", swatch: ["#2563eb", "#38bdf8", "#ffffff"], blurb: "Matches your Ribbon Cobalt résumé — a color-blocked header band in the same palette." },
  { id: "cl-index-red", name: "Index Red", tag: "Minimal", layout: "minimal", serif: false, match: "index-red", accent: "#dc2626", accent2: "#f87171", swatch: ["#dc2626", "#f87171", "#ffffff"], blurb: "Matches your Index Red résumé — a quiet typographic letter in the same palette." },
  { id: "cl-index-teal", name: "Index Teal", tag: "Minimal", layout: "minimal", serif: false, match: "index-teal", accent: "#0d9488", accent2: "#5eead4", swatch: ["#0d9488", "#5eead4", "#ffffff"], blurb: "Matches your Index Teal résumé — a quiet typographic letter in the same palette." },
  { id: "cl-mesh-aurora", name: "Mesh Aurora", tag: "Bold", layout: "creative", serif: true, match: "mesh-aurora", accent: "#6366f1", accent2: "#22d3ee", swatch: ["#6366f1", "#22d3ee", "#0f1117"], blurb: "Matches your Mesh Aurora résumé — a two-tone display header in the same palette." },
  { id: "cl-mesh-magma", name: "Mesh Magma", tag: "Bold", layout: "creative", serif: true, match: "mesh-magma", accent: "#e11d8f", accent2: "#f59e0b", swatch: ["#e11d8f", "#f59e0b", "#0f1117"], blurb: "Matches your Mesh Magma résumé — a two-tone display header in the same palette." },
];

// ---- per-profile cover-letter draft copy --------------------------------
//  Each draft echoes the field's language and the résumé's headline metrics.
const PROFILE_LETTERS = {
  swe: {
    company: "Vercel", manager: "Ms. Lena Park", managerTitle: "Engineering Manager, Platform",
    role: "Senior Software Engineer",
    paras: [
      "I'm writing to apply for the Senior Software Engineer role on the Platform team. Over the last eight years I've specialized in high-throughput backend systems — most recently at Stripe, where I re-architected payment routing to bring p99 latency from 240ms to 38ms and supported 12K requests per second at peak.",
      "What draws me to Vercel is your obsession with developer experience and the discipline it takes to make complex infrastructure feel simple. I've led a 60-service migration to a shared gRPC mesh that cut cross-service errors by 73%, and I designed an idempotency layer that eliminated duplicate charges across $4B in annual volume. I care as much about clean failure modes and on-call ergonomics as I do about the happy path.",
      "I'd welcome the chance to bring that systems thinking to your team, and to keep mentoring the engineers around me as I have throughout my career. Thank you for your consideration — I'd love to talk.",
    ],
  },
  design: {
    company: "Linear", manager: "Mr. Tom Reyes", managerTitle: "Head of Design",
    role: "Senior Product Designer",
    paras: [
      "I'm excited to apply for the Senior Product Designer position. I'm a product designer with six years shipping consumer apps, now building the interfaces I used to hand off — I pair systems thinking with front-end craft to take ideas from sketch to production.",
      "Linear's bar for craft is exactly the environment I do my best work in. At Lumen Labs I led an onboarding redesign that lifted activation 34% across 1.2M monthly users, and I built and maintained a design system adopted by 40+ engineers across six squads. I prototype in code to validate motion before handoff, which has cut our design-to-ship time in half.",
      "I'd love to bring that blend of systems and detail to your team. Thank you for considering my application — I've attached my résumé and portfolio and would be glad to walk you through the work.",
    ],
  },
  finance: {
    company: "Blackstone", manager: "Mr. David Klein", managerTitle: "Vice President, M&A",
    role: "Investment Banking Associate",
    paras: [
      "I am writing to express my interest in the Investment Banking Associate position. As an Associate at Lazard, I have executed nine M&A transactions totaling $14.2B in aggregate deal value across the technology and industrials sectors, owning the operating, LBO and merger models that anchored each process.",
      "I am drawn to Blackstone's reputation for analytical rigor and its scale across asset classes. On a recent $3.1B take-private, the model I built was validated by both sponsor and lender diligence teams, and my comparable analysis repriced an offer up 11%, adding approximately $240M in value for the client. I am equally comfortable running process, managing analysts, and preparing board-ready materials under tight timelines.",
      "I would welcome the opportunity to contribute to your team and discuss how my transaction experience aligns with your needs. Thank you for your time and consideration.",
    ],
  },
  marketing: {
    company: "Webflow", manager: "Ms. Dana Cole", managerTitle: "Director of Growth",
    role: "Growth Marketing Manager",
    paras: [
      "I'd love to be considered for the Growth Marketing Manager role. I'm a full-funnel growth marketer who turns spend into pipeline — at Figma I scaled inbound from $4M to $19M ARR-influenced in 18 months while holding CAC flat.",
      "Webflow sits right at the intersection of product-led and demand-led growth, which is where I'm strongest. I cut blended CAC 31% with a multi-touch attribution model I built in-house, lifted free-to-paid conversion 22% through a nine-email lifecycle program, and grew organic traffic 3.4× to 1.2M monthly visits with a programmatic SEO engine. I'm as comfortable in the spreadsheet as I am in the creative brief.",
      "I'm confident I can help compound Webflow's growth, and I'd welcome the chance to share specifics. Thank you for your consideration.",
    ],
  },
  sales: {
    company: "Databricks", manager: "Mr. Greg Salas", managerTitle: "Regional Sales Director",
    role: "Enterprise Account Executive",
    paras: [
      "I'm reaching out about the Enterprise Account Executive opening. I'm an enterprise seller who lands and expands large accounts — in FY24 I closed $6.4M in new ARR at 142% of quota, earning President's Club and a top-4% ranking across the org.",
      "Databricks' platform sells on value, not features, which is exactly how I run a cycle. I landed my region's largest new logo, a $1.8M three-year commitment, grew a strategic account 5× from $240K to $1.2M ARR through multi-threaded executive selling, and held a 34% win rate against entrenched incumbents. Disciplined pipeline hygiene and MEDDICC qualification are second nature to me.",
      "I'd be glad to walk you through my territory plan and how I'd ramp quickly. Thank you for your time — I look forward to connecting.",
    ],
  },
  health: {
    company: "Cleveland Clinic", manager: "Ms. Karen Boyd", managerTitle: "Nurse Manager, Critical Care",
    role: "ICU Registered Nurse",
    paras: [
      "I am writing to apply for the ICU Registered Nurse position. I am a critical-care RN with seven years of experience in high-acuity medical ICU and telemetry units, currently managing a 1:2 patient ratio caring for ventilated and post-arrest patients at Houston Methodist.",
      "Cleveland Clinic's commitment to patient-centered, evidence-based care reflects my own practice. I have maintained a 98% patient-satisfaction score with zero medication-administration errors over three years, serve on the rapid-response team for 200+ codes annually, and precept new-graduate nurses with 100% first-year retention. I hold active RN licensure, CCRN, and current ACLS, BLS and PALS certifications.",
      "I would be honored to bring my clinical skills and dedication to your team. Thank you for your consideration; I welcome the opportunity to discuss how I can contribute.",
    ],
  },
  data: {
    company: "Netflix", manager: "Dr. Priya Anand", managerTitle: "Manager, Data Science",
    role: "Senior Data Scientist",
    paras: [
      "I'm writing to apply for the Senior Data Scientist role. I build models that move the business — at Amazon I cut demand-forecast error (WMAPE) from 18% to 9.4%, freeing $32M in working capital, and shipped a ranking model that lifted conversion 6.1% in a holdout test worth roughly $48M in incremental revenue.",
      "Netflix's culture of rigorous experimentation is what excites me most. I designed the A/B framework now powering 400+ tests per quarter across my org, and I'm fluent in causal inference and variance-reduction techniques — work I presented in the KDD Applied Data Science track. I move comfortably from notebook to production pipeline to stakeholder review.",
      "I'd love to discuss how I can help your team turn data into decisions. Thank you for your consideration.",
    ],
  },
  grad: {
    company: "Asana", manager: "Ms. Robin Hayes", managerTitle: "Engineering Manager",
    role: "Software Engineer, New Grad",
    paras: [
      "I'm excited to apply for the New Grad Software Engineer role. I'm a Computer Science graduate from Northeastern (GPA 3.8) who just finished a software internship at HubSpot, where I built a settings-search feature in React used by 40K+ daily users and earned a return offer.",
      "I'm drawn to Asana because of your reputation for thoughtful engineering and strong mentorship for early-career developers. During my internship I wrote 80+ tests that lifted service coverage from 61% to 84% and shipped nine PRs to production in twelve weeks. Outside of class I build things for fun — my study-group app StudySync took first place at HackBeanpot 2024.",
      "I learn quickly, take feedback well, and would bring real energy to your team. Thank you for considering my application — I'd be thrilled to talk.",
    ],
  },
};

Object.assign(window, { PROFILES, getProfile, profileForTemplate, COVER_TEMPLATES, PROFILE_LETTERS });
