/* ─────────────────────────────────────────────────────
   Job Hunter Dashboard — styles.css

   Design tokens live in :root. Legacy hex values remain in older rules
   for back-compat; prefer tokens for all new/updated components.
   ───────────────────────────────────────────────────── */

:root {
  /* Brand + surface */
  --brand: #6C63FF;
  --brand-600: #5a52e0;
  --brand-50: #eef2ff;
  --brand-ring: rgba(108, 99, 255, 0.22);
  --brand-gradient: linear-gradient(135deg, #6C63FF 0%, #8a82ff 60%, #a5c7ff 100%);

  --bg-app: #f8f9fc;
  --bg-hero: linear-gradient(135deg, rgba(108, 99, 255, 0.06), rgba(168, 162, 255, 0.04) 60%, rgba(251, 211, 141, 0.03));
  --bg-surface: #ffffff;
  --bg-surface-muted: #f5f6fb;
  --bg-elev: #ffffff;

  /* Ink */
  --ink-strong: #0f172a;
  --ink: #1e2532;
  --ink-muted: #6b7280;
  --ink-quiet: #9ca3af;

  /* Lines */
  --line: #e8eaf0;
  --line-soft: #f1f2f7;

  /* Feedback */
  --good: #16a34a;
  --good-soft: #dcfce7;
  --warn: #d97706;
  --warn-soft: #fef3c7;
  --bad: #dc2626;
  --bad-soft: #fee2e2;

  /* Shadows */
  --shadow-xs: 0 1px 2px rgba(15, 23, 42, 0.04);
  --shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.06), 0 1px 2px rgba(15, 23, 42, 0.04);
  --shadow-md: 0 4px 12px rgba(15, 23, 42, 0.08), 0 2px 4px rgba(15, 23, 42, 0.04);
  --shadow-lg: 0 10px 30px rgba(15, 23, 42, 0.10), 0 4px 10px rgba(15, 23, 42, 0.05);
  --shadow-brand: 0 4px 14px rgba(108, 99, 255, 0.24);
  --shadow-brand-lg: 0 10px 30px rgba(108, 99, 255, 0.28);

  /* Radii */
  --radius-xs: 6px;
  --radius-sm: 8px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-xl: 20px;

  /* Spacing (8px grid) */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-8: 32px;
  --space-10: 40px;

  /* Type scale */
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-display: 'Fraunces', 'Inter', Georgia, serif;

  /* Motion */
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --t-fast: 120ms;
  --t-med: 200ms;
  --t-slow: 320ms;
}

body.theme-dark {
  --bg-app: #0b1020;
  --bg-hero: linear-gradient(135deg, rgba(108, 99, 255, 0.12), rgba(30, 41, 59, 0) 60%);
  --bg-surface: #111827;
  --bg-surface-muted: #0f172a;
  --bg-elev: #111827;

  --ink-strong: #f8fafc;
  --ink: #e5e7eb;
  --ink-muted: #94a3b8;
  --ink-quiet: #64748b;

  --line: #1f2937;
  --line-soft: #172033;

  --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.35);
  --shadow-md: 0 4px 14px rgba(0, 0, 0, 0.40);
  --shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.50);
}

/* ── Reset & Base ───────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  height: 100%;
  font-family: var(--font-sans);
  font-size: 14px;
  color: #1e2532;
  background: #f8f9fc;
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

body.theme-dark {
  color: #e5e7eb;
  background: #0b1020;
}

/* Global focus ring — accessible + on-brand. Applied to anything that
   naturally gets :focus-visible (buttons, inputs, selects, role=button). */
*:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px var(--brand-ring);
  border-radius: inherit;
}

a { color: inherit; text-decoration: none; }
button { cursor: pointer; font-family: inherit; }
input, select, textarea { font-family: inherit; }

/* ── Layout ─────────────────────────────────────────── */
body {
  display: flex;
  height: 100vh;
}

body.mode-setup .main-content {
  padding-inline: 0;
}

body.mode-setup .tab-section {
  padding-inline: 32px;
}

body.theme-dark .main-content {
  background: #0b1020;
}
body.theme-dark .tab-section {
  background: #0b1020;
}
body.theme-dark .page-title,
body.theme-dark .card-title,
body.theme-dark .detail-section-title,
body.theme-dark .fw-role-title,
body.theme-dark .fw-role-company,
body.theme-dark .fw-score-title,
body.theme-dark .stat-value {
  color: #f8fafc;
}
body.theme-dark .page-subtitle,
body.theme-dark .text-muted,
body.theme-dark .fw-role-analysis,
body.theme-dark .fw-score-meta,
body.theme-dark .stat-sub,
body.theme-dark .detail-key {
  color: #94a3b8;
}
body.theme-dark .card,
body.theme-dark .stat-card,
body.theme-dark .detail-section,
body.theme-dark .jobs-table-wrap,
body.theme-dark .filter-bar,
body.theme-dark .kanban-col,
body.theme-dark .job-detail-panel,
body.theme-dark .setup-panel,
body.theme-dark .fw-role-card,
body.theme-dark .fw-score-row,
body.theme-dark .fw-final-message,
body.theme-dark .fw-pitch-sheet,
body.theme-dark .modal,
body.theme-dark .modal-content {
  background: #111827;
  border-color: #1f2937;
  box-shadow: 0 10px 30px rgba(0,0,0,0.35);
}
body.theme-dark .btn-secondary,
body.theme-dark .filter-select,
body.theme-dark .form-input,
body.theme-dark .form-textarea,
body.theme-dark input,
body.theme-dark select,
body.theme-dark textarea {
  background: #0f172a;
  color: #e5e7eb;
  border-color: #334155;
}
body.theme-dark .btn-secondary:hover,
body.theme-dark .btn-ghost:hover {
  background: #1f2937;
}
body.theme-dark .loading-placeholder,
body.theme-dark .fw-no-results,
body.theme-dark .kanban-col-empty {
  color: #94a3b8;
}
body.theme-dark .fw-progress-track {
  background: #1f2937;
}
body.theme-dark .fw-gap-tag {
  background: #422006;
  color: #fde68a;
}
body.theme-dark .sidebar {
  background: #0f172a;
}
body.theme-dark .jobs-table,
body.theme-dark .applications-table,
body.theme-dark table,
body.theme-dark .review-card,
body.theme-dark .empty-state,
body.theme-dark .search-card,
body.theme-dark .summary-card,
body.theme-dark .tracker-card,
body.theme-dark .fw-step-result,
body.theme-dark .fw-progress-card,
body.theme-dark .fw-scan-source,
body.theme-dark .review-row,
body.theme-dark .kanban-card,
body.theme-dark .job-card,
body.theme-dark .application-card,
body.theme-dark .tier-card {
  background: #111827;
  border-color: #1f2937;
}
body.theme-dark table thead,
body.theme-dark thead tr,
body.theme-dark .jobs-table thead,
body.theme-dark .applications-table thead {
  background: #0f172a;
}
body.theme-dark table th,
body.theme-dark table td,
body.theme-dark .jobs-table th,
body.theme-dark .jobs-table td,
body.theme-dark .applications-table th,
body.theme-dark .applications-table td {
  color: #e5e7eb;
  border-color: #1f2937;
}
body.theme-dark table tbody tr:hover,
body.theme-dark .review-row:hover,
body.theme-dark .job-card:hover,
body.theme-dark .application-card:hover {
  background: #172033;
}
body.theme-dark .fw-profile-headline,
body.theme-dark .fw-profile-summary,
body.theme-dark .fw-profile-credentials,
body.theme-dark .fw-profile-name,
body.theme-dark .review-track,
body.theme-dark .review-total,
body.theme-dark .review-row-company,
body.theme-dark .review-row-title,
body.theme-dark .detail-value,
body.theme-dark .kanban-card-title,
body.theme-dark .kanban-card-company {
  color: #f8fafc;
}
body.theme-dark .fw-section-label,
body.theme-dark .review-generated,
body.theme-dark .review-lead,
body.theme-dark .fw-scan-count,
body.theme-dark .fw-profile-summary,
body.theme-dark .profile-name,
body.theme-dark .refresh-label {
  color: #cbd5e1;
}
body.theme-dark .jobs-launch-proof {
  border-top-color: #334155;
}
body.theme-dark .setup-profile-support-card {
  border-color: #4338ca;
  background: linear-gradient(180deg, rgba(30, 41, 59, 0.92) 0%, rgba(17, 24, 39, 0.98) 100%);
}
body.theme-dark .jobs-launch-proof-title,
body.theme-dark .jobs-launch-proof-copy {
  color: #e5e7eb;
}
body.theme-dark .fw-recruiter-angle {
  background: #1e1b4b;
  border-color: #312e81;
  color: #ddd6fe;
}
body.theme-dark .fw-meta-card,
body.theme-dark .fw-strategy-card,
body.theme-dark .fw-feedback-column,
body.theme-dark .fw-resume-feedback-card {
  background: #0f172a;
  border-color: #334155;
}
body.theme-dark .setup-progress-wrap,
body.theme-dark .setup-hero-card,
body.theme-dark .package-hero-card,
body.theme-dark .package-detail-card,
body.theme-dark .package-status-pill,
body.theme-dark .fw-next-actions-card,
body.theme-dark .fw-story-side-card {
  background: #0f172a;
  border-color: #334155;
}
body.theme-dark .package-hero-subtitle,
body.theme-dark .package-hero-note,
body.theme-dark .package-section-intro,
body.theme-dark .setup-hero-card-copy {
  color: #cbd5e1;
}
body.theme-dark .package-status-pill strong,
body.theme-dark .fw-next-actions-value {
  color: #f8fafc;
}
body.theme-dark .package-score-pill.high { background: rgba(22, 101, 52, 0.28); color: #bbf7d0; border-color: rgba(34,197,94,0.35); }
body.theme-dark .package-score-pill.mid { background: rgba(146, 64, 14, 0.25); color: #fde68a; border-color: rgba(245,158,11,0.35); }
body.theme-dark .package-score-pill.low,
body.theme-dark .package-score-pill.none { background: rgba(153, 27, 27, 0.25); color: #fecaca; border-color: rgba(239,68,68,0.35); }
body.theme-dark .mini-job-card {
  background: #111827;
  border-color: #334155;
}
body.theme-dark .mini-job-card:hover {
  background: #172033;
  border-color: #475569;
}
body.theme-dark .mini-job-age,
body.theme-dark .jobs-row-submeta,
body.theme-dark .mini-job-meta,
body.theme-dark .mini-job-chevron {
  color: #94a3b8;
}
body.theme-dark .mini-job-company,
body.theme-dark .jobs-company-name {
  color: #f8fafc;
}
body.theme-dark .mini-job-title,
body.theme-dark .jobs-company-title {
  color: #cbd5e1;
}
body.theme-dark .activity-card,
body.theme-dark .followup-card,
body.theme-dark .pipeline-stat-card {
  background: #111827;
  border-color: #334155;
}
body.theme-dark .kanban-card-summary {
  color: #94a3b8;
}
body.theme-dark .fw-meta-label,
body.theme-dark .fw-feedback-title,
body.theme-dark .fw-recruiter-angle-label {
  color: #94a3b8;
}
body.theme-dark .fw-meta-value {
  color: #e5e7eb;
}
body.theme-dark .fw-chip {
  background: #312e81;
  color: #ddd6fe;
}
body.theme-dark .fw-chip-soft {
  background: #1d4ed8;
  color: #dbeafe;
}
body.theme-dark .fw-chip-muted {
  background: #1f2937;
  color: #cbd5e1;
}
body.theme-dark .fw-profile-story-band {
  background: linear-gradient(135deg, rgba(49, 46, 129, 0.50) 0%, rgba(30, 41, 59, 0.85) 100%);
  border-color: #4338ca;
}
body.theme-dark .fw-profile-story-copy,
body.theme-dark .fw-mini-timeline-title,
body.theme-dark .fw-inline-status,
body.theme-dark .fw-tight-list-muted {
  color: #e2e8f0;
}
body.theme-dark .fw-mini-timeline-item,
body.theme-dark .fw-loading-card,
body.theme-dark .fw-proof-card,
body.theme-dark .fw-feedback-column-priority {
  background: #111827;
  border-color: #334155;
}
body.theme-dark .fw-mini-timeline-company {
  color: #c4b5fd;
}
body.theme-dark .fw-mini-timeline-period {
  color: #94a3b8;
}
body.theme-dark .theme-toggle {
  background: #111827;
  border-color: #334155;
  color: #e5e7eb;
}
body.theme-dark .fw-progress-card {
  background: rgba(17,24,39,0.96);
  border-color: #334155;
}
body.theme-dark .fw-progress-circle-inner {
  background: #0f172a;
  border-color: #334155;
}
body.theme-dark .fw-progress-meta {
  color: #cbd5e1;
}
body.theme-dark .kanban-asset-link {
  background: #1e1b4b;
  border-color: #4338ca;
  color: #ddd6fe;
}
body.theme-dark .btn[disabled],
body.theme-dark button:disabled {
  background: #1f2937;
  border-color: #334155;
  color: #94a3b8;
}
body.theme-dark .fw-score-chart-card,
body.theme-dark .fw-score-chart-stat,
body.theme-dark .fw-score-curve-wrap {
  background: #0f172a;
  border-color: #334155;
}
body.theme-dark .fw-score-chart-title,
body.theme-dark .fw-score-chart-stat strong,
body.theme-dark .fw-score-axis-label,
body.theme-dark .fw-score-curve-kicker,
body.theme-dark .fw-score-curve-body strong {
  color: #f8fafc;
}
body.theme-dark .fw-score-chart-stat span,
body.theme-dark .fw-score-chart-stat.subtle strong,
body.theme-dark .fw-score-axis-label,
body.theme-dark .fw-score-curve-body,
body.theme-dark .fw-score-curve-kicker {
  color: #cbd5e1;
}
body.theme-dark .fw-score-guide {
  stroke: rgba(148, 163, 184, 0.18);
}
body.theme-dark .fw-score-guide-vertical {
  stroke: rgba(148, 163, 184, 0.12);
}
body.theme-dark .fw-score-line {
  stroke: #a78bfa;
}
body.theme-dark .fw-score-area {
  fill: rgba(167, 139, 250, 0.16);
}
body.theme-dark .fw-score-hotspot-dot {
  fill: #c4b5fd;
  stroke: #0f172a;
}
body.theme-dark .first-wave-title,
body.theme-dark .upload-title,
body.theme-dark .surface-title,
body.theme-dark .fw-cta-title,
body.theme-dark .fw-final-message h3,
body.theme-dark .fw-progress-circle-value,
body.theme-dark .fw-tailored-header,
body.theme-dark .fw-step-result .fw-role-next strong,
body.theme-dark .fw-run-note-title {
  color: #f8fafc;
}
body.theme-dark .first-wave-subtitle,
body.theme-dark .upload-hint,
body.theme-dark .surface-copy,
body.theme-dark .fw-run-note-copy,
body.theme-dark .fw-run-note-meta,
body.theme-dark .setup-trust-item,
body.theme-dark .fw-cta-subtitle,
body.theme-dark .fw-final-message p,
body.theme-dark .fw-tailored-preview,
body.theme-dark .fw-score-rank,
body.theme-dark .fw-role-why-label,
body.theme-dark .fw-step-detail,
body.theme-dark .setup-step-label {
  color: #94a3b8;
}
body.theme-dark .setup-step-num {
  background: #1f2937;
  color: #94a3b8;
}
body.theme-dark .setup-step.active .setup-step-label {
  color: #e5e7eb;
}
body.theme-dark .setup-step-line {
  background: #334155;
}
body.theme-dark .upload-zone {
  background: #0f172a;
  border-color: #334155;
}
body.theme-dark .upload-zone:hover,
body.theme-dark .upload-zone.drag-over {
  background: #111827;
  border-color: #6C63FF;
}
body.theme-dark .upload-meta {
  color: rgba(226, 232, 240, 0.82);
}
body.theme-dark .upload-meta strong {
  color: #f8fafc;
}
body.theme-dark .upload-trust-note {
  background: rgba(15, 23, 42, 0.72);
  border-color: rgba(148, 163, 184, 0.22);
  color: rgba(226, 232, 240, 0.82);
}
body.theme-dark .chat-input-area {
  background: #111827;
  border-top-color: #1f2937;
}
body.theme-dark .typing-dots {
  background: #0f172a;
}
body.theme-dark .typing-dots span {
  background: #94a3b8;
}
body.theme-dark .chat-suggestions {
  background: linear-gradient(180deg, rgba(15,23,42,0.96) 0%, rgba(17,24,39,1) 100%);
  border-top-color: #1f2937;
}
body.theme-dark .chat-suggestion-chip {
  background: #0f172a;
  border-color: #334155;
  color: #cbd5e1;
}
body.theme-dark .chat-suggestion-chip:hover {
  background: #1e1b4b;
  border-color: #6C63FF;
  color: #ddd6fe;
}
body.theme-dark .chat-suggestion-chip.selected {
  background: #312e81;
  border-color: #6366f1;
  color: #e0e7ff;
}
body.theme-dark .chat-selection-summary {
  color: #c4b5fd;
}
body.theme-dark .chat-system-note {
  border-color: rgba(167, 139, 250, 0.35);
  background: rgba(91, 33, 182, 0.16);
  color: #ddd6fe;
}
body.theme-dark .fw-step {
  border: 1px solid transparent;
}
body.theme-dark .fw-step.active {
  background: rgba(108, 99, 255, 0.12);
  border-color: rgba(108, 99, 255, 0.25);
}
body.theme-dark .fw-step.error {
  background: rgba(239, 68, 68, 0.12);
  border-color: rgba(239, 68, 68, 0.2);
}
body.theme-dark .fw-step-icon {
  background: #1f2937;
  color: #cbd5e1;
}
body.theme-dark .fw-step-label {
  color: #cbd5e1;
}
body.theme-dark .fw-step.active .fw-step-label {
  color: #c4b5fd;
}
body.theme-dark .fw-step-result,
body.theme-dark .fw-profile-card,
body.theme-dark .fw-cta-card,
body.theme-dark .fw-final-message,
body.theme-dark .fw-tailored-card,
body.theme-dark .fw-score-row,
body.theme-dark .fw-role-card,
body.theme-dark .fw-progress-card {
  color: #cbd5e1;
}
body.theme-dark .fw-profile-card,
body.theme-dark .fw-cta-card,
body.theme-dark .fw-final-message {
  background: linear-gradient(180deg, #111827 0%, #0f172a 100%);
  border-color: #334155;
}
body.theme-dark .fw-step-result :is(.fw-meta-value, .fw-tight-list, .fw-role-why, .fw-role-next, .fw-role-analysis, .fw-progress-copy, .fw-score-main, .fw-tailored-header, .fw-profile-header, .fw-profile-shell, .fw-profile-summary, .fw-compact-role-period),
body.theme-dark .fw-profile-card :is(.fw-meta-value, .fw-tight-list),
body.theme-dark .fw-role-card :is(.fw-role-why, .fw-role-next, .fw-role-analysis),
body.theme-dark .fw-score-row :is(.fw-score-main),
body.theme-dark .fw-tailored-card :is(.fw-tailored-header) {
  color: #cbd5e1;
}
body.theme-dark .fw-step-result :is(.fw-role-meta, .fw-tailored-preview, .fw-role-why-label, .fw-score-rank, .fw-progress-meta, .fw-compact-role-period),
body.theme-dark .fw-role-card :is(.fw-role-meta, .fw-role-why-label),
body.theme-dark .fw-score-row :is(.fw-score-rank, .fw-score-meta) {
  color: #94a3b8;
}
body.theme-dark .fw-step-result :is(.fw-role-company, .fw-role-title, .fw-score-title, .fw-profile-name, .fw-profile-headline, .fw-compact-role-title, .fw-compact-role-company),
body.theme-dark .fw-role-card :is(.fw-role-company, .fw-role-title),
body.theme-dark .fw-score-row :is(.fw-score-title),
body.theme-dark .fw-profile-card :is(.fw-profile-name, .fw-profile-headline) {
  color: #f8fafc;
}
body.theme-dark .fw-timeline-card {
  background: linear-gradient(180deg, #111827 0%, #0f172a 100%);
  border-color: #334155;
  box-shadow: 0 12px 28px rgba(0,0,0,0.32);
}
body.theme-dark .fw-timeline-card:hover {
  border-color: rgba(108, 99, 255, 0.45);
  box-shadow: 0 16px 34px rgba(76, 29, 149, 0.25);
}
body.theme-dark .fw-timeline-dot {
  border-color: #0f172a;
}
body.theme-dark .fw-timeline-title {
  color: #f8fafc;
}
body.theme-dark .profile-review-shell-editorial .surface-copy,
body.theme-dark .profile-review-editorial-copy {
  color: #cbd5e1;
}
body.theme-dark .profile-review-block-feature {
  background: linear-gradient(180deg, rgba(30,41,59,0.95) 0%, rgba(17,24,39,0.92) 100%);
  border-color: #334155;
}
body.theme-dark .profile-review-block-feature-soft {
  background: linear-gradient(180deg, rgba(15,23,42,0.98) 0%, rgba(17,24,39,0.94) 100%);
}
body.theme-dark .fw-timeline-period {
  color: #94a3b8;
}
body.theme-dark .fw-timeline-item:last-child .fw-timeline-card::after {
  background: #052e25;
  border-color: #065f46;
  color: #a7f3d0;
}
body.theme-dark .review-row-button:hover {
  background: #172033;
}
body.theme-dark .detail-description {
  background: #0f172a;
  border-color: #334155;
  color: #cbd5e1;
}
body.theme-dark .match-analysis {
  background: #1e1b4b;
  border-color: #312e81;
  color: #ddd6fe;
}
body.theme-dark .match-list li,
body.theme-dark .detail-val {
  color: #cbd5e1;
}

.sidebar {
  width: 220px;
  min-width: 220px;
  height: 100vh;
  background: #1a1a2e;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  position: fixed;
  left: 0; top: 0; bottom: 0;
  z-index: 100;
}

.main-content {
  margin-left: 220px;
  flex: 1;
  height: 100vh;
  overflow-y: auto;
  padding: 0;
}

/* ── Sidebar ────────────────────────────────────────── */
.sidebar-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 14px 12px 14px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.logo-image {
  display: block;
  max-width: 100%;
  max-height: 180px;
  width: auto;
  height: auto;
  object-fit: contain;
}
/* Legacy emoji + wordmark slots — kept hidden so other sweep edits to the
   sidebar layout don't accidentally re-introduce a stale logo. */
.logo-icon, .logo-text { display: none; }

.sidebar-nav {
  flex: 1;
  padding: 12px 0;
  overflow-y: auto;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 22px;
  color: rgba(255,255,255,0.65);
  font-size: 15.5px;
  font-weight: 500;
  border-radius: 0;
  transition: all 0.15s;
  position: relative;
}
.nav-item:hover {
  color: #fff;
  background: rgba(255,255,255,0.07);
  transform: translateX(1px);
}
.nav-item.active {
  color: #fff;
  background: rgba(108, 99, 255, 0.22);
}
.nav-item.active::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  background: var(--brand-gradient);
  border-radius: 0 2px 2px 0;
  box-shadow: 0 0 12px rgba(108, 99, 255, 0.5);
}
.nav-icon { font-size: 18px; width: 22px; text-align: center; }
.nav-label { flex: 1; }
.nav-badge {
  background: #6C63FF;
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  padding: 1px 6px;
  border-radius: 10px;
  min-width: 18px;
  text-align: center;
  display: none;
}
.nav-badge:not(:empty) { display: inline-block; }

.sidebar-footer {
  padding: 16px 20px;
  border-top: 1px solid rgba(255,255,255,0.08);
}
.sidebar-footer-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.sidebar-profile {
  display: flex;
  align-items: center;
  gap: 8px;
  color: rgba(255,255,255,0.7);
  font-size: 13px;
  margin-bottom: 8px;
}
.profile-avatar { font-size: 16px; }
.profile-name { font-weight: 500; }
.theme-toggle {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.06);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}
.theme-toggle:hover {
  background: rgba(255,255,255,0.12);
  border-color: rgba(255,255,255,0.24);
  transform: translateY(-1px);
}

/* Notification bell in sidebar footer */
.sidebar-bell {
  position: relative;
  width: 32px;
  height: 32px;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.06);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}
.sidebar-bell:hover {
  background: rgba(255,255,255,0.12);
  border-color: rgba(255,255,255,0.24);
  transform: translateY(-1px);
}
.sidebar-bell-icon { line-height: 1; }
.sidebar-bell-badge {
  position: absolute;
  top: -5px;
  right: -5px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 9px;
  background: #ef4444;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #1e2532;
  box-sizing: border-box;
}

/* Notification inbox list */
.notif-empty {
  text-align: center;
  color: #6b7280;
  padding: 48px 16px;
  font-size: 14px;
}
.notif-empty-icon {
  font-size: 32px;
  margin-bottom: 8px;
  opacity: 0.6;
}
.notif-list { display: flex; flex-direction: column; gap: 8px; }
.notif-item {
  display: flex;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 10px;
  background: #fff;
  border: 1px solid #e8eaf0;
  transition: background 0.12s ease, border-color 0.12s ease;
  position: relative;
}
.notif-item:hover { border-color: #c7cdd8; }
.notif-item.is-unread { background: #f0f7ff; border-color: #bfdbfe; }
.notif-item.is-unread::before {
  content: '';
  position: absolute;
  left: 4px;
  top: 18px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #3b82f6;
}
.notif-icon {
  font-size: 16px;
  flex-shrink: 0;
  width: 24px;
  text-align: center;
  line-height: 1.3;
}
.notif-body-wrap { flex: 1; min-width: 0; }
.notif-title {
  font-size: 13px;
  font-weight: 600;
  color: #1e2532;
  margin-bottom: 2px;
  word-wrap: break-word;
}
.notif-item.is-read .notif-title { color: #374151; font-weight: 500; }
.notif-body {
  font-size: 12px;
  color: #6b7280;
  line-height: 1.4;
  word-wrap: break-word;
}
.notif-meta {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-top: 6px;
  font-size: 11px;
  color: #9ca3af;
}
.notif-actions {
  display: flex;
  gap: 4px;
  flex-shrink: 0;
  align-self: flex-start;
  opacity: 0;
  transition: opacity 0.12s ease;
}
.notif-item:hover .notif-actions { opacity: 1; }
.notif-action-btn {
  background: none;
  border: none;
  color: #9ca3af;
  font-size: 13px;
  padding: 4px 6px;
  border-radius: 6px;
  cursor: pointer;
}
.notif-action-btn:hover { background: #f3f4f6; color: #1e2532; }
.notif-link {
  display: inline-block;
  margin-top: 6px;
  font-size: 12px;
  color: #3b82f6;
  text-decoration: none;
}
.notif-link:hover { text-decoration: underline; }
.notif-priority-high .notif-icon { color: #ef4444; }
.notif-priority-low { opacity: 0.75; }

body.theme-dark .notif-item { background: #242b3d; border-color: rgba(255,255,255,0.08); }
body.theme-dark .notif-item:hover { border-color: rgba(255,255,255,0.18); }
body.theme-dark .notif-item.is-unread { background: rgba(59,130,246,0.12); border-color: rgba(59,130,246,0.4); }
body.theme-dark .notif-title { color: #e8eaf0; }
body.theme-dark .notif-item.is-read .notif-title { color: #c7cdd8; }
body.theme-dark .notif-body { color: #9ca3af; }
body.theme-dark .notif-meta { color: #6b7280; }
body.theme-dark .notif-action-btn:hover { background: rgba(255,255,255,0.08); color: #e8eaf0; }
.sidebar-auth {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin: 6px 0 8px;
  padding: 6px 8px;
  border-radius: var(--radius-sm);
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.06);
  font-size: 11.5px;
  color: rgba(255,255,255,0.78);
}
.sidebar-auth-email {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-weight: 500;
}
.sidebar-auth-action {
  background: transparent;
  border: 0;
  padding: 0;
  color: rgba(255,255,255,0.55);
  font-size: 11px;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: color var(--t-fast) var(--ease);
  flex-shrink: 0;
}
.sidebar-auth-action:hover { color: #fff; }

.sidebar-refresh {
  display: flex;
  align-items: center;
  gap: 6px;
  color: rgba(255,255,255,0.4);
  font-size: 11px;
}
.sidebar-build {
  margin-top: 8px;
  color: rgba(255,255,255,0.38);
  font-size: 10px;
  line-height: 1.35;
  word-break: break-word;
}
.refresh-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: #22c55e;
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

/* ── Tab sections ───────────────────────────────────── */
.tab-section {
  display: none;
  padding: 28px 32px;
  min-height: 100%;
}
.tab-section.active { display: block; }

/* ── Page header ────────────────────────────────────── */
.page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: var(--space-6);
  gap: var(--space-4);
  padding-block: var(--space-2);
}
.page-title {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 600;
  color: var(--ink-strong);
  line-height: 1.15;
  letter-spacing: -0.015em;
}
.page-subtitle {
  font-size: 13.5px;
  color: var(--ink-muted);
  margin-top: 6px;
  line-height: 1.5;
}
.page-actions { display: flex; gap: var(--space-2); align-items: center; flex-shrink: 0; }

/* Hero variant — applied via class="page-header page-header-hero". Gives
   top-of-page sections a soft gradient wash so they feel like a surface,
   not a table header. Use sparingly (Dashboard, Intake, Setup hero). */
.page-header-hero {
  padding: var(--space-6) var(--space-6);
  margin: calc(var(--space-4) * -1) calc(var(--space-2) * -1) var(--space-6);
  background: var(--bg-hero);
  border-radius: var(--radius-xl);
  border: 1px solid var(--line-soft);
  box-shadow: var(--shadow-xs);
}
.page-header-hero .page-title { font-size: 32px; }
.page-header-hero .page-subtitle { font-size: 14.5px; }

.surface-split {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: flex-start;
  flex-wrap: wrap;
}
.surface-copy-stack {
  max-width: 760px;
}
.surface-title {
  font-size: 15px;
  color: #0f172a;
  font-weight: 600;
}
.surface-copy {
  margin-top: 10px;
  color: #334155;
  line-height: 1.55;
}
.surface-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.jobs-launch-proof {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid #e2e8f0;
}
.jobs-launch-proof-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.jobs-launch-proof-title {
  font-size: 14px;
  font-weight: 600;
  color: #0f172a;
}
.jobs-launch-proof-copy {
  margin-top: 8px;
  color: #334155;
  line-height: 1.55;
}
.jobs-launch-proof-meta {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 12px;
}
.jobs-launch-proof-list {
  margin-top: 12px;
}
.setup-profile-support-card {
  border-color: #ddd6fe;
  background: linear-gradient(180deg, #ffffff 0%, #faf9ff 100%);
}
.setup-profile-support-details {
  overflow: hidden;
}
.setup-profile-support-summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  font-size: 13px;
  font-weight: 700;
  color: #1e2532;
}
.setup-profile-support-summary::-webkit-details-marker {
  display: none;
}
.setup-profile-support-meta {
  font-size: 12px;
  font-weight: 500;
  color: #64748b;
}
.setup-profile-support-details .card-body {
  padding-top: 0;
}
.profile-support-shell {
  display: grid;
  gap: 18px;
}
.profile-support-header-row {
  align-items: flex-start;
}
.profile-support-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 14px;
}
.profile-support-focus {
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.18), 0 18px 48px rgba(124, 58, 237, 0.16);
  transition: box-shadow 0.25s ease;
}

/* ── Buttons ────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: 9px 16px;
  border-radius: var(--radius-sm);
  font-size: 13.5px;
  font-weight: 550;
  line-height: 1.2;
  border: 1px solid transparent;
  outline: none;
  transition: transform var(--t-fast) var(--ease),
              box-shadow var(--t-fast) var(--ease),
              background var(--t-fast) var(--ease),
              color var(--t-fast) var(--ease);
  white-space: nowrap;
  will-change: transform;
}
.btn:active { transform: translateY(1px); }
.btn-primary {
  background: var(--brand);
  color: #fff;
  box-shadow: var(--shadow-brand);
}
.btn-primary:hover {
  background: var(--brand-600);
  box-shadow: var(--shadow-brand-lg);
  transform: translateY(-1px);
}
.btn-primary:active { transform: translateY(0); box-shadow: var(--shadow-brand); }
.btn-secondary {
  background: var(--bg-surface);
  color: var(--ink);
  border-color: var(--line);
  box-shadow: var(--shadow-xs);
}
.btn-secondary:hover {
  background: var(--bg-surface-muted);
  border-color: #d8dbe6;
  box-shadow: var(--shadow-sm);
}
.btn-ghost {
  background: transparent;
  color: var(--ink-muted);
  border-color: transparent;
}
.btn-ghost:hover { background: var(--bg-surface-muted); color: var(--ink); }
.btn[disabled],
button:disabled {
  cursor: not-allowed;
  opacity: 0.7;
  box-shadow: none;
}
.btn-primary[disabled],
.btn-secondary[disabled],
.btn-ghost[disabled] {
  background: #e5e7eb;
  color: #6b7280;
  border: 1px solid #d1d5db;
}
.btn-danger {
  background: #fef2f2;
  color: #dc2626;
  border: 1px solid #fecaca;
}
.btn-danger:hover { background: #fee2e2; }
.btn-sm { padding: 5px 10px; font-size: 12px; }

/* ── Stat cards ─────────────────────────────────────── */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-4);
  margin-bottom: var(--space-6);
}
.stat-card {
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: var(--space-5) var(--space-6);
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-xs);
  transition: box-shadow var(--t-med) var(--ease), transform var(--t-med) var(--ease);
}
.stat-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}
.stat-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--line);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}
.stat-card.accent::before { background: var(--brand-gradient); }
.stat-card.warning::before { background: linear-gradient(90deg, #f59e0b, #fbbf24); }
.stat-card.success::before { background: linear-gradient(90deg, #10b981, #34d399); }
.stat-card.danger::before { background: linear-gradient(90deg, #ef4444, #f87171); }
.stat-value {
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 600;
  color: var(--ink-strong);
  line-height: 1;
  letter-spacing: -0.02em;
  margin-bottom: var(--space-2);
}
.stat-label {
  font-size: 12.5px;
  color: var(--ink-muted);
  font-weight: 500;
  letter-spacing: 0.01em;
}
.stat-sub {
  font-size: 11.5px;
  color: var(--ink-quiet);
  margin-top: var(--space-1);
}

/* ── Dashboard grid ─────────────────────────────────── */
.dashboard-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.guardrail-alert-stack {
  display: grid;
  gap: 12px;
  margin: 18px 0 22px;
}

.guardrail-alert {
  border-radius: 14px;
  border: 1px solid #dbe4ff;
  background: linear-gradient(180deg, #ffffff 0%, #f8faff 100%);
  padding: 14px 16px;
}

.guardrail-alert-title {
  font-size: 13px;
  font-weight: 700;
  color: #1e2532;
  margin-bottom: 4px;
}

.guardrail-alert-body {
  font-size: 12.5px;
  line-height: 1.55;
  color: #475569;
}

.guardrail-alert-warning {
  border-color: #fde68a;
  background: linear-gradient(180deg, #fffbeb 0%, #fff7d6 100%);
}

.guardrail-alert-warning .guardrail-alert-title {
  color: #92400e;
}

.guardrail-alert-warning .guardrail-alert-body {
  color: #78350f;
}

.guardrail-alert-info {
  border-color: #c7d2fe;
  background: linear-gradient(180deg, #eef2ff 0%, #f8faff 100%);
}

.guardrail-alert-info .guardrail-alert-title {
  color: #3730a3;
}

.guardrail-alert-info .guardrail-alert-body {
  color: #4338ca;
}

/* ── Cards ──────────────────────────────────────────── */
.card {
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-xs);
  transition: box-shadow var(--t-med) var(--ease);
}
.card:hover { box-shadow: var(--shadow-sm); }
.card.no-pad .card-body { padding: 0; }
.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-5) var(--space-6);
  border-bottom: 1px solid var(--line-soft);
}
.card-title {
  font-size: 14.5px;
  font-weight: 600;
  color: var(--ink-strong);
  letter-spacing: -0.01em;
}
.card-link {
  font-size: 12.5px;
  color: var(--brand);
  font-weight: 500;
  transition: opacity var(--t-fast) var(--ease);
}
.card-link:hover { opacity: 0.78; text-decoration: underline; }
.card-body { padding: var(--space-5) var(--space-6); line-height: 1.55; }
.no-pad { }
.no-pad > .card-header { border-radius: 12px 12px 0 0; }

/* ── Filter bar ─────────────────────────────────────── */
.filter-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.filter-select {
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--bg-surface);
  color: var(--ink);
  font-size: 13px;
  outline: none;
  cursor: pointer;
  transition: border-color var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease);
}
.filter-select:hover { border-color: #cfd4e0; }
.filter-select:focus { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-ring); }
.filter-search {
  flex: 1;
  min-width: 200px;
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--bg-surface);
  font-size: 13px;
  outline: none;
  transition: border-color var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease);
  color: #1e2532;
}
.filter-search:focus { border-color: #6C63FF; }
.filter-score-group {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #fff;
  border: 1px solid #e8eaf0;
  border-radius: 8px;
  padding: 4px 10px;
}
.filter-label { font-size: 12px; color: #6b7280; white-space: nowrap; }
.filter-search::placeholder { color: #9ca3af; }
input[type=range] {
  width: 90px;
  accent-color: #6C63FF;
}
.score-display {
  font-size: 13px;
  font-weight: 600;
  color: #6C63FF;
  min-width: 28px;
}

/* ── Tables ─────────────────────────────────────────── */
.table-container { overflow-x: auto; }
.data-table {
  width: 100%;
  border-collapse: collapse;
}
.data-table th {
  text-align: left;
  padding: 11px 16px;
  font-size: 12px;
  font-weight: 600;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  background: #f9fafb;
  border-bottom: 1px solid #e8eaf0;
  white-space: nowrap;
}
.data-table th.sortable { cursor: pointer; user-select: none; }
.data-table th.sortable:hover { color: #1e2532; }
.sort-icon { opacity: 0.4; font-size: 11px; }
.sort-asc .sort-icon, .sort-desc .sort-icon { opacity: 1; color: #6C63FF; }
.data-table td {
  padding: 12px 16px;
  border-bottom: 1px solid #f3f4f6;
  font-size: 13.5px;
  vertical-align: middle;
}
.data-table tbody tr:hover { background: #fafbff; }
.data-table tbody tr:last-child td { border-bottom: none; }
.data-table.compact td, .data-table.compact th { padding: 8px 12px; }

.table-loading {
  text-align: center;
  padding: 32px;
  color: #6b7280;
  font-size: 14px;
}
.table-footer {
  padding: 12px 16px;
  font-size: 12.5px;
  color: #6b7280;
  border-top: 1px solid #f3f4f6;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ── Score badges ───────────────────────────────────── */
.score-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 24px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: -0.3px;
}
.score-badge.high { background: #dcfce7; color: #15803d; }
.score-badge.mid { background: #fef9c3; color: #a16207; }
.score-badge.low { background: #fee2e2; color: #dc2626; }
.score-badge.none { background: #f3f4f6; color: #6b7280; }
body.theme-dark .score-badge.high { background: rgba(16, 185, 129, 0.14); color: #6ee7b7; }
body.theme-dark .score-badge.mid  { background: rgba(245, 158, 11, 0.14); color: #fcd34d; }
body.theme-dark .score-badge.low  { background: rgba(239, 68, 68, 0.14); color: #fca5a5; }
body.theme-dark .score-badge.none { background: rgba(148, 163, 184, 0.14); color: #94a3b8; }

/* ── Fit-band pill (alongside score in Jobs table) ─── */
.jobs-score-cell {
  display: flex;
  flex-direction: column;
  gap: 4px;
  align-items: flex-start;
}
.fit-band {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.2px;
  padding: 2px 6px;
  border-radius: 10px;
  white-space: nowrap;
  line-height: 1.2;
}
.fit-band-label { font-size: 10.5px; }
.fit-band-absolute {
  background: #ecfdf5;
  color: #065f46;
  border: 1px solid #a7f3d0;
}
.fit-band-good-with-gaps {
  background: #fffbeb;
  color: #92400e;
  border: 1px solid #fde68a;
}
.fit-band-stretch {
  background: #fef2f2;
  color: #991b1b;
  border: 1px solid #fecaca;
}
.fit-band-gaps-unknown {
  background: #f3f4f6;
  color: #4b5563;
  border: 1px solid #d1d5db;
}
body.theme-dark .fit-band-gaps-unknown {
  background: rgba(156, 163, 175, 0.12);
  color: #d1d5db;
  border-color: rgba(156, 163, 175, 0.35);
}
body.theme-dark .fit-band-absolute {
  background: rgba(16, 185, 129, 0.12);
  color: #6ee7b7;
  border-color: rgba(16, 185, 129, 0.35);
}
body.theme-dark .fit-band-good-with-gaps {
  background: rgba(245, 158, 11, 0.12);
  color: #fcd34d;
  border-color: rgba(245, 158, 11, 0.35);
}
body.theme-dark .fit-band-stretch {
  background: rgba(239, 68, 68, 0.12);
  color: #fca5a5;
  border-color: rgba(239, 68, 68, 0.35);
}

/* Gap-ceiling cap badge — shows WHY a raw score got held down. Hover for
   the full rule set + raw→final delta. */
.cap-badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.2px;
  padding: 2px 6px;
  border-radius: 10px;
  white-space: nowrap;
  line-height: 1.2;
  cursor: help;
}
.cap-badge-dealbreaker {
  background: #fef2f2;
  color: #991b1b;
  border: 1px solid #fecaca;
}
.cap-badge-three_unmet_of_five,
.cap-badge-two_unmet,
.cap-badge-single_missing {
  background: #fffbeb;
  color: #92400e;
  border: 1px solid #fde68a;
}
.cap-badge-no_must_haves {
  background: #f3f4f6;
  color: #4b5563;
  border: 1px solid #d1d5db;
}
body.theme-dark .cap-badge-dealbreaker {
  background: rgba(239, 68, 68, 0.12);
  color: #fca5a5;
  border-color: rgba(239, 68, 68, 0.35);
}
body.theme-dark .cap-badge-three_unmet_of_five,
body.theme-dark .cap-badge-two_unmet,
body.theme-dark .cap-badge-single_missing {
  background: rgba(245, 158, 11, 0.12);
  color: #fcd34d;
  border-color: rgba(245, 158, 11, 0.35);
}
body.theme-dark .cap-badge-no_must_haves {
  background: rgba(156, 163, 175, 0.12);
  color: #d1d5db;
  border-color: rgba(156, 163, 175, 0.35);
}

/* ── Absolute-match filter toggle (chip) ───────────── */
.filter-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  font-size: 12.5px;
  color: #374151;
  background: #ffffff;
  cursor: pointer;
  user-select: none;
}
.filter-toggle input[type="checkbox"] {
  margin: 0;
  accent-color: #6C63FF;
}
.filter-toggle:hover { border-color: #9ca3af; }
.filter-toggle:has(input:checked) {
  background: #eef2ff;
  border-color: #6C63FF;
  color: #4338ca;
}
body.theme-dark .filter-toggle {
  background: #1f2937;
  border-color: #374151;
  color: #d1d5db;
}
body.theme-dark .filter-toggle:has(input:checked) {
  background: rgba(108, 99, 255, 0.2);
  border-color: #818cf8;
  color: #c7d2fe;
}

/* ── Why this score — coverage section ─────────────── */
.coverage-section {
  margin-top: 12px;
  padding: 10px 12px;
  border-radius: 8px;
  background: #f9fafb;
  border: 1px solid #e5e7eb;
}
.coverage-summary {
  font-size: 12.5px;
  font-weight: 600;
  color: #374151;
  cursor: pointer;
  list-style: none;
}
.coverage-summary::-webkit-details-marker { display: none; }
.coverage-summary::before {
  content: '▸';
  display: inline-block;
  width: 14px;
  color: #9ca3af;
  transition: transform 120ms ease;
}
.coverage-section[open] > .coverage-summary::before { transform: rotate(90deg); }
.coverage-list {
  list-style: none;
  padding: 0;
  margin: 10px 0 0 0;
  display: grid;
  gap: 6px;
}
.coverage-row {
  display: grid;
  grid-template-columns: 20px 1fr 1.3fr;
  gap: 10px;
  align-items: baseline;
  font-size: 13px;
  padding: 6px 8px;
  border-radius: 6px;
  background: #ffffff;
  border: 1px solid #e5e7eb;
}
.coverage-row.coverage-met { border-left: 3px solid #22c55e; }
.coverage-row.coverage-partial { border-left: 3px solid #f59e0b; }
.coverage-row.coverage-missing { border-left: 3px solid #ef4444; }
.coverage-status { font-size: 14px; }
.coverage-req { font-weight: 600; color: #111827; }
.coverage-evidence { color: #4b5563; font-size: 12.5px; }
.coverage-evidence.muted { color: #9ca3af; font-style: italic; }
.coverage-dealbreakers { margin-top: 10px; }
.coverage-subhead {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: #991b1b;
  font-weight: 700;
  margin-bottom: 4px;
}
.coverage-caps {
  margin-top: 8px;
  font-size: 11.5px;
  color: #6b7280;
  font-style: italic;
}
body.theme-dark .coverage-section {
  background: rgba(255, 255, 255, 0.03);
  border-color: rgba(255, 255, 255, 0.08);
}
body.theme-dark .coverage-row {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.08);
}
body.theme-dark .coverage-req { color: #f3f4f6; }
body.theme-dark .coverage-evidence { color: #9ca3af; }

.top-jobs-stack {
  display: grid;
  gap: 10px;
}

.mini-job-card {
  width: 100%;
  border: 1px solid #e8eaf0;
  border-radius: 14px;
  background: #fff;
  padding: 12px 14px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  text-align: left;
}

.mini-job-card:hover {
  background: #fafbff;
  border-color: #d8dafe;
}

.mini-job-score-wrap {
  display: grid;
  gap: 8px;
  justify-items: start;
}

.mini-job-age,
.jobs-row-submeta,
.mini-job-meta {
  font-size: 12px;
  color: #64748b;
}

.mini-job-meta {
  margin-top: 6px;
}

.mini-job-chevron {
  color: #94a3b8;
  font-weight: 700;
}

.jobs-company-cell {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.jobs-location-cell {
  display: grid;
  gap: 6px;
}

.jobs-company-name {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: #0f172a;
}

.jobs-company-title {
  font-size: 12.5px;
  font-weight: 500;
  color: #64748b;
  line-height: 1.35;
}

.jobs-row-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: nowrap;
}
/* Pin the primary action to a consistent width so the row layout doesn't
   visually shift when the button label swaps ("Prepare Package" → "Open
   Package" → "Applied" / "Skipped" / "⚙️ Preparing…"). Applies to both
   button and status-chip variants via the shared .jobs-row-primary class. */
.jobs-row-primary {
  min-width: 128px;
  text-align: center;
  justify-content: center;
  white-space: nowrap;
}
.jobs-row-skip {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 1px solid transparent;
  background: transparent;
  color: #94a3b8;
  font-size: 13px;
  line-height: 1;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.12s, color 0.12s, border-color 0.12s;
  flex: 0 0 auto;
}
.jobs-row-skip:hover {
  background: #fef2f2;
  color: #dc2626;
  border-color: #fecaca;
}
/* Reserves the same footprint as .jobs-row-skip when the X is suppressed
   (already-skipped job), so the action column stays aligned across rows. */
.jobs-row-skip-placeholder {
  display: inline-block;
  width: 26px;
  height: 26px;
  flex: 0 0 auto;
}
.job-status-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 10px;
  font-size: 11.5px;
  font-weight: 500;
  white-space: nowrap;
}
.job-status-chip-pending { background: #eef2ff; color: #4338ca; }
.job-status-chip-applied { background: #dcfce7; color: #166534; }
.job-status-chip-skipped { background: #f1f5f9; color: #64748b; }
.jobs-row-secondary {
  background: transparent;
  border: 1px solid #e5e7eb;
  color: #475569;
  font-size: 12px;
  font-weight: 500;
  padding: 4px 10px;
  border-radius: 6px;
  cursor: pointer;
  transition: border-color 0.12s, color 0.12s;
  white-space: nowrap;
}
.jobs-row-secondary:hover {
  border-color: #6366f1;
  color: #4338ca;
}

.jobs-recency-cell {
  white-space: nowrap;
}

.remote-pill {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.01em;
  background: #eef2ff;
  color: #4338ca;
}

.remote-pill.hybrid {
  background: #ecfeff;
  color: #0f766e;
}

.remote-pill.onsite {
  background: #fef3c7;
  color: #92400e;
}

.remote-pill.unknown {
  background: #f3f4f6;
  color: #6b7280;
}

/* ── Status pills ───────────────────────────────────── */
.status-pill {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 100px;
  font-size: 11.5px;
  font-weight: 500;
  white-space: nowrap;
}
.status-new { background: #ede9fe; color: #7c3aed; }
.status-requested { background: #eef2ff; color: #4338ca; }
.status-scored { background: #dbeafe; color: #1d4ed8; }
.status-applied { background: #dcfce7; color: #15803d; }
.status-interviewing { background: #fef9c3; color: #a16207; }
.status-offer { background: #ecfdf5; color: #059669; }
.status-rejected { background: #fee2e2; color: #dc2626; }
.status-ghosted { background: #f3f4f6; color: #6b7280; }
.status-skipped { background: #f3f4f6; color: #9ca3af; }
.status-draft { background: #f3f4f6; color: #6b7280; }
.status-sent { background: #dbeafe; color: #1d4ed8; }
.status-connected { background: #dcfce7; color: #15803d; }
.status-replied { background: #fef9c3; color: #a16207; }
.status-cold { background: #fee2e2; color: #dc2626; }
.status-phone_screen { background: #dbeafe; color: #1d4ed8; }
.status-interview { background: #fef9c3; color: #a16207; }
.status-final_round { background: #ede9fe; color: #7c3aed; }
.status-contacted { background: #e0f2fe; color: #0369a1; }

/* ── Slide-out panel ────────────────────────────────── */
.slide-panel {
  position: fixed;
  right: -760px;
  top: 0;
  bottom: 0;
  width: min(760px, 100vw);
  background: #fff;
  box-shadow: -4px 0 24px rgba(0,0,0,0.1);
  z-index: 200;
  display: flex;
  flex-direction: column;
  transition: right 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
}
.slide-panel.open { right: 0; }
.slide-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.3);
  z-index: 199;
  backdrop-filter: blur(2px);
}
.slide-overlay.visible { display: block; }
.slide-panel-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid #e8eaf0;
  flex-shrink: 0;
}
.slide-title { font-size: 16px; font-weight: 700; color: #1e2532; }
.slide-subtitle { font-size: 13px; color: #6b7280; margin-top: 4px; }
.slide-close {
  background: none;
  border: none;
  color: #9ca3af;
  font-size: 18px;
  padding: 4px 8px;
  border-radius: 6px;
  flex-shrink: 0;
  margin-top: -4px;
}
.slide-close:hover { background: #f3f4f6; color: #1e2532; }
.slide-panel-body {
  flex: 1;
  overflow-y: auto;
  padding: 24px;
}

/* Job detail panel content */
.detail-section { margin-bottom: 24px; }
.detail-section-title {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #9ca3af;
  margin-bottom: 10px;
}
.detail-row {
  display: flex;
  gap: 8px;
  margin-bottom: 6px;
  font-size: 13.5px;
}
.detail-key { color: #6b7280; min-width: 100px; font-size: 13px; }
.detail-val { color: #1e2532; font-weight: 500; flex: 1; }
.detail-val a { color: #6C63FF; }
.detail-description {
  background: #f9fafb;
  border: 1px solid #e8eaf0;
  border-radius: 8px;
  padding: 12px 14px;
  font-size: 13px;
  line-height: 1.6;
  color: #374151;
  max-height: 200px;
  overflow-y: auto;
}
.match-analysis {
  background: #f5f3ff;
  border: 1px solid #ddd6fe;
  border-radius: 8px;
  padding: 14px 16px;
  font-size: 13px;
  line-height: 1.6;
  color: #3730a3;
  margin-bottom: 12px;
}
.match-list { list-style: none; padding: 0; }
.match-list li {
  font-size: 13px;
  padding: 4px 0;
  color: #374151;
  display: flex;
  gap: 6px;
}
.match-list.good li::before { content: '✓'; color: #22c55e; font-weight: 700; }
.match-list.bad li::before { content: '✗'; color: #ef4444; font-weight: 700; }

.detail-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  padding-top: 12px;
  border-top: 1px solid #f3f4f6;
  margin-top: 24px;
}

/* ── Kanban ─────────────────────────────────────────── */
.kanban-board {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding-bottom: 16px;
  min-height: 500px;
}
.kanban-col {
  min-width: 220px;
  flex: 1;
  background: #f9fafb;
  border-radius: 10px;
  border: 1px solid #e8eaf0;
  display: flex;
  flex-direction: column;
}
.kanban-col-header {
  padding: 12px 14px;
  font-size: 12.5px;
  font-weight: 600;
  color: #374151;
  border-bottom: 1px solid #e8eaf0;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.kanban-col-count {
  background: #e5e7eb;
  color: #6b7280;
  border-radius: 100px;
  font-size: 11px;
  font-weight: 600;
  padding: 1px 7px;
}
.kanban-col-body {
  flex: 1;
  padding: 10px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.kanban-card {
  background: #fff;
  border: 1px solid #e8eaf0;
  border-radius: 8px;
  padding: 12px 14px;
  cursor: pointer;
  transition: all 0.15s;
  box-shadow: 0 1px 2px rgba(0,0,0,0.04);
}
.kanban-card:hover {
  border-color: #c4b5fd;
  box-shadow: 0 2px 8px rgba(108, 99, 255, 0.1);
  transform: translateY(-1px);
}
.kanban-card-company {
  font-size: 13px;
  font-weight: 600;
  color: #1e2532;
  margin-bottom: 2px;
}
.kanban-card-title {
  font-size: 12px;
  color: #6b7280;
  margin-bottom: 8px;
  line-height: 1.3;
}
.kanban-card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11px;
  color: #9ca3af;
}
.kanban-card-summary {
  margin-top: 8px;
  font-size: 12px;
  color: #64748b;
}
.kanban-asset-row {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 10px;
}
.kanban-asset-link {
  display: inline-flex;
  align-items: center;
  padding: 4px 8px;
  border-radius: 999px;
  border: 1px solid #c7d2fe;
  background: #eef2ff;
  color: #4338ca;
  font-size: 11px;
  font-weight: 600;
  text-decoration: none;
}
.kanban-days-badge {
  background: #f3f4f6;
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 11px;
  color: #6b7280;
}
.kanban-followup {
  font-size: 11px;
  color: #f59e0b;
}
.kanban-col-empty {
  text-align: center;
  padding: 24px 12px;
  color: #d1d5db;
  font-size: 13px;
}

/* Pipeline stats bar */
.pipeline-stats {
  display: flex;
  gap: 12px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.pipeline-stat {
  background: #fff;
  border: 1px solid #e8eaf0;
  border-radius: 8px;
  padding: 8px 14px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
}
.pipeline-stat-card {
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(15,23,42,0.04);
}
.pipeline-stat-num {
  font-size: 18px;
  font-weight: 700;
  color: #1e2532;
}
.pipeline-stat-label { color: #6b7280; }

/* ── Modal ──────────────────────────────────────────── */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.4);
  z-index: 300;
  backdrop-filter: blur(3px);
}
.modal-overlay.visible { display: block; }
.modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.97);
  width: min(1080px, calc(100vw - 32px));
  max-width: calc(100vw - 32px);
  max-height: calc(100vh - 40px);
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 8px 40px rgba(0,0,0,0.18);
  z-index: 301;
  display: none;
  flex-direction: column;
  overflow: hidden;
  transition: transform 0.15s, opacity 0.15s;
  opacity: 0;
}
.modal.visible {
  display: flex;
  transform: translate(-50%, -50%) scale(1);
  opacity: 1;
}
.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid #e8eaf0;
  flex-shrink: 0;
}
.modal-title { font-size: 16px; font-weight: 700; }
.modal-close {
  background: none;
  border: none;
  color: #9ca3af;
  font-size: 18px;
  padding: 4px 8px;
  border-radius: 6px;
}
.modal-close:hover { background: #f3f4f6; color: #1e2532; }
.modal-body {
  flex: 1;
  overflow-y: auto;
  padding: 24px;
}

.package-modal-shell {
  display: grid;
  gap: 18px;
}

.package-hero-card {
  border-color: #ddd6fe;
  background: linear-gradient(135deg, #ffffff 0%, #faf9ff 55%, #f8fbff 100%);
}

.package-hero-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
}

.package-hero-title {
  margin-bottom: 8px;
}

.package-hero-subtitle,
.package-hero-note,
.package-section-intro {
  color: #64748b;
  line-height: 1.6;
}

.package-score-pill {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 8px 12px;
  font-size: 12px;
  font-weight: 800;
  border: 1px solid #e5e7eb;
}

.package-score-pill.high { background: #dcfce7; color: #166534; border-color: #bbf7d0; }
.package-score-pill.mid { background: #fef3c7; color: #92400e; border-color: #fde68a; }
.package-score-pill.low,
.package-score-pill.none { background: #fee2e2; color: #991b1b; border-color: #fecaca; }

.package-status-row,
.package-action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.package-status-pill {
  display: inline-flex;
  flex-direction: column;
  gap: 4px;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid #e5e7eb;
  min-width: 150px;
  background: rgba(255,255,255,0.84);
}

.package-status-pill strong {
  color: #111827;
}

.package-status-pill .package-status-label {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #64748b;
}

.package-status-pill.tone-good { border-color: #bbf7d0; background: #f0fdf4; }
.package-status-pill.tone-mid { border-color: #ddd6fe; background: #faf5ff; }
.package-status-pill.tone-low { border-color: #fecaca; background: #fef2f2; }

.package-modal-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.85fr);
  gap: 18px;
}

.package-modal-main,
.package-modal-side {
  display: grid;
  gap: 16px;
}

.package-detail-card {
  box-shadow: 0 10px 28px rgba(15,23,42,0.05);
}

.package-long-copy {
  white-space: pre-wrap;
  max-height: 320px;
}

/* ── Forms ──────────────────────────────────────────── */
.form-group { margin-bottom: 16px; }
.form-label {
  display: block;
  font-size: 12.5px;
  font-weight: 500;
  color: #374151;
  margin-bottom: 6px;
}
.form-input {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  font-size: 13.5px;
  color: var(--ink);
  background: var(--bg-surface);
  outline: none;
  transition: border-color var(--t-fast) var(--ease),
              box-shadow var(--t-fast) var(--ease),
              background var(--t-fast) var(--ease);
}
.form-input:hover:not(:focus) { border-color: #cfd4e0; }
.form-input:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--brand-ring);
}
.form-input::placeholder { color: var(--ink-quiet); }
.form-textarea { resize: vertical; line-height: 1.55; }
.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding-top: 16px;
  border-top: 1px solid #f3f4f6;
  margin-top: 8px;
}

/* ── Cost hero ──────────────────────────────────────── */
.cost-hero {
  text-align: center;
  padding: 32px;
  background: linear-gradient(135deg, #1a1a2e 0%, #2d2a54 100%);
  border-radius: 16px;
  margin-bottom: 24px;
}
.cost-hero-amount {
  font-size: 48px;
  font-weight: 800;
  color: #fff;
  letter-spacing: -2px;
  margin-bottom: 6px;
}
.cost-hero-label {
  font-size: 14px;
  color: rgba(255,255,255,0.6);
  font-weight: 500;
}

.cost-insight-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 20px;
}

.cost-insight-card {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  padding: 16px;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.04);
}

.cost-insight-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #64748b;
  margin-bottom: 8px;
}

.cost-insight-value {
  font-size: 28px;
  line-height: 1;
  font-weight: 800;
  color: #0f172a;
  margin-bottom: 8px;
}

.cost-insight-sub {
  font-size: 13px;
  color: #64748b;
  line-height: 1.45;
}

.cost-run-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 12px;
}

.cost-run-card {
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  padding: 16px;
  background: #fff;
}

.cost-run-header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 12px;
}

.cost-run-title {
  font-size: 16px;
  font-weight: 700;
  color: #0f172a;
}

.cost-run-meta,
.cost-run-detail {
  font-size: 12px;
  color: #64748b;
  line-height: 1.5;
}

.cost-run-amount {
  font-size: 18px;
  font-weight: 800;
  color: #1e2532;
  white-space: nowrap;
}

.cost-run-stats {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

body.theme-dark .cost-insight-card,
body.theme-dark .cost-run-card {
  background: rgba(15, 23, 42, 0.72);
  border-color: rgba(148, 163, 184, 0.22);
  box-shadow: none;
}

body.theme-dark .cost-insight-label,
body.theme-dark .cost-insight-sub,
body.theme-dark .cost-run-meta,
body.theme-dark .cost-run-detail {
  color: #94a3b8;
}

body.theme-dark .cost-insight-value,
body.theme-dark .cost-run-title,
body.theme-dark .cost-run-amount,
body.theme-dark .model-bar-name {
  color: #f8fafc;
}

@media (max-width: 960px) {
  .cost-insight-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .cost-insight-grid {
    grid-template-columns: 1fr;
  }
}

/* ── Chart ──────────────────────────────────────────── */
.chart-container {
  position: relative;
  width: 100%;
  overflow-x: auto;
}
.bar-chart {
  display: flex;
  align-items: flex-end;
  gap: 6px;
  height: 160px;
  padding-top: 20px;
}
.bar-wrap {
  flex: 1;
  min-width: 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  height: 100%;
  justify-content: flex-end;
}
.bar {
  width: 100%;
  background: #6C63FF;
  border-radius: 3px 3px 0 0;
  min-height: 2px;
  transition: height 0.3s;
  opacity: 0.8;
  cursor: default;
  position: relative;
}
.bar:hover { opacity: 1; }
.bar-label {
  font-size: 9px;
  color: #9ca3af;
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  max-height: 32px;
  overflow: hidden;
}
.bar-tooltip {
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  background: #1e2532;
  color: #fff;
  padding: 3px 6px;
  border-radius: 4px;
  font-size: 10px;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  margin-bottom: 4px;
  z-index: 10;
}
.bar:hover .bar-tooltip { opacity: 1; }

/* Model breakdown bars */
.model-bar-row {
  margin-bottom: 16px;
}
.model-bar-label {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  margin-bottom: 6px;
}
.model-bar-name { font-weight: 500; color: #1e2532; }
.model-bar-cost { color: #6b7280; }
.model-bar-track {
  height: 8px;
  background: #f3f4f6;
  border-radius: 100px;
  overflow: hidden;
}
.model-bar-fill {
  height: 100%;
  border-radius: 100px;
  background: #6C63FF;
  transition: width 0.4s;
}

/* ── Toast ──────────────────────────────────────────── */
.dev-qa-controls {
  display: flex;
  gap: 16px;
  align-items: end;
  flex-wrap: wrap;
}

.dev-qa-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.dev-qa-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-top: 16px;
}

.dev-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-top: 4px;
  margin-bottom: 16px;
}

.dev-summary-card {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 14px;
}

.dev-summary-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #64748b;
  margin-bottom: 6px;
}

.dev-summary-value {
  font-size: 24px;
  line-height: 1;
  font-weight: 700;
  color: #0f172a;
}

.dev-summary-sub {
  margin-top: 6px;
  font-size: 12px;
  color: #64748b;
}

.dev-coverage-card {
  background: #0f172a;
  color: #e2e8f0;
  border-radius: 12px;
  padding: 16px;
  min-height: 320px;
}

.dev-coverage-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.dev-coverage-title {
  font-size: 16px;
  font-weight: 700;
  color: #f8fafc;
}

.dev-coverage-subtitle {
  font-size: 12px;
  color: #94a3b8;
  margin-top: 4px;
}

.dev-chip-row,
.dev-mini-grid,
.dev-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.dev-mini-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 10px;
}

.dev-mini-card {
  background: rgba(148, 163, 184, 0.12);
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 10px;
  padding: 12px;
}

.dev-mini-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #94a3b8;
  margin-bottom: 6px;
}

.dev-mini-value {
  font-size: 20px;
  font-weight: 700;
  color: #f8fafc;
}

.dev-mini-sub {
  margin-top: 4px;
  font-size: 12px;
  color: #cbd5e1;
}

.dev-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  background: rgba(148, 163, 184, 0.12);
  border: 1px solid rgba(148, 163, 184, 0.18);
  color: #e2e8f0;
}

.dev-chip.good {
  background: rgba(34, 197, 94, 0.12);
  border-color: rgba(34, 197, 94, 0.35);
  color: #bbf7d0;
}

.dev-chip.warn {
  background: rgba(245, 158, 11, 0.12);
  border-color: rgba(245, 158, 11, 0.35);
  color: #fde68a;
}

.dev-chip.bad {
  background: rgba(239, 68, 68, 0.12);
  border-color: rgba(239, 68, 68, 0.35);
  color: #fecaca;
}

.dev-list {
  margin-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.dev-list-item {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(148, 163, 184, 0.08);
  border: 1px solid rgba(148, 163, 184, 0.12);
}

.dev-list-main {
  min-width: 0;
}

.dev-list-title {
  font-size: 13px;
  font-weight: 600;
  color: #f8fafc;
}

.dev-list-meta {
  margin-top: 3px;
  font-size: 12px;
  color: #94a3b8;
}

.dev-list-score {
  font-size: 12px;
  font-weight: 700;
  color: #f8fafc;
  white-space: nowrap;
}

.dev-history-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.dev-history-card {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 14px;
}

.dev-history-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.dev-history-title {
  font-size: 14px;
  font-weight: 700;
  color: #1e2532;
}

.dev-history-meta {
  margin-top: 4px;
  font-size: 12px;
  color: #6b7280;
}

.dev-history-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.dev-history-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 9px;
  border-radius: 999px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  font-size: 12px;
  color: #334155;
}

.dev-history-concerns {
  margin-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.dev-history-concern {
  font-size: 12px;
  color: #92400e;
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: 8px;
  padding: 8px 10px;
}

.dev-history-clean {
  margin-top: 10px;
  font-size: 12px;
  color: #166534;
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: 8px;
  padding: 8px 10px;
}

.dev-ats-health-card .dev-chip {
  font-size: 11px;
}

.dev-ats-health-card .dev-list-score .dev-chip {
  padding: 4px 8px;
}

.dev-qa-pre {
  background: #0f172a;
  color: #e2e8f0;
  border-radius: 10px;
  padding: 14px;
  font-size: 12px;
  line-height: 1.45;
  overflow: auto;
  max-height: 320px;
  white-space: pre-wrap;
}

.dev-override-stack {
  display: grid;
  grid-template-columns: minmax(320px, 420px) minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

.dev-override-form {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 16px;
}

.dev-override-url-field {
  grid-column: 1 / -1;
}

.dev-override-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.dev-override-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.dev-override-card {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 14px 16px;
}

.dev-override-card-title {
  font-size: 14px;
  font-weight: 700;
  color: #111827;
}

.dev-override-card-meta {
  margin-top: 4px;
  font-size: 12px;
  color: #6b7280;
  word-break: break-word;
}

.dev-override-card-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

@media (max-width: 900px) {
  .dev-qa-grid,
  .dev-summary-grid,
  .dev-mini-grid {
    grid-template-columns: 1fr;
  }

  .dev-override-stack {
    grid-template-columns: 1fr;
  }
}

.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 500;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}
.toast {
  background: #1e2532;
  color: #fff;
  padding: 12px 18px;
  border-radius: 10px;
  font-size: 13.5px;
  font-weight: 500;
  box-shadow: 0 4px 16px rgba(0,0,0,0.15);
  display: flex;
  align-items: center;
  gap: 10px;
  pointer-events: auto;
  max-width: 340px;
  animation: slideUp 0.2s ease;
}
.toast.success { border-left: 3px solid #22c55e; }
.toast.error { border-left: 3px solid #ef4444; }
.toast.info { border-left: 3px solid #6C63FF; }
.toast.warning { border-left: 3px solid #f59e0b; }
@keyframes slideUp {
  from { transform: translateY(16px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

/* ── Loading ─────────────────────────────────────────── */
.loading-placeholder {
  color: var(--ink-quiet);
  font-size: 13.5px;
  padding: var(--space-4) 0;
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
}
.spinner {
  display: inline-block;
  width: 14px; height: 14px;
  border: 2px solid rgba(108, 99, 255, 0.18);
  border-top-color: var(--brand);
  border-radius: 50%;
  animation: spin 0.85s linear infinite;
  vertical-align: middle;
  margin-right: var(--space-1);
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Shimmer skeleton — used for "score in progress" rows. Give a cell
   a class="shimmer" to render a soft animated gradient placeholder. */
.shimmer {
  background: linear-gradient(90deg,
    rgba(108, 99, 255, 0.05) 0%,
    rgba(108, 99, 255, 0.14) 50%,
    rgba(108, 99, 255, 0.05) 100%);
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite ease-in-out;
  border-radius: var(--radius-xs);
  color: transparent;
}
@keyframes shimmer {
  from { background-position: 200% 0; }
  to { background-position: -200% 0; }
}

/* ── View toggle (Table / Cards) ───────────────────── */
.view-toggle {
  display: inline-flex;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--bg-surface-muted);
  gap: 2px;
}
.view-toggle-btn {
  padding: 5px 12px;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--ink-muted);
  background: transparent;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: background var(--t-fast) var(--ease), color var(--t-fast) var(--ease);
}
.view-toggle-btn:hover { color: var(--ink); }
.view-toggle-btn.is-active {
  background: var(--bg-surface);
  color: var(--ink-strong);
  box-shadow: var(--shadow-xs);
}

/* ── Jobs card grid ────────────────────────────────── */
.jobs-cards-wrap { margin-top: var(--space-2); }
.jobs-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: var(--space-4);
}
.jobs-cards-empty { grid-column: 1 / -1; }
.job-card {
  background: var(--bg-surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  box-shadow: var(--shadow-xs);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  transition: transform var(--t-fast) var(--ease),
              box-shadow var(--t-fast) var(--ease),
              border-color var(--t-fast) var(--ease);
}
.job-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: #cfd4e0;
}
.job-card:focus-visible {
  box-shadow: var(--shadow-md), 0 0 0 3px var(--brand-ring);
  outline: none;
}
.job-card-head {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: var(--space-3);
  align-items: start;
}
.job-card-heading { min-width: 0; }
.job-card-company {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin-bottom: 3px;
}
.job-card-title {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 600;
  color: var(--ink-strong);
  line-height: 1.3;
  letter-spacing: -0.01em;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.job-card-score-block {
  display: flex;
  flex-direction: column;
  gap: 4px;
  align-items: flex-end;
  flex-shrink: 0;
}
.score-badge-lg {
  width: 50px;
  height: 34px;
  font-size: 15px;
  border-radius: var(--radius-sm);
}
.job-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 8px;
  align-items: center;
  font-size: 12px;
  color: var(--ink-muted);
}
.job-card-meta-dot { color: var(--ink-quiet); }
.job-card-location, .job-card-recency, .job-card-salary { color: var(--ink-muted); }
.job-card-coverage {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-2);
  padding: var(--space-3);
  background: var(--bg-surface-muted);
  border-radius: var(--radius-md);
}
.job-card-coverage-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 4px;
}
.job-card-coverage-list li {
  font-size: 12.5px;
  line-height: 1.4;
  color: var(--ink);
}
.job-card-met {
  padding-left: 18px;
  position: relative;
}
.job-card-met::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--good);
  font-weight: 700;
}
.job-card-gap { color: var(--ink-muted); }
.job-card-actions {
  display: flex;
  gap: var(--space-2);
  align-items: center;
  padding-top: var(--space-2);
  border-top: 1px solid var(--line-soft);
  margin-top: auto;
}
.job-card-actions .btn { flex-shrink: 0; }

/* ── Hover JD preview (card-view v2) ────────────────── */
.job-card { position: relative; }
.job-card-with-preview:hover,
.job-card-with-preview:focus-within { z-index: 5; }
.job-card-preview {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  margin-top: 8px;
  padding: var(--space-4) var(--space-5);
  background: var(--bg-surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  opacity: 0;
  transform: translateY(-8px);
  pointer-events: none;
  transition: opacity var(--t-med) var(--ease),
              transform var(--t-med) var(--ease);
  z-index: 6;
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}
.job-card-preview::before {
  content: "";
  position: absolute;
  top: -6px;
  left: var(--space-6);
  width: 12px; height: 12px;
  background: var(--bg-surface);
  border-left: 1px solid var(--line);
  border-top: 1px solid var(--line);
  transform: rotate(45deg);
}
.job-card-with-preview:hover .job-card-preview,
.job-card-with-preview:focus-within .job-card-preview {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
.job-card-preview-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-4);
}
.job-card-preview-col { min-width: 0; }
.job-card-preview-label {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin-bottom: 6px;
}
.job-card-preview-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.job-card-preview-list li {
  display: grid;
  grid-template-columns: 14px 1fr;
  gap: 6px;
  font-size: 12.5px;
  line-height: 1.4;
  color: var(--ink);
}
.job-card-preview-icon { font-weight: 700; line-height: 1.4; }
.job-card-preview-met .job-card-preview-icon { color: var(--good); }
.job-card-preview-gap .job-card-preview-icon { color: var(--ink-muted); }
.job-card-preview-jd {
  font-size: 12.5px;
  line-height: 1.55;
  color: var(--ink-muted);
  background: var(--bg-surface-muted);
  padding: var(--space-3);
  border-radius: var(--radius-md);
  border-left: 3px solid var(--brand);
  max-height: 110px;
  overflow: hidden;
  position: relative;
}
.job-card-preview-jd::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 28px;
  background: linear-gradient(180deg, transparent, var(--bg-surface-muted));
  pointer-events: none;
}
.job-card-preview-foot {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--brand);
  text-align: right;
}
body.theme-dark .job-card-preview {
  background: var(--bg-surface);
  border-color: rgba(255, 255, 255, 0.08);
}
body.theme-dark .job-card-preview::before {
  background: var(--bg-surface);
  border-color: rgba(255, 255, 255, 0.08);
}
body.theme-dark .job-card-preview-jd {
  background: rgba(255, 255, 255, 0.04);
}
body.theme-dark .job-card-preview-jd::after {
  background: linear-gradient(180deg, transparent, rgba(255, 255, 255, 0.04));
}
@media (hover: none) {
  .job-card-preview { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .job-card-preview { transition: opacity var(--t-fast) linear; transform: none; }
  .job-card-with-preview:hover .job-card-preview,
  .job-card-with-preview:focus-within .job-card-preview { transform: none; }
}

body.theme-dark .job-card-coverage { background: rgba(255, 255, 255, 0.04); }
body.theme-dark .view-toggle { background: rgba(255, 255, 255, 0.04); }
body.theme-dark .view-toggle-btn.is-active {
  background: var(--bg-surface);
  color: var(--ink-strong);
}

/* ── Top priority (hero moment) ────────────────────── */
.top-priority-wrap { margin-bottom: var(--space-6); }
.top-priority-card {
  display: grid;
  grid-template-columns: 56px 1fr auto;
  gap: var(--space-5);
  align-items: center;
  padding: var(--space-5) var(--space-6);
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  background: var(--bg-surface);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition: transform var(--t-fast) var(--ease),
              box-shadow var(--t-fast) var(--ease),
              border-color var(--t-fast) var(--ease);
  position: relative;
  overflow: hidden;
}
.top-priority-card::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: var(--bg-hero);
  opacity: 0.6;
}
.top-priority-card:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
  border-color: #cfd4e0;
}
.top-priority-card > * { position: relative; z-index: 1; }
.top-priority-icon {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  background: var(--brand-gradient);
  color: #fff;
  font-size: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-brand);
  flex-shrink: 0;
}
.top-priority-eyebrow {
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 600;
  color: var(--brand);
  margin-bottom: 4px;
}
.top-priority-title {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 600;
  color: var(--ink-strong);
  letter-spacing: -0.01em;
  line-height: 1.25;
}
.top-priority-sub {
  font-size: 13.5px;
  color: var(--ink-muted);
  margin-top: 4px;
  line-height: 1.5;
}
.top-priority-card.top-priority-warn .top-priority-icon {
  background: linear-gradient(135deg, #f59e0b, #fbbf24);
  box-shadow: 0 4px 14px rgba(245, 158, 11, 0.32);
}
.top-priority-card.top-priority-warn .top-priority-eyebrow { color: var(--warn); }
.top-priority-card.top-priority-neutral .top-priority-icon {
  background: linear-gradient(135deg, #64748b, #94a3b8);
  box-shadow: 0 4px 14px rgba(100, 116, 139, 0.28);
}
.top-priority-card.top-priority-neutral .top-priority-eyebrow { color: var(--ink-muted); }
.top-priority-card.top-priority-calm .top-priority-icon {
  background: linear-gradient(135deg, #10b981, #34d399);
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.28);
}
.top-priority-card.top-priority-calm .top-priority-eyebrow { color: var(--good); }
body.theme-dark .top-priority-card {
  background: var(--bg-surface);
  border-color: var(--line);
}

/* ── Universe Health dashboard card ────────────────── */
.scans-health-card .card-body { padding: var(--space-4) var(--space-6); }
.universe-health-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-3);
}
.uh-stat {
  padding: var(--space-4);
  border-radius: var(--radius-md);
  background: var(--bg-surface-muted);
  border: 1px solid var(--line-soft);
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}
.uh-stat-label {
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-muted);
}
.uh-stat-value {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 600;
  color: var(--ink-strong);
  line-height: 1.05;
  letter-spacing: -0.01em;
}
.uh-stat-sub { font-size: 11.5px; color: var(--ink-quiet); }
.uh-stat-good { border-left: 3px solid var(--good); }
.uh-stat-warn { border-left: 3px solid var(--warn); }
.uh-stat-bad { border-left: 3px solid var(--bad); }
.uh-ats-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-top: var(--space-4);
  padding-top: var(--space-3);
  border-top: 1px solid var(--line-soft);
}
.uh-ats-chip {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: 6px 10px;
  border-radius: 999px;
  background: var(--bg-surface);
  border: 1px solid var(--line);
  font-size: 12px;
  color: var(--ink);
}
.uh-ats-chip strong { font-weight: 600; }
.uh-ats-chip .uh-ats-num { color: var(--ink-muted); font-variant-numeric: tabular-nums; }
.uh-ats-chip .uh-ats-fresh {
  color: var(--brand);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.uh-ats-chip .uh-ats-fresh small { color: var(--ink-quiet); font-weight: 400; margin-left: 2px; }
@media (max-width: 900px) {
  .universe-health-grid { grid-template-columns: repeat(2, 1fr); }
}
body.theme-dark .uh-stat { background: rgba(255, 255, 255, 0.03); }
body.theme-dark .uh-ats-chip { background: rgba(255, 255, 255, 0.03); }

/* Page tab transitions — soft fade-in when switching sections. */
.tab-section {
  animation: fadeInSection var(--t-slow) var(--ease);
}
@keyframes fadeInSection {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  .tab-section, .btn, .card, .stat-card { animation: none !important; transition: none !important; }
  .shimmer { animation: none !important; }
}

/* ── Activity feed ──────────────────────────────────── */
.activity-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid #f3f4f6;
  font-size: 13px;
}
.activity-card {
  padding: 12px 14px;
  border: 1px solid #e8eaf0;
  border-radius: 14px;
  background: #fff;
  margin-bottom: 10px;
}
.activity-item:last-child { border-bottom: none; }
.activity-icon { font-size: 16px; margin-top: 1px; flex-shrink: 0; }
.activity-body { flex: 1; }
.activity-title { color: #1e2532; font-weight: 500; }
.activity-meta { color: #9ca3af; font-size: 12px; margin-top: 2px; }

/* ── Follow-up items ────────────────────────────────── */
.followup-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid #f3f4f6;
}
.followup-card {
  padding: 12px 14px;
  border: 1px solid #e8eaf0;
  border-radius: 14px;
  background: #fff;
  margin-bottom: 10px;
}
.followup-item:last-child { border-bottom: none; }
.followup-urgency { font-size: 16px; flex-shrink: 0; }
.followup-body { flex: 1; }
.followup-company { font-size: 13.5px; font-weight: 600; color: #1e2532; }
.followup-title { font-size: 12.5px; color: #6b7280; }
.followup-due { font-size: 11.5px; color: #f59e0b; font-weight: 500; margin-top: 2px; }

/* ── Job list mini-cards ─────────────────────────────── */
.mini-job-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid #f3f4f6;
  cursor: pointer;
}
.mini-job-item:last-child { border-bottom: none; }
.mini-job-item:hover .mini-job-company { color: #6C63FF; }
.mini-job-body { flex: 1; }
.mini-job-company { font-size: 13.5px; font-weight: 600; color: #1e2532; }
.mini-job-title { font-size: 12.5px; color: #6b7280; }

/* ── Pipeline summary mini ──────────────────────────── */
.pipeline-mini {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.pipeline-mini-item {
  flex: 1;
  min-width: 70px;
  background: #f9fafb;
  border: 1px solid #e8eaf0;
  border-radius: 8px;
  padding: 8px 10px;
  text-align: center;
}
.pipeline-mini-num {
  font-size: 20px;
  font-weight: 700;
  color: #1e2532;
}
.pipeline-mini-label {
  font-size: 11px;
  color: #9ca3af;
  margin-top: 2px;
}

/* ── Responsive tweaks ──────────────────────────────── */
@media (max-width: 1200px) {
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .dashboard-grid { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
  .sidebar { width: 60px; min-width: 60px; }
  .logo-text, .nav-label, .sidebar-footer { display: none; }
  .main-content { margin-left: 60px; }
  .tab-section { padding: 16px; }
  .stat-grid { grid-template-columns: 1fr 1fr; }
  .slide-panel { width: 100vw; }
}

/* ── Misc utilities ─────────────────────────────────── */
.text-muted { color: #9ca3af; }
.text-sm { font-size: 12px; }
.font-bold { font-weight: 700; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.empty-state {
  text-align: center;
  padding: 56px 24px 48px;
  color: var(--ink-quiet);
  line-height: 1.6;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-2);
}
.empty-state-icon {
  font-size: 44px;
  margin-bottom: var(--space-2);
  opacity: 0.7;
  filter: grayscale(0.2);
}
.empty-state-text { font-size: 13.5px; color: var(--ink-muted); max-width: 52ch; }
.empty-state-title {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: -0.01em;
}
.empty-state-actions {
  display: flex; gap: var(--space-2); margin-top: var(--space-3);
}
.empty-state-text { font-size: 14px; }

/* Scan type label */
.scan-type {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  font-weight: 500;
  padding: 2px 8px;
  border-radius: 6px;
  background: #ede9fe;
  color: #7c3aed;
}

/* ─────────────────────────────────────────────────────
   Onboarding / Setup
   ───────────────────────────────────────────────────── */

/* ── Progress steps ─────────────────────────────────── */
.setup-shell {
  max-width: 1280px;
  margin: 0 auto;
  display: grid;
  gap: 28px;
}

.setup-hero-band {
  padding: 8px 0 0;
}

.setup-page-header {
  align-items: flex-end;
  margin-bottom: 20px;
}

.setup-kicker,
.setup-stage-eyebrow,
.package-hero-topline {
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #6d28d9;
  margin-bottom: 8px;
}

.setup-hero-aside {
  display: flex;
  justify-content: flex-end;
}

.setup-hero-stack {
  display: grid;
  gap: 12px;
}

.setup-hero-card {
  max-width: 320px;
  padding: 16px 18px;
  border-radius: 18px;
  border: 1px solid rgba(196, 181, 253, 0.65);
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.08) 0%, rgba(59, 130, 246, 0.05) 100%);
}

.setup-trust-card {
  border-color: rgba(148, 163, 184, 0.28);
  background: linear-gradient(180deg, rgba(255,255,255,0.94) 0%, rgba(248,250,252,0.98) 100%);
}

.setup-hero-card-label {
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #6d28d9;
}

.setup-hero-card-copy {
  margin-top: 8px;
  color: #475569;
  line-height: 1.6;
}

.setup-trust-list {
  margin-top: 10px;
  display: grid;
  gap: 8px;
}

.setup-trust-item {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  color: #475569;
  font-size: 12.5px;
  line-height: 1.55;
}

.setup-trust-icon {
  color: #7c3aed;
  font-weight: 700;
}

.setup-progress-wrap {
  border-radius: 22px;
  border: 1px solid rgba(226, 232, 240, 0.9);
  background: linear-gradient(180deg, rgba(255,255,255,0.96) 0%, rgba(248,250,252,0.98) 100%);
  box-shadow: 0 18px 48px rgba(15, 23, 42, 0.06);
}

.setup-workspace {
  display: grid;
  gap: 24px;
}

.setup-stage-panel {
  box-shadow: 0 24px 80px rgba(15, 23, 42, 0.08);
}

.setup-progress {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  margin-bottom: 0;
  padding: 22px 24px;
}
.setup-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  min-width: 80px;
}
.setup-step-num {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #e8eaf0;
  color: #9ca3af;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
  transition: all 0.25s;
}
.setup-step.active .setup-step-num {
  background: #6C63FF;
  color: #fff;
  box-shadow: 0 2px 8px rgba(108,99,255,0.3);
}
.setup-step.done .setup-step-num {
  background: #22c55e;
  color: #fff;
}
.setup-step-label {
  font-size: 12px;
  font-weight: 500;
  color: #9ca3af;
  transition: color 0.25s;
}
.setup-step.active .setup-step-label { color: #1e2532; }
.setup-step.done .setup-step-label { color: #22c55e; }
.setup-step-line {
  flex: 1;
  height: 2px;
  background: #e8eaf0;
  margin: 0 8px;
  margin-bottom: 22px;
  max-width: 80px;
}

.first-wave-run-note {
  margin-bottom: 18px;
  padding: 14px 16px;
  border-radius: 18px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  background: linear-gradient(180deg, rgba(255,255,255,0.96) 0%, rgba(248,250,252,0.98) 100%);
}

.fw-run-note-kicker {
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #6d28d9;
}

.fw-run-note-title {
  margin-top: 6px;
  font-size: 15px;
  font-weight: 700;
  color: #111827;
}

.fw-run-note-copy,
.fw-run-note-meta {
  margin-top: 6px;
  font-size: 12.5px;
  line-height: 1.55;
  color: #475569;
}

.fw-run-note-pills {
  margin-top: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.fw-run-note-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 999px;
  border: 1px solid rgba(196, 181, 253, 0.55);
  background: rgba(124, 58, 237, 0.08);
  color: #5b21b6;
  font-size: 11px;
  font-weight: 700;
  padding: 6px 10px;
}

body.theme-dark .setup-trust-card,
body.theme-dark .first-wave-run-note {
  border-color: rgba(148, 163, 184, 0.24);
  background: linear-gradient(180deg, rgba(15,23,42,0.92) 0%, rgba(15,23,42,0.86) 100%);
}

body.theme-dark .fw-run-note-pill {
  border-color: rgba(167, 139, 250, 0.35);
  background: rgba(124, 58, 237, 0.16);
  color: #ddd6fe;
}
body.theme-dark .upload-support {
  border-color: rgba(148, 163, 184, 0.24);
  background: linear-gradient(180deg, rgba(15,23,42,0.92) 0%, rgba(15,23,42,0.86) 100%);
}
body.theme-dark .upload-support-item-title {
  color: #f8fafc;
}
body.theme-dark .upload-support-item-copy,
body.theme-dark .upload-support-footnote,
body.theme-dark .upload-meta-subcopy {
  color: #94a3b8;
}
body.theme-dark .upload-support-step {
  background: rgba(167, 139, 250, 0.18);
  color: #ddd6fe;
}
body.theme-dark .profile-review-mode-strip {
  border-color: rgba(167, 139, 250, 0.35);
  background: rgba(124, 58, 237, 0.16);
}
body.theme-dark .profile-review-mode-pill {
  background: rgba(15,23,42,0.92);
  color: #ddd6fe;
}
body.theme-dark .profile-review-mode-copy {
  color: #ddd6fe;
}
body.theme-dark .setup-jobs-handoff-panel,
body.theme-dark .setup-background-details,
body.theme-dark .setup-profile-support-details {
  border-color: #334155;
  background: linear-gradient(180deg, rgba(15,23,42,0.96) 0%, rgba(15,23,42,0.90) 100%);
}
body.theme-dark .setup-background-details summary,
body.theme-dark .setup-profile-support-summary {
  color: #e5e7eb;
}
body.theme-dark .setup-background-details-meta,
body.theme-dark .setup-profile-support-meta {
  color: #94a3b8;
}

/* ── Upload zone ────────────────────────────────────── */
/* ─── Resume drop zone v2 (Wave 2 Intake polish) ─────────────────────── */
.upload-zone {
  position: relative;
  border: 2px dashed var(--line);
  border-radius: var(--radius-xl);
  padding: 56px 32px;
  cursor: pointer;
  background: linear-gradient(180deg, var(--bg-surface) 0%, var(--bg-surface-muted) 100%);
  transition: border-color var(--t-med) var(--ease),
              background var(--t-med) var(--ease),
              box-shadow var(--t-med) var(--ease),
              transform var(--t-med) var(--ease);
  isolation: isolate;
  overflow: hidden;
}
.upload-zone::before {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  padding: 2px;
  background: var(--brand-gradient);
  -webkit-mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
          mask-composite: exclude;
  opacity: 0;
  transition: opacity var(--t-med) var(--ease);
  pointer-events: none;
}
.upload-zone:hover {
  border-color: var(--brand);
  background: linear-gradient(180deg, var(--bg-surface) 0%, var(--brand-50) 100%);
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}
.upload-zone.drag-over {
  border-color: transparent;
  background: linear-gradient(180deg, var(--brand-50) 0%, #ffffff 100%);
  box-shadow: 0 0 0 6px var(--brand-ring), var(--shadow-brand-lg);
  transform: scale(1.01);
}
.upload-zone.drag-over::before { opacity: 1; }
body.theme-dark .upload-zone {
  background: linear-gradient(180deg, var(--bg-surface) 0%, rgba(108, 99, 255, 0.04) 100%);
}
body.theme-dark .upload-zone:hover {
  background: linear-gradient(180deg, var(--bg-surface) 0%, rgba(108, 99, 255, 0.10) 100%);
}
body.theme-dark .upload-zone.drag-over {
  background: linear-gradient(180deg, rgba(108, 99, 255, 0.18) 0%, var(--bg-surface) 100%);
}
.upload-icon-ring {
  width: 68px;
  height: 68px;
  margin: 0 auto 14px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--brand-50);
  color: var(--brand);
  font-size: 30px;
  transition: transform var(--t-med) var(--ease),
              background var(--t-med) var(--ease),
              color var(--t-med) var(--ease),
              box-shadow var(--t-med) var(--ease);
}
.upload-zone:hover .upload-icon-ring {
  transform: translateY(-2px);
  background: var(--brand);
  color: #fff;
  box-shadow: var(--shadow-brand);
}
.upload-zone.drag-over .upload-icon-ring {
  background: var(--brand-gradient);
  color: #fff;
  box-shadow: var(--shadow-brand-lg);
  animation: upload-icon-pulse 1.2s ease-in-out infinite;
}
body.theme-dark .upload-icon-ring { background: rgba(108, 99, 255, 0.18); }
@keyframes upload-icon-pulse {
  0%, 100% { transform: translateY(-2px) scale(1); }
  50%      { transform: translateY(-4px) scale(1.06); }
}
.upload-icon {
  font-size: 48px;
  margin-bottom: 12px;
  display: none;
}
.upload-title {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 600;
  color: var(--ink-strong);
  margin-bottom: 6px;
  letter-spacing: -0.01em;
  line-height: 1.25;
  transition: color var(--t-med) var(--ease);
}
.upload-zone.drag-over .upload-title { color: var(--brand-600); }
body.theme-dark .upload-zone.drag-over .upload-title { color: #c7d2fe; }
.upload-hint {
  font-size: 13px;
  color: var(--ink-muted);
  line-height: 1.5;
  max-width: 420px;
  margin: 0 auto;
}
.upload-types-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 14px;
  padding: 5px 12px;
  border-radius: 999px;
  background: var(--bg-surface);
  border: 1px solid var(--line);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-muted);
}
.upload-types-pill .upload-types-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--good);
  box-shadow: 0 0 0 2px rgba(22, 163, 74, 0.18);
}
body.theme-dark .upload-types-pill { background: rgba(255,255,255,0.04); }
.upload-zone.drag-over .upload-types-pill {
  border-color: var(--brand);
  color: var(--brand-600);
}
@media (prefers-reduced-motion: reduce) {
  .upload-zone, .upload-zone:hover, .upload-zone.drag-over { transform: none; }
  .upload-icon-ring { animation: none !important; transition: none; }
}
.upload-meta {
  margin-top: 14px;
  font-size: 13px;
  color: #475569;
}
.upload-meta strong {
  color: #1e2532;
}
.upload-meta-subcopy {
  margin-top: 6px;
  font-size: 12.5px;
  line-height: 1.55;
  color: #64748b;
}
.upload-trust-note {
  margin-top: 12px;
  padding: 12px 14px;
  border-radius: 12px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  color: #475569;
  font-size: 13px;
  line-height: 1.55;
}
.upload-support {
  margin-top: 18px;
  text-align: left;
  border-radius: 18px;
  border: 1px solid #e5e7eb;
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  padding: 16px 18px;
}
.upload-support-title {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #6d28d9;
}
.upload-support-grid {
  margin-top: 12px;
  display: grid;
  gap: 10px;
}
.upload-support-item {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
}
.upload-support-step {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(124, 58, 237, 0.1);
  color: #6d28d9;
  font-size: 12px;
  font-weight: 800;
}
.upload-support-item-title {
  font-size: 13px;
  font-weight: 700;
  color: #1e2532;
}
.upload-support-item-copy,
.upload-support-footnote {
  margin-top: 3px;
  font-size: 12.5px;
  line-height: 1.55;
  color: #64748b;
}
.upload-support-actions {
  margin-top: 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}
.upload-support-actions:empty {
  display: none;
  margin-top: 0;
}
.parsed-summary-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 16px;
}
.parsed-item {
  font-size: 13px;
  color: #374151;
  padding: 4px 0;
}

/* ── Chat interface ─────────────────────────────────── */
.chat-card {
  display: flex;
  flex-direction: column;
  height: calc(100vh - 280px);
  min-height: 520px;
  max-height: 720px;
}
.chat-card-v2 {
  border-radius: var(--radius-xl);
  overflow: hidden;
  border-color: var(--line);
  box-shadow: var(--shadow-md);
}
.chat-hero {
  padding: 18px 24px 14px;
  background: var(--bg-hero);
  border-bottom: 1px solid var(--line-soft);
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.chat-hero-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}
.chat-hero-copy { flex: 1; min-width: 0; }
.chat-hero-eyebrow {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--brand);
  margin-bottom: 4px;
}
.chat-hero-title {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 600;
  color: var(--ink-strong);
  line-height: 1.2;
  letter-spacing: -0.015em;
  margin: 0;
}
.chat-hero-sub {
  margin-top: 4px;
  font-size: 12.5px;
  color: var(--ink-muted);
  line-height: 1.5;
}
.chat-progress-pill {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 999px;
  background: var(--bg-surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-xs);
  flex-shrink: 0;
  font-variant-numeric: tabular-nums;
}
.chat-progress-pill-current {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 600;
  color: var(--brand);
  line-height: 1;
}
.chat-progress-pill-sep {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-quiet);
}
.chat-progress-pill-total {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
}
body.theme-dark .chat-progress-pill { background: rgba(255,255,255,0.04); }
.chat-progress-dots {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.chat-progress-dots .chat-dot {
  flex: 1 1 18px;
  max-width: 36px;
  height: 5px;
  border-radius: 999px;
  background: var(--line);
  transition: background var(--t-med) var(--ease), transform var(--t-med) var(--ease);
}
.chat-progress-dots .chat-dot.is-done {
  background: var(--brand-gradient);
}
.chat-progress-dots .chat-dot.is-current {
  background: var(--brand);
  transform: scaleY(1.4);
}
body.theme-dark .chat-progress-dots .chat-dot { background: rgba(255,255,255,0.08); }
.chat-body {
  flex: 1;
  overflow-y: auto;
  padding: 22px 24px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  scroll-behavior: smooth;
  background: var(--bg-surface);
}
.chat-message {
  display: flex;
  flex-direction: column;
  max-width: 86%;
  animation: chat-msg-in 280ms var(--ease) both;
}
@keyframes chat-msg-in {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}
.chat-message.ai {
  align-self: flex-start;
}
.chat-message.user {
  align-self: flex-end;
}
.chat-bubble {
  padding: 13px 18px;
  border-radius: var(--radius-xl);
  font-size: 13.5px;
  line-height: 1.6;
  word-break: break-word;
  box-shadow: var(--shadow-xs);
}
.chat-bubble.ai {
  background: var(--bg-surface-muted);
  color: var(--ink-strong);
  border: 1px solid var(--line-soft);
  border-bottom-left-radius: 6px;
}
.chat-bubble.user {
  background: var(--brand-gradient);
  color: #fff;
  border-bottom-right-radius: 6px;
  box-shadow: var(--shadow-brand);
}
body.theme-dark .chat-bubble.ai {
  background: rgba(255,255,255,0.04);
  border-color: rgba(255,255,255,0.06);
  color: var(--ink-strong);
}
@media (prefers-reduced-motion: reduce) {
  .chat-message { animation: none; }
}
.chat-inline-suggestions,
.chat-inline-selection-summary {
  margin-top: 10px;
  width: 100%;
}
.chat-inline-selection-summary {
  font-size: 12.5px;
  color: #64748b;
  padding: 0 2px;
}
.chat-message.ai.active-prompt .chat-bubble.ai {
  box-shadow: 0 0 0 1px rgba(108,99,255,0.08);
}
.chat-suggestions {
  display: none !important;
}
.chat-selection-summary {
  display: none !important;
}
.chat-input-area {
  display: flex;
  gap: 10px;
  padding: 16px 24px 18px;
  border-top: 1px solid var(--line-soft);
  background: var(--bg-surface);
  align-items: flex-end;
}
.chat-input {
  flex: 1;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 12px 16px;
  font-size: 13.5px;
  font-family: inherit;
  resize: none;
  outline: none;
  max-height: 120px;
  background: var(--bg-surface);
  color: var(--ink);
  transition: border-color var(--t-fast) var(--ease),
              box-shadow var(--t-fast) var(--ease);
}
.chat-input:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--brand-ring);
}
.chat-send {
  padding: 10px 20px;
  border-radius: 12px;
  flex-shrink: 0;
}
.chat-loading {
  text-align: center;
  padding: 24px;
  color: #9ca3af;
  font-size: 13.5px;
}
.chat-action-area {
  display: flex;
  justify-content: center;
  padding: 16px 0;
}

/* ── Typing indicator ───────────────────────────────── */
.chat-typing {
  align-self: flex-start;
  animation: chat-msg-in 280ms var(--ease) both;
}
.typing-dots {
  display: flex;
  gap: 5px;
  padding: 14px 18px;
  background: var(--bg-surface-muted);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-xl);
  border-bottom-left-radius: 6px;
  box-shadow: var(--shadow-xs);
}
body.theme-dark .typing-dots {
  background: rgba(255,255,255,0.04);
  border-color: rgba(255,255,255,0.06);
}
.typing-dots span {
  width: 7px;
  height: 7px;
  background: var(--brand);
  opacity: 0.55;
  border-radius: 50%;
  animation: typingBounce 1.2s ease-in-out infinite;
}
.typing-dots span:nth-child(2) { animation-delay: 0.15s; }
.typing-dots span:nth-child(3) { animation-delay: 0.3s; }
@keyframes typingBounce {
  0%, 60%, 100% { transform: translateY(0); opacity: 0.4; }
  30% { transform: translateY(-6px); opacity: 1; }
}

/* ── Profile review ─────────────────────────────────── */
.profile-review-section {
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid #f3f4f6;
}
.profile-review-section:last-of-type {
  border-bottom: none;
}
.profile-editable {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 0;
  font-size: 13.5px;
  color: #374151;
}
.profile-edit-btn {
  opacity: 0;
  transition: opacity 0.15s;
}
.profile-editable:hover .profile-edit-btn {
  opacity: 1;
}
.career-role-card {
  background: #f9fafb;
  border: 1px solid #e8eaf0;
  border-radius: 8px;
  padding: 12px 14px;
  margin-bottom: 8px;
  font-size: 13.5px;
}
.profile-review-card {
  border-color: #ddd6fe;
  background: linear-gradient(180deg, #ffffff 0%, #faf9ff 100%);
}
.profile-review-header {
  border-bottom-color: #ede9fe;
}
.profile-review-shell {
  display: grid;
  gap: 18px;
}
.profile-review-shell-editorial {
  gap: 20px;
}
.profile-review-mode-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid rgba(196, 181, 253, 0.55);
  background: rgba(124, 58, 237, 0.08);
}
.profile-review-mode-pill {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  background: #ffffff;
  color: #6d28d9;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 6px 10px;
}
.profile-review-mode-copy {
  font-size: 13px;
  line-height: 1.55;
  color: #5b21b6;
}
.profile-review-hero {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
}
.profile-review-hero-editorial {
  padding: 4px 0 2px;
}
.profile-review-editorial-copy {
  max-width: 760px;
  margin-top: 14px;
  font-size: 15px;
  line-height: 1.75;
  color: #334155;
}
.profile-review-badges,
.profile-review-pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.profile-review-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 14px;
}
.profile-review-grid-editorial {
  align-items: start;
}
.profile-review-block {
  background: rgba(255,255,255,0.9);
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  padding: 16px 18px;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.05);
}
.profile-review-block-feature {
  grid-column: span 2;
  background: linear-gradient(180deg, #ffffff 0%, #faf7ff 100%);
  border-color: #ddd6fe;
}
.profile-review-block-feature-soft {
  background: linear-gradient(180deg, #fffdf8 0%, #f8fbff 100%);
  border-color: #dbe4ff;
}
.profile-review-list {
  margin-top: 0;
}
.profile-review-block .fw-meta-label {
  margin-bottom: 10px;
}
.profile-review-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-start;
}
.profile-review-shell-compact {
  display: grid;
  gap: 18px;
}
.profile-review-hero-compact {
  align-items: flex-start;
}
.profile-review-grid-compact {
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}
.profile-review-inline-note {
  padding: 14px 16px;
  border-radius: 14px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  color: #334155;
  line-height: 1.55;
}
.profile-review-empty {
  text-align: center;
  padding: 24px 8px 8px;
}

/* ─── Profile reveal hero (Wave 2 Intake polish) ──────────────────────── */
.profile-reveal-hero {
  position: relative;
  border-radius: var(--radius-xl);
  padding: 28px 30px 26px;
  background: var(--bg-hero);
  border: 1px solid rgba(108, 99, 255, 0.18);
  box-shadow: var(--shadow-md);
  overflow: hidden;
  animation: reveal-fade-up 520ms var(--ease) both;
}
.profile-reveal-hero::before {
  content: "";
  position: absolute;
  inset: -2px;
  border-radius: inherit;
  padding: 2px;
  background: var(--brand-gradient);
  -webkit-mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
          mask-composite: exclude;
  opacity: 0.18;
  pointer-events: none;
}
.profile-reveal-eyebrow {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--brand);
  margin-bottom: 10px;
  animation: reveal-fade-up 520ms var(--ease) 80ms both;
}
.profile-reveal-quote {
  position: relative;
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 500;
  font-style: italic;
  line-height: 1.45;
  color: var(--ink-strong);
  letter-spacing: -0.01em;
  padding-left: 28px;
  max-width: 720px;
  animation: reveal-fade-up 600ms var(--ease) 160ms both;
}
.profile-reveal-quote::before {
  content: "“";
  position: absolute;
  left: -2px;
  top: -8px;
  font-family: var(--font-display);
  font-size: 56px;
  line-height: 1;
  color: var(--brand);
  opacity: 0.45;
}
.profile-reveal-byline {
  margin-top: 12px;
  font-size: 12.5px;
  color: var(--ink-muted);
  animation: reveal-fade-up 600ms var(--ease) 240ms both;
}
.profile-reveal-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 14px;
  margin-top: 22px;
  animation: reveal-fade-up 600ms var(--ease) 320ms both;
}
.profile-reveal-stat {
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid rgba(108, 99, 255, 0.14);
  border-radius: var(--radius-lg);
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  box-shadow: var(--shadow-xs);
}
body.theme-dark .profile-reveal-hero {
  background: rgba(108, 99, 255, 0.08);
  border-color: rgba(108, 99, 255, 0.25);
}
body.theme-dark .profile-reveal-stat {
  background: rgba(255, 255, 255, 0.03);
  border-color: rgba(255, 255, 255, 0.06);
}
.profile-reveal-stat-value {
  font-family: var(--font-display);
  font-size: 30px;
  font-weight: 600;
  color: var(--ink-strong);
  line-height: 1.05;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}
.profile-reveal-stat-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-muted);
}
.profile-reveal-stat-meta {
  font-size: 12px;
  color: var(--ink-muted);
  margin-top: 4px;
  line-height: 1.4;
}
@keyframes reveal-fade-up {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

.profile-review-shell-revealed > * {
  animation: reveal-fade-up 520ms var(--ease) both;
}
.profile-review-shell-revealed > *:nth-child(1) { animation-delay: 60ms; }
.profile-review-shell-revealed > *:nth-child(2) { animation-delay: 380ms; }
.profile-review-shell-revealed > *:nth-child(3) { animation-delay: 460ms; }
.profile-review-shell-revealed > *:nth-child(4) { animation-delay: 540ms; }
.profile-review-shell-revealed > *:nth-child(5) { animation-delay: 620ms; }
.profile-review-shell-revealed > *:nth-child(6) { animation-delay: 700ms; }

@media (prefers-reduced-motion: reduce) {
  .profile-reveal-hero,
  .profile-reveal-eyebrow,
  .profile-reveal-quote,
  .profile-reveal-byline,
  .profile-reveal-stats,
  .profile-review-shell-revealed > * {
    animation: none !important;
  }
}
.fw-idle-message {
  margin-top: 0;
}
.first-wave-shell {
  max-width: 1240px;
  margin: 0 auto;
}

.first-wave-stage-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 20px;
  align-items: start;
}

.first-wave-sidecar {
  position: static;
  display: grid;
  gap: 14px;
}
.first-wave-sidecar > :empty,
#first-wave-results:empty,
#first-wave-cta:empty {
  display: none;
}

@media (max-width: 768px) {
  .profile-review-hero {
    flex-direction: column;
  }

  .profile-review-block-feature {
    grid-column: span 1;
  }

  .profile-review-actions {
    flex-direction: column;
  }

  .profile-review-actions .btn {
    width: 100%;
  }

  .setup-page-header,
  .first-wave-stage-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .setup-hero-aside {
    justify-content: flex-start;
  }

  .first-wave-sidecar {
    position: static;
  }

  .package-hero-head,
  .package-modal-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* ── First Wave ────────────────────────────────────────── */
.first-wave-header {
  text-align: center;
  margin-bottom: 32px;
}
.first-wave-icon {
  font-size: 56px;
  margin-bottom: 8px;
  animation: rocketPulse 2s ease-in-out infinite;
}
@keyframes rocketPulse {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-6px) scale(1.05); }
}
.first-wave-title {
  font-size: 24px;
  font-weight: 700;
  color: #111827;
  margin-bottom: 4px;
}
.first-wave-subtitle {
  font-size: 14px;
}
.first-wave-steps {
  display: flex;
  flex-direction: column;
  gap: 0;
}
.fw-step {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 14px 16px;
  border-radius: 12px;
  transition: background 0.3s, opacity 0.3s;
  opacity: 0.4;
}
.fw-step.active {
  opacity: 1;
  background: #f3f0ff;
}
.fw-step.done {
  opacity: 1;
}
.fw-step.error {
  opacity: 1;
  background: #fef2f2;
}
.fw-step-icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  flex-shrink: 0;
  background: #e8eaf0;
  transition: background 0.3s;
}
.fw-step.active .fw-step-icon {
  background: #6C63FF;
  color: white;
}
.fw-step.done .fw-step-icon {
  background: #22c55e;
  color: white;
}
.fw-step.error .fw-step-icon {
  background: #ef4444;
  color: white;
}
.fw-step-body {
  flex: 1;
  min-width: 0;
}
.fw-step-label {
  font-size: 14px;
  font-weight: 600;
  color: #374151;
}
.fw-step.active .fw-step-label {
  color: #6C63FF;
}
.fw-step-detail {
  font-size: 12.5px;
  color: #6b7280;
  margin-top: 2px;
}
.fw-step-result {
  margin-top: 10px;
  background: #f9fafb;
  border: 1px solid #e8eaf0;
  border-radius: 8px;
  padding: 12px 14px;
  font-size: 13px;
  color: #374151;
  animation: fadeSlideIn 0.4s ease-out;
}
@keyframes fadeSlideIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}
.fw-step-spinner {
  width: 16px;
  height: 16px;
  border: 2px solid rgba(108, 99, 255, 0.25);
  border-top-color: #6C63FF;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  display: inline-block;
}
@keyframes spin {
  to { transform: rotate(360deg); }
}
/* ── Streaming scan progress ─────────────────────────── */
.fw-scan-source {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 0;
  font-size: 13px;
  color: #374151;
  animation: fadeSlideIn 0.3s ease-out;
}
.fw-scan-check {
  color: #22c55e;
  font-weight: 700;
}
.fw-scan-count {
  margin-left: auto;
  color: #6b7280;
  font-size: 12px;
}
.fw-scan-total {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid #e8eaf0;
  font-size: 13.5px;
  color: #111827;
}
.fw-profile-shell {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.fw-profile-card {
  position: relative;
  padding-top: 4px;
}

.fw-profile-header {
  text-align: center;
  padding-right: 120px;
}

.fw-profile-header-tight {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  text-align: left;
  padding-right: 0;
}

.fw-profile-name {
  font-size: 32px;
  line-height: 1.1;
  font-weight: 800;
  color: #111827;
}

.fw-profile-credentials {
  margin-top: 8px;
  font-size: 15px;
  color: #6b7280;
}

.fw-profile-headline {
  margin-top: 20px;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.35;
  color: #111827;
}

.review-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
}
.review-card {
  border: 1px solid #e8eaf0;
  border-radius: 12px;
  padding: 16px;
  background: #fbfcff;
}
.review-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}
.review-track {
  font-size: 14px;
  font-weight: 700;
  color: #111827;
}
.review-total {
  font-size: 12.5px;
  color: #6b7280;
  margin-top: 2px;
}
.review-generated {
  font-size: 12px;
  color: #9ca3af;
  white-space: nowrap;
}
.review-counts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}
.review-lead {
  margin-bottom: 12px;
  font-size: 12.5px;
  color: #64748b;
  line-height: 1.55;
}
.review-pill {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 11.5px;
  font-weight: 700;
}
.review-pill.apply-now {
  background: #dcfce7;
  color: #166534;
}
.review-pill.apply {
  background: #dbeafe;
  color: #1d4ed8;
}
.review-pill.borderline {
  background: #fef3c7;
  color: #92400e;
}
.review-preview {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.review-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.review-row-button {
  width: 100%;
  border: 0;
  background: transparent;
  padding: 8px;
  margin: -8px;
  border-radius: 8px;
  text-align: left;
  cursor: pointer;
}
.review-row-button:hover {
  background: #f3f4f6;
}
.review-row-main {
  min-width: 0;
}
.review-row-company {
  font-size: 13px;
  font-weight: 600;
  color: #111827;
}
.review-row-title {
  font-size: 12.5px;
  color: #6b7280;
  line-height: 1.35;
}
.review-row-score {
  flex-shrink: 0;
  font-size: 12px;
  font-weight: 700;
  min-width: 36px;
  text-align: right;
}
.review-row-score.high {
  color: #15803d;
}
.review-row-score.mid {
  color: #a16207;
}
.review-row-score.low,
.review-row-score.none {
  color: #6b7280;
}
.review-card-actions {
  margin-top: 14px;
  display: flex;
  justify-content: flex-end;
}
.fw-cta-card {
  max-width: 760px;
  margin: 0 auto;
  padding: 18px 20px;
  border: 1px solid #e8eaf0;
  border-radius: 14px;
  background: linear-gradient(180deg, #fbfcff 0%, #f8fafc 100%);
}
.fw-cta-title {
  font-size: 18px;
  font-weight: 700;
  color: #111827;
}
.fw-cta-subtitle {
  margin-top: 8px;
  font-size: 14px;
  line-height: 1.55;
  color: #4b5563;
}
.fw-cta-actions {
  margin-top: 16px;
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
}
.empty-state.compact {
  padding: 8px 0 0;
}

.fw-profile-summary {
  margin-top: 12px;
  font-size: 14px;
  line-height: 1.8;
  color: #4b5563;
}

.fw-career-profile-tight {
  background: linear-gradient(180deg, #fcfcff 0%, #f8fafc 100%);
}

.fw-profile-meta-grid,
.fw-resume-feedback-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.fw-profile-meta-grid-editorial {
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.fw-meta-card,
.fw-strategy-card,
.fw-feedback-column {
  background: rgba(255,255,255,0.88);
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  padding: 14px 16px;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.04);
}

.fw-meta-label,
.fw-feedback-title,
.fw-recruiter-angle-label {
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #64748b;
  margin-bottom: 8px;
}

.fw-meta-value {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: #1f2937;
  font-size: 13px;
  line-height: 1.5;
}

.fw-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.fw-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 999px;
  padding: 6px 10px;
  background: #ede9fe;
  color: #5b21b6;
  font-size: 12px;
  font-weight: 700;
}

.fw-chip-soft {
  background: #eff6ff;
  color: #1d4ed8;
}

.fw-chip-muted {
  background: #f3f4f6;
  color: #6b7280;
}

.fw-insight-grid-tight {
  gap: 12px;
}

.fw-profile-flow {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
  margin-top: 16px;
}

.fw-profile-story-band {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
  margin-top: 16px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.fw-profile-story-band-editorial {
  gap: 14px;
}

.fw-profile-story-main {
  font-size: 14px;
  line-height: 1.8;
  color: #374151;
  padding: 2px 2px 6px;
}

.fw-profile-story-copy {
  color: #312e81;
  font-size: 13.5px;
  line-height: 1.65;
}

.fw-profile-story-side {
  display: grid;
  gap: 12px;
}

.fw-story-side-card {
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(255,255,255,0.92);
  border: 1px solid rgba(226, 232, 240, 0.95);
}

.fw-mini-timeline {
  display: grid;
  gap: 8px;
}

.fw-mini-timeline-item {
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(255,255,255,0.9);
  border: 1px solid rgba(226, 232, 240, 0.92);
}

.fw-mini-timeline-company {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #6d28d9;
}

.fw-mini-timeline-title {
  margin-top: 6px;
  font-size: 13px;
  font-weight: 700;
  color: #111827;
}

.fw-mini-timeline-period {
  margin-top: 5px;
  font-size: 12px;
  color: #64748b;
}

.fw-inline-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  font-size: 12px;
  color: #6b7280;
}

.fw-inline-pulse {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #6c63ff;
  box-shadow: 0 0 0 rgba(108, 99, 255, 0.35);
  animation: fwPulse 1.2s ease-in-out infinite;
}

.fw-loading-card {
  border-style: dashed;
  background: linear-gradient(180deg, rgba(255,255,255,0.88) 0%, rgba(248,250,252,0.96) 100%);
}

.fw-tight-list-muted {
  color: #64748b;
}

.fw-proof-card {
  background: linear-gradient(180deg, rgba(255,255,255,0.95) 0%, rgba(248,250,252,0.98) 100%);
}

.fw-resume-feedback-card {
  border-color: #dbe4ff;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
}

.fw-resume-feedback-grid-single {
  grid-template-columns: minmax(0, 1fr);
}

.fw-feedback-column-priority {
  border-color: #c7d2fe;
  background: linear-gradient(180deg, rgba(255,255,255,0.98) 0%, rgba(238,242,255,0.88) 100%);
}

.fw-feedback-column-secondary {
  background: linear-gradient(180deg, rgba(255,255,255,0.98) 0%, rgba(248,250,252,0.98) 100%);
}

.fw-profile-score {
  position: absolute;
  top: 0;
  right: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.fw-score-ring {
  --score: 0;
  width: 92px;
  height: 92px;
  border-radius: 50%;
  background: conic-gradient(#22c55e calc(var(--score) * 1%), #1f2937 0);
  display: grid;
  place-items: center;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.04);
}

.fw-score-ring::before {
  content: '';
  width: 76px;
  height: 76px;
  border-radius: 50%;
  background: #111827;
  border: 1px solid rgba(255,255,255,0.08);
  grid-area: 1 / 1;
}

.fw-score-value {
  grid-area: 1 / 1;
  position: relative;
  z-index: 1;
  font-size: 18px;
  font-weight: 800;
  color: #34d399;
}

.fw-score-label {
  font-size: 12px;
  color: #6b7280;
}

.fw-section-label {
  margin-bottom: 10px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #9ca3af;
}

.fw-strategy-row {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 16px;
  font-size: 13px;
  color: #374151;
}

.fw-timeline {
  margin-top: 24px;
}

.fw-timeline-track {
  display: flex;
  gap: 0;
  overflow-x: auto;
  padding: 8px 2px 10px;
  scrollbar-width: thin;
}

.fw-timeline-item {
  position: relative;
  min-width: 190px;
  flex: 1 0 190px;
  padding-top: 26px;
  padding-right: 18px;
}

.fw-timeline-line {
  position: absolute;
  top: 12px;
  left: 24px;
  right: -6px;
  height: 3px;
  background: linear-gradient(90deg, #6C63FF 0%, #34d399 100%);
  border-radius: 999px;
  opacity: 0.9;
}

.fw-timeline-dot {
  position: absolute;
  top: 4px;
  left: 14px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: linear-gradient(135deg, #6C63FF, #34d399);
  border: 4px solid #f9fafb;
  box-shadow: 0 10px 24px rgba(108, 99, 255, 0.18);
}

.fw-timeline-card {
  background: linear-gradient(180deg, #ffffff 0%, #fcfcff 100%);
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  padding: 14px 14px 13px;
  min-height: 96px;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.05);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.fw-timeline-card:hover {
  transform: translateY(-2px);
  border-color: rgba(108, 99, 255, 0.28);
  box-shadow: 0 14px 30px rgba(108, 99, 255, 0.10);
}

.fw-timeline-company {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #6C63FF;
}

.fw-timeline-title {
  margin-top: 8px;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.35;
  color: #111827;
}

.fw-timeline-period {
  margin-top: 10px;
  font-size: 11.5px;
  color: #9ca3af;
}

.fw-timeline-item:last-child .fw-timeline-card::after {
  content: 'Now';
  position: absolute;
  top: -12px;
  right: 12px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #059669;
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  border-radius: 999px;
  padding: 3px 8px;
}

@media (max-width: 768px) {
  .fw-profile-header {
    padding-right: 0;
    padding-top: 116px;
  }

  .fw-profile-header-tight {
    padding-top: 0;
    flex-direction: column;
    align-items: flex-start;
  }

  .fw-profile-score {
    left: 50%;
    right: auto;
    transform: translateX(-50%);
  }

  .fw-profile-name {
    font-size: 28px;
  }

  .fw-profile-story-band,
  .fw-profile-flow {
    grid-template-columns: minmax(0, 1fr);
  }

  .fw-timeline-item {
    min-width: 166px;
    flex-basis: 166px;
    padding-right: 14px;
  }

  .fw-timeline-card {
    min-height: 90px;
  }

  .setup-jobs-handoff-header,
  .setup-background-details summary,
  .setup-profile-support-summary {
    flex-direction: column;
    align-items: flex-start;
  }

  .setup-jobs-handoff-actions {
    width: 100%;
  }

  .setup-jobs-handoff-actions .btn {
    flex: 1 1 100%;
    justify-content: center;
  }
}

@keyframes fwPulse {
  0%, 100% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(108, 99, 255, 0.30);
  }
  50% {
    transform: scale(1.12);
    box-shadow: 0 0 0 8px rgba(108, 99, 255, 0);
  }
}

/* ── Rich role cards (scored jobs) ───────────────────── */
.fw-role-card {
  background: white;
  border: 1px solid #e8eaf0;
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 10px;
  animation: fadeSlideIn 0.4s ease-out;
  transition: border-color 0.2s;
}
.fw-role-card:hover {
  border-color: #6C63FF;
}
.fw-role-header {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}
.fw-role-header-text { flex: 1; min-width: 0; }
.fw-role-score {
  font-weight: 800;
  font-size: 18px;
  min-width: 40px;
  text-align: center;
  line-height: 1.1;
  border-radius: 8px;
  padding: 4px 6px;
}
.fw-role-score.high { color: #059669; background: #ecfdf5; }
.fw-role-score.mid  { color: #d97706; background: #fffbeb; }
.fw-role-score.low  { color: #9ca3af; background: #f9fafb; }
.fw-role-rec {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 3px 8px;
  border-radius: 6px;
  white-space: nowrap;
  align-self: flex-start;
}
.fw-rec-now   { background: #ecfdf5; color: #059669; }
.fw-rec-apply { background: #eff6ff; color: #2563eb; }
.fw-rec-skip  { background: #f9fafb; color: #9ca3af; }
.fw-role-company { font-weight: 700; font-size: 14px; color: #111827; }
.fw-role-title { font-size: 13px; color: #6b7280; margin-top: 1px; }
.fw-role-meta {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 8px;
  font-size: 12.5px;
  color: #6b7280;
}
.fw-role-why {
  margin-top: 10px;
  font-size: 12.5px;
  color: #374151;
}
.fw-role-why-label {
  font-weight: 600;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  color: #6b7280;
  margin-bottom: 3px;
}
.fw-role-why ul {
  margin: 0;
  padding-left: 16px;
}
.fw-role-why li {
  padding: 1px 0;
}
.fw-role-gap {
  margin-top: 6px;
}
.fw-gap-tag {
  font-size: 11.5px;
  background: #fef3c7;
  color: #92400e;
  padding: 2px 8px;
  border-radius: 4px;
}
.fw-role-next {
  margin-top: 6px;
  font-size: 12.5px;
  color: #374151;
}
.fw-role-analysis {
  margin-top: 6px;
  font-size: 12px;
  color: #9ca3af;
  font-style: italic;
}
.fw-no-results {
  text-align: center;
  color: #9ca3af;
  font-size: 13px;
  padding: 12px;
}

/* ── Tailored application cards ──────────────────────── */
.fw-tailored-card {
  padding: 12px 0;
  border-bottom: 1px solid #f3f4f6;
  animation: fadeSlideIn 0.4s ease-out;
}
.fw-tailored-card:last-child { border-bottom: none; }
.fw-tailored-header {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13.5px;
}
.fw-tailored-status-row {
  margin-top: 8px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.fw-tailored-check {
  color: #22c55e;
  font-weight: 700;
}
.fw-tailored-preview {
  margin-top: 6px;
  font-size: 12px;
  color: #6b7280;
  line-height: 1.5;
  max-height: 60px;
  overflow: hidden;
}

.fw-final-message {
  text-align: center;
  margin-top: 24px;
  padding: 24px;
  background: linear-gradient(135deg, #f3f0ff 0%, #ede9fe 100%);
  border-radius: 16px;
  animation: fadeSlideIn 0.5s ease-out;
}
.fw-final-message h3 {
  font-size: 20px;
  font-weight: 700;
  color: #111827;
  margin-bottom: 8px;
}
.fw-final-message p {
  font-size: 14px;
  color: #6b7280;
  max-width: 480px;
  margin: 0 auto;
}

.fw-pitch-sheet {
  background: linear-gradient(135deg, #faf9ff 0%, #f8fafc 100%);
  border: 1px solid #e9d5ff;
}
.fw-mini-score {
  background: #111827;
  color: white;
  font-size: 12px;
  font-weight: 700;
  padding: 8px 12px;
  border-radius: 999px;
}
.fw-insight-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
  margin-top: 16px;
}
.fw-tight-list {
  margin: 8px 0 0;
  padding-left: 18px;
  color: #334155;
  font-size: 13px;
  line-height: 1.5;
}
.fw-compact-timeline {
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid #e5e7eb;
}
.fw-compact-role {
  display: grid;
  grid-template-columns: minmax(150px, 1.2fr) minmax(130px, 1fr) auto;
  gap: 12px;
  padding: 6px 0;
  font-size: 12.5px;
  color: #475569;
}
.fw-compact-role-title {
  font-weight: 700;
  color: #111827;
}
.fw-compact-role-company {
  color: #4f46e5;
  font-weight: 600;
}
.fw-compact-role-period {
  color: #64748b;
  text-align: right;
}
.fw-tailored-actions {
  margin-top: 10px;
}

.fw-next-actions-shell {
  display: grid;
  gap: 14px;
}

.fw-next-actions-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
}

.fw-next-actions-card {
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px solid #e5e7eb;
  background: rgba(255,255,255,0.9);
}

.fw-next-actions-value {
  font-size: 28px;
  line-height: 1;
  font-weight: 800;
  color: #111827;
  margin-bottom: 8px;
}

.fw-recruiter-angle {
  margin-top: 14px;
  padding: 12px 14px;
  background: rgba(255,255,255,0.8);
  border: 1px solid #ddd6fe;
  border-radius: 12px;
  color: #312e81;
  line-height: 1.55;
  font-size: 13px;
}

.fw-recruiter-angle-hero {
  padding: 16px 18px;
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.08) 0%, rgba(59, 130, 246, 0.08) 100%);
  border-color: #c4b5fd;
  font-size: 13.5px;
}

.fw-score-row {
  display: grid;
  grid-template-columns: 28px 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 10px 12px;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  background: #fff;
  margin-bottom: 8px;
}
.fw-score-rank {
  font-weight: 800;
  color: #64748b;
  font-size: 13px;
}
.fw-score-main {
  min-width: 0;
}
.fw-score-title {
  font-size: 13px;
  font-weight: 700;
  color: #111827;
}
.fw-score-meta {
  font-size: 12px;
  color: #64748b;
  margin-top: 2px;
}
.fw-score-badge {
  font-size: 24px;
  font-weight: 900;
  line-height: 1;
}
.fw-score-badge.high { color: #16a34a; }
.fw-score-badge.mid { color: #ca8a04; }
.fw-score-badge.low { color: #dc2626; }
.fw-scoring-shell {
  display: grid;
  gap: 14px;
}
.fw-progress-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid #e5e7eb;
  border-radius: 18px;
  background: rgba(255,255,255,0.94);
  box-shadow: 0 8px 24px rgba(15,23,42,0.08);
}
.fw-progress-circle {
  --progress: 0%;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: conic-gradient(#6C63FF var(--progress), #e5e7eb 0);
  display: grid;
  place-items: center;
  flex: 0 0 auto;
}
.fw-progress-circle-inner {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #fff;
  border: 1px solid #e5e7eb;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}
.fw-progress-circle-value {
  font-size: 10px;
  font-weight: 800;
  color: #111827;
  line-height: 1;
}
.fw-progress-circle-sub {
  display: none;
}
.fw-progress-copy {
  min-width: 0;
  display: grid;
  gap: 4px;
}
.fw-progress-kicker {
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #64748b;
}
.fw-progress-meta {
  font-size: 13px;
  color: #475569;
  line-height: 1.35;
}
.fw-progress-summary {
  display: block;
}
.fw-progress-summary-text {
  margin-top: 0;
}
.fw-expand-wrap {
  margin-top: 10px;
  display: flex;
  justify-content: center;
}

.fw-score-chart-card {
  background: rgba(248, 250, 252, 0.9);
  border: 1px solid #e5e7eb;
  border-radius: 18px;
  padding: 18px;
}
.fw-score-chart-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}
.fw-score-chart-title {
  font-size: 18px;
  font-weight: 800;
  color: #111827;
}
.fw-score-chart-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}
.fw-score-chart-stat {
  min-width: 74px;
  padding: 10px 12px;
  border-radius: 14px;
  background: #fff;
  border: 1px solid #e5e7eb;
  text-align: center;
}
.fw-score-chart-stat.subtle {
  background: rgba(255,255,255,0.72);
}
.fw-score-chart-stat strong {
  display: block;
  font-size: 20px;
  line-height: 1;
  color: #111827;
}
.fw-score-chart-stat span {
  display: block;
  margin-top: 4px;
  font-size: 11px;
  font-weight: 700;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.fw-score-curve-wrap {
  border-radius: 18px;
  background: linear-gradient(180deg, #f8fafc 0%, #ffffff 100%);
  border: 1px solid #e5e7eb;
  padding: 14px 14px 12px;
}
.fw-score-curve {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
}
.fw-score-guide {
  stroke: rgba(148, 163, 184, 0.28);
  stroke-width: 1;
}
.fw-score-guide-vertical {
  stroke-dasharray: 3 6;
}
.fw-score-axis-label {
  fill: #64748b;
  font-size: 12px;
  font-weight: 700;
}
.fw-score-axis-title {
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.fw-score-area {
  fill: rgba(108, 99, 255, 0.14);
}
.fw-score-line {
  fill: none;
  stroke: #6C63FF;
  stroke-width: 4;
  stroke-linejoin: round;
  stroke-linecap: round;
}
.fw-score-hotspot-dot {
  fill: #6C63FF;
  stroke: #fff;
  stroke-width: 2;
  pointer-events: none;
}
.fw-score-hover-band {
  fill: transparent;
  cursor: help;
}
.fw-score-curve-caption {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px;
  margin-top: 10px;
  flex-wrap: wrap;
}
.fw-score-curve-kicker {
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #64748b;
}
.fw-score-curve-body {
  font-size: 13px;
  color: #334155;
}
.fw-score-chart-note {
  margin-top: 14px;
}

@media (max-width: 640px) {
  .fw-progress-card {
    margin-bottom: 0;
    align-items: flex-start;
  }

  .fw-score-chart-header {
    flex-direction: column;
  }

  .fw-score-chart-stats {
    justify-content: flex-start;
  }

  .fw-score-chart-stat {
    min-width: calc(50% - 6px);
  }

  .fw-score-curve-wrap {
    padding: 12px 10px 10px;
  }

  .fw-score-curve-caption {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* ── Billing Tier Cards ────────────────────────────────── */
.billing-tiers {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}
.tier-card {
  background: white;
  border: 2px solid #e8eaf0;
  border-radius: 14px;
  padding: 24px 20px;
  text-align: center;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.tier-card:hover {
  border-color: #6C63FF;
  box-shadow: 0 4px 16px rgba(108, 99, 255, 0.12);
}
.tier-card.featured {
  border-color: #6C63FF;
  background: linear-gradient(135deg, #faf9ff 0%, #f3f0ff 100%);
  position: relative;
}
.tier-badge {
  position: absolute;
  top: -10px;
  left: 50%;
  transform: translateX(-50%);
  background: #6C63FF;
  color: white;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 12px;
  border-radius: 10px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.tier-name {
  font-size: 18px;
  font-weight: 700;
  color: #111827;
  margin-bottom: 4px;
}
.tier-price {
  font-size: 32px;
  font-weight: 800;
  color: #6C63FF;
  margin-bottom: 2px;
}
.tier-price span {
  font-size: 14px;
  font-weight: 400;
  color: #9ca3af;
}
.tier-desc {
  font-size: 12.5px;
  color: #6b7280;
  margin-bottom: 16px;
}
.tier-features {
  list-style: none;
  padding: 0;
  margin: 0 0 12px;
  text-align: left;
  font-size: 13px;
  color: #374151;
}
.tier-features li {
  padding: 4px 0;
}
.tier-features li::before {
  content: '✓ ';
  color: #22c55e;
  font-weight: 700;
}
.tier-features.tier-limits {
  margin: 14px 0;
  padding: 10px 12px;
  background: rgba(108, 99, 255, 0.05);
  border-radius: 10px;
  border: 1px solid rgba(108, 99, 255, 0.12);
}
.tier-features.tier-limits li::before { content: ''; }
.tier-features.tier-limits li {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 3px 0;
  font-size: 12.5px;
  color: #475569;
}
.tier-features.tier-limits li strong {
  font-size: 14px;
  font-weight: 700;
  color: #6C63FF;
  margin-right: auto;
  min-width: 28px;
}
body.theme-dark .tier-features.tier-limits {
  background: rgba(108, 99, 255, 0.1);
  border-color: rgba(108, 99, 255, 0.2);
}
body.theme-dark .tier-features.tier-limits li { color: var(--ink-muted); }

/* ── Entitlements banner (Billing tab "Your plan" block) ────────────── */
.ent-banner {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 18px 22px;
  margin: 0 0 20px;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(108, 99, 255, 0.05), rgba(168, 162, 255, 0.03));
  border: 1px solid rgba(108, 99, 255, 0.18);
}
.ent-banner-good { border-color: rgba(16, 185, 129, 0.3); background: linear-gradient(135deg, rgba(16, 185, 129, 0.06), rgba(16, 185, 129, 0.02)); }
.ent-banner-warn { border-color: rgba(245, 158, 11, 0.35); background: linear-gradient(135deg, rgba(245, 158, 11, 0.07), rgba(245, 158, 11, 0.02)); }
.ent-banner-low  { border-color: rgba(100, 116, 139, 0.25); background: var(--bg-surface-muted, rgba(15, 23, 42, 0.03)); }
.ent-banner-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
}
.ent-banner-label {
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-muted, #64748b);
  margin-bottom: 4px;
}
.ent-banner-title {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 600;
  color: var(--ink-strong, #0f172a);
  letter-spacing: -0.01em;
}
.ent-status {
  font-size: 11px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.ent-status-good { background: rgba(16, 185, 129, 0.12); color: #047857; }
.ent-status-warn { background: rgba(245, 158, 11, 0.14); color: #b45309; }
.ent-status-low  { background: rgba(100, 116, 139, 0.12); color: #475569; }
body.theme-dark .ent-status-good { color: #6ee7b7; }
body.theme-dark .ent-status-warn { color: #fcd34d; }
body.theme-dark .ent-status-low  { color: #cbd5e1; }
.ent-banner-features {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  font-size: 13px;
  color: var(--ink-muted);
}
.ent-feature {
  display: inline-flex;
  align-items: baseline;
  gap: 4px;
}
.ent-feature strong {
  font-size: 15px;
  font-weight: 700;
  color: var(--ink-strong);
}
.ent-banner-actions {
  display: flex;
  gap: 10px;
}
.ent-banner-note {
  font-size: 11.5px;
  color: var(--ink-muted);
  padding-top: 8px;
  border-top: 1px solid rgba(100, 116, 139, 0.15);
  font-style: italic;
}
body.theme-dark .ent-banner {
  background: rgba(108, 99, 255, 0.1);
}
body.theme-dark .ent-banner-good {
  background: rgba(16, 185, 129, 0.1);
}
body.theme-dark .ent-banner-warn {
  background: rgba(245, 158, 11, 0.08);
}
.tier-card.current,
.tier-card-current {
  border-color: #22c55e;
  background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
  position: relative;
}
.tier-card.current .tier-cta,
.tier-card-current .tier-cta {
  background: #22c55e;
  color: white;
  cursor: default;
  border-color: #22c55e;
}
.tier-card.current .tier-cta[disabled],
.tier-card-current .tier-cta[disabled] {
  opacity: 1;
}
body.theme-dark .tier-card-current {
  background: rgba(34, 197, 94, 0.08);
  border-color: rgba(34, 197, 94, 0.5);
}
.tier-current-badge {
  position: absolute;
  top: -10px;
  right: 16px;
  background: #22c55e;
  color: white;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 10px;
  border-radius: 10px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.tier-card {
  position: relative;
}
.tier-cta {
  margin-top: 16px;
  width: 100%;
}

/* ── Setup stage sections ───────────────────────────── */
.setup-stage {
  padding: 0 24px;
}

.setup-jobs-handoff-panel {
  border-color: #ddd6fe;
  background: linear-gradient(180deg, #ffffff 0%, #faf9ff 100%);
}

.setup-jobs-handoff-body {
  display: grid;
  gap: 18px;
}

.setup-jobs-handoff-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.setup-jobs-handoff-title {
  font-size: 24px;
  margin-bottom: 6px;
}

.setup-jobs-handoff-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.setup-background-details {
  border: 1px solid #e5e7eb;
  border-radius: 18px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  overflow: hidden;
}

.setup-background-details summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  font-size: 13px;
  font-weight: 700;
  color: #1e2532;
}

.setup-background-details summary::-webkit-details-marker {
  display: none;
}

.setup-background-details-meta {
  font-size: 12px;
  font-weight: 500;
  color: #64748b;
}

.setup-background-details-body {
  padding: 0 16px 16px;
}

.first-wave-shell-compact {
  max-width: none;
  margin: 0;
}

.first-wave-shell-compact .first-wave-steps {
  gap: 8px;
}

.first-wave-shell-compact .fw-step {
  padding-inline: 0;
}

.chat-suggestions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0 20px 12px;
  border-top: 1px solid #eef2ff;
  background: linear-gradient(180deg, rgba(248,250,252,0.9) 0%, rgba(255,255,255,1) 100%);
}
.chat-suggestion-chip {
  appearance: none;
  border: 1px solid #dbe4ff;
  background: #f8faff;
  color: #334155;
  border-radius: 999px;
  padding: 8px 12px;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}
.chat-suggestion-chip:hover {
  border-color: #8b5cf6;
  background: #f3e8ff;
  color: #6d28d9;
}
.chat-suggestion-chip.selected {
  background: #ede9fe;
  border-color: #7c3aed;
  color: #5b21b6;
}
.chat-selection-summary {
  padding: 0 20px 12px;
  font-size: 12.5px;
  color: #5b21b6;
}
.chat-system-note {
  margin: 12px 20px 0;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid #ddd6fe;
  background: #f5f3ff;
  color: #5b21b6;
  font-size: 13px;
  line-height: 1.5;
  display: flex;
  align-items: center;
  gap: 10px;
}
.chat-system-note .spinner {
  flex-shrink: 0;
}
.chat-error-banner {
  margin: 12px 20px 0;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid #fecaca;
  background: #fef2f2;
  color: #991b1b;
  font-size: 13px;
  line-height: 1.5;
}

/* Persistent apply-progress strip shown during "Prepare Package" operations */
#apply-progress-strip {
  position: sticky;
  top: 0;
  z-index: 50;
  background: linear-gradient(90deg, #312e81 0%, #4338ca 100%);
  color: #eef2ff;
  padding: 10px 20px;
  border-bottom: 1px solid #4338ca;
  font-size: 13px;
  box-shadow: 0 2px 8px rgba(49,46,129,0.25);
}
.apply-strip-inner {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}
.apply-strip-title {
  font-weight: 600;
  font-size: 13px;
}
.apply-strip-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.apply-strip-list li {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(255,255,255,0.08);
  padding: 3px 10px;
  border-radius: 12px;
  font-size: 12px;
}
.apply-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #fcd34d;
  animation: apply-pulse 1.2s ease-in-out infinite;
}
.apply-label { font-weight: 500; }
.apply-elapsed { opacity: 0.75; font-size: 11px; }
@keyframes apply-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(1.15); }
}

/* ─── Applications table view (Item 2) ─────────────────────────────────── */
.applications-filter-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin: 0 0 16px 0;
}
.applications-filter-bar .filter-select,
.applications-filter-bar .filter-search {
  height: 34px;
  padding: 0 10px;
  border: 1px solid var(--border-color, #e5e7eb);
  border-radius: 6px;
  background: var(--surface, #fff);
  color: var(--text-primary, #111827);
  font-size: 13px;
}
.applications-filter-bar .filter-search { min-width: 240px; }
.applications-filter-bar .filter-check {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--text-secondary, #475569);
  user-select: none;
}
.applications-filter-bar .filter-spacer { flex: 1; }
.view-toggle {
  display: inline-flex;
  border: 1px solid var(--border-color, #e5e7eb);
  border-radius: 6px;
  overflow: hidden;
}
.view-toggle-btn {
  background: transparent;
  border: 0;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-secondary, #475569);
  cursor: pointer;
  border-right: 1px solid var(--border-color, #e5e7eb);
}
.view-toggle-btn:last-child { border-right: 0; }
.view-toggle-btn.active {
  background: var(--accent, #4338ca);
  color: #fff;
}
.applications-table-wrap {
  background: var(--surface, #fff);
  border: 1px solid var(--border-color, #e5e7eb);
  border-radius: 8px;
  overflow: hidden;
}
.applications-table { width: 100%; border-collapse: collapse; }
.applications-table th {
  text-align: left;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-secondary, #6b7280);
  padding: 10px 12px;
  background: var(--table-header-bg, #f9fafb);
  border-bottom: 1px solid var(--border-color, #e5e7eb);
}
.applications-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border-subtle, #f1f5f9);
  font-size: 13px;
  color: var(--text-primary, #111827);
  vertical-align: middle;
}
.applications-table tbody tr { cursor: pointer; transition: background 0.12s; }
.applications-table tbody tr:hover { background: var(--row-hover, #f8fafc); }
.applications-row-overdue { background: rgba(239, 68, 68, 0.06); }
.applications-row-overdue:hover { background: rgba(239, 68, 68, 0.10) !important; }
.applications-cell-company { font-weight: 600; }
.applications-cell-title { color: var(--text-secondary, #475569); max-width: 320px; }
.applications-cell-applied,
.applications-cell-followup { white-space: nowrap; font-size: 12.5px; color: var(--text-secondary, #475569); }
.followup-overdue { color: #dc2626; font-weight: 600; }
.followup-today { color: #d97706; font-weight: 600; }
.followup-soon { color: #b45309; }
.score-badge {
  display: inline-block;
  min-width: 34px;
  text-align: center;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 600;
}
.score-badge.score-high { background: #dcfce7; color: #166534; }
.score-badge.score-mid { background: #fef3c7; color: #92400e; }
.score-badge.score-low { background: #fee2e2; color: #991b1b; }
.score-badge.score-none { background: #f1f5f9; color: #64748b; }
.stage-select {
  height: 28px;
  padding: 0 6px;
  border: 1px solid var(--border-color, #e5e7eb);
  border-radius: 4px;
  font-size: 12px;
  background: var(--surface, #fff);
  color: var(--text-primary, #111827);
  cursor: pointer;
  max-width: 150px;
}
.pkg-chip {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  margin-right: 4px;
  padding: 2px 8px;
  border-radius: 10px;
  background: #eef2ff;
  color: #3730a3;
  font-size: 11px;
  font-weight: 500;
  text-decoration: none;
}
.pkg-chip:hover { background: #e0e7ff; }
.pkg-chip-ready { background: #f1f5f9; color: #475569; }
.applications-empty {
  padding: 40px 24px;
  text-align: center;
  color: var(--text-secondary, #64748b);
  background: var(--surface, #fff);
  border: 1px dashed var(--border-color, #e5e7eb);
  border-radius: 8px;
}

/* ─── Apply progress (live streaming) ──────────────────────────────────── */
.apply-progress-overlay {
  position: fixed; inset: 0;
  background: rgba(15, 23, 42, 0.45);
  z-index: 115;
  opacity: 0;
  transition: opacity 180ms var(--ease);
  backdrop-filter: blur(3px);
}
.apply-progress-overlay.is-open { opacity: 1; }
.apply-progress-modal {
  position: fixed; z-index: 116;
  top: 50%; left: 50%;
  transform: translate(-50%, calc(-50% + 12px));
  width: min(560px, 94vw);
  max-height: 92vh;
  overflow-y: auto;
  background: var(--bg-surface);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  opacity: 0;
  transition: opacity 180ms var(--ease), transform 220ms var(--ease);
  padding: var(--space-6);
}
.apply-progress-modal.is-open {
  opacity: 1;
  transform: translate(-50%, -50%);
}
.apply-progress-head {
  margin-bottom: var(--space-5);
  padding-bottom: var(--space-4);
  border-bottom: 1px solid var(--line-soft);
}
.apply-progress-eyebrow {
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--brand);
  margin-bottom: 6px;
}
.apply-progress-title {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 600;
  color: var(--ink-strong);
  line-height: 1.25;
  letter-spacing: -0.01em;
}
.apply-progress-company {
  font-size: 13px;
  color: var(--ink-muted);
  margin-top: 3px;
}
.apply-progress-steps {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}
.apply-step {
  display: grid;
  grid-template-columns: 24px 1fr;
  column-gap: var(--space-3);
  row-gap: 4px;
  align-items: start;
  padding: var(--space-3);
  border-radius: var(--radius-md);
  border: 1px solid var(--line-soft);
  background: var(--bg-surface);
  transition: background var(--t-med) var(--ease),
              border-color var(--t-med) var(--ease);
}
.apply-step-bullet {
  width: 22px; height: 22px;
  border-radius: 50%;
  border: 2px solid var(--line);
  background: var(--bg-surface);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 2px;
  flex-shrink: 0;
  position: relative;
}
.apply-step-spinner {
  width: 10px; height: 10px;
  border-radius: 50%;
  border: 2px solid rgba(108, 99, 255, 0.15);
  display: none;
}
.apply-step-label {
  font-size: 13.5px;
  font-weight: 550;
  color: var(--ink);
  grid-column: 2;
}
.apply-step-preview {
  grid-column: 2;
  font-size: 12.5px;
  color: var(--ink-muted);
  line-height: 1.5;
  margin-top: 2px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  opacity: 0;
  max-height: 0;
  transition: opacity var(--t-med) var(--ease), max-height var(--t-med) var(--ease), margin-top var(--t-med) var(--ease);
}
.apply-step.is-running {
  background: var(--bg-surface-muted);
  border-color: var(--brand);
}
.apply-step.is-running .apply-step-bullet {
  border-color: var(--brand);
}
.apply-step.is-running .apply-step-spinner {
  display: block;
  border-top-color: var(--brand);
  animation: spin 0.85s linear infinite;
}
.apply-step.is-done {
  background: #f0fdf4;
  border-color: #a7f3d0;
}
body.theme-dark .apply-step.is-done {
  background: rgba(16, 185, 129, 0.08);
  border-color: rgba(16, 185, 129, 0.35);
}
.apply-step.is-done .apply-step-bullet {
  background: var(--good);
  border-color: var(--good);
}
.apply-step.is-done .apply-step-bullet::after {
  content: '';
  width: 10px; height: 6px;
  border-left: 2px solid #fff;
  border-bottom: 2px solid #fff;
  transform: rotate(-45deg) translate(1px, -1px);
}
.apply-step.is-done .apply-step-spinner { display: none; }
.apply-step.is-done .apply-step-preview {
  opacity: 1;
  max-height: 60px;
}
.apply-step.is-warn {
  background: #fffbeb;
  border-color: #fde68a;
}
body.theme-dark .apply-step.is-warn {
  background: rgba(245, 158, 11, 0.08);
  border-color: rgba(245, 158, 11, 0.35);
}
.apply-step.is-warn .apply-step-bullet {
  background: var(--warn);
  border-color: var(--warn);
  color: #fff;
}
.apply-step.is-warn .apply-step-bullet::after {
  content: '!';
  color: #fff;
  font-weight: 700;
  font-size: 11px;
}
.apply-step.is-warn .apply-step-spinner { display: none; }
.apply-step.is-warn .apply-step-preview {
  opacity: 1;
  max-height: 60px;
  color: var(--warn);
}
.apply-step.is-error .apply-step-bullet {
  background: var(--bad);
  border-color: var(--bad);
}
.apply-step.is-error .apply-step-preview {
  opacity: 1;
  max-height: 60px;
  color: var(--bad);
}
/* ── Live cover-letter typewriter stream (P3) ────────────────────────── */
.apply-cover-stream {
  grid-column: 2;
  margin-top: var(--space-2);
  padding: 10px 14px;
  background: var(--bg-surface-muted);
  border: 1px solid var(--line-soft);
  border-left: 3px solid #f59e0b;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-size: 12.5px;
  line-height: 1.55;
  color: var(--ink);
  font-style: italic;
  max-height: 110px;
  overflow: hidden;
  position: relative;
  animation: apply-swap-in 220ms var(--ease) both;
}
.apply-cover-stream[hidden] { display: none; }
.apply-cover-text {
  white-space: pre-wrap;
  word-break: break-word;
}
.apply-cover-caret {
  display: inline-block;
  margin-left: 1px;
  color: var(--brand);
  font-weight: 700;
  font-style: normal;
  animation: apply-cover-caret-blink 1s steps(2, jump-none) infinite;
}
@keyframes apply-cover-caret-blink {
  to { opacity: 0; }
}
body.theme-dark .apply-cover-stream {
  background: rgba(255, 255, 255, 0.03);
  border-color: rgba(255, 255, 255, 0.06);
  border-left-color: #f59e0b;
}
@media (prefers-reduced-motion: reduce) {
  .apply-cover-caret { animation: none; }
  .apply-cover-stream { animation: none; }
}

/* ── Live cost counter in apply progress footer (P3) ────────────────── */
.apply-progress-cost {
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  color: var(--brand);
  background: var(--brand-50);
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 11.5px;
  letter-spacing: 0.02em;
}
body.theme-dark .apply-progress-cost {
  background: rgba(108, 99, 255, 0.18);
  color: #c7d2fe;
}
.apply-progress-cost[hidden] { display: none; }

/* ── Live bullet-swap stream inside the tailoring step (P2) ──────────── */
.apply-step-bullet-stream {
  grid-column: 2;
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  margin-top: 0;
}
.apply-step-bullet-stream:empty { display: none; }
.apply-step-bullet-stream:not(:empty) {
  margin-top: var(--space-2);
}
.apply-swap-item {
  display: grid;
  grid-template-columns: 78px 1fr;
  gap: var(--space-2);
  align-items: start;
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--ink);
  padding: 8px 12px;
  background: var(--bg-surface);
  border: 1px solid var(--line-soft);
  border-left: 3px solid var(--brand);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  animation: apply-swap-in 280ms var(--ease) both;
}
.apply-swap-item.apply-swap-summary {
  border-left-color: #f59e0b;
}
.apply-swap-tag {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--brand);
  padding-top: 1px;
}
.apply-swap-summary .apply-swap-tag { color: #b45309; }
.apply-swap-text {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
body.theme-dark .apply-swap-item {
  background: rgba(255, 255, 255, 0.03);
  border-color: rgba(255, 255, 255, 0.06);
  border-left-color: var(--brand);
}
@keyframes apply-swap-in {
  from { opacity: 0; transform: translateY(4px); }
  to   { opacity: 1; transform: translateY(0); }
}
@media (prefers-reduced-motion: reduce) {
  .apply-swap-item { animation: none; }
}

.apply-progress-foot {
  margin-top: var(--space-5);
  padding-top: var(--space-4);
  border-top: 1px solid var(--line-soft);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-3);
  font-size: 12px;
  color: var(--ink-muted);
  flex-wrap: wrap;
}
.apply-progress-timer {
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  color: var(--ink);
}
.apply-progress-hint { color: var(--ink-quiet); }
body.theme-dark .apply-progress-modal { background: var(--bg-surface); }
body.theme-dark .apply-step { background: var(--bg-surface-muted); }
body.theme-dark .apply-step.is-running { background: rgba(108, 99, 255, 0.08); }

/* ─── Package ready celebration ────────────────────────────────────────── */
.pkg-ready-overlay {
  position: fixed; inset: 0;
  background: rgba(15, 23, 42, 0.55);
  z-index: 120;
  opacity: 0;
  transition: opacity 200ms var(--ease);
  backdrop-filter: blur(4px);
}
.pkg-ready-overlay.is-open { opacity: 1; }
.pkg-ready-modal {
  position: fixed; z-index: 121;
  top: 50%; left: 50%;
  transform: translate(-50%, calc(-50% + 12px)) scale(0.96);
  width: min(640px, 94vw); max-height: 92vh;
  overflow-y: auto;
  background: var(--bg-surface);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  display: flex; flex-direction: column;
  opacity: 0;
  transition: opacity 200ms var(--ease), transform 240ms cubic-bezier(0.2, 1.4, 0.3, 1);
}
.pkg-ready-modal.is-open {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}
.pkg-ready-close {
  position: absolute;
  top: var(--space-4);
  right: var(--space-4);
  width: 32px; height: 32px;
  border: none;
  background: rgba(255, 255, 255, 0.7);
  border-radius: 50%;
  color: var(--ink-muted);
  font-size: 14px;
  cursor: pointer;
  z-index: 2;
  transition: background var(--t-fast) var(--ease), color var(--t-fast) var(--ease);
}
.pkg-ready-close:hover { background: var(--bg-surface); color: var(--ink-strong); }

.pkg-ready-hero {
  position: relative;
  padding: var(--space-8) var(--space-6) var(--space-5);
  text-align: center;
  background: var(--bg-hero);
  border-top-left-radius: var(--radius-xl);
  border-top-right-radius: var(--radius-xl);
  overflow: hidden;
}
.pkg-ready-check {
  width: 64px;
  height: 64px;
  margin: 0 auto var(--space-3);
  border-radius: 50%;
  background: var(--brand-gradient);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow-brand-lg);
  animation: pkg-check-pop 420ms cubic-bezier(0.2, 1.4, 0.3, 1);
}
@keyframes pkg-check-pop {
  from { transform: scale(0.6); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}
.pkg-ready-eyebrow {
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--good);
  margin-bottom: 6px;
}
.pkg-ready-title {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 600;
  color: var(--ink-strong);
  line-height: 1.2;
  letter-spacing: -0.015em;
}
.pkg-ready-company {
  font-size: 13px;
  color: var(--ink-muted);
  margin-top: 4px;
}

/* Confetti dots — absolutely positioned inside the hero, animated fall. */
.pkg-ready-confetti {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}
.pkg-ready-confetti-dot {
  position: absolute;
  top: -10px;
  width: 7px;
  height: 12px;
  border-radius: 2px;
  animation: pkg-confetti-fall 1600ms ease-in-out forwards;
  opacity: 0.85;
}
.pkg-ready-confetti-dot:nth-child(3n+1) { background: var(--brand); }
.pkg-ready-confetti-dot:nth-child(3n+2) { background: #fbbf24; }
.pkg-ready-confetti-dot:nth-child(3n)   { background: #34d399; }
.pkg-ready-confetti-dot-0  { left: 4%;  animation-delay: 40ms;  transform: rotate(12deg); }
.pkg-ready-confetti-dot-1  { left: 11%; animation-delay: 120ms; transform: rotate(-8deg); }
.pkg-ready-confetti-dot-2  { left: 18%; animation-delay: 60ms;  transform: rotate(24deg); }
.pkg-ready-confetti-dot-3  { left: 26%; animation-delay: 180ms; transform: rotate(-16deg); }
.pkg-ready-confetti-dot-4  { left: 33%; animation-delay: 90ms;  transform: rotate(4deg); }
.pkg-ready-confetti-dot-5  { left: 40%; animation-delay: 150ms; transform: rotate(-20deg); }
.pkg-ready-confetti-dot-6  { left: 48%; animation-delay: 30ms;  transform: rotate(14deg); }
.pkg-ready-confetti-dot-7  { left: 55%; animation-delay: 210ms; transform: rotate(-6deg); }
.pkg-ready-confetti-dot-8  { left: 62%; animation-delay: 70ms;  transform: rotate(22deg); }
.pkg-ready-confetti-dot-9  { left: 69%; animation-delay: 160ms; transform: rotate(-14deg); }
.pkg-ready-confetti-dot-10 { left: 76%; animation-delay: 100ms; transform: rotate(18deg); }
.pkg-ready-confetti-dot-11 { left: 83%; animation-delay: 200ms; transform: rotate(-22deg); }
.pkg-ready-confetti-dot-12 { left: 90%; animation-delay: 50ms;  transform: rotate(10deg); }
.pkg-ready-confetti-dot-13 { left: 8%;  animation-delay: 240ms; transform: rotate(-18deg); }
.pkg-ready-confetti-dot-14 { left: 22%; animation-delay: 300ms; transform: rotate(6deg); }
.pkg-ready-confetti-dot-15 { left: 58%; animation-delay: 260ms; transform: rotate(-12deg); }
.pkg-ready-confetti-dot-16 { left: 74%; animation-delay: 330ms; transform: rotate(20deg); }
.pkg-ready-confetti-dot-17 { left: 95%; animation-delay: 170ms; transform: rotate(-4deg); }
@keyframes pkg-confetti-fall {
  0%   { transform: translateY(-10px) rotate(0deg); opacity: 0; }
  10%  { opacity: 0.9; }
  100% { transform: translateY(280px) rotate(180deg); opacity: 0; }
}

.pkg-ready-body {
  padding: var(--space-5) var(--space-6);
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
}
.pkg-ready-section-title {
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin-bottom: var(--space-2);
}
.pkg-ready-bullets {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}
.pkg-ready-bullets li {
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--ink);
  padding: var(--space-3) var(--space-4);
  background: var(--bg-surface-muted);
  border-left: 3px solid var(--brand);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}
.pkg-ready-cover {
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--ink);
  padding: var(--space-3) var(--space-4);
  background: var(--bg-surface-muted);
  border-left: 3px solid #f59e0b;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-style: italic;
}
.pkg-ready-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-4) var(--space-6);
  border-top: 1px solid var(--line-soft);
  flex-wrap: wrap;
  gap: var(--space-3);
}
.pkg-ready-downloads {
  display: flex;
  gap: var(--space-2);
  flex-wrap: wrap;
}
.pkg-ready-actions { display: flex; gap: var(--space-2); }
body.theme-dark .pkg-ready-modal { background: var(--bg-surface); }
body.theme-dark .pkg-ready-hero { background: rgba(108, 99, 255, 0.08); }
body.theme-dark .pkg-ready-close {
  background: rgba(255, 255, 255, 0.06);
  color: var(--ink-muted);
}
body.theme-dark .pkg-ready-close:hover { background: rgba(255, 255, 255, 0.1); }
body.theme-dark .pkg-ready-bullets li { background: rgba(255, 255, 255, 0.03); }
body.theme-dark .pkg-ready-cover { background: rgba(255, 255, 255, 0.03); }
@media (prefers-reduced-motion: reduce) {
  .pkg-ready-confetti { display: none; }
  .pkg-ready-check { animation: none; }
}

/* ─── Clarifying-questions modal v2 (upgraded Wave 2) ──────────────────── */
.clarify-overlay {
  position: fixed; inset: 0;
  background: rgba(15, 23, 42, 0.55);
  z-index: 110;
  opacity: 0;
  transition: opacity 180ms var(--ease);
  backdrop-filter: blur(4px);
}
.clarify-overlay.is-open { opacity: 1; }
.clarify-modal {
  position: fixed; z-index: 111;
  top: 50%; left: 50%;
  transform: translate(-50%, calc(-50% + 16px));
  width: min(760px, 94vw); max-height: 92vh;
  overflow-y: auto;
  background: var(--bg-surface);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  display: flex; flex-direction: column;
  opacity: 0;
  transition: opacity 180ms var(--ease), transform 220ms var(--ease);
}
.clarify-modal.is-open {
  opacity: 1;
  transform: translate(-50%, -50%);
}
.clarify-modal-v2 { padding: 0; }

.clarify-hero {
  position: relative;
  padding: var(--space-6) var(--space-6) var(--space-5);
  background: var(--bg-hero);
  border-top-left-radius: var(--radius-xl);
  border-top-right-radius: var(--radius-xl);
}
.clarify-hero-body { padding-right: var(--space-8); }
.clarify-eyebrow {
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--brand);
  margin-bottom: 6px;
}
.clarify-title {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 600;
  color: var(--ink-strong);
  line-height: 1.2;
  letter-spacing: -0.015em;
}
.clarify-company {
  font-size: 13px;
  color: var(--ink-muted);
  margin-top: 4px;
}
.clarify-intro {
  font-size: 13.5px;
  color: var(--ink);
  line-height: 1.55;
  margin-top: var(--space-3);
}
.clarify-close {
  position: absolute;
  top: var(--space-4);
  right: var(--space-4);
  width: 32px; height: 32px;
  border: none;
  background: rgba(255, 255, 255, 0.6);
  border-radius: 50%;
  color: var(--ink-muted);
  font-size: 14px;
  cursor: pointer;
  transition: background var(--t-fast) var(--ease), color var(--t-fast) var(--ease);
}
.clarify-close:hover {
  background: var(--bg-surface);
  color: var(--ink-strong);
}

.clarify-progress {
  padding: var(--space-4) var(--space-6);
  border-bottom: 1px solid var(--line-soft);
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}
.clarify-progress-text {
  font-size: 12px;
  color: var(--ink-muted);
  font-variant-numeric: tabular-nums;
}
.clarify-progress-done { font-weight: 600; color: var(--ink-strong); }
.clarify-progress-track {
  height: 6px;
  background: var(--line);
  border-radius: 999px;
  overflow: hidden;
}
.clarify-progress-fill {
  height: 100%;
  background: var(--brand-gradient);
  border-radius: 999px;
  transition: width 280ms var(--ease);
}

.clarify-body { padding: var(--space-5) var(--space-6); }
.clarify-coverage {
  font-size: 12.5px;
  color: var(--ink-muted);
  background: var(--bg-surface-muted);
  border-left: 3px solid var(--brand);
  padding: var(--space-3) var(--space-4);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  margin-bottom: var(--space-4);
  line-height: 1.55;
}
.clarify-qs { display: flex; flex-direction: column; gap: var(--space-3); }
.clarify-q {
  background: var(--bg-surface-muted);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: var(--space-4);
  transition: border-color var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease);
}
.clarify-q:focus-within {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--brand-ring);
}
.clarify-q.is-answered {
  border-color: #a7f3d0;
  background: #f0fdf4;
}
body.theme-dark .clarify-q.is-answered {
  border-color: rgba(16, 185, 129, 0.4);
  background: rgba(16, 185, 129, 0.08);
}
.clarify-q-head {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin-bottom: var(--space-2);
}
.clarify-q-step {
  font-size: 10.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-quiet);
}
.clarify-q-theme {
  display: inline-block;
  font-size: 10.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--brand);
  background: var(--brand-50);
  padding: 2px 8px;
  border-radius: 999px;
}
body.theme-dark .clarify-q-theme { background: rgba(108, 99, 255, 0.18); }
.clarify-q-question {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 600;
  color: var(--ink-strong);
  line-height: 1.35;
  letter-spacing: -0.005em;
  margin-bottom: 6px;
}
.clarify-q-why {
  font-size: 12.5px;
  color: var(--ink-muted);
  margin-bottom: var(--space-3);
  line-height: 1.5;
}
.clarify-q-why-label {
  font-weight: 600;
  color: var(--ink);
  margin-right: 4px;
}
.clarify-q-answer {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 13.5px;
  line-height: 1.55;
  resize: vertical;
  min-height: 56px;
  background: var(--bg-surface);
  color: var(--ink);
  transition: border-color var(--t-fast) var(--ease),
              box-shadow var(--t-fast) var(--ease);
}
.clarify-q-answer::placeholder { color: var(--ink-quiet); }
.clarify-q-answer:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--brand-ring);
}
.clarify-q-meta {
  display: flex;
  justify-content: flex-end;
  margin-top: var(--space-1);
}
.clarify-q-count {
  font-size: 10.5px;
  color: var(--ink-quiet);
  font-variant-numeric: tabular-nums;
}

.clarify-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-4) var(--space-6);
  border-top: 1px solid var(--line-soft);
  background: var(--bg-surface);
  position: sticky;
  bottom: 0;
  z-index: 1;
  border-bottom-left-radius: var(--radius-xl);
  border-bottom-right-radius: var(--radius-xl);
}

body.theme-dark .clarify-modal { background: var(--bg-surface); }
body.theme-dark .clarify-hero { background: rgba(108, 99, 255, 0.08); }
body.theme-dark .clarify-close {
  background: rgba(255, 255, 255, 0.06);
  color: var(--ink-muted);
}
body.theme-dark .clarify-close:hover { background: rgba(255, 255, 255, 0.1); }
.clarify-footer {
  display: flex; justify-content: space-between; gap: 10px;
  padding: 14px 24px 20px;
  border-top: 1px solid var(--border-color, #e5e7eb);
}
.clarify-footer .btn { white-space: nowrap; }

/* ─── Setup tab: Notifications config drawer ──────────────────────────── */
.setup-notifications-card {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--bg-surface);
  box-shadow: var(--shadow-xs);
  padding: 0;
  overflow: hidden;
}
.setup-notifications-summary {
  list-style: none;
  cursor: pointer;
  padding: 14px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  font-size: 14px;
  font-weight: 600;
  color: var(--ink-strong);
}
.setup-notifications-summary::-webkit-details-marker { display: none; }
.setup-notifications-summary::after {
  content: '▸';
  color: var(--ink-quiet);
  font-size: 12px;
  transition: transform var(--t-fast) var(--ease);
  margin-left: auto;
}
.setup-notifications-card[open] > .setup-notifications-summary::after {
  transform: rotate(90deg);
}
.setup-notifications-meta {
  font-size: 12px;
  font-weight: 500;
  color: var(--ink-muted);
}
.setup-notifications-body {
  padding: 4px 18px 18px;
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}
.notif-status-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.notif-pill {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border: 1px solid transparent;
}
.notif-pill-good { background: rgba(22, 163, 74, 0.12); color: #166534; border-color: rgba(22, 163, 74, 0.3); }
.notif-pill-warn { background: rgba(245, 158, 11, 0.14); color: #b45309; border-color: rgba(245, 158, 11, 0.3); }
.notif-pill-muted { background: var(--bg-surface-muted); color: var(--ink-muted); border-color: var(--line); }
body.theme-dark .notif-pill-good { color: #86efac; }
body.theme-dark .notif-pill-warn { color: #fbbf24; }
.notif-copy {
  font-size: 13px;
  line-height: 1.55;
  color: var(--ink-muted);
}
.notif-copy code {
  font-family: ui-monospace, Menlo, monospace;
  font-size: 12px;
  background: var(--bg-surface-muted);
  padding: 1px 6px;
  border-radius: 4px;
  color: var(--ink);
}
.notif-env-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2px;
  margin: 0;
  padding: 0;
  background: var(--bg-surface-muted);
  border-radius: var(--radius-md);
  overflow: hidden;
}
.notif-env-row {
  display: grid;
  grid-template-columns: minmax(200px, auto) 1fr;
  gap: var(--space-3);
  padding: 8px 12px;
  font-size: 12.5px;
  background: var(--bg-surface);
}
.notif-env-row dt {
  font-family: ui-monospace, Menlo, monospace;
  color: var(--ink-muted);
  font-size: 12px;
}
.notif-env-val { font-family: ui-monospace, Menlo, monospace; color: var(--ink-strong); font-size: 12px; }
.notif-env-good  { color: var(--good); }
.notif-env-warn  { color: var(--warn); }
.notif-env-muted { color: var(--ink-muted); }
body.theme-dark .notif-env-grid { background: rgba(255,255,255,0.03); }
body.theme-dark .notif-env-row { background: var(--bg-surface); }
.notif-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.notif-result {
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  background: var(--bg-surface-muted);
  border: 1px solid var(--line-soft);
  font-size: 12.5px;
  line-height: 1.55;
}
.notif-result[hidden] { display: none; }

.notif-user-prefs {
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--bg-surface);
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.notif-user-prefs-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--brand);
}
.notif-user-prefs-id {
  font-family: ui-monospace, Menlo, monospace;
  font-size: 11px;
  font-weight: 500;
  color: var(--ink-quiet);
  text-transform: none;
  letter-spacing: 0;
}
.notif-user-toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13.5px;
  color: var(--ink);
  cursor: pointer;
  user-select: none;
}
.notif-user-toggle input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--brand);
  cursor: pointer;
}
.notif-user-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.notif-user-field label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-muted);
}
.notif-user-field-row {
  display: flex;
  align-items: center;
  gap: 10px;
}
.notif-user-field-row input[type="range"] {
  flex: 1;
  accent-color: var(--brand);
}
.notif-user-field-row input[type="number"] {
  width: 80px;
  padding: 6px 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--bg-surface);
  color: var(--ink);
  font-size: 13px;
  font-family: inherit;
}
.notif-user-field-row input[type="number"]:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--brand-ring);
}
.notif-user-field-value {
  font-family: ui-monospace, Menlo, monospace;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-strong);
  min-width: 60px;
  text-align: right;
}
.notif-user-field-hint {
  font-size: 11.5px;
  color: var(--ink-quiet);
}
.notif-save-result {
  font-size: 12px;
  color: var(--good);
  padding: 6px 0 0;
}
.notif-save-result[hidden] { display: none; }
body.theme-dark .notif-user-prefs { background: rgba(255,255,255,0.03); border-color: rgba(255,255,255,0.06); }

.notif-env-details {
  margin-top: 4px;
}
.notif-env-details > summary {
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-muted);
  padding: 4px 0;
  list-style: none;
}
.notif-env-details > summary::-webkit-details-marker { display: none; }
.notif-env-details > summary::after {
  content: ' ▸';
  color: var(--ink-quiet);
  transition: transform var(--t-fast) var(--ease);
}
.notif-env-details[open] > summary::after { content: ' ▾'; }

.your-data-danger {
  color: var(--bad) !important;
  border-color: transparent !important;
}
.your-data-danger:hover {
  color: #fff !important;
  background: var(--bad) !important;
  border-color: var(--bad) !important;
}
body.theme-dark .your-data-danger { color: #fca5a5 !important; }
body.theme-dark .your-data-danger:hover { color: #fff !important; background: var(--bad) !important; }

/* ─── Streaming reliability (Billing card) ──────────────────────────────── */
.streaming-stats-shell {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}
.streaming-stats-head {
  display: flex;
  justify-content: space-between;
  gap: var(--space-4);
  align-items: flex-start;
  flex-wrap: wrap;
}
.streaming-stats-eyebrow {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin-bottom: 6px;
}
.streaming-stats-headline {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.streaming-band-good { color: var(--good); }
.streaming-band-mid  { color: var(--warn); }
.streaming-band-bad  { color: var(--bad); }
.streaming-stats-sub {
  font-size: 13px;
  color: var(--ink-muted);
  margin-top: 6px;
  max-width: 420px;
}
.streaming-stats-totals {
  font-size: 12.5px;
  color: var(--ink-muted);
  display: flex;
  flex-direction: column;
  gap: 4px;
  text-align: right;
}
.streaming-stats-totals strong {
  color: var(--ink-strong);
  font-variant-numeric: tabular-nums;
}
.streaming-activity-block {
  padding-top: var(--space-3);
  border-top: 1px solid var(--line-soft);
}
.streaming-activity-list {
  list-style: none;
  padding: 0;
  margin: 8px 0 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.streaming-activity-row {
  display: flex;
  justify-content: space-between;
  gap: var(--space-3);
  font-size: 13px;
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  background: var(--bg-surface-muted);
}
.streaming-activity-name {
  font-weight: 600;
  color: var(--ink-strong);
  font-family: var(--font-sans);
}
.streaming-activity-meta {
  color: var(--ink-muted);
  font-variant-numeric: tabular-nums;
}
.streaming-activity-rate.is-good { color: var(--good); font-weight: 600; }
.streaming-activity-rate.is-mid  { color: var(--warn); font-weight: 600; }
.streaming-activity-rate.is-bad  { color: var(--bad); font-weight: 600; }
body.theme-dark .streaming-activity-row { background: rgba(255,255,255,0.03); }

/* ─── Outreach polish (P4) ────────────────────────────────────────────── */
.outreach-hero-wrap { margin-bottom: var(--space-5); }
.outreach-hero-card {
  position: relative;
  border-radius: var(--radius-xl);
  padding: 22px 26px 18px;
  background: var(--bg-hero);
  border: 1px solid rgba(108, 99, 255, 0.18);
  box-shadow: var(--shadow-md);
  overflow: hidden;
}
.outreach-hero-card::before {
  content: "";
  position: absolute;
  inset: -2px;
  border-radius: inherit;
  padding: 2px;
  background: var(--brand-gradient);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
          mask-composite: exclude;
  opacity: 0.18;
  pointer-events: none;
}
.outreach-hero-head { margin-bottom: 14px; }
.outreach-hero-eyebrow {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--brand);
  margin-bottom: 6px;
}
.outreach-hero-title {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 600;
  color: var(--ink-strong);
  letter-spacing: -0.015em;
  line-height: 1.2;
}
.outreach-hero-rows {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.outreach-hero-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 10px 14px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid rgba(108, 99, 255, 0.12);
}
.outreach-hero-row-main { min-width: 0; flex: 1; }
.outreach-hero-row-name {
  font-weight: 600;
  font-size: 14px;
  color: var(--ink-strong);
  margin-bottom: 2px;
}
.outreach-hero-row-meta {
  font-size: 12.5px;
  color: var(--ink-muted);
}
.outreach-hero-row-state.is-overdue { color: var(--bad); font-weight: 600; }
.outreach-hero-row-state.is-today { color: var(--warn); font-weight: 600; }
body.theme-dark .outreach-hero-card {
  background: rgba(108, 99, 255, 0.08);
  border-color: rgba(108, 99, 255, 0.25);
}
body.theme-dark .outreach-hero-row {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.06);
}

/* Type + state pills */
.outreach-type-pill,
.outreach-state-pill {
  display: inline-flex;
  align-items: center;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 3px 10px;
  border-radius: 999px;
  border: 1px solid transparent;
}
.outreach-type-warm_path { background: rgba(34, 197, 94, 0.12); color: #166534; border-color: rgba(34, 197, 94, 0.28); }
.outreach-type-recruiter { background: rgba(108, 99, 255, 0.12); color: #4338ca; border-color: rgba(108, 99, 255, 0.28); }
.outreach-type-cold      { background: rgba(148, 163, 184, 0.18); color: #475569; border-color: rgba(148, 163, 184, 0.32); }
body.theme-dark .outreach-type-warm_path { color: #86efac; }
body.theme-dark .outreach-type-recruiter { color: #c7d2fe; }
body.theme-dark .outreach-type-cold      { color: #cbd5e1; }

.outreach-state-draft     { background: var(--bg-surface-muted); color: var(--ink-muted); border-color: var(--line); }
.outreach-state-sent      { background: rgba(108, 99, 255, 0.10); color: #4338ca; border-color: rgba(108, 99, 255, 0.28); }
.outreach-state-connected { background: rgba(245, 158, 11, 0.12); color: #b45309; border-color: rgba(245, 158, 11, 0.30); }
.outreach-state-replied   { background: rgba(34, 197, 94, 0.12); color: #166534; border-color: rgba(34, 197, 94, 0.30); }
.outreach-state-cold      { background: rgba(220, 38, 38, 0.10); color: #991b1b; border-color: rgba(220, 38, 38, 0.28); }
body.theme-dark .outreach-state-draft     { background: rgba(255,255,255,0.04); color: var(--ink-muted); }
body.theme-dark .outreach-state-sent      { color: #c7d2fe; }
body.theme-dark .outreach-state-connected { color: #fbbf24; }
body.theme-dark .outreach-state-replied   { color: #86efac; }
body.theme-dark .outreach-state-cold      { color: #fca5a5; }

/* Follow-up due badges */
.outreach-due-badge {
  display: inline-flex;
  align-items: center;
  font-size: 12px;
  color: var(--ink-muted);
  padding: 2px 0;
}
.outreach-due-badge.is-overdue { color: var(--bad); font-weight: 600; }
.outreach-due-badge.is-today   { color: var(--warn); font-weight: 600; }
.outreach-due-badge.is-soon    { color: var(--ink); font-weight: 500; }

.outreach-row-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.outreach-status-select {
  padding: 4px 6px;
  font-size: 12px;
}

.outreach-suggestion {
  margin-top: 8px;
}
.outreach-suggestion[hidden] { display: none; }
.outreach-suggestion-card {
  margin-top: 10px;
  padding: 14px 16px;
  border-radius: var(--radius-md);
  background: var(--bg-surface);
  border: 1px solid var(--line);
  border-left: 3px solid var(--brand);
  box-shadow: var(--shadow-xs);
  animation: apply-swap-in 220ms var(--ease) both;
}
.outreach-suggestion-eyebrow {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--brand);
  margin-bottom: 6px;
}
.outreach-suggestion-text {
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--ink-strong);
  white-space: pre-wrap;
}
.outreach-suggestion-why {
  margin-top: 6px;
  font-size: 12px;
  color: var(--ink-muted);
  font-style: italic;
}
.outreach-suggestion-actions {
  margin-top: 10px;
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.outreach-suggestion-error {
  margin-top: 8px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  background: var(--bad-soft);
  color: var(--bad);
  font-size: 12.5px;
}
body.theme-dark .outreach-suggestion-card { background: rgba(255,255,255,0.03); border-color: rgba(255,255,255,0.06); border-left-color: var(--brand); }

/* ─── First-run welcome overlay (P3 onboarding) ───────────────────────── */
.welcome-overlay {
  position: fixed;
  inset: 0;
  z-index: 190;
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.82), rgba(15, 23, 42, 0.94));
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-6);
  animation: login-overlay-in 260ms var(--ease) both;
  overflow-y: auto;
}
.welcome-card {
  width: min(560px, 100%);
  background: var(--bg-surface);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  animation: login-card-in 360ms cubic-bezier(0.2, 1.4, 0.3, 1) both;
}
.welcome-hero {
  padding: 28px 28px 20px;
  text-align: center;
  background: var(--bg-hero);
}
.welcome-brand {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 15px;
  color: var(--brand);
  letter-spacing: -0.01em;
  margin-bottom: 8px;
}
.welcome-title {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 600;
  color: var(--ink-strong);
  letter-spacing: -0.02em;
  line-height: 1.2;
  margin: 0 0 10px;
}
.welcome-sub {
  font-size: 13.5px;
  color: var(--ink-muted);
  line-height: 1.6;
  margin: 0;
  max-width: 440px;
  margin-left: auto;
  margin-right: auto;
}
.welcome-body {
  padding: 20px 28px 8px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.welcome-step {
  display: grid;
  grid-template-columns: 34px 1fr;
  gap: 14px;
  align-items: flex-start;
}
.welcome-step-num {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--brand-50);
  color: var(--brand);
  font-size: 13px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 2px;
}
.welcome-step-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--ink-strong);
}
.welcome-step-sub {
  font-size: 12.5px;
  color: var(--ink-muted);
  line-height: 1.55;
  margin-top: 2px;
}
.welcome-trust {
  margin: 14px 28px 0;
  padding: 12px 14px;
  background: var(--bg-surface-muted);
  border-radius: var(--radius-md);
  border-left: 3px solid var(--brand);
}
.welcome-trust-title {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--brand);
  margin-bottom: 6px;
}
.welcome-trust-copy {
  font-size: 12.5px;
  color: var(--ink);
  line-height: 1.55;
}
.welcome-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 20px 28px 24px;
  border-top: 1px solid var(--line-soft);
  margin-top: 16px;
}
.welcome-start {
  flex: 1;
  padding: 12px 18px;
  font-size: 14px;
}
.welcome-legal {
  padding: 0 28px 20px;
  font-size: 11.5px;
  color: var(--ink-quiet);
  text-align: center;
  line-height: 1.55;
}
.welcome-legal a { color: var(--brand); text-decoration: none; }
.welcome-legal a:hover { text-decoration: underline; }

.login-legal {
  margin-top: 10px;
  font-size: 11px;
  color: var(--ink-quiet);
  text-align: center;
  line-height: 1.5;
}
.login-legal a { color: var(--brand); text-decoration: none; }
.login-legal a:hover { text-decoration: underline; }
body.theme-dark .welcome-card { background: var(--bg-surface); }
body.theme-dark .welcome-hero { background: rgba(108, 99, 255, 0.08); }
body.theme-dark .welcome-trust { background: rgba(255,255,255,0.03); }

/* ─── Login overlay (multi-tenant auth UI) ─────────────────────────────── */
.login-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.78), rgba(15, 23, 42, 0.92));
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-6);
  animation: login-overlay-in 220ms var(--ease) both;
}
@keyframes login-overlay-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}
.login-card {
  width: min(440px, 100%);
  background: var(--bg-surface);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  animation: login-card-in 320ms cubic-bezier(0.2, 1.4, 0.3, 1) both;
}
@keyframes login-card-in {
  from { opacity: 0; transform: translateY(12px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
.login-hero {
  padding: var(--space-8) var(--space-6) var(--space-5);
  text-align: center;
  background: var(--bg-hero);
}
.login-eyebrow {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--brand);
  margin-bottom: 10px;
}
.login-title {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 600;
  color: var(--ink-strong);
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin: 0 0 8px;
}
.login-sub {
  font-size: 13.5px;
  color: var(--ink-muted);
  line-height: 1.55;
  margin: 0;
}
.login-form {
  padding: var(--space-6) var(--space-6) var(--space-5);
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.login-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-muted);
}
.login-input {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--bg-surface);
  color: var(--ink);
  font-size: 14px;
  font-family: inherit;
  transition: border-color var(--t-fast) var(--ease),
              box-shadow var(--t-fast) var(--ease);
}
.login-input:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--brand-ring);
}
.login-submit {
  width: 100%;
  margin-top: 6px;
  padding: 12px 18px;
  font-size: 14px;
}
.login-hint {
  font-size: 12px;
  color: var(--ink-quiet);
  text-align: center;
  margin-top: 2px;
}
.login-error {
  margin-top: 8px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  background: var(--bad-soft);
  color: var(--bad);
  font-size: 12.5px;
  border: 1px solid rgba(220, 38, 38, 0.2);
}
.login-success {
  padding: var(--space-6);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}
.login-check {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--brand-gradient);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  font-weight: 700;
  box-shadow: var(--shadow-brand);
  margin-bottom: 4px;
}
.login-success-title {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 600;
  color: var(--ink-strong);
  letter-spacing: -0.01em;
}
.login-success-copy {
  font-size: 13px;
  line-height: 1.55;
  color: var(--ink-muted);
  max-width: 320px;
}
body.theme-dark .login-card { background: var(--bg-surface); }
body.theme-dark .login-hero { background: rgba(108, 99, 255, 0.08); }
@media (prefers-reduced-motion: reduce) {
  .login-overlay, .login-card { animation: none; }
}

/* ─── Interview prep streaming modal ───────────────────────────────────── */
.iprep-modal {
  max-width: 640px;
}
.iprep-questions {
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  background: var(--bg-quiet, rgba(0,0,0,0.02));
  max-height: 260px;
  overflow-y: auto;
}
.iprep-questions-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-quiet);
  margin-bottom: 6px;
}
.iprep-question-list {
  list-style: none;
  margin: 0;
  padding: 0;
  counter-reset: iprep-q;
}
.iprep-question {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px 10px;
  padding: 6px 0;
  border-bottom: 1px solid rgba(0,0,0,0.05);
  font-size: 13px;
  line-height: 1.35;
  animation: iprep-q-in 0.22s ease;
}
.iprep-question:last-child { border-bottom: 0; }
@keyframes iprep-q-in {
  from { opacity: 0; transform: translateY(3px); }
  to { opacity: 1; transform: translateY(0); }
}
.iprep-q-num {
  font-weight: 700;
  color: var(--brand-accent, #C41E3A);
  min-width: 26px;
}
.iprep-q-cat {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 2px 6px;
  border-radius: 999px;
  background: rgba(196, 30, 58, 0.08);
  color: var(--brand-accent, #C41E3A);
  white-space: nowrap;
}
.iprep-q-cat-technical { background: rgba(59, 130, 246, 0.1); color: #2563eb; }
.iprep-q-cat-leadership_culture { background: rgba(34, 197, 94, 0.1); color: #16a34a; }
.iprep-q-cat-curveball { background: rgba(245, 158, 11, 0.12); color: #b45309; }
.iprep-q-text {
  flex: 1 1 280px;
  color: var(--ink, #111);
}
.iprep-q-story {
  font-size: 11px;
  color: var(--ink-muted);
  font-style: italic;
  flex-basis: 100%;
  padding-left: 32px;
}
.iprep-downloads {
  margin-top: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 12px;
  background: linear-gradient(135deg, rgba(196, 30, 58, 0.06), rgba(196, 30, 58, 0.02));
  border-radius: var(--radius-sm);
  border: 1px solid rgba(196, 30, 58, 0.15);
}
.iprep-download-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: var(--radius-sm, 8px);
  background: #fff;
  color: var(--ink, #111);
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  border: 1px solid rgba(0,0,0,0.1);
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}
.iprep-download-link:hover {
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}
.iprep-download-link-primary {
  background: var(--brand-accent, #C41E3A);
  color: #fff;
  border-color: transparent;
}
.iprep-download-link-primary:hover {
  background: #a01930;
}
.iprep-close {
  margin-top: 12px;
  width: 100%;
  padding: 10px;
  border-radius: var(--radius-sm, 8px);
  background: transparent;
  color: var(--ink-muted);
  border: 1px solid rgba(0,0,0,0.1);
  font-size: 13px;
  cursor: pointer;
  font-family: inherit;
}
.iprep-close:hover {
  background: rgba(0,0,0,0.03);
  color: var(--ink, #111);
}
.iprep-error {
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-sm, 8px);
  background: rgba(220, 38, 38, 0.06);
  color: #b91c1c;
  font-size: 12.5px;
  border: 1px solid rgba(220, 38, 38, 0.15);
}
body.theme-dark .iprep-questions { background: rgba(255,255,255,0.03); }
body.theme-dark .iprep-question { border-color: rgba(255,255,255,0.06); }
body.theme-dark .iprep-downloads { background: rgba(196, 30, 58, 0.12); }
body.theme-dark .iprep-download-link { background: rgba(255,255,255,0.06); color: #eee; border-color: rgba(255,255,255,0.1); }

/* Per-step ETA labels in the apply/iprep steppers. */
.apply-step-eta {
  font-size: 10.5px;
  font-weight: 500;
  color: var(--ink-quiet, #94a3b8);
  letter-spacing: 0.02em;
  margin-left: 6px;
  white-space: nowrap;
}

/* ─── Modal minimize (—) affordance ─────────────────────────────────────── */
.modal-minimize-btn {
  position: absolute;
  top: 12px;
  right: 14px;
  width: 28px;
  height: 28px;
  padding: 0;
  border-radius: 8px;
  background: transparent;
  border: 1px solid transparent;
  color: var(--ink-muted);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  font-family: inherit;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 140ms ease, border-color 140ms ease, color 140ms ease;
}
.modal-minimize-btn:hover {
  background: rgba(15, 23, 42, 0.04);
  border-color: var(--line-soft);
  color: var(--ink, #111);
}
body.theme-dark .modal-minimize-btn:hover {
  background: rgba(255, 255, 255, 0.05);
}
.apply-progress-head {
  position: relative;
  padding-right: 40px;
}

/* ─── Sticky-tab stack (minimized streams) ─────────────────────────────── */
.sticky-tab-stack {
  position: fixed;
  right: 20px;
  bottom: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 114;
  pointer-events: none;
}
.sticky-tab {
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px 10px 14px;
  min-width: 260px;
  max-width: 340px;
  background: var(--bg-surface, #fff);
  border: 1px solid var(--line-soft, rgba(15, 23, 42, 0.1));
  border-radius: 14px;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.12), 0 2px 6px rgba(15, 23, 42, 0.06);
  cursor: pointer;
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
  animation: sticky-tab-in 220ms ease;
}
.sticky-tab:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 32px rgba(15, 23, 42, 0.16), 0 4px 10px rgba(15, 23, 42, 0.08);
  border-color: var(--brand, #6c63ff);
}
@keyframes sticky-tab-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
.sticky-tab-spinner {
  flex-shrink: 0;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid rgba(108, 99, 255, 0.18);
  border-top-color: var(--brand, #6c63ff);
  animation: spin 0.85s linear infinite;
}
.sticky-tab-body {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  flex: 1;
}
.sticky-tab-head {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-quiet, #64748b);
}
.sticky-tab-icon { font-size: 12px; }
.sticky-tab-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-strong, #0f172a);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sticky-tab-meta {
  font-size: 11px;
  color: var(--ink-muted, #64748b);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sticky-tab-close {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  border-radius: 6px;
  border: none;
  background: transparent;
  color: var(--ink-quiet, #94a3b8);
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
  transition: background 140ms ease, color 140ms ease;
  padding: 0;
}
.sticky-tab-close:hover {
  background: rgba(239, 68, 68, 0.1);
  color: #ef4444;
}
body.theme-dark .sticky-tab {
  background: var(--bg-surface);
  border-color: rgba(255, 255, 255, 0.08);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.4), 0 2px 6px rgba(0, 0, 0, 0.3);
}

/* ─── Package modal cleanup (session 22) ───────────────────────────────── */
.pkg-download-group {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px 6px 12px;
  border-radius: 10px;
  background: var(--bg-surface-muted, rgba(15, 23, 42, 0.03));
  border: 1px solid var(--line-soft, rgba(15, 23, 42, 0.08));
}
.pkg-download-group-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-muted, #64748b);
  margin-right: 2px;
}
.pkg-open-app { margin-left: auto; }
body.theme-dark .pkg-download-group {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.08);
}

.pkg-bullets {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.pkg-bullets li {
  position: relative;
  padding: 8px 10px 8px 26px;
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--ink, #111);
  background: rgba(16, 185, 129, 0.04);
  border-left: 2px solid rgba(16, 185, 129, 0.45);
  border-radius: 6px;
}
.pkg-bullets li::before {
  content: '';
  position: absolute;
  top: 13px; left: 10px;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: rgba(16, 185, 129, 0.7);
}
body.theme-dark .pkg-bullets li { background: rgba(16, 185, 129, 0.08); }

.pkg-side-grid {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.pkg-side-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  font-size: 13px;
}
.pkg-side-key {
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--ink-muted, #64748b);
  text-transform: uppercase;
}
.pkg-side-val { color: var(--ink, #111); }
.pkg-stage-select {
  width: auto;
  padding: 4px 8px;
  font-size: 12.5px;
  height: auto;
  min-height: 0;
}

/* ─── Last-scan indicator (under page subtitle, Dashboard + Jobs) ──────── */
.last-scan-indicator {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 10px;
  padding: 4px 10px 4px 8px;
  font-size: 12px;
  color: var(--ink-muted, #64748b);
  background: var(--bg-surface-muted, rgba(15, 23, 42, 0.03));
  border: 1px solid var(--line-soft, rgba(15, 23, 42, 0.08));
  border-radius: 999px;
}
.last-scan-indicator strong {
  font-weight: 600;
  color: var(--ink, #0f172a);
}
.last-scan-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--good, #10b981);
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.18);
}
body.theme-dark .last-scan-indicator {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.08);
}

/* ── Practice tab (Plan A) ────────────────────────────────────────────── */
.practice-shell { display: grid; gap: 20px; }
.practice-shell .practice-loading { padding: 24px 16px; }

.practice-tiles {
  display: grid; gap: 16px;
  grid-template-columns: repeat(2, 1fr);
}
@media (max-width: 720px) { .practice-tiles { grid-template-columns: 1fr; } }
.practice-tile {
  text-align: left; cursor: pointer;
  display: grid; grid-template-columns: 56px 1fr 24px;
  gap: 18px; align-items: center;
  background: var(--bg-surface, #fff);
  border: 1px solid var(--line, #e5e7eb);
  border-radius: 14px;
  padding: 22px 24px;
  transition: transform 0.18s cubic-bezier(.22,.61,.36,1),
              box-shadow 0.2s, border-color 0.2s;
  font: inherit; color: inherit;
}
.practice-tile:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 28px rgba(15,23,42,0.08);
  border-color: var(--brand, #6C63FF);
}
.practice-tile .tile-ico {
  width: 56px; height: 56px; border-radius: 14px;
  display: grid; place-items: center;
  background: linear-gradient(135deg, rgba(108,99,255,0.16), rgba(255,122,69,0.12));
  font-size: 28px;
}
.practice-tile .tile-title { font-weight: 600; font-size: 17px; color: var(--ink-strong, #0f172a); margin-bottom: 4px; }
.practice-tile .tile-copy { color: var(--ink-muted, #64748b); font-size: 13.5px; line-height: 1.5; }
.practice-tile .tile-arrow { font-size: 20px; color: var(--brand, #6C63FF); font-weight: 600; }

.practice-hint { padding: 10px 4px 0; }
.practice-header { margin-bottom: 12px; }
.practice-header h2 { font-size: 22px; margin-bottom: 4px; }

.practice-empty {
  background: var(--bg-surface, #fff);
  border: 1px solid var(--line, #e5e7eb);
  border-radius: 14px;
  padding: 36px 32px; text-align: center;
  display: grid; gap: 10px; justify-items: center;
}
.practice-empty h3 { font-size: 20px; }

/* STAR drills */
.star-ctrls {
  display: flex; gap: 14px; align-items: center; flex-wrap: wrap;
  padding: 14px 16px;
  background: var(--bg-surface, #fff);
  border: 1px solid var(--line, #e5e7eb);
  border-radius: 12px;
}
.star-time { display: inline-flex; gap: 6px; align-items: center; font-size: 13px; color: var(--ink-muted, #64748b); }
.star-story-list { display: grid; gap: 10px; }
.star-story-card {
  text-align: left; cursor: pointer;
  background: var(--bg-surface, #fff);
  border: 1px solid var(--line, #e5e7eb);
  border-radius: 12px;
  padding: 14px 18px;
  font: inherit; color: inherit;
  transition: border-color 0.15s, transform 0.15s;
}
.star-story-card:hover { border-color: var(--brand, #6C63FF); transform: translateX(2px); }
.star-story-title { font-weight: 600; font-size: 15px; color: var(--ink-strong, #0f172a); margin-bottom: 4px; }
.star-story-tags { font-size: 11.5px; color: var(--accent, #FF7A45); font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 6px; }
.star-story-situation { color: var(--ink-muted, #64748b); }
.star-history h3 { font-size: 14px; margin: 12px 0 6px; color: var(--ink-muted); }
.star-run-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 4px; font-size: 12.5px; color: var(--ink-muted); }

.star-run {
  background: var(--bg-surface, #fff);
  border: 1px solid var(--line, #e5e7eb);
  border-radius: 14px; padding: 20px 24px;
  display: grid; gap: 14px;
}
.star-run-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; }
.star-timer-wrap { text-align: right; }
.star-timer { font-family: 'Fraunces', Georgia, serif; font-size: 28px; font-weight: 700; color: var(--accent, #FF7A45); font-variant-numeric: tabular-nums; }
.star-timer-bar { width: 120px; height: 6px; background: var(--line, #e5e7eb); border-radius: 999px; overflow: hidden; margin-top: 4px; }
.star-timer-fill { height: 100%; background: linear-gradient(90deg, var(--good, #10b981), var(--accent, #FF7A45)); transition: width 0.2s linear; }
.star-prompt summary { cursor: pointer; font-size: 13px; color: var(--ink-muted, #64748b); }
.star-prompt-body { font-size: 13.5px; color: var(--ink-soft, #334155); padding: 8px 0; line-height: 1.55; }
.star-textarea {
  width: 100%; min-height: 220px;
  padding: 14px 16px;
  border: 1px solid var(--line, #e5e7eb);
  border-radius: 12px;
  font: inherit; font-size: 14.5px; line-height: 1.55;
  resize: vertical;
}
.star-foot { display: flex; justify-content: space-between; align-items: center; }
.star-wordcount { font-size: 13px; color: var(--ink-muted, #64748b); }
.star-summary {
  background: var(--bg-surface, #fff);
  border: 1px solid var(--line, #e5e7eb);
  border-radius: 14px; padding: 24px;
  display: grid; gap: 14px;
}
.star-summary-stats { display: flex; gap: 28px; }
.star-summary-stats .stat-n { font-family: 'Fraunces', Georgia, serif; font-size: 26px; font-weight: 700; color: var(--ink-strong, #0f172a); }
.star-summary-stats .stat-label { font-size: 11.5px; color: var(--ink-muted); text-transform: uppercase; letter-spacing: 0.08em; }
.star-summary-ctrls { display: flex; gap: 10px; justify-content: flex-end; }
.star-answer-pre { white-space: pre-wrap; font: inherit; font-size: 13.5px; padding: 12px 14px; background: var(--bg-alt, #f6f7fb); border-radius: 10px; }

/* Flashcards */
.cards-stats { display: flex; gap: 24px; padding: 14px 16px; background: var(--bg-alt, #f6f7fb); border-radius: 12px; }
.cards-stats .stat-n { font-family: 'Fraunces', Georgia, serif; font-size: 22px; font-weight: 700; color: var(--ink-strong, #0f172a); }
.cards-stats .stat-label { font-size: 11px; color: var(--ink-muted); text-transform: uppercase; letter-spacing: 0.08em; }

.card-flip-wrap { perspective: 1200px; display: grid; justify-items: center; }
.card-flip {
  position: relative; width: 100%; max-width: 560px; min-height: 220px;
  transform-style: preserve-3d;
  transition: transform 0.55s cubic-bezier(.22,.61,.36,1);
  cursor: pointer;
}
.card-flip.flipped { transform: rotateY(180deg); }
.card-face {
  position: absolute; inset: 0;
  background: var(--bg-surface, #fff);
  border: 1px solid var(--line, #e5e7eb);
  border-radius: 14px;
  padding: 28px 32px;
  display: grid; align-content: center; gap: 10px;
  backface-visibility: hidden;
  box-shadow: 0 8px 24px rgba(15,23,42,0.06);
}
.card-back { transform: rotateY(180deg); background: linear-gradient(180deg, rgba(108,99,255,0.04), transparent); }
.card-q { font-size: 17px; color: var(--ink-strong, #0f172a); line-height: 1.45; }
.card-a { font-size: 15.5px; color: var(--ink, #0f172a); line-height: 1.6; }
.card-tap { text-align: right; }

.card-rate { display: grid; gap: 10px; }
.card-rate-row { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
.card-rate-btn {
  cursor: pointer;
  padding: 12px 8px; border-radius: 10px;
  display: grid; gap: 4px; justify-items: center;
  border: 1px solid var(--line, #e5e7eb);
  background: var(--bg-surface, #fff);
  transition: transform 0.15s, border-color 0.15s, background 0.15s;
}
.card-rate-btn:hover { transform: translateY(-2px); }
.card-rate-btn .lbl { font-family: 'Fraunces', Georgia, serif; font-weight: 700; font-size: 18px; }
.card-rate-btn .hint { font-size: 11px; color: var(--ink-muted); text-transform: uppercase; letter-spacing: 0.06em; }
.card-rate-btn.rate-bad { border-color: rgba(220,38,38,0.3); } .card-rate-btn.rate-bad:hover { background: rgba(220,38,38,0.06); }
.card-rate-btn.rate-warn { border-color: rgba(217,119,6,0.3); } .card-rate-btn.rate-warn:hover { background: rgba(217,119,6,0.06); }
.card-rate-btn.rate-good { border-color: rgba(16,185,129,0.3); } .card-rate-btn.rate-good:hover { background: rgba(16,185,129,0.08); }

.card-gen-form { display: flex; gap: 10px; align-items: center; width: 100%; max-width: 520px; margin: 0 auto; }

/* Mock interview */
.mock-config { display: grid; gap: 12px; padding: 20px 24px; }
.mock-config .filter-label { display: grid; gap: 4px; font-size: 13px; color: var(--ink-muted, #64748b); }
.mock-chat { display: grid; gap: 16px; }
.mock-meta { }
.mock-turns {
  display: grid; gap: 12px;
  max-height: 55vh; overflow-y: auto;
  padding: 8px 4px;
}
.mock-turn { display: grid; grid-template-columns: 1fr; gap: 4px; }
.mock-turn .who { font-size: 11.5px; color: var(--ink-muted); text-transform: uppercase; letter-spacing: 0.1em; font-weight: 600; }
.mock-turn .bubble {
  padding: 12px 16px; border-radius: 12px;
  font-size: 14.5px; line-height: 1.55;
  max-width: 720px;
}
.mock-q .bubble { background: var(--bg-alt, #f6f7fb); color: var(--ink, #0f172a); }
.mock-a .bubble { background: rgba(108,99,255,0.08); border: 1px solid rgba(108,99,255,0.18); color: var(--ink-strong, #0f172a); justify-self: end; }
.mock-input { display: grid; grid-template-columns: 1fr auto; gap: 10px; align-items: start; }
.mock-input textarea {
  min-height: 100px; resize: vertical;
  padding: 12px 14px;
  border: 1px solid var(--line, #e5e7eb); border-radius: 10px;
  font: inherit; font-size: 14.5px; line-height: 1.55;
}
.mock-foot { text-align: right; }
.mock-summary {
  background: var(--bg-surface, #fff);
  border: 1px solid var(--line, #e5e7eb);
  border-radius: 14px; padding: 24px 28px;
  display: grid; gap: 16px;
}
.mock-summary-stats { display: flex; gap: 28px; }
.mock-summary-stats .stat-n { font-family: 'Fraunces', Georgia, serif; font-size: 26px; font-weight: 700; color: var(--ink-strong, #0f172a); }
.mock-summary-stats .stat-label { font-size: 11.5px; color: var(--ink-muted); text-transform: uppercase; letter-spacing: 0.08em; }
.mock-feedback { padding: 14px 16px; background: var(--bg-alt, #f6f7fb); border-radius: 10px; font-size: 14px; line-height: 1.6; }

/* Company quiz */
.quiz-config { display: grid; gap: 12px; padding: 20px 24px; }
.quiz-q {
  background: var(--bg-surface, #fff);
  border: 1px solid var(--line, #e5e7eb);
  border-radius: 14px; padding: 22px 26px;
  display: grid; gap: 14px;
}
.quiz-q h3 { font-size: 18px; line-height: 1.4; }
.quiz-choices { display: grid; gap: 8px; }
.quiz-choice {
  text-align: left; cursor: pointer;
  padding: 14px 18px;
  border: 1px solid var(--line, #e5e7eb);
  background: var(--bg-surface, #fff);
  border-radius: 10px;
  font: inherit; font-size: 14.5px;
  transition: border-color 0.15s, background 0.15s;
}
.quiz-choice:not(:disabled):hover { border-color: var(--brand, #6C63FF); background: rgba(108,99,255,0.04); }
.quiz-choice.correct { border-color: var(--good, #10b981); background: rgba(16,185,129,0.09); color: var(--ink-strong, #0f172a); font-weight: 600; }
.quiz-choice.wrong { border-color: var(--bad, #dc2626); background: rgba(220,38,38,0.07); color: var(--ink-strong, #0f172a); }
.quiz-explain { padding: 12px 14px; background: var(--bg-alt, #f6f7fb); border-radius: 10px; font-size: 13.5px; color: var(--ink-soft, #334155); line-height: 1.55; }
.quiz-next { text-align: right; }
.quiz-summary {
  background: var(--bg-surface, #fff);
  border: 1px solid var(--line, #e5e7eb);
  border-radius: 14px; padding: 24px 28px;
  display: grid; gap: 16px;
}
.quiz-summary h3 { font-size: 22px; }
.quiz-review { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.quiz-review li { padding: 10px 14px; border-radius: 10px; background: var(--bg-alt, #f6f7fb); font-size: 13.5px; }
.quiz-review li.correct { border-left: 3px solid var(--good, #10b981); }
.quiz-review li.wrong { border-left: 3px solid var(--bad, #dc2626); }
.quiz-review .mi { font-weight: 700; margin-right: 6px; }
.quiz-review .explain { margin-top: 4px; color: var(--ink-muted, #64748b); font-size: 12.5px; }
.quiz-ctrls { display: flex; gap: 10px; justify-content: flex-end; }

@media (prefers-reduced-motion: reduce) {
  .practice-tile:hover, .star-story-card:hover, .card-rate-btn:hover { transform: none; }
  .card-flip { transition: none; }
}

/* ── Admin tab (Plan B) ───────────────────────────────────────────────── */
.admin-grid {
  display: grid; gap: 16px;
  grid-template-columns: repeat(3, 1fr);
}
@media (max-width: 1100px) { .admin-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 720px) { .admin-grid { grid-template-columns: 1fr; } }
.admin-card {
  background: var(--bg-surface, #fff);
  border: 1px solid var(--line, #e5e7eb);
  border-radius: 14px;
  padding: 20px 22px;
  display: grid; gap: 10px;
}
.admin-card-wide { grid-column: span 2; }
@media (max-width: 720px) { .admin-card-wide { grid-column: span 1; } }
.admin-card-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.admin-card-head h3 { font-size: 13px; text-transform: uppercase; letter-spacing: 0.1em; color: var(--ink-muted, #64748b); margin: 0; }
.admin-csv {
  font-size: 11px;
  color: var(--ink-muted, #64748b);
  text-decoration: none;
  padding: 3px 8px;
  border: 1px solid var(--line, #e5e7eb);
  border-radius: 6px;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
  transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}
.admin-csv:hover,
.admin-csv:focus-visible {
  color: var(--brand, #6C63FF);
  border-color: var(--brand, #6C63FF);
  background: rgba(108,99,255,0.06);
  outline: none;
}
.admin-stat-big { font-family: 'Fraunces', Georgia, serif; font-weight: 700; font-size: 32px; color: var(--ink-strong, #0f172a); letter-spacing: -0.02em; }
.admin-stat-row { display: flex; gap: 24px; }
.admin-stat-row .n { font-family: 'Fraunces', Georgia, serif; font-size: 22px; font-weight: 700; color: var(--ink-strong, #0f172a); }
.admin-stat-row .lbl { font-size: 11.5px; color: var(--ink-muted); text-transform: uppercase; letter-spacing: 0.08em; }
.admin-stat-sub { font-size: 13px; color: var(--ink-muted); }
.admin-tiers { display: flex; gap: 8px; flex-wrap: wrap; }
.tier-pill {
  font-size: 11.5px; font-weight: 600; letter-spacing: 0.06em;
  padding: 4px 10px; border-radius: 999px;
  background: var(--bg-alt, #f6f7fb); color: var(--ink-soft, #334155);
  text-transform: uppercase;
}
.tier-pill.tier-pro { background: rgba(108,99,255,0.12); color: #4c42cf; }
.tier-pill.tier-ultra { background: rgba(255,122,69,0.12); color: #d66a3a; }
.admin-top ul { list-style: none; padding: 0; margin: 6px 0 0; font-size: 13px; color: var(--ink-soft, #334155); }
.admin-top li { padding: 3px 0; }
.admin-sub-h { font-size: 11.5px; text-transform: uppercase; letter-spacing: 0.1em; color: var(--ink-muted); margin-top: 6px; }
.admin-openclaw { font-size: 13px; color: var(--ink); }
.admin-openclaw .oc-total { font-size: 20px; margin-bottom: 8px; }
.admin-openclaw .oc-total strong { font-size: 28px; line-height: 1; }
.admin-openclaw .oc-states { list-style: none; padding: 0; margin: 0 0 8px; display: grid; gap: 4px; }
.admin-openclaw .oc-states li { display: flex; align-items: center; gap: 6px; font-size: 12.5px; }
.admin-openclaw .oc-states strong { margin-left: auto; font-variant-numeric: tabular-nums; }
.admin-openclaw .oc-st { width: 8px; height: 8px; border-radius: 50%; display: inline-block; background: #9ca3af; }
.admin-openclaw .oc-st-active { background: #10b981; }
.admin-openclaw .oc-st-provisioning { background: #f59e0b; animation: oc-pulse 1.2s ease-in-out infinite; }
.admin-openclaw .oc-st-suspended { background: #6366f1; }
.admin-openclaw .oc-st-error { background: #dc2626; }
.admin-openclaw .oc-st-destroyed { background: #4b5563; }
.admin-openclaw .oc-st-pending_fly_config { background: #fbbf24; }
@keyframes oc-pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.4; } }
.admin-openclaw .oc-budget { padding-top: 6px; border-top: 1px dashed var(--line); }
.admin-near-cap { list-style: none; padding: 0; margin: 0; font-size: 13px; color: var(--ink); }
.admin-near-cap li { padding: 6px 0; border-bottom: 1px dashed var(--line); }
.admin-near-cap li:last-child { border-bottom: 0; }
.admin-near-cap .pct { float: right; font-weight: 700; color: var(--bad, #dc2626); font-variant-numeric: tabular-nums; }
.admin-errors { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.admin-errors li { padding: 0; background: rgba(220,38,38,0.05); border: 1px solid rgba(220,38,38,0.12); border-radius: 8px; font-size: 13px; color: var(--ink); overflow: hidden; }
.admin-errors .cnt { font-weight: 700; color: var(--bad, #dc2626); margin-right: 8px; }
.admin-errors .msg { font-family: 'SF Mono', ui-monospace, Menlo, monospace; font-size: 12.5px; }
.admin-errors .meta { font-size: 11.5px; color: var(--ink-muted); }
.admin-error-row {
  width: 100%;
  text-align: left;
  background: transparent;
  border: 0;
  padding: 8px 10px;
  display: grid; gap: 2px;
  cursor: pointer;
  color: inherit;
  font: inherit;
}
.admin-error-row:hover,
.admin-error-row:focus-visible { background: rgba(220,38,38,0.09); outline: none; }
.admin-error-row[aria-expanded="true"] { background: rgba(220,38,38,0.12); }
.admin-error-row[aria-expanded="true"]::after { content: "▾"; }
.admin-error-row[aria-expanded="false"]::after { content: "▸"; color: var(--ink-muted); }
.admin-error-row::after {
  position: absolute;
  right: 10px;
  margin-top: 2px;
}
.admin-errors li { position: relative; }
.admin-error-drill {
  padding: 10px 12px;
  background: rgba(11,16,32,0.03);
  border-top: 1px solid rgba(220,38,38,0.12);
  font-size: 12px;
}
.admin-error-drill-head {
  font-size: 11.5px;
  color: var(--ink-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 6px;
}
.admin-error-instances { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.admin-error-instances li { padding: 8px 10px; background: #fff; border: 1px solid var(--line, #e5e7eb); border-radius: 6px; }
.admin-error-instances .inst-meta { display: flex; flex-wrap: wrap; gap: 10px; font-size: 11.5px; color: var(--ink-muted); margin-bottom: 4px; }
.admin-error-instances .inst-time { font-variant-numeric: tabular-nums; }
.admin-error-instances .inst-route { font-family: 'SF Mono', ui-monospace, Menlo, monospace; }
.admin-error-instances .inst-user { color: var(--brand, #6C63FF); }
.admin-error-instances .inst-stack summary { cursor: pointer; font-size: 11.5px; color: var(--ink-muted); }
.admin-error-instances .inst-stack[open] summary { color: var(--ink); margin-bottom: 4px; }
.admin-error-instances .inst-stack pre { margin: 0; padding: 8px 10px; background: #0b1020; color: #e2e8f0; border-radius: 4px; font-size: 11px; line-height: 1.45; overflow-x: auto; max-height: 280px; }

/* ── Claw tab (Plan C) ────────────────────────────────────────────────── */
.claw-grid {
  display: grid; gap: 16px;
  grid-template-columns: 1fr 1fr;
}
@media (max-width: 900px) { .claw-grid { grid-template-columns: 1fr; } }
.claw-log-wide { grid-column: span 2; }
@media (max-width: 900px) { .claw-log-wide { grid-column: span 1; } }

.claw-cta.card {
  padding: 36px 40px;
  display: grid; gap: 12px; justify-items: start;
  max-width: 680px;
}
.claw-cta h3 { font-family: 'Fraunces', Georgia, serif; font-size: 22px; color: var(--ink-strong, #0f172a); }
.claw-cta .text-muted { font-size: 15px; line-height: 1.65; }

.claw-status.card, .claw-command.card, .claw-log.card {
  padding: 20px 22px;
}
.claw-status-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.claw-status-head h3 { font-size: 15px; color: var(--ink-muted); text-transform: uppercase; letter-spacing: 0.1em; margin: 0; }
.claw-status-pill {
  padding: 4px 12px; border-radius: 999px;
  font-size: 11.5px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase;
}
.claw-status-pill.status-active { background: rgba(16,185,129,0.14); color: var(--good, #059669); }
.claw-status-pill.status-provisioning { background: rgba(108,99,255,0.14); color: var(--brand, #6C63FF); }
.claw-status-pill.status-inactive, .claw-status-pill.status-suspended { background: rgba(107,114,128,0.14); color: var(--ink-muted, #6b7280); }
.claw-status-pill.status-error { background: rgba(220,38,38,0.12); color: var(--bad, #dc2626); }
.claw-status-dl {
  display: grid; grid-template-columns: 120px 1fr;
  gap: 10px 12px; margin: 0;
}
.claw-status-dl dt { color: var(--ink-muted); font-size: 13px; text-transform: uppercase; letter-spacing: 0.06em; }
.claw-status-dl dd { font-size: 14px; color: var(--ink); margin: 0; }
.claw-status-dl code { font-family: 'SF Mono', ui-monospace, Menlo, monospace; font-size: 12.5px; background: var(--bg-alt, #f6f7fb); padding: 2px 6px; border-radius: 4px; }

.claw-command h3 { font-size: 13px; color: var(--ink-muted); text-transform: uppercase; letter-spacing: 0.1em; margin-bottom: 10px; }
.claw-command textarea {
  width: 100%; min-height: 120px; resize: vertical;
  padding: 12px 14px;
  border: 1px solid var(--line, #e5e7eb); border-radius: 10px;
  font: inherit; font-size: 14.5px; line-height: 1.55;
}

.claw-log h3 { font-size: 13px; color: var(--ink-muted); text-transform: uppercase; letter-spacing: 0.1em; margin-bottom: 12px; }
.claw-log-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.claw-log-item {
  padding: 12px 14px;
  background: var(--bg-alt, #f6f7fb);
  border-left: 3px solid var(--brand, #6C63FF);
  border-radius: 0 10px 10px 0;
  font-size: 14px;
}
.claw-log-item.status-queued { border-left-color: var(--ink-muted, #6b7280); }
.claw-log-item.status-running { border-left-color: var(--brand, #6C63FF); }
.claw-log-item.status-completed { border-left-color: var(--good, #10b981); }
.claw-log-item.status-failed { border-left-color: var(--bad, #dc2626); }
.claw-log-head { display: flex; justify-content: space-between; margin-bottom: 4px; }
.claw-log-status { font-size: 11px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-muted); }
.claw-log-time { font-size: 11.5px; color: var(--ink-muted); }
.claw-log-cmd { font-family: 'SF Mono', ui-monospace, Menlo, monospace; font-size: 13px; color: var(--ink-strong, #0f172a); margin-bottom: 4px; }
.claw-log-result { font-size: 13px; color: var(--ink-muted); }
