/* ---------- My jobs (12 Nov 2026, design I: say less) ----------
   One white list at a time, picked by the Jobs | CVs switch, in a column narrow enough to read
   across. Up next names the one job to work on. Under it a row is a title (two lines at most), one
   quiet line, and on the right one thing: the must-haves the CV shows for a job, labelled once over
   the list, or a download button for a CV. */

.library { max-width: 720px; }
/* The jobs fill more than a screen and the CVs less: keep the scroll bar's room either way, so the
   page doesn't slide sideways when it comes and goes (Macs set to always show scroll bars). */
html:has(.library) { scrollbar-gutter: stable; }
.library__panel { gap: 24px; padding: 0; background: none; box-shadow: none; }
.library__head { flex-direction: row; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 8px 16px; }
.library__headline { margin: 0; font-size: clamp(32px, 4vw, 40px); font-weight: 800; line-height: 1.1; letter-spacing: -0.03em; color: var(--ink); }
.library__headline:focus { outline: none; }

/* Edit, as a white pill on the lilac ground (13 Nov 2026: as words alone it was barely seen). Done,
   while ticking, is the same pill in the accent, so it reads as the way out. */
.library__select {
  min-height: 44px; padding: 0 20px; border: 1px solid var(--line-strong); border-radius: 999px; background: var(--white);
  color: var(--accent); font-family: inherit; font-size: 16px; font-weight: 700; cursor: pointer;
  box-shadow: 0 1px 2px rgba(25, 25, 28, 0.06);
}
.library__select:hover { border-color: var(--accent); color: var(--accent); }
.library__select[aria-pressed="true"] { border-color: var(--accent); background: var(--accent); color: var(--white); }
/* Only the open tab's Edit. */
.library__panel[data-tab-on="jobs"] [data-select="cvs"],
.library__panel[data-tab-on="cvs"] [data-select="jobs"] { display: none; }

/* Jobs | CVs, as a segmented control: two equal sides, the open one white and lifted. The same
   width and weight whichever is open, so switching moves nothing. */
.library__tabs {
  align-self: flex-start; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2px; width: 240px;
  padding: 3px; border-radius: 11px; background: var(--line-strong);
}
.library__tab { min-height: 40px; padding: 0 16px; border-radius: 8px; font-size: 15px; font-weight: 600; color: var(--body); }
.library__tab[aria-selected="true"] { background: var(--white); color: var(--ink); box-shadow: 0 1px 3px rgba(25, 25, 28, 0.14); }

/* Small grey words over a list: what it is, and on the right what its number counts. */
.list-head, .list-heads { margin: 0 0 8px; padding: 0 20px; font-size: 13px; font-weight: 600; color: var(--muted); }
.list-heads { display: flex; justify-content: space-between; gap: 16px; }

/* ---------- Up next ---------- */
.up-next { margin-bottom: 28px; }
.up-next__body {
  display: flex; flex-wrap: wrap; align-items: center; gap: 16px 20px; padding: 20px 24px;
  border-radius: 18px; background: var(--white); box-shadow: 0 1px 2px rgba(25, 25, 28, 0.05);
}
.up-next__words { flex: 1 1 240px; min-width: 0; }
.up-next__job { margin: 0; font-size: 19px; font-weight: 700; line-height: 1.3; color: var(--ink); }
.up-next__says { margin: 4px 0 0; font-size: 15px; color: var(--body); }
.up-next__go { flex: none; }

/* ---------- A list of rows ---------- */
.row-list { margin: 0; padding: 0; list-style: none; overflow: hidden; border-radius: 14px; background: var(--white); box-shadow: 0 1px 2px rgba(25, 25, 28, 0.05); }
.row-list > li + li { border-top: 1px solid var(--line); }
.row-words { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.row-title {
  display: -webkit-box; margin: 0; overflow: hidden; font-size: 17px; font-weight: 600; line-height: 1.3; color: var(--ink);
  -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow-wrap: anywhere;
}
.row-sub { margin: 0; font-size: 14px; color: var(--muted); }
.row-item > .library__message { margin: 0 20px 14px; }

/* Start another check: a line of words under the list. */
.list-add {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px; margin: 8px 0 0 12px; padding: 0 8px;
  color: var(--accent); font-size: 16px; font-weight: 700; text-decoration: none;
}
.list-add:hover { color: var(--ink); }
.list-add svg { width: 18px; height: 18px; }
/* Under the CVs: where to get a copy of everything (13 Nov 2026). */
.list-note { margin: 16px 0 0; padding: 0 20px; font-size: 14px; color: var(--body); }

/* ---------- A job ---------- */
.job-row { display: flex; align-items: center; }
.job-row__link {
  flex: 1; min-width: 0; display: flex; align-items: center; gap: 16px; min-height: 64px; padding: 12px 16px 12px 20px;
  color: var(--ink); text-decoration: none;
}
a.job-row__link[href]:hover { background: #fbf9f7; }
.job-row__link:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; border-radius: 14px; }
.job-row__score { flex: none; display: flex; align-items: center; gap: 8px; }
.job-row__next { font-size: 16px; font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; color: var(--body); }
.library__job[data-next="none"] .job-row__next { color: var(--accent); }
.library__job:is([data-next="wait"], [data-next="failed"]) .job-row__next { color: var(--muted); }
.library__job:is([data-next="none"], [data-next="wait"], [data-next="failed"]) .ring { display: none; }
.job-row__chevron { flex: none; width: 8px; height: 14px; color: var(--brand-muted); }
.library__job:not(:has(a[href])) .job-row__chevron { visibility: hidden; }

/* The ring: how many of the job's must-haves the CV shows. Green when it shows them all. */
.ring { position: relative; flex: none; display: block; }
.ring svg { display: block; width: 100%; height: 100%; transform: rotate(-90deg); }
.ring circle { fill: none; }
.ring__track { stroke: var(--line-strong); }
.ring__fill { stroke: var(--accent); }
.ring--small { width: 18px; height: 18px; }
.ring--small circle { stroke-width: 7; }
.ring--big { width: 56px; height: 56px; }
.ring--big circle { stroke-width: 4; }
.ring--big .ring__fill { stroke-linecap: round; }
.library__job[data-next="done"] .ring__fill { stroke: var(--green); }

/* ---------- A CV ---------- */
.cv-row { display: flex; align-items: center; gap: 12px; min-height: 64px; padding: 12px 8px 12px 20px; }
.doc-download {
  flex: none; display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 16px; border: 0; border-radius: 999px;
  background: var(--tint); color: var(--brand); font-family: inherit; font-size: 15px; font-weight: 700; cursor: pointer;
}
.doc-download:hover { background: #e8e2fb; }
.doc-download:focus-visible, .lib-delete:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.doc-download svg { width: 16px; height: 16px; flex: none; }
.doc-download--small { min-height: 40px; padding: 0 14px; font-size: 14px; }
/* The CV's own download: the arrow alone, named in full for a screen reader. */
.doc-download--icon { justify-content: center; width: 44px; padding: 0; background: none; color: var(--accent); }
.doc-download--icon svg { width: 20px; height: 20px; }

/* A CV's versions: under its row, on a paler ground. */
.cv-versions { margin: 0; padding: 0; list-style: none; background: #fcfbfa; }
.doc-version { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; padding: 10px 8px 10px 20px; border-top: 1px solid var(--line); }
.doc-version__words { flex: 1 1 240px; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.doc-version__name { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; font-size: 14px; }
.doc-version__name strong { font-weight: 700; }
.doc-version__meta { font-size: 13px; color: var(--body); }
.doc-version__note { font-size: 14px; color: var(--body); }
.doc-version__confirm { flex: 1 1 100%; }
.doc-version__confirm:empty { display: none; }
.doc-version[data-state="deleted"], .doc-version[data-state="deleting"] { color: var(--muted); }
.lib-actions { display: inline-flex; align-items: center; gap: 4px; }
.lib-delete {
  display: inline-grid; place-items: center; width: 44px; height: 44px; padding: 0; border: 0; border-radius: 999px;
  background: none; color: var(--muted); cursor: pointer;
}
.lib-delete:hover { background: var(--orange-bg); color: var(--orange); }
.lib-delete svg { width: 18px; height: 18px; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- Edit: a tick box at the start of each row, the row lit when it's ticked, nothing else to press ---------- */
.is-selecting .library__pick { margin: 0 -8px 0 12px; }
.is-selecting :is(.doc-download, .lib-delete) { display: none; }
.is-selecting :is(.job-row, .cv-row) { cursor: pointer; }
.is-selecting .job-row__chevron { visibility: hidden; }
.is-selecting .row-item:has([data-pick]:checked) { background: #faf8ff; }
.is-selecting :is(.up-next, .list-add, .list-note) { display: none; }

/* ---------- On a phone ---------- */
@media (max-width: 759px) {
  .library__tabs { align-self: stretch; width: auto; }
  .list-head, .list-heads, .list-note { padding: 0 16px; }
  .up-next__body { padding: 16px; gap: 14px; }
  .up-next__job { font-size: 17px; }
  .up-next__go { flex: 1 1 100%; }
  .ring--big { width: 48px; height: 48px; }
  .job-row__link { gap: 12px; padding: 12px 12px 12px 16px; }
  .row-title { font-size: 16px; }
  .row-sub { font-size: 13px; }
  .job-row__next { font-size: 15px; }
  .cv-row { padding: 12px 4px 12px 16px; }
  .doc-version { padding-left: 16px; }
}

/* Loading: rows taking shape, so the page doesn't jump when they arrive. */
.skel-rows { display: flex; flex-direction: column; overflow: hidden; border-radius: 16px; background: var(--white); }
.skel-row { display: flex; align-items: center; gap: 16px; padding: 14px 16px; }
.skel-row + .skel-row { border-top: 1px solid var(--line); }
.skel-row__words { flex: 1; display: flex; flex-direction: column; gap: 8px; }

/* ---------- The popup on a number or a ring (13 Nov 2026): its look is in home.css, shared with the home ---------- */
.job-row__score, .up-next .ring { cursor: help; }
