/* CS & Clarks Job Radar
   Brand: ink #3D3A5C, mid #615E92, lilac #8582CB, slate #56585B, mist #DDE3EC, white */

@font-face { font-family: "Schibsted Grotesk"; font-weight: 400; font-style: normal; font-display: swap; src: url("fonts/sg-400.woff2") format("woff2"); }
@font-face { font-family: "Schibsted Grotesk"; font-weight: 500; font-style: normal; font-display: swap; src: url("fonts/sg-500.woff2") format("woff2"); }
@font-face { font-family: "Schibsted Grotesk"; font-weight: 700; font-style: normal; font-display: swap; src: url("fonts/sg-700.woff2") format("woff2"); }
@font-face { font-family: "Schibsted Grotesk"; font-weight: 800; font-style: normal; font-display: swap; src: url("fonts/sg-800.woff2") format("woff2"); }

:root {
  --ink: #3D3A5C;
  --mid: #615E92;
  --lilac: #8582CB;
  --slate: #56585B;
  --mist: #DDE3EC;
  --white: #FFFFFF;
  --bg: #F1F3F8;
  --line: #D6DCE7;
  --error: #9E2F4E;
  --error-bg: #F8E9EE;
  --ok: #2E6A57;
  --ok-bg: #E5F1EC;

  --font: "Schibsted Grotesk", "Segoe UI", system-ui, -apple-system, sans-serif;
  --step--1: 0.875rem;  /* 14 */
  --step-0: 1.0625rem;  /* 17 */
  --step-1: 1.25rem;    /* 20 */
  --step-2: 1.625rem;   /* 26 */
  --step-3: 2.125rem;   /* 34 */
  --step-hero: clamp(2.5rem, 1.6rem + 3.6vw, 4.25rem);

  --radius-s: 8px;
  --radius-m: 14px;
  --wrap: 1120px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: var(--step-0);
  line-height: 1.55;
  color: var(--ink);
  background: var(--bg);
}
.stats dd { font-variant-numeric: tabular-nums; }
img, svg { display: block; max-width: 100%; }
a { color: var(--mid); text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { color: var(--ink); text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--lilac); outline-offset: 2px; border-radius: 4px; }
h1, h2, h3 { line-height: 1.15; margin: 0 0 0.5em; letter-spacing: -0.01em; }
h2 { font-size: var(--step-2); font-weight: 800; }
h3 { font-size: var(--step-1); font-weight: 700; }
p { margin: 0 0 1em; }
code { font-size: 0.92em; background: var(--mist); padding: 0.1em 0.35em; border-radius: 4px; }
.sr-only, .hp { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 0; background: var(--ink); color: var(--white); padding: 0.6rem 1rem; z-index: 50; }
.skip:focus { left: 1rem; top: 1rem; }
.icon { width: 1.1em; height: 1.1em; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }

/* ---------- Top bar ---------- */
.topbar {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 1.25rem 1.5rem;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
}
.brand { display: flex; align-items: center; gap: 0.7rem; text-decoration: none; color: var(--ink); }
.brand-mark { width: 36px; height: 37px; }
.brand-text { display: flex; flex-direction: column; line-height: 1.05; }
.brand-co { font-size: var(--step--1); color: var(--slate); font-weight: 500; }
.brand-tool { font-size: var(--step-1); font-weight: 800; letter-spacing: -0.02em; }
.topnav { display: flex; align-items: center; gap: 1.1rem; font-size: var(--step--1); font-weight: 500; }
.topnav a { display: inline-flex; align-items: center; gap: 0.35rem; color: var(--ink); text-decoration: none; }
.topnav a:hover { text-decoration: underline; }
.inline { display: inline; margin: 0; }
.linkish { background: none; border: 0; padding: 0; font: inherit; color: var(--mid); cursor: pointer; text-decoration: underline; text-underline-offset: 0.18em; }
.linkish:hover { color: var(--ink); }

/* ---------- Buttons ---------- */
.btn, .btn-quiet {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.4rem;
  font: inherit; font-weight: 700; font-size: var(--step--1);
  padding: 0.7rem 1.15rem; border-radius: var(--radius-s); cursor: pointer; text-decoration: none;
  transition: background-color .15s ease, color .15s ease, border-color .15s ease;
}
.btn { background: var(--ink); color: var(--white); border: 2px solid var(--ink); }
.btn:hover { background: var(--mid); border-color: var(--mid); color: var(--white); text-decoration: none; }
.btn-quiet { background: transparent; color: var(--ink); border: 2px solid var(--line); }
.btn-quiet:hover { border-color: var(--ink); color: var(--ink); text-decoration: none; }
.btn-danger { background: var(--error); border-color: var(--error); }
.btn-danger:hover { background: #7f2340; border-color: #7f2340; }

/* ---------- Hero ---------- */
main { max-width: var(--wrap); margin: 0 auto; padding: 0 1.5rem 3rem; }
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 0.65fr);
  gap: 3rem;
  align-items: center;
  padding: 2.5rem 0 2rem;
}
.hero h1 {
  font-size: var(--step-hero);
  font-weight: 800;
  line-height: 1.0;
  letter-spacing: -0.035em;
  max-width: 13ch;
  margin-bottom: 0.4em;
  text-wrap: balance;
}
.lede { font-size: var(--step-1); color: var(--slate); max-width: 46ch; line-height: 1.5; margin-bottom: 1.75rem; }

/* The scan bar */
.scan {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr) auto;
  background: var(--white);
  border: 2px solid var(--ink);
  border-radius: var(--radius-m);
  padding: 0.35rem;
  gap: 0;
  position: relative;
}
.scan .field { position: relative; padding: 0.45rem 0.9rem 0.35rem; min-width: 0; }
.scan .field + .field { border-left: 1px solid var(--line); }
.scan label { display: block; font-size: 0.8125rem; font-weight: 700; color: var(--mid); margin-bottom: 0.05rem; }
.scan input {
  width: 100%; border: 0; padding: 0.1rem 0 0.25rem; background: transparent;
  font: inherit; font-size: var(--step-1); font-weight: 500; color: var(--ink);
}
.scan input::placeholder { color: #8f93a3; font-weight: 400; }
.scan input:focus { outline: none; }
.scan .field:focus-within { background: var(--bg); border-radius: 10px; }
.scan .field:focus-within + .field, .scan .field + .field:focus-within { border-left-color: transparent; }
.scan .field.is-invalid { background: var(--error-bg); border-radius: 10px; }
.scan .field.is-invalid label { color: var(--error); }
.scan-btn {
  align-self: stretch;
  min-width: 7.5rem;
  border: 0; border-radius: 10px;
  background: var(--ink); color: var(--white);
  font: inherit; font-size: var(--step-1); font-weight: 800; letter-spacing: -0.01em;
  padding: 0 1.6rem; cursor: pointer;
  transition: background-color .15s ease;
}
.scan-btn:hover { background: var(--mid); }
.scan-btn[disabled] { background: var(--mid); cursor: progress; }

.field-msg { margin: 0.2rem 0 0; font-size: var(--step--1); line-height: 1.4; }
.field-msg:empty { display: none; }
.field-msg.is-error, .scan .field.is-invalid .field-msg { color: var(--error); font-weight: 500; }
.field-msg button { font: inherit; font-weight: 700; color: var(--ink); background: var(--white); border: 1px solid var(--line); border-radius: 6px; padding: 0.05rem 0.45rem; margin: 0.15rem 0.3rem 0 0; cursor: pointer; }
.field-msg button:hover { border-color: var(--ink); }

.gate-note { display: flex; gap: 0.5rem; align-items: center; margin: 0.9rem 0 0; font-size: var(--step--1); color: var(--slate); }
.login-panel { margin-top: 1rem; background: var(--white); border: 2px solid var(--lilac); border-radius: var(--radius-m); padding: 1.1rem 1.25rem 0.4rem; }
.login-actions { display: flex; gap: 0.6rem; flex-wrap: wrap; }

/* City suggestions */
.combo-list {
  position: absolute; z-index: 20; left: 0; right: 0; top: calc(100% + 0.5rem);
  list-style: none; margin: 0; padding: 0.35rem;
  background: var(--white); border: 1px solid var(--line); border-radius: 10px;
  box-shadow: 0 12px 28px rgba(61, 58, 92, 0.16);
  max-height: 18rem; overflow-y: auto;
}
.combo-list li { padding: 0.5rem 0.7rem; border-radius: 6px; cursor: pointer; display: flex; justify-content: space-between; gap: 1rem; }
.combo-list li small { color: var(--slate); font-size: var(--step--1); white-space: nowrap; }
.combo-list li[aria-selected="true"], .combo-list li:hover { background: var(--mist); }

/* ---------- Radar ---------- */
.radar-wrap { justify-self: center; width: 100%; max-width: 340px; }
.radar .rings { fill: none; stroke: var(--lilac); stroke-opacity: 0.35; stroke-width: 1; }
.radar .hub { fill: #5C5989; }
.radar .logo-spin { transform-origin: 100px 100px; }
.radar-wrap.is-scanning .logo-spin { animation: spin 4s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.radar .sweep { transform-origin: 100px 100px; transform: rotate(-38deg); }
.radar .sweep-edge { stroke: #C9C7EE; stroke-width: 1.5; }
.radar-wrap.is-scanning .sweep { animation: sweep 2.2s linear infinite; }
.radar-caption { text-align: center; font-size: var(--step--1); color: var(--slate); margin: 0.8rem 0 0; min-height: 1.4em; }
.blip { fill: var(--white); transform-box: fill-box; transform-origin: center; animation: blip .5s ease-out both; }
.blip.is-related { fill: var(--lilac); }
@keyframes sweep { to { transform: rotate(322deg); } }
@keyframes blip { from { transform: scale(0); opacity: 0; } 60% { transform: scale(1.6); opacity: 1; } to { transform: scale(1); } }

/* ---------- Honest notice ---------- */
.notice {
  display: grid; grid-template-columns: auto 1fr; gap: 1rem;
  background: var(--white);
  border-radius: var(--radius-m);
  padding: 1.25rem 1.5rem 0.4rem;
  border: 1px solid var(--line);
  max-width: 62rem;
}
.notice h2 { font-size: var(--step-1); font-weight: 700; margin-bottom: 0.35em; }
.notice p { color: var(--slate); max-width: 72ch; }
.notice p strong { color: var(--ink); }
.notice-icon { color: var(--mid); padding-top: 0.15rem; }
.notice-icon .icon { width: 1.5rem; height: 1.5rem; }

/* ---------- Results ---------- */
.results { margin-top: 3rem; }
.results-head h2 { font-size: var(--step-3); letter-spacing: -0.025em; margin-bottom: 0.2em; }
.results-facts { color: var(--slate); margin-bottom: 1rem; }
.results-facts { display: flex; flex-wrap: wrap; gap: 0.25rem 1.25rem; }
.scan-msg { margin: 0.9rem 0 0; font-size: var(--step--1); font-weight: 500; color: var(--error); }
.scan-msg:empty { display: none; }

.sources { list-style: none; margin: 0 0 1.5rem; padding: 0; display: flex; flex-wrap: wrap; gap: 0.5rem; }
.sources li {
  display: inline-flex; align-items: center; gap: 0.4rem;
  font-size: var(--step--1); padding: 0.3rem 0.7rem; border-radius: 999px;
  background: var(--white); border: 1px solid var(--line); color: var(--slate);
}
.sources li.is-ok { color: var(--ink); }
.sources li.is-ok .icon { color: var(--ok); }
.sources li.is-error .icon { color: var(--error); }
.sources li b { font-weight: 700; }

.jobs { list-style: none; margin: 0; padding: 0; background: var(--white); border-radius: var(--radius-m); border: 1px solid var(--line); }
.job { display: grid; grid-template-columns: minmax(0, 1fr) minmax(12rem, auto); gap: 0.5rem 2rem; padding: 1.25rem 1.5rem; }
.job + .job { border-top: 1px solid var(--line); }
.job h3 { font-size: var(--step-1); margin: 0 0 0.15rem; }
.job h3 a { color: var(--ink); text-decoration: none; }
.job h3 a:hover { text-decoration: underline; }
.job-meta { margin: 0 0 0.4rem; color: var(--slate); font-size: 0.95rem; }
.job-meta strong { color: var(--ink); font-weight: 500; }
.job-tags { display: flex; flex-wrap: wrap; gap: 0.4rem; margin: 0 0 0.5rem; padding: 0; list-style: none; }
.job-tags li { font-size: 0.8125rem; font-weight: 500; padding: 0.12rem 0.5rem; border-radius: 6px; background: var(--bg); color: var(--ink); }
.job-tags li.is-new { background: var(--ink); color: var(--white); }
.job-tags li.is-multi { background: var(--mist); }
.job-snippet { font-size: 0.95rem; color: var(--slate); margin: 0; max-width: 70ch; }
.job-links { display: flex; flex-direction: column; align-items: flex-start; gap: 0.35rem; }
.job-links p { margin: 0; font-size: 0.8125rem; font-weight: 700; color: var(--mid); }
.job-links a {
  display: inline-flex; align-items: center; gap: 0.35rem;
  font-size: var(--step--1); font-weight: 500; color: var(--ink);
  padding: 0.3rem 0.65rem; border: 1px solid var(--line); border-radius: 6px; text-decoration: none; max-width: 100%;
}
.job-links a span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.job-links a:hover { border-color: var(--ink); }
.job-links .icon { width: 0.9em; height: 0.9em; color: var(--mid); }

.empty { background: var(--white); border: 1px dashed var(--lilac); border-radius: var(--radius-m); padding: 1.25rem 1.5rem 0.25rem; }
.related-wrap { margin-top: 1.25rem; }
.jobs-related { margin-top: 1rem; }
.jobs-related .job h3 a { color: var(--mid); }

.elsewhere { margin-top: 2.5rem; }
.elsewhere h3 { font-size: var(--step-2); font-weight: 800; letter-spacing: -0.015em; }
.elsewhere > p { color: var(--slate); }
.elsewhere ul { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr)); gap: 0.6rem; }
.elsewhere a {
  display: flex; flex-direction: column; gap: 0.1rem; height: 100%;
  background: var(--white); color: var(--ink); text-decoration: none;
  padding: 0.85rem 1rem; border-radius: 10px; border: 2px solid var(--line);
}
.elsewhere a:hover { border-color: var(--ink); color: var(--ink); }
.elsewhere a b { display: flex; align-items: center; justify-content: space-between; font-size: var(--step-0); }
.elsewhere a b .icon { color: var(--mid); }
.elsewhere a small { color: var(--slate); font-size: 0.8125rem; }
.elsewhere a.is-own { background: var(--ink); border-color: var(--ink); color: var(--white); }
.elsewhere a.is-own small, .elsewhere a.is-own b .icon { color: var(--mist); }

.cta { margin-top: 2.5rem; padding-top: 1.5rem; border-top: 1px solid var(--line); color: var(--slate); }
.cta a { font-weight: 700; }

/* ---------- Panels, forms (account, admin, privacy) ---------- */
.panel { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-m); padding: 2rem 2.25rem; max-width: 34rem; margin: 2rem auto; }
.panel-wide { max-width: var(--wrap); }
.panel h1 { font-size: var(--step-3); font-weight: 800; letter-spacing: -0.025em; }
.panel h2 { margin-top: 2rem; font-size: var(--step-1); }
.sub, .pending { color: var(--slate); }
.pending { background: var(--bg); padding: 0.7rem 0.9rem; border-radius: var(--radius-s); }
.form .field { margin-bottom: 1rem; }
.form label { display: block; font-weight: 700; font-size: var(--step--1); margin-bottom: 0.3rem; }
.form input[type=text], .form input[type=email], .form input[type=password], .form input[type=number], .form input[type=url], .form input:not([type]), .form select, .form textarea {
  width: 100%; font: inherit; color: var(--ink); background: var(--white);
  border: 2px solid var(--line); border-radius: var(--radius-s); padding: 0.6rem 0.75rem;
}
.form textarea { resize: vertical; font-size: var(--step--1); }
.form input:focus, .form select:focus, .form textarea:focus { border-color: var(--ink); outline: none; }
.form input[aria-invalid=true] { border-color: var(--error); }
.form-narrow { max-width: 22rem; }
.form-row { display: flex; gap: 0.75rem; align-items: flex-end; flex-wrap: wrap; margin-bottom: 0.75rem; }
.form-row .field { margin-bottom: 0; }
.check { display: flex !important; gap: 0.6rem; align-items: flex-start; font-weight: 400 !important; font-size: var(--step--1); margin: 0.6rem 0 1rem; line-height: 1.45; }
.check input { margin-top: 0.2rem; width: 1.05rem; height: 1.05rem; accent-color: var(--ink); flex: none; }
.check.small { margin: 0.35rem 0 0; font-size: 0.8125rem; color: var(--slate); }
.hint { font-size: var(--step--1); color: var(--slate); margin: 0.3rem 0 0; }
.switch { margin-top: 1.25rem; font-size: var(--step--1); }
.alert { display: flex; gap: 0.5rem; align-items: flex-start; padding: 0.75rem 1rem; border-radius: var(--radius-s); font-size: var(--step--1); }
.alert .icon { margin-top: 0.15rem; }
.alert.is-error { background: var(--error-bg); color: var(--error); }
.alert.is-ok { background: var(--ok-bg); color: var(--ok); }
.facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; margin: 0 0 1.5rem; }
.facts dt, .stats dt { font-size: 0.8125rem; color: var(--slate); }
.facts dd { margin: 0; font-weight: 500; overflow-wrap: anywhere; }
.block { border-top: 1px solid var(--line); padding: 1rem 0; }
.block summary { cursor: pointer; font-weight: 700; }
.block[open] summary { margin-bottom: 1rem; }
.block.danger summary { color: var(--error); }

.admin-head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.admin-head form { margin: 0; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr)); gap: 1rem; margin: 1rem 0 0; }
.stats div { background: var(--bg); border-radius: 10px; padding: 0.9rem 1rem; }
.stats dd { margin: 0.2rem 0 0; font-size: var(--step-2); font-weight: 800; }
.table-scroll { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: var(--step--1); }
.table th { text-align: left; font-weight: 700; color: var(--slate); border-bottom: 2px solid var(--line); padding: 0.5rem 0.6rem; }
.table td { border-bottom: 1px solid var(--line); padding: 0.55rem 0.6rem; vertical-align: top; }
.row-actions { white-space: nowrap; }
.row-actions form { display: inline; margin: 0 0.6rem 0 0; }
.danger-text { color: var(--error); }
.choices { border: 0; padding: 0; margin: 0 0 1rem; display: grid; gap: 0.5rem; }
.choice { display: flex !important; gap: 0.7rem; align-items: flex-start; font-weight: 400 !important; background: var(--bg); border-radius: 10px; padding: 0.8rem 1rem; cursor: pointer; }
.choice input { margin-top: 0.3rem; accent-color: var(--ink); }
.choice:has(input:checked) { outline: 2px solid var(--ink); }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 1rem; }
.span-2 { grid-column: span 2; }
.source-card { border: 1px solid var(--line); border-radius: 10px; padding: 1rem 1.25rem 0.25rem; margin-bottom: 1rem; }
.source-card h3 { margin-bottom: 0.25rem; }
.source-card > p { font-size: var(--step--1); color: var(--slate); }

.prose { max-width: 44rem; }
.prose p, .prose li { max-width: 68ch; }
.prose ul { padding-left: 1.2rem; }
.prose li { margin-bottom: 0.5rem; }

/* ---------- Footer ---------- */
.foot { max-width: var(--wrap); margin: 0 auto; padding: 1.5rem 1.5rem 2.5rem; border-top: 1px solid var(--line); font-size: var(--step--1); color: var(--slate); display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.foot p { margin: 0; }

/* ---------- Small screens ---------- */
@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; gap: 1.5rem; padding-top: 1rem; }
  .radar-wrap { max-width: 220px; order: -1; justify-self: start; display: none; }
  .radar-wrap.is-active { display: block; justify-self: center; order: 0; }
  .scan { grid-template-columns: 1fr; padding: 0.4rem; }
  .scan .field + .field { border-left: 0; border-top: 1px solid var(--line); }
  .scan-btn { padding: 0.85rem; margin-top: 0.35rem; }
  .job { grid-template-columns: 1fr; padding: 1.1rem 1.1rem; }
  .job-links { flex-direction: row; flex-wrap: wrap; }
  .job-links p { width: 100%; }
  .grid-3 { grid-template-columns: 1fr; }
  .span-2 { grid-column: auto; }
  .panel { padding: 1.5rem 1.25rem; }
  .facts { grid-template-columns: 1fr; }
}
@media (max-width: 520px) {
  .topbar { padding: 1rem; }
  main { padding: 0 1rem 2rem; }
  .topnav .btn-quiet { padding: 0.5rem 0.7rem; }
  .brand-co { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
  .radar-wrap.is-scanning .sweep { animation: none; }
  .radar-wrap.is-scanning .rings { stroke-opacity: 0.7; }
}
[tabindex="-1"]:focus { outline: none; }
.admin-filters { font-size: var(--step--1); color: var(--slate); }
.problems { margin: 0.5rem 0; padding-left: 1.1rem; }
.problems code { font-size: 0.8rem; background: transparent; padding: 0; overflow-wrap: anywhere; }
