/* css/cards-drawer.css (was css/legacy-cards-drawer.css; UX01 C4, DS-07).
   Job cards style the ?jb-v2=0 board; the drawer rules below style the
   detail drawer both views open. The drawer chassis lives in
   css/overlay.css. */
/* ============================================
   JOB CARDS — 3-tier flat layout
   ============================================
   Layout model:
     article.job-card
       .card-identity           — title + priority icon, company + stage pill
       .card-context            — inline dot-separated: location · salary · date
       .card-hook               — one-sentence AI hook
       .card-peek <details>     — Tier 2: AI summary, fit, tags, must-haves
       .card-actions-row        — inline: View role | Cover | Resume | expand chevron
       .job-card__details       — Tier 3: expand band (talking points + pipeline write-back)
   ============================================ */

/* ============================================
   PIPELINE BOARD — Stage lanes + Kanban cards
   ============================================ */

.pipeline-board {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

/* Stage lane */
.stage-lane {
  background: var(--glass-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  overflow: hidden;
  transition:
    box-shadow 200ms var(--ease),
    border-color 200ms var(--ease);
}

.stage-lane:hover {
  border-color: var(--border-bright);
}

.stage-lane--archive {
  opacity: 0.72;
}

/* Stage header button */
.stage-lane__header {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  width: 100%;
  padding: var(--space-3) var(--space-4);
  background: transparent;
  border: none;
  cursor: pointer;
  text-align: left;
  font: inherit;
  color: var(--text);
  transition: background 150ms var(--ease);
  min-height: 3rem;
}

.stage-lane__header:hover {
  background: var(--surface-2);
}

.stage-lane__name {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--text);
  letter-spacing: -0.01em;
}

.stage-lane--archive .stage-lane__name {
  color: var(--text-faint);
}

.stage-lane__count {
  font-size: var(--text-xs);
  font-weight: 600;
  font-family: var(--font-mono);
  color: var(--text-faint);
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 1px 8px;
  min-width: 1.5rem;
  text-align: center;
}

.stage-lane__chevron {
  margin-left: auto;
  color: var(--text-faint);
  transition: transform 220ms var(--ease);
  flex-shrink: 0;
}

.stage-lane--expanded .stage-lane__chevron {
  transform: rotate(180deg);
}

/* Status dot */
.stage-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.stage-dot--new {
  background: var(--status-new-text);
}
.stage-dot--researching {
  background: var(--status-researching-text);
}
.stage-dot--applied {
  background: var(--status-applied-text);
}
.stage-dot--phone-screen {
  background: var(--status-phone-text);
}
.stage-dot--interviewing {
  background: var(--status-interviewing-text);
}
.stage-dot--offer {
  background: var(--status-offer-text);
}
.stage-dot--rejected {
  background: var(--status-rejected-text, #b91c1c);
}
.stage-dot--passed {
  background: var(--status-passed-text, #4b5563);
}
.stage-dot--expired {
  background: var(--status-expired-text, #57534e);
}

/* Stage body (shown/hidden on expand) */
.stage-lane__body {
  display: none;
  border-top: 1px solid var(--divider);
  padding: var(--space-3) 0 var(--space-3);
}

.stage-lane--expanded .stage-lane__body {
  display: block;
  animation: fadeIn 200ms var(--ease) both;
}

/* Scroll area: nav buttons flank the track */
.stage-lane__scroll-area {
  display: flex;
  align-items: center;
  gap: var(--space-1);
  padding: 0 var(--space-3);
}

/* Scrollable card track */
.stage-lane__track {
  flex: 1;
  display: flex;
  flex-direction: row;
  gap: var(--space-3);
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding: var(--space-1) 2px var(--space-2);
}

.stage-lane__track::-webkit-scrollbar {
  display: none;
}

/* Nav chevron buttons */
.stage-lane__nav {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--glass-bg);
  color: var(--text-muted);
  cursor: pointer;
  transition:
    background var(--transition),
    border-color var(--transition),
    color var(--transition),
    opacity var(--transition);
}

.stage-lane__nav:hover:not(:disabled) {
  background: var(--surface-2);
  border-color: var(--border-bright);
  color: var(--text);
}

.stage-lane__nav:disabled {
  opacity: 0.28;
  cursor: default;
}

/* Per-company cap affordance — small label between the cards and the
   scroll indicator. Purely informative; pointer:help reveals the tooltip. */
.stage-lane__hidden {
  margin: 4px var(--space-3) 4px;
  font-family: var(--font-mono, monospace);
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--jb-ink-3);
  text-align: center;
  opacity: 0.7;
  cursor: help;
}

/* Scroll position indicator bar */
.stage-lane__indicator {
  position: relative;
  height: 3px;
  background: var(--surface-2);
  border-radius: 999px;
  margin: 0 var(--space-3) var(--space-1);
  overflow: visible;
}

.stage-indicator-thumb {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  min-width: 16%;
  background: var(--accent);
  border-radius: 999px;
  transition:
    left 80ms linear,
    width 80ms linear;
}

/* Kanban card */
.kanban-card {
  --card-stage-color: var(--accent);
  position: relative;
  scroll-snap-align: start;
  flex-shrink: 0;
  width: 264px;
  min-height: 220px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: inset 3px 0 0 var(--card-stage-color);
  padding: var(--space-4) var(--space-4) var(--space-4)
    calc(var(--space-4) + 3px);
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  cursor: pointer;
  outline: none;
  transition:
    box-shadow 160ms var(--ease),
    border-color 160ms var(--ease),
    transform 160ms var(--ease);
  animation: slideIn 250ms var(--ease) both;
}

.kanban-card:hover {
  box-shadow:
    inset 3px 0 0 var(--card-stage-color),
    var(--shadow-hover);
  border-color: var(--border-bright);
  transform: translateY(-2px);
}

.kanban-card:focus-visible {
  box-shadow:
    inset 3px 0 0 var(--card-stage-color),
    0 0 0 2px var(--accent);
  border-color: var(--accent);
}

/* Viewed state — dot indicator remains; stage color still shows on the rail */
.kanban-card--viewed {
  --card-stage-color: var(--text-faint);
}

/* Stage-specific left accent — placed after --viewed so stage color wins when both classes are present */
.kanban-card--stage-new {
  --card-stage-color: var(--stage-rail-new);
}
.kanban-card--stage-researching {
  --card-stage-color: var(--stage-rail-researching);
}
.kanban-card--stage-applied {
  --card-stage-color: var(--stage-rail-applied);
}
.kanban-card--stage-phone-screen {
  --card-stage-color: var(--stage-rail-phone-screen);
}
.kanban-card--stage-interviewing {
  --card-stage-color: var(--stage-rail-interviewing);
}
.kanban-card--stage-offer {
  --card-stage-color: var(--stage-rail-offer);
}
.kanban-card--stage-rejected {
  --card-stage-color: var(--stage-rail-rejected);
}
.kanban-card--stage-passed {
  --card-stage-color: var(--stage-rail-passed);
}
.kanban-card--stage-expired {
  --card-stage-color: var(--stage-rail-expired);
}

/* Viewed dot — quiet indicator, top-right corner.
   Hidden whenever the action buttons are visible so the X/★ never stack
   on top of the dot. */
.kanban-card__viewed-dot {
  position: absolute;
  top: 11px;
  right: 11px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--text-faint);
  opacity: 0.55;
  pointer-events: none;
  transition: opacity 120ms var(--ease);
}
.kanban-card:hover .kanban-card__viewed-dot,
.kanban-card:focus-within .kanban-card__viewed-dot,
.kanban-card--dismissed .kanban-card__viewed-dot,
.kanban-card--favorited .kanban-card__viewed-dot {
  opacity: 0;
}

.kanban-card__identity {
  display: flex;
  align-items: flex-start;
  gap: var(--space-2);
}

.kanban-card__identity-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  flex: 1;
  /* Reserve room in the top-right corner so the title + company never run
     under the absolutely-positioned action buttons (★ / ✕ / ↺). Two 26px
     icon buttons + 2px gap + 6px offset = ~60px. */
  padding-right: 60px;
}

/* Role title — hero, 2-line clamp */
.kanban-card__title {
  font-size: clamp(1.05rem, 2.6vw, 1.25rem);
  font-weight: 700;
  color: var(--text);
  line-height: 1.22;
  letter-spacing: -0.03em;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Company — clear but secondary to title */
.kanban-card__company {
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  letter-spacing: -0.02em;
}

.kanban-card__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.kanban-card__tag {
  font-size: 10px;
  font-weight: 600;
  font-family: var(--font-mono);
  color: var(--accent-text);
  background: var(--accent-dim);
  border-radius: var(--radius-sm);
  padding: 2px 6px;
  white-space: nowrap;
  letter-spacing: 0.01em;
}

/* Card action icons (favorite / dismiss / restore) — top-right corner,
   fade in on hover so the resting card stays quiet. Favorite stays
   visible when active so the filled star reads as state, not chrome. */
.kanban-card__actions {
  position: absolute;
  top: 6px;
  right: 6px;
  display: flex;
  gap: 2px;
  z-index: 2;
  opacity: 0;
  transition: opacity 160ms var(--ease);
}

.kanban-card:hover .kanban-card__actions,
.kanban-card:focus-within .kanban-card__actions,
.kanban-card--dismissed .kanban-card__actions,
.kanban-card--favorited .kanban-card__actions {
  opacity: 1;
}

.card-action-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  padding: 0;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text-faint);
  cursor: pointer;
  transition:
    color 140ms var(--ease),
    background 140ms var(--ease),
    border-color 140ms var(--ease);
}

.card-action-btn:hover {
  background: var(--surface-2);
  border-color: var(--border);
  color: var(--text);
}

.card-action-btn:focus-visible {
  outline: 2px solid var(--jb-focus-color);
  outline-offset: 1px;
}

.card-action-btn--fav.is-active {
  color: var(--hot-orange);
}
.card-action-btn--fav.is-active:hover {
  color: var(--hot-orange);
  background: var(--hot-bg);
  border-color: var(--hot-border);
}

.card-action-btn--dismiss:hover {
  color: var(--toast-error);
  background: var(--toast-error-bg);
  border-color: #fecaca;
}

.card-action-btn--restore:hover {
  color: var(--accent-text);
  background: var(--accent-dim);
  border-color: rgba(89, 203, 137, 0.3);
}

/* Dismissed-row treatment — muted + strikethrough on title.
   Used when "Show dismissed" is toggled on. */
.kanban-card--dismissed {
  opacity: 0.6;
}
.kanban-card--dismissed:hover {
  opacity: 0.85;
}
.kanban-card--dismissed .kanban-card__title {
  text-decoration: line-through;
  text-decoration-color: var(--text-faint);
  text-decoration-thickness: 1px;
}

/* ============================================
   DETAIL DRAWER
   ============================================ */

.detail-drawer__head {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  justify-content: space-between;
  padding: var(--space-4) var(--space-4) var(--space-3);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  min-height: auto;
}

.detail-drawer__head-main {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  min-width: 0;
  flex: 1;
}

.detail-drawer__head-title {
  font-size: clamp(1.375rem, 4vw, 1.75rem);
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.035em;
  line-height: 1.2;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.detail-drawer__head-company {
  font-size: var(--text-lg);
  font-weight: 500;
  color: var(--text-muted);
  line-height: 1.35;
  margin: 0;
  letter-spacing: -0.02em;
}

/* Logo in drawer header — center with title baseline */
.detail-drawer__head > .co-logo {
  margin-top: var(--space-1);
}

/* Location + salary — drawer header */
.role-facts--drawer {
  margin-top: var(--space-1);
  width: 100%;
}

.detail-drawer__close {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface);
  color: var(--text-muted);
  cursor: pointer;
  transition:
    color var(--transition),
    background var(--transition),
    border-color var(--transition);
}

.detail-drawer__close:hover {
  background: var(--surface-hover);
  color: var(--text);
  border-color: var(--border-bright);
}

.detail-drawer__actions {
  display: flex;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-4);
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 3.25rem; /* height of __head */
  z-index: 9;
}

.drawer-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 9px var(--space-4);
  font-size: var(--text-sm);
  font-weight: 600;
  border-radius: var(--radius-md);
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  border: none;
  transition: all 150ms var(--ease);
  line-height: 1;
}

/* Cover letter — bold primary CTA, solid accent fill */
.drawer-btn--cover {
  flex: 1;
  background: var(--accent, #059669);
  color: #fff;
  box-shadow:
    0 1px 3px rgba(5, 150, 105, 0.3),
    0 1px 2px rgba(5, 150, 105, 0.2);
}

.drawer-btn--cover:hover {
  background: #047857;
  color: #fff;
  box-shadow: 0 3px 8px rgba(5, 150, 105, 0.35);
  transform: translateY(-1px);
}

/* Tailor resume — bold secondary CTA, amber fill */
.drawer-btn--tailor {
  flex: 1;
  background: #b45309;
  color: #fff;
  box-shadow:
    0 1px 3px rgba(180, 83, 9, 0.28),
    0 1px 2px rgba(180, 83, 9, 0.18);
}

.drawer-btn--tailor:hover {
  background: #92400e;
  color: #fff;
  box-shadow: 0 3px 8px rgba(180, 83, 9, 0.32);
  transform: translateY(-1px);
}

/* View posting — understated tertiary link */
.drawer-btn--view {
  background: var(--surface-2);
  color: var(--text-muted);
  border: 1px solid var(--border);
  flex: 0 0 auto;
}

.drawer-btn--view:hover {
  background: var(--surface-hover);
  color: var(--text);
  border-color: var(--border-bright);
  text-decoration: none;
  transform: translateY(-1px);
}

.detail-drawer__body {
  padding: 0;
  flex: 1;
}

/* ── Stage stepper wrapper with chevron nav ── */
.stage-stepper-wrap {
  display: flex;
  align-items: center;
  gap: 0;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
  overflow: hidden;
}

.stage-stepper__chevron {
  flex-shrink: 0;
  width: 28px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  transition:
    color var(--transition),
    background var(--transition);
  z-index: 1;
}

.stage-stepper__chevron:hover {
  color: var(--text);
  background: rgba(0, 0, 0, 0.04);
}

.stage-stepper__chevron:disabled {
  opacity: 0.3;
  cursor: default;
}

/* ── Stage stepper (Ashby-style) ── */
.stage-stepper {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  padding: var(--space-3) 0;
  flex: 1;
  overflow-x: auto;
  scrollbar-width: none;
}
.stage-stepper::-webkit-scrollbar {
  display: none;
}

.stage-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 4px 2px;
  background: none;
  border: none;
  cursor: pointer;
  flex-shrink: 0;
  position: relative;
}

.stage-step__dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 2px solid var(--text-faint);
  background: transparent;
  transition: all 180ms var(--ease);
  flex-shrink: 0;
}

.stage-step__label {
  font-size: 9px;
  font-weight: 500;
  color: var(--text-faint);
  white-space: nowrap;
  letter-spacing: 0.02em;
  transition: color 180ms var(--ease);
}

.stage-step__line {
  flex: 0 0 20px;
  height: 2px;
  background: var(--border);
  align-self: flex-start;
  margin-top: 8px;
  transition: background 180ms var(--ease);
}
.stage-step__line--done {
  background: var(--accent);
}

/* Done steps */
.stage-step--done .stage-step__dot {
  background: var(--accent);
  border-color: var(--accent);
}
.stage-step--done .stage-step__label {
  color: var(--text-muted);
}

/* Active step */
.stage-step--active .stage-step__dot {
  width: 12px;
  height: 12px;
  background: var(--accent);
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(89, 203, 137, 0.2);
}
.stage-step--active .stage-step__label {
  font-weight: 700;
  color: var(--text);
  font-size: 10px;
}

/* Terminal states (Rejected / Passed) */
.stage-step--terminal .stage-step__dot {
  border-color: var(--text-faint);
  border-style: dashed;
}
.stage-step--terminal.stage-step--active .stage-step__dot {
  border-style: solid;
}
.stage-step--terminal.stage-step--active[data-stage="Rejected"]
  .stage-step__dot {
  background: var(--status-rejected-text);
  border-color: var(--status-rejected-text);
  box-shadow: 0 0 0 3px rgba(185, 28, 28, 0.15);
}
.stage-step--terminal.stage-step--active[data-stage="Passed"] .stage-step__dot {
  background: var(--text-faint);
  border-color: var(--text-faint);
  box-shadow: 0 0 0 3px rgba(75, 85, 99, 0.12);
}
.stage-step--terminal.stage-step--active[data-stage="Expired"] .stage-step__dot {
  background: var(--status-expired-text);
  border-color: var(--status-expired-text);
  box-shadow: 0 0 0 3px rgba(87, 83, 78, 0.12);
}

.stage-step:hover .stage-step__dot {
  border-color: var(--accent);
  transform: scale(1.2);
}
.stage-step:hover .stage-step__label {
  color: var(--text);
}

/* ── Drawer two-column layout ── */
.drawer-content {
  display: flex;
  flex-direction: column;
}

.drawer-columns {
  display: grid;
  grid-template-columns: 1fr 220px;
  gap: 0;
  min-height: 0;
  align-items: start;
}

.drawer-col {
  padding: var(--space-4);
}

.drawer-col--main {
  padding-right: var(--space-3);
  border-right: 1px solid var(--border);
}

.drawer-col--props {
  padding-left: var(--space-3);
  position: sticky;
  top: 6.5rem;
  align-self: start;
  max-height: calc(100vh - 7.5rem);
  overflow-y: auto;
  scrollbar-width: thin;
}

@media (max-width: 640px) {
  .drawer-columns {
    grid-template-columns: 1fr;
  }
  .drawer-col--main {
    border-right: none;
    border-bottom: 1px solid var(--border);
    padding-right: var(--space-4);
  }
  .drawer-col--props {
    padding-left: var(--space-4);
    position: static;
    max-height: none;
    overflow-y: visible;
  }
}

/* ── Drawer notes (in right column, below properties) ── */
.drawer-notes {
  margin-top: var(--space-3);
  padding-top: var(--space-3);
  border-top: 1px solid var(--border);
}

.drawer-notes__input {
  width: 100%;
  min-height: 96px;
  padding: var(--space-3);
  font-size: var(--text-sm);
  line-height: 1.6;
  background: rgba(255, 255, 255, 0.55);
  border: 1px solid var(--glass-stroke);
  border-radius: var(--radius-md);
  resize: vertical;
  transition: all var(--transition);
  font-family: inherit;
}

.drawer-notes__input::placeholder {
  color: var(--text-faint);
}

.drawer-notes__input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(89, 203, 137, 0.1);
  background: var(--surface);
}

.drawer-notes__input.saving {
  border-color: var(--border-bright);
  background: var(--surface-2);
}

/* ── Section labels (drawer: AI Summary, talking points, posting snippets, Notes, …) ── */
.drawer-section__label,
.detail-drawer .posting-snippet-label {
  font-size: var(--text-sm);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.045em;
  color: var(--text-muted);
  margin-bottom: var(--space-2);
}

.drawer-section__label {
  display: flex;
  align-items: center;
  gap: 4px;
}

.detail-drawer .drawer-col--main > .posting-struct {
  margin-top: var(--space-4);
  padding-top: var(--space-4);
  border-top: 1px solid rgba(15, 23, 42, 0.08);
}

.detail-drawer .drawer-col--main > .posting-struct:first-child {
  margin-top: 0;
  padding-top: 0;
  border-top: none;
}

.detail-drawer .posting-req {
  margin-top: var(--space-4);
  padding-top: var(--space-4);
}

/* ── Enrichment loading skeleton ── */
@keyframes skeletonShimmer {
  0% {
    background-position: -600px 0;
  }
  100% {
    background-position: 600px 0;
  }
}

/* Base bone: shimmer sweep */
.enr-skel-bone {
  background: linear-gradient(
    90deg,
    var(--surface-2) 0px,
    rgba(255, 255, 255, 0.88) 200px,
    var(--surface-2) 400px
  );
  background-size: 600px 100%;
  animation: skeletonShimmer 1.5s linear infinite;
  border-radius: var(--radius-sm);
}

/* Outer wrapper */
.drawer-enrichment-skeleton {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

/* ── About this role card shell ── */
.enr-skel-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.enr-skel-card__head {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-3);
  background: var(--surface-2);
  border-bottom: 1px solid var(--border);
}

.enr-skel-card__arrow {
  width: 8px;
  height: 8px;
  flex-shrink: 0;
  border-radius: 2px;
}

.enr-skel-card__title {
  height: 0.7rem;
  width: 108px;
  border-radius: 3px;
}

.enr-skel-card__body {
  padding: var(--space-3);
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

/* ── Generic section (label + lines) ── */
.enr-skel-section {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.enr-skel-section__label {
  height: 0.55rem;
  width: 4.5rem;
  border-radius: 3px;
  opacity: 0.75;
  margin-bottom: 2px;
}

.enr-skel-line {
  height: 0.8125rem;
  border-radius: 4px;
}
.enr-skel-line--w100 {
  width: 100%;
}
.enr-skel-line--w92 {
  width: 92%;
}
.enr-skel-line--w83 {
  width: 83%;
}
.enr-skel-line--w74 {
  width: 74%;
}
.enr-skel-line--w65 {
  width: 65%;
}
.enr-skel-line--w56 {
  width: 56%;
}

/* ── Tag chips ── */
.enr-skel-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 2px;
}

.enr-skel-chip {
  height: 1.375rem;
  border-radius: 999px;
}
.enr-skel-chip--xs {
  width: 3.25rem;
}
.enr-skel-chip--sm {
  width: 4.75rem;
}
.enr-skel-chip--md {
  width: 6rem;
}
.enr-skel-chip--lg {
  width: 7.5rem;
}

/* ── Talking-points block ── */
.enr-skel-tp {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  padding: var(--space-3);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}

.enr-skel-tp__label {
  height: 0.65rem;
  width: 8rem;
  border-radius: 3px;
  margin-bottom: var(--space-1);
}

/* Indented bullet-like lines */
.enr-skel-tp__item {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.enr-skel-tp__bullet {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}

.enr-skel-tp__text {
  height: 0.8125rem;
  border-radius: 4px;
  flex: 1;
}

/* ── "About this role" collapsible ── */
.drawer-about {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  margin-bottom: var(--space-4);
  overflow: hidden;
}

.drawer-about__toggle {
  display: flex;
  align-items: center;
  padding: var(--space-3) var(--space-3);
  font-size: var(--text-sm);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.045em;
  color: var(--text-muted);
  cursor: pointer;
  background: var(--surface-2);
  list-style: none;
  user-select: none;
}

.drawer-about__toggle::-webkit-details-marker {
  display: none;
}

.drawer-about__toggle::before {
  content: "▸";
  margin-right: var(--space-2);
  transition: transform 150ms var(--ease);
  font-size: var(--text-xs);
  color: var(--text-faint);
  font-weight: 700;
}

.drawer-about[open] .drawer-about__toggle::before {
  transform: rotate(90deg);
}

.drawer-about__body {
  padding: var(--space-3) var(--space-3) var(--space-4);
  border-top: 1px solid rgba(15, 23, 42, 0.06);
}

/* ── AI sections inside drawer ── */
.drawer-ai-section {
  margin-bottom: var(--space-3);
}

.drawer-ai-text {
  font-size: var(--text-sm);
  line-height: 1.55;
  color: var(--text);
  margin: 0;
}

.drawer-hook {
  font-size: var(--text-sm);
  font-style: italic;
  color: var(--text-muted);
  line-height: 1.4;
  margin: 0 0 var(--space-2);
}

.drawer-context {
  font-size: var(--text-xs);
  color: var(--text-muted);
  margin: 0 0 var(--space-2);
}

.drawer-context--date {
  color: var(--text-faint);
  font-size: 0.6875rem;
}

/* ── Company logo (shared) ── */
.co-logo-wrap {
  display: contents;
}

.co-logo {
  display: block;
  object-fit: contain;
  border-radius: var(--radius-md);
  background: var(--surface-2);
  border: 1px solid var(--border);
  flex-shrink: 0;
}

.co-logo--fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: var(--text-muted);
  letter-spacing: -0.02em;
  user-select: none;
}

.co-logo--sm {
  width: 28px;
  height: 28px;
  font-size: 0.75rem;
}

.co-logo--md {
  width: 36px;
  height: 36px;
  font-size: 0.875rem;
}

.co-logo--lg {
  width: 48px;
  height: 48px;
  font-size: 1.125rem;
}

/* Shared: location + compensation facts */
.role-facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(9.5rem, 1fr));
  gap: var(--space-2);
}

.role-facts--card {
  margin-top: var(--space-3);
}

.role-facts--kanban {
  margin-top: var(--space-2);
  grid-template-columns: 1fr;
  gap: var(--space-2);
}

.role-fact {
  padding: var(--space-2) var(--space-3);
  background: linear-gradient(180deg, var(--surface-2) 0%, var(--surface) 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}

.role-fact__label {
  display: block;
  font-size: 0.625rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--text-faint);
  margin-bottom: var(--space-1);
}

.role-fact__value {
  display: block;
  font-size: var(--text-base);
  font-weight: 600;
  color: var(--text);
  line-height: 1.35;
  letter-spacing: -0.02em;
}

.role-fact__value--salary {
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}

/* ── Compact property panel (right column) ── */
.drawer-props {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.drawer-prop {
  display: grid;
  grid-template-columns: 14px auto 1fr;
  gap: 6px;
  align-items: center;
  min-height: 28px;
}

.drawer-prop__icon {
  color: var(--text-faint);
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.drawer-prop__key {
  font-size: 11px;
  font-weight: 500;
  color: var(--text-muted);
  white-space: nowrap;
}

.drawer-prop__val {
  font-size: var(--text-xs);
  color: var(--text);
  background: transparent;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  padding: 3px 6px;
  transition: all var(--transition);
  min-width: 0;
}

.drawer-prop__val:hover {
  border-color: var(--border);
  background: var(--surface);
}

.drawer-prop__val:focus {
  outline: none;
  border-color: var(--accent);
  background: var(--surface);
  box-shadow: 0 0 0 2px rgba(89, 203, 137, 0.1);
}

.drawer-prop__val--static {
  border: none;
  padding: 3px 0;
  font-weight: 500;
  color: var(--text-muted);
}

select.drawer-prop__val {
  -webkit-appearance: none;
  appearance: none;
  cursor: pointer;
  padding-right: 20px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 24 24' fill='none' stroke='%239ca3af' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 4px center;
}

/* Fetch bar inside props column */
.drawer-fetch-bar {
  margin-top: var(--space-3);
  padding-top: var(--space-3);
  border-top: 1px solid var(--border);
  flex-direction: column;
}

.drawer-fetch-bar .btn-fetch-posting {
  width: 100%;
  justify-content: center;
  font-size: var(--text-xs);
}

.drawer-fetch-bar .posting-fetched-at {
  text-align: center;
}


/* ============================================
   DRAWER CARD STYLES (retired list-card selectors pruned)
   ============================================ */


.card-peek__list {
  margin: 0;
  padding-left: 1.1rem;
  font-size: var(--text-sm);
  color: var(--text-muted);
  line-height: 1.55;
}

.card-peek__list li {
  margin-bottom: 3px;
}

.card-peek__source {
  font-size: 0.6875rem;
  font-weight: 500;
  color: var(--text-faint);
  margin: 0;
}

/* Tags inside peek */
.card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-1);
  align-items: center;
}

.card-tags-extra {
  display: none;
}

.card-tags--expanded .card-tags-extra {
  display: contents;
}

.skill-chip {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  font-size: var(--text-xs);
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.48);
  border: 1px solid var(--glass-stroke);
  border-radius: 999px;
  line-height: 1.35;
  max-width: 100%;
}

.tag-more-btn {
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--text-muted);
  padding: 4px 8px;
  border-radius: var(--radius-soft);
  border: 1px solid var(--border);
  background: var(--surface-2);
  cursor: pointer;
  transition: all var(--transition);
}

.tag-more-btn:hover {
  border-color: var(--border-bright);
  color: var(--text);
  background: var(--surface-hover);
}

/* ============================================
   TALKING POINTS (active drawer content)
   ============================================ */

.talking-points-list {
  list-style: none;
  padding: 0;
  margin: 0;
  font-size: var(--text-sm);
  color: var(--text-muted);
  line-height: 1.6;
}

.talking-points-list li {
  padding-left: var(--space-4);
  position: relative;
  margin-bottom: var(--space-2);
}

.talking-points-list li::before {
  content: "›";
  position: absolute;
  left: var(--space-1);
  color: var(--text-faint);
  font-weight: 600;
}

/* Posting content in expanded */
.posting-snippet {
  padding: var(--space-3);
  background: rgba(255, 255, 255, 0.42);
  border: 1px solid rgba(15, 23, 42, 0.06);
  border-radius: var(--radius-soft);
  width: 100%;
  box-sizing: border-box;
}

.posting-snippet-label {
  display: block;
  font-size: 0.625rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--text-faint);
  margin-bottom: var(--space-1);
}

.posting-snippet-text {
  font-size: var(--text-sm);
  color: var(--text);
  line-height: 1.55;
  margin: 0;
  white-space: pre-line;
  word-break: break-word;
  max-height: 22rem;
  overflow-y: auto;
  scrollbar-gutter: stable;
}

.posting-req {
  margin-top: var(--space-3);
  padding-top: var(--space-3);
  border-top: 1px solid rgba(15, 23, 42, 0.06);
}

.posting-req-list {
  margin: 0;
  padding-left: 1.1rem;
  font-size: var(--text-sm);
  color: var(--text-muted);
  line-height: 1.55;
}

.posting-req-list li {
  margin-bottom: 4px;
}

.posting-raw-details {
  font-size: var(--text-xs);
  color: var(--text-muted);
}

.posting-raw-details summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--accent-text);
  margin-bottom: var(--space-2);
}

.posting-struct {
  margin: 0;
}

.posting-struct--must .posting-snippet-label {
  color: rgba(180, 83, 9, 0.95);
}

.posting-fetch-meta {
  font-size: 0.625rem;
  color: var(--text-faint);
  margin: var(--space-2) 0 0;
}

.posting-scrape-notes {
  font-size: 0.625rem;
  color: var(--text-muted);
  margin: var(--space-1) 0 0;
  line-height: 1.4;
}

/* Fetch posting + AI insights button bar */
.posting-fetch-bar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-2);
  padding: var(--space-3) 0 var(--space-3);
  border-bottom: 1px solid var(--divider);
  margin-bottom: var(--space-3);
}

.btn-fetch-posting {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--accent-text);
  background: var(--accent-dim);
  border: 1px solid rgba(89, 203, 137, 0.28);
  border-radius: var(--radius-soft);
  padding: 4px 10px;
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
}

.btn-fetch-posting:hover:not(:disabled) {
  background: rgba(89, 203, 137, 0.18);
  border-color: rgba(89, 203, 137, 0.45);
}

.btn-fetch-posting:disabled {
  opacity: 0.5;
  cursor: default;
}

.btn-fetch-posting--llm {
  color: var(--text-muted);
  background: var(--surface-2);
  border-color: var(--border);
}

.btn-fetch-posting--llm:hover:not(:disabled) {
  background: var(--surface-hover);
  border-color: var(--border-bright);
  color: var(--text);
}

.posting-fetched-at {
  margin-left: auto;
  font-size: var(--text-xs);
  color: var(--text-faint);
  font-style: italic;
}

.posting-llm-warn {
  font-size: var(--text-xs);
  color: var(--toast-warn, #b45309);
  margin: var(--space-2) 0 0;
}

.card-source-meta {
  margin-top: var(--space-2);
  font-size: 0.625rem;
  color: var(--text-faint);
}

.card-source-meta__summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--text-muted);
  list-style: none;
}

.card-source-meta__body {
  margin-top: var(--space-2);
}

/* Meta chips (contact/reply/heard — Tier 3 only) */
.card-meta--chips {
  display: flex;
  flex-wrap: wrap;
  gap: 2px;
  align-items: stretch;
  margin-top: var(--space-3);
}

.meta-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  font-size: var(--text-xs);
  color: var(--text-muted);
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-soft);
  max-width: 100%;
  font-variant-numeric: tabular-nums;
}

.meta-chip svg {
  opacity: 0.45;
  flex-shrink: 0;
}

.meta-chip--contact {
  border-style: solid;
  border-color: var(--border-bright);
}

/* Legacy: compat classes from old layout that other code may reference */
.card-meta:not(.card-meta--chips) {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  align-items: center;
  margin-bottom: var(--space-3);
  font-size: var(--text-xs);
  color: var(--text-muted);
}
