/* Onboarding, in the website's style: the landing page's colours, type and squared form
   fields (../shared.css and ../landing.css), with its numbered stepper. The tokens are
   copied here rather than linked, because the mock backend and `cv-graph serve` serve
   only this folder. Told's own UI (the interview) has 8px corners; form fields have 3px. */
:root {
  --paper: #f2f3f6;
  --field: #ffffff;
  --print: #1b1c21;
  --muted: #5a5f6e;
  --rule: #c8cfe2;
  --brand: #1f3fc4;
  --on-brand: #ffffff;
  --brand-soft: color-mix(in srgb, var(--brand) 10%, var(--field));
  --danger: #b42318;
  --ok: #18794e;
  --ui: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --wordmark: "Schibsted Grotesk", "Helvetica Neue", Arial, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --paper: #14151b; --field: #1c1e26; --print: #e8e9ef; --muted: #a1a5b5; --rule: #343951;
    --brand: #8eaaff; --on-brand: #14151b; --danger: #ff8a7a; --ok: #5fd39a;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--print);
  font: 400 17px/1.55 var(--ui);
  font-variation-settings: "wdth" 100;
}
a { color: inherit; }
:focus-visible { outline: 3px solid var(--brand); outline-offset: 3px; }

/* The page column: header, stepper and form share it. */
.masthead, .stepper, main {
  max-width: 800px;
  margin: 0 auto;
  padding-left: max(20px, env(safe-area-inset-left, 0px));
  padding-right: max(20px, env(safe-area-inset-right, 0px));
}

/* Header, as on the account and sign-in pages */
.masthead { display: flex; align-items: center; gap: 16px; padding-block: 22px; }
.logo { display: flex; align-items: center; gap: 10px; margin-right: auto; font-family: var(--wordmark); font-weight: 900; font-size: 24px; line-height: 1; letter-spacing: -0.02em; text-decoration: none; }
.logo svg { width: 30px; height: 30px; }
.account-bar { margin: 0; font-size: 15px; }
.account-bar a { font-weight: 600; }

/* The steps, as the landing page's stepper: a numbered dot, ticked once done */
.stepper {
  position: sticky; top: 0; z-index: 2;
  background: var(--paper);
  border-top: 2px solid var(--print);
  border-bottom: 1.5px solid var(--rule);
}
.steps { display: flex; margin: 0; padding: 14px 0; list-style: none; counter-reset: step; }
.steps li {
  counter-increment: step;
  flex: 1 1 0; min-width: 0;
  position: relative; padding: 4px 8px 4px 34px;
  color: var(--muted); font-size: 15px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  cursor: pointer;
}
/* Positioned, so the current step's underline isn't drawn through its number. */
.steps li::before {
  content: counter(step);
  position: absolute; left: 0; top: 50%; transform: translateY(-50%);
  display: grid; place-items: center;
  width: 26px; height: 26px; border-radius: 50%;
  border: 1.5px solid var(--rule); background: var(--field);
  color: var(--muted); font-size: 12.5px; font-weight: 800;
}
.steps li.done { color: var(--print); }
.steps li.done::before { content: "✓"; background: var(--print); border-color: var(--print); color: var(--paper); }
.steps li.current { color: var(--print); text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 6px; }
.steps li.current::before { border-color: var(--brand); background: var(--brand); color: var(--on-brand); }

/* The form: one step at a time, flat on the page like the landing page */
form { padding-block: 48px 80px; }
section[hidden] { display: none; }
h1, h2, p { margin: 0; }
h1 { font-weight: 800; font-variation-settings: "wdth" 112; font-size: clamp(32px, 5vw, 48px); line-height: 1.02; letter-spacing: -0.02em; text-wrap: balance; }
h2 { margin: 40px 0 6px; font-weight: 800; font-variation-settings: "wdth" 108; font-size: 20px; }
section > p { max-width: 38em; margin-top: 14px; color: var(--muted); }
section > h1 + p { margin-top: 16px; font-size: 19px; }
section > h2 + p { margin-top: 0; }

.hint { color: var(--muted); font-size: 14px; font-weight: 400; }
.note { max-width: 38em; margin-top: 20px; padding: 12px 16px; border-left: 3px solid var(--brand); background: var(--field); color: var(--muted); }
.note p + p, .note p + button { margin-top: 10px; }

/* Fields, squared like the landing page's */
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 20px; margin-top: 24px; }
/* The hint sits beside the label's name, so fields in a row line up. */
label { display: block; font-size: 15px; font-weight: 600; }
label .hint { margin-left: 6px; }
label > input, label > select, label > textarea { display: block; margin-top: 7px; }
input, select, textarea {
  width: 100%;
  min-height: 48px;
  padding: 11px 14px;
  border: 1.5px solid var(--rule); border-radius: 3px;
  background: var(--field); color: var(--print);
  font: 400 17px/1.4 var(--ui);
}
textarea { min-height: 0; line-height: 1.55; resize: vertical; }
select { appearance: none; padding-right: 40px; background: var(--field) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%235a5f6e' stroke-width='2'/%3E%3C/svg%3E") no-repeat right 15px center; cursor: pointer; }
input[type="file"] { min-height: 0; padding: 10px; border-style: dashed; cursor: pointer; }
input[type="file"]::file-selector-button {
  margin-right: 12px; padding: 8px 14px;
  border: 1.5px solid var(--print); border-radius: 3px;
  background: transparent; color: var(--print);
  font: 700 14px/1 var(--ui); cursor: pointer;
}
input::placeholder, textarea::placeholder { color: var(--muted); opacity: 0.75; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 22%, transparent); }

/* Buttons: blue for the main action, outlined for the rest */
button {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 13px 22px;
  border: 2px solid var(--brand); border-radius: 3px;
  background: var(--brand); color: var(--on-brand);
  font: 700 16px/1 var(--ui); font-variation-settings: "wdth" 110;
  cursor: pointer;
}
button:hover { background: transparent; color: var(--brand); }
button:disabled { opacity: 0.5; cursor: default; }
button:disabled:hover { background: var(--brand); color: var(--on-brand); }
button.quiet, button.add, .tags button { background: transparent; color: var(--print); border-color: var(--print); }
button.quiet:hover, button.add:hover { background: var(--print); color: var(--paper); }
button.small, button.remove { padding: 8px 14px; font-size: 14px; border-width: 1.5px; }
button.remove { justify-self: start; margin-top: 4px; border-color: var(--rule); color: var(--muted); }
button.remove:hover { border-color: var(--danger); background: transparent; color: var(--danger); }
button.add { margin-top: 14px; border-style: dashed; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }

/* Jobs, courses and stories: one block each */
.entries { display: grid; gap: 16px; margin-top: 16px; }
.entries:empty { margin-top: 8px; }
.entry { display: grid; gap: 18px; margin: 0; padding: 22px; border: 1.5px solid var(--rule); border-radius: 3px; background: var(--field); min-width: 0; }
.entry .grid { margin-top: 0; }
.entry input, .entry select, .entry textarea { background-color: var(--paper); }
.entry legend { padding: 0 6px; margin-left: -6px; font-weight: 700; font-size: 16px; }
.tags { display: flex; flex-wrap: wrap; gap: 8px; }
.tags button { padding: 7px 14px; border: 1.5px solid var(--rule); font-size: 14px; font-weight: 600; }
.tags button:hover { border-color: var(--print); background: transparent; color: var(--print); }
.tags button[aria-pressed="true"] { border-color: var(--print); background: var(--print); color: var(--paper); }

/* The interview: Told's questions and the user's answers, both in plain type */
.chat { display: flex; flex-direction: column; gap: 10px; margin-top: 24px; }
.chat:empty { display: none; }
.chat p { max-width: 85%; margin: 0; padding: 12px 16px; border-radius: 8px; white-space: pre-wrap; }
.chat .from-us { align-self: flex-start; border: 1.5px solid var(--rule); background: var(--field); font-weight: 600; }
.chat .from-you { align-self: flex-end; background: var(--brand-soft); }
.ask { display: grid; gap: 12px; margin-top: 24px; padding: 22px; border: 1.5px solid var(--brand); border-radius: 8px; background: var(--field); }
.ask .actions { margin-top: 0; }
.question { font-weight: 700; font-size: 19px; line-height: 1.4; }
#interview-done { margin-top: 24px; }

/* Check and send */
#summary { margin-top: 24px; padding: 6px 22px; border: 1.5px solid var(--rule); border-radius: 3px; background: var(--field); }
#summary dl { display: grid; grid-template-columns: minmax(0, 12em) minmax(0, 1fr); margin: 0; }
#summary dt, #summary dd { padding: 12px 0; border-top: 1.5px solid var(--rule); }
#summary dt:first-of-type, #summary dt:first-of-type + dd { border-top: 0; }
#summary dt { padding-right: 16px; color: var(--muted); font-size: 15px; }
#summary dd { margin: 0; overflow-wrap: anywhere; }
details { margin-top: 14px; color: var(--muted); font-size: 15px; }
summary { cursor: pointer; font-weight: 600; }
pre { overflow-x: auto; margin-top: 10px; padding: 14px; border: 1.5px solid var(--rule); border-radius: 3px; background: var(--field); color: var(--print); font-size: 12.5px; }
#cv-file + .hint, #cv-status { margin-top: 8px; }
#extension-status, #send-status { margin-top: 10px; color: var(--muted); }
#send-status a { color: var(--brand); font-weight: 600; }
#sites-offer { margin-top: 24px; }

/* Back and Next */
.pager { display: flex; justify-content: space-between; gap: 12px; margin-top: 48px; padding-top: 24px; border-top: 2px solid var(--print); }
#next { margin-left: auto; }

@media (max-width: 640px) {
  .steps li:not(.current) { flex: none; width: 32px; padding: 13px 0; font-size: 0; }
  .steps li.current { flex: 1 1 auto; }
  form { padding-block: 32px 56px; }
  .entry, .ask, #summary { padding-inline: 16px; }
  #summary dl { grid-template-columns: minmax(0, 1fr); }
  #summary dd { padding-top: 0; border-top: 0; }
  .masthead { flex-wrap: wrap; }
}
