/* Connect Home round 3: the card kit (kit builder). Brief: _dev/BRIEF-v3.md ("The cards", "The craft bar").
 * Kit tokens only (base.css, compact-shell.css). No box-in-box, no caps or tracked labels, no one-sided accent borders.
 * Craft: every row's hover fill is inset with 10px of room (margin-inline -10px, padding-inline 10px, radius 10px);
 * every control has hover, pressed, focus-visible and cursor states; colour 120-160ms, transform/opacity 160-240ms. */

/* Round 4 grid contract: one board row is --hb-row; a 2-row slot is 2 * --hb-row + the board gap.
 * A card fills its host exactly (height: 100%); it never grows or shrinks with its content. */
:root { --hb-row: 340px; }

.r3-card {
	--pad: 1.25rem;
	height: 100%;
	box-sizing: border-box;
	overflow: hidden;
	--row-x: 10px;
	--ease-out: cubic-bezier(0.23, 1, 0.32, 1);
	position: relative;
	min-width: 0;
	display: flex; flex-direction: column;
	background: var(--card);
	border: 1px solid var(--line);
	border-radius: 16px;
	color: var(--fg);
	font-variant-numeric: tabular-nums;
}
.r3-in { flex: 1; min-height: 0; min-width: 0; display: flex; flex-direction: column; padding: var(--pad); }
.r3-card .tnum { font-variant-numeric: tabular-nums; }

/* ------------------------------------------------------------------ header */
.r3-h { flex: none; display: flex; align-items: center; gap: 0.75rem; min-height: 2rem; margin-bottom: 0.875rem; min-width: 0; }
.r3-ht { flex: 1; min-width: 0; display: flex; align-items: baseline; gap: 0.5rem; }
.r3-t { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-family: var(--font-display); font-size: 1.0714rem; font-weight: 600; letter-spacing: -0.012em; color: var(--ats-title); }
.r3-n { flex: none; font-size: var(--text-sm); color: var(--muted-fg); }
.r3-a { flex: none; margin-left: auto; display: flex; align-items: center; gap: 0.25rem; }

/* ------------------------------------------------------------------ controls */
.r3-sel, .r3-ib, .r3-btn-s, .r3-btn-o, .r3-link {
	-webkit-tap-highlight-color: transparent;
	transition: background-color 140ms ease-out, color 140ms ease-out, border-color 140ms ease-out, transform 160ms var(--ease-out);
}
.r3-sel { display: inline-flex; align-items: center; gap: 0.25rem; height: 2rem; padding: 0 0.5rem 0 0.625rem; border-radius: 8px; font-size: var(--text-sm); font-weight: 500; color: var(--fg-2); white-space: nowrap; cursor: pointer; }
.r3-sel .ic { color: var(--muted-fg); transition: transform 200ms var(--ease-out); }
.r3-sel:hover { background: var(--subtle); color: var(--fg); }
.r3-sel[aria-expanded='true'] .ic { transform: rotate(180deg); }
.r3-ib { display: inline-grid; place-items: center; width: 2rem; height: 2rem; border-radius: 8px; color: var(--fg-2); cursor: pointer; flex: none; }
.r3-ib:hover { background: var(--subtle); color: var(--fg); }
.r3-btn-s, .r3-btn-o { display: inline-flex; align-items: center; justify-content: center; gap: 0.375rem; height: 1.875rem; padding: 0 0.75rem; border-radius: 8px; border: 1px solid var(--line-2); background: var(--card); font-size: var(--text-sm); font-weight: 500; color: var(--fg); white-space: nowrap; cursor: pointer; }
.r3-btn-s { height: 1.75rem; padding: 0 0.625rem; font-size: var(--text-xs); }
.r3-btn-s:hover, .r3-btn-o:hover { background: var(--subtle); border-color: var(--line-2); }
.r3-link { display: inline-flex; align-items: center; gap: 0.25rem; height: 2rem; padding: 0 8px; margin-right: -8px; border-radius: 8px; font-size: var(--text-sm); font-weight: 500; color: var(--primary); white-space: nowrap; text-decoration: none; cursor: pointer; }
.r3-link .tnum { opacity: 0.75; }
.r3-link .ic { transition: transform 200ms var(--ease-out); }
.r3-link:hover { color: var(--primary-ink); background: var(--primary-wash); }
.r3-link:hover .ic { transform: translateX(2px); }
.r3-sel:active, .r3-ib:active, .r3-btn-s:active, .r3-btn-o:active, .r3-link:active { transform: scale(0.97); }
.r3-sel:active, .r3-ib:active { background: #ececf1; }
.r3-card :is(a, button, [tabindex]):focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.r3-card :is(button, a):disabled, .r3-card [aria-disabled='true'] { opacity: 0.45; cursor: not-allowed; pointer-events: none; }
.r3-card .seg { padding: 2px; border-radius: 9px; }
.r3-card .seg button { height: 1.75rem; padding: 0 0.625rem; font-size: var(--text-xs); border-radius: 7px; cursor: pointer; transition: color 140ms ease-out; }
.r3-card .seg button:hover { color: var(--fg); }
.r3-card .seg button:focus-visible { outline-offset: 0; }
.r3-card .seg .seg-ind { top: 2px; height: 1.75rem; box-shadow: 0 1px 2px rgba(0, 6, 37, 0.06); }

/* ------------------------------------------------------------------ rows: the inset hover fill */
.r3-row {
	position: relative;
	display: grid; align-items: center;
	margin-inline: calc(var(--row-x) * -1);
	padding-inline: var(--row-x);
	border-radius: 10px;
	color: inherit; text-decoration: none;
	cursor: pointer;
	-webkit-tap-highlight-color: transparent;
	transition: background-color 140ms ease-out;
}
.r3-row:hover { background: var(--subtle); }
.r3-row:active { background: #ececf1; }
.r3-row:focus-visible { outline-offset: 0; }
/* hairline dividers sit on the text edge, not the fill edge, and step aside for a hovered row */
.r3-jb + .r3-jb::before, .r3-jbn + .r3-jbn::before {
	content: ''; position: absolute; left: var(--row-x); right: var(--row-x); top: 0; height: 1px; background: var(--hair);
	transition: opacity 140ms ease-out;
}
.r3-row:hover::before, .r3-row:hover + .r3-row::before, .r3-row:focus-visible::before, .r3-row:focus-visible + .r3-row::before { opacity: 0; }

.r3-dot { margin: 0 0.375rem; color: var(--muted-fg); }
.r3-av { cursor: default; }

/* ------------------------------------------------------------------ empty states */
.r3-empty { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 0.25rem; padding: 1.5rem 0.75rem; min-height: 9rem; }
.r3-empty-ic { display: grid; place-items: center; width: 2.5rem; height: 2.5rem; margin-bottom: 0.375rem; border-radius: 11px; background: var(--subtle); color: var(--fg-2); }
.r3-empty-t { font-family: var(--font-display); font-size: 1rem; font-weight: 600; color: var(--ats-title); }
.r3-empty-p { max-width: 20rem; font-size: var(--text-sm); line-height: 1.45; color: var(--muted-fg); }
.r3-empty .r3-btn-o { margin-top: 0.625rem; }

/* ------------------------------------------------------------------ footer */
.r3-f { flex: none; display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; margin-top: auto; padding-top: 0.625rem; border-top: 1px solid var(--hair); font-size: var(--text-sm); color: var(--muted-fg); }
.r3-f-t b { font-weight: 600; color: var(--fg); }

/* ================================================================== 1. candidate pipeline */
.r3-pl { flex: 1; min-height: 0; display: flex; flex-direction: column; min-width: 0; }
.r3-pl-viz { position: relative; flex: 1; min-height: 0; display: flex; flex-direction: column; margin-inline: calc(var(--row-x) * -1); }
.r3-pl-viz .r3-pl-svg { position: absolute; z-index: 1; left: var(--row-x); top: 0.625rem; width: calc(100% - var(--row-x) * 2); height: 4.5rem; overflow: visible; pointer-events: none; }
.r3-pl-seg { transform-box: fill-box; transform-origin: center; transition: opacity 160ms ease-out, transform 220ms var(--ease-out), filter 220ms ease-out; }
.has-sel .r3-pl-seg { opacity: 0.55; }
.has-sel .r3-pl-seg.sel { opacity: 1; }
.has-hot .r3-pl-seg, .has-hot.has-sel .r3-pl-seg.sel { opacity: 0.38; }
.has-hot .r3-pl-seg.hot { opacity: 1; transform: scale(1.012, 1.06); filter: drop-shadow(0 3px 6px rgba(22, 35, 143, 0.22)); }
.is-empty .r3-pl-seg { fill: #eef0f5; }
.r3-pl-cols { flex: 1; min-height: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); }
.r3-pl-col {
	display: flex; flex-direction: column; justify-content: flex-end; align-items: flex-start; gap: 0.125rem; min-width: 0;
	padding: 0 var(--row-x) 0.625rem;
	border-radius: 12px; text-align: left; cursor: pointer;
	transition: background-color 140ms ease-out;
	-webkit-tap-highlight-color: transparent;
}
.r3-pl-col:hover { background: rgba(16, 17, 25, 0.03); }
.r3-pl-col:active { background: rgba(16, 17, 25, 0.055); }
.r3-pl-col.is-on { background: var(--primary-wash); }
.r3-pl-col.is-on .r3-pl-cl { color: var(--primary-ink); }
.r3-pl-col:focus-visible { outline-offset: -2px; }
.is-empty .r3-pl-col { cursor: default; }
.is-empty .r3-pl-col:hover { background: none; }
[data-variant='narrow'] .r3-pl-col { cursor: default; }
.r3-pl-cn { font-family: var(--font-display); font-size: 1.5rem; font-weight: 600; line-height: 1.1; letter-spacing: -0.02em; color: var(--ats-title); white-space: nowrap; }
[data-variant='full'] .r3-pl-cn { font-size: 1.75rem; }
.r3-pl-cl { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: var(--text-sm); color: var(--fg-2); transition: color 140ms ease-out; }
.r3-pl-cs { font-size: var(--text-xs); color: var(--muted-fg); }
.is-empty .r3-pl-cn { color: var(--muted-fg); }
.r3-pl-chips { position: absolute; z-index: 2; inset: 0; pointer-events: none; }
.r3-pl-viz .r3-pl-chips { top: 0.625rem; }
.r3-pl-chip {
	position: absolute; transform: translate(-50%, -50%);
	display: inline-flex; align-items: center; height: 1.25rem; padding: 0 0.4375rem; border-radius: 999px;
	background: var(--card); border: 1px solid var(--line-2); box-shadow: 0 1px 2px rgba(0, 6, 37, 0.06);
	font-size: 0.7857rem; font-weight: 600; color: var(--fg-2); white-space: nowrap; pointer-events: auto; cursor: default;
	transition: border-color 140ms ease-out, color 140ms ease-out;
}
.r3-pl-chip:hover { border-color: var(--primary-line); color: var(--primary-ink); }
.r3-pl-chip:focus-visible { outline-offset: 1px; }
.r3-pl-none { position: absolute; z-index: 2; left: 0; right: 0; top: 40%; transform: translateY(-50%); text-align: center; font-size: var(--text-sm); color: var(--muted-fg); pointer-events: none; }
.r3-pl-none span, .r3-ap-none span { display: inline-block; padding: 0.25rem 0.75rem; border-radius: 999px; background: var(--card); box-shadow: 0 0 0 1px var(--hair); }

/* the stage detail: top vacancies at the clicked stage */
.r3-pl-det { margin-top: 0.75rem; padding-top: 0.75rem; border-top: 1px solid var(--hair); }
.r3-pl-dh { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; min-height: 2rem; margin-bottom: 0.25rem; }
.r3-pl-dh p { display: flex; align-items: center; gap: 0.5rem; min-width: 0; font-size: var(--text-sm); }
.r3-pl-dh p i { flex: none; width: 8px; height: 8px; border-radius: 2px; }
.r3-pl-dh b { font-weight: 600; color: var(--fg); white-space: nowrap; }
.r3-pl-dh span { color: var(--muted-fg); white-space: nowrap; }
.r3-pl-dl { display: flex; flex-direction: column; }
.r3-pl-dl.r3-fit { flex: 1; min-height: 0; overflow: hidden; }
.r3-pl-dr { grid-template-columns: minmax(0, 1.4fr) minmax(3rem, 1fr) 2.75rem; column-gap: 1rem; padding-block: calc(0.4375rem + var(--fp, 0px)); }
.r3-pl-dt { display: flex; align-items: baseline; gap: 0.5rem; min-width: 0; }
.r3-pl-dt > .clip:first-child { font-size: var(--text-sm); font-weight: 500; color: var(--fg); }
.r3-pl-dt small { flex: none; max-width: 45%; font-size: var(--text-xs); color: var(--muted-fg); }
.r3-pl-db { height: 6px; border-radius: 999px; background: var(--subtle); overflow: hidden; }
.r3-pl-db i { display: block; height: 100%; border-radius: 999px; }
.r3-pl-dr b { justify-self: end; font-size: var(--text-sm); font-weight: 600; color: var(--fg); }
.r3-pl-df { display: flex; justify-content: flex-end; margin-top: 0.25rem; }
.r3-pl-dn { padding: 0.5rem 0; font-size: var(--text-sm); color: var(--muted-fg); }
.r3-pl-ghost .r3-pl-dr { cursor: default; }
.r3-pl-ghost .r3-pl-dr:hover { background: none; }
.r3-pl-ghost .r3-pl-dt { align-items: center; }
.r3-pl-ghost .r3-pl-dr b { display: flex; align-items: center; }
.r3-pl-ghost .gb { display: block; flex: none; height: 0.5rem; border-radius: 999px; background: #eef0f5; }
.r3-pl-ghost .gb.gs { height: 0.375rem; background: #f3f4f8; }
.r3-pl-ghost .r3-pl-db i { background: #eef0f5; }
/* full: the funnel with a side list (most candidates, or the clicked stage) */
.r3-pl-full { display: grid; grid-template-columns: minmax(0, 2.1fr) minmax(0, 1fr); column-gap: 1.75rem; align-items: stretch; }
.r3-pl-full.is-pick { grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); column-gap: 1.25rem; }
.r3-pl-main { min-height: 0; display: flex; flex-direction: column; }
.r3-pl-side { min-height: 0; display: flex; flex-direction: column; padding-left: 1.75rem; border-left: 1px solid var(--hair); align-self: stretch; }
.r3-pl-full.is-pick .r3-pl-side { padding-left: 1.25rem; }
.r3-pl-side .r3-pl-df { margin-top: auto; padding-top: 0.25rem; }
.r3-pl-side .r3-pl-dr { grid-template-columns: minmax(0, 1fr) 3.5rem 2.25rem; }
.r3-pl-full.is-pick .r3-pl-dt small { display: none; }
.r3-pl-full.is-pick .r3-pl-dr { grid-template-columns: minmax(0, 1fr) 2.5rem 2rem; column-gap: 0.75rem; }

/* narrow: the vertical funnel (stages stacked, narrowing towards the centre) */
.r3-plv { position: relative; flex: 1; min-height: 0; display: flex; flex-direction: column; }
.r3-plv .r3-pl-svg { position: absolute; z-index: 1; overflow: visible; pointer-events: none; }
.r3-plv-r { display: grid; grid-template-columns: minmax(0, 1fr) 46% minmax(3.25rem, auto); align-items: center; column-gap: 0.75rem; flex: 1 1 0; min-height: 2.25rem; max-height: 4rem; border-radius: 8px; outline-offset: 0; cursor: default; }
.r3-plv-l { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
.r3-plv-l .clip { font-size: var(--text-sm); color: var(--fg); }
.r3-plv-l small { font-size: var(--text-xs); color: var(--muted-fg); }
.r3-plv-sp { height: 100%; }
.r3-plv-n { justify-self: end; font-family: var(--font-display); font-size: 1.1429rem; font-weight: 600; color: var(--ats-title); white-space: nowrap; }
.r3-plv.is-empty .r3-plv-n { color: var(--muted-fg); }
.r3-pl-none2 { margin-top: 0.75rem; text-align: center; font-size: var(--text-sm); color: var(--muted-fg); }

/* narrow alternative: a compact stage list with bars */
.r3-pll { display: flex; flex-direction: column; gap: 0.125rem; }
.r3-pll-r { display: grid; grid-template-columns: minmax(6.5rem, 0.9fr) minmax(0, 1fr) 3rem 2.5rem; align-items: center; column-gap: 0.75rem; height: 2.25rem; border-radius: 8px; cursor: default; }
.r3-pll-l { display: flex; align-items: center; gap: 0.5rem; min-width: 0; font-size: var(--text-sm); color: var(--fg); }
.r3-pll-l i { flex: none; width: 8px; height: 8px; border-radius: 2px; }
.r3-pll-b { height: 8px; border-radius: 999px; background: var(--subtle); overflow: hidden; }
.r3-pll-b i { display: block; height: 100%; border-radius: 999px; transition: width 460ms var(--ease-out); }
.r3-pll-r b { justify-self: end; font-family: var(--font-display); font-size: 1rem; font-weight: 600; color: var(--ats-title); }
.r3-pll-r small { justify-self: end; font-size: var(--text-xs); color: var(--muted-fg); }

/* ================================================================== 2. interviews */
.r3-ivh { display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; grid-template-areas: 't p m n'; align-items: center; column-gap: 0.75rem; }
.r3-ivh .r3-t { grid-area: t; }
.r3-ivp { grid-area: p; font-size: var(--text-sm); color: var(--muted-fg); }
.r3-ivm { grid-area: m; }
.r3-ivn { grid-area: n; justify-self: end; display: flex; align-items: center; gap: 0.125rem; margin-right: -0.375rem; }
.r3-ivn .r3-btn-s { margin-right: 0.25rem; }
[data-variant='narrow'] .r3-ivh { grid-template-columns: minmax(0, 1fr) auto auto; grid-template-areas: 't m m' 'p p n'; row-gap: 0.25rem; }
[data-variant='narrow'] .r3-ivp { font-size: var(--text-sm); color: var(--fg-2); font-weight: 500; }
.r3-ivb { display: flex; flex-direction: column; min-height: 0; flex: 1; overflow: hidden; }
.r3-ivnote { display: flex; align-items: center; gap: 0.5rem; padding: 0.5rem 0; font-size: var(--text-sm); color: var(--muted-fg); }
.r3-ivnote .ic { color: var(--fg-2); }
.r3-ivb > .r3-empty { padding-bottom: 1.25rem; }

/* the day strip */
.r3-ivs { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 2px; margin: -0.25rem calc(var(--row-x) * -0.5) 0.5rem; }
.r3-ivs-d {
	display: flex; flex-direction: column; align-items: center; gap: 0.125rem; min-width: 0;
	padding: 0.375rem 8px 0.3125rem; border-radius: 10px; color: var(--fg-2); cursor: pointer;
	transition: background-color 140ms ease-out, color 140ms ease-out, transform 160ms var(--ease-out);
	-webkit-tap-highlight-color: transparent;
}
.r3-ivs-d small { font-size: 0.7857rem; color: var(--muted-fg); }
.r3-ivs-d b { font-family: var(--font-display); font-size: 1.0714rem; font-weight: 600; line-height: 1.2; color: var(--fg); }
.r3-ivs-d:hover { background: var(--subtle); }
.r3-ivs-d:active { transform: scale(0.96); }
.r3-ivs-d.is-past b { color: var(--muted-fg); }
.r3-ivs-d.is-today b { color: var(--primary); }
.r3-ivs-d[aria-pressed='true'] { background: var(--tint); }
.r3-ivs-d[aria-pressed='true'] b, .r3-ivs-d[aria-pressed='true'] small { color: var(--primary-ink); }
.r3-ivs-d:focus-visible { outline-offset: -2px; }
.r3-ivs-dots { display: flex; align-items: center; justify-content: center; gap: 2px; height: 0.5rem; }
.r3-ivs-dots i { width: 4px; height: 4px; border-radius: 999px; background: var(--stage-potential); }
.r3-ivs-d.is-past .r3-ivs-dots i { background: var(--line-2); }
.r3-ivs-dots em { font-style: normal; font-size: 0.625rem; line-height: 1; color: var(--muted-fg); margin-left: 1px; }

/* rows: time over duration, name over vacancy and town, a round type icon (E's ivRow, with room) */
.r3-ivl { display: flex; flex-direction: column; }
.r3-iv { grid-template-columns: 3.25rem minmax(0, 1fr) 2rem; column-gap: 0.875rem; padding-block: calc(0.5rem + var(--fp, 0px)); }
[data-variant='wide'] .r3-iv, [data-variant='full'] .r3-iv { grid-template-columns: 3.25rem minmax(0, 1fr) minmax(0, 9rem) 2rem; }
.r3-iv-t, .r3-iv-w { display: flex; flex-direction: column; min-width: 0; line-height: 1.3; }
.r3-iv-t b { font-family: var(--font-display); font-size: 1rem; font-weight: 600; color: var(--ats-title); }
.r3-iv-t small, .r3-iv-w small { font-size: var(--text-xs); color: var(--muted-fg); }
.r3-iv-w b { font-size: var(--text-sm); font-weight: 600; color: var(--fg); }
.r3-iv-by { font-size: var(--text-xs); color: var(--muted-fg); text-align: right; }
.r3-iv-k { display: grid; place-items: center; width: 2rem; height: 2rem; border-radius: 999px; background: var(--subtle); color: var(--fg-2); transition: background-color 140ms ease-out; }
.r3-iv:hover .r3-iv-k { background: var(--card); }
.r3-ivr.is-past .r3-iv-t, .r3-ivr.is-past .r3-iv-w, .r3-ivr.is-past .r3-iv-by, .r3-ivr.is-past .r3-iv-k { opacity: 0.5; }
.r3-now { display: grid; grid-template-columns: 3.25rem minmax(0, 1fr); align-items: center; column-gap: 0.875rem; height: 1rem; }
.r3-now span { font-size: 0.7857rem; font-weight: 600; color: var(--primary); }
.r3-now i { height: 1px; background: linear-gradient(90deg, var(--primary-line), rgba(48, 78, 255, 0.04)); }
.r3-ivg { padding: calc(0.75rem + var(--gp, 0px)) 0 0.25rem; font-size: var(--text-xs); font-weight: 600; color: var(--fg-2); }
.r3-ivg:first-child { padding-top: 0; }
.r3-ivg.is-today { color: var(--primary-ink); }
.r3-ivg.is-past { color: var(--muted-fg); }
.r3-ivb + .r3-f { margin-top: 0.75rem; }

/* ================================================================== 3. active jobs (C's jobs, as it is) */
.r3-jbs { --stc: 4.25rem; --plw: 5.5rem; --acw: 4.75rem; display: flex; flex-direction: column; min-width: 0; }
.r3-jbs.r3-fit { flex: 1; min-height: 0; overflow: hidden; overflow: clip; } /* clip: nothing can scroll the rows sideways */
.r3-jb { display: grid; align-items: center; grid-template-columns: minmax(0, 1fr) repeat(5, var(--stc)) var(--acw); column-gap: 0.5rem; padding-block: calc(0.5625rem + var(--fp, 0px)); }
.r3-jbs.has-status .r3-jb { grid-template-columns: minmax(0, 1fr) repeat(5, var(--stc)) var(--plw) var(--acw); }
.r3-jbs.is-full .r3-jb { grid-template-columns: minmax(0, 1fr) repeat(5, var(--stc)) 4.5rem var(--acw); }
.r3-jbs.is-full.has-status .r3-jb { grid-template-columns: minmax(0, 1fr) repeat(5, var(--stc)) 4.5rem var(--plw) var(--acw); }
.r3-jb-hd { margin-inline: calc(var(--row-x) * -1); padding: 0 var(--row-x) 0.375rem; font-size: var(--text-xs); color: var(--muted-fg); cursor: default; }
.r3-jb-hd:hover, .r3-jb-hd:active { background: none; }
.r3-jb-hd + .r3-jb::before { display: none; }
.r3-jb-m { min-width: 0; display: flex; flex-direction: column; gap: 0.0625rem; }
.r3-jb-tt { display: flex; align-items: center; gap: 0.375rem; min-width: 0; }
.r3-jb-t { min-width: 0; font-size: var(--text-sm); font-weight: 600; color: var(--fg); text-decoration: none; }
.r3-jb-bo { flex: none; display: grid; place-items: center; width: 1.375rem; height: 1.375rem; border-radius: 7px; background: var(--primary-wash); color: var(--primary); }
.r3-jb-s { font-size: var(--text-xs); color: var(--muted-fg); }
.r3-jb-dr { flex: none; height: 1.25rem; padding: 0 0.4375rem; font-size: 0.7143rem; box-shadow: inset 0 0 0 1px var(--line); }
.r3-st { display: flex; flex-direction: column; align-items: flex-start; gap: 0.3125rem; padding: 0.25rem 0; cursor: default; }
.r3-st b { font-size: var(--text-sm); font-weight: 500; color: var(--fg); }
.r3-st i { display: block; width: 1.75rem; height: 3px; border-radius: 999px; background: var(--c); }
.r3-st.z b { color: var(--muted-fg); font-weight: 400; }
.r3-st.z i { background: var(--line); }
.r3-st-h { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.r3-jb-c { font-size: var(--text-xs); color: var(--fg-2); cursor: default; }
.r3-jb-pl { display: flex; justify-content: flex-end; min-width: 0; }
.r3-jb-hd .r3-jb-pl { padding-right: 0.25rem; }
/* round 4: Boost and Archive always visible, quiet grey; full colour on row hover, a padded white fill on button hover */
.r3-jb-a { display: flex; justify-content: flex-end; gap: 0.125rem; margin-right: -0.375rem; }
.r3-jb-a0 { width: 2rem; flex: none; }
.r3-jb-ab { width: 2.25rem; height: 2.25rem; color: #a4a8b6; } /* 8px of hover fill round the 15px icon */
.r3-row:hover .r3-jb-ab, .r3-row:focus-within .r3-jb-ab { color: var(--fg-2); }
.r3-row .r3-jb-ab:hover { background: var(--card); color: var(--primary); box-shadow: 0 0 0 1px var(--line); }
.r3-row:focus-within { background: var(--subtle); }
.r3-jb-end { flex: 1; min-height: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.5rem; padding: 0.75rem 0; border-top: 1px solid var(--hair); font-size: var(--text-sm); color: var(--muted-fg); }
/* a medium table: stage numbers without their names */
@container r3 (max-width: 44rem) {
	.r3-jbs { --stc: 2.75rem; --plw: 5rem; }
}
/* narrow: title, one segmented stage bar, the count */
.r3-jbn { grid-template-columns: minmax(0, 1fr) auto auto; column-gap: 0.875rem; padding-block: calc(0.5625rem + var(--fp, 0px)); }
.r3-jb-n { font-family: var(--font-display); font-size: 1.0714rem; font-weight: 600; color: var(--ats-title); cursor: default; }
.r3-jb-bar { display: flex; gap: 2px; margin-top: 0.25rem; }
.r3-jb-bar span { min-width: 4px; height: 0.75rem; display: flex; align-items: center; cursor: default; }
.r3-jb-bar span i { display: block; width: 100%; height: 5px; border-radius: 2px; transition: height 140ms ease-out; }
.r3-jb-bar span:first-child i { border-top-left-radius: 999px; border-bottom-left-radius: 999px; }
.r3-jb-bar span:last-child i { border-top-right-radius: 999px; border-bottom-right-radius: 999px; }
.r3-jb-bar span:hover i { height: 7px; }
.r3-jb-bar .z i { background: var(--line); }

/* ================================================================== 4. applications, per vacancy (round 4) */
.r3-ap { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0, 1fr) minmax(13rem, 34%); column-gap: 1.5rem; min-width: 0; }
[data-variant='full'] .r3-ap { grid-template-columns: minmax(0, 1fr) minmax(17rem, 30%); column-gap: 2rem; }
.r3-ap.is-empty { grid-template-columns: minmax(0, 1fr); }
.r3-ap-main { min-width: 0; min-height: 0; display: flex; flex-direction: column; }
.r3-ap-fig { display: flex; align-items: baseline; flex-wrap: wrap; gap: 0.25rem 0.5rem; min-width: 0; margin-top: -0.25rem; }
.r3-big { font-family: var(--font-display); font-size: 2rem; font-weight: 600; line-height: 1.05; letter-spacing: -0.025em; color: var(--ats-title); white-space: nowrap; }
.r3-ap-l { font-size: var(--text-sm); color: var(--muted-fg); white-space: nowrap; }
.r3-ap-chg { display: inline-flex; align-items: center; gap: 0.25rem; margin-left: 0.25rem; font-size: var(--text-xs); font-weight: 500; white-space: nowrap; cursor: default; }
.r3-ap-chg.up { color: var(--green-ink); }
.r3-ap-chg.down { color: #9f1239; }
.r3-ap-ch { position: relative; flex: 1; min-height: 0; margin-top: 0.75rem; cursor: crosshair; border-radius: 6px; }
.r3-ap-ch:focus-visible { outline-offset: 4px; }
.r3-ap-ch svg { position: absolute; inset: 0; display: block; overflow: visible; }
.r3-ap-ch .gl { stroke: var(--hair); stroke-width: 1; shape-rendering: crispEdges; }
.r3-ap-ch .base { stroke: var(--line-2); stroke-width: 1; shape-rendering: crispEdges; }
.r3-ap-ch text { font-family: var(--font-sans); fill: var(--muted-fg); font-size: 0.75rem; font-variant-numeric: tabular-nums; }
.r3-ap-ch .hband { fill: var(--fg); fill-opacity: 0.045; }
.r3-ap .seg { transition: opacity 140ms ease-out; }
.r3-ap.has-hot .seg { opacity: 0.22; }
.r3-ap.has-hot .seg.hot { opacity: 1; }
.r3-ap-none { position: absolute; left: 0; right: 0; top: 38%; text-align: center; font-size: var(--text-sm); color: var(--muted-fg); }
/* the vacancy list beside the chart: swatch, name over location, total, share */
.r3-ap-side { min-width: 0; min-height: 0; display: flex; flex-direction: column; padding-left: 1.5rem; border-left: 1px solid var(--hair); }
[data-variant='full'] .r3-ap-side { padding-left: 2rem; }
.r3-ap-vh { display: flex; justify-content: space-between; margin: -0.25rem 0 0.25rem; font-size: var(--text-xs); color: var(--muted-fg); }
.r3-ap-vl { flex: 1; min-height: 0; overflow: hidden; display: flex; flex-direction: column; justify-content: space-between; }
.r3-ap-vr {
	position: relative; display: grid; grid-template-columns: 0.625rem minmax(0, 1fr) auto 2.5rem; align-items: center; column-gap: 0.625rem;
	margin-inline: calc(var(--row-x) * -1); padding: 0.375rem var(--row-x); border-radius: 10px; cursor: default;
	transition: background-color 140ms ease-out, opacity 140ms ease-out;
}
.r3-ap-vr:hover, .r3-ap-vr.hot { background: var(--subtle); }
.r3-ap.has-hot .r3-ap-vr:not(.hot) { opacity: 0.5; }
.r3-ap-vr:focus-visible { outline: 2px solid var(--primary); outline-offset: 0; }
.r3-ap-sw { width: 0.625rem; height: 0.625rem; border-radius: 3px; }
.r3-ap-vn { display: flex; align-items: baseline; gap: 0.4375rem; min-width: 0; line-height: 1.3; }
.r3-ap-vn > .clip { flex: 0 1 auto; min-width: 0; }
/* the town is quieter than the name and gives way first when the row is short */
.r3-ap-vn > .clip:not(small) { font-size: var(--text-sm); font-weight: 500; color: var(--fg); }
.r3-ap-vn > small.clip { flex: 0 40 auto; max-width: 48%; font-size: var(--text-xs); font-weight: 400; color: var(--muted-fg); }
.r3-ap-vr b { justify-self: end; font-size: var(--text-sm); font-weight: 600; color: var(--fg); }
.r3-ap-sh { justify-self: end; font-size: var(--text-xs); color: var(--muted-fg); }
/* narrow: the list becomes a two-column legend under the chart */
[data-variant='narrow'] .r3-ap { grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(0, 1fr) auto; row-gap: 0.625rem; }
[data-variant='narrow'] .r3-ap-side { padding: 0.625rem 0 0; border-left: 0; border-top: 1px solid var(--hair); }
.r3-ap-vl.is-legend { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 1.25rem; justify-content: start; }
.r3-ap-vl.is-legend .r3-ap-vr { grid-template-columns: 0.625rem minmax(0, 1fr) auto; padding-block: 0.1875rem; }
.r3-ap-vl.is-legend .r3-ap-vr b { font-weight: 500; color: var(--fg-2); font-size: var(--text-xs); }
.r3-tip .tsw { display: inline-block; width: 8px; height: 8px; margin-right: 6px; border-radius: 2px; vertical-align: 0; }

/* ================================================================== 5. messages */
.r3-msw { flex: 1; min-height: 0; overflow: hidden; }
.r3-msl { display: flex; flex-direction: column; }
.r3-ms.is-read .r3-ms-h b, .r3-ms.is-read .r3-ms-f { font-weight: 500; color: var(--fg-2); }
.r3-ms.is-read .r3-ms-s { color: var(--muted-fg); }
.r3-udot.is-off { background: transparent; }
.r3-ms { grid-template-columns: auto minmax(0, 1fr) 0.5rem; column-gap: 0.75rem; padding-block: calc(0.5rem + var(--fp, 0px)); }
.r3-ms .av.sm { width: 2rem; height: 2rem; font-size: 0.7857rem; }
.r3-ms-b { display: flex; flex-direction: column; min-width: 0; line-height: 1.3; }
.r3-ms-h { display: flex; align-items: baseline; gap: 0.5rem; min-width: 0; }
.r3-ms-h b { flex: 1; font-size: var(--text-sm); font-weight: 600; color: var(--fg); }
.r3-ms-t { flex: none; font-size: var(--text-xs); color: var(--muted-fg); white-space: nowrap; }
.r3-ms-s { font-size: var(--text-xs); color: var(--fg-2); }
.r3-ms:not(.is-line) .r3-udot { align-self: start; margin-top: 0.5rem; }
.r3-udot { width: 7px; height: 7px; border-radius: 999px; background: var(--primary); justify-self: end; cursor: default; }
.r3-ms.is-line { grid-template-columns: auto minmax(0, 11rem) minmax(0, 1fr) auto 0.5rem; column-gap: 0.875rem; padding-block: calc(0.4375rem + var(--fp, 0px)); }
[data-variant='full'] .r3-ms.is-line { grid-template-columns: auto minmax(0, 12rem) minmax(0, 1fr) minmax(0, 14rem) 4rem 0.5rem; }
.r3-ms.is-line .r3-ms-f { font-size: var(--text-sm); font-weight: 600; color: var(--fg); }
.r3-ms.is-line .r3-ms-s { font-size: var(--text-sm); }
.r3-ms-v { font-size: var(--text-xs); color: var(--muted-fg); }
.r3-ms.is-line .r3-ms-t { text-align: right; }

.r3-card { container: r3 / inline-size; }

@media (prefers-reduced-motion: reduce) {
	.r3-pl-seg, .r3-pll-b i { transition: opacity 160ms ease-out; }
	.r3-ap .seg, .r3-ap-vr { transition: none; }
	.has-hot .r3-pl-seg.hot { transform: none; }
	.r3-sel:active, .r3-ib:active, .r3-btn-s:active, .r3-btn-o:active, .r3-link:active, .r3-ivs-d:active { transform: none; }
}

/* Day view, tall slot: "Coming up" fills spare height without adding any (absolutely placed, rows past the room hidden) */
.r3-ivmore { position: relative; flex: 1 1 auto; min-height: 0; margin-top: 0.75rem; }
.r3-ivmore-in { position: absolute; inset: var(--gp, 0px) 0 auto 0; }
.r3-ivmore-h { margin: 0; padding: 0.75rem 0 0.125rem; border-top: 1px solid var(--hair); font-size: var(--text-xs); font-weight: 600; color: var(--muted-fg); }
.r3-ivmore .r3-ivg:first-child { padding-top: 0.5rem; }

/* Applications at a medium width: the vacancy list drops the town (its tooltip keeps it) so names stay readable */
@container r3 (max-width: 54rem) {
	.r3-ap-vn small { display: none; }
	.r3-ap { grid-template-columns: minmax(0, 1fr) minmax(12rem, 36%); }
}
