/* Business cabinet: company data, Talent Requests and candidate matches. */
.ba-layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px; align-items: start; }
/* The page-level status («Черновик сохранён», «Собираем вакансию…») gets its own line between the title and the columns. */
.business-assets > .assets-status:not(:empty) { margin: -12px 0 16px; }
.ba-positions { display: flex; flex-wrap: wrap; gap: 6px; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.ba-positions > .primary { width: 100%; }
.ba-position { flex: 1 1 200px; display: block; text-align: left; min-height: 0; padding: 12px 14px; border-color: var(--line); font-weight: 400; }
.ba-position strong, .ba-position span { display: block; overflow-wrap: anywhere; }
.ba-position strong { font-size: 15px; font-weight: 600; line-height: 1.3; }
.ba-position span { color: var(--ink-2); font-size: 13px; line-height: 1.4; margin-top: 2px; }
.ba-position[aria-current="true"] { border-color: var(--line-2); box-shadow: var(--shadow-1); }
.ba-editor { min-width: 0; }
.ba-editor-top { margin-bottom: 16px; }
.ba-editor-top .assets-tabs { margin-top: 8px; }
.ba-editor form { display: grid; }
.ba-more { display: grid; margin-top: 12px; }
.ba-more > summary { margin: 4px 0; padding: 12px 16px; border: 1px dashed var(--line-2); border-radius: var(--r); color: var(--ink-2); }
.ba-more[open] > summary { color: var(--ink); }
.ba-more > .assets-panel { margin-top: 12px; }
.ba-editor .assets-panel, .ba-company .assets-panel { display: grid; gap: 14px; }
.ba-editor .assets-panel > p { margin-bottom: 0; }
.ba-experience { border-color: var(--red-tint-2) !important; }
.ba-company { display: grid; gap: 20px; }
.ba-section-heading h2 { margin: 0; }
.ba-chat-actions { margin-top: 16px; }
.ba-chat-actions button { flex: 1 1 auto; }
.ba-preview { margin-top: 20px; background: var(--bg) !important; box-shadow: none !important; scroll-margin-top: 20px; animation: rise var(--t-slow) var(--ease) both; }
.ba-preview > h3 { font-size: 20px; font-weight: 600; letter-spacing: -.012em; margin: 0; }
.ba-public-fields { display: grid; gap: 10px; margin: 0; }
.ba-public-fields > div { border-top: 1px solid var(--line); padding-top: 10px; }
.ba-public-fields dt { font-size: 12px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); }
.ba-public-fields dd { margin: 4px 0 0; white-space: pre-wrap; overflow-wrap: anywhere; }
/* Business save bars hold buttons only: side by side, wrapping when they do not fit. */
.ba-editor .assets-savebar, .ba-company .assets-savebar { display: flex; flex-wrap: wrap; padding: 10px; }
.ba-editor .assets-savebar > button, .ba-company .assets-savebar > button { flex: 1 1 auto; }
.assets-savebar > .ba-inline-status:not([data-kind="error"]) { padding: 0 6px; }
.ba-conversation-source { margin-bottom: 16px; }
.ba-conversation-source > p { margin-top: 12px; }
.ba-source-messages { max-height: 400px; overflow-y: auto; margin: 14px 0; }
.ba-source-turn { padding: 12px 0; border-top: 1px solid var(--line); }
.ba-source-turn strong { font-size: 13px; font-weight: 600; color: var(--ink-2); }
.ba-source-turn p { margin: 4px 0 0; white-space: pre-wrap; overflow-wrap: anywhere; font-size: 15px; }

/* candidates */
.ba-candidates-head { display: grid; gap: 12px; margin-bottom: 16px; }
.ba-candidates-head h2 { margin: 0 0 6px; }
/* The balance line flows as one sentence, so on a phone it wraps as text rather than as a column of fragments. */
.ba-token-note { justify-self: start; display: block; max-width: 100%; padding: 7px 14px; background: var(--bg-raised); border: 1px solid var(--line-2); border-radius: 18px; font-size: 14px; line-height: 1.45; }
.ba-token-note > * + * { margin-left: .3em; }
.ba-token-note svg { vertical-align: -.2em; color: var(--red); }
.ba-token-note b { font-weight: 700; }
.ba-candidate { display: grid; gap: 16px; margin-top: 12px; padding: 20px; background: var(--bg-raised); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-1); }
.ba-cand-head { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 14px; }
.ba-cand-head h3 { margin: 0 0 2px; font-size: 18px; font-weight: 600; letter-spacing: -.01em; line-height: 1.25; }
.ba-cand-head p { margin: 0; color: var(--ink-2); font-size: 14px; }
/* Name, location, match and the White Mirror mark: one wrapping line of their own items with even gaps. */
.ba-cand-head > div { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; min-width: 0; }
.ba-cand-head > div > :is(h3, p) { flex-basis: 100%; }
.ba-cand-head > div > .ba-wm-mark { margin-top: 4px; }
.ba-lock { grid-column: 1 / -1; justify-self: start; display: inline-flex; align-items: center; gap: 8px; min-height: 30px; padding: 0 12px; border: 1px dashed var(--line-2); border-radius: var(--pill); font-size: 13px; color: var(--ink-2); }
.ba-ring { position: relative; width: 56px; height: 56px; }
.ba-ring svg { width: 56px; height: 56px; transform: rotate(-90deg); stroke-width: 4; }
.ba-ring circle:first-child { stroke: var(--line); }
.ba-ring circle:last-child { stroke: var(--ok); animation: ring 1s var(--ease) both; }
.ba-ring b { position: absolute; inset: 0; display: grid; place-items: center; font-size: 13px; letter-spacing: -.02em; font-weight: 600; font-variant-numeric: tabular-nums; }
.ba-ring[data-empty] circle:last-child { display: none; }
.ba-ring[data-empty] b { color: var(--ink-3); font-weight: 400; }
.ba-cand-rows { display: grid; gap: 12px; }
.ba-cand-row { display: grid; gap: 6px; }
.ba-cand-row > span:first-child { font-size: 12px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); }
.ba-cand-row > div { display: flex; flex-wrap: wrap; gap: 6px; }
.ba-cand-row p { margin: 0; line-height: 1.5; }
.ba-match-score { margin: 0; font-size: 14px; color: var(--ink-2); }
.ba-dimensions { border-top: 1px solid var(--line); padding-top: 4px; }
.ba-dimensions > summary { font-size: 15px; }
.ba-match-dimension { display: grid; grid-template-columns: 12px minmax(0, 1fr); gap: 10px; padding: 8px 0; }
.ba-match-dimension::before { content: ''; width: 8px; height: 8px; margin-top: 7px; border-radius: 50%; background: var(--ink-3); }
.ba-match-dimension[data-status="match"]::before { background: var(--ok); }
.ba-match-dimension[data-status="partial"]::before { background: var(--warn); }
.ba-match-dimension[data-status="gap"]::before { background: var(--red); }
.ba-match-dimension[data-status="unknown"]::before { background: transparent; border: 1.5px solid var(--ink-2); }
.ba-match-dimension strong { font-size: 15px; }
.ba-match-dimension p { margin: 2px 0 0; color: var(--ink-2); font-size: 14px; line-height: 1.5; }
.ba-cand-actions { display: grid; gap: 8px; }
.ba-cand-actions .assets-status { font-size: 14px; }
.ba-invite { display: grid; gap: 10px; padding-top: 14px; border-top: 1px solid var(--line); animation: rise var(--t-med) var(--ease) both; }
@media (min-width: 900px) {
  .ba-chat-actions button { flex: 0 1 auto; }
  .ba-editor .assets-savebar > button, .ba-company .assets-savebar > button { flex: 0 0 auto; min-width: 160px; }
  .ba-candidates-head .assets-subtext { max-width: 44em; }
  .ba-cand-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
  .ba-cand-actions .assets-status { flex: 1 1 100%; }
  .ba-invite button { justify-self: start; }
}

/* Company verification: one card at the top of the page, tinted by status. */
.ba-verification { position: relative; display: grid; gap: 8px; }
.ba-verification::before { content: ''; position: absolute; left: -1px; top: 16px; bottom: 16px; width: 3px; border-radius: 2px; background: var(--line-2); }
.ba-verification[data-status="verified"]::before { background: var(--ok); }
.ba-verification[data-status="failed"]::before { background: var(--red); }
.ba-verification[data-status="pending"]::before { background: var(--warn); }
.ba-verification-head { display: flex; align-items: center; gap: 10px; }
.ba-verification-head h2 { margin: 0; }
.ba-verification-head svg { width: 20px; height: 20px; color: var(--ink-3); }
.ba-verification[data-status="verified"] .ba-verification-head svg { color: var(--ok); }
.ba-verification > p { margin: 0; }
.ba-verification-registry { font-size: 14px; }
.ba-verification-missing { font-size: 14px; color: var(--ink-2); }
.ba-verification-missing b { color: var(--ink); font-weight: 600; }
.ba-verification button { justify-self: start; }
/* company industries and the candidate's productivity profile */
.ba-entity { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-bottom: 14px; }
.ba-factions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.ba-faction { display: flex; align-items: center; gap: 10px; min-height: 40px; padding: 0 12px; border: 1px solid var(--line-2); border-radius: var(--r); font-size: 14px; cursor: pointer; }
.ba-faction.is-checked { border-color: var(--red); background: var(--red-tint); }
.ba-excluded { margin: -4px 0 12px; }
.ba-filtered { margin: 4px 0 0; font-size: 13px; color: var(--ink-2); }
.ba-productivity { display: grid; gap: 12px; align-items: start; width: 100%; }
.ba-radar { width: 120px; height: 120px; }
.ba-axes { display: flex; flex-wrap: wrap; gap: 6px; }
@media (min-width: 900px) {
  .ba-factions { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .ba-productivity { grid-template-columns: 120px minmax(0, 1fr); align-items: start; }
}
/* Radar: one line per candidate, earliest member first; the card opens under its line. */
.ba-radar-list { display: grid; gap: 8px; }
.ba-radar-item { display: grid; gap: 8px; }
.ba-radar-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-start; gap: 6px 16px; width: 100%; min-height: 52px; padding: 10px 16px; border: 1px solid var(--line-2); border-radius: var(--r); background: var(--bg-raised); text-align: left; font-size: 15px; color: var(--ink); }
.ba-radar-row:hover { border-color: var(--ink-3); background: var(--bg-raised); }
.ba-radar-row[aria-expanded="true"] { border-color: var(--ink-3); box-shadow: var(--shadow-1); }
.ba-radar-row b { font-weight: 600; font-variant-numeric: tabular-nums; }
.ba-radar-since { font-size: 13px; color: var(--ink-3); }
.ba-radar-state { margin-left: auto; font-size: 13px; color: var(--ink-2); }
/* What a click does — view the card or request it — at the end of the line, as a quiet link with a chevron. */
.ba-radar-action { margin-left: auto; display: inline-flex; align-items: center; gap: 4px; font-size: 14px; font-weight: 500; color: var(--ink); white-space: nowrap; }
.ba-radar-action::after { content: ''; width: 7px; height: 7px; margin-left: 2px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(-45deg); transition: transform var(--t-fast, .15s) var(--ease); }
.ba-radar-row[aria-expanded="true"] .ba-radar-action::after { transform: rotate(45deg); }
.ba-radar-state:not([hidden]) + .ba-radar-action { margin-left: 4px; }
.ba-radar-row:hover .ba-radar-action { text-decoration: underline; text-underline-offset: 3px; }
.ba-wm-mark { display: inline-flex; align-items: center; min-height: 24px; padding: 0 10px; border: 1px solid var(--line-2); border-radius: var(--pill); font-size: 12px; font-weight: 600; color: var(--ink-2); white-space: nowrap; }
/* Request Core Stats: the wished point per axis, with a way back to «не важно». */
.ba-core .pa-trait { display: grid; gap: 4px; }
.ba-core-any { justify-self: center; min-height: 28px; padding: 0 10px; font-size: 13px; color: var(--ink-3); }
.ba-budget { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); }
.ba-budget h3 { margin: 0 0 2px; font-size: 15px; }

/* Radar: the share of the vacancy the avatar covers, as a filling bar. */
.ba-match { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.ba-match b { min-width: 3ch; color: var(--ink); font-weight: 600; }
.ba-match-track { position: relative; width: 120px; height: 6px; overflow: hidden; border-radius: var(--pill); background: var(--bg-2); }
.ba-match-track i { position: absolute; inset: 0 auto 0 0; border-radius: inherit; background: var(--ok); transition: width .9s var(--ease); }
@media (prefers-reduced-motion: reduce) { .ba-match-track i { transition: none; } }

/* The result of a save or publish, shown by the button that was pressed. */
.ba-inline-status { grid-column: 1 / -1; flex-basis: 100%; margin: 0; font-size: 14px; color: var(--ink-2); }
.ba-inline-status[data-kind="ok"] { color: var(--ok); }
.ba-inline-status[data-kind="error"] { padding: 8px 12px; background: var(--red-tint); border-radius: var(--r); color: var(--red-dark); }

/* Round 2 (E2E 14 Oct): job opening status in the list, the publish gate and the public pay range. */
.ba-position-status[data-status="published"] { color: var(--ok); font-weight: 500; }
.ba-publish-reason { flex-basis: 100%; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; margin: 0; padding: 8px 12px; background: var(--bg); border: 1px solid var(--line); border-radius: var(--r); font-size: 14px; color: var(--ink-2); }
.ba-publish-reason[hidden] { display: none; }
.ba-publish-reason button { min-height: 32px; }
.assets-actions > .ba-publish-reason { margin-top: 4px; }
.ba-public-pay { margin-top: 4px; border-top: 0; padding-top: 0; }
/* Token history: a four-digit amount ("+1,000") keeps its own column instead of running into the text. */
.tk-ledger .tk-entry { grid-template-columns: 56px minmax(0, 1fr); }
@media (min-width: 900px) { .tk-ledger .tk-entry { grid-template-columns: 60px minmax(0, 1fr) auto; } }

/* Round 3 (E2E 14 Oct): the publish reason under the sticky bar, not in it; the radar card's sent message. */
.ba-editor form > .ba-publish-reason { margin-top: 10px; }
.ba-locked .ba-cand-head { grid-template-columns: minmax(0, 1fr); }
.ba-locked .ba-lock { grid-column: auto; }
.ba-sent-message { padding: 10px 14px; border-left: 3px solid var(--line-2); background: var(--bg); border-radius: 0 var(--r) var(--r) 0; }
.ba-sent-message[hidden] { display: none; }
.ba-sent-label { display: block; font-size: 12px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); }
.ba-sent-message p { margin: 4px 0 0; white-space: pre-wrap; overflow-wrap: anywhere; }

/* Round 4 (MARKET): the stage of a contact in the tone connection-state.js gives it, as in Messages — never the red of an
   error for a request that waits; the stage and the action keep together at the end of the radar line; the letters
   around the shared card. */
.ba-lock[data-tone="waiting"] { border-style: solid; }
.ba-lock[data-tone="turn"] { border-style: solid; border-color: var(--ink-3); color: var(--ink); font-weight: 600; }
.ba-lock[data-tone="open"] { border-style: solid; border-color: transparent; background: var(--ok-tint); color: var(--ok); }
.ba-lock[data-tone="closed"] { color: var(--ink-3); }
.ba-lock-token { font-weight: 400; color: var(--ink-2); }
.ba-lock-text { min-width: 0; padding: 5px 0; line-height: 1.35; }
.ba-lock svg { flex: none; }
.ba-radar-end { margin-left: auto; display: inline-flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 4px 12px; min-width: 0; }
.ba-radar-end > .ba-radar-state, .ba-radar-end > .ba-radar-action, .ba-radar-state:not([hidden]) + .ba-radar-action { margin-left: 0; }
.ba-radar-state[data-tone="turn"] { color: var(--ink); font-weight: 600; }
.ba-radar-state[data-tone="open"] { color: var(--ok); }
.ba-radar-state[data-tone="closed"] { color: var(--ink-3); }
.ba-candidate > .ba-sent-message + .ba-sent-message { margin-top: -8px; }

/* Round 4 (BUSINESS): a Core Stats scale says "not important" only while no dot is set — then it is a quiet state, not a
   control — and offers "Clear" once one is; "Check again" on the company status is a real button. */
.ba-core-any[data-set="false"] { pointer-events: none; color: var(--ink-3); }
.ba-core-any[data-set="true"] { color: var(--ink-2); text-decoration: underline; text-underline-offset: 3px; }
.ba-verification .ba-recheck { min-height: 40px; padding: 0 16px; }
/* Details the concierge's conversation filled in (25.10): said on the company card before the list of what is still missing. */
.ba-verification-prefilled { margin: 0; padding: 10px 12px; border-radius: var(--r); background: var(--red-tint-2, var(--bg-raised)); color: var(--ink); font-size: 14px; line-height: 1.45; }

/* ---------- content-width pass, 15 October ---------- */
/* The opportunity list stands beside the form only when the content column can hold both (surface container, assets.css):
   at 1024px the list took 240px of 700 and left the form 430px. Stacked, the list is one row of cards scrolled sideways,
   so the form and the radar start right under it instead of below a pile of full-width cards. */
.ba-positions { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: thin; }
.ba-position { flex: 0 0 min(70%, 260px); }
@container surface (min-width: 900px) {
  .ba-layout { grid-template-columns: 240px minmax(0, 1fr); gap: 32px; }
  .ba-positions { display: grid; gap: 6px; position: sticky; top: 0; padding-bottom: 0; border-bottom: 0; overflow: visible; }
  .ba-position { border-color: transparent; background: transparent; }
  .ba-position[aria-current="true"] { border-color: var(--line-2); background: var(--bg-raised); }
}
/* A card's head puts the status beside the name only when the card is wide; the name keeps at least 10rem, so it never
   breaks a letter per line next to a long status ("Card shared — your turn to reply · Token reserved"). */
.ba-candidate { container: cand / inline-size; }
@container cand (min-width: 600px) {
  .ba-cand-head { grid-template-columns: auto minmax(10rem, 1fr) minmax(0, auto); }
  .ba-lock { grid-column: auto; align-self: start; min-width: 0; }
  .ba-locked .ba-cand-head { grid-template-columns: minmax(0, 1fr); }
  .ba-locked .ba-lock { grid-column: auto; }
}
/* Card rows: the label column beside the values only where the rows have room (company card, the candidate's preview). */
.ba-cand-rows { container: cand-rows / inline-size; }
@container cand-rows (min-width: 520px) {
  .ba-cand-row { grid-template-columns: 150px minmax(0, 1fr); align-items: start; gap: 16px; }
  .ba-cand-row > span:first-child { padding-top: 7px; }
  .ba-cand-row.is-wide { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .ba-cand-row.is-wide > span:first-child { padding-top: 0; }
}
/* Industries on a narrow phone: a long name wraps inside its box instead of running over the border. */
.ba-faction > span { min-width: 0; overflow-wrap: break-word; hyphens: auto; }
@media (max-width: 399px) { .ba-faction { gap: 6px; padding: 0 8px; font-size: 13px; } }
/* The company bar on a phone: the save button flexes, «Discard changes» keeps its own width beside it — one row, not two. */
@media (max-width: 559px) {
  .ba-company .assets-savebar { flex-wrap: nowrap; }
  .ba-company .assets-savebar > .quiet { flex: none; padding: 0 10px; font-size: 14px; }
}
/* Pay: the hint above the fields gets air; on a phone the intro is not larger than its heading. */
.ba-budget > .assets-form-grid { margin-top: 12px; }
.ba-budget .assets-subtext { font-size: 14px; }
.ba-editor > .ba-section-heading { margin-bottom: 16px; }
/* "Company details" under the bar is a link-like action, not bold plain text. */
.ba-publish-reason button { padding: 0 4px; text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--line-3); }

/* The build of a draft from the conversation: the form's blocks, each waiting, being filled in or filled in, the check
   at the end and the time — where the form will be. The state sits on the list item itself, so no parent selector is needed. */
.ba-build { display: grid; gap: 14px; }
.ba-build-blocks { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.ba-build-blocks li { display: grid; grid-template-columns: minmax(20px, auto) minmax(0, 1fr) auto; align-items: center; gap: 10px; min-height: 28px; font-size: 15px; color: var(--ink-3); }
.ba-build-blocks li small { font-size: 13px; color: var(--ink-3); }
.ba-build-blocks li[data-state="writing"] { color: var(--ink); }
.ba-build-blocks li[data-state="done"] { color: var(--ink); }
.ba-build-blocks li[data-state="done"] small { color: var(--ok); }
.ba-build-mark { display: inline-flex; align-items: center; justify-content: center; min-width: 20px; height: 20px; }
.ba-build-mark svg { width: 16px; height: 16px; color: var(--ok); }
.ba-build-mark .typing { height: 20px; color: var(--ink-2); }
.ba-build-blocks li[data-state="waiting"] .ba-build-mark::before { content: ''; width: 8px; height: 8px; border-radius: 50%; border: 1.5px solid var(--line-3); box-sizing: border-box; }
.ba-build-phase { margin: 0; font-size: 14px; color: var(--ink-2); }
.ba-build-phase:empty { display: none; }
.ba-build-time { margin: 0; font-variant-numeric: tabular-nums; }

/* ---------- several opportunities per company, 25 October ---------- */
/* «Open another opportunity» stands with the opportunities themselves — under the cards of the list and in the company
   section — so a business finds the way where it looks for it, not only in the left navigation (owner, 24.10). */
.ba-position-new { border-style: dashed; color: var(--ink-2); font-weight: 500; }
.ba-position-new:hover, .ba-position-new:focus-visible { color: var(--ink); border-color: var(--line-2); }
.ba-company-opportunities .ba-positions { padding-bottom: 0; border-bottom: 0; flex-wrap: wrap; overflow: visible; }
.ba-company-opportunities .ba-position { flex: 1 1 200px; }
@container surface (min-width: 900px) {
  .ba-company-opportunities .ba-positions { display: flex; position: static; }
  .ba-company-opportunities .ba-position { border-color: var(--line); background: var(--bg-raised); }
  .ba-company-opportunities .ba-position-new { border-style: dashed; }
}
