/* The hiring console. Plain, dense, readable: a work surface, not a brochure.
 *
 * Colour is a reading aid and nothing more. Every chip says in words what its
 * pastel says, and the pastels are soft on purpose — this is a screen people
 * sit in front of all day. A stage wears the colour of whose move it is. */

:root {
  --bg: #f6f7f9;
  --panel: #ffffff;
  --ink: #1d2230;
  --muted: #5d6576;
  --faint: #8a91a0;
  --line: #e2e5ea;
  --accent: #2856d6;
  --accent-ink: #ffffff;
  --good: #1f7a4d;
  --warn: #9a5b00;
  --bad: #b3261e;
  --chip: #eef1f6;
  --focus: #2856d6;
  --row-hover: #f5f7fa;
  --shadow: 0 1px 2px rgba(16, 24, 40, 0.06), 0 1px 3px rgba(16, 24, 40, 0.08);
  --scrim: rgba(24, 30, 44, 0.3);
  --drawer-shadow: -12px 0 32px rgba(16, 24, 40, 0.16);

  /* The pastels: a wash to sit on, a line to edge with, an ink to write in. */
  --sky-bg: #eaf2fc;   --sky-line: #cadcf3;   --sky-ink: #2f5d95;
  --mint-bg: #e7f5ee;  --mint-line: #c5e5d3;  --mint-ink: #2a6a4a;
  --lemon-bg: #fbf5de; --lemon-line: #eee0ac; --lemon-ink: #7a5b10;
  --peach-bg: #fcefe6; --peach-line: #f2d3bf; --peach-ink: #8f4f2b;
  --rose-bg: #fcebee;  --rose-line: #f1ccd3;  --rose-ink: #993a4b;
  --lilac-bg: #f1eefc; --lilac-line: #dad2f4; --lilac-ink: #57489a;
  --teal-bg: #e5f4f3;  --teal-line: #c2e2df;  --teal-ink: #236763;
  --slate-bg: #f0f2f5; --slate-line: #dde1e7; --slate-ink: #586173;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #111419;
    --panel: #181c23;
    --ink: #e6e8ee;
    --muted: #a3aab8;
    --faint: #7b8394;
    --line: #2a303b;
    --accent: #6d93ff;
    --accent-ink: #0b1020;
    --good: #57c28b;
    --warn: #e0a84a;
    --bad: #ff7b72;
    --chip: #232935;
    --row-hover: #1c2129;
    --focus: #6d93ff;
    --shadow: none;
    --scrim: rgba(0, 0, 0, 0.5);
    --drawer-shadow: -12px 0 32px rgba(0, 0, 0, 0.45);

    --sky-bg: #1a2636;   --sky-line: #2b4260;   --sky-ink: #a9c7ee;
    --mint-bg: #172720;  --mint-line: #26473a;  --mint-ink: #9fd4b5;
    --lemon-bg: #29261a; --lemon-line: #4a4224; --lemon-ink: #e0cd8c;
    --peach-bg: #2c221b; --peach-line: #52392a; --peach-ink: #ebbb99;
    --rose-bg: #2e1f24;  --rose-line: #56303a;  --rose-ink: #eeaeb9;
    --lilac-bg: #232136; --lilac-line: #3d375e; --lilac-ink: #c2b7ee;
    --teal-bg: #162728;  --teal-line: #244847;  --teal-ink: #9ed4d0;
    --slate-bg: #20252e; --slate-line: #353d4a; --slate-ink: #b1b9c7;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; background: var(--bg); color: var(--ink); }
body { font: 14px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
body.has-drawer { overflow: hidden; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
h1 { font-size: 20px; margin: 0; line-height: 1.25; }
h2 { font-size: 15px; margin: 0 0 8px; }
h3 { font-size: 13px; margin: 12px 0 6px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.loading, .empty { color: var(--muted); padding: 24px; }
.muted { color: var(--muted); }
.warn { color: var(--warn); }
.mono { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: 12px; word-break: break-all; }
.faint { color: var(--faint); }
.small { font-size: 12px; }
.nowrap { white-space: nowrap; }
.pre { white-space: pre-wrap; overflow-wrap: anywhere; }

/* --- which pastel a thing wears ------------------------------------------------
 * A class sets the three colours; a chip, a section head or a dot uses them.
 * New on a list and nothing sent: sky. Waiting on them: lemon. Waiting on
 * you: lilac. In the diary: teal. Going well: mint. Parked: peach. Declined:
 * rose. Closed without a judgement, or quiet: slate. */
.tone-sky, .stage-NEW, .band-CALL, .chip.pending, .iv-invited, .iv-invitation_waiting, .jr-command {
  --tone-bg: var(--sky-bg); --tone-line: var(--sky-line); --tone-ink: var(--sky-ink);
}
.tone-lemon, .stage-DETAILS_REQUESTED, .stage-CALL_INVITED, .band-PROBE, .rs-PAUSED, .cv-SECOND_CALL, .jr-details {
  --tone-bg: var(--lemon-bg); --tone-line: var(--lemon-line); --tone-ink: var(--lemon-ink);
}
.tone-lilac, .stage-DETAILS_RECEIVED, .stage-CALL_DONE, .stage-FEEDBACK_IN, .jr-stage, .jr-feedback, .jr-score {
  --tone-bg: var(--lilac-bg); --tone-line: var(--lilac-line); --tone-ink: var(--lilac-ink);
}
.tone-teal, .stage-INTERVIEW_BOOKED, .iv-booked, .jr-interview, .jr-reply {
  --tone-bg: var(--teal-bg); --tone-line: var(--teal-line); --tone-ink: var(--teal-ink);
}
.tone-mint, .stage-OFFER, .stage-HIRED, .band-STRONG, .rs-OPEN, .iv-feedback_in, .verdict-STRONG_YES, .verdict-YES, .cv-ADVANCE, .jr-message, .jr-call {
  --tone-bg: var(--mint-bg); --tone-line: var(--mint-line); --tone-ink: var(--mint-ink);
}
.tone-peach, .stage-ON_HOLD, .chip.flag, .cv-HOLD, .jr-consent {
  --tone-bg: var(--peach-bg); --tone-line: var(--peach-line); --tone-ink: var(--peach-ink);
}
.tone-rose, .stage-REJECTED, .chip.refused, .chip.no, .iv-invitation_failed, .verdict-NO, .verdict-STRONG_NO, .cv-DECLINE {
  --tone-bg: var(--rose-bg); --tone-line: var(--rose-line); --tone-ink: var(--rose-ink);
}
.tone-slate, .stage-NOT_INTERESTED, .stage-WITHDRAWN, .band-WEAK, .rs-CLOSED, .chip.dup, .iv-called_off, .iv-no_show,
.iv-booking_cancelled, .iv-invitation_cancelled, .verdict-NO_READ, .cv-NO_ASSESSMENT, .jr-applied, .jr-contact {
  --tone-bg: var(--slate-bg); --tone-line: var(--slate-line); --tone-ink: var(--slate-ink);
}

/* --- the bar across the top ------------------------------------------------ */
.top {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  padding: 10px 16px; background: var(--panel); border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 5;
}
.top .brand { font-weight: 650; display: inline-flex; align-items: center; gap: 8px; }
.top .brand::before { content: ""; width: 10px; height: 10px; border-radius: 3px; background: linear-gradient(135deg, var(--sky-line), var(--lilac-line)); }
.top nav { display: flex; gap: 4px; }
.top nav a { padding: 5px 10px; border-radius: 6px; color: var(--muted); }
.top nav a:hover { text-decoration: none; background: var(--row-hover); color: var(--ink); }
.top nav a.on { background: var(--sky-bg); color: var(--sky-ink); }
.top .spacer { flex: 1; }
.top .who { color: var(--muted); }

.page { padding: 16px; max-width: 1500px; margin: 0 auto; width: 100%; }
.page-title { margin: 4px 0 14px; }

/* The list fills the window, and only the table scrolls: its header stays put
   and the filters stay in reach. On a small screen the page scrolls instead. */
#app.fill { height: 100vh; height: 100dvh; display: flex; flex-direction: column; }
#app.fill > .page { flex: 1; min-height: 0; display: flex; flex-direction: column; padding-bottom: 12px; }
#app.fill .table-wrap { flex: 1; min-height: 0; }
@media (max-width: 720px), (max-height: 520px) {
  #app.fill { height: auto; }
  #app.fill .table-wrap { flex: none; }
}
/* The stages down the left, and the list beside them, across the whole width of the window. */
.queue-page { --stages-w: 176px; }
#app.fill > .page.queue-page { flex-direction: row; align-items: stretch; gap: 12px; max-width: none; }
.queue-main { flex: 1; min-width: 0; min-height: 0; display: flex; flex-direction: column; }

/* --- buttons, fields -------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; gap: 6px; cursor: pointer;
  border: 1px solid var(--line); background: var(--panel); border-radius: 6px;
  padding: 5px 11px; line-height: 1.3;
}
.btn:hover { border-color: var(--faint); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.danger { color: var(--bad); border-color: color-mix(in srgb, var(--bad) 40%, var(--line)); }
.btn.danger-solid { background: var(--bad); border-color: var(--bad); color: #fff; }
/* Disabled by itself, or by the locked part of the page it sits in. */
.btn[disabled], .btn:disabled { opacity: .5; cursor: default; }
.btn.link { border: 0; background: none; padding: 2px 4px; color: var(--accent); }
.btn.quiet { border-color: transparent; background: none; color: var(--muted); padding: 4px 8px; }
.btn.quiet:hover { background: var(--row-hover); color: var(--ink); }
.btn.icon { width: 30px; height: 30px; padding: 0; justify-content: center; font-size: 17px; line-height: 1; color: var(--muted); }
.btn.icon:hover:not([disabled]) { color: var(--ink); background: var(--row-hover); }
input[type=text], input[type=search], input[type=email], input[type=tel], input[type=password], input[type=number], input[type=time], select, textarea {
  border: 1px solid var(--line); background: var(--panel); border-radius: 6px; padding: 5px 8px;
}
textarea { width: 100%; min-height: 70px; resize: vertical; }
label.field, div.field { display: grid; gap: 4px; margin: 10px 0; }
label.field > input, label.field > select { width: 100%; }
/* The email settings (1 Oct 2026): a form as wide as its longest answer needs, not the whole page. */
.email-fields { max-width: 560px; }
label.check { display: inline-flex; gap: 6px; align-items: center; cursor: pointer; }
label.inline { display: inline-flex; gap: 6px; align-items: center; white-space: nowrap; }
input.minutes { width: 72px; text-align: right; }

kbd {
  display: inline-block; min-width: 18px; padding: 2px 5px; border: 1px solid var(--line); border-bottom-width: 2px;
  border-radius: 4px; background: var(--panel); color: var(--muted); text-align: center;
  font: 11px/1.2 ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}

/* --- chips ---------------------------------------------------------------------- */
.chip {
  --tone-bg: var(--chip); --tone-line: transparent; --tone-ink: var(--ink);
  display: inline-block; padding: 0 8px; border-radius: 999px; font-size: 12px; line-height: 20px;
  margin: 1px 4px 1px 0; white-space: nowrap; vertical-align: middle;
  background: var(--tone-bg); color: var(--tone-ink); border: 1px solid var(--tone-line);
}
/* The rules that give a chip its pastel come after the one that clears it. */
.chip.stage-NEW, .chip.band-CALL, .chip.pending, .chip.iv-invited, .chip.iv-invitation_waiting, .chip.tone-sky { --tone-bg: var(--sky-bg); --tone-line: var(--sky-line); --tone-ink: var(--sky-ink); }
.chip.stage-DETAILS_REQUESTED, .chip.stage-CALL_INVITED, .chip.band-PROBE, .chip.rs-PAUSED, .chip.cv-SECOND_CALL, .chip.tone-lemon { --tone-bg: var(--lemon-bg); --tone-line: var(--lemon-line); --tone-ink: var(--lemon-ink); }
.chip.stage-DETAILS_RECEIVED, .chip.stage-CALL_DONE, .chip.stage-FEEDBACK_IN, .chip.tone-lilac { --tone-bg: var(--lilac-bg); --tone-line: var(--lilac-line); --tone-ink: var(--lilac-ink); }
.chip.stage-INTERVIEW_BOOKED, .chip.iv-booked, .chip.tone-teal, .chip.reads-like { --tone-bg: var(--teal-bg); --tone-line: var(--teal-line); --tone-ink: var(--teal-ink); }
.chip.stage-OFFER, .chip.stage-HIRED, .chip.band-STRONG, .chip.rs-OPEN, .chip.iv-feedback_in, .chip.verdict-STRONG_YES, .chip.verdict-YES, .chip.cv-ADVANCE, .chip.tone-mint { --tone-bg: var(--mint-bg); --tone-line: var(--mint-line); --tone-ink: var(--mint-ink); }
.chip.stage-ON_HOLD, .chip.flag, .chip.cv-HOLD, .chip.tone-peach { --tone-bg: var(--peach-bg); --tone-line: var(--peach-line); --tone-ink: var(--peach-ink); }
.chip.stage-REJECTED, .chip.refused, .chip.no, .chip.iv-invitation_failed, .chip.verdict-NO, .chip.verdict-STRONG_NO, .chip.cv-DECLINE, .chip.tone-rose { --tone-bg: var(--rose-bg); --tone-line: var(--rose-line); --tone-ink: var(--rose-ink); }
.chip.stage-NOT_INTERESTED, .chip.stage-WITHDRAWN, .chip.band-WEAK, .chip.rs-CLOSED, .chip.dup, .chip.iv-called_off, .chip.iv-no_show,
.chip.iv-booking_cancelled, .chip.iv-invitation_cancelled, .chip.verdict-NO_READ, .chip.cv-NO_ASSESSMENT, .chip.tone-slate { --tone-bg: var(--slate-bg); --tone-line: var(--slate-line); --tone-ink: var(--slate-ink); }

/* --- the list of applications ---------------------------------------------------- */
/* A tile a stage, down the left of the list and every tile one width, in two parts: its number,
   big, on its pastel — the key that picks it — and beside it the name over the count. While another
   filter narrows the list the count is how many there match, over how many there are, and a line
   along the foot fills to that share. A column taller than the window scrolls by itself. */
.stages { display: flex; flex-direction: column; gap: 5px; flex: none; width: var(--stages-w, 176px); min-height: 0; overflow-y: auto; scrollbar-width: thin; }
:where(.stages > button) { --tone-bg: var(--chip); --tone-line: var(--line); --tone-ink: var(--muted); }
.stages > button {
  position: relative; display: flex; align-items: stretch; flex: none; width: 100%; padding: 0; overflow: hidden;
  border: 1px solid var(--line); border-radius: 8px; background: var(--panel); cursor: pointer; text-align: left;
}
.stages > button:hover { border-color: color-mix(in srgb, var(--tone-ink) 45%, var(--line)); }
/* The column scrolls, so it would cut off a ring drawn outside the tile: the keyboard's is drawn inside. */
.stages > button:focus-visible { outline-offset: -2px; }
.stages .k {
  display: grid; place-items: center; flex: none; width: 38px;
  font-size: 19px; font-weight: 700; line-height: 1; font-variant-numeric: tabular-nums; letter-spacing: -.02em;
  color: var(--tone-ink); background: var(--tone-bg); border-right: 1px solid var(--tone-line);
}
.stages .t { display: grid; align-content: center; gap: 1px; flex: 1; min-width: 0; padding: 5px 8px 6px 9px; }
.stages .l { font-size: 12.5px; line-height: 1.3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stages .c { font-size: 12px; line-height: 1.3; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-variant-numeric: tabular-nums; }
.stages .c .n { font-weight: 650; color: var(--ink); }
.stages .c .of { color: var(--faint); }
/* Said under the name, beside the count, so the longest name sets the column's width and nothing else. */
.stages > button.waiting .c::after { content: " · yours"; color: var(--warn); }
/* Picked: the number turns solid, like a key held down. */
.stages > button.on { background: var(--tone-bg); border-color: var(--tone-ink); box-shadow: inset 0 0 0 1px var(--tone-ink); }
.stages > button.on .k { background: var(--tone-ink); color: var(--panel); border-right-color: var(--tone-ink); }
/* None there match the filters: still there to click, quieter. */
.stages > button.none .t, .stages > button.none .k { opacity: .55; }
.stages .m { display: none; position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: color-mix(in srgb, var(--tone-line) 65%, transparent); }
.stages.narrowed .m { display: block; }
.stages .m > i { display: block; height: 100%; width: 0; background: color-mix(in srgb, var(--tone-ink) 70%, var(--panel)); }
/* 9 onwards, closed or parked, fold away behind their + — all but one that is picked. */
.stages.folded > button.extra:not(.on):not(.kept) { display: none; }
.stages > button.fold { border-style: dashed; }
.stages > button.fold .k { font-weight: 500; }
/* Too narrow for a column beside the list, the stages go back over it, in a row that wraps. */
@media (max-width: 900px) {
  #app.fill > .page.queue-page { flex-direction: column; gap: 0; }
  .stages { flex-direction: row; flex-wrap: wrap; width: auto; overflow: visible; margin-bottom: 12px; }
  .stages > button { width: auto; }
}

/* Over the filters: the labels, and at the end of their line how many are shown. */
.list-head { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.list-head .labels-row { flex: 1; min-width: 0; }
/* Clear filters starts the line, where it never moves, and is dimmed while there is nothing to clear. */
.btn.clear-filters { flex: none; gap: 6px; font-size: 13px; white-space: nowrap; }
.btn.clear-filters:disabled { color: var(--muted); opacity: .55; }
.list-head .clear-filters + .labels-row { border-left: 1px solid var(--line); padding-left: 10px; }
.list-head .btn.icon { width: 24px; height: 24px; font-size: 15px; }
.btn.cols-btn { gap: 5px; padding: 2px 8px; font-size: 13px; }
.btn.cols-btn svg.icon { width: 15px; height: 15px; }
.btn.cols-btn.on { background: var(--sky-bg); color: var(--sky-ink); }

/* One line, as long as there is room for it: the search takes what the rest leave. */
.filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 10px; }
.filters .search { flex: 4 1 190px; max-width: 320px; }

/* Role, source, band, flag and the ticks: each button reads as a select does — the first ticked and how many
   more — and is tinted while what is ticked narrows the list. */
.btn.select-btn { gap: 5px; max-width: 190px; padding: 5px 7px 5px 9px; white-space: nowrap; }
.select-btn .v { overflow: hidden; text-overflow: ellipsis; }
.select-btn .plus { color: var(--muted); font-variant-numeric: tabular-nums; }
.select-btn svg.icon { width: 14px; height: 14px; color: var(--muted); }
.btn.select-btn.on { background: var(--sky-bg); border-color: var(--sky-line); color: var(--sky-ink); }
.btn.select-btn.on .plus, .btn.select-btn.on svg.icon { color: var(--sky-ink); }
/* A menu of tick boxes: each its box, its name — and its key, where it shows, or how many there are, when it
   has one — and a line on what it does. The ticks are four; the columns come in groups, two to a line. */
.pop.tick-pop { width: min(360px, calc(100vw - 16px)); padding: 5px; }
.pop.pick-pop { width: min(300px, calc(100vw - 16px)); }
.tick-opt { display: grid; grid-template-columns: auto 1fr; gap: 1px 9px; align-items: center; padding: 6px 8px; border-radius: 6px; cursor: pointer; }
.tick-opt:hover, .tick-opt:focus-within { background: var(--row-hover); }
.tick-opt.locked { cursor: default; color: var(--muted); }
.tick-opt input { margin: 0; }
.tick-l { display: flex; align-items: center; gap: 8px; min-width: 0; }
.tick-l kbd, .tick-note { margin-left: auto; }
.tick-note { font-size: 11.5px; color: var(--faint); white-space: nowrap; font-variant-numeric: tabular-nums; }
.tick-d { grid-column: 2; font-size: 12px; line-height: 1.35; color: var(--muted); }
.tick-group { grid-column: 1 / -1; margin: 8px 8px 2px; font-size: 11.5px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.tick-group:first-child { margin-top: 2px; }
.pop.columns-pop { width: min(460px, calc(100vw - 16px)); max-height: min(620px, calc(100vh - 16px)); }
.columns-pop .tick-list { display: grid; grid-template-columns: 1fr 1fr; column-gap: 4px; }
.columns-pop .tick-opt { padding: 4px 8px; }
@media (max-width: 480px) { .columns-pop .tick-list { grid-template-columns: 1fr; } }

/* The search box: a × to empty it, and a reminder that / reaches it. */
.search { position: relative; display: inline-flex; align-items: center; }
.search input { width: 100%; min-width: 0; padding-right: 30px; }
.search input::-webkit-search-cancel-button { -webkit-appearance: none; appearance: none; display: none; }
.search-clear {
  position: absolute; right: 6px; width: 18px; height: 18px; padding: 0; border: 0; border-radius: 50%;
  display: grid; place-items: center; cursor: pointer; font-size: 14px; line-height: 1;
  background: var(--slate-bg); color: var(--muted);
}
.search-clear:hover { background: var(--slate-line); color: var(--ink); }
.search-hint { position: absolute; right: 7px; pointer-events: none; }

.bulk {
  display: flex; gap: 8px; align-items: center; padding: 8px 12px; margin-bottom: 10px;
  background: var(--lilac-bg); border: 1px solid var(--lilac-line); border-radius: 8px;
}

.table-wrap { background: var(--panel); border: 1px solid var(--line); border-radius: 8px; overflow: auto; box-shadow: var(--shadow); }
table.queue { border-collapse: collapse; width: 100%; }
table.queue th, table.queue td { padding: 7px 10px; border-bottom: 1px solid var(--line); vertical-align: top; text-align: left; }
table.queue th {
  position: sticky; top: 0; background: var(--panel); font-size: 12px; color: var(--muted); font-weight: 600; z-index: 1;
  box-shadow: inset 0 -1px 0 var(--line); white-space: nowrap;
}
table.queue tbody tr:hover td { background: var(--row-hover); }
table.queue td.num, table.queue th.num { text-align: right; white-space: nowrap; }
table.queue tr.inactive td { color: var(--faint); }
.more { padding: 12px; text-align: center; }

/* One application to a row, one line to an application: the why is cut short
   here and read in full in the drawer. */
table.apps th, table.apps td { padding: 6px 9px; }
table.apps td { white-space: nowrap; vertical-align: middle; }
table.apps tbody tr { cursor: pointer; scroll-margin-top: 34px; }
table.apps tbody tr.none { cursor: default; }
table.apps tbody tr.none td { white-space: normal; }
table.apps tbody tr.none:hover td { background: none; }
table.apps tbody tr:focus { outline: none; }
table.apps td.name { font-weight: 500; max-width: 280px; overflow: hidden; text-overflow: ellipsis; padding-top: 5px; padding-bottom: 5px; }
table.apps td.name a { color: var(--ink); }
table.apps td.name .role { font-size: 12px; font-weight: 400; color: var(--muted); overflow: hidden; text-overflow: ellipsis; line-height: 1.3; }
table.apps td.why, table.apps td.wide { width: 100%; max-width: 0; min-width: 140px; overflow: hidden; text-overflow: ellipsis; color: var(--muted); }
/* Two flags or three go one under the other, rather than push the columns after them off the screen. */
table.apps td.flags { white-space: normal; max-width: 190px; }
/* The call, the interview and the feedback: what it came to, and under it the detail. */
table.apps td .sub { font-size: 12px; color: var(--muted); line-height: 1.3; margin-top: 2px; }
table.apps td.call .line { display: flex; align-items: center; gap: 6px; }
table.apps td.call .chip { margin: 0; }
table.apps td.call .n { font-weight: 650; font-variant-numeric: tabular-nums; }
/* Room for two of what held it back side by side: the free text beside it would otherwise take the room and stack them.
   A table cell keeps no width of its own, so the room is kept by what is in it. */
table.apps td.call .tags { display: flex; flex-wrap: wrap; gap: 3px; min-width: 262px; max-width: 272px; margin-top: 3px; }
table.apps td.call .tags .chip, table.apps td.date .chip { font-size: 11px; line-height: 17px; padding: 0 6px; }
table.apps td.date .chip { margin: 0 0 0 6px; }
table.apps td.iv .when { font-variant-numeric: tabular-nums; }
table.apps td.date { font-variant-numeric: tabular-nums; }
table.apps td.date .ago { color: var(--faint); }
table.apps td.text { max-width: 240px; overflow: hidden; text-overflow: ellipsis; }
table.apps td .chip.flag { max-width: 170px; overflow: hidden; text-overflow: ellipsis; }
table.apps td.stage .chip.cmd { font-size: 11px; line-height: 17px; margin-top: 3px; }
table.apps tbody tr.selected td { background: var(--lilac-bg); }
table.apps tbody tr.cursor td { background: var(--sky-bg); }
table.apps tbody tr.cursor td:first-child { box-shadow: inset 3px 0 0 var(--sky-ink); }
table.apps th.sel, table.apps td.sel { width: 1%; padding: 0; }
table.apps th.sel { padding: 7px 10px; }
label.hit { display: flex; align-items: center; padding: 7px 10px; cursor: pointer; }

/* --- the drawer: one application, over the list ------------------------------------ */
.drawer-layer { position: fixed; inset: 0; z-index: 40; --drawer-w: 80vw; }
.drawer-scrim { position: absolute; inset: 0; background: var(--scrim); animation: fade-in .16s ease-out; }
.drawer {
  position: absolute; top: 0; right: 0; bottom: 0; z-index: 1; width: var(--drawer-w);
  background: var(--bg); box-shadow: var(--drawer-shadow); border-left: 1px solid var(--line);
  overflow-y: auto; overscroll-behavior: contain; container-type: inline-size;
  animation: slide-in .2s cubic-bezier(.2, .7, .2, 1);
}
.drawer:focus { outline: none; }
@keyframes slide-in { from { transform: translateX(48px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .drawer, .drawer-scrim, .viewer { animation: none; } }

/* The resume or its evidence, beside the application: the file takes the left and the
   application narrows to the right, or the file takes the whole screen. */
.drawer-layer.viewing { --drawer-w: clamp(420px, 42vw, 640px); }
@media (max-width: 900px) { .drawer-layer, .drawer-layer.viewing { --drawer-w: 100vw; } }
.viewer {
  position: absolute; top: 0; bottom: 0; left: 0; right: var(--drawer-w); z-index: 1;
  display: flex; flex-direction: column; background: var(--panel); outline: none;
  animation: fade-in .16s ease-out;
}
.drawer-layer.full .viewer { right: 0; z-index: 2; }
/* Too narrow for the file beside the application, it has the whole screen already: no button for it. */
@media (max-width: 900px) { .viewer { right: 0; z-index: 2; } .viewer-bar .full-btn { display: none; } }
.viewer-bar { display: flex; align-items: center; gap: 8px 12px; flex-wrap: wrap; padding: 7px 10px 7px 12px; border-bottom: 1px solid var(--line); }
.viewer-bar .segs { display: flex; gap: 2px; padding: 2px; border-radius: 8px; background: var(--chip); }
.viewer-bar .btn.seg { padding: 3px 10px; gap: 6px; }
.viewer-bar .btn.seg[aria-pressed="true"] { background: var(--panel); color: var(--ink); box-shadow: var(--shadow); }
.viewer-who { flex: 1; min-width: 0; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 600px) { .viewer-who { display: none; } }
.viewer-away {
  display: none; position: absolute; z-index: 1; top: 10px; left: 50%; transform: translateX(-50%); margin: 0; pointer-events: none;
  width: max-content; max-width: calc(100% - 24px); padding: 3px 12px; border-radius: 999px; font-size: 12.5px; text-align: center;
  background: var(--lemon-bg); border: 1px solid var(--lemon-line); color: var(--lemon-ink); box-shadow: var(--shadow);
}
.viewer.away .viewer-away { display: block; }
.viewer-stage { position: relative; flex: 1; min-height: 0; background: var(--slate-bg); }
.viewer-stage iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; visibility: hidden; }
.viewer-stage iframe.on { visibility: visible; }
.viewer-empty { margin: 0; padding: 48px 24px; text-align: center; color: var(--muted); }
.viewer-note { margin: 0; padding: 5px 12px; font-size: 12px; color: var(--muted); border-top: 1px solid var(--line); }
.drawer-head .file-btn { gap: 6px; }
.drawer-head .file-btn[aria-pressed="true"] { background: var(--lilac-bg); color: var(--lilac-ink); }
/* With the file up, its own bar offers both files: the head would say it twice. */
.drawer-layer.viewing .drawer-head .file-btn { display: none; }

.drawer-head {
  position: sticky; top: 0; z-index: 3; display: flex; align-items: center; gap: 16px;
  padding: 10px 20px; background: var(--panel); border-bottom: 1px solid var(--line);
}
.drawer-head .nav { display: flex; align-items: center; gap: 4px; flex: none; }
.drawer-head .pos { font-size: 12px; color: var(--muted); margin-left: 6px; white-space: nowrap; min-width: 64px; }
.drawer-head .who { flex: 1; min-width: 0; }
.drawer-head h1 { font-size: 19px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.drawer-head .line { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: center; margin-top: 3px; font-size: 13px; color: var(--muted); }
.drawer-head .line .chip { margin: 0; }
.drawer-head .line .score { color: var(--ink); font-weight: 600; }
.drawer-head .btn.id { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: 11px; color: var(--faint); padding: 0; white-space: nowrap; }
.drawer-head .btn.id:hover { color: var(--accent); }
.drawer-head .end { display: flex; gap: 4px; flex: none; }
.drawer-body { padding: 16px 20px 48px; }
/* A narrow drawer: back and forth and the way out on one row, who it is on the next. */
@container (max-width: 620px) {
  .drawer-head { flex-wrap: wrap; gap: 8px 12px; padding: 10px 14px; }
  .drawer-head .who { order: 3; flex-basis: 100%; }
  .drawer-head .end { margin-left: auto; }
  .drawer-head h1 { white-space: normal; }
  .drawer-body { padding: 12px 12px 40px; }
  .steps .btn.step { max-width: none; flex: 1 1 100%; }
}

.callout { margin: 0 0 14px; padding: 9px 12px; border-radius: 8px; background: var(--tone-bg, var(--chip)); border: 1px solid var(--tone-line, var(--line)); }
.callout strong { color: var(--tone-ink, var(--ink)); }

/* --- one application ---------------------------------------------------------- */
.app-grid { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 16px; align-items: start; }
@media (max-width: 1050px) { .app-grid { grid-template-columns: 1fr; } }
.drawer .app-grid { grid-template-columns: minmax(0, 1fr) 340px; }
/* One column: the next step, how the resume ranked and what is worth a glance
   come first — what matters with the resume open beside it — then the rest in
   their usual order. */
@container (max-width: 960px) {
  .drawer .app-grid { grid-template-columns: 1fr; row-gap: 0; }
  .drawer .app-grid > .main, .drawer .app-grid > .side { display: contents; }
  .drawer .app-grid .card.next { order: 1; }
  .drawer .app-grid [data-key="resume"] { order: 2; }
  .drawer .app-grid .card.glance { order: 4; }
  .drawer .app-grid > * > * { order: 5; }
  .drawer .app-grid [data-key="commands"] { order: 6; }
  .drawer .app-grid [data-key="journey"] { order: 7; }
}
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 14px 16px; margin-bottom: 16px; box-shadow: var(--shadow); }
.drawer .card { margin-bottom: 12px; }
.card.head .line { margin-top: 6px; display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; }
.back { display: inline-block; margin-bottom: 10px; }
dl.kv { display: grid; grid-template-columns: max-content 1fr; gap: 4px 14px; margin: 0; }
dl.kv dt { color: var(--muted); }
dl.kv dd { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
/* Where a machine wrote something, said once and small — never the words themselves in a faint italic. */
.machine { font-size: 12px; color: var(--muted); }
.provenance { font-size: 12px; color: var(--muted); margin: 10px 0 4px; }
.platform-summary { margin: 6px 0; }
.platform-summary .provenance { margin: 0 0 2px; }
.platform-summary p:last-child { margin: 0; }
.trait { border-top: 1px solid var(--line); padding: 8px 0; }
.trait:first-child { border-top: 0; }
blockquote { margin: 4px 0; padding: 2px 10px; border-left: 3px solid var(--line); color: var(--muted); }
.why-text { font-size: 14.5px; }

/* How each trait scored: one tile a trait, in a row — the name, five dots, the number.
   What the trait looks for is on the tile's hover. */
.trait-tiles { list-style: none; margin: 10px 0 12px; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(92px, 1fr)); gap: 6px; }
.tile { min-width: 0; padding: 6px 9px 7px; border-radius: 7px; background: var(--tone-bg); border: 1px solid var(--tone-line); cursor: help; }
.tile-name { display: block; font-size: 12.5px; font-weight: 600; line-height: 1.25; color: var(--tone-ink); hyphens: auto; overflow-wrap: anywhere; }
/* Beside the file there is no room for five names in a row: three and two, each name whole. */
.drawer-layer.viewing .trait-tiles { grid-template-columns: repeat(auto-fit, minmax(132px, 1fr)); }
.tile-score { display: flex; align-items: center; gap: 6px; margin-top: 4px; font-size: 12px; color: var(--muted); }
.tile-score .n { margin-left: auto; font-weight: 650; color: var(--ink); }
.tile-score .of { margin-left: -5px; color: var(--faint); }
.pips { display: inline-flex; gap: 3px; }
.pips i { width: 8px; height: 8px; border-radius: 50%; background: var(--slate-line); }
.pips i.on { background: color-mix(in srgb, var(--lilac-ink) 70%, var(--panel)); }
.tile .pips i:not(.on) { background: color-mix(in srgb, var(--tone-line) 80%, var(--panel)); }
.tile .pips i.on { background: var(--tone-ink); }
.quotes { margin: 10px 0; }
.quotes > summary { cursor: pointer; font-size: 13px; color: var(--accent); }
.quote-group h3 { margin: 10px 0 2px; font-size: 12.5px; color: var(--lilac-ink); }
.quotes blockquote { border-left-color: var(--lilac-line); }
.probes { margin-top: 6px; padding: 8px 12px; border-radius: 6px; background: var(--lilac-bg); }
.probes h3 { margin-top: 2px; color: var(--lilac-ink); }
.probes p { margin: 0; }

/* A part that folds away. Its head is a quiet pastel strip, so each part is
   easy to find again, and folded it is just the strip. */
.section { background: var(--panel); border: 1px solid var(--line); border-radius: 8px; margin-bottom: 12px; box-shadow: var(--shadow); overflow: hidden; }
.section-head {
  display: flex; align-items: center; gap: 10px; padding: 8px 14px; list-style: none;
  background: var(--tone-bg); border-bottom: 1px solid var(--tone-line); cursor: pointer; user-select: none;
}
.section-head::-webkit-details-marker { display: none; }
.section-head::marker { content: ""; }
.section-head h2 { margin: 0; font-size: 14px; color: var(--ink); }
.section-head .meta { margin-left: auto; font-size: 12px; color: var(--muted); }
.section-head .meta strong { color: var(--tone-ink); }
details.section > .section-head::before {
  content: ""; width: 6px; height: 6px; flex: none; margin: 0 2px 2px;
  border-right: 1.5px solid var(--tone-ink); border-bottom: 1.5px solid var(--tone-ink);
  transform: rotate(-45deg); transition: transform .15s ease;
}
details.section[open] > .section-head::before { transform: rotate(45deg); margin-bottom: 4px; }
details.section:not([open]) > .section-head { border-bottom-color: transparent; }
.section-head:hover h2 { color: var(--tone-ink); }
.section.blank .section-head { cursor: default; border-bottom: 0; background: color-mix(in srgb, var(--tone-bg) 55%, var(--panel)); }
.section.blank .section-head h2 { color: var(--muted); font-weight: 600; }
.section.blank .section-head:hover h2 { color: var(--muted); }
.section.blank .section-head::before { content: ""; width: 6px; height: 6px; margin: 0 2px; border-radius: 50%; background: var(--tone-line); }
.section-body { padding: 12px 14px 14px; }
.section-body > :first-child { margin-top: 0; }
.section-body > :last-child { margin-bottom: 0; }

/* The note: a paragraph written straight into its box, on a slip of paper
   pinned to the head — out of the way of the file beside the application,
   and up again with one key. */
.note-btn { gap: 6px; }
.note-btn svg.icon { color: var(--lemon-ink); }
.note-btn.has { background: var(--lemon-bg); border-color: var(--lemon-line); color: var(--lemon-ink); }
.note-btn[aria-expanded="true"] { background: var(--lemon-bg); border-color: var(--lemon-line); color: var(--lemon-ink); }
.note-pop {
  position: absolute; z-index: 4; top: calc(100% - 4px); right: 12px; width: min(400px, calc(100% - 24px));
  background: var(--panel); border: 1px solid var(--lemon-line); border-radius: 10px; box-shadow: var(--drawer-shadow);
  animation: fade-in .12s ease-out;
}
@media (prefers-reduced-motion: reduce) { .note-pop { animation: none; } }
.note-head {
  display: flex; align-items: center; gap: 10px; padding: 7px 8px 7px 12px;
  background: var(--lemon-bg); border-bottom: 1px solid var(--lemon-line); border-radius: 9px 9px 0 0;
}
.note-head h2 { margin: 0; font-size: 14px; }
.note-head .meta { margin-left: auto; font-size: 12px; color: var(--muted); }
.note-head .meta.dirty { color: var(--warn); }
.note-head .btn.icon { width: 26px; height: 26px; color: var(--lemon-ink); }
.note-body { padding: 10px; }
textarea.note-box {
  min-height: 112px; border-color: transparent; background: color-mix(in srgb, var(--lemon-bg) 45%, var(--panel));
  line-height: 1.5; padding: 8px 10px;
}
textarea.note-box:hover { border-color: var(--lemon-line); }
textarea.note-box:focus { background: var(--panel); border-color: var(--lemon-line); outline: 2px solid var(--lemon-line); outline-offset: 0; }
.note-body .error { margin: 6px 2px 0; }

/* Line icons, in whatever colour the text around them is. */
svg.icon { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.has-note { display: inline-flex; vertical-align: -3px; margin: 0 4px 0 6px; color: var(--lemon-ink); opacity: .8; }
.has-note svg.icon { width: 14px; height: 14px; }

/* A note's history: each change, who made it and when, words taken out and put in. */
ol.versions { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 10px; }
ol.versions li { border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; }
ol.versions li:first-child { border-color: var(--lemon-line); background: color-mix(in srgb, var(--lemon-bg) 50%, var(--panel)); }
.version-head { font-size: 13px; margin-bottom: 6px; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; }
.version-head .chip { margin-left: auto; }
.diff { white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.55; }
.diff ins { text-decoration: none; background: var(--mint-bg); color: var(--mint-ink); border-radius: 3px; box-shadow: 0 0 0 1px var(--mint-line); }
.diff del { color: var(--rose-ink); background: var(--rose-bg); border-radius: 3px; text-decoration-color: color-mix(in srgb, var(--rose-ink) 60%, transparent); }

/* Everything worth a glance, down the side. */
.glance dl.kv { font-size: 13px; gap: 5px 14px; }
.glance .links { display: flex; gap: 14px; margin: 12px 0 0; }
.glance p { margin: 10px 0 0; }
/* The way to put their name, number or email right: quiet, under what it changes. */
.glance .edit-contact { margin-top: 6px; }
.glance .edit-contact .btn.link { padding: 2px 0; font-size: 12.5px; gap: 6px; }
.glance dd .btn.link.error { padding: 0; color: var(--bad); text-align: left; }
.glance .flags { margin-top: 8px; }

.commands { display: grid; gap: 6px; }
.open-command { padding: 10px 12px; border-radius: 6px; background: var(--sky-bg); border: 1px solid var(--sky-line); margin-bottom: 10px; }
.open-command.refused { background: var(--rose-bg); border-color: var(--rose-line); }
.open-command p { margin: 4px 0; }

ol.journey { list-style: none; margin: 0; padding: 0; }
ol.journey li { position: relative; padding: 0 0 12px 16px; border-left: 2px solid var(--line); margin-left: 4px; }
ol.journey li:last-child { padding-bottom: 2px; }
ol.journey li::before {
  content: ""; position: absolute; left: -6px; top: 5px; width: 10px; height: 10px; border-radius: 50%;
  background: color-mix(in srgb, var(--tone-ink, var(--faint)) 55%, var(--panel)); box-shadow: 0 0 0 2px var(--panel);
}
ol.journey .when { font-size: 12px; color: var(--faint); }
ol.journey .who { font-size: 12px; color: var(--muted); }
ol.journey .detail { font-size: 12px; color: var(--muted); white-space: pre-wrap; overflow-wrap: anywhere; }

.thread { display: grid; gap: 8px; }
.bubble { border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; }
.bubble.out { border-color: var(--sky-line); }
.bubble.in { background: var(--mint-bg); border-color: var(--mint-line); }
.bubble .meta { font-size: 12px; color: var(--faint); margin-bottom: 4px; }

details > summary { cursor: pointer; color: var(--accent); }
.line.small { display: flex; flex-wrap: wrap; gap: 4px 10px; margin: 4px 0; }

/* --- the next step: the one highlighted place on an application -------------- */
.card.next { border-color: var(--sky-line); background: var(--sky-bg); }
.next-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-bottom: 8px; }
.next-head h2 { margin: 0; }
.next-head .spacer { flex: 1; }
.next-head .chip { margin: 0; }
.steps { display: flex; flex-wrap: wrap; gap: 8px; margin: 6px 0 4px; }
.btn.step {
  position: relative; flex-direction: column; align-items: flex-start; gap: 2px;
  padding: 8px 32px 8px 12px; min-width: 180px; max-width: 300px; text-align: left;
}
.btn.step > kbd { position: absolute; top: 7px; right: 7px; }
.btn.step .what { font-weight: 600; }
.btn.step .note { font-size: 12px; color: var(--muted); }
.btn.step.main { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.step.main .note { color: color-mix(in srgb, var(--accent-ink) 80%, transparent); }
.btn.step.main > kbd { background: transparent; color: var(--accent-ink); border-color: color-mix(in srgb, var(--accent-ink) 45%, transparent); }
.btn.step.danger .what { color: var(--bad); }
.small-steps .btn.step { min-width: 160px; padding: 6px 10px; }
/* With a file up beside the application, the room goes to the file: the next
   steps shrink to their words and their key, and what each one sends is on the
   hover. Nothing is taken away — the same buttons, the same numbers. */
.drawer-layer.viewing .card.next { padding: 8px 12px 10px; }
.drawer-layer.viewing .next-head { gap: 6px 10px; margin-bottom: 4px; }
.drawer-layer.viewing .next-head h2 { font-size: 15px; }
.drawer-layer.viewing .next-head .muted.small { display: none; }
.drawer-layer.viewing .card.next .steps { gap: 6px; margin: 4px 0 0; }
.drawer-layer.viewing .card.next .btn.step {
  flex: 0 1 auto; flex-direction: row; align-items: center; gap: 7px; min-width: 0; max-width: none; padding: 4px 8px;
}
.drawer-layer.viewing .card.next .btn.step .what { font-weight: 500; }
.drawer-layer.viewing .card.next .btn.step .note { display: none; }
.drawer-layer.viewing .card.next .btn.step > kbd { position: static; }
.drawer-layer.viewing .open-command { padding: 8px 10px; margin-bottom: 8px; }
.more-steps { margin-top: 8px; }
.more-steps > summary { font-size: 13px; }
.more-steps > summary kbd { margin-left: 8px; }

/* --- a confirmation: what will happen ----------------------------------------- */
ul.effects { margin: 4px 0 8px; padding-left: 18px; display: grid; gap: 6px; }
ul.effects li.warn { color: var(--warn); }
ul.effects li.error { color: var(--bad); }
ul.effects .preview { margin-top: 6px; }
ul.names { margin: 0 0 8px; padding-left: 18px; font-size: 13px; }
.pick { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }
@media (max-width: 560px) { .pick { grid-template-columns: 1fr; } }

/* --- dialog, toasts, sign in -------------------------------------------------- */
dialog { border: 1px solid var(--line); border-radius: 10px; padding: 18px; width: min(640px, 94vw); max-height: 90vh; overflow: auto; background: var(--panel); color: var(--ink); }
dialog.wide { width: min(880px, 94vw); }
dialog::backdrop { background: rgba(10, 14, 24, 0.45); }
dialog .actions { display: flex; gap: 8px; justify-content: flex-end; align-items: center; margin-top: 14px; }
dialog .actions .hint { margin-right: auto; font-size: 12px; color: var(--faint); display: inline-flex; gap: 4px; align-items: center; }
dialog .actions:has(.btn[disabled]) .hint { opacity: .45; }
dialog .preview { border: 1px dashed var(--line); border-radius: 6px; padding: 8px 10px; white-space: pre-wrap; font-size: 13px; max-height: 260px; overflow: auto; }

/* A confirmation's button for a message, and the arrow beside it that picks how it goes (1 Oct 2026). */
.split { position: relative; display: inline-flex; }
.split > .btn:first-child { border-top-right-radius: 0; border-bottom-right-radius: 0; }
.split > .split-toggle {
  border-top-left-radius: 0; border-bottom-left-radius: 0; padding: 5px 8px;
  border-left-color: color-mix(in srgb, var(--accent-ink) 35%, transparent);
}
.split > .split-toggle.danger-solid { border-left-color: rgba(255, 255, 255, 0.35); }
.split-menu {
  position: absolute; right: 0; bottom: calc(100% + 6px); z-index: 20; min-width: 260px; padding: 6px;
  display: grid; gap: 2px; background: var(--panel); border: 1px solid var(--line); border-radius: 8px; box-shadow: var(--drawer-shadow);
}
.split-menu[hidden] { display: none; }
.split-item {
  display: grid; grid-template-columns: 1fr auto; align-items: baseline; column-gap: 16px; width: 100%; text-align: left;
  padding: 7px 10px; border: 0; border-radius: 6px; background: none; color: var(--ink); font: inherit; cursor: pointer;
}
.split-item:hover:not(:disabled), .split-item:focus-visible { background: var(--sky-bg); color: var(--sky-ink); outline: none; }
.split-item .what { white-space: nowrap; }
.split-item[aria-checked="true"] .what { font-weight: 600; }
.split-item[aria-checked="true"] .what::before { content: "✓ "; }
/* Why a way cannot be picked, on a line of its own under it. */
.split-item .why { grid-column: 1 / -1; font-size: 12px; color: var(--muted); }
.split-item .why:empty { display: none; }
.split-item kbd { grid-column: 2; grid-row: 1; }
.split-item:disabled { cursor: default; }
.split-item:disabled .what { color: var(--faint); }

#toasts { position: fixed; right: 16px; bottom: 16px; display: grid; gap: 8px; z-index: 50; max-width: min(460px, 90vw); }
.toast { background: var(--ink); color: var(--bg); padding: 10px 14px; border-radius: 8px; box-shadow: var(--shadow); white-space: pre-wrap; }
.toast.bad { background: var(--bad); color: #fff; }

/* What a tile says on its hover, drawn by the console: the browser's own goes at every click and key.
   Over the drawer and the panels, never in the mouse's way. */
#tip {
  position: fixed; z-index: 60; max-width: min(360px, calc(100vw - 16px)); padding: 6px 9px; pointer-events: none;
  font-size: 12.5px; line-height: 1.45; white-space: pre-line; overflow-wrap: anywhere; color: var(--ink);
  border: 1px solid var(--line); border-radius: 6px; background: var(--panel); box-shadow: 0 4px 14px rgba(16, 24, 40, 0.12);
}

/* The front door: what this site is, the recruiter login, and a word for a candidate who lands here. */
.signin { max-width: 400px; margin: 9vh auto 32px; padding: 0 16px; }
.signin .site { margin: 0 0 16px; }
.signin .site h1 { font-size: 22px; }
.signin .site p { margin: 4px 0 0; }
.signin .card { padding: 22px; }
.signin h2 { font-size: 16px; }
.signin p { color: var(--muted); }
.signin .applicant { padding: 16px 22px; background: var(--slate-bg); border-color: var(--slate-line); box-shadow: none; }
.signin .applicant h2 { font-size: 14px; margin-bottom: 6px; }
.signin .applicant p { margin: 0 0 6px; }
.signin .applicant p:last-child { margin-bottom: 0; }
.error { color: var(--bad); }

/* --- the keyboard sheet ------------------------------------------------------------ */
/* Two balanced columns: each group whole, the longest not left towering over a gap. */
.keys { columns: 2; column-gap: 12px; margin-top: 12px; }
@media (max-width: 640px) { .keys { columns: 1; } }
.keys section { border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; break-inside: avoid; margin-bottom: 12px; }
.keys section.here { background: var(--sky-bg); border-color: var(--sky-line); }
.keys h3 { margin: 0 0 8px; display: flex; align-items: center; gap: 8px; }
.keys .you { font-size: 11px; text-transform: none; letter-spacing: 0; color: var(--sky-ink); font-weight: 600; }
.keys dl { display: grid; grid-template-columns: max-content 1fr; gap: 6px 12px; margin: 0; align-items: center; }
.keys dt { display: inline-flex; flex-wrap: wrap; gap: 3px; align-items: center; }
.keys dd { margin: 0; font-size: 13px; }
.keys .or, .keys .then { font-size: 11px; color: var(--faint); margin: 0 2px; }
.here-steps { list-style: none; margin: 10px 0 0; padding: 8px 0 0; border-top: 1px solid var(--sky-line); display: grid; gap: 4px; font-size: 13px; }

/* --- settings ----------------------------------------------------------------------- */
ul.notes { margin: 10px 0 0; padding-left: 18px; display: grid; gap: 4px; }
.section-body > .table-wrap { box-shadow: none; }

/* --- interviews and what the interviewers said -------------------------------- */
.interview { border-top: 1px solid var(--line); padding: 10px 0; }
.interview:first-of-type { border-top: 0; padding-top: 0; }
.interview .line { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; }
.interview .feedback { margin-top: 6px; padding: 8px 10px; border-left: 3px solid var(--teal-line); background: var(--teal-bg); border-radius: 0 6px 6px 0; }

/* --- an interviewer's own pages ------------------------------------------------ */
.interview-list { display: grid; gap: 8px; }
.interview-row { display: grid; gap: 4px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; color: var(--ink); }
.interview-row:hover { border-color: var(--teal-line); text-decoration: none; background: var(--teal-bg); }
.feedback-form { position: sticky; top: 64px; }
.feedback-form .actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 8px; }
.verdicts { display: grid; gap: 4px; }
.verdict { display: flex; gap: 8px; align-items: flex-start; padding: 6px 8px; border: 1px solid var(--line); border-radius: 6px; cursor: pointer; }
.verdict:has(input:checked) { border-color: var(--sky-ink); background: var(--sky-bg); }
.verdict input { margin-top: 3px; }
textarea.tall { min-height: 180px; }

/* How the screening call went: the assessment, read before anything else about the call. Body text,
   the candidate's own words in full ink, and every heading a plain question. */
.assessment .verdict-line { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; margin-bottom: 8px; }
.assessment .verdict-line .chip { margin: 0; }
.assessment .verdict-line .score { font-weight: 650; }
.assessment .case { font-size: 14.5px; margin: 0 0 8px; }
.assessment blockquote { color: var(--ink); }
.assessment .tile-note { display: block; font-size: 11px; color: var(--tone-ink); opacity: .75; }
.assessment .evidence { margin: 4px 0 6px; }
.assessment .ev { padding: 6px 0; border-top: 1px solid var(--line); }
.assessment .ev:first-child { border-top: 0; }
.assessment .ev p { margin: 2px 0 0; }
.assessment .checks { list-style: none; margin: 0; padding: 0; }
.assessment .check { padding: 8px 0; border-top: 1px solid var(--line); }
.assessment .check:first-child { border-top: 0; }
.assessment .check .chip { margin-right: 2px; }
.assessment .both { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 14px; margin: 6px 0 4px; }
.assessment .side { display: block; font-size: 12px; color: var(--muted); }
.assessment .ask { margin: 2px 0 0; font-size: 13px; }
.assessment .asks { margin: 4px 0 8px; padding-left: 20px; }
.assessment .callout { margin: 4px 0 8px; }
.assessment details > summary { cursor: pointer; font-size: 13px; color: var(--accent); margin: 6px 0; }
@media (max-width: 720px) { .assessment .both { grid-template-columns: 1fr; } }

/* --- odds and ends ------------------------------------------------------------------- */
/* There for the screen reader and the clipboard, and nowhere on screen. */
.offscreen { position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* --- the menu under your name ------------------------------------------------------ */
.top .user { position: relative; }
.top .btn.who { gap: 4px; color: var(--muted); }
.top .btn.who svg.icon { width: 14px; height: 14px; }
.top .btn.who[aria-expanded="true"] { background: var(--row-hover); color: var(--ink); }
.menu {
  position: absolute; right: 0; top: calc(100% + 6px); z-index: 20; min-width: 220px; padding: 6px;
  background: var(--panel); border: 1px solid var(--line); border-radius: 8px; box-shadow: var(--drawer-shadow);
}
.menu-note { margin: 2px 8px 6px; font-size: 12px; color: var(--faint); overflow-wrap: anywhere; }
.menu-item {
  display: block; width: 100%; text-align: left; padding: 7px 10px; border: 0; border-radius: 6px; background: none; cursor: pointer;
}
.menu-item:hover, .menu-item:focus-visible { background: var(--sky-bg); color: var(--sky-ink); outline: none; }

/* --- labels ----------------------------------------------------------------------------- */
/* A label is a chip in its pastel, and always says its name. */
.chip.label { font-weight: 500; }
.chip.label.small { font-size: 11px; line-height: 17px; padding: 0 6px; margin: 0 0 0 5px; vertical-align: 1px; font-weight: 500; }

/* The thin row of labels over the list: each a filter, like a stage. */
.labels-row { display: flex; flex-wrap: wrap; align-items: center; gap: 5px 6px; font-size: 12px; }
.labels-title { display: inline-flex; align-items: center; gap: 5px; color: var(--muted); margin-right: 4px; }
.labels-title svg.icon { width: 14px; height: 14px; }
.labels-row .label-filter {
  display: inline-flex; align-items: center; gap: 6px; padding: 1px 9px 1px 8px; border-radius: 999px; cursor: pointer; line-height: 19px;
  border: 1px solid var(--line); background: var(--panel); color: var(--muted);
}
.labels-row .label-filter::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: color-mix(in srgb, var(--tone-ink) 55%, var(--panel)); flex: none; }
.labels-row .label-filter:hover { border-color: color-mix(in srgb, var(--tone-ink) 45%, var(--line)); color: var(--ink); }
.labels-row .label-filter .n { color: var(--faint); font-variant-numeric: tabular-nums; }
.labels-row .label-filter.on { background: var(--tone-bg); border-color: var(--tone-ink); color: var(--tone-ink); box-shadow: inset 0 0 0 1px var(--tone-ink); }
.labels-row .label-filter.on .n { color: var(--tone-ink); }
.labels-row .manage-labels { font-size: 12px; margin-left: 2px; }
/* The row of stages and the row of labels share one rule: the pastel comes from the tone class. */
.label-filter.tone-sky { --tone-bg: var(--sky-bg); --tone-ink: var(--sky-ink); }
.label-filter.tone-mint { --tone-bg: var(--mint-bg); --tone-ink: var(--mint-ink); }
.label-filter.tone-lemon { --tone-bg: var(--lemon-bg); --tone-ink: var(--lemon-ink); }
.label-filter.tone-peach { --tone-bg: var(--peach-bg); --tone-ink: var(--peach-ink); }
.label-filter.tone-rose { --tone-bg: var(--rose-bg); --tone-ink: var(--rose-ink); }
.label-filter.tone-lilac { --tone-bg: var(--lilac-bg); --tone-ink: var(--lilac-ink); }
.label-filter.tone-teal { --tone-bg: var(--teal-bg); --tone-ink: var(--teal-ink); }
.label-filter.tone-slate { --tone-bg: var(--slate-bg); --tone-ink: var(--slate-ink); }

/* On an application: its labels beside who it is, and the button that changes them. */
.drawer-head .labels-line { display: inline-flex; flex-wrap: wrap; gap: 4px; }
.drawer-head .labels-line:empty { display: none; }
.label-btn { gap: 6px; }
.label-btn svg.icon { color: var(--teal-ink); }
.drawer-head .ids { display: inline-flex; align-items: center; gap: 2px; }
.drawer-head .btn.icon.share { width: 22px; height: 22px; color: var(--faint); }
.drawer-head .btn.icon.share svg.icon { width: 14px; height: 14px; }
.drawer-head .btn.icon.share:hover { color: var(--accent); }

/* --- stages and labels for the ones selected --------------------------------------- */
.bulk { flex-wrap: wrap; }
.bulk .label-bulk svg.icon { width: 15px; height: 15px; color: var(--teal-ink); }
.bulk .btn[disabled] { opacity: .55; }
.bulk .move-bulk svg.icon { width: 14px; height: 14px; }
.bulk .move-bulk > kbd { background: transparent; color: var(--accent-ink); border-color: color-mix(in srgb, var(--accent-ink) 45%, transparent); }

/* Every stage to move them to: its number in its pastel, its name, what it does beyond the move, and how many it takes. */
.pop.move-pop { width: min(400px, calc(100vw - 16px)); max-height: min(580px, calc(100vh - 16px)); }
:where(.move-opt) { --tone-bg: var(--chip); --tone-line: var(--line); --tone-ink: var(--muted); }
.move-list { display: grid; gap: 1px; margin: 2px 0 4px; }
.move-opt {
  display: flex; align-items: center; gap: 9px; width: 100%; padding: 3px 8px 3px 3px; border: 0; border-radius: 6px;
  background: none; color: var(--ink); font: inherit; text-align: left; cursor: pointer;
}
.move-opt:hover, .move-opt:focus-visible { background: var(--row-hover); outline: none; box-shadow: inset 0 0 0 1px var(--sky-line); }
.move-opt .k {
  display: grid; place-items: center; min-width: 32px; height: 22px; padding: 0 5px; border-radius: 5px; flex: none;
  font-weight: 700; font-size: 13px; font-variant-numeric: tabular-nums; color: var(--tone-ink); background: var(--tone-bg); border: 1px solid var(--tone-line);
}
.move-opt .l { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.move-opt .does { font-size: 11.5px; color: var(--muted); white-space: nowrap; }
.move-opt .does.sends { padding: 0 7px; border-radius: 999px; line-height: 18px; background: var(--lemon-bg); color: var(--lemon-ink); border: 1px solid var(--lemon-line); }
.move-opt .reach { min-width: 52px; text-align: right; font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.move-opt[aria-disabled="true"] { color: var(--faint); cursor: default; }
.move-opt[aria-disabled="true"] .k, .move-opt[aria-disabled="true"] .does { opacity: .5; }
.move-sep { border-top: 1px solid var(--line); margin: 3px 0; }
.move-foot { margin: 6px 2px 0; padding-top: 7px; border-top: 1px solid var(--line); }

/* --- sorting, and a range of a number column ------------------------------------------ */
/* The heading sorts, its arrow faint until the list is sorted by it; a number column's funnel beside it is an
   outline until a range is set, then solid. */
table.apps th.col { padding: 0; }
.th-in { display: flex; align-items: stretch; }
table.apps th.col .th-btn {
  display: inline-flex; align-items: center; gap: 4px; flex: 1 1 auto; padding: 7px 9px; border: 0; background: none; cursor: pointer;
  font: inherit; font-weight: 600; color: inherit; white-space: nowrap;
}
table.apps th.num .th-btn { justify-content: flex-end; }
table.apps th.col .th-btn:hover { color: var(--ink); background: var(--row-hover); }
table.apps th.sorted .th-btn { color: var(--sky-ink); }
.sort-mark { display: inline-flex; color: var(--faint); }
.sort-mark svg.icon { width: 13px; height: 13px; stroke-width: 2; }
.th-btn:hover .sort-mark { color: var(--muted); }
table.apps th.sorted .sort-mark { color: var(--sky-ink); }
.th-filter { display: inline-flex; align-items: center; justify-content: center; flex: none; width: 24px; margin-left: -6px; padding: 0; border: 0; background: none; cursor: pointer; color: var(--faint); }
.th-filter svg.icon { width: 13px; height: 13px; }
.th-filter:hover { color: var(--ink); background: var(--row-hover); }
.th-filter.on { color: var(--sky-ink); }
.th-filter.on svg.icon { fill: currentColor; }
/* Inside the button: the heading beside it, and the top of the list, would hide a ring drawn outside it. */
table.apps th .th-btn:focus-visible, .th-filter:focus-visible { outline-offset: -2px; }
.col-chips { display: inline-flex; flex-wrap: wrap; gap: 4px; }
.chip.active-chip { --tone-bg: var(--sky-bg); --tone-line: var(--sky-line); --tone-ink: var(--sky-ink); display: inline-flex; align-items: center; padding: 0 2px 0 8px; margin: 0; }
.active-chip .chip-text, .active-chip .chip-x { border: 0; background: none; color: inherit; font: inherit; padding: 0; cursor: pointer; }
.active-chip .chip-x { width: 18px; height: 18px; margin-left: 4px; border-radius: 50%; line-height: 1; font-size: 14px; }
.active-chip .chip-x:hover { background: var(--sky-line); }

/* --- the small panels that open under what opened them ---------------------------------- */
.pop {
  position: fixed; z-index: 45; width: min(340px, calc(100vw - 16px)); max-height: min(460px, calc(100vh - 16px)); overflow: auto;
  background: var(--panel); border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--drawer-shadow); padding: 10px;
  animation: fade-in .12s ease-out;
}
@media (prefers-reduced-motion: reduce) { .pop { animation: none; } }
.pop h3 { margin: 10px 0 6px; }
.pop-head { display: flex; align-items: center; gap: 7px; margin: 0 2px 8px; }
.pop-head strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pop-head svg.icon { color: var(--teal-ink); }
.pop-find { width: 100%; }
.pick-list { list-style: none; margin: 8px 0 4px; padding: 0; display: grid; gap: 1px; }
/* Each label in the list, under the list's name: .pick alone is the two or four boxes side by side in a confirmation. */
.pick-list .pick { display: flex; align-items: center; gap: 8px; padding: 4px 6px; border-radius: 6px; cursor: pointer; }
.pick-list .pick .chip { margin: 0; }
.pick-list .pick:hover, .pick-list .pick.active { background: var(--row-hover); }
.pick-list .pick.active { box-shadow: inset 0 0 0 1px var(--sky-line); }
.pick-list .pick .tick {
  flex: none; width: 17px; height: 17px; border-radius: 4px; border: 1px solid var(--faint); display: grid; place-items: center;
  font-size: 12px; line-height: 1; color: var(--accent-ink); background: var(--panel);
}
.pick-list .pick.all .tick, .pick-list .pick.some .tick { background: var(--accent); border-color: var(--accent); }
.pick-list .pick.make { color: var(--accent); }
.pick-list .pick.make .tick { border-style: dashed; color: var(--accent); }
.pick-list .pick.empty { cursor: default; color: var(--muted); font-size: 13px; }
.pop-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; border-top: 1px solid var(--line); margin-top: 6px; padding-top: 8px; }
.pop-foot > * { white-space: nowrap; }
.pop-row { display: flex; align-items: center; gap: 8px; }
.pop-row select { flex: 1; }
.pop-sec { border-top: 1px solid var(--line); margin-top: 10px; }
.pop .segs { display: flex; flex-wrap: wrap; gap: 4px; }
.pop .btn.seg { padding: 4px 10px; }
.pop .btn.seg svg.icon { width: 14px; height: 14px; }
.pop .btn.seg[aria-pressed="true"] { background: var(--sky-bg); border-color: var(--sky-ink); color: var(--sky-ink); }
.range { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
input.range-in { width: 86px; text-align: right; }
/* A range alone, from a column's funnel: the column named over it. */
.pop.range-pop { width: min(300px, calc(100vw - 16px)); }
.range-pop > .pop-sec:first-child { border-top: 0; margin-top: 0; }
.range-pop h3 { margin-top: 2px; }
.pop-actions { display: flex; justify-content: flex-end; align-items: center; gap: 8px; margin-top: 8px; }
.pop .error { margin: 6px 0 0; }

/* --- labels, all of them ------------------------------------------------------------------ */
.label-list { list-style: none; margin: 0 0 6px; padding: 0; display: grid; gap: 2px; }
.label-row { display: flex; align-items: flex-start; gap: 10px; padding: 7px 8px; border-radius: 8px; border: 1px solid transparent; }
.label-row:hover { background: var(--row-hover); }
.label-row > .chip { margin: 1px 0 0; flex: none; }
.label-about { flex: 1; min-width: 0; display: grid; gap: 1px; }
.label-acts { display: flex; flex-wrap: wrap; gap: 6px; flex: none; justify-content: flex-end; }
.label-row.editing, .label-row.deleting { border-color: var(--line); background: var(--bg); }
.label-row.deleting { border-color: var(--rose-line); background: var(--rose-bg); }
.label-row.deleting > div { width: 100%; }
.label-row.deleting p { margin: 0 0 4px; }
.label-form { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; width: 100%; }
.label-form input[type=text] { flex: 1 1 180px; min-width: 0; }
.label-form .label-acts { margin-left: auto; }
.label-form .error { flex-basis: 100%; margin: 0; }
.tones { display: inline-flex; gap: 5px; }
.swatch { position: relative; display: inline-grid; place-items: center; cursor: pointer; }
.swatch input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.swatch span { width: 20px; height: 20px; border-radius: 50%; background: var(--tone-bg); border: 1px solid var(--tone-ink); }
.swatch input:checked + span { box-shadow: 0 0 0 2px var(--panel), 0 0 0 4px var(--tone-ink); }
.swatch input:focus-visible + span { outline: 2px solid var(--focus); outline-offset: 3px; }
.swatch.tone-sky { --tone-bg: var(--sky-bg); --tone-ink: var(--sky-ink); }
.swatch.tone-mint { --tone-bg: var(--mint-bg); --tone-ink: var(--mint-ink); }
.swatch.tone-lemon { --tone-bg: var(--lemon-bg); --tone-ink: var(--lemon-ink); }
.swatch.tone-peach { --tone-bg: var(--peach-bg); --tone-ink: var(--peach-ink); }
.swatch.tone-rose { --tone-bg: var(--rose-bg); --tone-ink: var(--rose-ink); }
.swatch.tone-lilac { --tone-bg: var(--lilac-bg); --tone-ink: var(--lilac-ink); }
.swatch.tone-teal { --tone-bg: var(--teal-bg); --tone-ink: var(--teal-ink); }
.swatch.tone-slate { --tone-bg: var(--slate-bg); --tone-ink: var(--slate-ink); }

/* --- the settings, behind their lock --------------------------------------------------------- */
.settings-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; margin: 4px 0 14px; }
.settings-head .page-title { margin: 0; }
.btn.lock-btn { gap: 8px; }
.btn.lock-btn svg.icon { width: 18px; height: 18px; }
.btn.lock-btn.locked { background: var(--lemon-bg); border-color: var(--lemon-line); color: var(--lemon-ink); }
.btn.lock-btn.open { background: var(--mint-bg); border-color: var(--mint-line); color: var(--mint-ink); }
fieldset.settings-body { border: 0; margin: 0; padding: 0; min-width: 0; }
/* Locked, it all still reads; the controls say they cannot be used. */
fieldset.settings-body.locked input, fieldset.settings-body.locked select, fieldset.settings-body.locked textarea { background: var(--bg); color: var(--muted); }
/* A setting under the hood with a place of its own, set apart from the list of every other one. */
.hood-part { margin: 0 0 14px; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.hood-part h3:first-child { margin-top: 0; }
.hood-part p { margin: 8px 0; }
.next-head .grow { flex: 1 1 320px; margin: 0; }
.label-list-note { margin: -2px 0 6px; }

/* --- suggestions, over a box that must be filled in ------------------------------------------ */
/* Words to start from: a click puts them in the box. Quiet until pointed at, like a spare key. */
.suggestions { display: flex; flex-wrap: wrap; gap: 5px; }
.suggestion {
  max-width: 100%; padding: 1px 10px; border-radius: 999px; cursor: pointer; text-align: left;
  font: inherit; font-size: 12px; line-height: 19px;
  border: 1px solid var(--line); background: var(--chip); color: var(--ink);
}
.suggestion:hover, .suggestion:focus-visible { background: var(--sky-bg); border-color: var(--sky-line); color: var(--sky-ink); }
.suggestion:focus-visible { outline: 2px solid var(--focus); outline-offset: 1px; }

/* The one choice a decline asks for besides its reason, unticked until somebody ticks it. */
label.check.send-decline { flex-wrap: wrap; margin: 2px 0 4px; }
label.check.send-decline:has(input:disabled) { cursor: default; color: var(--muted); }
.decline-message { margin: 0 0 4px 22px; }
.decline-message:empty { display: none; }

/* --- adding resumes ------------------------------------------------------------------ */
.upload-form, .upload-progress { max-width: 860px; }
.up-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; margin-top: 4px; }
.up-fields input, .up-fields select { width: 100%; }
@media (max-width: 560px) { .up-fields { grid-template-columns: 1fr; } }
.used-sources { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 2px 0 6px; }
.dropzone {
  margin: 14px 0 10px; padding: 18px; text-align: center; border: 2px dashed var(--sky-line); border-radius: 10px;
  background: color-mix(in srgb, var(--sky-bg) 55%, var(--panel));
}
.dropzone.over { border-color: var(--sky-ink); background: var(--sky-bg); }
.dropzone p { margin: 6px 0; }
.dropzone .zone-btns { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }
.up-summary .actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin: 12px 0 0; }
.up-summary details { margin: 6px 0; }
.up-summary details ul.names { max-height: 220px; overflow: auto; margin-top: 6px; }
.upload-progress progress { width: 100%; height: 10px; accent-color: var(--accent); }
.upload-progress .failed { margin-top: 8px; }
.upload-chip { text-decoration: none; }
.upload-chip:hover { text-decoration: none; filter: brightness(0.97); }
table.uploads td { vertical-align: top; }
table.uploads .btn { white-space: nowrap; }

/* --- what hiring costs (#/costs) --------------------------------------------------------
 * The numbers are the loud part. The charts are one series in one colour — the first
 * slot of a checked categorical palette, 3:1 or more on the panel in both themes — in
 * thin bars on hairlines; every value they draw is printed beside them or in the table
 * under them. The pastels only tell the sections apart, as everywhere else. */
:root { --series-1: #2a78d6; --series-1-on: #1c5cab; }
@media (prefers-color-scheme: dark) { :root { --series-1: #3987e5; --series-1-on: #86b6ef; } }

.costs { transition: opacity .15s; }
/* Newer numbers on their way: the ones on screen stay where they are, dimmed. */
.costs.busy { opacity: .55; }
.cost-filters .rule { width: 1px; align-self: stretch; background: var(--line); margin: 0 4px; }
.btn.cost-role.on { background: var(--sky-bg); border-color: var(--sky-line); color: var(--sky-ink); }
.cost-filters label.inline input { padding: 4px 6px; }

.cost-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px; margin-bottom: 12px; }
.cost-tile { background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px 11px; box-shadow: var(--shadow); min-width: 0; }
.cost-tile .l { font-size: 12px; color: var(--muted); }
.cost-tile .v { font-size: 24px; font-weight: 650; line-height: 1.25; margin: 2px 0; }
.cost-tile .d { font-size: 12px; color: var(--muted); line-height: 1.4; }

.cost-pair { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 12px; align-items: start; }
@media (max-width: 900px) { .cost-pair { grid-template-columns: minmax(0, 1fr); } }

/* A list of bars: the name, a bar from one baseline as long as its share of the biggest, and the amount at its tip. */
table.bars { width: 100%; border-collapse: collapse; }
table.bars th, table.bars td { padding: 5px 6px; text-align: left; font-weight: normal; vertical-align: middle; }
table.bars th { white-space: nowrap; width: 1%; padding-right: 12px; }
table.bars td.track { width: 100%; min-width: 56px; }
@media (max-width: 720px) { table.bars th { white-space: normal; width: 40%; } }
table.bars td.num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
table.bars .bar { display: block; height: 12px; border-radius: 0 4px 4px 0; background: var(--series-1); }
table.bars .bar.some { min-width: 2px; }

/* Spending over time: a column a day, week or month, square at the baseline, 4px round at the top, 2px apart. */
.trend { position: relative; padding: 8px 0 0 54px; border-radius: 6px; }
.trend .plot { position: relative; height: 180px; }
.trend .gl { position: absolute; left: 0; right: 0; border-top: 1px solid var(--line); }
.trend .gl > span { position: absolute; right: calc(100% + 8px); top: -8px; font-size: 11px; color: var(--muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
.trend .cols { position: absolute; inset: 0; display: flex; align-items: flex-end; gap: 2px; }
.trend .col { flex: 1; min-width: 0; height: 100%; display: flex; align-items: flex-end; justify-content: center; }
.trend .col > i { display: block; width: 100%; max-width: 24px; border-radius: 4px 4px 0 0; background: var(--series-1); }
.trend .col.on > i { background: var(--series-1-on); }
.trend .x { display: flex; justify-content: space-between; gap: 8px; padding-top: 6px; font-size: 11px; color: var(--muted); }
.trend .tip {
  position: absolute; top: 0; width: 200px; padding: 6px 9px; z-index: 2; pointer-events: none; font-size: 12.5px;
  border: 1px solid var(--line); border-radius: 6px; background: var(--panel); box-shadow: 0 4px 14px rgba(16, 24, 40, 0.12);
}
details.as-table { margin-top: 10px; }
details.as-table > summary { cursor: pointer; color: var(--accent); font-size: 12.5px; width: max-content; }
details.as-table > .table-wrap, details.as-table > ul { margin-top: 8px; box-shadow: none; }
input.amount { width: 140px; text-align: right; }

/* --- a panel on a phone ------------------------------------------------------------------------
 * Too narrow to open under what opened it, a panel is a sheet up from the foot of the screen, within
 * reach of a thumb, over a veil: a tap on the veil puts it away and reaches nothing under it. The
 * console says when (placePop in app.js), so these come after every panel's own width. */
.pop.sheet {
  left: 0; right: 0; top: auto; bottom: 0; width: auto; max-height: min(640px, 80vh); max-height: min(640px, 80dvh);
  padding: 12px 12px calc(12px + env(safe-area-inset-bottom, 0px)); border-width: 1px 0 0; border-radius: 14px 14px 0 0;
  box-shadow: 0 -8px 30px rgba(16, 24, 40, 0.18); animation: sheet-up .2s cubic-bezier(.2, .7, .2, 1);
}
.pop-veil { position: fixed; inset: 0; z-index: 44; background: var(--scrim); animation: fade-in .16s ease-out; }
@keyframes sheet-up { from { transform: translateY(32px); opacity: 0; } to { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .pop.sheet, .pop-veil { animation: none; } }

/* --- on a touch screen -------------------------------------------------------------------------
 * A finger and no keyboard, at any width. No key is hinted at; what is tapped is big enough to hit;
 * and a box is written at 16px, under which iOS zooms the page in to type in it. Last, so that no
 * rule drawn later shows a key again. */
@media (hover: none) and (pointer: coarse) {
  .btn kbd, .search-hint, .tick-l kbd, .more-steps > summary kbd, dialog .actions .hint, .keys-btn, .split-item kbd { display: none; }
  .btn.step { padding-right: 12px; }
  input[type=text], input[type=search], input[type=email], input[type=tel], input[type=password], input[type=number], input[type=time],
  input[type=date], select, textarea { font-size: 16px; }
  .btn:not(.link) { min-height: 36px; }
  .btn.icon, .list-head .btn.icon, .note-head .btn.icon { width: 38px; height: 38px; }
  .drawer-head .btn.icon.share { width: 32px; height: 32px; }
  input[type=checkbox], input[type=radio] { width: 18px; height: 18px; }
  .menu-item { padding: 11px 12px; }
  .tick-opt { padding: 9px 8px; }
  .move-opt { padding-top: 6px; padding-bottom: 6px; }
  .pick-list .pick { padding: 8px 6px; }
  .labels-row .label-filter { line-height: 26px; }
  .suggestion { padding: 4px 12px; }
  .active-chip .chip-x { width: 26px; height: 26px; }
}

/* --- the file over the whole screen ------------------------------------------------------------
 * Too narrow for the file beside the application, the file covers it. Back and forth, and where
 * this one is in the list, wait along the foot of the screen, over the file, so one resume after
 * another is read without putting the file away. On a phone they stay there with the file away too. */
@media (max-width: 900px) {
  /* The application has the whole width, its head too: back and forth and its buttons along the top, who it is under them. */
  .drawer-head { flex-wrap: wrap; gap: 8px 12px; }
  .drawer-head .who { order: 3; flex-basis: 100%; }
  .drawer-head .end { margin-left: auto; }
  .drawer-head h1 { white-space: normal; }
  .drawer { z-index: auto; }
  .drawer-layer.viewing .drawer-head { position: relative; z-index: auto; }
  .drawer-layer.viewing .drawer-head .nav {
    position: fixed; z-index: 5; left: 0; right: 0; bottom: 0; gap: 6px; padding: 8px 12px calc(8px + env(safe-area-inset-bottom, 0px));
    background: var(--panel); border-top: 1px solid var(--line); box-shadow: 0 -6px 20px rgba(16, 24, 40, 0.1);
  }
  .drawer-layer.viewing .drawer-head .nav .btn.icon { width: 48px; height: 40px; font-size: 24px; }
  .drawer-layer.viewing .drawer-head .pos { font-size: 13px; }
  .drawer-layer.viewing .viewer { bottom: calc(57px + env(safe-area-inset-bottom, 0px)); }
}

/* --- on a phone --------------------------------------------------------------------------------
 * Too narrow for a table, or for anything beside anything. The bar across the top scrolls away with
 * the page. The stages, the labels and the column headings are each a row that scrolls sideways. An
 * application in the list is a card, with each value on it named. The ones selected, and back,
 * forth and the way out of an application, wait along the foot of the screen. The same width as
 * onPhone() in app.js. */
@media (max-width: 640px) {
  .page { padding: 12px; }
  .page-title { margin: 2px 0 10px; }

  /* The bar across the top: who and where on one line, the pages on the next, sideways if need be. */
  .top { position: static; gap: 0 8px; padding: 4px 12px 0; }
  .top .brand { order: 1; padding: 8px 0; }
  .top .upload-chip { order: 2; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
  .top .spacer { order: 3; }
  .top .keys-btn { order: 4; }
  .top .user { order: 5; }
  .top nav { order: 6; flex: 1 1 100%; overflow-x: auto; margin: 0 -12px; padding: 0 8px 6px; scrollbar-width: none; }
  .top nav::-webkit-scrollbar { display: none; }
  .top nav a { flex: none; white-space: nowrap; padding: 7px 11px; }

  /* The stages: one row, edge to edge, that scrolls sideways. */
  .stages { flex-wrap: nowrap; overflow-x: auto; gap: 6px; margin: 0 -12px 10px; padding: 0 12px; scrollbar-width: none; }
  .stages::-webkit-scrollbar { display: none; }
  .stages > button { flex: none; width: auto; }
  .stages .k { width: 32px; font-size: 17px; }
  .stages .t { padding: 5px 10px 6px 8px; }

  /* Over the list: clearing the filters and how many are shown on one line; the labels on the next, sideways. */
  .list-head { flex-wrap: wrap; gap: 6px 8px; }
  .list-head #shown-count { margin-left: auto; }
  .list-head .labels-row { order: 1; flex: 1 1 100%; flex-wrap: nowrap; overflow-x: auto; margin: 0 -12px; padding: 2px 12px; scrollbar-width: none; }
  .list-head .labels-row::-webkit-scrollbar { display: none; }
  .list-head .clear-filters + .labels-row { border-left: 0; padding-left: 12px; }
  .labels-row > * { flex: none; white-space: nowrap; }

  /* The search on a line of its own, and the filters under it filling theirs. */
  .filters { gap: 6px; }
  .filters .search { flex: 1 1 100%; max-width: none; }
  .btn.select-btn { flex: 1 1 auto; justify-content: space-between; max-width: none; }

  /* The ones selected: what to do with them, along the foot of the screen, wherever the list is scrolled to. */
  .bulk {
    position: fixed; z-index: 30; left: 0; right: 0; bottom: 0; margin: 0; gap: 8px;
    padding: 10px 12px calc(10px + env(safe-area-inset-bottom, 0px)); border-width: 1px 0 0; border-radius: 12px 12px 0 0;
    box-shadow: 0 -6px 20px rgba(16, 24, 40, 0.14);
  }
  .queue-main:has(> .bulk) { padding-bottom: 128px; }

  /* The list: a card to each application. The box that selects it down its left; its name across the top;
     under it each column shown, named; why it ranked as it did, or why it was closed, last, in two lines. */
  #table.table-wrap { overflow: visible; background: none; border: 0; border-radius: 0; box-shadow: none; }
  table.apps, table.apps > thead, table.apps > tbody { display: block; }
  /* The headings: a row of their own that scrolls sideways, each still sorting by its column at a tap. */
  table.apps > thead > tr { display: flex; align-items: center; gap: 6px; overflow-x: auto; margin: 0 -12px 8px; padding: 0 12px 2px; scrollbar-width: none; }
  table.apps > thead > tr::-webkit-scrollbar { display: none; }
  table.apps > thead th { position: static; flex: none; padding: 0; border: 0; box-shadow: none; background: none; }
  table.apps > thead th:not(.col):not(.sel) { display: none; }
  table.apps > thead th.sel { display: flex; justify-content: center; width: 44px; padding: 0; }
  table.apps > thead th.col { border: 1px solid var(--line); border-radius: 999px; background: var(--panel); }
  table.apps > thead th.col .th-btn { padding: 6px 12px; font-size: 13px; border-radius: 999px; }
  table.apps > thead th.col.sorted { background: var(--sky-bg); border-color: var(--sky-line); }
  table.apps > thead th.col .th-filter { width: 30px; margin-left: -6px; border-radius: 0 999px 999px 0; }
  table.apps > tbody > tr {
    position: relative; display: flex; flex-wrap: wrap; align-items: center; gap: 5px 12px; margin-bottom: 8px; padding: 10px 12px 11px 44px;
    background: var(--panel); border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow); scroll-margin-top: 8px;
  }
  table.apps > tbody > tr > td[data-col] {
    display: flex; flex-wrap: wrap; align-items: center; gap: 2px 5px; min-width: 0; max-width: 100%; padding: 0; border: 0;
    white-space: normal; overflow-wrap: anywhere; background: none;
  }
  table.apps > tbody > tr > td[data-col]:empty { display: none; }
  table.apps > tbody > tr > td[data-col]::before { content: attr(data-label); font-size: 12px; color: var(--faint); }
  table.apps > tbody > tr > td:is([data-col=name], [data-col=stage], [data-col=flags], [data-col=why])::before { content: none; }
  table.apps > tbody > tr > td.sel { position: absolute; left: 0; top: 0; bottom: 0; width: 44px; padding: 0; border: 0; background: none; }
  table.apps > tbody > tr > td.sel label.hit { height: 100%; padding: 12px 0 0; justify-content: center; align-items: flex-start; }
  table.apps > tbody > tr > td.name { display: block; flex: 1 1 100%; max-width: none; overflow: visible; font-size: 15px; }
  table.apps > tbody > tr > td.name .role { white-space: normal; }
  table.apps > tbody > tr > td:is(.why, .wide) {
    display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; overflow: hidden;
    order: 1; flex: 1 1 100%; width: auto; max-width: none; min-width: 0;
  }
  table.apps td.flags { max-width: none; }
  table.apps td.call .tags { min-width: 0; max-width: none; margin: 0; }
  table.apps td .chip, table.apps td.date .chip { margin: 0; }
  table.apps > tbody > tr.selected { background: var(--lilac-bg); border-color: var(--lilac-line); }
  table.apps > tbody > tr.cursor { border-color: var(--sky-line); box-shadow: inset 3px 0 0 var(--sky-ink), var(--shadow); }
  table.apps > tbody > tr.cursor > td:first-child { box-shadow: none; }
  table.apps > tbody > tr.none { display: block; padding: 0; }
  table.apps > tbody > tr.none > td { display: block; padding: 0; border: 0; }
  .more { padding: 4px 0 12px; }
  .more .btn { width: 100%; justify-content: center; }

  /* Every other table: a card to each row. Its first cell is the row's name, and each other cell is under
     the words of its column's heading, which it carries (headCells in app.js). */
  table.queue:not(.apps), table.queue:not(.apps) > tbody, table.queue:not(.apps) > tfoot { display: block; }
  table.queue:not(.apps) > thead { display: none; }
  table.queue:not(.apps) tr { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 8px 18px; padding: 10px 12px; border-bottom: 1px solid var(--line); }
  table.queue:not(.apps) > :last-child > tr:last-child { border-bottom: 0; }
  table.queue:not(.apps) :is(td, th) {
    display: block; position: static; min-width: 0; padding: 0; border: 0; box-shadow: none; background: none;
    text-align: left; white-space: normal; overflow-wrap: anywhere; font-size: inherit; color: inherit;
  }
  table.queue:not(.apps) tr > :first-child { flex: 1 1 100%; }
  table.queue:not(.apps) tfoot tr > :first-child { font-weight: 600; }
  table.queue:not(.apps) :is(td, th):empty { display: none; }
  table.queue:not(.apps) :is(td, th)[data-label]:not(:first-child)::before { content: attr(data-label); display: block; margin-bottom: 1px; font-size: 11.5px; font-weight: 400; color: var(--faint); }
  table.queue:not(.apps) tbody tr:hover td { background: none; }
  /* The settings under the hood have no headings: the name, then the box and its Save, then what it does. */
  table.queue:not(.apps):not(:has(> thead)) tr > td:nth-child(2) { flex: 1 1 160px; }
  table.queue:not(.apps):not(:has(> thead)) tr > td:nth-child(2) input { width: 100%; }
  table.queue:not(.apps):not(:has(> thead)) tr > td.small { order: 1; flex: 1 1 100%; }

  /* One application: back, forth and the way out along the foot of the screen, within reach of a thumb, whether
     the file is up or not; the rest of its head scrolls away with it, its buttons a row across the width. */
  .drawer-head { position: relative; z-index: auto; padding: 12px 12px 10px; }
  .drawer-head .nav {
    position: fixed; z-index: 5; left: 0; right: 0; bottom: 0; gap: 6px; padding: 8px 12px calc(8px + env(safe-area-inset-bottom, 0px));
    background: var(--panel); border-top: 1px solid var(--line); box-shadow: 0 -6px 20px rgba(16, 24, 40, 0.1);
  }
  .drawer-head .nav .btn.icon { width: 48px; height: 40px; font-size: 24px; }
  .drawer-head .pos { font-size: 13px; }
  .drawer-head .end { order: 4; flex: 1 1 100%; margin: 0; gap: 6px; }
  .drawer-head .end > .btn { flex: 1 1 0; justify-content: center; min-width: 0; border-color: var(--line); background: var(--panel); }
  .drawer-head .end > .btn.close {
    position: fixed; z-index: 6; right: 12px; bottom: calc(8px + env(safe-area-inset-bottom, 0px)); flex: none; width: 48px; height: 40px; font-size: 18px;
  }
  .drawer-layer.viewing .drawer-head .end > .btn.close { display: none; }
  .drawer-body { padding: 12px 12px calc(76px + env(safe-area-inset-bottom, 0px)); }
  .note-pop { right: 8px; width: calc(100% - 16px); }
  .feedback-form { position: static; }
  /* A trait's name whole on its tile, three tiles to a row. */
  .tile { padding: 6px 7px 7px; }
  .tile-name { font-size: 12px; }

  /* A confirmation: the whole width, and what gives it or cancels it always at its foot, however long it is. */
  dialog, dialog.wide { width: calc(100vw - 16px); max-width: none; max-height: calc(100vh - 16px); max-height: calc(100dvh - 16px); padding: 14px 14px 0; }
  dialog .actions {
    position: sticky; bottom: 0; z-index: 1; margin: 14px -14px 0; padding: 10px 14px calc(10px + env(safe-area-inset-bottom, 0px));
    background: var(--panel); border-top: 1px solid var(--line);
  }
  dialog .actions > .btn { flex: 1 1 0; justify-content: center; text-align: center; }
  dialog .actions > .split { flex: 2 1 0; min-width: 0; }
  .split > .btn:first-child { flex: 1 1 auto; min-width: 0; justify-content: center; text-align: center; }
  .split-menu { min-width: min(300px, calc(100vw - 32px)); }
  .label-row { flex-wrap: wrap; }
  .label-acts { flex: 1 1 100%; justify-content: flex-start; }
  .label-acts:empty { display: none; }

  /* What happened, said at the top, clear of the bars along the foot. */
  #toasts { left: 8px; right: 8px; top: calc(8px + env(safe-area-inset-top, 0px)); bottom: auto; max-width: none; }
}
