const $ = (s) => document.querySelector(s),
q = new URLSearchParams(location.search);
const screens = [
"home",
"discover",
"applications",
"detail",
"profile",
"cv",
"letter",
"calendar",
"mail",
"settings",
"admin",
"onboarding",
];
const selected = (key, allowed, fallback) =>
allowed.includes(q.get(key)) ? q.get(key) : fallback;
const state = {
concept: selected("concept", "ABCDE".split(""), ""),
screen: selected("screen", screens, "home"),
lang: selected("lang", ["en", "nb"], "en"),
theme: selected("theme", ["light", "dark"], "light"),
phone: q.get("mobile") === "1",
calendarView: "agenda",
trackerView: "list",
query: "",
summary:
"I help people feel welcome, supported and confident. Six years of experience coordinating services, supporting colleagues and improving everyday care.",
title: "Community care coordinator",
name: "Amira Olsen",
letter:
"Dear hiring team,\n\nI am excited to apply for the Community care coordinator position. My experience supporting patients and coordinating multidisciplinary teams would help me contribute to your local service.\n\nI would welcome the opportunity to meet your team.\n\nKind regards,\nAmira Olsen",
};
state.profileSummary = state.summary;
state.country = "";
state.discoveryState = "ready";
const concepts = {
A: {
name: "Clear Desk",
tag: "Minimal productivity workspace",
detail:
"A compact top bar and one working surface. Lists, fast actions and a quiet daily brief.",
trade: "Fast for experienced users; guidance is secondary.",
},
B: {
name: "Next Chapter",
tag: "Friendly career workspace",
detail:
"A guided home, human language and step-by-step preparation. A welcoming companion for a new beginning.",
trade: "Clear next steps; takes more space than a dense tracker.",
},
C: {
name: "Career Atelier",
tag: "Career and document studio",
detail:
"Your professional story is the centre. A document canvas, collection navigation and contextual editing tools.",
trade:
"Excellent for preparing documents; discovery is one room in the studio.",
},
D: {
name: "Northstar",
tag: "Premium career platform",
detail:
"A spacious, editorial opportunity brief with a confident top-level navigation and focused application dossiers.",
trade: "Strong hierarchy and breathing room; fewer items visible at once.",
},
E: {
name: "The Next Move",
tag: "Journey-first career workspace",
detail:
"Organise work around the next meaningful action. A task path connects opportunities, documents, conversations and dates.",
trade: "Reduces disconnected pages; requires learning the journey model.",
},
};
const en = {
home: "Home",
discover: "Explore jobs",
applications: "Applications",
detail: "Application workspace",
profile: "Career Profile",
cv: "CV studio",
letter: "Cover letter",
calendar: "Calendar",
mail: "Correspondence",
settings: "Settings",
admin: "Administration",
onboarding: "Get started",
greeting: "Good morning, Amira.",
intro: "Make room for your next opportunity.",
today: "Your next steps",
week: "Coming up",
explore: "Find an opportunity",
prepare: "Prepare your CV",
view: "View details",
save: "Save to applications",
saved: "Saved to applications",
apply: "Mark as applied",
applied: "Applied",
review: "Review application",
edit: "Edit",
export: "Export preview",
preview: "Preview",
content: "Content",
design: "Design",
history: "History",
search: "Role, skill or employer",
country: "Search country",
language: "Job-ad language",
all: "All occupations",
filters: "More filters",
results: "opportunities",
summary: "Professional summary",
experience: "Experience",
skills: "Skills",
contact: "Contact details",
name: "Full name",
title: "Professional title",
saveChanges: "Save changes",
saveDraft: "Save draft",
send: "Review before sending",
agenda: "Agenda",
month: "Month",
follow: "Schedule follow-up",
reply: "Draft a reply",
complete: "Complete",
continue: "Continue",
skip: "Do this later",
uiLanguage: "Interface language",
docLanguage: "Document language",
privacy: "Privacy & assistance",
notifications: "Notifications",
connections: "Connected accounts",
security: "Security & sessions",
data: "Your data",
settingsIntro: "Your preferences, your pace.",
adminIntro: "Service health and account management.",
synthetic: "Interactive design study · synthetic data · no live service",
back: "All five concepts",
theme: "Theme",
layout: "Preview",
desktop: "Desktop",
mobile: "Mobile",
help: "Help & advanced tools",
board: "Board",
list: "List",
savedCount: "saved",
interviews: "interviews",
drafts: "documents ready",
new: "New",
status: "Status",
source: "Source",
deadline: "Application deadline",
documents: "Documents",
notes: "Notes",
timeline: "Timeline",
details: "Job details",
company: "Employer",
location: "Location",
type: "Working arrangement",
required: "What you will bring",
benefits: "What the role offers",
progress: "Your progress",
sourceNote:
"Synthetic vacancy for concept review. Provider availability is not implied.",
mapNote: "Illustrative location view, not a geographic boundary map.",
exportNote:
"Preview opened. This prototype does not generate a qualified PDF.",
feedback: "Saved in this prototype only.",
reviewNote:
"Review your message and recipient. No email will be sent from this prototype.",
};
const nb = {
...en,
home: "Hjem",
discover: "Finn jobber",
applications: "Søknader",
detail: "Søknadsområde",
profile: "Karriereprofil",
cv: "CV-studio",
letter: "Søknadsbrev",
calendar: "Kalender",
mail: "Korrespondanse",
settings: "Innstillinger",
admin: "Administrasjon",
onboarding: "Kom i gang",
greeting: "God morgen, Amira.",
intro: "Gjør plass til din neste mulighet.",
today: "Dine neste steg",
week: "Dette skjer snart",
explore: "Finn en mulighet",
prepare: "Forbered CV-en",
view: "Se detaljer",
save: "Lagre i søknader",
saved: "Lagret i søknader",
apply: "Marker som søkt",
applied: "Søkt",
review: "Gjennomgå søknaden",
edit: "Rediger",
export: "Eksporter forhåndsvisning",
preview: "Forhåndsvisning",
content: "Innhold",
design: "Utforming",
history: "Historikk",
search: "Stilling, ferdighet eller arbeidsgiver",
country: "Søkeland",
language: "Språk i annonsen",
all: "Alle yrker",
filters: "Flere filtre",
results: "muligheter",
summary: "Profesjonelt sammendrag",
experience: "Erfaring",
skills: "Ferdigheter",
contact: "Kontaktinformasjon",
name: "Fullt navn",
title: "Yrkestittel",
saveChanges: "Lagre endringer",
saveDraft: "Lagre utkast",
send: "Gjennomgå før sending",
agenda: "Agenda",
month: "Måned",
follow: "Planlegg oppfølging",
reply: "Skriv et svar",
complete: "Fullfør",
continue: "Fortsett",
skip: "Gjør dette senere",
uiLanguage: "Grensesnittspråk",
docLanguage: "Dokumentspråk",
privacy: "Personvern og assistanse",
notifications: "Varsler",
connections: "Tilkoblede kontoer",
security: "Sikkerhet og økter",
data: "Dine data",
settingsIntro: "Dine innstillinger, ditt tempo.",
adminIntro: "Tjenestestatus og kontoadministrasjon.",
synthetic:
"Interaktiv designstudie · syntetiske data · ingen aktive tjenester",
back: "Alle fem konsepter",
theme: "Tema",
layout: "Visning",
desktop: "Datamaskin",
mobile: "Mobil",
help: "Hjelp og avanserte verktøy",
board: "Tavle",
list: "Liste",
savedCount: "lagret",
interviews: "intervjuer",
drafts: "dokumenter klare",
new: "Ny",
status: "Status",
source: "Kilde",
deadline: "Søknadsfrist",
documents: "Dokumenter",
notes: "Notater",
timeline: "Tidslinje",
details: "Stillingsdetaljer",
company: "Arbeidsgiver",
location: "Sted",
type: "Arbeidsform",
required: "Dette tar du med deg",
benefits: "Dette tilbyr rollen",
progress: "Din fremgang",
sourceNote:
"Syntetisk stilling for konseptvurdering. Ingen påstand om leverandørtilgang.",
mapNote: "Illustrert stedsvisning, ikke et geografisk grensekart.",
exportNote:
"Forhåndsvisning åpnet. Prototypen lager ikke en kvalifisert PDF.",
feedback: "Kun lagret i denne prototypen.",
reviewNote:
"Gjennomgå melding og mottaker. Ingen e-post sendes fra prototypen.",
};
const t = (k) => (state.lang === "nb" ? nb : en)[k] || k;
const esc = (s) =>
String(s).replace(
/[&<>"']/g,
(c) =>
({ "&": "&", "<": "<", ">": ">", '"': """, "'": "'" })[
c
],
);
const jobs = [
[
"Community care coordinator",
"Fjord Community Health",
"Bergen, Norway",
"Healthcare",
"⌘",
],
[
"Primary school teacher",
"Oakfield Learning Centre",
"Cork, Ireland",
"Education",
"◈",
],
[
"Front-of-house supervisor",
"Harbour House",
"Copenhagen, Denmark",
"Hospitality",
"◒",
],
[
"Electrician",
"North Coast Energy",
"Trondheim, Norway",
"Skilled trades",
"ϟ",
],
[
"Service designer",
"Civic Services Lab",
"Helsinki, Finland",
"Public services",
"◎",
],
[
"Retail team leader",
"Neighbourhood Market",
"Utrecht, Netherlands",
"Retail",
"◇",
],
];
// Each synthetic opportunity keeps its own tracker state for this review session.
const ids = [
"fjord-care",
"oakfield-teacher",
"harbour-supervisor",
"north-coast-electrician",
"civic-designer",
"market-lead",
];
const records = jobs.map((job, i) => ({
id: ids[i],
job,
stage: ["", "applied", "interview", "", "saved", ""][i],
followup: false,
notes: "",
cvSummary: state.summary,
letter: state.letter.replace("Community care coordinator", job[0]),
}));
function trackedCount() {
return records.filter((r) => r.stage === "saved").length;
}
let current = records.find((r) => r.id === q.get("job")) || records[0];
const detailText = [
[
"Coordinate community care, support families and work with local healthcare teams.",
"Koordiner omsorgstjenester, støtt familier og samarbeid med lokale helseteam.",
],
[
"Plan lessons and support pupils in a small primary school team.",
"Planlegg undervisning og følg opp elever i et lite barneskoleteam.",
],
[
"Lead the reception team and coordinate a welcoming guest experience.",
"Led resepsjonsteamet og sørg for at gjestene blir godt tatt imot.",
],
[
"Maintain electrical installations and coordinate repairs with the field team.",
"Vedlikehold elektriske anlegg og koordiner reparasjoner med feltteamet.",
],
[
"Design accessible public services with residents and municipal teams.",
"Utform tilgjengelige offentlige tjenester sammen med innbyggere og kommunale team.",
],
[
"Coordinate shop-floor shifts and coach colleagues in customer service.",
"Koordiner vakter i butikken og veiled kolleger i kundeservice.",
],
];
function jobLink(job, label) {
const id = ids[jobs.indexOf(job)];
return `${label} `;
}
function stageLabel(stage) {
return stage === "interview"
? state.lang === "nb"
? "Intervju"
: "Interview"
: stage === "saved"
? t("savedCount")
: t("applied");
}
const link = (screen, label, cls = "", id = current.id) =>
`${label || t(screen)} `;
const btn = (label, action, primary = false) =>
`${label} `;
function toast(message) {
$(".toast")?.remove();
const el = document.createElement("div");
el.className = "toast";
el.setAttribute("role", "status");
el.textContent = message;
document.body.append(el);
setTimeout(() => el.remove(), 4500);
}
function field(label, value, id, area = false) {
return `${label}${area ? `` : ` `} `;
}
function heading(title, sub = "", actions = "") {
return `
${title} ${sub ? `
${sub}
` : ""}
${actions}
`;
}
function jobRows(items = jobs) {
return `${items.map((j) => `
${j[4]}
${jobLink(j, j[0])} ${j[1]} · ${j[2]}
${records[jobs.indexOf(j)].stage ? stageLabel(records[jobs.indexOf(j)].stage) : j[3]} ${jobLink(j, t("view"))}
`).join("")}
`;
}
function agenda() {
return `${records
.filter((r) => r.followup)
.map(
(r) =>
`
27 Nov
${jobLink(r.job, (state.lang === "nb" ? "Følg opp " : "Follow up with ") + r.job[1])} ${state.lang === "nb" ? "Lagt til i denne prototypen" : "Added in this prototype"}
`,
)
.join(
"",
)}
20 Nov
${state.lang === "nb" ? "Møt teamet i Fjord" : "Meet the Fjord team"} 10:00–10:45 · Europe/Oslo
${jobLink(jobs[0], t("review"))}
22 Nov
${state.lang === "nb" ? "Søknadsfrist: Lærer" : "Deadline: Primary school teacher"} Oakfield Learning Centre
${jobLink(jobs[1], t("view"))}
25 Nov
${state.lang === "nb" ? "Følg opp Harbour House" : "Follow up with Harbour House"} ${state.lang === "nb" ? "Påminnelse, ingen automatisk melding" : "Reminder only, no automatic message"}
`;
}
function tasks() {
return `${state.lang === "nb" ? "Velg erfaring til CV-en for Fjord" : "Choose experience for your Fjord CV"} ${link("cv", t("prepare"))}
${state.lang === "nb" ? "Svar på intervjuinvitasjonen" : "Reply to your interview invitation"} ${link("mail", t("reply"))}
${state.lang === "nb" ? "Se gjennom tre nye muligheter" : "Review three new opportunities"} ${link("discover", t("explore"))}
`;
}
function home() {
let main = `${heading(t("greeting"), t("intro"), link("discover", t("explore")))}${trackedCount()} ${t("savedCount")}
2 ${t("interviews")}
3 ${t("drafts")}
${t("today")} ${link("applications", t("applications"))}${tasks()}
${state.lang === "nb" ? "Nylig aktivitet" : "Recent activity"} ${jobRows(jobs.slice(0, 3))} `;
if (state.concept === "B")
main = `${heading(state.lang === "nb" ? "Et nytt kapittel begynner her." : "Your next chapter starts here.", state.lang === "nb" ? "Ta ett steg i dag. Vi holder orden på resten." : "Take one step today. We’ll help keep everything together.")}
${btn(t("prepare"), "cv", true)}${link("onboarding", state.lang === "nb" ? "Finn din vei" : "Find your starting point")}
${t("today")} ${tasks()}${state.lang === "nb" ? "Du trenger ikke gjøre alt på én gang." : "You don’t need to do everything at once."} ${state.lang === "nb" ? "Profilen din er et godt sted å begynne. Du kan alltid komme tilbake." : "Your profile is a good place to begin. You can always come back."}
${link("profile", t("profile"))}
`;
if (state.concept === "C")
main = `${heading(state.lang === "nb" ? "Arbeidet bak din neste jobb." : "The work behind your next role.", state.lang === "nb" ? "Din erfaring. Dine dokumenter. En tydelig historie." : "Your experience. Your documents. One coherent story.", btn(t("prepare"), "cv", true))}${t("applications")} ${jobRows(jobs.slice(0, 2))}
${t("today")} ${tasks()}${agenda()} `;
if (state.concept === "D")
main = `${state.lang === "nb" ? "Et arbeidsliv som passer deg." : "A working life that fits you."} ${state.lang === "nb" ? "Ditt personlige overblikk, onsdag 18. november." : "Your personal brief, Wednesday 18 November."}
${link("profile", "Amira Olsen")}
${state.lang === "nb" ? "Neste samtale" : "Your next conversation"}
Fjord Community Health ${state.lang === "nb" ? "Et lokalt team. En meningsfull rolle. Forbered deg til fredag." : "A local team. A meaningful role. Get ready for Friday."}
${btn(t("review"), "detail")}${state.lang === "nb" ? "Muligheter verdt å utforske" : "Opportunities worth exploring"} ${jobRows(jobs.slice(0, 3))} `;
if (state.concept === "E")
main = `${heading(state.lang === "nb" ? "Hva er ditt neste steg?" : "What’s your next move?", state.lang === "nb" ? "Samle alt rundt muligheten du jobber med." : "Keep everything together around the opportunity you’re working on.")}${state.lang === "nb" ? "Pågående" : "In progress"} Fjord Community Health Community care coordinator
✓ ${t("savedCount")} ✓ CV ○ ${t("interviews")}
${btn(state.lang === "nb" ? "Fortsett forberedelsen" : "Continue preparing", "detail", true)} ${link("mail", state.lang === "nb" ? "Ny invitasjon fra Elise" : "New invitation from Elise")}${state.lang === "nb" ? "Velg en retning" : "Choose a direction"} ${["discover", "profile", "calendar"].map((s) => `
${link(s, t(s))} ${s === "discover" ? (state.lang === "nb" ? "Finn noe du vil gå videre med" : "Find something worth pursuing") : s === "profile" ? (state.lang === "nb" ? "Samle det du kan" : "Bring your experience together") : state.lang === "nb" ? "Gjør plass til det som kommer" : "Make space for what comes next"}
`).join("")}
`;
return main;
}
function discoveryBase() {
return `${heading(t("discover"), state.lang === "nb" ? "Finn arbeid som passer livet ditt." : "Find work that fits your life.")}${["", "Norway", "Ireland", "Denmark", "Finland", "Netherlands"].map((v) => `${v || (state.lang === "nb" ? "Alle land" : "All countries")} `).join("")} ${btn(t("filters"), "filters")}
${filteredJobs().length} ${t("results")} · ${t("sourceNote")}
${discoveryMarkup()}
`;
}
function applications() {
return `${heading(t("applications"), state.lang === "nb" ? "Fra første interesse til neste samtale." : "From first interest to your next conversation.", btn(t("list"), "list") + btn(t("board"), "board"))}${
state.trackerView === "board"
? `${["saved", "applied", "interview"]
.map(
(stage) =>
`
${stageLabel(stage)} ${records
.filter((r) => r.stage === stage)
.map(
({ job: j }) =>
`${jobLink(j, j[0])} ${j[1]}
${j[2]} ${link("cv", t("prepare"), "", ids[jobs.indexOf(j)])}
`,
)
.join("")}`,
)
.join("")}
`
: jobRows(records.filter((r) => r.stage).map((r) => r.job))
}`;
}
function detail() {
return `${heading(current.job[0], current.job[1] + " · " + current.job[2], btn(current.stage ? t("saved") : t("save"), "save", !current.stage))}${["detail", "cv", "letter", "mail", "calendar"].map((s) => link(s, t(s), s === "detail" ? "active" : "")).join("")}
${current.stage === "applied" || current.stage === "interview" ? stageLabel(current.stage) : state.lang === "nb" ? "Gjør søknaden klar" : "Make your application ready"} ${state.lang === "nb" ? "Velg CV og brev. Gjennomgå alt før du sender via arbeidsgiveren." : "Choose your CV and letter. Review everything before applying through the employer."}
${btn(t("prepare"), "cv", true)}${btn(["applied", "interview"].includes(current.stage) ? t("follow") : t("apply"), ["applied", "interview"].includes(current.stage) ? "follow" : "apply")}
${t("details")} ${detailText[jobs.indexOf(current.job)][state.lang === "nb" ? 1 : 0]}
${t("notes")} ${field(state.lang === "nb" ? "Dine egne notater" : "Your private notes", current.notes, "notes", true)}${btn(t("saveChanges"), "saveNotes")} `;
}
function profile() {
return `${heading(t("profile"), state.lang === "nb" ? "Din erfaring er utgangspunktet. Dokumentene er dine valg." : "Your experience is the source. Your documents are your choices.", btn(t("prepare"), "cv", true))}${field(t("name"), state.name, "name")}${field(t("title"), state.title, "title")}${field(t("summary"), state.profileSummary, "summary", true)}${btn(t("saveChanges"), "profileSave", true)}${t("experience")} ⌘
Care services coordinator Westside Community Centre · 2020–2026
Patient support · Scheduling · Team coordination ${btn(t("edit"), "feedback")}
${state.lang === "nb" ? "Utdanning, språk og mer" : "Education, languages and more"} BSc Health & Social Care · Norsk B2 · English C1
First aid · Volunteer mentor · Community gardening
${t("progress")} ${state.lang === "nb" ? "4 av 6 viktige deler klare" : "4 of 6 key sections ready"}
${state.lang === "nb" ? "Du kan bruke profilen nå. Legg til mer når det passer." : "You can use your profile now. Add more when you’re ready."}
${t("documents")} ${link("cv", "Fjord Health CV", "", "fjord-care")} ${link("letter", "Fjord Health cover letter", "", "fjord-care")} `;
}
function paper(letter = false) {
return `${esc(state.name)} ${esc(state.title)}
Bergen, Norway · amira@example.test ${letter ? `${esc(current.letter)}
` : `${t("summary")} ${esc(current.cvSummary)}
${t("experience")} Care services coordinator Westside Community Centre 2020–2026
Coordinated care schedules for a team of twelve. Helped families navigate local support services. Introduced a clearer weekly handover. ${state.lang === "nb" ? "Utdanning" : "Education"} BSc Health & Social Care 2016–2019
${t("skills")} Patient support · Team coordination · Scheduling
`} `;
}
function studio(letter = false) {
const edit = `${btn(t("content"), "content")}${btn(t("design"), "design")}${btn(t("history"), "history")}
${state.lang === "nb" ? "Dette er en dokumentkopi. Karriereprofilen endres ikke." : "This is a document copy. Your Career Profile stays unchanged."}
${letter ? field(t("letter"), current.letter, "letter", true) : field(t("summary"), current.cvSummary, "summary", true)}${t("docLanguage")}English Norsk bokmål Deutsch Français Ελληνικά Български ${state.lang === "nb" ? "Velg innhold fra profilen" : "Choose content from your profile"} ${["contact", "experience", "skills"].map((k) => ` ${t(k)} `).join("")}${btn(t("saveDraft"), "feedback", true)}${btn(t("export"), "export")}
`;
const doc = paper(letter);
return `${heading(letter ? t("letter") : t("cv"), current.job[1] + " · " + (state.lang === "nb" ? "Utkast, kun prototype" : "Draft, prototype only"), link("detail", t("review")))}${state.concept === "C" ? doc + edit : edit + doc}
`;
}
function calendar() {
return `${heading(t("calendar"), state.lang === "nb" ? "Samtaler, frister og plass til forberedelse." : "Conversations, deadlines and time to prepare.", btn(t("agenda"), "agenda") + btn(t("month"), "month"))}${
state.calendarView === "month"
? `November 2026 ${Array.from(
{ length: 30 },
(_, i) =>
`
${i + 1} ${
i === 26
? records
.filter((r) => r.followup)
.map((r) => "
" + jobLink(r.job, r.job[1]) + "
")
.join("")
: i === 19
? "
10:00 Fjord
"
: i === 21
? "
Oakfield deadline
"
: i === 24
? "
Harbour follow-up
"
: ""
}
`,
).join("")}
`
: `${state.lang === "nb" ? "Tid til å forberede deg" : "Time to prepare"} ${state.lang === "nb" ? "Sett av 30 minutter før intervjuet. Samle spørsmål og dokumenter i søknadsområdet." : "Set aside 30 minutes before your interview. Keep questions and documents in the application workspace."}
${btn(t("review"), "detail", true)} `
}`;
}
function mail() {
return `${heading(t("mail"), state.lang === "nb" ? "Samtaler knyttet til mulighetene dine." : "Conversations connected to your opportunities.")}Fjord Community Health ${state.lang === "nb" ? "Vi vil gjerne møte deg" : "We’d love to meet you"} ${state.lang === "nb" ? "Hei Amira, takk for interessen din. Har du anledning til en samtale fredag klokken 10? Vi gleder oss til å høre mer om erfaringen din." : "Hi Amira, thank you for your interest. Would you be available for a conversation on Friday at 10? We look forward to learning more about your experience."}
Elise Fjord Community Health
${btn(t("calendar"), "calendar")}${jobLink(jobs[0], t("review"))}
${field(t("reply"), state.lang === "nb" ? "Hei Elise, fredag klokken 10 passer fint. Takk for invitasjonen!" : "Hi Elise, Friday at 10 works well. Thank you for the invitation!", "reply", true)}${btn(t("send"), "send", true)} `;
}
function settings() {
return `${heading(t("settings"), t("settingsIntro"))}${["uiLanguage", "privacy", "notifications", "connections", "security", "data"].map((k) => ``).join("")} `;
}
function admin() {
return `${heading(t("admin"), t("adminIntro"))}${state.lang === "nb" ? "Kun demonstrasjon" : "Demonstration only"} ${state.lang === "nb" ? "Alle kontoer og statuser nedenfor er syntetiske." : "All accounts and statuses below are synthetic."}
24 ${state.lang === "nb" ? "kontoer" : "accounts"}
3 ${state.lang === "nb" ? "oppgaver i kø" : "queued tasks"}
0 ${state.lang === "nb" ? "kjente hendelser" : "known incidents"}
${state.lang === "nb" ? "Kontoadministrasjon" : "Account management"} ${["Amira Olsen", "Lukas Weber", "Sofia Silva"].map((n, i) => `${n[0]}
${n} ${i === 0 ? "Administrator" : "Member"} · ${state.lang === "nb" ? "Bekreftet" : "Confirmed"} ${btn(t("view"), "adminDetail")}
`).join("")} `;
}
function onboarding() {
return `${heading(state.lang === "nb" ? "La oss finne ditt utgangspunkt." : "Let’s find your starting point.", state.lang === "nb" ? "Ingen riktig rekkefølge. Velg det som hjelper deg nå." : "There’s no right order. Choose what helps you now.")}${[
[
"discover",
state.lang === "nb"
? "Jeg ser etter nye muligheter"
: "I’m exploring opportunities",
state.lang === "nb"
? "Bla gjennom jobber og lagre det som passer."
: "Browse jobs and save the ones that feel right.",
],
[
"profile",
state.lang === "nb"
? "Jeg vil samle erfaringen min"
: "I want to gather my experience",
state.lang === "nb"
? "Bygg et utgangspunkt du kan bruke igjen."
: "Build a foundation you can reuse.",
],
[
"cv",
state.lang === "nb"
? "Jeg har en søknad å forberede"
: "I have an application to prepare",
state.lang === "nb"
? "Gå rett til CV og søknadsbrev."
: "Go straight to your CV and cover letter.",
],
]
.map(
([s, h, p]) =>
`
${s === "discover" ? "◎" : s === "profile" ? "◈" : "▤"}
${h} ${p}
${btn(t("continue"), s, true)}`,
)
.join(
"",
)}
${link("home", t("skip"))}
`;
}
function gallery() {
document.body.className = "A";
return `Jobjakt design reassessment · November 2026
Five ways to make your next move. Five distinct working prototypes. Explore the same career journeys through different navigation, density and document workflows. Nothing here replaces the current application.
What to compare Try finding a job, saving it, preparing a CV, reviewing a letter and scheduling a follow-up. Switch between desktop and mobile, English and Bokmål, light and dark. These are design prototypes with synthetic data, not provider or production qualification.
Compare screenshots and tradeoffs · Research notes `;
}
function render() {
if (!state.concept) {
$("#app").innerHTML = gallery();
return;
}
const c = concepts[state.concept];
document.documentElement.lang = state.lang === "nb" ? "nb-NO" : "en";
document.body.className = `${state.concept} ${state.theme === "dark" ? "dark" : ""} ${state.phone ? "phone" : ""}`;
const nav =
state.concept === "C"
? [
"home",
"profile",
"cv",
"letter",
"applications",
"discover",
"calendar",
"mail",
"settings",
"admin",
]
: ["home", "discover", "applications", "profile", "calendar"];
const screens = {
home,
discover,
applications,
detail,
profile,
cv: () => studio(),
letter: () => studio(true),
calendar,
mail,
settings,
admin,
onboarding,
};
$("#app").innerHTML =
`${t("back")} Concept ${Object.entries(
concepts,
)
.map(
([id, v]) =>
`${id} · ${v.name} `,
)
.join(
"",
)} ${Object.keys(
screens,
)
.map(
(s) =>
`${t(s)} `,
)
.join(
"",
)} English Norsk ${state.theme === "dark" ? "☀ Light" : "☾ Dark"} ${state.phone ? t("desktop") : t("mobile")} ${(screens[state.screen] || home)()}${t("help")} ${["cv", "letter", "mail", "settings", "admin", "onboarding"].map((s) => link(s, t(s))).join("")}
${state.concept === "E" ? `
${["home", "discover", "applications", "profile", "calendar"].map((s) => link(s, t(s), state.screen === s ? "active" : "")).join("")} ` : ""}
`;
history.replaceState(
null,
"",
`?concept=${state.concept}&screen=${state.screen}&lang=${state.lang}&theme=${state.theme}&job=${current.id}${state.phone ? "&mobile=1" : ""}`,
);
}
document.addEventListener("click", (event) => {
const a = event.target.closest("[data-screen]");
if (a) {
event.preventDefault();
if (a.dataset.job)
current = records.find((r) => r.id === a.dataset.job) || records[0];
state.screen = a.dataset.screen;
render();
window.scrollTo(0, 0);
return;
}
const b = event.target.closest("[data-action]");
if (!b) return;
const action = b.dataset.action;
if (screens.includes(action)) {
if (state.screen === "home" && action === "detail") current = records[0];
state.screen = action;
render();
window.scrollTo(0, 0);
} else if (action === "theme") {
state.theme = state.theme === "light" ? "dark" : "light";
render();
} else if (action === "mobile") {
state.phone = !state.phone;
render();
} else if (action === "save") {
current.stage ||= "saved";
render();
toast(t("saved"));
} else if (action === "apply") {
current.stage = "applied";
render();
toast(t("applied"));
} else if (["agenda", "month", "board", "list"].includes(action)) {
if (["agenda", "month"].includes(action)) state.calendarView = action;
else state.trackerView = action;
render();
} else if (action === "profileSave") {
state.name = $("#name").value;
state.title = $("#title").value;
state.profileSummary = $("#summary").value;
toast(t("feedback"));
} else if (action === "follow") {
current.followup = true;
state.calendarView = "agenda";
state.screen = "calendar";
render();
toast(
state.lang === "nb"
? "Oppfølging lagt til i prototypen"
: "Follow-up added in this prototype",
);
} else if (action === "saveNotes") {
current.notes = $("#notes").value;
toast(t("feedback"));
} else if (action === "export") {
toast(t("exportNote"));
$(".document")?.scrollIntoView({ block: "start" });
} else if (action === "send") {
toast(t("reviewNote"));
} else if (action === "filters") {
toast(
state.lang === "nb"
? "Land og annonsespråk kan velges uavhengig. Kartet er illustrativt."
: "Country and advert language are independent. The map is illustrative.",
);
} else if (action === "design") {
toast(
state.lang === "nb"
? "Ren dokumentstil valgt. Innhold og språk beholdes."
: "Clean document style selected. Content and language retained.",
);
} else if (action === "history") {
toast(
state.lang === "nb"
? "Utkast 3 · I dag 09:40. Prototypen endrer ingen lagrede versjoner."
: "Draft 3 · Today 09:40. No stored revisions are changed by this prototype.",
);
} else if (action === "adminDetail") {
toast(
state.lang === "nb"
? "Siste administrator er beskyttet. Ingen kontoendringer utføres."
: "The last administrator is protected. No account changes are performed.",
);
} else toast(t("feedback"));
});
document.addEventListener("change", (e) => {
if (e.target.id === "country") {
state.country = e.target.value;
render();
}
if (["concept", "screen", "lang"].includes(e.target.id)) {
state[e.target.id] = e.target.value;
render();
}
if (e.target.id === "settingLanguage") {
state.lang = e.target.value;
render();
}
});
document.addEventListener("input", (e) => {
if (e.target.id === "search") {
state.query = e.target.value;
state.discoveryState = "ready";
updateDiscoveryResults();
}
if (e.target.id === "summary" && $("#summaryPreview")) {
current.cvSummary = e.target.value;
$("#summaryPreview").textContent = current.cvSummary;
}
if (e.target.id === "letter" && $("#letterPreview")) {
current.letter = e.target.value;
$("#letterPreview").textContent = current.letter;
}
});
render();
function filteredJobs() {
return jobs.filter(
(j) =>
(!state.country || j[2].endsWith(state.country)) &&
j.join(" ").toLowerCase().includes(state.query.toLowerCase()),
);
}
// Synthetic recovery states; no provider requests are made.
let discoveryTimer;
function discoveryCopy(enText, nbText) {
return state.lang === "nb" ? nbText : enText;
}
function discoveryMarkup() {
const mode = state.discoveryState;
if (mode === "loading")
return `${discoveryCopy("Finding opportunities…", "Finner muligheter…")} ${discoveryCopy("Synthetic loading preview. Your search is retained.", "Syntetisk lastevisning. Søket ditt beholdes.")}
${discoveryCopy("Cancel search", "Avbryt søket")} `;
if (mode === "error")
return `${discoveryCopy("We could not load these jobs", "Vi kunne ikke laste disse stillingene")} ${discoveryCopy("Simulated connection failure. Your filters and saved applications are unchanged.", "Simulert tilkoblingsfeil. Filtrene og lagrede søknader er uendret.")}
${discoveryCopy("Try again", "Prøv igjen")} `;
const rows = mode === "empty" ? [] : filteredJobs();
if (!rows.length)
return `${discoveryCopy("No matching jobs yet", "Ingen passende stillinger ennå")} ${discoveryCopy("Try a broader phrase or another country. You can keep your current search.", "Prøv et bredere søk eller et annet land. Du kan beholde søket ditt.")}
${discoveryCopy("Clear filters and show all jobs", "Nullstill filtre og vis alle stillinger")} ${discoveryCopy("Edit search", "Endre søket")} `;
return (
`${discoveryCopy("Opportunities to explore", "Muligheter å utforske")} ` +
jobRows(rows)
);
}
function discover() {
return (
`${discoveryCopy("Prototype discovery state", "Prototypens søketilstand")}${["ready", "loading", "empty", "error"].map((v, i) => `${(state.lang === "nb" ? ["Klar", "Laster", "Tomt", "Feil"] : ["Ready", "Loading", "Empty", "Error"])[i]} `).join("")} ` +
discoveryBase()
);
}
function updateDiscoveryResults(focus = false) {
if (!$("#jobResults")) return;
$("#jobResults").innerHTML = discoveryMarkup();
const mode = state.discoveryState;
$("#resultCount").textContent =
(mode === "ready"
? filteredJobs().length + " " + t("results")
: discoveryCopy("Prototype state: ", "Prototypetilstand: ") + mode) +
" · " +
t("sourceNote");
const status = $("#discoveryStatus");
$("#discoveryLive").textContent = status?.textContent || "";
if (focus) status?.focus();
}
document.addEventListener("change", (e) => {
if (e.target.id === "discoveryState") {
clearTimeout(discoveryTimer);
state.discoveryState = e.target.value;
updateDiscoveryResults(true);
}
});
document.addEventListener("click", (e) => {
const action = e.target.closest("[data-recovery]")?.dataset.recovery;
if (!action) return;
clearTimeout(discoveryTimer);
if (action === "edit") {
$("#search").focus();
return;
}
if (action === "retry") {
state.discoveryState = "loading";
updateDiscoveryResults(true);
discoveryTimer = setTimeout(() => {
state.discoveryState = "ready";
updateDiscoveryResults(true);
}, 700);
return;
}
state.discoveryState = "ready";
if (action === "clear") {
state.country = "";
state.query = "";
$("#search").value = "";
$("#country").value = "";
}
updateDiscoveryResults(true);
});