/* Dingzhen VIS V1.1 — official product UI tokens. */
:root {
  --brand: #2e9771;
  --brand-deep: #157d57;
  --leaf: #87d3af;
  --water: #4eb68d;
  --sprout: #bdefd5;
  --warm: #f5e9dc;
  --brick: #c05a3c;
  --silver: #92989b;
  --green: var(--brand);
  --green-dark: var(--brand-deep);
  --green-soft: #eaf6f0;
  --primary: var(--brand);
  --primary-dark: var(--brand-deep);
  --primary-soft: var(--green-soft);
  --ink: #202b25;
  --muted: #5c6961;
  --line: #dce4dd;
  --paper: #f4f6f3;
  --error: #98472f;
  --radius: 10px;
}

body {
  background: var(--paper);
  color: var(--ink);
}

.topbar {
  border-top: 3px solid var(--brand);
  border-bottom-color: var(--line);
  background: #ffffff;
}

.brand-mark {
  background: var(--brand);
  border-radius: 8px;
}

.brand strong,
.page-heading h1,
.section-heading h2,
.panel h2 {
  color: var(--ink);
}

.topbar nav>a:hover,
.back:hover,
.card-link,
.disclosure>summary,
.source-panel>summary,
.source-inline summary {
  color: var(--brand-deep);
}

.eyebrow {
  color: var(--muted);
}

.step-label {
  color: var(--brand-deep);
}

.panel,
.login-card,
.empty {
  border-color: var(--line);
  border-radius: var(--radius);
  box-shadow: none;
}

.button,
input,
textarea,
select,
.guide-version-option,
.assessment-options label {
  transition: background-color 140ms ease-out, border-color 140ms ease-out, color 140ms ease-out, box-shadow 140ms ease-out, transform 140ms ease-out;
}

.button {
  border-color: #cbd5ce;
  border-radius: 7px;
}

.button:hover {
  border-color: var(--brand);
  background: #f2f8f0;
  color: var(--brand-deep);
}

.button:active {
  transform: translateY(1px);
}

.button.primary {
  border-color: var(--brand-deep);
  background: var(--brand-deep);
  color: #ffffff;
}

.button.primary:hover {
  border-color: #2f643f;
  background: #2f643f;
  color: #ffffff;
}

.button:disabled {
  opacity: .62;
  cursor: wait;
  transform: none;
}

.button.danger-button,
.danger-button {
  border-color: #d8a896;
  background: #ffffff;
  color: var(--error);
}

.button.danger-button:hover,
.danger-button:hover {
  border-color: var(--brick);
  background: #fbede8;
  color: var(--error);
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
summary:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 3px;
}

input:focus,
textarea:focus,
select:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(76, 150, 94, .16);
}

.role-badge,
.subtle-badge {
  background: #eef1ed;
  color: #4e5c53;
}

.count-badge,
.job-tab-count {
  background: var(--green-soft);
  color: var(--brand-deep);
}

.avatar {
  background: var(--green-soft);
  color: var(--brand-deep);
}

.guide-number {
  background: var(--brand-deep);
}

.guide-card,
.candidate-profile-grid>section {
  border-radius: 8px;
  background: #f5f7f4;
}

.section-nav,
.job-tabs,
.candidate-tabs {
  border-bottom-color: var(--line);
  background: rgba(255, 255, 255, .98);
  box-shadow: 0 4px 12px rgba(32, 43, 37, .05);
}

.section-nav a:hover,
.job-tabs a:hover,
.candidate-tabs a:hover {
  color: var(--brand-deep);
}

.section-nav a.active,
.job-tabs a.active,
.candidate-tabs a.active {
  border-bottom-color: var(--brand);
  background: transparent;
  color: var(--brand-deep);
  box-shadow: none;
}

.guide-version-option:hover {
  border-color: var(--leaf);
  background: #f6faf4;
}

.guide-version-option.active {
  border-color: var(--brand);
  background: var(--sprout);
  color: var(--brand-deep);
}

.guide-version-option.active small {
  color: var(--brand-deep);
}

.job-card:hover {
  border-color: var(--line);
  background: #f3f8f1;
}

.candidate-row {
  border-width: 1px;
  border-radius: 7px;
}

.candidate-row:hover {
  border-color: var(--leaf);
  background: #f5f9f3;
}

.decision-group-heading {
  border: 1px solid;
  border-radius: 6px;
}

.decision-group-heading.pending {
  border-color: #d8b7a4;
  background: var(--warm);
  color: #674b38;
}

.decision-group-heading.hired {
  border-color: var(--leaf);
  background: var(--green-soft);
  color: var(--brand-deep);
}

.decision-group-heading.rejected {
  border-color: #d4d8d5;
  background: #eef0ee;
  color: #59615c;
}

.candidate-row.decision-pending {
  border-color: #dfc2b2;
  background: #fdfaf6;
}

.candidate-row.decision-hired {
  border-color: #b8d8b1;
  background: #fbfefb;
}

.candidate-row.decision-rejected {
  border-color: #d4d8d5;
  background: #fafbfa;
}

.decision-badge.pending,
.status.empty,
.status.pending,
.status.running,
.status.sending,
.status.draft,
.job-task.pending,
.job-tab-hint {
  border-color: #d8b7a4;
  background: var(--warm);
  color: #674b38;
}

.decision-badge.hired,
.status.ready,
.status.sent,
.status.submitted,
.status.hired,
.job-task.offer {
  border-color: #b8d8b1;
  background: var(--green-soft);
  color: var(--brand-deep);
}

.decision-badge.rejected,
.status.rejected,
.status.revoked,
.status.expired {
  border-color: #d4d8d5;
  background: #eef0ee;
  color: #59615c;
}

.status.error,
.job-task.error,
.job-tab-hint.error {
  border-color: #d8a896;
  background: #fbede8;
  color: var(--error);
}

.info-box,
.send-confirm,
.flash.archive-banner {
  border-color: #d8b7a4;
  background: var(--warm);
  color: #674b38;
}

.error-text,
.weight-total.invalid {
  color: var(--error);
}

.weight-total.invalid {
  background: #fbede8;
}

.flash {
  border-color: #c9d6cc;
  background: #f4f7f3;
  color: #35463b;
}

.flash.success {
  border-color: #b8d8b1;
  background: var(--green-soft);
  color: var(--brand-deep);
}

.flash.error {
  border-color: #d8a896;
  background: #fbede8;
  color: var(--error);
}

.flash-combined {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.flash-combined>details {
  flex: 0 0 auto;
}

.flash-combined summary {
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
}

.flash-combined ul {
  margin: 8px 0 0;
  padding-left: 20px;
  font-weight: 400;
}

.flash-transient {
  transition: opacity 160ms ease-out, transform 160ms ease-out;
}

.flash-transient.flash-leaving {
  opacity: 0;
  transform: translateY(-4px);
}

.report-lead {
  border-color: #c5d9c0;
  background: var(--green-soft);
}

.score-domain-card,
.ams-score-card,
.reference-comparison,
.response-quality,
.findings-list li,
.facet-domain {
  border-radius: 10px;
  box-shadow: none;
}

.score-card,
.facet-domain>summary,
.ams-difference,
.historic-summary,
.report-interview,
.conditional-fields {
  background: var(--green-soft);
}

.score-card small,
.facet-domain>summary small,
.ams-difference p {
  color: #42544a;
}

.reference-legend .legend-reference,
.reference-radar-reference {
  stroke: var(--silver);
}

.reference-legend .legend-reference {
  border-top-color: var(--silver);
}

.reference-radar-reference {
  fill: rgba(148, 153, 156, .10);
}

.reference-radar-candidate {
  fill: rgba(76, 150, 94, .16);
  stroke: var(--brand);
}

.reference-legend .legend-band,
.ams-reference-track .ams-reference-band {
  border-color: #d5d9d6;
  background: #eceeec;
}

.ams-reference-mean {
  background: var(--silver);
}

.response-quality.quality-caution {
  border-color: #d8b7a4;
  border-left-color: var(--brick);
  background: var(--warm);
}

.response-quality.quality-repeat {
  border-color: #d8a896;
  border-left-color: var(--brick);
  background: #fbede8;
}

.offer-preview {
  background: #edf0ec;
}

.offer-document-header h1,
.offer-document h2 {
  color: var(--brand-deep);
}

.offer-form-actions {
  border-color: var(--line);
  background: rgba(255, 255, 255, .98);
}

@media (max-width: 640px) {
  .button {
    min-height: 44px;
  }

  input:not([type="radio"]):not([type="checkbox"]),
  select {
    min-height: 44px;
  }

  .link-button {
    min-height: 44px;
  }

  .flash-combined {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
  }

  .job-card:hover,
  .candidate-row:hover {
    background: #ffffff;
  }
}

@media (prefers-reduced-motion: reduce) {
  .button,
  input,
  textarea,
  select,
  .guide-version-option,
  .assessment-options label,
  .flash-transient {
    transition: none;
  }
}

@media print {
  .topbar,
  .panel,
  .score-domain-card,
  .ams-score-card,
  .reference-comparison,
  .response-quality,
  .offer-document {
    box-shadow: none !important;
  }

  .report-lead,
  .score-card,
  .facet-domain>summary,
  .response-quality,
  .reference-comparison {
    background: #ffffff !important;
  }

  .print-header,
  .print-overall {
    border-color: var(--brand-deep);
  }
}
