/* Paragon Desk: recruitment, onboarding, agents, Academy, two-step sign-in and firm settings (PLATFORM-SPEC.md §4).
   Builds on desk.css (tokens, buttons, fields, cards, chips); mobile first, 44 px targets. */

/* ---------- Chips ---------- */
.chip-amber { border-color: var(--warn-line); background: var(--warn-tint); color: var(--warn); }
.chip-quiet { background: #fff; color: var(--muted); }
.chip .ic-chip { width: 14px; height: 14px; margin-right: 4px; stroke-width: 2; }
.rc-wrap { overflow-wrap: anywhere; word-break: break-word; }

/* ---------- Lists (Recruit, Agents) ---------- */
.rc-list { display: grid; gap: 10px; margin: 0 0 16px; padding: 0; list-style: none; }
.rc-item { position: relative; padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--r-card); background: var(--card); overflow-wrap: anywhere; }
.rc-item:hover { border-color: var(--line-strong); }
.rc-item.is-waiting-long { box-shadow: inset 3px 0 0 var(--warn); }
.rc-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.rc-name { min-width: 0; color: var(--ink); font-family: var(--serif); font-size: 19px; line-height: 1.25; text-decoration: none; }
.rc-name:hover { color: var(--ink); text-decoration: underline; }
.rc-age { position: relative; z-index: 1; flex: 0 0 auto; }
.rc-tags { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin: 8px 0 0; }
.rc-meta { margin: 6px 0 0; color: var(--muted); font-size: 14px; }
.rc-meta .mono { color: var(--muted); }
.rc-when { color: var(--ink); font-weight: 500; }
.rc-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0 0; }
.rc-chips .chip, .lead-tags .chip { height: auto; min-height: 24px; padding: 2px 9px; white-space: normal; line-height: 1.25; }
@media (min-width: 900px) {
  .rc-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ---------- Application and agent pages ---------- */
.rc-grid .lead-col { min-width: 0; }
.page-application .rc-next, .page-agent .rc-next { order: 0; }
.rc-next > p { margin: 0 0 12px; }
.rc-next form { margin: 0 0 10px; }
.rc-once { margin: 0 0 14px; padding: 12px 14px; border: 1px solid #C6D8CD; border-radius: 10px; background: var(--canopy-tint); }
.rc-once p { margin: 0 0 10px; }
.rc-when-big { margin: 0 0 12px; line-height: 1.45; }
.rc-action { margin: 10px 0 0; border-top: 1px solid var(--line); }
.rc-action > summary {
  display: flex; align-items: center; min-height: var(--tap); color: var(--jac-deep); font-weight: 600; cursor: pointer; list-style: none;
}
.rc-action > summary::-webkit-details-marker { display: none; }
.rc-action > summary::after {
  content: ""; width: 7px; height: 7px; margin: -3px 4px 0 auto; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg);
}
.rc-action[open] > summary::after { margin-top: 3px; transform: rotate(-135deg); }
.rc-action > form, .rc-action > div { padding: 4px 0 12px; }
.rc-blockers, .rc-warnings { margin: 6px 0 12px; padding: 12px 14px; border-radius: 10px; font-size: 15px; }
.rc-blockers { border: 1px solid var(--warn-line); background: var(--warn-tint); color: #6B3F00; }
.rc-warnings { background: var(--paper); color: var(--muted); }
.rc-blockers p { margin: 0 0 6px; }
.rc-blockers ul, .rc-warnings ul { margin: 0; padding-left: 18px; }
.rc-plan { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 12px; }
.rc-plan .field { margin-bottom: 10px; min-width: 0; }
.rc-plan label { font-size: 13.5px; }
.rc-h3 { margin: 18px 0 8px; font-family: var(--sans); font-size: 16px; font-weight: 600; }
.rc-secret { border: 1px dashed var(--line-strong); }
.rc-files, .rc-docs, .ac-cpd, .ac-logs, .rc-np-list, .rc-bk-list, .rc-mfa-list { margin: 0; padding: 0; list-style: none; }
.rc-files li, .rc-docs li, .ac-cpd li, .ac-logs li, .rc-np-list li { padding: 12px 0; border-top: 1px solid var(--line); overflow-wrap: anywhere; }
.rc-files li:first-child, .rc-docs li:first-child, .ac-cpd li:first-child, .ac-logs li:first-child, .rc-np-list li:first-child { border-top: 0; padding-top: 0; }
.rc-files a { display: inline-flex; align-items: center; min-height: var(--tap); font-weight: 600; }
.rc-files .small { display: block; }
.rc-docs li.is-old { opacity: .72; }
.rc-doc-head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.rc-docs .btn-row { margin-top: 8px; }
.rc-docs p { margin: 4px 0 0; }

/* The screening checklist */
.rc-screen { display: grid; gap: 4px; }
.rc-item-set { margin: 0 0 6px; padding: 14px 0 6px; border-top: 1px solid var(--line); }
.rc-item-set:first-of-type { border-top: 0; padding-top: 0; }
.rc-item-set > legend { display: flex; align-items: center; gap: 6px; margin: 0 0 8px; padding: 0; font-size: 16px; }
.rc-item-set > legend + .hint { margin: -4px 0 10px; }
.rc-item-set .field { margin-bottom: 10px; }
.rc-item-set.has-error > legend { color: var(--bad); }
.ic-ok { width: 18px; height: 18px; color: var(--ok); stroke-width: 2.2; }
.by { margin: 0 0 6px; color: var(--muted); font-family: var(--mono); font-size: 12.5px; }
.rc-crit { margin: 0 0 12px; }
.rc-crit-label { margin: 0 0 6px; }
.rc-crit-label b { display: block; font-weight: 600; }
.rc-crit-label .hint { display: block; margin: 2px 0 0; }
.score-opts { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; max-width: 360px; }
.score-opt { position: relative; margin: 0; }
.score-opt input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.score-opt span {
  display: flex; align-items: center; justify-content: center; min-height: var(--tap); border: 1px solid var(--line-strong); border-radius: 8px;
  background: #fff; color: var(--muted); font: 600 16px/1 var(--sans);
}
.score-opt input:checked + span { border-color: var(--canopy); background: var(--canopy); color: #fff; }
.score-opt input:focus-visible + span { outline: 2px solid var(--jac); outline-offset: 2px; }

/* ---------- Onboarding ---------- */
.ob-steps { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; margin: 0 0 16px; padding: 0; list-style: none; }
.ob-steps a {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; min-height: 60px; padding: 6px 2px;
  border: 1px solid var(--line); border-radius: 10px; background: var(--card); color: var(--muted); font-size: 12.5px; font-weight: 600;
  line-height: 1.15; text-align: center; text-decoration: none;
}
.ob-n { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--wash); color: var(--ink); font-size: 13px; }
.ob-n .ic { width: 15px; height: 15px; stroke-width: 2.4; }
.ob-steps li.done a { border-color: #C6D8CD; color: var(--canopy); }
.ob-steps li.done .ob-n { background: var(--canopy-tint); color: var(--canopy); }
.ob-steps li.current a { border-color: var(--canopy); box-shadow: 0 0 0 1px var(--canopy); color: var(--ink); }
.ob-steps li.current .ob-n { background: var(--canopy); color: #fff; }
.ob-card { max-width: 820px; }
.ob-card .form { max-width: 640px; }
.ob-doc { padding: 12px 0 0; border-top: 1px solid var(--line); }
.ob-doc .hint { margin: -2px 0 8px; }
.ob-doc-status { margin: 0 0 8px; overflow-wrap: anywhere; }
input[type="file"] {
  display: block; width: 100%; max-width: 100%; min-height: var(--tap); padding: 8px; border: 1px dashed var(--line-strong); border-radius: var(--r-ctl);
  background: var(--paper); font: 400 15px/1.4 var(--sans);
}
.ob-agreement { margin: 8px 0 16px; padding: 18px 16px; }
.ob-sign { padding-top: 14px; border-top: 2px solid var(--canopy); }
.ob-review, .ob-mini { margin: 0 0 14px; padding: 0; list-style: none; }
.ob-review li, .ob-mini li { position: relative; padding: 6px 0 6px 28px; }
.ob-review li::before, .ob-mini li::before {
  content: ""; position: absolute; left: 0; top: 9px; width: 16px; height: 16px; border: 2px solid var(--line-strong); border-radius: 50%;
}
.ob-review li.done::before, .ob-mini li.done::before { border-color: var(--ok); background: var(--ok); box-shadow: inset 0 0 0 3px #fff; }
.ob-review a { display: inline-flex; align-items: center; min-height: 32px; font-weight: 600; }

/* ---------- The agreement (onboarding step 4 and agreement.php) ---------- */
.agreement { font-size: 15px; line-height: 1.6; overflow-wrap: anywhere; }
.agreement h1 { margin: 0 0 8px; font-size: 26px; color: var(--canopy); }
.agreement h2 { margin: 22px 0 8px; font-size: 19px; color: var(--canopy); }
.agreement ul, .agreement ol { padding-left: 20px; }
.agreement-summary { margin: 14px 0; padding: 12px 14px; border-left: 3px solid var(--jac); border-radius: 0 10px 10px 0; background: var(--jac-tint); }
.agreement-summary p { margin: 0; }
.agreement table, .doc-body .agreement table { display: table; width: 100%; table-layout: fixed; border-collapse: collapse; margin: 8px 0 16px; }
.agreement th, .agreement td { padding: 7px 6px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; overflow-wrap: anywhere; }
.agreement th { color: var(--muted); font-size: 12.5px; font-weight: 600; }
.sig-record { margin: 24px 0 0; padding: 16px; border: 2px solid var(--canopy); border-radius: 10px; break-inside: avoid; }
.sig-record h2 { margin: 0 0 8px; }
.sig-status { display: flex; align-items: center; gap: 8px; margin: 0 0 10px; font-weight: 600; }
.sig-status.is-ok { color: var(--ok); }
.sig-status.is-bad { color: var(--bad); }
.sig-status .ic { width: 20px; height: 20px; }
.sig-hash { font-size: 12.5px; word-break: break-all; }

/* ---------- Agents ---------- */
.rc-noprofile { margin-top: 20px; max-width: 820px; }
.rc-np-list li { display: grid; gap: 8px; }
.rc-np-list p { margin: 0; }
.rc-inline-form { display: flex; flex-wrap: wrap; gap: 8px; }
.rc-inline-form select { flex: 1 1 200px; width: auto; min-width: 0; }

/* ---------- Academy ---------- */
.page-academy .card { margin: 0 0 16px; }
.ac-week { border-top: 1px solid var(--line); }
.ac-week > summary { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; min-height: var(--tap); padding: 6px 0; font-weight: 600; cursor: pointer; }
.ac-wk { font-family: var(--mono); font-size: 13px; color: var(--muted); font-weight: 500; }
.ac-week .checks { margin-top: 0; }
.ac-week .check span { font-weight: 400; }
.ac-path .btn-block { margin-top: 14px; }
.ac-links { margin: 0; padding: 0 0 0 18px; }
.ac-links li { margin: 0 0 6px; }
.ac-links a { display: inline-flex; align-items: center; min-height: 32px; font-weight: 600; }
.ac-cpd p, .ac-logs p { margin: 0 0 4px; }
.ac-sign-form { margin-top: 10px; }
.kpi-line { margin: 0 0 12px; font-size: 17px; }
.ac-table .num { white-space: nowrap; }
.page-academy .meter { margin: 0 0 14px; }

/* ---------- Two-step sign-in ---------- */
.rc-qr { width: 212px; max-width: 100%; margin: 4px 0 10px; }
.rc-qr.is-drawn { padding: 6px; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.rc-qr svg { display: block; width: 100%; height: auto; }
.rc-secret-line { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin: 0 0 14px; }
.rc-secret-line code { padding: 6px 10px; border: 1px dashed var(--line-strong); border-radius: 8px; background: var(--paper); font-size: 15px; letter-spacing: .04em; }
.rc-code-input { max-width: 240px; font-size: 20px; letter-spacing: .12em; }
.rc-cancel { margin: 10px 0 0; }
.rc-steps { margin: 0 0 12px; padding-left: 20px; }
.rc-steps li { margin: 0 0 8px; }
.rc-steps .setup-line { margin-top: 6px; }
.rc-steps code { display: block; flex: 1 1 auto; min-width: 0; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--paper);
  font-family: var(--mono); font-size: 13px; overflow-wrap: anywhere; word-break: break-all; }
.rc-codes { margin: 0 0 14px; padding: 12px 14px; border: 1px solid var(--canopy); border-radius: 10px; }
.rc-code-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 16px; margin: 8px 0 10px; padding-left: 22px; font-size: 16px; }
.rc-twostep .form-narrow { max-width: 420px; }

/* ---------- Settings: firm and security ---------- */
.rc-mfa-list li { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; padding: 4px 0; }
.rc-backups { max-width: 820px; margin: 0 0 20px; }
.rc-backups .btn-row { margin: 8px 0 12px; }
.rc-bk-list li { padding: 4px 0; overflow-wrap: anywhere; }

@media print {
  .rc-action, .ob-steps, .ob-sign, .crumbs { display: none !important; }
  .ob-agreement { border: 0; padding: 0; }
}
