:root {
  --canvas: #F4F5F7;
  --surface: #FFFFFF;
  --surface-2: #ECEEF1;
  --ink: #1B2430;
  --body: #333F48;
  --ink-2: #5F6B76;
  --ink-3: #A3ACB5;
  --rule: #E3E6E9;
  --edge: #D3D7DB;
  --accent: #D71920;
  --accent-hover: #B8141A;
  --accent-ink: #FFFFFF;
  --accent-soft: #FBE4E5;
  --positive: #2E7D5B;
  --warn: #B7791F;
  --ease: cubic-bezier(.2, .7, .2, 1);
  --radius: 2px;
  --panel-radius: 6px;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, Consolas, monospace;
  color-scheme: light;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { background: var(--canvas); color: var(--body); font: 14px/1.5 var(--sans); font-feature-settings: "cv11", "ss01"; -webkit-font-smoothing: antialiased; }
button, input, select { font: inherit; color: inherit; }
a { color: inherit; }
.num { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.meta { font-size: 12px; color: var(--ink-2); }
.label { font-size: 11px; font-weight: 500; letter-spacing: .02em; color: var(--ink-2); margin: 0 0 8px; }

/* Shell */
.shell { display: grid; grid-template-rows: auto minmax(0, 1fr); height: 100vh; }
.rail { display: flex; align-items: center; gap: 24px; border-bottom: 1px solid var(--rule); background: var(--surface); padding: 0 24px; min-height: 52px; }
.mark { display: flex; align-items: center; gap: 10px; font-weight: 600; color: var(--ink); text-decoration: none; white-space: nowrap; }
.mark-sq { width: 14px; height: 14px; background: var(--accent); }
.cohort { margin: 0; font-size: 12px; color: var(--ink-2); white-space: nowrap; }
#nav { display: flex; align-self: stretch; gap: 2px; }
#nav a { display: flex; align-items: center; gap: 6px; padding: 0 10px; text-decoration: none; color: var(--ink-2); position: relative; white-space: nowrap; transition: color 200ms var(--ease), background-color 200ms var(--ease); }
#nav a:hover { color: var(--ink); background: var(--surface-2); }
#nav a[aria-current] { color: var(--ink); font-weight: 500; }
#nav a[aria-current]::before { content: ""; position: absolute; left: 6px; right: 6px; bottom: -1px; height: 2px; background: var(--accent); animation: growX 320ms var(--ease) both; }
#nav .count { font-family: var(--mono); font-size: 12px; color: var(--ink-2); }
#nav .count.hot { color: var(--accent); }
.rail-foot { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.rail-foot .data-btns { display: flex; gap: 4px; }
.rail-foot .who { white-space: nowrap; }
@media (max-width: 1280px) { .cohort, .rail-foot .who { display: none; } .rail { gap: 16px; } }
.who { font-size: 12px; color: var(--ink-2); }
.main { display: flex; flex-direction: column; min-width: 0; overflow: hidden; }
.top { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 24px; border-bottom: 1px solid var(--rule); background: var(--surface); }
.top h1 { margin: 0; font-size: 15px; font-weight: 600; color: var(--ink); }
.search { position: relative; width: min(360px, 50vw); }
.search input { width: 100%; padding: 7px 34px 7px 10px; border: 1px solid var(--edge); border-radius: var(--radius); background: var(--canvas); outline: none; transition: border-color 200ms var(--ease); }
.search input:focus { border-color: var(--ink-2); }
kbd { font: 11px var(--mono); color: var(--ink-2); border: 1px solid var(--edge); border-radius: var(--radius); padding: 0 5px; }
.search kbd { position: absolute; right: 8px; top: 8px; }
#view { flex: 1; overflow: auto; padding: 20px 24px 20px; view-transition-name: view; }

/* Panels */
.panel { background: var(--surface); border: 1px solid var(--edge); border-radius: var(--panel-radius); padding: 16px 18px; min-width: 0; }
.panel h2 { margin: 0 0 12px; font-size: 13px; font-weight: 600; color: var(--ink); }
.grid { display: grid; gap: 12px; }

/* Controls */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 36px; padding: 0 14px; line-height: 1; white-space: nowrap; box-sizing: border-box; font-size: 13px; text-decoration: none; border: 1px solid var(--edge); border-radius: var(--radius); background: var(--surface); color: var(--ink); cursor: pointer; transition: background-color 200ms var(--ease), border-color 200ms var(--ease), transform 120ms var(--ease); }
.btn:hover { border-color: var(--ink-3); }
.btn:active { transform: translateY(1px); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); font-weight: 500; }
.btn.primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.btn kbd { border-color: currentColor; color: inherit; opacity: .6; font-size: 10px; line-height: 14px; padding: 0 4px; }
.ghost { background: none; border: 0; padding: 0; color: var(--ink-2); cursor: pointer; text-align: left; font-size: 12px; }
.ghost:hover { color: var(--ink); }
.seg { display: inline-flex; gap: 16px; border-bottom: 1px solid var(--rule); }
.seg button { background: none; border: 0; padding: 0 0 7px; color: var(--ink-2); cursor: pointer; font-size: 12px; position: relative; }
.seg button[aria-pressed="true"] { color: var(--ink); }
.seg.flags { margin-left: 32px; }
.seg button[aria-pressed="true"]::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: var(--accent); animation: grow 280ms var(--ease) both; transform-origin: left; }
.chip { display: inline-block; font-size: 12px; padding: 1px 8px; border-radius: var(--radius); background: var(--surface-2); color: var(--body); }
.status { font-size: 12px; display: inline-flex; align-items: center; gap: 6px; color: var(--ink-2); }
.status::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--ink-3); }
.status.shortlisted::before { background: var(--warn); }
.status.proposed::before { background: var(--accent); }
.status.placed::before { background: var(--positive); }

/* Bars */
.bar { height: 4px; background: var(--surface-2); border-radius: 1px; overflow: hidden; }
.bar > i { display: block; height: 100%; background: var(--ink); transform-origin: left; animation: grow 600ms var(--ease) both; animation-delay: var(--d, 0ms); }
.bar.red > i { background: var(--accent); }

#toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 16px); opacity: 0; visibility: hidden; background: var(--ink); color: var(--surface); padding: 10px 14px; border-radius: var(--radius); display: flex; gap: 16px; align-items: center; transition: transform 320ms var(--ease), opacity 320ms var(--ease), visibility 320ms; }
#toast.on { transform: translate(-50%, 0); opacity: 1; visibility: visible; }
#toast button { background: none; border: 0; color: inherit; text-decoration: underline; cursor: pointer; padding: 0; }

/* Motion (same vocabulary as the tariff monitor) */
@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes grow { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes growY { from { transform: scaleY(0); } to { transform: scaleY(1); } }
@keyframes draw { to { stroke-dashoffset: var(--to, 0); } }
.enter { animation: rise 400ms var(--ease) both; animation-delay: var(--d, 0ms); }
::view-transition-old(view) { animation: 140ms var(--ease) both vt-out; }
::view-transition-new(view) { animation: 320ms var(--ease) both rise; }
@keyframes vt-out { to { opacity: 0; } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0ms !important; animation-duration: 0ms !important; animation-delay: 0ms !important; }
}

/* Dashboard tiles (overview, offices, review) */
.tile-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 12px; }
.tile-head h2 { margin: 0; } .tile-head a { text-decoration: none; } .tile-head a:hover { color: var(--ink); }
.t3 { grid-column: span 3; } .t4 { grid-column: span 4; } .t5 { grid-column: span 5; } .t8 { grid-column: span 8; } .t12 { grid-column: 1 / -1; }
.r2 { grid-row: span 2; }
.p-head h2 a { color: inherit; }
.stack { display: flex; height: 10px; gap: 2px; margin-bottom: 14px; }
.stack i { transform-origin: left; animation: grow 600ms var(--ease) both; animation-delay: var(--d); background: var(--ink-3); }
.stack .s-shortlisted { background: var(--warn); } .stack .s-proposed { background: var(--accent); } .stack .s-placed { background: var(--positive); }
.stages { display: grid; grid-template-columns: 1fr auto; gap: 6px 12px; margin: 0; }
.stages div { display: contents; } .stages dd { margin: 0; color: var(--ink); }
.tbl { width: 100%; border-collapse: collapse; }
.tbl th { text-align: left; font-size: 11px; font-weight: 500; color: var(--ink-2); padding: 0 8px 6px 0; border-bottom: 1px solid var(--rule); }
.tbl td { padding: 8px 8px 8px 0; border-bottom: 1px solid var(--rule); }
.tbl .r { text-align: right; } .tbl td:has(> .bar) { width: 30%; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl a { text-decoration-color: var(--ink-3); text-underline-offset: 3px; }

/* Candidates: directory */
.dir { margin-top: 14px; }
.dir tr[data-href] { cursor: pointer; transition: background-color 160ms var(--ease); }
.dir tr[data-href]:hover { background: var(--surface-2); }
.dir td:nth-child(2) { white-space: nowrap; }
.dir td:nth-child(2) .avatar { margin-right: 10px; vertical-align: middle; }
.trunc { max-width: 220px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
a.person { color: var(--ink); font-weight: 500; text-decoration: none; background: linear-gradient(currentColor, currentColor) 0 100% / 0 1px no-repeat; transition: background-size 240ms var(--ease); }
a.person:hover { background-size: 100% 1px; }
.avatar { display: inline-grid; place-items: center; width: 56px; height: 56px; flex: none; border-radius: 50%; background: var(--surface-2); color: var(--ink); font-weight: 500; font-size: 18px; letter-spacing: .02em; }
.avatar.sm { width: 28px; height: 28px; font-size: 11px; }

/* Candidates: profile dashboard */
.crumbs { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--ink-2); margin-bottom: 12px; }
.crumbs a { color: var(--ink-2); text-decoration: none; } .crumbs a:hover { color: var(--ink); }
.pager { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.pager .btn { text-decoration: none; margin: 0; }
.pager .btn[aria-disabled] { opacity: .45; pointer-events: none; }
.p-head { display: flex; align-items: center; gap: 18px; padding: 18px 22px; margin-bottom: 12px; }
.p-id { min-width: 0; flex: 1 1 260px; }
.p-id h2 { margin: 0; font-size: 26px; font-weight: 400; color: var(--ink); letter-spacing: -.01em; }
.p-id .meta { margin: 2px 0 6px; } .p-id a { color: inherit; text-underline-offset: 3px; text-decoration-color: var(--ink-3); }
.stats { display: flex; border-left: 1px solid var(--rule); }
.stat { display: grid; padding: 0 20px; border-right: 1px solid var(--rule); min-width: 104px; }
.stat .label { margin: 0; } .stat b { font-size: 24px; font-weight: 300; color: var(--ink); line-height: 1.2; }
.p-actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.dash { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 12px; }
.fit { margin-top: 10px; } .fit td { vertical-align: middle; } .fit td.b { width: 11%; } .fit td:has(> .person) { white-space: nowrap; }
.fit .btn.sm { margin: 0; }
.skills { list-style: none; margin: 8px 0 0; padding: 0; }
.skills .meta { white-space: nowrap; }
.skills li { display: flex; justify-content: space-between; gap: 8px; padding: 7px 0 7px 12px; border-top: 1px solid var(--rule); position: relative; color: var(--ink); }
.skills li::before { content: ""; position: absolute; left: 0; top: 14px; width: 6px; height: 6px; border-radius: 50%; background: var(--ink-3); }
.skills .have::before { background: var(--positive); } .skills .miss { color: var(--ink-2); } .skills .miss::before { background: none; border: 1px solid var(--accent); }
.hist { display: flex; align-items: flex-end; gap: 3px; height: 96px; margin-top: 8px; border-bottom: 1px solid var(--edge); }
.hist i { flex: 1; background: var(--ink-3); transform-origin: bottom; animation: growY 500ms var(--ease) both; animation-delay: var(--d); min-height: 1px; }
.hist i.me { background: var(--accent); }
.hist-axis { display: flex; justify-content: space-between; margin: 4px 0 8px; }
.lede { font-size: 15px; line-height: 1.6; color: var(--ink); margin: 0; max-width: 66ch; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; }
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { display: grid; grid-template-columns: 110px 1fr; padding: 10px 0; border-top: 1px solid var(--rule); }
.timeline li:first-child { border-top: 0; padding-top: 0; }
.timeline strong { font-weight: 500; color: var(--ink); }
.kv { display: grid; grid-template-columns: 80px 1fr; gap: 8px 12px; margin: 0; }
.kv dt { color: var(--ink-2); font-size: 12px; padding-top: 1px; }
.kv dd { margin: 0; color: var(--ink); display: flex; align-items: center; gap: 8px; min-width: 0; overflow-wrap: anywhere; }
.kv a { color: var(--ink); text-underline-offset: 3px; text-decoration-color: var(--ink-3); }
.meter { display: inline-flex; gap: 2px; } .meter i { width: 14px; height: 4px; background: var(--surface-2); }
.meter i.on { background: var(--ink); transform-origin: left; animation: grow 300ms var(--ease) both; animation-delay: var(--d); }
.activity { list-style: none; margin: 0; padding: 0 0 0 3px; border-left: 1px solid var(--rule); }
.activity li { display: flex; justify-content: space-between; gap: 8px; padding: 6px 0 6px 12px; margin-left: -6px; }
.activity .status { color: var(--ink); }
.btn.sm { height: 28px; padding: 0 10px; font-size: 12px; justify-self: start; }
.btn:disabled { opacity: .45; cursor: default; }
.ring-bg { fill: none; stroke: var(--surface-2); stroke-width: 3; }
.ring-fg { fill: none; stroke: var(--ink); stroke-width: 3; transform: rotate(-90deg); transform-origin: center; animation: draw 700ms var(--ease) forwards 200ms; }
.ring-fg.strong { stroke: var(--accent); }
.ring text { font-size: 13px; fill: var(--ink); }
/* Overview */
.legend { display: flex; gap: 16px; margin-bottom: 10px; } .legend i { display: inline-block; width: 8px; height: 8px; margin-right: 6px; }
.k-seat { background: var(--accent); } .k-people { background: var(--ink); }
.pairs { list-style: none; margin: 0; padding: 0; }
.pairs li { display: grid; grid-template-columns: 28px 1fr 56px; align-items: center; gap: 10px; padding: 5px 0; }
.pair { display: grid; gap: 2px; } .pair i { display: block; height: 5px; min-width: 1px; transform-origin: left; animation: grow 600ms var(--ease) both; animation-delay: var(--d); }
.pairs .meta { text-align: right; }
.duo { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 12px; }
.duo b { display: block; font-size: 30px; font-weight: 300; color: var(--ink); line-height: 1.1; }
.duo + .bar { margin-bottom: 10px; }
.cols6 { display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; text-align: center; }
.cols6 > div { display: grid; gap: 2px; }
.vbar { height: 80px; display: flex; align-items: flex-end; border-bottom: 1px solid var(--edge); }
.vbar i { width: 100%; background: var(--ink-3); transform-origin: bottom; animation: growY 500ms var(--ease) both; animation-delay: var(--d); }
.cols6 > div:last-child .vbar i { background: var(--accent); }

/* Offices */
.offices { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 12px; align-items: start; }
.o-list { position: sticky; top: 0; max-height: calc(100vh - 176px); overflow: auto; padding: 14px 10px 14px 14px; }
.o-list .seg { flex-wrap: wrap; gap: 4px 12px; margin-bottom: 8px; }
.o-rows { list-style: none; margin: 4px 0 0; padding: 0; }
.o-rows button { width: 100%; display: grid; grid-template-columns: 1fr auto; gap: 0 8px; text-align: left; background: none; border: 0; border-radius: var(--radius); padding: 7px 8px; cursor: pointer; position: relative; transition: background-color 160ms var(--ease); }
.o-rows button:hover { background: var(--surface-2); }
.o-rows button.sel { background: var(--accent-soft); }
.o-rows button.sel::before { content: ""; position: absolute; left: 0; top: 7px; bottom: 7px; width: 2px; background: var(--accent); animation: growY 240ms var(--ease) both; }
.o-name { color: var(--ink); font-weight: 500; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.seats { display: inline-flex; gap: 3px; align-items: center; } .seats i { width: 7px; height: 7px; border: 1px solid var(--ink-3); border-radius: 50%; }
.seats i.on { background: var(--accent); border-color: var(--accent); }
.o-dash { min-width: 0; }
.slots { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.slot { display: grid; grid-template-columns: 1fr auto; gap: 2px 8px; padding: 10px 12px; border: 1px solid var(--rule); border-radius: var(--radius); }
.slot .label { grid-column: 1 / -1; margin: 0; } .slot.open { border-style: dashed; }

/* Review */
.checks { list-style: none; margin: 0; padding: 0; }
.checks li { padding: 8px 0 8px 14px; border-top: 1px solid var(--rule); position: relative; color: var(--ink); }
.checks li:first-child { border-top: 0; padding-top: 0; } .checks li::before { content: ""; position: absolute; left: 0; top: 15px; width: 6px; height: 6px; background: var(--warn); }
.checks li:first-child::before { top: 7px; }
.ready { list-style: none; margin: 0; padding: 0; }
.ready li { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 8px 0; border-top: 1px solid var(--rule); }
.ready li:first-child { border-top: 0; padding-top: 0; } .ready .btn.sm { margin: 0; }

@media (max-width: 1100px) {
  .p-head { flex-wrap: wrap; } .p-actions { width: 100%; justify-content: flex-start; }
  .dash > .tile { grid-column: span 6; grid-row: auto; }
  .dir th:nth-child(n+4):nth-child(-n+5), .dir td:nth-child(n+4):nth-child(-n+5) { display: none; }
  .offices { grid-template-columns: 1fr; } .o-list { position: static; max-height: 320px; }
}
@media (max-width: 720px) {
  .dash > .tile { grid-column: 1 / -1; } .stats { flex-wrap: wrap; border: 0; } .stat { padding: 8px 16px 8px 0; border: 0; }
  .shell { height: auto; } .rail { flex-wrap: wrap; gap: 8px; padding: 8px 16px; }
  .cohort, .rail-foot .who { display: none; } #nav { flex-wrap: wrap; } #nav a { padding: 6px 8px; }
  .main { overflow: visible; } #view { padding: 16px; } .top { padding: 12px 16px; }
}


/* Candidate profile: one screen. Identity and suggestion on top; application, details, placement below. */
#view:has(> .profile) { display: flex; padding-top: 16px; padding-bottom: 16px; }
.profile .crumbs { margin-bottom: 10px; } .profile .p-head { padding: 14px 20px; margin-bottom: 10px; }
.p-id .meta a { color: inherit; text-underline-offset: 3px; text-decoration-color: var(--ink-3); }
.profile .avatar { width: 48px; height: 48px; font-size: 16px; } .profile .cgrid { gap: 10px; }
.profile { display: flex; flex-direction: column; flex: 1; min-height: 0; }
.p-head .p-id { flex: 1 1 300px; }
.best { flex: 1 1 520px; border-left: 1px solid var(--rule); padding-left: 22px; }
.best > .label { margin: 0 0 2px; color: var(--accent); }
.best { min-width: 0; } .best h3 { margin: 0; font-size: 20px; font-weight: 500; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.best h3 a { color: inherit; text-decoration: none; } .best h3 a:hover { text-decoration: underline; text-underline-offset: 3px; }
.best > .meta { margin: 2px 0 10px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.best-row { display: flex; align-items: center; }
.best-row .stat:first-child { padding-left: 0; } .best-row .stat:last-child { border-right: 0; }
.profile .p-actions { flex-wrap: nowrap; align-self: center; }
.cgrid { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, .8fr) minmax(0, 1.3fr); gap: 12px; }
.cgrid > .col { overflow: auto; }
.col .label { margin: 14px 0 6px; } .col .tile-head + .label, .col .tile-head + .lede { margin-top: 0; }
.col .lede { font-size: 15px; margin-bottom: 4px; }
@media (max-width: 1100px) {
  #view:has(> .profile) { display: block; }
  .cgrid { grid-template-columns: 1fr; } .cgrid > .col { overflow: visible; }
  .best { border: 0; padding: 12px 0 0; }
}

/* AHP suggestion: criterion breakdown and simulated requirement levels */
.tbl.why td.b { width: 45%; }
.tbl.why td { padding: 2px 8px 2px 0; }
.skipped { margin: 8px 0 0; }
.alts td:first-child { max-width: 0; width: 60%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.warn { color: var(--accent); }
.reqsim { list-style: none; margin: 0 0 10px; padding: 0; }
.reqsim li { display: grid; grid-template-columns: 8em 1fr 3em; align-items: center; gap: 10px; padding: 5px 0; border-bottom: 1px solid var(--rule); }
.reqsim li .num { text-align: right; } .reqsim li.cur span:first-child { font-weight: 500; }
.cohort-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }
.cohort-grid .label { margin-top: 0; } .cohort-grid .tbl { margin-bottom: 10px; } .cohort-grid .btn.sm { margin: 0; }
.cohort-grid td.who { max-width: 0; width: 100%; } .cohort-grid td.who .meta { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 1100px) { .cohort-grid { grid-template-columns: 1fr; } }

/* Office: candidate-select split. Office criteria left, search + profile right, one screen. */
.btn.toggle[aria-pressed="true"] { background: var(--ink); color: var(--surface); border-color: var(--ink); }
#view:has(> .split) { display: flex; padding-top: 16px; padding-bottom: 16px; }
.split { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); gap: 12px; }
.split .pane { display: flex; flex-direction: column; gap: 12px; overflow: auto; min-height: 0; }
.split .pane .p-head { margin: 0; flex-wrap: wrap; } .split .pane .stats { display: none; }
.split .pane .cohort-grid { grid-template-columns: 1fr; gap: 16px; }
.crit { grid-template-columns: 72px 1fr; } .crit + .label { margin-top: 18px; } .weights { width: 100%; } .crit .chips { gap: 4px; }
.picker { display: grid; grid-template-columns: minmax(240px, 34%) minmax(0, 1fr); padding: 0; min-height: 0; }
.pick-list { display: flex; flex-direction: column; min-height: 0; border-right: 1px solid var(--rule); }
#csearch { margin: 14px; padding: 7px 10px; border: 1px solid var(--edge); border-radius: var(--radius); background: var(--surface); }
#csearch:focus { outline: 2px solid var(--ink); outline-offset: -1px; }
#clist { list-style: none; margin: 0; padding: 0 8px 12px; overflow: auto; }
#clist button { width: 100%; display: grid; grid-template-columns: 28px minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 7px 8px; border: 0; border-radius: var(--radius); background: none; text-align: left; cursor: pointer; transition: background-color 160ms var(--ease); }
#clist button:hover { background: var(--surface-2); } #clist button.sel { background: var(--accent-soft); }
#clist .who { display: grid; min-width: 0; } #clist .who b { font-weight: 500; color: var(--ink); }
#clist .who .meta { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.viewer { overflow: auto; padding: 18px 22px; min-height: 0; }
.v-head { display: flex; align-items: center; gap: 14px; } .v-head h2 { margin: 0; font-size: 20px; font-weight: 500; }
.v-head .person { text-decoration: none; } .v-head .meta { margin: 2px 0 0; }
.v-stats { border: 0; margin: 16px 0 4px; } .v-stats .stat:first-child { padding-left: 0; } .v-stats .stat:last-child { border-right: 0; min-width: 0; }
.v-stats .stat b:not(.num) { font-size: 15px; font-weight: 500; padding-top: 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 260px; }
.viewer .label { margin: 16px 0 6px; } .viewer .lede { font-size: 14px; }
.checklist { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 4px 16px; }
.checklist li { position: relative; padding-left: 14px; color: var(--ink); font-size: 13px; }
.checklist li::before { content: ""; position: absolute; left: 0; top: 7px; width: 6px; height: 6px; border-radius: 50%; background: var(--positive); }
.checklist li.no { color: var(--ink-2); } .checklist li.no::before { background: none; border: 1px solid var(--accent); }
.chip.hit { background: var(--ink); color: var(--surface); }
.v-actions .btn, a.btn { text-decoration: none; }
.v-actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--rule); }
.reason { display: block; margin-top: 4px; font-size: 12px; line-height: 1.5; color: var(--body); white-space: normal; }
.viewer .reason { margin: 10px 0 0; padding: 10px 12px; background: var(--surface-2); border-radius: var(--radius); }
@media (max-width: 1100px) {
  #view:has(> .split) { display: block; } .split, .picker { grid-template-columns: 1fr; }
  .pick-list { border: 0; } #clist { max-height: 280px; }
}
.o-dash .p-head .stat, .split .p-head .stat { min-width: 0; padding: 0 16px; } .p-head .stat .label { white-space: nowrap; }
.o-dash .p-actions { flex-wrap: nowrap; }
.p-head .btn { white-space: nowrap; } .p-head .stat .meta { white-space: nowrap; }
/* Split viewer: application left, assessment right; one column when narrow. */
.v-head .v-actions .btn { white-space: nowrap; }
.v-head .v-actions { margin: 0 0 0 auto; padding: 0; border: 0; align-self: flex-start; }
.v-head .status { display: inline-block; margin-top: 6px; }
.v-body { display: grid; grid-template-columns: 1fr; margin-top: 6px; }
.v-col + .v-col { margin-top: 8px; padding-top: 4px; border-top: 1px solid var(--rule); }
.v-col { min-width: 0; } .v-col > .label:first-child { margin-top: 18px; }
.v-col .v-stats { margin-top: 18px; }
.v-head { flex-wrap: wrap; } .v-head > div:nth-child(2) { flex: 1 1 220px; min-width: 0; }

/* Compact office side in candidate-select mode */
.split .pane { gap: 10px; }
.split .pane .panel { padding: 12px 14px; }
.split .pane h3 { margin: 0 0 8px; font-size: 13px; font-weight: 600; color: var(--ink); }
.oc-head { display: flex; align-items: center; gap: 16px; }
.oc-head > div:first-child { flex: 1; min-width: 0; } .oc-head .label { margin: 0; }
.oc-head h2 { margin: 0; font-size: 18px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.oc-seats { display: grid; text-align: right; } .oc-seats b { font-size: 18px; font-weight: 400; color: var(--ink); }
.oc-head .p-actions { flex-wrap: nowrap; } .oc-head .btn { margin: 0; white-space: nowrap; }
.oc-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; }
.oc-weights, .oc-list, .oc-levels { list-style: none; margin: 0; padding: 0; }
.oc-weights li { display: grid; grid-template-columns: 9.5em 1fr 2.6em; align-items: center; gap: 8px; padding: 2px 0; font-size: 12px; color: var(--ink); }
.oc-weights .num { text-align: right; color: var(--ink-2); }
.oc-people .tile-head { margin-bottom: 4px; } .oc-people .tile-head h3 { margin: 0; } .oc-people .label { margin: 10px 0 4px; }
.oc-list button { width: 100%; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 6px 8px; border: 0; border-top: 1px solid var(--rule); background: none; text-align: left; cursor: pointer; transition: background-color 160ms var(--ease); }
.oc-list li:first-child button { border-top: 0; }
.oc-list button:hover { background: var(--surface-2); } .oc-list button.sel { background: var(--accent-soft); }
.oc-list .who { display: grid; min-width: 0; } .oc-list .who b { font-weight: 500; color: var(--ink); }
.oc-list .who .meta { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.oc-list.bench .who .meta { display: block; white-space: nowrap; text-overflow: ellipsis; }
.oc-levels { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 4px; margin-bottom: 8px; }
.oc-levels li { display: grid; gap: 2px; padding: 6px 6px 5px; background: var(--surface-2); border-radius: var(--radius); }
.oc-levels li .num { font-size: 15px; color: var(--ink); } .oc-levels li.low .num { color: var(--accent); }
.oc-levels li.cur { outline: 1px solid var(--ink); outline-offset: -1px; }
.oc-levels .meta { font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 1100px) { .oc-grid { grid-template-columns: 1fr; } }

/* Profile from the application form: third column stacks placement, background check and CV. */
.cgrid > .side { display: flex; flex-direction: column; gap: 10px; overflow: auto; min-height: 0; }
.cgrid > .side > .col { overflow: visible; flex: none; }
.kv.wide { grid-template-columns: 130px 1fr; } .kv.skills { grid-template-columns: minmax(0, 1fr) auto; } .kv.skills dd { justify-content: flex-end; }
.answer { margin: 0; color: var(--body); line-height: 1.55; white-space: pre-line; overflow-wrap: anywhere; }
.timeline details summary { cursor: pointer; margin-top: 4px; } .timeline details .answer { margin-top: 4px; font-size: 13px; }
.p-id .chips { margin-top: 6px; }
@media (max-width: 1100px) { .cgrid > .side { overflow: visible; } }
/* Jev tags */
.tag-group { margin: 0 0 6px; display: flex; flex-wrap: wrap; gap: 4px; align-items: baseline; } .tag-group > .meta { min-width: 100%; font-size: 11px; }
button.chip.tag { border: 0; cursor: pointer; font: inherit; font-size: 12px; } button.chip.tag:hover { background: var(--ink-3); color: var(--surface); }
.tag-filter { border: 0; cursor: pointer; margin-left: 24px; font-size: 12px; }
.row-tags { font-size: 11px; }
/* Per-office weight sliders */
.tune .oc-weights li { grid-template-columns: 1fr minmax(90px, 1.4fr) 40px; align-items: center; }
.tune input[type=range] { width: 100%; accent-color: var(--accent); margin: 0; }
.tune .btn { margin-top: 6px; }
/* In-place updates (render quiet): skip entrance animations so the page does not flash. */
#view.still *, #view.still *::before, #view.still *::after { animation: none !important; }
/* (i) info popover */
details.info { display: inline-block; position: relative; vertical-align: middle; margin-left: 4px; font-weight: 400; }
details.info > summary { list-style: none; cursor: pointer; width: 16px; height: 16px; border-radius: 50%; border: 1px solid var(--ink-3);
  color: var(--ink-2); font: italic 600 10px/14px Georgia, serif; text-align: center; user-select: none; }
details.info > summary::-webkit-details-marker { display: none; }
details.info > summary:hover, details.info[open] > summary { background: var(--ink); color: var(--surface); border-color: var(--ink); }
details.info > summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
details.info .info-pop { display: none; }
.info-pop { position: fixed; z-index: 50; width: min(360px, 80vw); padding: 12px 14px; background: var(--surface);
  border: 1px solid var(--rule); border-radius: var(--radius); box-shadow: 0 8px 24px rgba(0, 0, 0, .14); }
.info-pop p { margin: 0 0 8px; font-size: 12px; line-height: 1.55; color: var(--body); text-transform: none; letter-spacing: 0; }
.info-pop p:last-child { margin-bottom: 0; } .info-pop b { color: var(--ink); font-weight: 600; }
.exp-summary { margin: 4px 0 10px; line-height: 1.5; }
.no-scrollbar { scrollbar-width: none; } .no-scrollbar::-webkit-scrollbar { display: none; }
.w-track { position: relative; display: flex; align-items: center; } .w-track input { width: 100%; }
.w-orig { position: absolute; top: 50%; height: 18px; transform: translateY(-50%); width: 1.5px; margin-left: -0.75px; background: var(--ink-2); pointer-events: none; opacity: .7; }
.rv-tools { display: flex; gap: 8px; align-items: center; margin: 12px 0; } .rv-tools input[type=search] { flex: 1; min-width: 0; }
.rv-group th { text-align: left; padding-top: 12px; }
.m-eq { margin: 8px 0 14px; overflow-x: auto; color: var(--ink); } .m-steps li { margin-bottom: 6px; }
.m-title { font-size: 20px; font-weight: 500; color: var(--ink); margin: 4px 0 14px; }
.m-paper h2 { font-size: 17px; } .m-paper h3 { font-size: 15px; font-weight: 500; color: var(--ink); margin: 16px 0 6px; }
.m-paper table { border-collapse: collapse; margin: 8px 0 14px; font-size: 13px; } .m-paper th, .m-paper td { border-bottom: 1px solid var(--rule); padding: 4px 10px; text-align: left; vertical-align: top; }
.m-paper dt { font-weight: 500; color: var(--ink); margin-top: 8px; } .m-paper dd { margin: 2px 0 6px 18px; }
.m-paper .katex-display { overflow-x: auto; overflow-y: hidden; padding: 2px 4px; }
.m-paper .walk { color: var(--accent, #1f4e8c); }
/* Background flags: review aids, styled to be noticed */
.flag { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 999px; font-size: 12px; font-weight: 500; white-space: nowrap;
  color: var(--warn); background: color-mix(in srgb, var(--warn) 14%, transparent); border: 1px solid color-mix(in srgb, var(--warn) 45%, transparent); }
.flag::before { content: "⚑"; }
.flag.sm { padding: 0 6px; font-size: 11px; vertical-align: 1px; } .flag.sm::before { content: none; }
.flag-banner { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; margin-top: 8px; padding: 6px 10px; border-radius: var(--radius);
  border: 1px solid color-mix(in srgb, var(--warn) 45%, transparent); background: color-mix(in srgb, var(--warn) 8%, transparent); font-size: 12px; }
.flag-banner > b { color: var(--warn); font-weight: 600; }
.bg-card { flex: 0 1 340px; min-width: 240px; align-self: stretch; padding: 4px 0 4px 16px; border-left: 1px solid var(--rule); }
.bg-card.flagged { border-left-color: var(--warn); }
.bg-card .label { margin: 0 0 6px; } .bg-card .kv { grid-template-columns: 84px 1fr; gap: 4px 10px; font-size: 13px; }
.bg-card .kv dd { flex-wrap: wrap; gap: 4px; }
/* Profile header: name, background check and suggested placement in three equal columns, buttons pinned right. */
@media (min-width: 1101px) {
  .profile .p-head { display: grid; grid-template-columns: auto minmax(0, 1.2fr) minmax(0, 1fr) minmax(0, 1.2fr); column-gap: 24px; row-gap: 10px; }
  .profile .p-head .p-actions { grid-column: 1 / -1; justify-content: flex-end; border-top: 1px solid var(--rule); padding-top: 10px; }
  .profile .p-head .bg-card { min-width: 0; padding-left: 24px; }
  .profile .p-head .best { padding-left: 24px; }
}
/* Why this placement: fit breakdown */
.k-skills { --k: #D71920; } .k-location { --k: #2F6FB2; } .k-english { --k: #2E7D5B; } .k-french { --k: #7A4FB5; }
.k-major { --k: #C77D1A; } .k-first_time { --k: #1F8A8A; } .k-level { --k: #8A6D3B; } .k-other_lang { --k: #B5487A; }
.fitbar { display: flex; height: 12px; border-radius: 3px; overflow: hidden; background: var(--surface-2); margin: 4px 0 8px; }
.fitbar i { display: block; background: var(--k); border-right: 1px solid var(--surface); }
.fitbar i.lost { background: repeating-linear-gradient(135deg, var(--surface-2) 0 4px, var(--rule) 4px 8px); border: 0; }
.sw { display: inline-block; width: 9px; height: 9px; border-radius: 2px; background: var(--k); margin-right: 7px; vertical-align: 0; }
.tbl.why tfoot td { border-top: 1px solid var(--edge); padding-top: 6px; color: var(--ink); }
.alt-bars { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.alt-bars li { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(60px, 1fr) 2.2em 3.2em; gap: 10px; align-items: center; font-size: 13px; }
.alt-bars li.here a { font-weight: 600; } .alt-bars .num { text-align: right; }
.bar.muted i { background: var(--ink-3); }
/* Details: language grid and skill bars */
.lang-grid { border-collapse: separate; border-spacing: 3px; font-size: 12px; margin: 0 -3px 4px; width: calc(100% + 6px); table-layout: fixed; }
.lang-grid th { font-weight: 500; color: var(--ink-2); text-align: left; font-size: 11px; }
.lang-grid tbody th { color: var(--ink); font-size: 13px; width: 26%; }
.lang-grid td { text-align: center; padding: 5px 2px; border-radius: 3px; color: var(--ink); }
.lv0 { background: var(--surface-2); color: var(--ink-2) !important; } .lv1 { background: color-mix(in srgb, var(--positive) 15%, transparent); }
.lv2 { background: color-mix(in srgb, var(--positive) 32%, transparent); } .lv3 { background: color-mix(in srgb, var(--positive) 55%, transparent); }
.lv4 { background: var(--positive); color: #fff !important; }
.skill-bars { list-style: none; margin: 0; padding: 0; display: grid; gap: 5px; }
.skill-bars li { display: grid; grid-template-columns: minmax(0, 1fr) minmax(80px, 34%) 6.5em; gap: 10px; align-items: center; font-size: 13px; color: var(--body); }
.sbar { height: 6px; background: var(--surface-2); border-radius: 3px; overflow: hidden; } .sbar i { display: block; height: 100%; background: var(--ink-2); }
.skill-bars li.need > span:first-child { color: var(--ink); font-weight: 600; } .skill-bars li.need .sbar i { background: var(--accent); }
.skill-bars li.need > span:first-child::before, .need-dot { content: ""; display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); margin-right: 6px; vertical-align: 2px; }
/* CV strengths for an office */
.strengths { list-style: none; margin: 0 0 6px; padding: 0; display: grid; gap: 4px; }
.strengths li { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 8px; padding: 3px 0 3px 10px; border-left: 1px solid var(--rule); font-size: 13px; color: var(--body); line-height: 1.4; }
.strengths li.match { border-left-color: var(--accent); }
.strengths b { flex-basis: 100%; color: var(--ink); font-weight: 500; }
.strengths q { font-size: 12px; font-style: italic; color: var(--ink-2); }
.strengths .chips { display: contents; } .strengths .chip { font-size: 11px; padding: 0 6px; }
.chip.hit { background: var(--accent-soft); color: var(--accent); }
select[data-strengths] { font: inherit; font-size: 13px; padding: 3px 6px; border: 1px solid var(--edge); border-radius: var(--radius); background: var(--surface); color: var(--ink); max-width: 60%; }
/* Details fits the column: inline tag-group names, closer skill rows, self-identification two pairs per row */
.col .tag-group { margin-bottom: 3px; } .col .tag-group > .meta { min-width: 0; width: 7.5em; flex: none; }
.skill-bars { gap: 2px; }
.kv.selfid { grid-template-columns: auto 1fr auto 1fr; gap: 4px 12px; align-items: baseline; }
/* The right column's last tile runs to the bottom, so no empty band shows under it */
.cgrid > .side > .col:last-child { flex: 1 0 auto; }

/* Details tile stretched to the column bottom: share the spare height between its sections instead of leaving it below. */
.col.spread { display: flex; flex-direction: column; justify-content: space-between; }
.spread > .tile-head + div > .label:first-child { margin-top: 0; }

/* regions */
.regions { display: grid; gap: 14px; align-content: start; min-width: 0; }
.regions .panel { padding: 16px 18px; }
.regions .rbar { display: grid; grid-template-columns: 110px 1fr 40px; align-items: center; gap: 10px; font-size: 13px; padding: 4px 0; }
.regions .rbar .num { text-align: right; }
.regions input[type="search"] { justify-self: start; width: 240px; max-width: 100%; padding: 7px 10px; border: 1px solid var(--edge); border-radius: var(--radius); background: var(--surface); }
.regions .pane { overflow: auto; max-height: 420px; }
.regions .pane th { position: sticky; top: 0; background: var(--surface); }
.regions .cps { display: flex; align-items: center; gap: 10px; }
.regions .cps .num { min-width: 2.5em; }
.regions .cps .bar { flex: 1; }
.regions td:last-child { width: 30%; }

/* office editing */
.o-filters { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 8px; margin: 0 0 8px; }
.o-filters select { font-size: 12px; padding: 3px 6px; border: 1px solid var(--edge); border-radius: var(--radius); background: var(--surface); color: var(--ink); min-width: 0; }
.o-filters .check, .o-edit details .check { display: flex; gap: 6px; align-items: center; font-size: 12px; color: var(--body); }
.o-filters .check { grid-column: 1 / -1; }
.o-tools { display: flex; align-items: center; gap: 12px; margin: 0 0 8px; }
.o-edit { margin-bottom: 12px; }
.o-edit-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px 12px; margin-bottom: 12px; }
.o-edit-grid label, .list-box > .label { display: grid; gap: 4px; font-size: 12px; color: var(--ink-2); }
.o-edit input, .o-edit select, .list-box input { font: inherit; font-size: 13px; padding: 4px 6px; border: 1px solid var(--edge); border-radius: var(--radius); background: var(--surface); color: var(--ink); min-width: 0; width: 100%; }
.o-edit td input[type=number] { width: 5em; }
.o-edit summary { cursor: pointer; font-size: 13px; color: var(--ink-2); }
.o-edit details .check { padding: 2px 0; }
.list-box { margin-bottom: 12px; }
.list-items { list-style: none; margin: 0 0 6px; padding: 0; display: grid; gap: 4px; }
.list-items li { display: flex; gap: 8px; align-items: center; }
.list-items li input { flex: 1; }
.short-list { list-style: none; margin: 0 0 8px; padding: 0; }
.short-row { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 8px; align-items: center; font-size: 13px; padding: 5px 0; border-top: 1px solid var(--rule); }
.short-acts { display: flex; gap: 4px; }
.short-acts .btn.sm, .short-add .btn.sm { margin: 0; }
.short-add { display: flex; gap: 6px; }
.short-add select { flex: 1; min-width: 0; font-size: 13px; padding: 3px 6px; border: 1px solid var(--edge); border-radius: var(--radius); background: var(--surface); color: var(--ink); }

/* filters */
.filters { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin: 0 0 10px; font-size: 12px; color: var(--ink-2); }
.filters label { display: inline-flex; align-items: center; gap: 6px; }
.filters select { font-size: 12px; padding: 3px 6px; max-width: 170px; border: 1px solid var(--edge); border-radius: var(--radius); background: var(--surface); color: var(--ink); }
.filters .btn.sm { margin: 0; }
.rec-list { list-style: none; margin: 0; padding: 0; font-size: 13px; }
.rec-list li { display: flex; justify-content: space-between; gap: 8px; padding: 5px 0; border-top: 1px solid var(--rule); }
.data-btns { display: flex; gap: 12px; }
/* office editor: checkboxes keep their natural size; skills as a compact two-column grid */
.o-edit input[type=checkbox] { width: auto; padding: 0; margin: 0; flex: none; }
.o-edit td { vertical-align: top; }
.o-edit td:first-child { width: 22%; }
.o-edit td input[type=number] { width: 5em; }
.skill-pick .skill-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px 16px; margin-top: 6px; }
.skill-pick .check { justify-content: flex-start; text-align: left; line-height: 1.3; }
/* office editor v2: sections, role cards, skill chips, changed-field marks */
.o-sec { margin: 14px 0 8px; font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-2); }
.o-sec .meta { text-transform: none; letter-spacing: 0; font-weight: 400; margin-left: 6px; }
.fld { display: grid; gap: 4px; font-size: 12px; font-weight: 500; color: var(--ink); }
.fld.changed input, .fld.changed select { border-color: var(--warn); box-shadow: 0 0 0 2px color-mix(in srgb, var(--warn) 25%, transparent); }
.role-card { border: 1px solid var(--edge); border-radius: var(--radius); padding: 12px; margin-bottom: 10px; background: var(--surface-2); }
.role-top { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1.4fr) 6em auto; gap: 12px; align-items: end; }
.chips { border: 0; padding: 0; margin: 12px 0 0; display: flex; flex-wrap: wrap; gap: 6px; }
.chips legend { font-size: 12px; font-weight: 500; color: var(--ink); margin-bottom: 6px; padding: 0; }
.chips legend .meta { font-weight: 400; margin-left: 6px; }
.chip { position: relative; display: inline-flex; align-items: center; padding: 4px 10px; font-size: 12px; border: 1px solid var(--edge); border-radius: 999px; background: var(--surface); color: var(--ink-2); cursor: pointer; user-select: none; }
.chip input { position: absolute; opacity: 0; pointer-events: none; }
.chip:has(input:checked) { background: var(--ink); border-color: var(--ink); color: var(--surface); }
.chip:has(input:checked)::before { content: "✓"; margin-right: 5px; }
.chip:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }
.chip.changed { box-shadow: 0 0 0 2px var(--warn); }
.dirty-note { color: var(--warn); font-weight: 600; }
.o-edit-foot { display: flex; gap: 8px; align-items: center; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--rule); }
.o-edit-foot .spacer { flex: 1; }
.btn.danger { color: var(--accent); border-color: color-mix(in srgb, var(--accent) 40%, var(--edge)); }
/* office directory: collapsible filters and tools */
.o-more { margin: 6px 0 8px; border: 1px solid var(--edge); border-radius: var(--radius); }
.o-more > summary { cursor: pointer; padding: 6px 10px; font-size: 12px; font-weight: 500; color: var(--ink); display: flex; align-items: center; gap: 6px; list-style: none; }
.o-more > summary::-webkit-details-marker { display: none; }
.o-more > summary::before { content: "▸"; color: var(--ink-2); transition: transform .15s; }
.o-more[open] > summary::before { transform: rotate(90deg); }
.o-more[open] > summary { border-bottom: 1px solid var(--rule); }
.o-more > .o-filters, .o-more > .o-tools { margin: 8px 10px; }
/* office list: whole sidebar collapses to a thin strip (default) */
.offices.list-collapsed { grid-template-columns: 44px minmax(0, 1fr); }
.o-list.collapsed { padding: 0; overflow: hidden; }
.o-list-toggle { display: flex; align-items: center; gap: 6px; border: 0; background: none; cursor: pointer; color: var(--ink-2); font-size: 12px; font-weight: 500; padding: 4px 0; margin-bottom: 6px; }
.o-list-toggle:hover { color: var(--ink); }
.o-list.collapsed .o-list-toggle { flex-direction: column; width: 100%; height: calc(100vh - 176px); justify-content: flex-start; padding: 12px 0; margin: 0; }
.o-list.collapsed .o-list-label { writing-mode: vertical-rl; transform: rotate(180deg); letter-spacing: .03em; }
/* candidate directory: keep short cells on one line, flags stacked and compact */
.tbl.dir td:has(> .status), .tbl.dir td.num.meta { white-space: nowrap; }
.tbl.dir td > .flag { display: flex; width: max-content; margin: 2px 0; }
.tbl.dir .flag { font-size: 11px; padding: 1px 7px; }
.tbl.dir th:nth-child(8) { width: 1%; }
/* office list collapsed: a quiet rail, no card */
.offices.list-collapsed { grid-template-columns: 28px minmax(0, 1fr); }
.o-list.collapsed { background: none; border: 0; box-shadow: none; }
.o-list.collapsed .o-list-toggle { height: auto; gap: 10px; padding: 6px 0; color: var(--ink-2); font-weight: 400; font-size: 11px; border-radius: var(--radius); }
.o-list.collapsed .o-list-toggle:hover { color: var(--ink); background: var(--surface); }
.o-list.collapsed .o-list-toggle > span:first-child { font-size: 13px; }
/* candidate profile: one section at a time under tabs */
.ptabs { margin: 4px 0 10px; }
.ptab-body { flex: 1; min-height: 0; overflow: auto; }
.ptab-body > .panel { max-width: 1100px; }
/* profile header: riding chips wrap in a row instead of stacking */
.p-head .p-id .chips { display: flex; flex-wrap: wrap; gap: 4px; margin: 6px 0; }
.p-head .p-id .chips > * { margin: 0; }
/* profile v3: compact header, full-width tabs, tab content flows into columns so the page needs no scrollbar */
.profile .crumbs { display: flex; align-items: center; gap: 8px; }
.profile .crumb-acts { margin-left: auto; display: flex; gap: 6px; }
.profile .crumb-acts { align-items: center; }
.profile .crumb-acts + .pager { margin-left: 12px; }
.profile .p-head { padding: 10px 16px; align-items: start; }
.profile .p-head .avatar { display: none; }
@media (min-width: 1101px) { .profile .p-head { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); } }
.profile .p-head h2 { font-size: 22px; margin: 0 0 2px; }
.profile .p-head .p-id .meta { font-size: 12px; }
.profile .p-head .p-id .chips { margin: 4px 0 2px; }
.profile .p-head .chips > * { padding: 1px 8px; font-size: 11px; }
.profile .p-head .best h3, .profile .p-head .best .o-title { font-size: 17px; }
.profile .p-head .stat .v, .profile .p-head .stat b, .profile .p-head .stat strong { font-size: 20px; }
.ptabs { display: flex; width: 100%; margin: 2px 0 8px; }
.ptabs > button { flex: 1; text-align: center; }
.ptab-body { overflow: hidden; }
.ptab-body > .panel { max-width: none; height: 100%; overflow: auto; }
.ptab-body > .panel > .tile-head { column-span: all; }
.ptab-body > .panel > * { break-inside: avoid; }
.ptab-body li, .ptab-body tr, .ptab-body .kv > * { break-inside: avoid; }
.ptab-body > .panel.spread, .ptab-body > .panel.col { display: block; }
.ptab-body > .panel > * { margin-bottom: 14px; }
/* skill aptitude tab: a table, not columns */
.ptab-body > .panel.apt { columns: auto; column-rule: none; }
.apt-tbl td, .apt-tbl th { padding: 6px 8px; }
.apt-tbl tr.need td:first-child { font-weight: 600; color: var(--ink); }
.apt-bar { width: 22%; }
.apt-bar .sbar { display: block; height: 6px; border-radius: 3px; background: var(--rule); overflow: hidden; }
.apt-bar .sbar i { display: block; height: 100%; background: var(--ink-2); }
.apt-bar .sbar.strong i { background: var(--positive); } .apt-bar .sbar.solid i { background: var(--ink); }
.apt-terms { max-width: 320px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Shared edits: the user's name (click to change) and the sync state in the rail footer */
.who { display: flex; flex-direction: column; gap: 2px; align-items: flex-start; }
.who-name { padding: 0; font: inherit; color: inherit; border: 0; background: none; cursor: pointer; text-align: left; }
.who-name:hover { text-decoration: underline; }
.who-input { font: inherit; width: 100%; padding: 2px 4px; }
.sync-state { font-size: 11px; color: var(--muted, #6b7280); }
.sync-state::before { content: ''; display: inline-block; width: 6px; height: 6px; border-radius: 50%; margin-right: 5px; background: #2f855a; vertical-align: 1px; }
.sync-state[data-state="offline"]::before { background: #c05621; }
@keyframes growX { from { transform: scaleX(0); } to { transform: scaleX(1); } }

/* Office editor as one dashboard: roles fill the wide column and scroll inside it; details and preferences beside. */
.o-ed .tile-head { gap: 12px; justify-content: flex-start; } .o-ed .dirty-note { margin-left: auto; }
.o-ed-cols { display: grid; grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr); gap: 20px; align-items: start; }
.o-ed-roles, .o-ed-side { max-height: calc(100vh - 330px); overflow-y: auto; scrollbar-width: thin; }
.o-ed-side { padding-left: 20px; border-left: 1px solid var(--rule); }
.o-ed-side .o-edit-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.o-ed .label { margin: 0 0 8px; }
@media (max-width: 900px) { .o-ed-cols { grid-template-columns: 1fr; } .o-ed-side { padding-left: 0; border-left: 0; } }
.role-desc { display: grid; gap: 4px; margin-top: 12px; font-size: 12px; color: var(--ink-2); }
.o-edit textarea { font: inherit; font-size: 13px; padding: 6px; border: 1px solid var(--edge); border-radius: var(--radius); background: var(--surface); color: var(--ink); resize: vertical; }
.role-skills { margin-top: 12px; }
.rk { list-style: none; margin: 0 0 8px; padding: 0; }
.rk li { display: grid; grid-template-columns: 24px minmax(0, 1fr) 170px auto; gap: 10px; align-items: center; padding: 5px 0; border-top: 1px solid var(--rule); font-size: 13px; color: var(--ink); }
.rk .rank { color: var(--ink-3); text-align: right; }
.rk-btns { display: flex; gap: 2px; } .rk-btns button[disabled] { opacity: .35; }

/* Every expander (e.g. "Their words") shows the hand cursor. */
summary { cursor: pointer; }
