/* Nextrope OS theme. The palette is Nextrope black (#151515, the ink of the logo) on white, with thin grey
   lines, pill-shaped primary actions and grey chips. Every colour lives in the tokens below; the rest of the
   stylesheet only uses var(--*). Text colours meet WCAG AA (4.5:1) on their backgrounds in both themes. */
@font-face {
  font-family: "Inter"; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url("/static/fonts/inter-latin-wght-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329,
    U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Inter"; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url("/static/fonts/inter-latin-ext-wght-normal.woff2") format("woff2");
  unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0,
    U+2113, U+2C60-2C7F, U+A720-A7FF;
}
:root {
  color-scheme: light;
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: ui-monospace, "Cascadia Mono", Consolas, "SF Mono", monospace;
  --bg: #ffffff;
  --surface: #ffffff;
  --surface-2: #f7f7f6;
  --hover: #f4f4f3;
  --active: #efefee;
  --chip: #f0f0ef;
  --border: #e9e9e7;
  --border-strong: #dcdcd9;
  --field: #8f8f8c; /* edges of text fields and selects: 3:1 against the page (WCAG 1.4.11) */
  --text: #151515;
  --text-2: #3d3d3b;
  --muted: #6b6b69;
  --placeholder: #757573;
  --brand: #151515;
  --brand-hover: #333331;
  --brand-contrast: #ffffff;
  --ring: rgba(21, 21, 21, .12);
  --track: #ececea;
  --mark: #e9e9e6;
  --ok: #067647; --ok-bg: #ecfdf3;
  --warn: #b54708; --warn-bg: #fffaeb;
  --bad: #b42318; --bad-bg: #fef3f2;
  --unknown: #6b6b69;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(16, 16, 16, .04);
  --shadow-lg: 0 24px 48px rgba(16, 16, 16, .14), 0 2px 6px rgba(16, 16, 16, .06);
  --scrim: rgba(16, 16, 16, .55); /* dims the app around the part the tour points at */
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #0e0e0e; --surface: #151515; --surface-2: #1a1a1a; --hover: #1f1f1f; --active: #252525; --chip: #262626;
    --border: #262626; --border-strong: #353534; --field: #6b6b69; --text: #f2f2f0; --text-2: #d4d4d2; --muted: #a3a3a0;
    --placeholder: #8e8e8b; --brand: #f2f2f0; --brand-hover: #ffffff; --brand-contrast: #151515;
    --ring: rgba(242, 242, 240, .18); --track: #2a2a2a; --mark: #343432;
    --ok: #47cd89; --ok-bg: rgba(71, 205, 137, .12); --warn: #fdb022; --warn-bg: rgba(253, 176, 34, .12);
    --bad: #f97066; --bad-bg: rgba(249, 112, 102, .12); --unknown: #8e8e8b;
    --shadow: none; --shadow-lg: 0 24px 48px rgba(0, 0, 0, .5); --scrim: rgba(0, 0, 0, .7);
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0e0e0e; --surface: #151515; --surface-2: #1a1a1a; --hover: #1f1f1f; --active: #252525; --chip: #262626;
  --border: #262626; --border-strong: #353534; --field: #6b6b69; --text: #f2f2f0; --text-2: #d4d4d2; --muted: #a3a3a0;
  --placeholder: #8e8e8b; --brand: #f2f2f0; --brand-hover: #ffffff; --brand-contrast: #151515;
  --ring: rgba(242, 242, 240, .18); --track: #2a2a2a; --mark: #343432;
  --ok: #47cd89; --ok-bg: rgba(71, 205, 137, .12); --warn: #fdb022; --warn-bg: rgba(253, 176, 34, .12);
  --bad: #f97066; --bad-bg: rgba(249, 112, 102, .12); --unknown: #8e8e8b;
  --shadow: none; --shadow-lg: 0 24px 48px rgba(0, 0, 0, .5); --scrim: rgba(0, 0, 0, .7);
}

/* ------------------------------------------------------------------ base */
* { box-sizing: border-box; }
body { margin: 0; font-family: var(--font); background: var(--bg); color: var(--text); font-size: 14px; line-height: 1.45;
  -webkit-font-smoothing: antialiased; }
a { color: var(--text); text-underline-offset: 2px; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.app { display: grid; grid-template-columns: 236px minmax(0, 1fr); min-height: 100vh; }
h1 { font-size: 20px; font-weight: 600; letter-spacing: -.01em; margin: 0 0 16px; }
h2 { font-size: 15px; font-weight: 600; margin: 20px 0 10px; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.nowrap { white-space: nowrap; }
.hidden { display: none !important; }

/* ------------------------------------------------------------------ sidebar */
nav.side { position: sticky; top: 0; height: 100vh; overflow-y: auto; display: flex; flex-direction: column;
  background: var(--surface); border-right: 1px solid var(--border); padding: 0 10px 14px; }
nav.side .brand { display: flex; align-items: center; gap: 8px; height: 57px; flex: none; margin: 0 -10px 10px; padding: 0 20px;
  border-bottom: 1px solid var(--border); color: var(--text); text-decoration: none; }
.brand-logo { display: block; width: 112px; height: 15px; background: currentColor;
  -webkit-mask: url("/static/logo.svg") no-repeat left center / contain; mask: url("/static/logo.svg") no-repeat left center / contain; }
.brand-os { font-size: 10px; font-weight: 700; letter-spacing: .06em; line-height: 1; padding: 3px 5px 3px; border-radius: 5px;
  background: var(--brand); color: var(--brand-contrast); }
@media (forced-colors: active) { .brand-logo { background: CanvasText; forced-color-adjust: none; } }
nav.side button[data-view] { display: flex; align-items: center; gap: 10px; width: 100%; height: 34px; padding: 0 10px; margin: 1px 0;
  border: 0; border-radius: 8px; background: none; color: var(--text-2); font: inherit; font-weight: 500; text-align: left; cursor: pointer; }
nav.side button[data-view] svg { width: 17px; height: 17px; flex: none; color: var(--muted); }
nav.side button[data-view]:hover { background: var(--hover); color: var(--text); }
nav.side button[data-view].active { background: var(--active); color: var(--text); font-weight: 600; }
nav.side button[data-view].active svg { color: var(--text); }
nav.side .count { margin-left: auto; font-size: 12px; font-weight: 500; color: var(--muted); font-variant-numeric: tabular-nums; }
nav.side .nav-label { font-size: 12px; font-weight: 500; color: var(--muted); padding: 16px 10px 5px; }
nav.side .side-foot { margin-top: auto; padding: 14px 10px 0; font-size: 12px; color: var(--muted); display: flex; gap: 6px; align-items: center; }
nav.side .side-foot svg { width: 14px; height: 14px; flex: none; }
nav.side .nav-items { display: flex; flex-direction: column; flex: 1; }
.menu-toggle { display: none; place-items: center; width: 40px; height: 40px; margin-left: auto; padding: 0; border: 0; border-radius: 8px;
  background: none; color: var(--text); cursor: pointer; }
.menu-toggle:hover { background: var(--hover); }
.menu-toggle svg { width: 22px; height: 22px; }
svg.i { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* ------------------------------------------------------------------ page */
main { padding: 0 28px 40px; min-width: 0; }
#view > h1:first-child { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: 10px; height: 57px;
  margin: 0 -28px 22px; padding: 0 28px; font-size: 17px; background: var(--bg); border-bottom: 1px solid var(--border); }
.page-icon { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 7px; flex: none;
  background: var(--brand); color: var(--brand-contrast); }
.page-icon svg { width: 15px; height: 15px; }
#view > * { max-width: 1400px; }
#view > h1:first-child { max-width: none; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); }
.card > h2:first-child, .card-head h2 { margin-top: 0; }
.card > p:first-child { margin-top: 0; }
.card > p:last-child { margin-bottom: 0; }
a.card { display: block; color: inherit; text-decoration: none; }
.card.click { cursor: pointer; transition: border-color .12s, background .12s; }
.card.click:hover { border-color: var(--border-strong); background: var(--hover); }
.grid { display: grid; gap: 14px; }
.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.stat .muted { font-size: 13px; font-weight: 500; }
.stat b { display: block; margin-top: 4px; font-size: 30px; font-weight: 600; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }

/* ------------------------------------------------------------------ controls */
input, select, textarea { font: inherit; font-size: 14px; color: var(--text); background: var(--surface);
  border: 1px solid var(--field); border-radius: 8px; height: 34px; padding: 0 10px; }
select { padding-right: 6px; }
textarea { width: 100%; height: auto; min-height: 160px; padding: 10px 12px; line-height: 1.5; resize: vertical; }
input::placeholder, textarea::placeholder { color: var(--placeholder); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--text); box-shadow: 0 0 0 3px var(--ring); }
input[type="checkbox"], input[type="radio"] { width: 16px; height: 16px; margin: 0; padding: 0; accent-color: var(--brand); flex: none; }
input[type="checkbox"]:focus, input[type="radio"]:focus { box-shadow: none; }
input[type="file"] { height: auto; padding: 0; border: 0; background: none; max-width: 100%; }
input[type="file"]::file-selector-button { font: inherit; font-weight: 500; margin-right: 10px; height: 32px; padding: 0 14px;
  border: 1px solid var(--border-strong); border-radius: 8px; background: var(--surface); color: var(--text); cursor: pointer; }
input[type="color"] { width: 52px; padding: 3px; cursor: pointer; }
#progress > .bar { margin-top: 8px; }
input[type="search"]::-webkit-search-cancel-button { -webkit-appearance: none; appearance: none; width: 14px; height: 14px; cursor: pointer;
  background: var(--muted); -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 6l12 12M18 6L6 18' stroke='black' stroke-width='2.4' stroke-linecap='round'/%3E%3C/svg%3E") center / contain no-repeat; }
input.wide { flex: 1; min-width: 260px; }
label { font-size: 13px; font-weight: 500; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 32px; padding: 0 12px;
  font: inherit; font-size: 13.5px; font-weight: 500; line-height: 1; white-space: nowrap; text-decoration: none; cursor: pointer;
  color: var(--text); background: var(--surface); border: 1px solid var(--border-strong); border-radius: 8px;
  transition: background .12s, border-color .12s; }
.btn:hover { background: var(--hover); }
.btn.primary { color: var(--brand-contrast); background: var(--brand); border-color: var(--brand); border-radius: 999px; padding: 0 16px; }
.btn.primary:hover { background: var(--brand-hover); border-color: var(--brand-hover); }
.btn.danger { color: var(--bad); }
.btn.danger:hover { background: var(--bad-bg); }
button:disabled, .btn:disabled { opacity: .45; cursor: default; }
.seg { display: inline-flex; width: fit-content; padding: 3px; gap: 2px; background: var(--chip); border-radius: 10px; }
.seg label { padding: 6px 12px; border-radius: 7px; cursor: pointer; font-weight: 500; color: var(--text-2); }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg label:has(input:checked) { background: var(--brand); color: var(--brand-contrast); }
.seg label:has(input:focus-visible) { outline: 2px solid var(--brand); outline-offset: 1px; }
/* toggle buttons in a row (the stage filter): the pressed one is filled */
.seg-btn { height: 30px; padding: 0 12px; border: 1px solid var(--border-strong); border-radius: 999px; background: var(--surface);
  color: var(--text-2); font: inherit; font-size: 13px; font-weight: 500; white-space: nowrap; cursor: pointer; }
.seg-btn:hover { background: var(--hover); }
.seg-btn[aria-pressed="true"] { background: var(--brand); border-color: var(--brand); color: var(--brand-contrast); }
.seg-btn[aria-pressed="true"] .muted { color: inherit; }
/* a file input behind a button with a Polish label; the input stays focusable for the keyboard */
.file-btn { position: relative; }
.file-btn input[type="file"] { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; opacity: 0; clip-path: inset(50%); }
.file-btn:has(input:focus-visible) { outline: 2px solid var(--brand); outline-offset: 2px; }
.tabs { display: flex; gap: 2px; margin: -8px 0 18px; overflow-x: auto; border-bottom: 1px solid var(--border); }
.tabs [role="tab"] { height: 40px; padding: 0 14px; margin-bottom: -1px; border: 0; border-bottom: 2px solid transparent; background: none;
  color: var(--muted); font: inherit; font-weight: 500; white-space: nowrap; cursor: pointer; }
.tabs [role="tab"]:hover { color: var(--text); }
.tabs [role="tab"][aria-selected="true"] { color: var(--text); border-bottom-color: var(--brand); }
label.sort { gap: 6px; font-size: 13px; font-weight: 400; color: var(--muted); }
label.sort select { height: 30px; font-size: 13px; }
.link.strong, a.row-link { font-size: 14px; font-weight: 600; text-decoration: none; }
.link.strong:hover, a.row-link:hover { text-decoration: underline; }

/* ------------------------------------------------------------------ tables: grey headers, thin column lines */
table { width: 100%; border-collapse: separate; border-spacing: 0; }
th, td { text-align: left; vertical-align: top; padding: 10px 12px; border-bottom: 1px solid var(--border); }
th { font-size: 12.5px; font-weight: 500; color: var(--muted); padding-top: 9px; padding-bottom: 9px; white-space: nowrap; }
th + th, td + td { border-left: 1px solid var(--border); }
tbody tr:last-child td { border-bottom: 0; }
tr.click { cursor: pointer; }
tr.click:hover td { background: var(--hover); }
.card > table { width: calc(100% + 36px); margin: 14px -18px 0; border-top: 1px solid var(--border); }
.card > h2:first-child + table { margin-top: 0; }
.card > table:last-child { margin-bottom: -18px; }
.card > table th:first-child, .card > table td:first-child { padding-left: 18px; }
.card > table th:last-child, .card > table td:last-child { padding-right: 18px; }
.card:has(> table:last-child) { overflow: hidden; }
#reqs td { padding: 6px 8px; vertical-align: middle; }
#reqs td:first-child input { width: 100%; min-width: 160px; }
#reqs input, #reqs select { height: 30px; font-size: 13px; }
table.dist td { padding: 9px 12px; vertical-align: middle; }
table.dist td + td { border-left: 0; }
table.dist .dist-bar { width: 38%; }
table.dist .num { text-align: right; font-variant-numeric: tabular-nums; width: 1%; white-space: nowrap; font-weight: 500; }

/* ------------------------------------------------------------------ chips, bars, statuses */
.chip { display: inline-flex; align-items: center; height: 22px; padding: 0 8px; margin: 2px 4px 2px 0; border-radius: 999px;
  background: var(--chip); color: var(--text); font-size: 12px; font-weight: 500; white-space: nowrap; vertical-align: middle; }
.chip.st-missing { color: var(--bad); background: var(--bad-bg); }
.chip.warn { color: var(--warn); background: var(--warn-bg); }
.pill { display: inline-flex; align-items: center; height: 24px; padding: 0 10px; border-radius: 999px; white-space: nowrap;
  background: var(--chip); color: var(--muted); font-size: 12px; font-weight: 500; }
.pill.ok { color: var(--ok); background: var(--ok-bg); }
.pill.bad { color: var(--bad); background: var(--bad-bg); }
.score { font-weight: 600; font-variant-numeric: tabular-nums; }
.bar { height: 6px; min-width: 80px; background: var(--track); border-radius: 999px; overflow: hidden; }
.bar > i { display: block; height: 100%; background: var(--brand); border-radius: 999px; }
.st-met { color: var(--ok); } .st-partial { color: var(--warn); } .st-missing { color: var(--bad); } .st-unknown { color: var(--unknown); }
.status-line { margin: 10px 0 0; padding: 8px 12px; border-radius: 8px; background: var(--surface-2); font-size: 13px; }
.status-line.ok { color: var(--ok); background: var(--ok-bg); } .status-line.bad { color: var(--bad); background: var(--bad-bg); }
mark { background: var(--mark); color: inherit; font-weight: 600; border-radius: 3px; padding: 0 2px; box-shadow: inset 0 -2px 0 var(--text); }
.evidence { font-size: 12px; color: var(--muted); font-style: italic; margin-top: 2px; }
code { font-family: var(--mono); font-size: 12px; background: var(--chip); padding: 1px 5px; border-radius: 4px; }
td code { background: none; padding: 0; word-break: break-word; }

/* ------------------------------------------------------------------ lists of items, the jobs screen (list on the left, one job on the right) */
.item-list { display: grid; gap: 2px; margin: 0; padding: 0; list-style: none; }
.item { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin: 0 -10px; padding: 9px 10px; border-radius: 8px; }
a.item { color: inherit; text-decoration: none; }
a.item:hover { background: var(--hover); }
a.item.active { background: var(--active); }
.split { display: grid; grid-template-columns: minmax(240px, 300px) minmax(0, 1fr); gap: 14px; align-items: start; }
.list-pane { position: sticky; top: 71px; max-height: calc(100vh - 85px); overflow-y: auto; }
.list-pane .item-list { margin-top: 10px; }
.in-process-count { color: var(--text-2); }
.crumb { min-width: 0; overflow: hidden; color: var(--muted); font-weight: 400; text-overflow: ellipsis; white-space: nowrap; }
.back-link { display: none; }
.job-title { margin: 0; font-size: 17px; }
.card-head p { margin: 2px 0 0; }
.ranking-head { margin-top: 22px; }
/* a folding section: the job's requirements, the people below the shortlist */
details.section, details.rank-rest { margin-top: 14px; }
details.section { padding: 0 14px; border: 1px solid var(--border); border-radius: 10px; }
details.section[open] { padding-bottom: 14px; }
details.section > summary, details.rank-rest > summary { display: flex; align-items: baseline; gap: 8px; padding: 11px 0; list-style: none; cursor: pointer; }
details.section > summary::-webkit-details-marker, details.rank-rest > summary::-webkit-details-marker { display: none; }
details.section > summary::before, details.rank-rest > summary::before { content: ""; flex: none; width: 6px; height: 6px; margin: 0 4px 2px 2px;
  border: solid var(--muted); border-width: 0 1.8px 1.8px 0; transform: rotate(-45deg); transition: transform .15s; }
details[open].section > summary::before, details[open].rank-rest > summary::before { transform: rotate(45deg); }
details.rank-rest > summary { font-weight: 500; color: var(--text-2); }

/* ------------------------------------------------------------------ job ranking */
.rank-summary { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 6px 0 12px; font-size: 13px; }
/* one grid for the whole list (subgrid), so the counts, scores and stages line up from person to person */
.rank-list { display: grid; grid-template-columns: minmax(0, 1fr) auto auto 140px 200px; column-gap: 12px;
  border: 1px solid var(--border); border-radius: 10px; }
.rank-item, .rank-head { display: grid; grid-template-columns: subgrid; grid-column: 1 / -1; }
.rank-item + .rank-item { border-top: 1px solid var(--border); }
.rank-item.in-process { box-shadow: inset 3px 0 0 var(--brand); }
.rank-head { align-items: center; padding: 8px 12px; }
.rank-body { grid-column: 1 / -1; }
.rank-toggle { display: flex; align-items: center; gap: 8px; min-width: 0; padding: 6px 0; border: 0; background: none; color: var(--text);
  font: inherit; text-align: left; cursor: pointer; }
.rank-toggle > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rank-toggle .chev { width: 16px; height: 16px; flex: none; color: var(--muted); transition: transform .15s; }
.rank-toggle[aria-expanded="true"] .chev { transform: rotate(90deg); }
.rank-counts { display: flex; gap: 10px; font-size: 13px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.rank-counts .zero { color: var(--muted); }
.rank-score { display: flex; align-items: center; gap: 8px; }
.rank-score .bar { flex: 1; min-width: 0; }
.rank-score .score { width: 38px; text-align: right; }
.rank-stage { display: grid; gap: 4px; }
.rank-body { padding: 0 16px 14px 36px; }
.rank-body > p:first-child { margin-top: 0; }
.stage-select, .interview-at { height: 30px; font-size: 13px; }
.stage-select { max-width: 200px; }
.rank-stage .stage-select, .rank-stage .interview-at { width: 100%; min-width: 0; max-width: none; }
.req-row { display: grid; grid-template-columns: 22px 1.4fr 2fr; gap: 8px; padding: 8px 0; border-bottom: 1px solid var(--border); }
@media (prefers-reduced-motion: reduce) { .rank-toggle .chev, details > summary::before { transition: none; } }

/* ------------------------------------------------------------------ recruitment process */
.stage-filter { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.process-job { margin-top: 14px; }
.process-job:first-child { margin-top: 0; }
.process-job h2 a { text-decoration: none; }
.process-job h2 a:hover { text-decoration: underline; }
.card.empty { padding: 32px 18px; text-align: center; }
.card.empty p { max-width: 460px; margin: 0 auto 16px; }
details.card { padding: 12px 16px; }
details.card[open] { padding-bottom: 16px; }
details.card > summary { list-style: none; }
details.card > summary::-webkit-details-marker { display: none; }

/* ------------------------------------------------------------------ drawer, drop zones, toast */
.drawer { position: fixed; inset: 0 0 0 auto; z-index: 30; width: min(760px, 100%); overflow: auto; padding: 0 24px 28px;
  background: var(--surface); border-left: 1px solid var(--border); box-shadow: var(--shadow-lg); }
.drawer > .row:first-child { position: sticky; top: 0; z-index: 1; justify-content: space-between; height: 57px; flex-wrap: nowrap;
  margin: 0 -24px 14px; padding: 0 24px; background: var(--surface); border-bottom: 1px solid var(--border); }
.drawer > .row:first-child h1 { margin: 0; font-size: 18px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.drop { border: 1.5px dashed var(--border-strong); border-radius: var(--radius); padding: 32px; text-align: center; background: var(--surface-2); }
.drop p { margin: 0 0 8px; }
.drop.over { border-color: var(--brand); background: var(--hover); }
.toasts { position: fixed; left: 50%; bottom: 22px; z-index: 40; display: grid; justify-items: center; gap: 8px;
  width: max-content; max-width: calc(100vw - 32px); transform: translateX(-50%); pointer-events: none; }
.toast { max-width: 620px; padding: 10px 18px; border-radius: 999px; background: var(--brand); color: var(--brand-contrast); font-weight: 500;
  box-shadow: var(--shadow-lg); }
pre.cv { white-space: pre-wrap; font: 12px/1.55 var(--mono); background: var(--surface-2); border: 1px solid var(--border);
  padding: 12px 14px; border-radius: 10px; max-height: 360px; overflow: auto; }
.cv-frame { display: block; width: 100%; height: min(78vh, 980px); margin-bottom: 8px; border: 1px solid var(--border);
  border-radius: 10px; background: var(--surface-2); }
.cv-text { margin-top: 10px; }
.cv-text > summary { cursor: pointer; color: var(--muted); font-size: 13px; margin-bottom: 8px; }
.note { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.note p { margin: 10px 0 0; }
/* the facts read from the CV, in the profile */
.facts { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 6px 18px; margin: 0; font-size: 13.5px; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; overflow-wrap: anywhere; }
.danger-zone { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; margin-top: 32px;
  padding: 14px 16px; border-radius: 10px; background: var(--bad-bg); }
.danger-zone b { color: var(--bad); }
.danger-zone .hint { margin-top: 2px; }

/* ------------------------------------------------------------------ settings */
.card-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.form { display: grid; gap: 12px; margin-top: 14px; }
.form > label:not(.row), .form .grid > label { display: grid; gap: 5px; }
.form > [data-mode] { margin-top: 0; }
label.row { gap: 8px; font-weight: 400; font-size: 14px; }
.secret { display: flex; gap: 6px; }
.secret input { flex: 1; min-width: 0; }
.hint { margin: 0; font-size: 12px; color: var(--muted); }
.code { font-family: var(--mono); font-size: 18px; font-weight: 600; letter-spacing: .08em; }

/* ------------------------------------------------------------------ signing in, the account in the sidebar */
body.signed-out .app, body.signed-out #drawer { display: none; }
.login { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; }
.login .card { display: grid; gap: 12px; width: 100%; max-width: 380px; padding: 26px; }
.login h1 { margin: 4px 0 2px; font-size: 18px; }
.login label { display: grid; gap: 5px; }
.login .btn.primary { height: 36px; margin-top: 4px; }
.login .brand-logo { color: var(--text); }
/* the sign-in screen is the desktop loading screen's dark stage, with its cows hopping around the card (herd.js);
   the stage is dark in both themes, so the card on it keeps the theme's own colours */
body.signed-out { background: radial-gradient(120% 90% at 50% 46%, #2a2a2a 0%, #171717 46%, #0c0c0c 100%) fixed #0c0c0c; }
body.signed-out .login { position: relative; z-index: 1; pointer-events: none; }
body.signed-out .login .card { pointer-events: auto; border-color: rgba(255, 255, 255, .08); box-shadow: 0 30px 70px rgba(0, 0, 0, .55); }
.herd { position: fixed; inset: 0; overflow: hidden; z-index: 0; user-select: none; -webkit-user-select: none; }
.herd-glow { position: absolute; left: 50%; top: var(--cy, 50%); width: 720px; height: 720px; margin: -360px 0 0 -360px; pointer-events: none;
  background: radial-gradient(closest-side, rgba(255, 255, 255, .08), rgba(255, 255, 255, 0)); animation: herd-breathe 4.8s ease-in-out infinite; }
.herd-ground { position: absolute; border-radius: 50%; border: 1px solid rgba(255, 255, 255, .08); pointer-events: none;
  background: radial-gradient(closest-side, rgba(255, 255, 255, .025), rgba(255, 255, 255, 0)); }
.herd .cow { position: absolute; left: 0; top: 0; width: 92px; height: 70px; margin: -68px 0 0 -46px; transform-origin: 50% 97%;
  will-change: transform, opacity; cursor: pointer; touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
.herd .cow .shadow { position: absolute; left: 18px; right: 18px; bottom: -2px; height: 10px; border-radius: 50%;
  background: radial-gradient(closest-side, rgba(0, 0, 0, .55), rgba(0, 0, 0, 0)); will-change: transform, opacity; }
.herd .cow .hop { position: absolute; inset: 0; transform-origin: 50% 60%; will-change: transform; }
.herd .cow svg { display: block; width: 100%; height: 100%; overflow: visible; }
.herd .moo { position: absolute; left: 50%; bottom: 100%; margin-bottom: 4px; padding: 3px 9px; border-radius: 999px; white-space: nowrap;
  font: 700 13px/1.2 var(--font); color: #151515; background: #fff; box-shadow: 0 4px 14px rgba(0, 0, 0, .35); opacity: 0; pointer-events: none; }
.herd .moo.say { animation: herd-moo 1.3s ease forwards; }
@keyframes herd-breathe { 0%, 100% { opacity: .65; scale: .94; } 50% { opacity: 1; scale: 1.04; } }
@keyframes herd-moo { 0% { opacity: 0; scale: .6; } 12% { opacity: 1; scale: 1.08; } 22% { scale: 1; } 75% { opacity: 1; } 100% { opacity: 0; } }
@keyframes herd-moo-still { 0%, 90% { opacity: 1; } 100% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) {
  .herd-glow { animation: none; }
  .herd .moo.say { animation: herd-moo-still 1.6s linear forwards; }
}
@media (forced-colors: active) { .herd { display: none; } }
.brand-row { display: flex; align-items: center; gap: 8px; }
.link { background: none; border: 0; padding: 0; font: inherit; font-size: 13px; color: var(--text); text-decoration: underline;
  text-underline-offset: 2px; cursor: pointer; justify-self: center; }
.link:hover { color: var(--text-2); }
nav.side .me { display: grid; gap: 2px; margin-top: 14px; padding: 12px 10px 0; border-top: 1px solid var(--border); font-size: 12px; }
nav.side .me:empty { display: none; }
nav.side .me b { font-size: 13px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
nav.side .me .row { gap: 12px; margin-top: 6px; }
nav.side .me .link { font-size: 12px; justify-self: start; }

/* ------------------------------------------------------------------ import progress in the sidebar, visible on every screen */
#import-status { margin-top: 14px; }
nav.side .import-badge { display: grid; gap: 6px; width: 100%; padding: 10px 12px; text-align: left; font: inherit; color: var(--text);
  background: var(--surface); border: 1px solid var(--border); border-radius: 10px; cursor: pointer; }
nav.side .import-badge:hover { border-color: var(--border-strong); background: var(--hover); }
.import-badge.finished .bar > i { background: var(--ok); }
.import-badge.interrupted .bar > i, .import-badge.failed .bar > i { background: var(--warn); }

/* ------------------------------------------------------------------ introductory tour */
.tour { position: fixed; inset: 0; z-index: 50; }
.tour-spot { position: fixed; border-radius: 12px; pointer-events: none; box-shadow: 0 0 0 9999px var(--scrim);
  transition: left .2s, top .2s, width .2s, height .2s; }
.tour-card { position: fixed; width: min(380px, calc(100vw - 32px)); max-height: calc(100vh - 32px); overflow: auto; padding: 18px 20px;
  background: var(--surface); color: var(--text); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-lg); }
.tour-card.center { left: 50% !important; top: 50% !important; transform: translate(-50%, -50%); width: min(440px, calc(100vw - 32px)); }
.tour-card h2 { margin: 6px 0 8px; font-size: 16px; }
.tour-card #tour-text { font-size: 14px; line-height: 1.55; color: var(--text-2); }
.tour-card #tour-text p { margin: 0 0 8px; }
.tour-card #tour-text ul, .tour-card #tour-text ol { margin: 0 0 8px; padding-left: 20px; }
.tour-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.tour-head .link { font-size: 12px; color: var(--muted); }
.tour-dots { display: flex; gap: 5px; margin: 12px 0; }
.tour-dots i { width: 6px; height: 6px; border-radius: 50%; background: var(--track); }
.tour-dots i.on { background: var(--brand); }
.tour-nav { justify-content: flex-end; }
@media (prefers-reduced-motion: reduce) { .tour-spot { transition: none; } }

/* ------------------------------------------------------------------ narrow windows */
@media (max-width: 820px) {
  .app { grid-template-columns: 1fr; }
  /* the menu folds into a button at the top; the screen title scrolls away under it */
  nav.side { z-index: 20; height: auto; max-height: 100vh; flex-direction: row; flex-wrap: wrap; align-items: center;
    padding: 0 12px; border-right: 0; border-bottom: 1px solid var(--border); }
  nav.side .brand { height: 56px; margin: 0; padding: 0 4px; border: 0; }
  .menu-toggle { display: inline-grid; }
  nav.side .nav-items { flex-basis: 100%; padding-bottom: 14px; }
  nav.side:not(.open) .nav-items { display: none; }
  nav.side button[data-view] { height: 44px; }
  main { padding: 0 16px 32px; }
  #view > h1:first-child { position: static; margin: 0 -16px 16px; padding: 0 16px; }
  .cols-3, .cols-2 { grid-template-columns: 1fr; }
  .card > table { display: block; overflow-x: auto; }
  /* fingers need bigger targets than a mouse */
  .btn, input:not([type="checkbox"]):not([type="radio"]), select, .seg-btn, .tabs [role="tab"] { height: 40px; }
  .stage-select, .interview-at, label.sort select { height: 40px; }
  /* the jobs screen shows the list or one job, with a link back */
  .split { grid-template-columns: minmax(0, 1fr); }
  .list-pane { position: static; max-height: none; }
  .split.has-detail .list-pane, .split:not(.has-detail) .detail-pane { display: none; }
  .back-link { display: inline-block; margin-bottom: 12px; font-size: 13px; }
  .crumb { display: none; } /* the job's title heads its card */
  /* requirements as cards: the requirement on top, its settings below */
  #reqs, #reqs tbody { display: block; }
  #reqs thead { display: none; }
  #reqs tr { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 6px; padding: 10px 0; border-bottom: 1px solid var(--border); }
  #reqs td { display: block; padding: 0; border: 0; }
  #reqs td:first-child { grid-column: 1 / -1; }
  #reqs td:last-child { justify-self: end; }
  #reqs input, #reqs select { width: 100%; height: 40px; }
  /* a ranked person: name, then the score, then the stage */
  .rank-list, .rank-item { display: block; }
  .rank-head { display: flex; flex-wrap: wrap; gap: 8px 12px; }
  .rank-toggle { flex: 1 1 100%; }
  .rank-flags:empty { display: none; }
  .rank-score { flex: 1; }
  .rank-stage { flex: 1 1 100%; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .rank-stage:has(.interview-at.hidden) .stage-select { grid-column: 1 / -1; }
  .rank-body { padding-left: 16px; }
  /* the process as one card per person: name, stage and date, then the time in the stage and the score */
  .card > table.process { display: block; overflow: visible; }
  .process thead { display: none; }
  .process tbody { display: block; }
  .process tr { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 8px; padding: 12px 18px;
    border-bottom: 1px solid var(--border); }
  .process tbody tr:last-child { border-bottom: 0; }
  .card > table.process td { display: block; padding: 0; border: 0; }
  .process td:first-child, .process td:nth-child(2) { grid-column: 1 / -1; }
  .process td.when:has(.hidden) { display: none; }
  .process td.when { grid-column: 1 / -1; }
  .process td.when .interview-at { width: 100%; }
  .process td[data-label]::before { content: attr(data-label) ": "; color: var(--muted); font-weight: 400; }
  .process .stage-select { width: 100%; max-width: none; }
  .drawer { padding: 0 16px 24px; }
  .drawer > .row:first-child { margin: 0 -16px 14px; padding: 0 16px; }
  .facts { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .facts dd { margin-bottom: 8px; }
}
