/* TalentPool360 HR: one stylesheet for every page. Brand colours from the official logo (assets/brand/talentpool360-logo.png):
   primary #BE4710 (the logo's orange), accent #1D5C7A (a deep blue, its complement), ink #17212B, paper #F5F3EE; light and dark. */

:root {
  --primary: #BE4710;
  --primary-hover: #A13A0B;
  --primary-ink: #FFFFFF;
  --primary-soft: #FBE9DE;
  --accent: #1D5C7A;
  --accent-soft: #E0EDF3;
  --ink: #17212B;
  --paper: #F5F3EE;
  --surface: #FFFFFF;
  --surface-2: #FAF8F4;
  --line: #E1DDD3;
  --line-strong: #CBC5B8;
  --muted: #5B6670;
  --ok: #23714A;
  --ok-soft: #DFF1E6;
  --warn: #8A5D00;
  --warn-soft: #FBEFD3;
  --bad: #A8231B;
  --bad-soft: #FBE3E0;
  --info: #285894;
  --info-soft: #E2EBF7;
  --grey: #56606A;
  --grey-soft: #ECE9E3;
  --focus: #BE4710;
  --shadow: 0 1px 2px rgba(23, 33, 43, .06), 0 4px 16px rgba(23, 33, 43, .06);
  --radius: 10px;
  --radius-sm: 6px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --primary: #F07C42;
    --primary-hover: #F5955F;
    --primary-ink: #1F0D03;
    --primary-soft: #3A2116;
    --accent: #73B6D6;
    --accent-soft: #15303D;
    --ink: #E6E4DF;
    --paper: #10151A;
    --surface: #182027;
    --surface-2: #1C252D;
    --line: #2B3640;
    --line-strong: #3A4752;
    --muted: #9BA6B0;
    --ok: #6CC891;
    --ok-soft: #173325;
    --warn: #E6BA5E;
    --warn-soft: #382D12;
    --bad: #F2897F;
    --bad-soft: #3D1C1A;
    --info: #8AB1EA;
    --info-soft: #1B2A3F;
    --grey: #A6B0B9;
    --grey-soft: #242E37;
    --focus: #F07C42;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 4px 16px rgba(0, 0, 0, .25);
    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--paper); color: var(--ink); font: 15px/1.5 var(--font);
  min-height: 100vh; overflow-x: hidden;
}
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { line-height: 1.25; margin: 0 0 .5em; font-weight: 650; }
h1 { font-size: 1.55rem; }
h2 { font-size: 1.2rem; }
h3 { font-size: 1.02rem; }
h4 { font-size: .95rem; }
p { margin: 0 0 .75em; }
small, .small { font-size: .85em; }
code, pre, .mono { font-family: var(--mono); font-size: .88em; }
pre { white-space: pre-wrap; word-break: break-word; background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 10px 12px; margin: 0; max-height: 60vh; overflow: auto; }
hr { border: 0; border-top: 1px solid var(--line); margin: 16px 0; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
[hidden] { display: none !important; }

/* ---------- top bar ---------- */
.topbar { background: var(--surface); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 30; }
.topbar-inner { max-width: 1280px; margin: 0 auto; padding: 0 16px; display: flex; align-items: center; gap: 16px; min-height: 58px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); font-weight: 650; white-space: nowrap; }
.brand:hover { text-decoration: none; }
.brand img { height: 40px; width: 40px; display: block; }
/* The logo is drawn in thin #BE4710 lines: on the dark theme it is brightened to keep its contrast. */
@media (prefers-color-scheme: dark) {
  .brand img, .public-head img, .signin .logo { filter: brightness(1.55) saturate(1.1); }
}
.brand .brand-name { color: var(--primary); font-weight: 700; letter-spacing: .02em; }
.brand .brand-sub { color: var(--muted); font-weight: 500; font-size: .85rem; }
.nav { display: flex; gap: 2px; flex-wrap: wrap; flex: 1; }
.nav a { color: var(--muted); padding: 7px 11px; border-radius: var(--radius-sm); font-weight: 550; font-size: .93rem; }
.nav a:hover { background: var(--grey-soft); color: var(--ink); text-decoration: none; }
.nav a.active { background: var(--primary-soft); color: var(--primary); }
.usermenu { display: flex; align-items: center; gap: 8px; font-size: .9rem; color: var(--muted); white-space: nowrap; }
.usermenu a, .usermenu button { color: var(--muted); }
.btn.nav-toggle { display: none; margin-left: auto; }
@media (max-width: 900px) {
  .topbar-inner { flex-wrap: wrap; gap: 8px; padding: 8px 16px; }
  .btn.nav-toggle { display: inline-flex; }
  .nav, .usermenu { display: none; width: 100%; }
  .topbar.open .nav { display: flex; flex-direction: column; }
  .topbar.open .usermenu { display: flex; padding: 8px 0 4px; border-top: 1px solid var(--line); flex-wrap: wrap; }
}

/* ---------- layout ---------- */
.container { max-width: 1280px; margin: 0 auto; padding: 24px 16px 64px; }
.narrow { max-width: 760px; }
.page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.page-head h1 { margin: 0; }
.page-head .sub { color: var(--muted); margin-top: 4px; }
.stack > * + * { margin-top: 16px; }
.stack-sm > * + * { margin-top: 8px; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.row.end { justify-content: flex-end; }
.row.top { align-items: flex-start; }
.grow { flex: 1; min-width: 0; }
.grid { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid-auto { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
@media (max-width: 900px) { .grid-3, .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: minmax(0, 1fr); } }
.grid-main { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }
@media (max-width: 900px) { .grid-main { grid-template-columns: minmax(0, 1fr); } }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.split { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 16px; }
@media (max-width: 800px) { .split { grid-template-columns: minmax(0, 1fr); } }
.muted { color: var(--muted); }
.right { text-align: right; }
.center { text-align: center; }
.nowrap { white-space: nowrap; }
.wrap-any { overflow-wrap: anywhere; }
.mt { margin-top: 16px; }
.mb { margin-bottom: 16px; }
.mt-sm { margin-top: 8px; }
.mb-xs { margin-bottom: 4px; }

/* The Zadarma backup line (assets/backup-dialer.js): Zadarma's own widget is hidden while this page does not hold the line. */
body.tp-dialer-hidden .zdrm-phone, body.tp-dialer-hidden [class*="zdrm-webphone"], body.tp-dialer-hidden [id^="zdrm"] { display: none !important; }

/* ---------- cards ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); min-width: 0; }
.card.flat { box-shadow: none; }
.card.pad-sm { padding: 12px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.card-head h2, .card-head h3 { margin: 0; }
.card.accent-left { border-left: 4px solid var(--accent); }
.card.primary-left { border-left: 4px solid var(--primary); }
.section-title { display: flex; align-items: center; gap: 8px; }
.count { display: inline-flex; align-items: center; justify-content: center; min-width: 22px; height: 22px; padding: 0 7px; border-radius: 11px;
  background: var(--grey-soft); color: var(--ink); font-size: .78rem; font-weight: 650; }
.count.hot { background: var(--accent); color: #fff; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; min-width: 0; }
.stat .label { color: var(--muted); font-size: .82rem; font-weight: 550; text-transform: uppercase; letter-spacing: .03em; }
.stat .value { font-size: 1.6rem; font-weight: 650; line-height: 1.2; margin-top: 4px; }
.stat .hint { color: var(--muted); font-size: .85rem; }
.empty { color: var(--muted); padding: 14px 0; }
.list { list-style: none; margin: 0; padding: 0; }
.list > li { padding: 10px 0; border-bottom: 1px solid var(--line); }
.list > li:last-child { border-bottom: 0; }
.kv { display: grid; grid-template-columns: minmax(120px, max-content) minmax(0, 1fr); gap: 6px 16px; margin: 0; }
.kv dt { color: var(--muted); font-size: .9rem; }
.kv dd { margin: 0; overflow-wrap: anywhere; }
.notice { border-radius: var(--radius-sm); padding: 10px 14px; background: var(--info-soft); color: var(--info); border: 1px solid transparent; }
.notice.warn { background: var(--warn-soft); color: var(--warn); }
.notice.bad { background: var(--bad-soft); color: var(--bad); }
.notice.ok { background: var(--ok-soft); color: var(--ok); }
.notice ul { margin: 6px 0 0; padding-left: 20px; }
.quote { border-left: 3px solid var(--line-strong); padding: 2px 0 2px 10px; color: var(--muted); font-style: italic; margin: 4px 0 0; overflow-wrap: anywhere; }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 1px solid var(--line-strong); background: var(--surface);
  color: var(--ink); border-radius: var(--radius-sm); padding: 7px 14px; font: inherit; font-weight: 550; font-size: .92rem; cursor: pointer;
  line-height: 1.3; text-decoration: none; white-space: nowrap; }
.btn:hover { background: var(--grey-soft); text-decoration: none; }
.btn:disabled, .btn[aria-disabled="true"] { opacity: .5; cursor: not-allowed; }
.btn.primary { background: var(--primary); border-color: var(--primary); color: var(--primary-ink); }
.btn.primary:hover { background: var(--primary-hover); border-color: var(--primary-hover); }
.btn.accent { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.danger { color: var(--bad); border-color: var(--bad); background: transparent; }
.btn.danger:hover { background: var(--bad-soft); }
.btn.danger.solid { background: var(--bad); color: #fff; }
.btn.ghost { border-color: transparent; background: transparent; color: var(--primary); }
.btn.ghost:hover { background: var(--primary-soft); }
.btn.sm { padding: 4px 10px; font-size: .85rem; }
.btn.lg { padding: 11px 20px; font-size: 1rem; }
.btn.block { width: 100%; }
.btn.on { background: var(--primary-soft); border-color: var(--primary); color: var(--primary); }
.btn-group { display: inline-flex; flex-wrap: wrap; }
.btn-group .btn { border-radius: 0; margin-left: -1px; }
.btn-group .btn:first-child { border-radius: var(--radius-sm) 0 0 var(--radius-sm); margin-left: 0; }
.btn-group .btn:last-child { border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }
.linkbtn { background: none; border: 0; padding: 0; color: var(--primary); font: inherit; cursor: pointer; }
.linkbtn:hover { text-decoration: underline; }

/* ---------- badges and chips ---------- */
.badge { display: inline-flex; align-items: center; gap: 4px; padding: 2px 9px; border-radius: 999px; font-size: .78rem; font-weight: 600;
  background: var(--grey-soft); color: var(--grey); white-space: nowrap; line-height: 1.6; }
.card-head .badge, .kv .badge, .notice .badge, .row .badge { white-space: normal; max-width: 100%; }
.badge.ok, .badge.band-selection_ready, .badge.gate-pass, .badge.status-hired, .badge.stage-hired { background: var(--ok-soft); color: var(--ok); }
.badge.warn, .badge.band-client_bench, .badge.gate-flagged, .badge.status-on_hold, .badge.status-benched_client { background: var(--warn-soft); color: var(--warn); }
.badge.bad, .badge.band-below_threshold, .badge.gate-fail, .badge.status-rejected, .badge.status-deferred { background: var(--bad-soft); color: var(--bad); }
.badge.grey, .badge.band-incomplete, .badge.gate-unknown, .badge.status-withdrawn, .badge.status-benched_incomplete { background: var(--grey-soft); color: var(--grey); }
.badge.info, .badge.status-referred_out { background: var(--info-soft); color: var(--info); }
.badge.status-active, .badge.stage { background: var(--primary-soft); color: var(--primary); }
.badge.accent, .badge.test { background: var(--accent-soft); color: var(--accent); }
.badge.outline { background: transparent; border: 1px solid var(--line-strong); color: var(--muted); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 11px; border-radius: 999px; border: 1px solid var(--line-strong);
  background: var(--surface); color: var(--ink); font: inherit; font-size: .85rem; cursor: pointer; white-space: nowrap; }
.chip:hover { background: var(--grey-soft); }
.chip.on { background: var(--primary); border-color: var(--primary); color: var(--primary-ink); }
.chip .n { font-weight: 650; }
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; background: var(--grey); flex: none; }
.dot.ok { background: var(--ok); } .dot.warn { background: var(--warn); } .dot.bad { background: var(--bad); } .dot.live { background: var(--bad); animation: pulse 1.2s infinite; }
@keyframes pulse { 50% { opacity: .35; } }

/* ---------- tables ---------- */
.table-wrap { width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); }
table { width: 100%; border-collapse: collapse; font-size: .9rem; }
th, td { padding: 9px 12px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
th { background: var(--surface-2); color: var(--muted); font-weight: 600; font-size: .8rem; text-transform: uppercase; letter-spacing: .03em; white-space: nowrap; position: sticky; top: 0; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover td { background: var(--surface-2); }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
tr.dim td { opacity: .6; }
tr.hl td { background: var(--warn-soft); }
.table-wrap.tall { max-height: 70vh; overflow: auto; }

/* ---------- forms ---------- */
.field { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.field > label, .label { font-weight: 600; font-size: .86rem; color: var(--ink); }
.field .help { color: var(--muted); font-size: .82rem; }
.field .req { color: var(--bad); }
input[type="text"], input[type="email"], input[type="url"], input[type="password"], input[type="number"], input[type="search"], input[type="tel"],
input[type="date"], input[type="datetime-local"], input[type="time"], select, textarea {
  width: 100%; font: inherit; font-size: .93rem; color: var(--ink); background: var(--surface); border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm); padding: 8px 10px; min-width: 0;
}
textarea { min-height: 90px; resize: vertical; line-height: 1.45; }
textarea.code { font-family: var(--mono); font-size: .84rem; min-height: 320px; white-space: pre; overflow-wrap: normal; overflow-x: auto; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--focus); outline-offset: -1px; border-color: var(--focus); }
input[type="checkbox"], input[type="radio"] { accent-color: var(--primary); width: 16px; height: 16px; margin: 0; flex: none; }
input[type="file"] { font: inherit; font-size: .9rem; max-width: 100%; }
.check { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; font-size: .92rem; }
.checks { display: flex; flex-wrap: wrap; gap: 8px 18px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 16px; }
.form-grid .full { grid-column: 1 / -1; }
@media (max-width: 640px) { .form-grid { grid-template-columns: minmax(0, 1fr); } }
.filters { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; }
.filters .field { min-width: 150px; flex: 1 1 150px; }
.filters .field.wide { flex: 2 1 220px; }
.form-error { color: var(--bad); font-size: .9rem; }
.invalid { border-color: var(--bad) !important; outline-color: var(--bad) !important; }
.seg { display: inline-flex; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); overflow: hidden; }
.seg button { border: 0; background: var(--surface); color: var(--ink); font: inherit; font-size: .88rem; padding: 6px 12px; cursor: pointer; border-left: 1px solid var(--line-strong); }
.seg button:first-child { border-left: 0; }
.seg button.on { background: var(--primary); color: var(--primary-ink); }
.seg button:disabled { opacity: .5; cursor: not-allowed; }

/* ---------- tabs ---------- */
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); margin-bottom: 16px; overflow-x: auto; scrollbar-width: thin; }
.tabs button { border: 0; background: none; font: inherit; font-weight: 550; font-size: .93rem; color: var(--muted); padding: 10px 14px; cursor: pointer;
  border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.tabs button:hover { color: var(--ink); }
.tabs button[aria-selected="true"] { color: var(--primary); border-bottom-color: var(--primary); }
.side-tabs { display: flex; flex-direction: column; gap: 2px; }
.side-tabs button { text-align: left; border: 0; background: none; font: inherit; font-size: .9rem; padding: 7px 10px; border-radius: var(--radius-sm); color: var(--ink); cursor: pointer; }
.side-tabs button:hover { background: var(--grey-soft); }
.side-tabs button.on { background: var(--primary-soft); color: var(--primary); font-weight: 600; }

/* ---------- modal ---------- */
dialog.modal { border: 0; padding: 0; border-radius: var(--radius); background: var(--surface); color: var(--ink); width: min(620px, calc(100vw - 32px));
  max-height: calc(100vh - 48px); box-shadow: 0 20px 60px rgba(0, 0, 0, .3); display: flex; flex-direction: column; }
dialog.modal:not([open]) { display: none; }
dialog.modal.wide { width: min(960px, calc(100vw - 32px)); }
dialog.modal::backdrop { background: rgba(16, 21, 26, .55); }
.modal-head { padding: 16px 20px 10px; display: flex; align-items: center; justify-content: space-between; gap: 10px; border-bottom: 1px solid var(--line); }
.modal-head h2 { margin: 0; font-size: 1.1rem; }
.modal-body { padding: 16px 20px; overflow: auto; flex: 1; }
.modal-foot { padding: 12px 20px 16px; display: flex; justify-content: flex-end; gap: 8px; flex-wrap: wrap; border-top: 1px solid var(--line); }
.xbtn { border: 0; background: none; font-size: 1.4rem; line-height: 1; color: var(--muted); cursor: pointer; padding: 2px 6px; border-radius: 4px; }
.xbtn:hover { background: var(--grey-soft); }

/* ---------- toasts ---------- */
.toasts { position: fixed; right: 16px; bottom: 16px; display: flex; flex-direction: column; gap: 8px; z-index: 100; max-width: calc(100vw - 32px); }
.toast { background: var(--ink); color: var(--paper); padding: 10px 16px; border-radius: var(--radius-sm); box-shadow: var(--shadow); font-size: .92rem;
  max-width: 420px; animation: slide .2s ease-out; overflow-wrap: anywhere; }
.toast.ok { background: var(--ok); color: #fff; }
.toast.bad { background: var(--bad); color: #fff; }
@keyframes slide { from { transform: translateY(8px); opacity: 0; } to { transform: none; opacity: 1; } }

/* ---------- loading ---------- */
.loading { color: var(--muted); padding: 24px 0; display: flex; align-items: center; gap: 10px; }
.spinner { width: 16px; height: 16px; border: 2px solid var(--line-strong); border-top-color: var(--primary); border-radius: 50%; animation: spin .8s linear infinite; flex: none; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- scorecards ---------- */
.pillar { border: 1px solid var(--line); border-radius: var(--radius-sm); overflow: hidden; }
.pillar-head { display: flex; justify-content: space-between; align-items: center; padding: 10px 14px; background: var(--surface-2); border-bottom: 1px solid var(--line); font-weight: 600; }
.item-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px 12px; padding: 10px 14px; border-bottom: 1px solid var(--line); }
.item-row:last-child { border-bottom: 0; }
.score-pill { display: inline-flex; align-items: center; justify-content: center; min-width: 38px; height: 26px; border-radius: 13px; font-weight: 650; font-size: .88rem;
  background: var(--grey-soft); color: var(--grey); }
.score-pill.v1 { background: var(--ok-soft); color: var(--ok); }
.score-pill.v05 { background: var(--warn-soft); color: var(--warn); }
.score-pill.v0 { background: var(--bad-soft); color: var(--bad); }
.bigscore { font-size: 2rem; font-weight: 700; line-height: 1; }
.bigscore small { font-size: .9rem; color: var(--muted); font-weight: 500; }
.steps-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
@media (max-width: 1000px) { .steps-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .steps-grid { grid-template-columns: minmax(0, 1fr); } }
.qline { padding: 10px 0; border-bottom: 1px dashed var(--line); }
.qline:last-child { border-bottom: 0; }

/* ---------- candidate header ---------- */
.cand-head { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.cand-head h1 { margin: 0 0 6px; overflow-wrap: anywhere; }
.moves { display: flex; flex-wrap: wrap; gap: 8px; }
.move-off { opacity: .55; }
.reasons { margin: 4px 0 0; padding-left: 18px; color: var(--muted); font-size: .85rem; }

/* ---------- co-pilot ---------- */
.copilot { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 16px; }
@media (max-width: 1000px) { .copilot { grid-template-columns: minmax(0, 1fr); } }
.prompt-big { background: var(--primary); color: var(--primary-ink); border-radius: var(--radius); padding: 22px 24px; min-height: 120px; }
.prompt-big .lead { font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; opacity: .85; font-weight: 600; }
.prompt-big .text { font-size: 1.45rem; font-weight: 600; line-height: 1.35; margin-top: 6px; overflow-wrap: anywhere; }
.prompt-big.repeat { background: var(--accent); }
.prompt-big.idle { background: var(--grey-soft); color: var(--muted); }
.transcript { max-height: 420px; overflow-y: auto; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface-2); padding: 8px 12px; }
.turn { padding: 6px 0; border-bottom: 1px solid var(--line); font-size: .92rem; overflow-wrap: anywhere; }
.turn:last-child { border-bottom: 0; }
.turn .who { font-weight: 650; font-size: .75rem; letter-spacing: .05em; margin-right: 6px; }
.turn.OPERATOR .who { color: var(--primary); }
.turn.CANDIDATE .who { color: var(--accent); }
.turn.pending { opacity: .65; }
.progress-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 6px; }
.prog { font-size: .8rem; padding: 5px 8px; border-radius: var(--radius-sm); background: var(--grey-soft); color: var(--grey); overflow-wrap: anywhere; }
.prog.asked { background: var(--warn-soft); color: var(--warn); }
.prog.evidenced, .prog.pass { background: var(--ok-soft); color: var(--ok); }
.prog.fail { background: var(--bad-soft); color: var(--bad); }
.prog.flagged { background: var(--warn-soft); color: var(--warn); }
.bar { height: 8px; background: var(--grey-soft); border-radius: 4px; overflow: hidden; }
.bar > span { display: block; height: 100%; background: var(--primary); }

/* ---------- training chat ---------- */
.chat { display: flex; flex-direction: column; gap: 10px; max-height: 480px; overflow-y: auto; padding: 4px; }
.bubble { max-width: 82%; padding: 10px 14px; border-radius: 14px; font-size: .95rem; overflow-wrap: anywhere; white-space: pre-wrap; }
.bubble.me { align-self: flex-end; background: var(--primary); color: var(--primary-ink); border-bottom-right-radius: 4px; }
.bubble.them { align-self: flex-start; background: var(--surface-2); border: 1px solid var(--line); border-bottom-left-radius: 4px; }
.bubble.sys { align-self: center; background: transparent; color: var(--muted); font-size: .85rem; }
.ptt { user-select: none; -webkit-user-select: none; touch-action: none; }
.ptt.rec { background: var(--bad); border-color: var(--bad); color: #fff; }

/* ---------- placeholders chips (templates) ---------- */
.ph-chip { font-family: var(--mono); font-size: .76rem; padding: 3px 8px; }

/* ---------- public candidate pages ---------- */
.public-body { background: var(--paper); }
.public-head { padding: 22px 16px 8px; max-width: 760px; margin: 0 auto; display: flex; align-items: center; gap: 12px; }
.public-head img { height: 64px; width: auto; }
.public-head .co { font-weight: 650; }
.public-main { max-width: 760px; margin: 0 auto; padding: 12px 16px 64px; }
.public-main .card { padding: 22px; }
.qcard { scroll-margin-top: 16px; }
.qcard.missing { border-color: var(--bad); }
.opt { display: flex; align-items: flex-start; gap: 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius-sm); cursor: pointer; margin-top: 8px; }
.opt:hover { background: var(--surface-2); }
.opt input { margin-top: 3px; }
.opt.sel { border-color: var(--primary); background: var(--primary-soft); }
.rating { display: flex; gap: 8px; flex-wrap: wrap; }
.rating label { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border: 1px solid var(--line-strong); border-radius: 50%; cursor: pointer; font-weight: 600; }
.rating input { position: absolute; opacity: 0; pointer-events: none; }
.rating label.sel { background: var(--primary); color: var(--primary-ink); border-color: var(--primary); }
.done-mark { width: 56px; height: 56px; border-radius: 50%; background: var(--ok-soft); color: var(--ok); display: flex; align-items: center; justify-content: center; font-size: 1.8rem; margin-bottom: 12px; }
.footer-note { color: var(--muted); font-size: .82rem; text-align: center; margin-top: 28px; }

/* ---------- misc ---------- */
.signin-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px 16px; }
.signin { width: min(400px, 100%); }
.signin .logo { display: block; height: 140px; width: auto; margin: 0 auto 20px; }
details > summary { cursor: pointer; color: var(--primary); font-weight: 550; }
details[open] > summary { margin-bottom: 8px; }
.day-group h3 { margin: 18px 0 8px; color: var(--muted); font-size: .85rem; text-transform: uppercase; letter-spacing: .05em; }
.sess { display: flex; gap: 12px; align-items: flex-start; flex-wrap: wrap; }
.sess .time { font-weight: 650; min-width: 64px; font-variant-numeric: tabular-nums; }
.overdue { color: var(--bad); font-weight: 600; }
.tick { display: flex; gap: 10px; align-items: flex-start; padding: 8px 0; border-bottom: 1px solid var(--line); }
.tick:last-child { border-bottom: 0; }
.tick.done .tlabel { color: var(--muted); text-decoration: line-through; }
.copybox { display: flex; gap: 6px; }
.copybox input { font-family: var(--mono); font-size: .85rem; }
.secret { font-family: var(--mono); font-size: 1.1rem; padding: 10px 12px; background: var(--warn-soft); color: var(--ink); border-radius: var(--radius-sm); overflow-wrap: anywhere; user-select: all; }
