:root {
  color-scheme: light;
  --ink: #171814;
  --muted: #67695f;
  --paper: #f3f1e9;
  --panel: #fbfaf5;
  --line: #d8d4c7;
  --lime: #d9ff57;
  --green: #174f3b;
  --red: #8a2e28;
  --red-soft: #f5ded8;
  --sans: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  --serif: Iowan Old Style, Baskerville, "Times New Roman", serif;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  margin: 0;
  min-width: 320px;
  background:
    radial-gradient(circle at 10% 8%, rgb(217 255 87 / 22%), transparent 27rem),
    var(--paper);
  color: var(--ink);
  font-family: var(--sans);
}

.auth-gate {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 32px;
}

.login-card {
  width: min(100%, 440px);
  padding: 40px;
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.login-card h1 {
  margin: 8px 0 12px;
}

.login-card > p:not(.eyebrow, .login-error) {
  color: var(--muted);
  line-height: 1.6;
}

.login-fields {
  display: grid;
  gap: 16px;
  margin: 28px 0 16px;
}

.login-fields label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.login-fields input {
  width: 100%;
  border: 1px solid var(--line);
  background: var(--background);
  color: var(--ink);
  font: inherit;
  font-size: 1rem;
  letter-spacing: normal;
  padding: 13px 14px;
  text-transform: none;
}

.login-card .primary-button {
  width: 100%;
  justify-content: center;
  margin-top: 12px;
}

.login-error {
  color: var(--red);
  font-size: 0.9rem;
  margin: 0 0 16px;
}

.masthead {
  align-items: flex-start;
  display: flex;
  justify-content: space-between;
  gap: 24px;
}

.masthead-account {
  align-items: flex-end;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.masthead-account > span {
  color: var(--muted);
  font-size: 0.78rem;
}

.logout-button {
  border: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font: inherit;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  padding: 9px 14px;
  text-transform: uppercase;
}

button,
input {
  font: inherit;
}

button {
  color: inherit;
}

.shell {
  width: min(1440px, calc(100% - 48px));
  margin: 0 auto;
  padding: 72px 0;
}

.masthead {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 440px);
  align-items: end;
  gap: 48px;
  padding-bottom: 34px;
  border-bottom: 1px solid var(--ink);
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 750;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.masthead h1 {
  grid-column: 1;
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(3.8rem, 8vw, 8.2rem);
  font-weight: 400;
  letter-spacing: -0.07em;
  line-height: 0.76;
}

.app-tabs {
  display: flex;
  align-items: stretch;
  min-height: 54px;
  border-right: 1px solid var(--ink);
  border-bottom: 1px solid var(--ink);
  border-left: 1px solid var(--ink);
}

.app-tab {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 150px;
  padding: 0 24px;
  background: transparent;
  border: 0;
  border-right: 1px solid var(--ink);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-decoration: none;
  cursor: pointer;
}

.app-tab span {
  display: inline-grid;
  min-width: 21px;
  height: 21px;
  margin-left: 9px;
  place-items: center;
  padding: 0 5px;
  background: #dfddd4;
  border-radius: 12px;
  font-size: 0.65rem;
}

.app-tab.is-active {
  background: var(--ink);
  color: white;
}

.app-tab.is-active span {
  background: var(--lime);
  color: var(--ink);
}

.app-tab.has-attention:not(.is-active) span {
  background: var(--red);
  color: white;
}

.lede {
  grid-column: 2;
  grid-row: 1 / span 2;
  margin: 0;
  color: var(--muted);
  font-size: clamp(1rem, 1.35vw, 1.25rem);
  line-height: 1.55;
}

.workspace {
  display: grid;
  grid-template-columns: minmax(360px, 0.8fr) minmax(520px, 1.2fr);
  min-height: 660px;
  background: var(--panel);
  border: 1px solid var(--ink);
  border-top: 0;
}

.input-panel,
.result-panel {
  padding: clamp(28px, 4vw, 56px);
}

.input-panel {
  border-right: 1px solid var(--ink);
}

.drop-zone {
  display: grid;
  min-height: 330px;
  place-items: center;
  align-content: center;
  padding: 42px;
  text-align: center;
  border: 1.5px dashed #aaa696;
  background: #f7f5ee;
  cursor: pointer;
  transition:
    border-color 160ms ease,
    background 160ms ease,
    transform 160ms ease;
}

.drop-zone:hover,
.drop-zone:focus-visible,
.drop-zone.is-dragging {
  border-color: var(--ink);
  background: #f0ffd0;
  outline: none;
}

.drop-zone.is-dragging {
  transform: scale(1.01);
}

.drop-zone.has-files {
  min-height: 230px;
}

.drop-icon {
  display: grid;
  width: 58px;
  height: 58px;
  margin-bottom: 22px;
  place-items: center;
  background: var(--lime);
  border: 1px solid var(--ink);
  border-radius: 50%;
}

.drop-icon svg {
  width: 25px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.5;
}

.drop-zone h2,
.empty-state h2,
.loading-state h2,
.error-state h2 {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(1.8rem, 3vw, 2.65rem);
  font-weight: 400;
  letter-spacing: -0.035em;
}

.drop-zone p {
  margin: 12px 0 20px;
  color: var(--muted);
}

.drop-zone small {
  color: #8a8b82;
  font-size: 0.74rem;
}

kbd {
  display: inline-grid;
  min-width: 27px;
  height: 27px;
  place-items: center;
  color: var(--ink);
  font-family: var(--sans);
  font-size: 0.75rem;
  background: white;
  border: 1px solid var(--line);
  border-radius: 5px;
  box-shadow: 0 1px 0 #bdb9ad;
}

.text-button {
  padding: 0;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
  background: none;
  border: 0;
  cursor: pointer;
}

.previews {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-top: 14px;
}

.preview-card {
  position: relative;
  aspect-ratio: 0.82;
  overflow: hidden;
  background: #ddd;
  border: 1px solid var(--ink);
}

.preview-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.preview-number,
.remove-button {
  position: absolute;
  top: 6px;
  display: grid;
  width: 26px;
  height: 26px;
  place-items: center;
  background: var(--panel);
  border: 1px solid var(--ink);
  font-size: 0.68rem;
}

.preview-number {
  left: 6px;
}

.remove-button {
  right: 6px;
  padding: 0 0 2px;
  font-size: 1.2rem;
  cursor: pointer;
}

.actions {
  display: flex;
  gap: 10px;
  margin-top: 26px;
}

.primary-button,
.secondary-button,
.copy-button {
  min-height: 48px;
  padding: 0 20px;
  border: 1px solid var(--ink);
  cursor: pointer;
}

.primary-button {
  display: flex;
  flex: 1;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  background: var(--ink);
  color: white;
}

.primary-button svg {
  width: 20px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-width: 1.4;
}

.secondary-button,
.copy-button {
  background: transparent;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.38;
}

.privacy-note {
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 0.74rem;
}

.result-panel {
  min-width: 0;
}

.empty-state {
  display: flex;
  max-width: 540px;
  gap: 28px;
  align-items: flex-start;
  margin-top: 64px;
}

.empty-number,
.company-index {
  color: var(--muted);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
}

.empty-state p,
.loading-state p {
  max-width: 430px;
  margin: 12px 0 0;
  color: var(--muted);
  line-height: 1.6;
}

.loading-state {
  display: grid;
  min-height: 480px;
  place-items: center;
  align-content: center;
  text-align: center;
}

.spinner {
  width: 34px;
  height: 34px;
  margin-bottom: 30px;
  border: 2px solid var(--line);
  border-top-color: var(--ink);
  border-radius: 50%;
  animation: spin 750ms linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.error-state {
  max-width: 560px;
  margin-top: 64px;
  padding: 28px;
  background: var(--red-soft);
  border: 1px solid var(--red);
}

.result-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--ink);
}

.result-header h2 {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(2.8rem, 5vw, 5rem);
  font-weight: 400;
  letter-spacing: -0.055em;
  line-height: 0.9;
}

.result-actions {
  display: flex;
  flex: 0 0 auto;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.copy-button {
  flex: 0 0 auto;
  min-height: 38px;
  padding: 0 14px;
  font-size: 0.78rem;
}

.dnc-status {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin: 22px 0;
  padding: 13px 15px;
  border: 1px solid;
  font-size: 0.78rem;
}

.dnc-status-stack {
  display: grid;
  gap: 8px;
  margin: 22px 0;
}

.dnc-status-stack .dnc-status {
  margin: 0;
}

.dnc-status strong {
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.dnc-status.is-clear {
  color: var(--green);
  background: #e0f1e6;
}

.dnc-status.is-current {
  color: var(--red);
  background: var(--red-soft);
}

.dnc-status.is-prior {
  color: #6e4e00;
  background: #fff1b8;
}

.current-role {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin: 0 0 48px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.current-role > div {
  min-width: 0;
  padding: 18px 16px 18px 0;
}

.current-role > div + div {
  padding-left: 16px;
  border-left: 1px solid var(--line);
}

.current-role dt {
  margin-bottom: 7px;
  color: var(--muted);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.current-role dd {
  margin: 0;
  overflow-wrap: anywhere;
  font-size: 0.9rem;
  line-height: 1.45;
}

.experience-list {
  display: grid;
  gap: 42px;
}

.company-card {
  display: grid;
  grid-template-columns: minmax(150px, 0.42fr) minmax(260px, 1fr);
  gap: 30px;
}

.company-header {
  display: grid;
  align-content: start;
  gap: 8px;
}

.company-header h3 {
  margin: 8px 0 0;
  font-family: var(--serif);
  font-size: 1.65rem;
  font-weight: 400;
  letter-spacing: -0.025em;
}

.company-header p {
  margin: 0;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.45;
}

.positions {
  border-top: 1px solid var(--ink);
}

.position {
  position: relative;
  padding: 20px 0 24px 22px;
  border-bottom: 1px solid var(--line);
}

.position::before {
  position: absolute;
  top: 27px;
  left: 0;
  width: 7px;
  height: 7px;
  background: var(--lime);
  border: 1px solid var(--ink);
  border-radius: 50%;
  content: "";
}

.position h4 {
  margin: 0 0 7px;
  font-size: 0.95rem;
  font-weight: 700;
}

.position p {
  margin: 0;
}

.position-dates,
.position-location {
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.5;
}

.position-description {
  margin-top: 14px !important;
  white-space: pre-wrap;
  font-size: 0.82rem;
  line-height: 1.6;
}

.crm-view {
  min-height: 680px;
  background: var(--panel);
  border: 1px solid var(--ink);
  border-top: 0;
}

.crm-header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 32px;
  padding: 38px 44px 32px;
  border-bottom: 1px solid var(--ink);
}

.crm-header h2 {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(3rem, 5vw, 5.6rem);
  font-weight: 400;
  letter-spacing: -0.055em;
  line-height: 0.85;
}

.crm-header-actions {
  display: flex;
  width: min(620px, 55%);
  align-items: end;
  justify-content: flex-end;
  gap: 12px;
}

.candidate-search {
  display: grid;
  width: min(360px, 100%);
  gap: 8px;
}

.candidate-search span {
  color: var(--muted);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.candidate-search input {
  width: 100%;
  height: 42px;
  padding: 0 13px;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 0;
  outline: none;
}

.candidate-search input:focus {
  border-color: var(--ink);
}

.role-download,
.job-link {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  color: var(--ink);
  font-size: 0.72rem;
  font-weight: 750;
  letter-spacing: 0.04em;
  text-decoration: none;
}

.role-download {
  flex: 0 0 auto;
  padding: 0 16px;
  background: var(--lime);
  border: 1px solid var(--ink);
}

.role-download:hover {
  background: var(--ink);
  color: white;
}

.job-link {
  min-height: auto;
  text-decoration: underline;
  text-underline-offset: 4px;
}

.role-browser {
  padding: 22px 44px 26px;
  border-bottom: 1px solid var(--ink);
}

.role-browser-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 18px;
}

.role-browser-heading .eyebrow {
  margin-bottom: 5px;
}

.role-browser-heading p:not(.eyebrow) {
  margin: 0;
  color: var(--muted);
  font-size: 0.76rem;
  line-height: 1.5;
}

.role-list {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}

.role-card {
  display: grid;
  min-height: 74px;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 14px;
  text-align: left;
  background: transparent;
  border: 0;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  cursor: pointer;
}

.role-card:hover {
  background: #f0ffd0;
}

.role-card.is-active {
  background: var(--ink);
  color: white;
}

.role-card.is-archived:not(.is-active) {
  color: var(--muted);
}

.role-title {
  font-size: 0.74rem;
  font-weight: 700;
  line-height: 1.35;
}

.role-count {
  display: inline-grid;
  min-width: 25px;
  height: 25px;
  place-items: center;
  padding: 0 6px;
  color: var(--ink);
  background: #dfddd4;
  border-radius: 14px;
  font-size: 0.64rem;
  font-weight: 800;
}

.role-card.is-active .role-count {
  background: var(--lime);
}

.crm-message {
  padding: 14px 44px;
  color: var(--red);
  background: var(--red-soft);
  border-bottom: 1px solid var(--red);
  font-size: 0.78rem;
}

.crm-body {
  display: grid;
  grid-template-columns: minmax(540px, 1.35fr) minmax(360px, 0.65fr);
  min-height: 510px;
}

.candidate-list-wrap {
  min-width: 0;
  border-right: 1px solid var(--ink);
}

.candidate-table-header,
.candidate-row-main {
  display: grid;
  grid-template-columns: minmax(220px, 1.1fr) minmax(180px, 0.9fr) 120px;
  gap: 24px;
  align-items: center;
}

.candidate-table-header {
  grid-template-columns: minmax(220px, 1.1fr) minmax(180px, 0.9fr) 120px 74px;
  min-height: 42px;
  padding: 0 22px;
  color: var(--muted);
  border-bottom: 1px solid var(--line);
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.candidate-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 74px;
  min-height: 92px;
  border-bottom: 1px solid var(--line);
  transition: background 130ms ease;
}

.candidate-row:hover,
.candidate-row.is-selected {
  background: #f0ffd0;
}

.candidate-row.is-selected {
  box-shadow: inset 4px 0 0 var(--ink);
}

.candidate-row-main {
  min-width: 0;
  padding: 18px 22px;
  text-align: left;
  background: transparent;
  border: 0;
  cursor: pointer;
}

.candidate-identity,
.candidate-company {
  display: grid;
  min-width: 0;
  gap: 4px;
}

.candidate-identity strong,
.candidate-company strong {
  overflow: hidden;
  font-size: 0.84rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.candidate-identity small,
.candidate-company small,
.candidate-row-main time {
  overflow: hidden;
  color: var(--muted);
  font-size: 0.7rem;
  line-height: 1.4;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.candidate-flag {
  display: inline-flex;
  width: max-content;
  align-items: center;
  padding: 3px 6px;
  font-size: 0.55rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.candidate-flags {
  display: flex;
  width: max-content;
  max-width: 100%;
  flex-wrap: wrap;
  gap: 4px;
}

.candidate-flag.is-current {
  color: #fff;
  background: #a9342c;
}

.candidate-flag.is-prior {
  color: #553c00;
  background: #f0c840;
}

.candidate-flag.is-clear {
  color: var(--green);
  background: #d9eadf;
}

.candidate-flag.is-review {
  color: #553c00;
  background: #f0c840;
}

.candidate-flag.is-archived {
  color: white;
  background: var(--muted);
}

.archive-button {
  align-self: stretch;
  padding: 0 8px;
  color: var(--muted);
  background: transparent;
  border: 0;
  border-left: 1px solid var(--line);
  font-size: 0.65rem;
  cursor: pointer;
}

.archive-button:hover {
  color: var(--ink);
  background: #e7e4da;
}

.crm-empty {
  display: flex;
  gap: 24px;
  padding: 52px 44px;
}

.crm-empty h3,
.detail-empty h3,
.detail-header h3 {
  margin: 0;
  font-family: var(--serif);
  font-size: 2rem;
  font-weight: 400;
  letter-spacing: -0.035em;
}

.crm-empty p,
.detail-empty p {
  max-width: 300px;
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.5;
}

.candidate-detail {
  min-width: 0;
  max-height: 760px;
  overflow: auto;
  padding: 32px;
  background: #f7f5ee;
}

.detail-empty {
  margin-top: 26px;
}

.detail-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--ink);
}

.detail-role,
.detail-sourced {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 0.75rem;
  line-height: 1.5;
}

.detail-sourced {
  margin: 24px 0 30px;
}

.assignment-context {
  margin: 18px 0 -8px;
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 700;
  line-height: 1.5;
}

.candidate-detail .dnc-status {
  align-items: flex-start;
  flex-direction: column;
  gap: 4px;
}

.candidate-detail .experience-list {
  gap: 32px;
}

.candidate-detail .company-card {
  grid-template-columns: 1fr;
  gap: 12px;
}

.linkedin-editor {
  display: grid;
  gap: 16px;
  margin: 26px 0;
  padding: 20px;
  background: var(--panel);
  border: 1px solid var(--line);
}

.linkedin-editor-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
}

.linkedin-editor-heading .eyebrow {
  margin-bottom: 5px;
}

.linkedin-editor h4 {
  margin: 0;
  font-family: var(--serif);
  font-size: 1.45rem;
  font-weight: 400;
  letter-spacing: -0.025em;
}

.linkedin-open-link {
  flex: 0 0 auto;
  color: var(--ink);
  font-size: 0.7rem;
  font-weight: 750;
  text-decoration: underline;
  text-underline-offset: 4px;
}

.linkedin-editor-form {
  display: grid;
  gap: 9px;
}

.linkedin-editor-form > label {
  color: var(--muted);
  font-size: 0.62rem;
  font-weight: 750;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.linkedin-editor-form > input {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  color: var(--ink);
  background: white;
  border: 1px solid var(--line);
  border-radius: 0;
  font: inherit;
  font-size: 0.78rem;
}

.linkedin-editor-form > input:focus {
  border-color: var(--ink);
  outline: none;
}

.linkedin-editor-actions {
  display: flex;
  gap: 8px;
}

.linkedin-editor-actions .primary-button,
.linkedin-editor-actions .secondary-button {
  justify-content: center;
}

.linkedin-feedback {
  margin: 2px 0 0;
  color: var(--green);
  font-size: 0.7rem;
  line-height: 1.45;
}

.linkedin-feedback.is-error {
  color: var(--red);
}

.classification-summary {
  margin: 26px 0;
  padding: 22px;
  background: var(--panel);
  border: 1px solid var(--line);
}

.classification-summary h4,
.review-actions h4 {
  margin: 0;
  font-family: var(--serif);
  font-size: 1.45rem;
  font-weight: 400;
  letter-spacing: -0.025em;
}

.classification-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  margin: 18px 0 0;
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}

.classification-grid > div {
  min-width: 0;
  padding: 12px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.classification-grid dt {
  margin-bottom: 5px;
  color: var(--muted);
  font-size: 0.58rem;
  font-weight: 750;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.classification-grid dd {
  margin: 0;
  overflow-wrap: anywhere;
  font-size: 0.75rem;
  line-height: 1.45;
}

.classification-rationale,
.review-help {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 0.75rem;
  line-height: 1.55;
}

.review-actions {
  display: grid;
  gap: 12px;
  margin: 26px 0;
  padding: 22px;
  background: #ece9df;
  border: 1px solid var(--ink);
}

.review-actions .eyebrow {
  margin-bottom: -5px;
}

.review-button-row {
  display: flex;
  gap: 8px;
}

.review-button-row .primary-button,
.review-button-row .secondary-button {
  justify-content: center;
}

.role-assignment-form {
  display: grid;
  gap: 9px;
}

.role-assignment-form label {
  color: var(--muted);
  font-size: 0.62rem;
  font-weight: 750;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.role-assignment-form select {
  width: 100%;
  min-height: 44px;
  padding: 0 12px;
  color: var(--ink);
  background: var(--panel);
  border: 1px solid var(--ink);
  border-radius: 0;
  font: inherit;
  font-size: 0.78rem;
}

.role-assignment-form .primary-button {
  justify-content: center;
}

.archive-text-button {
  width: max-content;
  padding: 0;
  color: var(--muted);
  background: transparent;
  border: 0;
  font-size: 0.7rem;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

[hidden] {
  display: none !important;
}

.sourcing-view,
.team-view {
  border: 1px solid var(--line);
  background: var(--panel);
}

.sourcing-header,
.team-header {
  border-bottom: 1px solid var(--line);
  padding: 42px 48px 32px;
}

.sourcing-header h2,
.team-header h2 {
  font-family: var(--serif);
  font-size: clamp(2.6rem, 6vw, 5rem);
  font-weight: 400;
  line-height: 0.92;
  margin: 8px 0 16px;
}

.sourcing-header p:last-child,
.team-header p:last-child {
  color: var(--muted);
  line-height: 1.6;
  margin: 0;
  max-width: 650px;
}

.sourcing-unassigned {
  margin: 0;
  padding: 16px 48px;
  color: #6e4e00;
  background: #fff1b8;
  border-bottom: 1px solid #d4aa27;
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1.5;
}

.sourcing-state {
  display: flex;
  min-height: 240px;
  align-items: flex-start;
  justify-content: center;
  flex-direction: column;
  padding: 48px;
}

.sourcing-state .spinner {
  margin-bottom: 20px;
}

.sourcing-state h3 {
  margin: 0;
  font-family: var(--serif);
  font-size: 2rem;
  font-weight: 400;
  letter-spacing: -0.035em;
}

.sourcing-state p {
  max-width: 480px;
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.6;
}

.sourcing-state.is-error {
  min-height: auto;
  color: var(--red);
  background: var(--red-soft);
}

.sourcing-state.is-error p {
  color: var(--red);
}

.sourcing-list {
  display: grid;
}

.sourcing-person {
  border-bottom: 1px solid var(--ink);
}

.sourcing-person:last-child {
  border-bottom: 0;
}

.sourcing-person-header {
  display: flex;
  min-height: 76px;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 18px 48px;
  background: #ece9df;
  border-bottom: 1px solid var(--line);
}

.sourcing-person-header > div {
  display: grid;
  min-width: 0;
  gap: 5px;
}

.sourcing-person-email {
  overflow: hidden;
  font-size: 0.9rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sourcing-person-meta {
  color: var(--muted);
  font-size: 0.7rem;
  letter-spacing: 0.04em;
  text-transform: capitalize;
}

.sourcing-person-count {
  flex: 0 0 auto;
  padding: 7px 10px;
  color: var(--ink);
  background: var(--lime);
  border: 1px solid var(--ink);
  font-size: 0.68rem;
  font-weight: 800;
}

.sourcing-person-empty {
  margin: 0;
  padding: 28px 48px;
  color: var(--muted);
  font-size: 0.78rem;
}

.sourcing-candidate-table-header,
.sourcing-candidate-row {
  display: grid;
  grid-template-columns:
    minmax(180px, 0.9fr)
    minmax(210px, 1fr)
    minmax(190px, 0.9fr)
    minmax(105px, 0.45fr);
  gap: 24px;
  align-items: center;
}

.sourcing-candidate-table-header {
  min-height: 38px;
  padding: 0 48px;
  color: var(--muted);
  border-bottom: 1px solid var(--line);
  font-size: 0.6rem;
  font-weight: 750;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.sourcing-candidate-row {
  min-height: 76px;
  padding: 15px 48px;
  border-bottom: 1px solid var(--line);
}

.sourcing-candidate-row:last-child {
  border-bottom: 0;
}

.sourcing-candidate-identity,
.sourcing-current-work {
  display: grid;
  min-width: 0;
  gap: 4px;
}

.sourcing-candidate-identity strong,
.sourcing-current-work strong,
.sourcing-assigned-role {
  overflow: hidden;
  font-size: 0.78rem;
  line-height: 1.4;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sourcing-current-work small,
.sourcing-date {
  overflow: hidden;
  color: var(--muted);
  font-size: 0.68rem;
  line-height: 1.4;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sourcing-archived {
  width: max-content;
  padding: 2px 5px;
  color: white;
  background: var(--muted);
  font-size: 0.55rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.team-invite-form {
  align-items: end;
  border-bottom: 1px solid var(--line);
  display: grid;
  gap: 16px;
  grid-template-columns: minmax(240px, 1fr) minmax(160px, 220px) auto;
  padding: 28px 48px;
}

.team-invite-form label {
  display: grid;
  gap: 8px;
}

.team-invite-form label > span {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.team-invite-form input,
.team-invite-form select {
  min-height: 44px;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--ink);
  padding: 10px 12px;
}

.team-message {
  border-bottom: 1px solid var(--line);
  color: var(--green);
  margin: 0;
  padding: 16px 48px;
}

.team-message.is-error {
  color: var(--red);
}

.team-list {
  display: grid;
}

.team-member {
  align-items: center;
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 22px 48px;
}

.team-member > div {
  display: grid;
  gap: 5px;
}

.team-member-meta {
  color: var(--muted);
  font-size: 0.82rem;
  text-transform: capitalize;
}

.toast-region {
  position: fixed;
  z-index: 1000;
  top: 24px;
  right: 24px;
  width: min(420px, calc(100vw - 48px));
  pointer-events: none;
}

.duplicate-toast {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 20px;
  padding: 20px;
  border: 1px solid var(--ink);
  background: var(--ink);
  box-shadow: 8px 8px 0 rgb(23 24 20 / 18%);
  color: white;
  pointer-events: auto;
  animation: duplicate-toast-enter 180ms ease-out;
}

.duplicate-toast strong {
  display: block;
  margin-bottom: 7px;
  color: var(--lime);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.duplicate-toast p {
  margin: 0 0 9px;
  line-height: 1.45;
}

.duplicate-toast small {
  color: #c5c7bd;
  font-size: 0.72rem;
}

.duplicate-toast-close {
  align-self: start;
  padding: 0;
  border: 0;
  background: transparent;
  color: white;
  cursor: pointer;
  font-size: 1.6rem;
  line-height: 0.8;
}

@keyframes duplicate-toast-enter {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 960px) {
  .team-invite-form {
    grid-template-columns: 1fr 180px;
  }

  .team-invite-form .primary-button {
    grid-column: 1 / -1;
    justify-content: center;
  }

  .shell {
    width: min(100% - 28px, 760px);
    padding: 38px 0;
  }

  .app-tabs {
    overflow-x: auto;
  }

  .app-tab {
    min-width: 120px;
    padding: 0 16px;
  }

  .masthead,
  .workspace,
  .crm-body {
    grid-template-columns: 1fr;
  }

  .masthead {
    gap: 24px;
  }

  .masthead h1,
  .lede {
    grid-column: 1;
    grid-row: auto;
  }

  .workspace {
    border-top: 0;
  }

  .input-panel {
    border-right: 0;
    border-bottom: 1px solid var(--ink);
  }

  .candidate-list-wrap {
    border-right: 0;
    border-bottom: 1px solid var(--ink);
  }

  .candidate-detail {
    max-height: none;
  }

  .crm-header {
    align-items: stretch;
    flex-direction: column;
  }

  .crm-header-actions {
    width: 100%;
    justify-content: flex-start;
  }

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

  .sourcing-candidate-table-header {
    display: none;
  }

  .sourcing-candidate-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .sourcing-current-work::before,
  .sourcing-assigned-role::before,
  .sourcing-date::before {
    display: block;
    margin-bottom: 3px;
    color: var(--muted);
    font-size: 0.56rem;
    font-weight: 750;
    letter-spacing: 0.08em;
    text-transform: uppercase;
  }

  .sourcing-current-work::before {
    content: "Current work";
  }

  .sourcing-assigned-role::before {
    content: "Assigned role";
  }

  .sourcing-date::before {
    content: "Sourced";
  }

  .sourcing-assigned-role,
  .sourcing-date {
    overflow: visible;
    white-space: normal;
  }
}

@media (max-width: 620px) {
  .toast-region {
    top: 12px;
    right: 12px;
    width: calc(100vw - 24px);
  }

  .shell {
    width: 100%;
    padding: 28px 0 0;
  }

  .masthead {
    align-items: flex-start;
    flex-direction: column;
    margin: 0 20px;
  }

  .masthead-account {
    align-items: flex-start;
  }

  .masthead h1 {
    font-size: clamp(3.4rem, 19vw, 5rem);
  }

  .workspace {
    border-right: 0;
    border-left: 0;
  }

  .app-tabs {
    overflow-x: auto;
    border-right: 0;
    border-left: 0;
  }

  .app-tab {
    min-width: 120px;
    padding: 0 16px;
  }

  .input-panel,
  .result-panel {
    padding: 24px 20px 38px;
  }

  .result-header {
    align-items: stretch;
    flex-direction: column;
  }

  .result-actions {
    justify-content: flex-start;
  }

  .drop-zone {
    min-height: 270px;
    padding: 24px;
  }

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

  .current-role,
  .company-card {
    grid-template-columns: 1fr;
  }

  .current-role > div,
  .current-role > div + div {
    padding: 14px 0;
    border-left: 0;
    border-bottom: 1px solid var(--line);
  }

  .company-card {
    gap: 16px;
  }

  .dnc-status {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
  }

  .crm-view {
    border-right: 0;
    border-left: 0;
  }

  .crm-header {
    align-items: stretch;
    flex-direction: column;
    padding: 28px 20px;
  }

  .crm-header-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .candidate-search {
    width: 100%;
  }

  .role-download {
    width: 100%;
  }

  .role-browser {
    padding: 20px;
  }

  .role-browser-heading {
    align-items: flex-start;
    flex-direction: column;
  }

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

  .candidate-table-header {
    display: none;
  }

  .candidate-row {
    grid-template-columns: minmax(0, 1fr) 66px;
  }

  .candidate-row-main {
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
    padding: 18px 20px;
  }

  .candidate-company {
    display: none;
  }

  .candidate-detail {
    padding: 28px 20px;
  }

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

  .review-button-row {
    align-items: stretch;
    flex-direction: column;
  }

  .linkedin-editor-heading,
  .linkedin-editor-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .linkedin-open-link {
    width: max-content;
  }

  .sourcing-view,
  .team-view {
    border-right: 0;
    border-left: 0;
  }

  .sourcing-header,
  .sourcing-state,
  .sourcing-person-header,
  .sourcing-person-empty,
  .sourcing-candidate-row,
  .team-header,
  .team-invite-form,
  .team-member {
    padding-right: 20px;
    padding-left: 20px;
  }

  .sourcing-unassigned {
    padding-right: 20px;
    padding-left: 20px;
  }

  .sourcing-person-header {
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
  }

  .sourcing-candidate-table-header {
    display: none;
  }

  .sourcing-candidate-row {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .team-invite-form {
    align-items: stretch;
    grid-template-columns: 1fr;
  }

  .team-invite-form .primary-button {
    grid-column: auto;
  }

  .team-member {
    align-items: flex-start;
    flex-direction: column;
  }
}
