/* Refined application layer: one visual system for the recruiting workbench. */

:root {
  color-scheme: light;
  --canvas: #f4f6f9;
  --canvas-deep: #e9edf3;
  --surface: #ffffff;
  --surface-soft: #f7f8fb;
  --ink: #152033;
  --ink-soft: #344054;
  --muted: #667085;
  --muted-2: #98a2b3;
  --line: #e2e7ef;
  --line-strong: #cbd5e1;
  --accent: #2456d6;
  --accent-dark: #173f9c;
  --accent-soft: #e9efff;
  --accent-pale: #f5f7ff;
  --orange: #a15c12;
  --orange-soft: #fff6e8;
  --red: #b42318;
  --red-soft: #fef3f2;
  --blue: #3e63a8;
  --blue-soft: #eef4ff;
  --success: #157f5b;
  --success-soft: #eaf7f1;
  --success-border: #cbe9dc;
  --sidebar: #0b1220;
  --sidebar-soft: #152138;
  --shadow:
    0 1px 2px rgba(16, 24, 40, 0.035),
    0 16px 40px rgba(16, 24, 40, 0.055);
  --shadow-strong: 0 28px 80px rgba(15, 23, 42, 0.22);
  --radius: 12px;
  --radius-small: 10px;
  --transition: 170ms cubic-bezier(0.2, 0.8, 0.2, 1);
  --font-ui:
    "Avenir Next", "PingFang SC", "Hiragino Sans GB", "Noto Sans CJK SC",
    sans-serif;
  --font-display:
    "Avenir Next", "PingFang SC", "Hiragino Sans GB", "Noto Sans CJK SC",
    sans-serif;
  --font-mono:
    "SFMono-Regular", "Cascadia Mono", "Liberation Mono", Menlo, monospace;
}

html {
  background: var(--canvas);
}

body {
  color: var(--ink);
  background: var(--canvas);
  font-family: var(--font-ui);
  font-size: 14px;
  line-height: 1.5;
  letter-spacing: -0.006em;
}

button,
input,
textarea,
select {
  font-family: inherit;
}

button:focus-visible,
input:focus-visible,
textarea:focus-visible,
tr:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.skip-link {
  position: fixed;
  z-index: 200;
  top: 10px;
  left: 84px;
  padding: 10px 14px;
  color: #fff;
  background: var(--ink);
  border-radius: 8px;
  transform: translateY(-160%);
  transition: transform var(--transition);
}

.skip-link:focus {
  transform: translateY(0);
}

.app-shell {
  grid-template-columns: var(--sidebar-width, 244px) minmax(0, 1fr);
}

.sidebar {
  padding: 24px 16px 18px;
  color: #edf2f9;
  background: var(--sidebar);
  border-right: 1px solid rgba(255, 255, 255, 0.06);
}

.sidebar button:focus-visible,
.sidebar [tabindex]:focus-visible {
  outline-color: #5ab9fc;
}

.sidebar::after {
  position: absolute;
  right: 16px;
  bottom: 118px;
  left: 16px;
  height: 1px;
  content: "";
  background: rgba(255, 255, 255, 0.08);
}

.brand {
  gap: 12px;
  padding: 2px 8px 30px;
}

.brand-mark {
  width: 40px;
  height: 40px;
  color: #dcecff;
  background: #14233c;
  border-color: rgba(90, 185, 252, 0.2);
  border-radius: 12px;
}

.brand-copy {
  gap: 2px;
}

.brand-copy strong {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.025em;
}

.brand-copy small {
  color: #8fa3bf;
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.12em;
}

.main-nav {
  gap: 6px;
}

.main-nav::before {
  padding: 0 12px 9px;
  color: #70839f;
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.13em;
  content: "WORKSPACE";
}

.nav-item {
  min-height: 46px;
  padding: 0 12px;
  color: #a6b3c5;
  border: 1px solid transparent;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 500;
}

.nav-item:hover {
  color: #f8fbff;
  background: rgba(255, 255, 255, 0.06);
}

.nav-item.active {
  color: #fff;
  background: #17253c;
  border-color: #263a5d;
}

.nav-item.active::before {
  width: 3px;
  height: 18px;
  margin-left: -13px;
  content: "";
  background: #5ab9fc;
  border-radius: 0 3px 3px 0;
}

.nav-item.active svg {
  color: #78c9ff;
}

.nav-count {
  min-width: 32px;
  padding: 2px 7px;
  color: #c2cede;
  font-family: var(--font-mono);
  font-size: 10px;
  background: rgba(255, 255, 255, 0.075);
}

.sidebar-foot {
  gap: 14px;
}

.profile-chip {
  grid-template-columns: auto 1fr auto;
  gap: 10px;
  padding: 12px 8px 2px;
}

.profile-chip strong {
  font-size: 13px;
  font-weight: 600;
}

.profile-chip small {
  color: #8fa0b9;
  font-size: 11px;
}

.avatar {
  color: #294677;
  background: #dfe8f8;
  border-color: #cad8ee;
  border-radius: 12px;
}

.avatar-small {
  width: 30px;
  height: 30px;
  font-size: 11px;
  border-radius: 9px;
}

.avatar-large {
  width: 48px;
  height: 48px;
  font-size: 16px;
  border-radius: 14px;
}

.main {
  min-width: 0;
}

.page {
  width: 100%;
  max-width: 1540px;
  margin: 0 auto;
  padding: 0 36px 52px;
}

.page-tasks {
  max-width: 1480px;
}

.page-workspace {
  max-width: 1660px;
  padding-inline: 24px;
}

.topbar {
  min-height: 132px;
  align-items: center;
  padding: 28px 0 24px;
  gap: 28px;
}

.topbar-title {
  min-width: 0;
}

.topbar-title p {
  margin-bottom: 5px;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.12em;
}

.topbar-title h1 {
  font-family: var(--font-display);
  font-size: clamp(28px, 2.2vw, 34px);
  font-weight: 600;
  line-height: 1.14;
  letter-spacing: -0.035em;
}

.topbar-actions,
.job-header-actions,
.candidate-head-actions {
  gap: 10px;
}

.date-chip,
.save-state {
  min-height: 40px;
  padding: 0 12px;
  color: var(--muted);
  font-size: 12px;
}

.date-chip {
  padding-left: 6px;
}

.save-state {
  padding-right: 2px;
  color: var(--accent);
}

.btn {
  min-height: 42px;
  gap: 8px;
  padding: 0 16px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: -0.01em;
  border-radius: 10px;
  transition:
    color var(--transition),
    background var(--transition),
    border-color var(--transition),
    transform var(--transition),
    box-shadow var(--transition);
}

.btn:hover {
  transform: translateY(-1px);
}

.btn:active {
  transform: translateY(1px) scale(0.99);
}

.btn-primary {
  color: #fbfffd;
  background: var(--accent);
  border-color: var(--accent);
  box-shadow: 0 5px 14px rgba(36, 86, 214, 0.16);
}

.btn-primary:hover {
  background: var(--accent-dark);
  border-color: var(--accent-dark);
  box-shadow: 0 7px 18px rgba(36, 86, 214, 0.2);
}

.btn-secondary {
  color: var(--ink-soft);
  background: var(--surface);
  border-color: var(--line-strong);
}

.btn-secondary:hover {
  background: var(--surface-soft);
  border-color: #b8c4d6;
}

.btn-ghost {
  color: var(--muted);
}

.btn-ghost:hover {
  color: var(--ink);
  background: var(--surface-soft);
}

.btn-small {
  min-height: 36px;
  padding-inline: 12px;
  font-size: 12px;
}

.button-count {
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  font-family: var(--font-mono);
  font-size: 10px;
}

.icon-button {
  width: 38px;
  height: 38px;
  border-radius: 9px;
  transition:
    color var(--transition),
    background var(--transition),
    border-color var(--transition);
}

.icon-button.bordered {
  width: 38px;
  height: 38px;
}

.text-button {
  font-size: 13px;
}

.text-button.small {
  font-size: 12px;
}

.eyebrow {
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0.115em;
}

/* Task command center */

.work-stats {
  overflow: hidden;
  padding: 0;
  background: var(--surface);
  border-color: var(--line);
  border-radius: 18px;
  box-shadow: var(--shadow);
}

.work-stats-heading {
  min-height: 54px;
  padding: 0 24px;
  border-bottom: 1px solid var(--line);
}

.work-stats-heading > span:last-child {
  font-family: var(--font-mono);
  font-size: 10px;
}

.work-stat-grid {
  gap: 0;
  padding: 0 12px 12px;
}

.work-stat {
  min-height: 132px;
  padding: 22px 20px;
  background: transparent;
  border: 0;
  border-right: 1px solid var(--line);
  border-radius: 0;
}

.work-stat:last-child {
  border-right: 0;
}

.work-stat-icon {
  width: 34px;
  height: 34px;
  color: var(--accent);
  background: var(--accent-pale);
  border: 1px solid #dbe4f4;
  border-radius: 50%;
}

.work-stat > span:nth-child(2) {
  max-width: 105px;
  color: var(--ink-soft);
  font-size: 13px;
  line-height: 1.35;
}

.work-stat strong {
  margin-top: 8px;
  font-family: var(--font-display);
  font-size: 30px;
  font-weight: 500;
  line-height: 1;
  letter-spacing: -0.045em;
}

.section-block {
  margin-top: 42px;
}

.section-heading {
  align-items: center;
  margin-bottom: 18px;
}

.section-heading h2 {
  font-family: var(--font-display);
  font-size: 30px;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.03em;
}

.section-heading p {
  margin-top: 4px;
  font-size: 13px;
}

.segmented {
  gap: 2px;
  padding: 4px;
  background: var(--canvas-deep);
  border: 1px solid rgba(148, 163, 184, 0.32);
  border-radius: 10px;
}

.segmented button {
  min-height: 32px;
  padding: 0 12px;
  color: var(--ink-soft);
  font-size: 12px;
}

.segmented button.active {
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.08);
}

.compact button {
  min-height: 30px;
}

.task-list {
  grid-template-columns: minmax(0, 1.34fr) minmax(330px, 0.72fr);
  gap: 18px;
}

.task-card {
  min-height: 390px;
  padding: 26px;
  border-radius: 18px;
  box-shadow: var(--shadow);
  transition:
    border-color var(--transition),
    box-shadow var(--transition);
}

.task-card:hover {
  border-color: #c6d1e2;
  box-shadow:
    0 1px 2px rgba(16, 24, 40, 0.04),
    0 22px 54px rgba(16, 24, 40, 0.08);
}

.task-card-primary {
  background: #fbfcff;
  border-color: #c9d6eb;
}

.task-card-primary::after {
  right: auto;
  left: 26px;
  width: 44px;
  height: 3px;
  background: var(--accent);
  border-radius: 0 0 4px 4px;
}

.task-card-head {
  gap: 20px;
}

.inline-meta {
  gap: 8px;
  font-size: 11px;
}

.priority {
  min-height: 22px;
  padding: 0 8px;
  font-size: 10px;
  letter-spacing: 0.01em;
  border-radius: 5px;
}

.task-card h3 {
  margin: 16px 0 5px;
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 600;
  line-height: 1.24;
  letter-spacing: -0.03em;
}

.task-card-head p {
  color: var(--muted);
  font-size: 13px;
}

.task-stage {
  margin: 42px 0 30px;
}

.stage-copy {
  font-size: 12px;
}

.stage-copy strong {
  font-family: var(--font-mono);
  font-size: 13px;
}

.progress-track {
  height: 5px;
  margin: 11px 0 13px;
}

.stage-nodes {
  color: #5f6b7d;
  font-size: 10px;
}

.stage-nodes .done {
  color: var(--accent);
}

.task-card-foot {
  margin-top: auto;
  padding-top: 20px;
}

.task-facts {
  gap: 16px;
  font-size: 11px;
}

.task-facts span {
  gap: 6px;
}

.due-line {
  gap: 6px;
  margin-top: 14px;
  font-size: 11px;
}

.task-card:not(.task-card-primary) h3 {
  font-size: 22px;
}

.task-card:not(.task-card-primary) .task-stage {
  margin-top: 32px;
}

/* Recruiting workspace */

.job-header {
  align-items: center;
  gap: 24px;
  padding: 26px 0 18px;
}

.job-header-main {
  gap: 14px;
}

.back-button {
  width: 40px;
  height: 40px;
  background: var(--surface);
  border-radius: 10px;
  transition:
    color var(--transition),
    border-color var(--transition),
    transform var(--transition);
}

.back-button:hover {
  transform: translateX(-1px);
}

.job-header h1 {
  margin: 5px 0 3px;
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 600;
  line-height: 1.18;
  letter-spacing: -0.035em;
}

.job-header-main p {
  color: var(--muted);
  font-size: 12px;
}

.workflow-steps {
  min-height: 66px;
  padding: 8px 14px;
  margin-bottom: 14px;
  background: rgba(255, 255, 255, 0.8);
  border-radius: 14px;
}

.workflow-step {
  gap: 10px;
  padding: 8px 10px;
  border-radius: 9px;
  transition:
    background var(--transition),
    transform var(--transition);
}

.workflow-step:hover {
  transform: translateY(-1px);
}

.workflow-step strong {
  font-size: 12px;
}

.workflow-step small {
  color: var(--muted);
  font-size: 10px;
}

.step-number {
  width: 28px;
  height: 28px;
  font-family: var(--font-mono);
  font-size: 10px;
}

.step-line {
  height: 1px;
  background: #d9e1ed;
}

.workspace-grid {
  grid-template-columns:
    minmax(258px, 0.72fr)
    minmax(350px, 0.98fr)
    minmax(440px, 1.28fr);
  gap: 16px;
  align-items: stretch;
}

.panel {
  border-color: var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow);
}

.criteria-panel,
.candidate-panel {
  top: 16px;
  max-height: calc(100vh - 32px);
}

.criteria-panel {
  padding: 18px;
}

.candidate-panel {
  height: min(800px, calc(100vh - 132px));
}

.panel-heading {
  margin-bottom: 14px;
}

.panel-heading h2 {
  margin-top: 3px;
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -0.025em;
}

.panel-heading h2 span {
  font-family: var(--font-mono);
  font-size: 11px;
}

.state-badge {
  min-height: 24px;
  padding: 2px 8px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0;
}

.segmented.full {
  margin-bottom: 15px;
}

.criteria-summary {
  margin: 8px 0 14px;
  padding: 12px;
  background: var(--accent-pale);
  border-color: #d7e1f4;
  border-radius: 10px;
}

.criteria-title {
  gap: 8px;
  font-size: 12px;
}

.criteria-summary p {
  margin-top: 5px;
  font-size: 11px;
}

.criteria-list {
  gap: 10px;
}

.requirement-row {
  padding: 12px;
  background: var(--surface-soft);
  border-color: #e3e8f0;
  border-radius: 11px;
}

.requirement-top {
  gap: 8px;
}

.requirement-title {
  gap: 8px;
}

.requirement-title strong {
  font-size: 12px;
  line-height: 1.45;
}

.category-dot {
  width: 7px;
  height: 7px;
}

.requirement-row > p {
  margin: 7px 0 6px;
  font-size: 11px;
  line-height: 1.65;
}

.requirement-source {
  font-size: 10px;
}

.weight-control {
  grid-template-columns: auto minmax(46px, 1fr) 32px;
  gap: 8px;
  margin-top: 10px;
  font-size: 10px;
}

.ambiguity-box {
  margin: 13px 0;
  padding: 12px;
  border-radius: 10px;
}

.ambiguity-box > div {
  font-size: 11px;
}

.ambiguity-item {
  gap: 8px;
  margin-top: 9px;
  font-size: 10px;
  line-height: 1.6;
}

.ambiguity-item input {
  width: 15px;
  height: 15px;
}

.brief-editor label {
  margin-bottom: 8px;
  font-size: 12px;
}

.brief-editor textarea {
  min-height: 340px;
  padding: 13px;
  font-size: 12px;
  line-height: 1.8;
}

.editor-foot {
  gap: 11px;
}

.editor-foot span {
  font-size: 10px;
}

.candidate-heading {
  padding: 18px 18px 12px;
}

.candidate-head-actions {
  gap: 6px;
}

.stale-banner {
  margin: 0 16px 10px;
  padding: 9px 11px;
  font-size: 11px;
  border-radius: 8px;
}

.stale-banner button {
  font-size: 11px;
}

.match-summary {
  margin: 0 16px 12px;
  padding: 10px 13px;
  gap: 14px;
  background: var(--surface-soft);
  border-radius: 10px;
}

.match-summary div {
  gap: 5px;
}

.match-summary strong {
  font-family: var(--font-mono);
  font-size: 14px;
}

.match-summary span {
  font-size: 10px;
}

.refresh-match {
  gap: 5px;
  font-size: 10px;
}

.candidate-toolbar {
  gap: 8px;
  padding: 0 16px 10px;
}

.search-field {
  min-height: 40px;
  gap: 8px;
  padding: 0 11px;
  border-radius: 9px;
  transition:
    border-color var(--transition),
    box-shadow var(--transition);
}

.search-field input {
  font-size: 12px;
}

.blind-toggle {
  min-height: 40px;
  padding: 0 10px;
  font-size: 11px;
  border-radius: 9px;
  transition:
    color var(--transition),
    background var(--transition),
    border-color var(--transition);
}

.filter-tabs {
  gap: 18px;
  padding: 0 16px;
}

.filter-tabs button {
  min-height: 40px;
  padding-bottom: 10px;
  font-size: 11px;
  transition: color var(--transition);
}

.filter-tabs button.active::after {
  height: 2px;
}

.candidate-row {
  gap: 10px;
  padding: 13px 16px;
  transition:
    background var(--transition),
    box-shadow var(--transition);
}

.candidate-row:hover {
  background: #f8faff;
}

.candidate-row.is-active {
  background: #f0f5ff;
  box-shadow: inset 3px 0 var(--accent);
}

.candidate-name-line strong {
  font-size: 13px;
  font-weight: 600;
}

.candidate-role {
  margin-top: 1px;
  font-size: 11px;
}

.candidate-tags {
  gap: 5px;
  margin-top: 6px;
}

.candidate-tags span {
  padding: 2px 6px;
  font-size: 9px;
  border-radius: 4px;
}

.candidate-score {
  gap: 5px;
}

.candidate-score > small {
  font-size: 8px;
}

.score-ring {
  width: 42px;
  height: 42px;
}

.score-ring::before {
  width: 33px;
  height: 33px;
}

.score-ring strong {
  transform: translateY(-2px);
  font-family: var(--font-mono);
  font-size: 11px;
}

.score-ring small {
  transform: translateY(6px);
  font-size: 7px;
}

.candidate-list-foot,
.library-foot {
  min-height: 38px;
  padding: 0 16px;
  font-size: 10px;
}

.empty-state {
  gap: 8px;
  font-size: 12px;
}

.detail-panel {
  display: flex;
  min-height: 720px;
  max-height: calc(100vh - 132px);
  flex-direction: column;
  overflow: hidden;
}

.detail-head {
  padding: 20px 20px 14px;
}

.candidate-identity {
  gap: 12px;
}

.candidate-identity h2 {
  margin: 4px 0 2px;
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.03em;
}

.candidate-identity p {
  font-size: 12px;
}

.detail-decision-bar {
  gap: 7px;
  padding: 0 20px 14px;
}

.decision-button {
  min-height: 36px;
  gap: 5px;
  padding-inline: 8px;
  font-size: 11px;
  border-radius: 8px;
  transition:
    color var(--transition),
    background var(--transition),
    border-color var(--transition),
    transform var(--transition);
}

.decision-button:hover {
  transform: translateY(-1px);
}

.score-summary {
  margin: 0 20px 14px;
  border-radius: 11px;
}

.score-primary,
.score-stat {
  min-height: 72px;
  padding: 11px 12px;
}

.large-score {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 500;
  line-height: 1;
}

.large-score span {
  font-size: 9px;
}

.score-stat span {
  font-size: 10px;
}

.score-stat strong {
  margin-top: 4px;
  font-size: 13px;
}

.detail-inline-alert {
  margin: 0 20px 12px;
  padding: 9px 11px;
  font-size: 11px;
  border-radius: 8px;
}

.detail-tabs {
  gap: 19px;
  padding: 0 20px;
  overflow-x: auto;
  scrollbar-width: none;
}

.detail-tabs::-webkit-scrollbar {
  display: none;
}

.detail-tabs button {
  min-height: 42px;
  gap: 5px;
  padding-bottom: 10px;
  font-size: 11px;
}

.detail-tabs button span {
  min-width: 16px;
  height: 16px;
  font-family: var(--font-mono);
  font-size: 8px;
}

.detail-content {
  flex: 1;
  padding: 16px 20px;
  overflow-y: auto;
  scrollbar-width: thin;
}

.ai-summary {
  padding: 15px;
  background: #f1f5ff;
  border-color: #d7e1f4;
  border-radius: 11px;
}

.ai-summary-title {
  gap: 8px;
}

.ai-mark {
  width: 28px;
  height: 28px;
  border-radius: 8px;
}

.ai-summary-title strong {
  font-size: 13px;
}

.ai-label {
  font-size: 9px;
}

.ai-summary > p {
  margin-top: 9px;
  color: var(--ink-soft);
  font-size: 12px;
  line-height: 1.75;
}

.summary-facts {
  gap: 12px;
  margin-top: 10px;
  font-size: 10px;
}

.subsection-heading {
  align-items: center;
  margin: 20px 0 10px;
}

.subsection-heading h3 {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 600;
}

.subsection-heading p {
  margin-top: 3px;
  font-size: 10px;
}

.confidence-note {
  font-size: 10px;
}

.evidence-list,
.gap-list,
.risk-list,
.migration-list {
  gap: 9px;
}

.evidence-card,
.gap-card,
.risk-card {
  padding: 13px;
  border-color: #e2e7ef;
  border-radius: 10px;
}

.evidence-require {
  font-size: 12px;
}

.evidence-score {
  font-family: var(--font-mono);
  font-size: 12px;
}

.transfer-label {
  margin-top: 5px;
  padding: 2px 6px;
  font-size: 9px;
  border-radius: 4px;
}

.evidence-card > p {
  margin-top: 7px;
  font-size: 11px;
  line-height: 1.7;
}

.evidence-meta {
  margin-top: 8px;
  padding-top: 7px;
  font-size: 9px;
}

.timeline-heading {
  padding-top: 10px;
}

.timeline-row strong {
  font-size: 11px;
}

.timeline-row span,
.timeline-row time {
  font-size: 9px;
}

.gap-intro,
.risk-intro,
.migration-intro {
  gap: 11px;
  padding: 13px;
  border-radius: 11px;
}

.gap-intro strong,
.risk-intro strong,
.migration-intro strong {
  font-size: 12px;
}

.gap-intro p,
.risk-intro p,
.migration-intro p {
  margin-top: 3px;
  font-size: 10px;
  line-height: 1.65;
}

.migration-card {
  padding: 13px;
  border-radius: 11px;
}

.migration-node {
  padding: 10px;
}

.migration-node span {
  font-size: 9px;
}

.migration-node strong {
  font-size: 11px;
}

.migration-evidence {
  padding: 11px;
}

.migration-evidence strong {
  font-size: 11px;
}

.migration-evidence p {
  font-size: 10px;
}

.migration-meta {
  font-size: 9px;
}

.gap-index {
  width: 28px;
  height: 28px;
  font-family: var(--font-mono);
  font-size: 9px;
}

.gap-card-head strong,
.risk-card-head strong {
  font-size: 11px;
}

.gap-card-head span,
.risk-card-head span {
  font-size: 9px;
}

.gap-card > p,
.risk-card > p {
  font-size: 11px;
  line-height: 1.7;
}

.probe-question,
.risk-verify {
  padding: 9px;
}

.probe-question span,
.risk-verify span {
  font-size: 9px;
}

.probe-question strong,
.risk-verify strong {
  margin-top: 3px;
  font-size: 10px;
  line-height: 1.6;
}

.risk-method {
  padding: 11px;
  font-size: 10px;
}

.success-empty {
  padding: 15px;
  font-size: 11px;
}

.resume-head h3 {
  font-family: var(--font-display);
  font-size: 15px;
}

.resume-head p,
.resume-actions {
  font-size: 10px;
}

.analysis-capabilities {
  padding: 12px;
}

.analysis-capabilities-head {
  margin-bottom: 10px;
}

.analysis-capabilities-head strong {
  font-size: 12px;
}

.analysis-capabilities-head span,
.analysis-capability span,
.structural-analysis span {
  font-size: 9px;
}

.analysis-capability {
  min-height: 34px;
  padding: 7px 8px;
}

.analysis-capability strong {
  font-size: 9px;
}

.resume-paper,
.json-paper {
  padding: 16px;
  font-family: var(--font-mono);
  font-size: 10px;
  line-height: 1.85;
  border-radius: 10px;
}

.parse-evidence {
  gap: 9px 16px;
  padding: 10px;
  font-size: 9px;
}

.detail-footer {
  padding: 11px 20px 14px;
  background: rgba(255, 255, 255, 0.97);
}

.feedback-question {
  margin-bottom: 9px;
  font-size: 10px;
}

.feedback-button {
  min-height: 30px;
  padding: 3px 9px;
  font-size: 10px;
  border-radius: 6px;
  transition:
    color var(--transition),
    background var(--transition),
    border-color var(--transition),
    transform var(--transition);
}

.feedback-button:hover {
  transform: translateY(-1px);
}

/* Talent library */

.library-stats {
  gap: 0;
  overflow: hidden;
  margin-bottom: 22px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow);
}

.library-stat {
  min-height: 126px;
  padding: 22px 20px;
  background: transparent;
  border: 0;
  border-right: 1px solid var(--line);
  border-radius: 0;
}

.library-stat:last-child {
  border-right: 0;
}

.library-stat span {
  color: var(--ink-soft);
  font-size: 12px;
}

.library-stat strong {
  margin: 7px 0 3px;
  font-family: var(--font-display);
  font-size: 30px;
  font-weight: 500;
  line-height: 1;
  letter-spacing: -0.04em;
}

.library-stat small {
  font-size: 10px;
}

.library-toolbar {
  min-height: 68px;
  padding: 14px 18px 0;
}

.library-search {
  width: min(410px, 44%);
  margin-bottom: 14px;
}

.candidate-table th {
  position: sticky;
  z-index: 2;
  top: 0;
  padding: 12px 16px;
  font-size: 10px;
  letter-spacing: 0.03em;
}

.table-wrap {
  max-height: calc(100vh - 300px);
  overflow: auto;
  scrollbar-width: thin;
}

.candidate-table td {
  padding: 13px 16px;
  font-size: 11px;
}

.candidate-table td > span {
  margin-top: 3px;
  font-size: 9px;
}

.table-person {
  min-width: 170px;
  gap: 10px;
}

.table-person strong {
  font-size: 12px;
}

.table-person span {
  font-size: 9px;
}

.duplicate-preview {
  margin: 18px;
  padding: 18px;
  border-radius: 11px;
}

.duplicate-pair > span,
.duplicate-person strong,
.duplicate-person span,
.duplicate-preview > p {
  font-size: 10px;
}

/* Dialogs, feedback, imports */

.modal-backdrop {
  background: rgba(14, 25, 21, 0.44);
}

.modal {
  border-radius: 18px;
}

.modal-head {
  padding: 21px 22px 16px;
}

.modal-head h2 {
  margin-top: 3px;
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.03em;
}

.modal-body {
  padding: 20px 22px;
}

.form-label,
.reason-fieldset legend {
  margin-bottom: 8px;
  font-size: 12px;
}

.form-textarea {
  min-height: 120px;
  padding: 13px;
  font-size: 12px;
  border-radius: 10px;
}

.form-tip,
.feedback-snapshot {
  margin-top: 10px;
  padding: 11px;
  font-size: 10px;
}

.modal-candidate-line {
  gap: 11px;
  margin-bottom: 16px;
  padding: 12px;
  border-radius: 10px;
}

.modal-candidate-line strong {
  font-size: 12px;
}

.modal-candidate-line span {
  margin-top: 2px;
  font-size: 10px;
}

.reason-grid {
  gap: 8px;
}

.reason-option {
  min-height: 42px;
  padding: 8px 10px;
  font-size: 11px;
  border-radius: 8px;
}

.outreach-focus {
  padding: 12px 14px;
  border-radius: 10px;
}

.outreach-focus > span {
  font-size: 11px;
}

.outreach-focus ul {
  margin-top: 6px;
  font-size: 10px;
}

.paste-resume-text {
  font-size: 11px;
}

.feedback-overview {
  margin-bottom: 16px;
  border-radius: 10px;
}

.feedback-overview > div {
  min-height: 70px;
}

.feedback-overview strong {
  font-family: var(--font-display);
  font-size: 24px;
}

.feedback-overview span,
.calibration-head span,
.calibration-card p,
.calibration-card small {
  font-size: 10px;
}

.calibration-card {
  margin-bottom: 16px;
  padding: 14px;
}

.calibration-head {
  font-size: 12px;
}

.calibration-card ul,
.feedback-item strong,
.activity-item strong {
  font-size: 11px;
}

.feedback-item span,
.feedback-item time,
.feedback-item p,
.activity-item span,
.activity-item time {
  font-size: 9px;
}

.feedback-item,
.activity-item {
  padding: 13px 2px;
}

.json-head {
  font-size: 10px;
}

.library-detail-head h3 {
  font-family: var(--font-display);
  font-size: 20px;
}

.library-detail-head p,
.library-detail-head div > span {
  font-size: 10px;
}

.parsed-grid > div {
  min-height: 84px;
  padding: 12px;
}

.parsed-grid span,
.parsed-grid small,
.capability-mini-grid span,
.capability-mini-grid small,
.modal-section-head span {
  font-size: 9px;
}

.parsed-grid strong {
  font-size: 13px;
}

.modal-section-head strong {
  font-size: 12px;
}

.capability-mini-grid > div {
  min-height: 82px;
  padding: 10px;
}

.capability-mini-grid strong {
  font-size: 17px;
}

.import-copy strong {
  font-size: 14px;
}

.import-copy p {
  font-size: 11px;
}

.import-steps,
.import-analysis-scope > strong {
  font-size: 10px;
}

.import-analysis-scope {
  padding: 12px;
  border-radius: 10px;
}

.import-analysis-scope span {
  padding: 4px 7px;
  font-size: 9px;
  border-radius: 5px;
}

.processing-card {
  min-width: 320px;
  padding: 20px 22px;
  border-radius: 14px;
}

.processing-card strong {
  font-size: 13px;
}

.processing-card p {
  font-size: 10px;
}

.toast {
  gap: 9px;
  padding: 13px 15px;
  font-size: 11px;
  border-radius: 10px;
}

@media (max-width: 1450px) {
  .workspace-grid {
    grid-template-columns:
      minmax(238px, 0.7fr)
      minmax(320px, 0.94fr)
      minmax(390px, 1.18fr);
    gap: 14px;
  }

  .page-workspace {
    padding-inline: 18px;
  }
}

@media (max-width: 1300px) {
  .app-shell {
    grid-template-columns: 84px minmax(0, 1fr);
  }

  .sidebar {
    padding-inline: 12px;
  }

  .main-nav::before,
  .sidebar::after {
    display: none;
  }

  .brand {
    padding-inline: 0;
  }

  .nav-item.active::before {
    margin-left: -13px;
  }

  .workspace-grid {
    grid-template-columns: minmax(270px, 0.8fr) minmax(360px, 1fr);
  }

  .detail-panel {
    grid-column: 1 / -1;
    max-height: none;
  }

  .detail-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 24px;
  }

  .detail-content > .detail-inline-alert,
  .detail-content > .ai-summary,
  .detail-content > .gap-intro,
  .detail-content > .risk-intro,
  .detail-content > .resume-head,
  .detail-content > .resume-actions,
  .detail-content > .resume-paper,
  .detail-content > .parse-evidence {
    grid-column: 1 / -1;
  }
}

@media (max-width: 1050px) {
  .page {
    padding-inline: 24px;
  }

  .page-workspace {
    padding-inline: 16px;
  }

  .topbar {
    min-height: 120px;
  }

  .topbar-actions .date-chip {
    display: none;
  }

  .task-list {
    grid-template-columns: 1fr;
  }

  .task-card {
    min-height: 360px;
  }

  .work-stat strong,
  .library-stat strong {
    font-size: 26px;
  }

  .job-header {
    align-items: flex-start;
  }

  .job-header-actions .save-state,
  .job-header-actions .btn-ghost {
    display: none;
  }

  .workspace-grid {
    grid-template-columns: 1fr;
  }

  .criteria-panel,
  .candidate-panel {
    position: static;
    max-height: none;
  }

  .candidate-panel {
    height: 700px;
  }

  .detail-panel {
    grid-column: auto;
  }

  .detail-content {
    display: block;
  }

  .criteria-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .library-stats {
    grid-template-columns: repeat(2, 1fr);
  }

  .library-stat:nth-child(2) {
    border-right: 0;
  }

  .library-stat:nth-child(-n + 2) {
    border-bottom: 1px solid var(--line);
  }

  .parsed-grid,
  .capability-mini-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 680px) {
  .app-shell {
    padding-bottom: 74px;
  }

  .sidebar {
    z-index: 60;
    height: 70px;
    padding: 8px max(12px, env(safe-area-inset-left)) max(8px, env(safe-area-inset-bottom));
    background: rgba(11, 18, 32, 0.97);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    border-right: 0;
    border-radius: 16px 16px 0 0;
  }

  .main-nav {
    gap: 8px;
  }

  .nav-item {
    gap: 8px;
    min-height: 50px;
    justify-content: center;
  }

  .nav-item span:not(.nav-count) {
    font-size: 11px;
  }

  .nav-item.active::before {
    width: 18px;
    height: 3px;
    margin: -34px 0 0;
    border-radius: 3px;
  }

  .page,
  .page-workspace {
    padding: 0 16px 28px;
  }

  .topbar {
    min-height: 112px;
    align-items: flex-start;
    flex-direction: column;
    gap: 16px;
    padding: 22px 0 16px;
  }

  .topbar-title h1 {
    font-size: 28px;
  }

  .topbar-actions {
    width: 100%;
    flex-wrap: wrap;
  }

  .topbar-actions .btn {
    min-height: 44px;
    flex: 1;
  }

  .work-stats-heading {
    min-height: 50px;
    padding-inline: 16px;
  }

  .work-stat-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding: 0 8px 8px;
  }

  .work-stat {
    min-height: 112px;
    padding: 16px 12px;
  }

  .work-stat:nth-child(2) {
    border-right: 0;
  }

  .work-stat:nth-child(-n + 2) {
    border-bottom: 1px solid var(--line);
  }

  .work-stat > span:nth-child(2) {
    font-size: 11px;
  }

  .work-stat strong {
    font-size: 25px;
  }

  .section-block {
    margin-top: 30px;
  }

  .section-heading h2 {
    font-size: 21px;
  }

  .section-heading p {
    font-size: 11px;
  }

  .task-card {
    min-height: 0;
    padding: 20px;
  }

  .task-card-primary::after {
    left: 20px;
  }

  .task-card h3 {
    font-size: 19px;
  }

  .task-card:not(.task-card-primary) h3 {
    font-size: 19px;
  }

  .task-stage {
    margin: 30px 0 26px;
  }

  .stage-nodes {
    font-size: 9px;
  }

  .task-card-foot {
    align-items: stretch;
    flex-direction: column;
  }

  .task-card-foot .btn {
    width: 100%;
    min-height: 44px;
  }

  .segmented button,
  .compact button {
    min-height: 44px;
    padding-inline: 12px;
  }

  .task-card-head .icon-button {
    width: 44px;
    height: 44px;
  }

  .job-header {
    gap: 14px;
    padding-top: 20px;
  }

  .job-header h1 {
    font-size: 24px;
  }

  .job-header-main p {
    font-size: 11px;
  }

  .job-header-actions {
    width: 100%;
  }

  .job-header-actions .btn {
    min-height: 44px;
    flex: 1;
  }

  .workflow-steps {
    min-height: 58px;
  }

  .workflow-step {
    min-height: 42px;
  }

  .workflow-step small {
    display: none;
  }

  .step-line {
    width: 10px;
  }

  .criteria-list {
    grid-template-columns: 1fr;
  }

  .criteria-panel,
  .candidate-panel,
  .detail-panel {
    border-radius: 14px;
  }

  .candidate-panel {
    height: 660px;
  }

  .candidate-head-actions .btn {
    display: none;
  }

  .candidate-toolbar {
    flex-wrap: wrap;
  }

  .search-field {
    flex-basis: 100%;
  }

  .blind-toggle {
    width: 100%;
    justify-content: center;
  }

  .candidate-row {
    padding: 13px 14px;
  }

  .candidate-tags span:nth-child(n + 3) {
    display: none;
  }

  .score-summary {
    grid-template-columns: repeat(3, 1fr);
  }

  .score-primary {
    grid-column: 1 / -1;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .detail-tabs {
    gap: 17px;
    overflow-x: auto;
  }

  .detail-tabs button {
    flex: 0 0 auto;
  }

  .detail-footer {
    position: static;
  }

  .feedback-question {
    align-items: flex-start;
    flex-direction: column;
  }

  .feedback-button {
    min-height: 36px;
  }

  .modal-backdrop {
    align-items: flex-end;
    padding: 8px;
  }

  .modal {
    max-height: calc(100vh - 16px);
    border-radius: 16px;
  }

  .reason-grid {
    grid-template-columns: 1fr;
  }

  .migration-path {
    grid-template-columns: 1fr;
  }

  .migration-arrow {
    width: 100%;
    height: 22px;
    transform: rotate(90deg);
  }

  .modal-actions.split {
    align-items: stretch;
    flex-direction: column;
  }

  .modal-actions > div {
    justify-content: flex-end;
  }

  .modal-actions .btn {
    min-height: 44px;
  }

  .library-stats {
    grid-template-columns: 1fr 1fr;
    margin-bottom: 18px;
  }

  .library-stat {
    min-height: 108px;
    padding: 16px 14px;
  }

  .library-stat strong {
    font-size: 24px;
  }

  .library-toolbar {
    align-items: stretch;
    flex-direction: column;
    gap: 0;
    padding: 14px 14px 0;
  }

  .library-search {
    width: 100%;
  }

  .library-toolbar .filter-tabs {
    gap: 16px;
    overflow-x: auto;
  }

  .table-wrap {
    min-height: 420px;
    max-height: calc(100svh - 280px);
    overflow: auto;
  }

  .candidate-table th {
    position: static;
  }

  .candidate-table,
  .candidate-table tbody,
  .candidate-table tr,
  .candidate-table td {
    display: block;
    width: 100%;
  }

  .candidate-table {
    min-width: 0;
  }

  .candidate-table thead {
    display: none;
  }

  .candidate-table tbody {
    padding: 8px 12px 12px;
  }

  .candidate-table tbody tr {
    position: relative;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0 14px;
    margin-top: 9px;
    padding: 13px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 12px;
  }

  .candidate-table td {
    display: flex;
    min-width: 0;
    flex-direction: column;
    gap: 3px;
    padding: 8px 0;
    border-bottom: 0;
  }

  .candidate-table td::before {
    display: block;
    color: var(--muted);
    font-size: 9px;
    content: attr(data-label);
  }

  .candidate-table td:first-child {
    grid-column: 1 / -1;
    padding: 0 30px 12px 0;
    margin-bottom: 6px;
    border-bottom: 1px solid var(--line);
  }

  .candidate-table td:nth-child(2),
  .candidate-table td:nth-child(5) {
    grid-column: 1 / -1;
  }

  .candidate-table td:first-child::before,
  .candidate-table td:last-child::before {
    display: none;
  }

  .candidate-table td:last-child {
    position: absolute;
    top: 12px;
    right: 8px;
    display: block;
    width: auto;
    padding: 0;
  }

  .table-person {
    min-width: 0;
  }

  .table-person strong {
    font-size: 13px;
  }

  .table-person span,
  .candidate-table td > span {
    font-size: 10px;
  }

  .candidate-table td > strong {
    font-size: 12px;
  }

  .duplicate-preview {
    align-items: flex-start;
    flex-direction: column;
    margin: 12px;
    padding: 14px;
  }

  .duplicate-pair {
    align-items: flex-start;
    flex-direction: column;
  }

  .parsed-grid,
  .capability-mini-grid {
    grid-template-columns: 1fr 1fr;
  }

  .library-detail-head {
    grid-template-columns: auto 1fr;
  }

  .library-detail-head > .state-badge {
    grid-column: 2;
  }

  .toast-region {
    right: 12px;
    bottom: 82px;
    left: 12px;
  }

  .toast {
    max-width: none;
    width: 100%;
  }
}

@media (max-width: 390px) {
  .page,
  .page-workspace {
    padding-inline: 16px;
  }

  .topbar-title h1 {
    font-size: 26px;
  }

  .task-card {
    padding: 18px;
  }

  .task-facts {
    gap: 10px;
  }

  .stage-nodes {
    font-size: 8px;
  }

  .work-stat {
    padding-inline: 10px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .btn:hover,
  .btn:active,
  .decision-button:hover,
  .feedback-button:hover,
  .workflow-step:hover,
  .back-button:hover {
    transform: none;
  }
}
