@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Space+Grotesk:wght@500;600;700&display=swap');

/* ─────────────────────────────────────────────────────────
   Career OS — Design System
   ───────────────────────────────────────────────────────── */

/* ── 1. Design tokens ── */
:root {
  /* Brand */
  --primary:       #0f766e;
  --primary-hover: #115e59;
  --primary-light: #e6f4f1;
  --primary-mid:   #99d5cc;
  --primary-dim:   #3b9b8f;

  /* Semantic */
  --success:        #059669;
  --success-light:  #d1fae5;
  --success-border: #6ee7b7;
  --warning:        #d97706;
  --warning-light:  #fef3c7;
  --warning-border: #fcd34d;
  --danger:         #dc2626;
  --danger-light:   #fee2e2;
  --danger-border:  #fca5a5;

  /* Neutrals */
  --bg:        #f5f8f7;
  --surface:   #fffdfa;
  --surface-2: #edf3f1;
  --surface-3: #e1ebe8;
  --border:    #d8e3df;
  --border-2:  #b8cbc5;

  /* Text */
  --text:         #15302d;
  --text-secondary: #36514d;
  --text-muted:   #66807b;
  --text-subtle:  #91aaa5;

  /* Scoring */
  --high:          #059669;
  --high-bg:       #d1fae5;
  --high-border:   #6ee7b7;
  --medium:        #d97706;
  --medium-bg:     #fef3c7;
  --medium-border: #fcd34d;
  --low:           #dc2626;
  --low-bg:        #fee2e2;
  --low-border:    #fca5a5;

  /* Geometry */
  --radius-sm: 8px;
  --radius:    12px;
  --radius-lg: 18px;
  --radius-xl: 26px;
  --radius-full: 9999px;

  /* Elevation */
  --shadow-sm: 0 1px 2px rgba(21,48,45,0.05);
  --shadow:    0 5px 18px rgba(21,48,45,0.06), 0 1px 3px rgba(21,48,45,0.05);
  --shadow-md: 0 12px 30px rgba(21,48,45,0.10), 0 2px 6px rgba(21,48,45,0.05);
  --shadow-lg: 0 20px 50px rgba(21,48,45,0.12), 0 3px 10px rgba(21,48,45,0.05);
}

/* Guided first-run path */
.how-it-works { display:grid; grid-template-columns:220px 1fr; gap:28px; align-items:center; margin:-22px 0 42px; padding:20px 24px; background:rgba(255,253,248,.76); border-top:1px solid rgba(200,169,107,.42); border-bottom:1px solid rgba(200,169,107,.42); }
.section-eyebrow { display:block; color:#9A7836; font-size:10px; font-weight:700; letter-spacing:.14em; text-transform:uppercase; margin-bottom:5px; }
.how-it-works-heading h2 { font:600 18px "Space Grotesk"; color:#0F3B2E; }
.how-it-works-steps { list-style:none; display:grid; grid-template-columns:repeat(4,1fr); gap:14px; }
.how-it-works-steps li { display:flex; gap:9px; min-width:0; }
.how-step-number { color:#9A7836; font:700 11px "Space Grotesk"; padding-top:2px; }
.how-it-works-steps strong { display:block; color:#0F3B2E; font-size:12px; line-height:1.3; }
.how-it-works-steps small { display:block; color:var(--text-muted); font-size:11px; line-height:1.4; margin-top:3px; }
.privacy-note { color:var(--text-muted); font-size:11px; text-align:center; max-width:520px; }
@media (max-width:720px) { .how-it-works { grid-template-columns:1fr; gap:14px; margin-top:-10px; } .how-it-works-steps { grid-template-columns:1fr 1fr; } }
@media (max-width:480px) { .how-it-works { padding:16px; } .how-it-works-steps { grid-template-columns:1fr; gap:10px; } }

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

html { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }

body {
  font-family: "DM Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  font-size: 14px;
  background-image: radial-gradient(rgba(15,118,110,.055) 1px, transparent 1px);
  background-size: 22px 22px;
  min-height: 100vh;
}

/* ── 3. Header ── */
header {
  background: rgba(255,253,250,.92);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
  padding: 0 24px;
  position: sticky;
  top: 0;
  z-index: 100;
}
.header-inner {
  max-width: 1100px;
  margin: 0 auto;
  height: 60px;
  display: flex;
  align-items: center;
}
.logo { display: flex; align-items: center; gap: 10px; }
.logo-mark {
  width: 34px; height: 34px;
  background: var(--text);
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  color: #bde7dd; font-size: 16px; font-weight: 700;
  font-family: "Space Grotesk", sans-serif;
  flex-shrink: 0;
}
.logo-text { display: flex; flex-direction: column; line-height: 1; gap: 2px; }
.logo-name    { font-size: 16px; font-weight: 700; color: var(--text); letter-spacing: -0.01em; }
.logo-tagline { font-size: 11px; color: var(--text-muted); font-weight: 400; }

/* ── 4. Main layout ── */
main {
  max-width: 1160px;
  margin: 0 auto;
  padding: 66px 28px 100px;
}

/* ── 5. Hero ── */
.hero {
  text-align: center;
  margin: 0 auto 48px;
  max-width: 780px;
}
.hero-kicker {
  color: var(--primary);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .16em;
  margin-bottom: 16px;
}
.hero-heading {
  font-family: "Space Grotesk", sans-serif;
  font-size: clamp(34px, 5vw, 56px);
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.045em;
  line-height: 1.2;
  margin-bottom: 16px;
}
.hero-sub {
  font-size: 16px;
  color: var(--text-muted);
  max-width: 630px;
  margin: 0 auto;
  line-height: 1.6;
}

/* ── 6. Workflow selector ── */
.workflow-selector {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 48px;
}

.ws-card {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-left-width: 1.5px;
  border-radius: var(--radius-lg);
  padding: 24px;
  cursor: pointer;
  transition: border-color 0.18s, box-shadow 0.18s, background 0.18s, transform .18s;
  display: flex;
  flex-direction: column;
  gap: 8px;
  position: relative;
  overflow: hidden;
}
.ws-card:hover {
  border-color: var(--primary-mid);
  box-shadow: var(--shadow-md);
  transform: translateY(-3px);
}
.ws-card--active {
  border-color: var(--primary);
  border-left: 4px solid var(--primary);
  background: linear-gradient(145deg, #e7f5f1, #fffdfa);
  box-shadow: 0 12px 30px rgba(15,118,110,.13);
}
.ws-number {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-subtle);
  letter-spacing: 0.06em;
  font-variant-numeric: tabular-nums;
}
.ws-card--active .ws-number { color: var(--primary-dim); }

.ws-icon-wrap {
  width: 40px; height: 40px;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  color: var(--text-secondary);
}
.ws-icon--explore  { background: #e8f1f4; color: #276678; }
.ws-icon--match    { background: #e8f4ef; color: #347b67; }
.ws-icon--optimize { background: var(--primary-light); color: var(--primary); }

.ws-title { font-size: 14px; font-weight: 700; color: var(--text); line-height: 1.3; }
.ws-desc  { font-size: 12px; color: var(--text-muted); line-height: 1.5; flex: 1; }

.ws-badge {
  display: inline-flex; align-items: center;
  border-radius: var(--radius-full);
  padding: 3px 9px;
  font-size: 11px; font-weight: 600;
  width: fit-content;
  margin-top: 2px;
}
.ws-badge--neutral { background: var(--surface-2); color: var(--text-muted); border: 1px solid var(--border); }
.ws-badge--ai      { background: #e8f4ef; color: #347b67; border: 1px solid #b9dfd2; }
.ws-badge--premium { background: var(--primary-light); color: var(--primary); border: 1px solid var(--primary-mid); }

/* ── 7. Workflow panels ── */
.workflow-panel { display: none; }
.workflow-panel.active { display: block; }

/* ── 8. Panel header ── */
.panel-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 24px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
}
.panel-header-icon {
  width: 48px; height: 48px;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.panel-icon--explore  { background: #eff6ff; color: #3b82f6; border: 1.5px solid #bfdbfe; }
.panel-icon--match    { background: #fdf4ff; color: #8b5cf6; border: 1.5px solid #e9d5ff; }
.panel-icon--optimize { background: var(--primary-light); color: var(--primary); border: 1.5px solid var(--primary-mid); }

.panel-title { font-size: 22px; font-weight: 800; color: var(--text); letter-spacing: -0.02em; margin: 0 0 3px; }
.panel-sub   { font-size: 14px; color: var(--text-muted); margin: 0; }

/* ── 9. Panel form card ── */
.panel-form-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 30px;
  box-shadow: var(--shadow);
  margin-bottom: 24px;
}

.form-section-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--text-muted);
  margin-bottom: 14px;
}

.form-divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 20px 0;
}

/* ── 10. Form fields ── */
.jobs-inputs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-bottom: 18px;
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.field-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
}

.field-required {
  color: var(--danger);
  margin-left: 1px;
}

.jobs-input, .jobs-select {
  width: 100%;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 9px 12px;
  font-family: inherit;
  font-size: 13px;
  color: var(--text);
  background: var(--surface);
  transition: border-color 0.15s, box-shadow 0.15s;
  line-height: 1.4;
}
.jobs-input:focus, .jobs-select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(79,70,229,0.08);
}
.jobs-input::placeholder { color: var(--text-subtle); }
.jobs-select { cursor: pointer; }

/* ── 11. Upload zone ── */
.upload-zone {
  border: 2px dashed var(--border-2);
  border-radius: var(--radius);
  padding: 28px 20px;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.18s, background 0.18s;
  background: var(--surface-2);
  position: relative;
  margin-bottom: 12px;
}
.upload-zone:hover, .upload-zone.drag-over {
  border-color: var(--primary);
  background: var(--primary-light);
}
.upload-zone input[type="file"] {
  position: absolute; inset: 0;
  opacity: 0; cursor: pointer;
  width: 100%; height: 100%;
}
.upload-zone-content {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  pointer-events: none;
}
.upload-icon-wrap {
  width: 44px; height: 44px;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  color: var(--text-muted);
  margin-bottom: 4px;
}
.upload-zone:hover .upload-icon-wrap,
.upload-zone.drag-over .upload-icon-wrap {
  border-color: var(--primary-mid);
  color: var(--primary);
}
.upload-primary { font-size: 13px; color: var(--text-secondary); }
.upload-primary strong { color: var(--primary); font-weight: 600; }
.upload-secondary { font-size: 12px; color: var(--text-muted); }

.file-selected {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 12px;
  background: var(--primary-light);
  border: 1.5px solid var(--primary-mid);
  border-radius: var(--radius-sm);
  font-size: 13px;
  color: var(--primary);
  font-weight: 500;
}
.file-selected svg { flex-shrink: 0; color: var(--primary); }
.file-selected.hidden { display: none; }

/* ── Optimize panel input grid ── */
.input-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 20px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 22px;
  box-shadow: var(--shadow);
}
.card-title    { font-size: 14px; font-weight: 700; color: var(--text); margin-bottom: 4px; }
.card-subtitle { font-size: 12px; color: var(--text-muted); margin-bottom: 14px; }

textarea {
  width: 100%;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 11px 13px;
  font-family: inherit;
  font-size: 13px;
  color: var(--text);
  background: var(--surface);
  resize: vertical;
  min-height: 190px;
  transition: border-color 0.15s, box-shadow 0.15s;
  line-height: 1.6;
}
textarea:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(79,70,229,0.08); }
textarea::placeholder { color: var(--text-subtle); }
.char-count { font-size: 11px; color: var(--text-muted); text-align: right; margin-top: 5px; }

/* ── 12. Buttons ── */
.btn-primary {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--primary); color: white;
  border: none; border-radius: var(--radius-sm);
  padding: 11px 28px;
  font-family: inherit; font-size: 14px; font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, transform 0.1s, box-shadow 0.15s;
  box-shadow: 0 2px 6px rgba(79,70,229,0.28);
  letter-spacing: -0.01em;
}
.btn-primary:hover:not(:disabled) {
  background: var(--primary-hover);
  box-shadow: 0 4px 14px rgba(79,70,229,0.36);
  transform: translateY(-1px);
}
.btn-primary:active { transform: translateY(0); }
.btn-primary:disabled { opacity: 0.55; cursor: not-allowed; transform: none; box-shadow: none; }

.btn-large { padding: 13px 36px; font-size: 15px; }

.btn-gradient {
  background: linear-gradient(135deg, #4f46e5, #7c3aed);
  box-shadow: 0 3px 10px rgba(79,70,229,0.32);
}
.btn-gradient:hover:not(:disabled) {
  background: linear-gradient(135deg, #4338ca, #6d28d9);
  box-shadow: 0 5px 18px rgba(79,70,229,0.42);
}

.btn-secondary {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  background: var(--surface); color: var(--primary);
  border: 1.5px solid var(--primary-mid); border-radius: var(--radius-sm);
  padding: 10px 22px; font-size: 14px; font-weight: 600;
  cursor: pointer; transition: background 0.15s, border-color 0.15s;
  font-family: inherit;
}
.btn-secondary:hover { background: var(--primary-light); border-color: var(--primary); }

/* Make Me Shine */
.btn-shine {
  display: inline-flex; align-items: center; gap: 8px;
  background: linear-gradient(135deg, #4f46e5, #7c3aed);
  color: white; border: none; border-radius: var(--radius-sm);
  padding: 13px 30px; font-family: inherit;
  font-size: 15px; font-weight: 700;
  cursor: pointer;
  transition: opacity 0.18s, transform 0.14s, box-shadow 0.18s;
  box-shadow: 0 4px 16px rgba(79,70,229,0.38);
  letter-spacing: -0.01em;
}
.btn-shine:hover:not(:disabled) {
  opacity: 0.9; transform: translateY(-2px);
  box-shadow: 0 6px 22px rgba(79,70,229,0.46);
}
.btn-shine:active { transform: translateY(0); }
.btn-shine:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }
.shine-hint { font-size: 12px; color: var(--text-muted); margin-top: 8px; }

/* Action buttons (copy, download) */
.btn-action {
  display: inline-flex; align-items: center; gap: 5px;
  border-radius: 6px; padding: 6px 13px;
  font-size: 12px; font-weight: 600;
  cursor: pointer; transition: all 0.15s;
  font-family: inherit;
  white-space: nowrap;
}
.btn-copy {
  background: var(--surface-2); border: 1px solid var(--border);
  color: var(--text-muted);
}
.btn-copy:hover { background: var(--primary-light); color: var(--primary); border-color: var(--primary-mid); }
.btn-copy.copied { background: #dcfce7; color: #166534; border-color: #bbf7d0; }
.btn-download {
  background: #eff6ff; border: 1px solid #bfdbfe; color: #1d4ed8;
}
.btn-download:hover:not(:disabled) { background: #dbeafe; border-color: #93c5fd; }
.btn-download:disabled { opacity: 0.55; cursor: not-allowed; }
.btn-download.downloaded { background: #dcfce7; color: #166534; border-color: #bbf7d0; }
.btn-pdf {
  background: #fdf4ff; border: 1px solid #e9d5ff; color: #7e22ce;
}
.btn-pdf:hover:not(:disabled) { background: #f3e8ff; border-color: #d8b4fe; }
.btn-pdf:disabled { opacity: 0.55; cursor: not-allowed; }
.btn-pdf.downloaded { background: #dcfce7; color: #166534; border-color: #bbf7d0; }

/* Panel CTA */
.panel-cta { margin-top: 20px; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.submit-wrap { text-align: center; margin-bottom: 28px; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.cta-hint { font-size: 12px; color: var(--text-muted); }

/* Toggle diff */
.btn-toggle-diff {
  flex-shrink: 0;
  background: var(--surface-2); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 7px 14px;
  font-size: 12px; font-weight: 600; color: var(--text-secondary);
  cursor: pointer; transition: border-color 0.15s, color 0.15s;
  font-family: inherit;
}
.btn-toggle-diff:hover { border-color: var(--primary-mid); color: var(--primary); }

/* ── 13. Loading states ── */
.loading-state {
  text-align: center;
  padding: 48px 24px;
  display: none;
}
.loading-state .loading-title { font-size: 16px; font-weight: 700; color: var(--text); margin-bottom: 6px; }
.loading-state .loading-sub   { font-size: 14px; color: var(--text-muted); max-width: 380px; margin: 0 auto; line-height: 1.6; }

.jobs-loading { display: none; padding: 32px 0; }
.loading-card {
  max-width: 420px; margin: 0 auto;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 32px 24px;
  text-align: center; box-shadow: var(--shadow);
}
.loading-card .loading-title { font-size: 16px; font-weight: 700; color: var(--text); margin-bottom: 6px; }
.loading-card .loading-sub   { font-size: 13px; color: var(--text-muted); margin-bottom: 20px; line-height: 1.6; }

.loading-steps {
  display: flex; justify-content: center; flex-wrap: wrap; gap: 8px;
}
.jobs-step-badge {
  display: inline-flex; align-items: center; gap: 5px;
  background: var(--surface-2); border: 1px solid var(--border);
  border-radius: var(--radius-full); padding: 5px 14px;
  font-size: 12px; font-weight: 500; color: var(--text-muted);
  transition: all 0.25s;
}
.jobs-step--active {
  background: var(--primary-light); border-color: var(--primary-mid);
  color: var(--primary); font-weight: 700;
}
.jobs-step--done {
  background: #dcfce7; border-color: #bbf7d0; color: #166534;
}

.spinner {
  width: 36px; height: 36px;
  border: 3px solid var(--primary-light);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.75s linear infinite;
  margin: 0 auto 16px;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── 14. Error states ── */
.error-box, .jobs-error-box {
  display: none; align-items: flex-start; gap: 10px;
  background: var(--danger-light); border: 1px solid var(--danger-border);
  border-radius: var(--radius-sm); padding: 12px 16px;
  color: #991b1b; font-size: 13px;
  line-height: 1.5;
}
.error-box { margin-bottom: 20px; }
.jobs-error-box { margin-bottom: 16px; }
.error-box.show, .jobs-error-box.show { display: flex; }
.error-icon { width: 16px; height: 16px; flex-shrink: 0; margin-top: 1px; }

/* ── 15. ATS Match Panel ── */
.match-panel {
  display: none;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 28px;
  margin-bottom: 28px;
  animation: fadeUp 0.35s ease;
}
.match-panel.show { display: block; }

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}

.match-panel-top {
  display: flex; align-items: center; gap: 36px;
  margin-bottom: 28px; padding-bottom: 28px;
  border-bottom: 1px solid var(--border);
}

/* Score dial */
.match-dial-wrap {
  position: relative; width: 130px; height: 130px; flex-shrink: 0;
}
.match-dial { width: 130px; height: 130px; }
.dial-bg   { fill: none; stroke: var(--surface-2); stroke-width: 10; }
.dial-fill {
  fill: none; stroke-width: 10; stroke-linecap: round;
  transition: stroke-dashoffset 1s cubic-bezier(0.4, 0, 0.2, 1), stroke 0.4s ease;
}
.dial-high   { stroke: var(--high); }
.dial-medium { stroke: var(--medium); }
.dial-low    { stroke: var(--low); }

.match-score-center {
  position: absolute; inset: 0;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  pointer-events: none;
}
.score-number { font-size: 34px; font-weight: 800; line-height: 1; color: var(--text); letter-spacing: -0.02em; }
.score-label  { font-size: 11px; color: var(--text-muted); font-weight: 500; }

/* Match right */
.match-right { flex: 1; }
.match-level-badge {
  display: inline-block; border-radius: var(--radius-full);
  padding: 4px 12px; font-size: 12px; font-weight: 700;
  margin-bottom: 10px; border: 1.5px solid transparent;
}
.level-high   { background: var(--high-bg);    color: #065f46; border-color: var(--high-border); }
.level-medium { background: var(--medium-bg);  color: #92400e; border-color: var(--medium-border); }
.level-low    { background: var(--low-bg);     color: #991b1b; border-color: var(--low-border); }

.match-headline { font-size: 19px; font-weight: 700; color: var(--text); margin-bottom: 5px; letter-spacing: -0.01em; }
.match-subline  { font-size: 14px; color: var(--text-muted); margin-bottom: 12px; line-height: 1.5; }

.keyword-rate {
  display: none;
  background: var(--surface-2); border: 1px solid var(--border);
  border-radius: var(--radius-full); padding: 4px 12px;
  font-size: 12px; font-weight: 600; color: var(--text-muted);
  margin-bottom: 16px; width: fit-content;
}

/* Keywords */
.kw-row {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 20px; margin-bottom: 24px;
}
.kw-block-title {
  font-size: 12px; font-weight: 700; color: var(--text-secondary);
  text-transform: uppercase; letter-spacing: 0.05em;
  margin-bottom: 10px;
}
.kw-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.kw-tag {
  display: inline-block; border-radius: var(--radius-full);
  padding: 4px 11px; font-size: 12px; font-weight: 500;
}
.tag-matched { background: var(--high-bg);    color: #065f46; border: 1px solid var(--high-border); }
.tag-missing { background: var(--medium-bg);  color: #92400e; border: 1px solid var(--medium-border); }

/* Strengths & Gaps */
.sg-row {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 20px;
  border-top: 1px solid var(--border);
  padding-top: 22px;
}
.sg-title {
  font-size: 12px; font-weight: 700; color: var(--text-secondary);
  text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 10px;
}
.sg-list { list-style: none; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.sg-list li {
  font-size: 13px; color: var(--text-muted); line-height: 1.55;
  padding: 8px 12px;
  background: var(--surface-2); border-radius: var(--radius-sm);
  border-left: 3px solid var(--border-2);
}

/* ── 16. Before / After score compare ── */
.score-compare {
  display: none;
  align-items: center; gap: 16px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 18px 22px;
  margin-bottom: 22px; box-shadow: var(--shadow);
  flex-wrap: wrap;
}
.score-compare-item {
  display: flex; align-items: center; gap: 10px; flex: 1; min-width: 180px;
}
.sc-label { font-size: 12px; font-weight: 600; color: var(--text-muted); white-space: nowrap; }
.sc-label--after { color: var(--primary); }

.sc-bar-wrap {
  flex: 1; height: 8px;
  background: var(--surface-2); border-radius: var(--radius-full); overflow: hidden;
}
.sc-bar {
  height: 100%; border-radius: var(--radius-full);
  width: 0; transition: width 1.2s cubic-bezier(0.4, 0, 0.2, 1);
}
.sc-bar--before { background: var(--warning); }
.sc-bar--after  { background: linear-gradient(90deg, #4f46e5, #10b981); }

.sc-num          { font-size: 14px; font-weight: 700; color: var(--text); min-width: 26px; text-align: right; }
.sc-num--after   { color: var(--primary); }
.sc-num-group    { display: flex; align-items: center; gap: 6px; }

.sc-delta {
  display: inline-block; font-size: 11px; font-weight: 700;
  padding: 2px 7px; border-radius: var(--radius-full); white-space: nowrap;
}
.sc-delta.hidden  { display: none; }
.sc-delta--pos    { background: #dcfce7; color: #15803d; }
.sc-delta--neg    { background: var(--danger-light); color: #b91c1c; }
.sc-delta--zero   { background: var(--surface-2); color: var(--text-muted); }

.sc-scoring-label {
  display: none; font-size: 11px; color: var(--text-muted);
  font-style: italic; white-space: nowrap;
}

.score-compare-arrow {
  color: var(--text-muted); flex-shrink: 0;
  display: flex; align-items: center;
}

@keyframes bar-pulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.32; }
}
.scoring-pulse {
  width: 55% !important;
  animation: bar-pulse 1.1s ease-in-out infinite;
  background: linear-gradient(90deg, #a5b4fc, #6ee7b7) !important;
}

/* ── 17. Results section ── */
.results-section { display: none; }
.results-section.show { display: block; }

.results-header {
  text-align: center; margin-bottom: 24px; padding: 24px 0 20px;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  margin-bottom: 28px;
}
.results-done-badge {
  display: inline-flex; align-items: center; gap: 6px;
  background: #dcfce7; color: #166534;
  border: 1px solid #bbf7d0; border-radius: var(--radius-full);
  padding: 5px 14px; font-size: 12px; font-weight: 700;
  margin-bottom: 12px;
}
.results-done-badge::before { content: "✓"; }
.results-heading  { font-size: 22px; font-weight: 800; letter-spacing: -0.01em; margin-bottom: 5px; }
.results-subhead  { font-size: 14px; color: var(--text-muted); }

.results-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 20px;
}

.result-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); box-shadow: var(--shadow);
  display: flex; flex-direction: column; overflow: hidden;
}
.result-card-header {
  padding: 14px 18px; border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  background: var(--surface-2);
}
.result-card-title { font-size: 13px; font-weight: 700; color: var(--text-secondary); }
.result-actions { display: flex; align-items: center; gap: 6px; }
.result-content { padding: 20px; flex: 1; overflow-y: auto; max-height: 480px; }
.result-content pre {
  white-space: pre-wrap; font-family: inherit;
  font-size: 13px; line-height: 1.75; color: var(--text);
}

/* ── Inline edit mode ── */
.btn-edit {
  background: var(--surface-2); border: 1px solid var(--border);
  color: var(--text-muted);
}
.btn-edit:hover { background: var(--primary-light); color: var(--primary); border-color: var(--primary-mid); }

.edit-mode-actions { flex-wrap: wrap; }

.edit-helper-text {
  font-size: 11px; color: var(--text-muted); font-style: italic;
  display: inline-flex; align-items: center; margin-right: 2px;
}

.btn-save-edit {
  background: var(--primary); border: 1px solid var(--primary); color: #fff;
}
.btn-save-edit:hover { background: var(--primary-hover); border-color: var(--primary-hover); }

.btn-cancel-edit {
  background: var(--surface-2); border: 1px solid var(--border); color: var(--text-muted);
}
.btn-cancel-edit:hover { background: var(--surface-3); }

.edit-textarea {
  width: 100%; min-height: 420px; padding: 16px;
  font-family: inherit; font-size: 13px; line-height: 1.75; color: var(--text);
  background: var(--surface);
  border: 1.5px solid var(--primary-mid); border-radius: 8px;
  resize: vertical; outline: none; box-sizing: border-box;
  white-space: pre-wrap;
}
.edit-textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(79,70,229,0.08); }

.result-card.editing { border-color: var(--primary-mid); }
.result-card.editing .result-card-header { background: var(--primary-light); }

.try-again-wrap { text-align: center; margin-top: 28px; }
/* Score explanation + trust copy */
.match-why {
  font-size: 13px; line-height: 1.6; color: var(--text-secondary);
  margin: 6px 0 4px; font-style: italic;
}
.score-trust-note {
  margin-top: 18px; font-size: 11.5px; color: var(--text-secondary);
  opacity: 0.75; text-align: center;
}
.sc-explain {
  margin: 10px auto 0; max-width: 640px; text-align: center;
  font-size: 12.5px; line-height: 1.6; color: var(--text-secondary); font-style: italic;
}
.sc-explain.hidden { display: none; }
.sc-recalc-note {
  margin: 8px auto 0; text-align: center;
  font-size: 11.5px; color: var(--text-secondary); opacity: 0.75;
}

/* ── 18. Diff viewer ── */
.diff-section { display: none; margin-top: 36px; }
.diff-section.visible { display: block; }

.diff-section-header {
  display: flex; justify-content: space-between; align-items: flex-start;
  margin-bottom: 18px; gap: 16px;
}
.diff-title    { font-size: 18px; font-weight: 700; color: var(--text); margin: 0 0 3px; }
.diff-subtitle { font-size: 13px; color: var(--text-muted); margin: 0; }

.diff-panels {
  display: none;
  grid-template-columns: 1fr 1px 1fr;
  border: 1px solid var(--border); border-radius: var(--radius-lg);
  overflow: hidden; background: var(--surface);
  max-height: 540px; overflow-y: auto;
}
.diff-panels.expanded { display: grid; }
.diff-divider { background: var(--border); }
.diff-panel   { display: flex; flex-direction: column; min-width: 0; }

.diff-panel-label {
  position: sticky; top: 0; z-index: 2;
  padding: 9px 14px; font-size: 11px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.07em;
  border-bottom: 1px solid var(--border);
}
.diff-panel-label--orig { background: #fef2f2; color: #991b1b; }
.diff-panel-label--new  { background: #f0fdf4; color: #166534; }

.diff-content {
  padding: 14px;
  font-family: "Courier New", monospace;
  font-size: 12px; line-height: 1.7; overflow-x: auto;
}
.diff-line {
  padding: 2px 6px; border-radius: 3px;
  margin-bottom: 2px; white-space: pre-wrap; word-break: break-word;
}
.diff-line--removed   { background: var(--danger-light); color: #991b1b; text-decoration: line-through; opacity: 0.75; }
.diff-line--modified  { background: #fef9c3; color: #713f12; }
.diff-line--unchanged { color: var(--text-muted); }
.diff-line--improved  { background: #dbeafe; color: #1e40af; }
.diff-line--added     { background: #dcfce7; color: #166534; }

/* ── 19. Jobs results bar ── */
.jobs-results { display: none; }
.jobs-results.show { display: block; }

.results-bar {
  display: flex; align-items: center; gap: 12px;
  margin-bottom: 20px; padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}
.results-bar-title {
  font-size: 18px; font-weight: 800; color: var(--text);
  letter-spacing: -0.01em; margin: 0;
}
.results-count-pill {
  display: inline-flex; align-items: center;
  background: var(--primary-light); color: var(--primary);
  border: 1px solid var(--primary-mid); border-radius: var(--radius-full);
  padding: 3px 11px; font-size: 12px; font-weight: 700;
}

/* ── 20. Job cards ── */
.jobs-list { display: flex; flex-direction: column; gap: 14px; }
.fallback-banner { margin-bottom: 14px; padding: 10px 14px; background: rgba(200,169,107,.12); border: 1px solid rgba(200,169,107,.38); border-radius: 8px; font-size: 13px; color: var(--text-muted); }

.job-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); box-shadow: var(--shadow);
  padding: 20px;
  display: flex; gap: 18px; align-items: flex-start;
  transition: box-shadow 0.18s, border-color 0.18s, transform 0.14s;
  animation: fadeUp 0.35s ease both;
}
.job-card:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--border-2);
  transform: translateY(-2px);
}

.job-fit-score {
  flex-shrink: 0; width: 56px; height: 56px;
  border-radius: 10px;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  font-weight: 800;
}
.job-fit-score .fit-num   { font-size: 20px; line-height: 1; }
.job-fit-score .fit-label { font-size: 9px; text-transform: uppercase; letter-spacing: 0.06em; opacity: 0.75; }
.fit-high    { background: var(--high-bg);    color: #065f46; border: 1.5px solid var(--high-border); }
.fit-medium  { background: var(--medium-bg);  color: #92400e; border: 1.5px solid var(--medium-border); }
.fit-low     { background: var(--low-bg);     color: #991b1b; border: 1.5px solid var(--low-border); }
.fit-neutral { background: var(--surface-2);  color: var(--text-muted); border: 1.5px solid var(--border); }

.job-card-body { flex: 1; min-width: 0; }
.job-card-top  {
  display: flex; align-items: flex-start;
  justify-content: space-between; gap: 12px; margin-bottom: 5px;
}
.job-title {
  font-size: 15px; font-weight: 700; color: var(--text);
  line-height: 1.3; letter-spacing: -0.01em;
}
.job-rank-badge {
  flex-shrink: 0;
  background: var(--surface-2); border: 1px solid var(--border);
  border-radius: var(--radius-full); padding: 2px 10px;
  font-size: 11px; font-weight: 700; color: var(--text-muted); white-space: nowrap;
}
.job-rank-badge--top { background: #fef9c3; border-color: #fde68a; color: #92400e; }

.job-meta {
  display: flex; flex-wrap: wrap; gap: 6px 12px; margin-bottom: 10px;
  align-items: center;
}
.job-meta-item { font-size: 12px; color: var(--text-muted); }
.job-meta-item strong { color: var(--text-secondary); font-weight: 600; }

.job-description {
  font-size: 13px; color: var(--text-muted);
  line-height: 1.65; margin-bottom: 12px;
}

.job-fit-reason {
  background: var(--surface-2); border-left: 3px solid var(--primary-mid);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 8px 12px;
  font-size: 12px; color: var(--text-muted); line-height: 1.55;
  margin-bottom: 12px;
  display: flex; align-items: flex-start; gap: 5px;
}
.job-fit-reason strong { color: var(--primary); font-weight: 700; }

.job-salary {
  display: inline-flex; align-items: center;
  font-size: 12px; font-weight: 600; color: #166534;
  background: #f0fdf4; border: 1px solid #bbf7d0;
  border-radius: var(--radius-full); padding: 3px 10px; margin-bottom: 12px;
}

.btn-apply {
  display: inline-flex; align-items: center; gap: 5px;
  background: var(--primary); color: white; border: none;
  border-radius: var(--radius-sm); padding: 7px 16px;
  font-size: 13px; font-weight: 600; font-family: inherit;
  cursor: pointer; text-decoration: none;
  transition: background 0.15s, transform 0.1s;
}
.btn-apply:hover { background: var(--primary-hover); transform: translateY(-1px); }

/* ── 21. Footer ── */
footer {
  text-align: center; padding: 24px;
  color: var(--text-subtle); font-size: 12px;
  border-top: 1px solid var(--border);
}

/* ─────────────────────────────────────────────────────────
   22. Responsive
   ───────────────────────────────────────────────────────── */

@media (max-width: 860px) {
  .workflow-selector { grid-template-columns: 1fr; gap: 10px; }

  .ws-card {
    flex-direction: row; align-items: flex-start; gap: 14px; padding: 16px 18px;
  }
  .ws-icon-wrap { flex-shrink: 0; }
  .ws-number { position: absolute; top: 14px; right: 16px; }
  .ws-card .ws-badge { display: none; }
}

@media (max-width: 720px) {
  main { padding: 28px 16px 60px; }

  .hero-heading { font-size: 22px; }
  .hero-sub     { font-size: 14px; }

  .panel-title { font-size: 18px; }

  .input-grid { grid-template-columns: 1fr; gap: 16px; }
  .jobs-inputs { grid-template-columns: 1fr; gap: 12px; }

  .results-grid { grid-template-columns: 1fr; gap: 16px; }

  .kw-row { grid-template-columns: 1fr; }
  .sg-row { grid-template-columns: 1fr; }

  .match-panel { padding: 20px; }
  .match-panel-top { flex-direction: column; gap: 20px; text-align: center; align-items: center; }
  .match-right { width: 100%; }
  .keyword-rate { margin: 0 auto 14px; }
  .btn-shine { width: 100%; justify-content: center; }
  .shine-hint { text-align: center; }

  .score-compare { flex-direction: column; gap: 12px; }
  .score-compare-item { width: 100%; }
  .score-compare-arrow { transform: rotate(90deg); }

  .diff-panels { grid-template-columns: 1fr; }
  .diff-divider { display: none; }

  .job-card { gap: 14px; }
  .job-fit-score { width: 48px; height: 48px; }
  .job-fit-score .fit-num { font-size: 16px; }

  .results-bar { flex-wrap: wrap; gap: 8px; }
}

@media (max-width: 480px) {
  header { padding: 0 16px; }

  .panel-header { gap: 12px; }
  .panel-header-icon { width: 40px; height: 40px; }

  .panel-form-card { padding: 18px; }

  .btn-large { padding: 13px 24px; font-size: 14px; width: 100%; }
  .btn-secondary { width: 100%; }

  .result-card-header { flex-direction: column; align-items: flex-start; gap: 10px; }
  .result-actions { width: 100%; justify-content: flex-start; }

  .diff-section-header { flex-direction: column; align-items: flex-start; }
}

/* ══════════════════════════════════════
   AUTH & PERSISTENCE STYLES
   ══════════════════════════════════════ */

/* ── Header Actions ── */
.header-inner { justify-content: space-between; }
.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.header-icon-btn {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 6px 12px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  background: transparent;
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, color 0.15s;
}
.header-icon-btn:hover {
  border-color: var(--primary-mid);
  background: var(--primary-light);
  color: var(--primary);
}

.btn-sm { padding: 7px 16px; font-size: 13px; }

/* ── User Menu ── */
.header-user-menu { position: relative; }
.user-menu-trigger {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 6px 12px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  background: transparent;
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  transition: border-color 0.15s, background 0.15s;
}
.user-menu-trigger:hover { border-color: var(--primary-mid); background: var(--primary-light); }
.user-avatar {
  width: 26px; height: 26px;
  border-radius: 50%;
  background: var(--primary-light);
  border: 1.5px solid var(--primary-mid);
  display: flex; align-items: center; justify-content: center;
  color: var(--primary);
  flex-shrink: 0;
}

.user-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  min-width: 200px;
  padding: 6px;
  z-index: 200;
  display: none;
  animation: fadeIn 0.12s ease;
}
.user-dropdown.show { display: block; }

.dropdown-item {
  display: flex;
  align-items: center;
  gap: 9px;
  width: 100%;
  padding: 9px 12px;
  border: none;
  background: transparent;
  color: var(--text);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  border-radius: var(--radius);
  text-align: left;
  transition: background 0.12s;
}
.dropdown-item:hover { background: var(--surface-2); }
.dropdown-item--danger { color: var(--danger); }
.dropdown-item--danger:hover { background: var(--danger-light); }
.dropdown-divider { height: 1px; background: var(--border); margin: 4px 0; }

@keyframes fadeIn { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }

/* ── Auth Modal ── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15,23,42,0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
  padding: 20px;
}
.modal-overlay.show { opacity: 1; pointer-events: all; }

.modal-box {
  background: var(--surface);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  width: 100%;
  max-width: 400px;
  padding: 32px;
  animation: modalIn 0.2s ease;
}
@keyframes modalIn { from { transform: scale(0.96) translateY(8px); opacity: 0; } to { transform: none; opacity: 1; } }

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}
.modal-logo { display: flex; align-items: center; gap: 8px; }
.modal-close {
  width: 30px; height: 30px;
  border: none; background: transparent;
  cursor: pointer;
  color: var(--text-muted);
  border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center;
  transition: background 0.12s;
}
.modal-close:hover { background: var(--surface-2); }

.modal-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.01em;
  margin-bottom: 6px;
}
.modal-sub { font-size: 13px; color: var(--text-muted); margin-bottom: 24px; }

.modal-error {
  background: var(--danger-light);
  border: 1px solid var(--danger-border);
  color: var(--danger);
  border-radius: var(--radius);
  padding: 10px 14px;
  font-size: 13px;
  margin-bottom: 16px;
  display: none;
}
.modal-error.show { display: block; }

.modal-field { margin-bottom: 16px; }
.modal-input {
  width: 100%;
  padding: 10px 13px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  font-size: 14px;
  font-family: inherit;
  color: var(--text);
  background: var(--surface);
  outline: none;
  transition: border-color 0.15s;
  margin-top: 6px;
}
.modal-input:focus { border-color: var(--primary); }

.btn-block { width: 100%; margin-top: 8px; }

.modal-switch {
  text-align: center;
  margin-top: 18px;
  font-size: 13px;
  color: var(--text-muted);
}
.btn-link {
  background: none;
  border: none;
  color: var(--primary);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  padding: 0;
  margin-left: 4px;
  text-decoration: underline;
}
.btn-link:hover { color: var(--primary-hover); }

/* ── Side Panels ── */
.side-panel-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15,23,42,0.35);
  z-index: 300;
  display: none;
}

.side-panel {
  position: fixed;
  top: 0;
  right: 0;
  width: 380px;
  max-width: 100vw;
  height: 100vh;
  background: var(--surface);
  border-left: 1.5px solid var(--border);
  box-shadow: -8px 0 32px rgba(0,0,0,0.12);
  z-index: 400;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.25s cubic-bezier(0.4,0,0.2,1);
}
.side-panel.show { transform: translateX(0); }

.side-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px;
  border-bottom: 1.5px solid var(--border);
  flex-shrink: 0;
}
.side-panel-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
}
.side-panel-body {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
}

/* ── Saved Jobs List ── */
.saved-panel-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 48px 20px;
  gap: 14px;
  color: var(--text-muted);
  font-size: 14px;
}
.saved-panel-empty-icon {
  width: 56px; height: 56px;
  background: var(--surface-2);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: var(--text-subtle);
}

.saved-job-item {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
}
.saved-job-item:last-child { border-bottom: none; }
.saved-job-info { flex: 1; min-width: 0; }
.saved-job-title { font-size: 13px; font-weight: 600; color: var(--text); margin-bottom: 3px; }
.saved-job-meta  { font-size: 12px; color: var(--text-muted); }
.saved-job-score {
  display: inline-block;
  margin-top: 5px;
  font-size: 11px;
  font-weight: 600;
  background: var(--primary-light);
  color: var(--primary);
  border-radius: var(--radius-full);
  padding: 2px 8px;
}
.saved-job-actions { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
.btn-apply-sm {
  padding: 5px 10px;
  font-size: 12px;
  font-weight: 600;
  background: var(--primary-light);
  color: var(--primary);
  border-radius: var(--radius);
  text-decoration: none;
  transition: background 0.15s;
}
.btn-apply-sm:hover { background: var(--primary-mid); }
.btn-unsave {
  width: 26px; height: 26px;
  border: none;
  background: transparent;
  color: var(--text-subtle);
  cursor: pointer;
  border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center;
  transition: background 0.12s, color 0.12s;
}
.btn-unsave:hover { background: var(--danger-light); color: var(--danger); }

/* ── Search History ── */
.history-list { display: flex; flex-direction: column; gap: 2px; }
.history-item {
  padding: 12px;
  border-radius: var(--radius);
  cursor: pointer;
  transition: background 0.12s;
}
.history-item:hover { background: var(--surface-2); }
.history-role { font-size: 13px; font-weight: 600; color: var(--text); margin-bottom: 5px; }
.history-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 5px; }
.history-tag {
  font-size: 11px;
  padding: 2px 7px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  color: var(--text-secondary);
}
.history-date  { font-size: 11px; color: var(--text-subtle); }
.history-count { font-size: 11px; color: var(--text-muted); }
.history-footer {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  text-align: center;
}
.btn-text-danger {
  background: none;
  border: none;
  color: var(--danger);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  padding: 6px 12px;
  border-radius: var(--radius);
  transition: background 0.12s;
}
.btn-text-danger:hover { background: var(--danger-light); }

/* ── Profile Panel ── */
.profile-section { margin-bottom: 20px; }
.profile-email {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  padding: 10px 14px;
  background: var(--surface-2);
  border-radius: var(--radius);
  border: 1px solid var(--border);
}
.profile-input {
  width: 100%;
  margin-top: 6px;
}
.profile-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.profile-skills { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.profile-actions { display: flex; align-items: center; gap: 12px; }
.profile-save-msg { font-size: 13px; color: var(--success); font-weight: 500; }

/* ── Panel loading ── */
.panel-loading {
  display: flex;
  justify-content: center;
  padding: 48px 0;
}

/* ── Save Job Button on cards ── */
.job-card-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  flex-wrap: wrap;
}

.job-save-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 12px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  background: transparent;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, color 0.15s;
}
.job-save-btn:hover {
  border-color: var(--primary-mid);
  background: var(--primary-light);
  color: var(--primary);
}
.job-save-btn.save-btn--saved {
  border-color: var(--primary);
  background: var(--primary-light);
  color: var(--primary);
  font-weight: 600;
}

/* ── Optimize-for-this-job button (on job cards) ── */
.btn-optimize {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 12px;
  border: 1.5px solid var(--primary-mid);
  border-radius: var(--radius);
  background: var(--primary-light);
  color: var(--primary);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, transform 0.1s;
  white-space: nowrap;
  font-family: inherit;
}
.btn-optimize:hover {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
  transform: translateY(-1px);
}

/* ── Optimize button in saved-jobs panel ── */
.btn-optimize-sm {
  padding: 5px 10px;
  font-size: 12px;
  font-weight: 600;
  background: var(--primary-light);
  color: var(--primary);
  border: 1.5px solid var(--primary-mid);
  border-radius: var(--radius);
  cursor: pointer;
  transition: background 0.15s;
  font-family: inherit;
  white-space: nowrap;
}
.btn-optimize-sm:hover { background: var(--primary); color: #fff; border-color: var(--primary); }

/* ── Loaded Job Banner ── */
.loaded-job-banner {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  background: linear-gradient(135deg, #eef2ff 0%, #f5f3ff 100%);
  border: 1.5px solid var(--primary-mid);
  border-radius: 12px;
  padding: 14px 18px;
  margin-bottom: 16px;
}
.loaded-job-left { flex: 1; min-width: 0; }
.loaded-job-right { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.loaded-job-eyebrow {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: 3px;
}
.loaded-job-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.loaded-job-meta {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
}
.btn-clear-job {
  padding: 5px 10px;
  font-size: 12px;
  font-weight: 500;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-muted);
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
  font-family: inherit;
}
.btn-clear-job:hover { background: var(--surface-2); color: var(--text-primary); }

/* ── Profile Resume Bar ── */
.profile-resume-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #f0fdf4;
  border: 1.5px solid #bbf7d0;
  border-radius: 8px;
  padding: 10px 14px;
  margin-bottom: 16px;
  font-size: 13px;
  color: #166534;
}
.profile-resume-bar svg { flex-shrink: 0; }
.profile-resume-bar span { flex: 1; font-weight: 500; }
.btn-link-sm {
  background: none;
  border: none;
  color: var(--primary);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  padding: 0;
  text-decoration: underline;
  font-family: inherit;
}
.btn-link-sm:hover { color: var(--primary-hover); }

/* ── Toast ── */
.toast {
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%) translateY(16px);
  background: var(--text);
  color: #fff;
  padding: 10px 20px;
  border-radius: var(--radius-full);
  font-size: 13px;
  font-weight: 500;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s, transform 0.2s;
  z-index: 9999;
  white-space: nowrap;
}
.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
  pointer-events: all;
}
.toast.toast--success { background: var(--success); }
.toast.toast--info    { background: #334155; }

/* ── Outreach Package ── */
.outreach-section {
  display: none;
  margin-top: 36px;
}
.outreach-section.show { display: block; }

.outreach-section-header {
  display: flex; flex-direction: column; gap: 4px;
  margin-bottom: 20px;
}
.outreach-section-title {
  font-size: 18px; font-weight: 700; color: var(--text); margin: 0;
}
.outreach-section-sub {
  font-size: 13px; color: var(--text-muted); margin: 0;
}

.outreach-loading {
  display: none;
  align-items: center; gap: 12px;
  padding: 18px 0;
  font-size: 13px; color: var(--text-muted);
}
.outreach-loading .spinner {
  width: 18px; height: 18px;
  border-width: 2px;
  flex-shrink: 0;
}

.outreach-grid {
  display: flex; flex-direction: column; gap: 14px;
}

.outreach-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.outreach-card-header {
  padding: 12px 18px;
  border-bottom: 1px solid var(--border);
  background: var(--surface-2);
  display: flex; align-items: center;
  justify-content: space-between; gap: 12px;
}
.outreach-card-meta {
  display: flex; flex-direction: column; gap: 2px;
}
.outreach-card-title {
  font-size: 13px; font-weight: 700; color: var(--text-secondary);
}
.outreach-card-hint {
  font-size: 11px; color: var(--text-subtle);
}
.outreach-card-actions {
  display: flex; align-items: center; gap: 6px; flex-shrink: 0;
}
.outreach-card-body {
  padding: 16px 18px;
}
.outreach-text {
  font-size: 13px; line-height: 1.75; color: var(--text);
  white-space: pre-wrap; margin: 0;
}

.btn-regen {
  font-size: 11px; font-weight: 600;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-2);
  background: var(--surface);
  color: var(--text-muted);
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.btn-regen:hover:not(:disabled) {
  background: var(--surface-2);
  color: var(--text-secondary);
  border-color: var(--primary-mid);
}
.btn-regen:disabled {
  opacity: 0.6; cursor: default;
}

/* ── Job Link Import ── */
.job-link-import {
  margin-bottom: 4px;
}
.job-link-row {
  display: flex;
  gap: 8px;
  align-items: stretch;
}
.job-link-input {
  flex: 1;
  min-width: 0;
  padding: 11px 14px;
  font-size: 0.9rem;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border-2);
  border-radius: var(--radius);
  transition: border-color 0.15s, box-shadow 0.15s;
}
.job-link-input::placeholder { color: var(--text-subtle); }
.job-link-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-light);
}
.btn-fetch-link {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 18px;
  font-size: 0.875rem;
  font-weight: 600;
  color: #fff;
  background: var(--primary);
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s, opacity 0.15s;
}
.btn-fetch-link:hover { background: var(--primary-hover); }
.btn-fetch-link:disabled { opacity: 0.65; cursor: default; }
.fetch-link-spinner {
  display: none;
  width: 14px;
  height: 14px;
  border: 2px solid rgba(255,255,255,0.4);
  border-top-color: #fff;
  border-radius: 50%;
  animation: fetchspin 0.7s linear infinite;
}
.btn-fetch-link.loading .fetch-link-spinner { display: inline-block; }
@keyframes fetchspin { to { transform: rotate(360deg); } }

.job-link-status {
  display: none;
  margin-top: 10px;
  padding: 9px 13px;
  font-size: 0.84rem;
  line-height: 1.4;
  border-radius: var(--radius-sm);
}
.job-link-status.show { display: block; }
.job-link-status.success {
  color: var(--success);
  background: var(--success-light);
  border: 1px solid var(--success-border);
}
.job-link-status.error {
  color: var(--danger);
  background: var(--danger-light);
  border: 1px solid var(--danger-border);
}

.job-link-summary {
  display: none;
  margin-top: 10px;
  padding: 12px 14px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.job-link-summary.show { display: block; }
.job-link-summary-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 4px;
}
.job-link-summary-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  font-size: 0.82rem;
  color: var(--text-muted);
}
.job-link-summary-meta a {
  color: var(--primary);
  text-decoration: none;
  max-width: 320px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.job-link-summary-meta a:hover { text-decoration: underline; }

.job-link-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 16px 0 12px;
  color: var(--text-subtle);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.job-link-divider::before,
.job-link-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--border);
}

/* ── Mobile ── */
@media (max-width: 600px) {
  .job-link-row { flex-direction: column; }
  .btn-fetch-link { padding: 11px 18px; }
  .header-icon-btn span { display: none; }
  .header-icon-btn { padding: 7px; }
  .side-panel { width: 100vw; }
  .outreach-card-header { flex-direction: column; align-items: flex-start; gap: 10px; }
}

/* ── Career OS polish overrides ── */
.btn-primary {
  background: var(--primary);
  box-shadow: 0 6px 14px rgba(15,118,110,.18);
  border-radius: 10px;
}
.btn-primary:hover:not(:disabled) {
  background: var(--primary-hover);
  box-shadow: 0 9px 20px rgba(15,118,110,.24);
}
.btn-gradient,
.btn-shine {
  background: var(--text);
  box-shadow: 0 7px 18px rgba(21,48,45,.2);
}
.btn-gradient:hover:not(:disabled),
.btn-shine:hover:not(:disabled) {
  background: #244b46;
  box-shadow: 0 10px 24px rgba(21,48,45,.25);
}
.btn-secondary { color: var(--primary); border-color: var(--primary-mid); }
.btn-secondary:hover { background: var(--primary-light); border-color: var(--primary); }
.panel-header-icon {
  border-radius: 14px;
}
.panel-icon--explore  { background: #e8f1f4; color: #276678; border-color: #b8d2da; }
.panel-icon--match    { background: #e8f4ef; color: #347b67; border-color: #b9dfd2; }
.panel-icon--optimize { background: var(--primary-light); color: var(--primary); border-color: var(--primary-mid); }
.jobs-input, .jobs-select, textarea, .modal-input {
  min-height: 44px;
  border-radius: 10px;
  background: #fffefa;
}
.jobs-input:focus, .jobs-select:focus, textarea:focus, .modal-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(15,118,110,.11);
}
.upload-zone { background: #f1f6f4; border-color: #b8cbc5; }
.upload-zone:hover, .upload-zone.drag-over { background: var(--primary-light); border-color: var(--primary); }
.result-card, .match-panel, .panel-form-card, .card { border-color: #d2e0dc; }
.result-card-header { background: #f2f6f4; }
.results-done-badge { background: var(--primary-light); color: #17655d; border-color: var(--primary-mid); }
.results-done-badge::before { content: "✓"; }
.sc-bar--after { background: var(--primary); }
.sc-label--after, .sc-num--after { color: var(--primary); }
.btn-pdf { background: #eaf1f2; border-color: #bed1d3; color: #276678; }
.btn-pdf:hover:not(:disabled) { background: #dcebed; border-color: #94b7bc; }
.loaded-job-banner { background: #e7f4f0; border-color: #b9dfd2; }

@media (max-width: 860px) {
  main { padding-top: 48px; }
  .hero-heading { font-size: clamp(32px, 7vw, 48px); }
}
@media (max-width: 720px) {
  main { padding: 36px 16px 72px; }
  .workflow-selector { grid-template-columns: 1fr; gap: 10px; }
  .ws-card { padding: 18px; display: grid; grid-template-columns: auto 1fr; column-gap: 14px; }
  .ws-number { grid-column: 1 / -1; }
  .ws-icon-wrap { grid-row: span 2; }
  .ws-desc, .ws-badge { grid-column: 2; }
  .panel-form-card, .card, .match-panel { padding: 20px; }
  .match-panel-top { align-items: flex-start; gap: 20px; }
  .results-grid { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
  header { padding: 0 14px; }
  .logo-tagline { display: none; }
  .header-inner { height: 56px; }
  .header-actions { gap: 4px; }
  .hero { margin-bottom: 32px; }
  .hero-heading { font-size: 34px; }
  .hero-sub { font-size: 14px; }
  .jobs-inputs, .input-grid, .kw-row, .sg-row { grid-template-columns: 1fr; }
  .panel-header { gap: 11px; }
  .panel-title { font-size: 19px; }
  .panel-sub { font-size: 13px; }
  .match-panel-top { flex-direction: column; align-items: center; text-align: center; }
  .match-right { width: 100%; }
  .keyword-rate { margin-left: auto; margin-right: auto; }
  .result-card-header { align-items: flex-start; flex-direction: column; }
  .result-actions { flex-wrap: wrap; }
  .btn-large { width: 100%; }
}

/* ── Executive green / gold refinement ── */
:root {
  --primary: #0F3B2E;
  --primary-hover: #1F5A46;
  --primary-light: #E9E6D9;
  --primary-mid: #B8B09A;
  --primary-dim: #1F5A46;
  --bg: #F8F6F1;
  --surface: #FFFDF8;
  --surface-2: #F3F1EA;
  --surface-3: #EAE6DA;
  --border: #D8D2C4;
  --border-2: #BDB5A5;
  --text: #151515;
  --text-secondary: #303733;
  --text-muted: #5E645F;
  --text-subtle: #858981;
  --high: #1F5A46;
  --high-bg: #E5EEE8;
  --high-border: #AFC9B9;
  --medium: #9A7836;
  --medium-bg: #F4EDDC;
  --medium-border: #D8BF8A;
  --low: #8C4538;
  --low-bg: #F5E6E0;
  --low-border: #D7AAA0;
  --shadow-sm: 0 1px 2px rgba(21,21,21,.06);
  --shadow: 0 5px 18px rgba(21,21,21,.07), 0 1px 3px rgba(21,21,21,.05);
  --shadow-md: 0 14px 32px rgba(21,21,21,.11), 0 2px 7px rgba(21,21,21,.06);
  --shadow-lg: 0 22px 52px rgba(21,21,21,.14), 0 3px 10px rgba(21,21,21,.06);
}
body {
  background-color: var(--bg);
  background-image: radial-gradient(circle at 50% -10%, rgba(200,169,107,.10), transparent 34%);
}
header {
  background: rgba(248,246,241,.94);
  border-bottom-color: var(--border);
}
.logo-mark {
  background: var(--primary);
  color: var(--soft-gold, #D8BF8A);
  border: 1px solid rgba(216,191,138,.45);
}
.logo-name { font-family: "Space Grotesk", sans-serif; letter-spacing: -.035em; }
.hero-kicker { color: #9A7836; letter-spacing: .2em; }
.hero-heading { color: var(--text); }
.hero-sub { color: var(--text-muted); }
.ws-card {
  background: rgba(255,253,248,.88);
  border-color: var(--border);
}
.ws-card:hover { border-color: #B9A875; box-shadow: var(--shadow-md); }
.ws-card--active {
  border-color: var(--primary);
  border-left-color: var(--primary);
  background: linear-gradient(145deg, #F3F1EA, #FFFDF8);
  box-shadow: 0 14px 34px rgba(15,59,46,.14);
}
.ws-card--active::after {
  content: "";
  position: absolute;
  top: 0; right: 0;
  width: 64px; height: 3px;
  background: #C8A96B;
}
.ws-icon--explore, .ws-icon--match, .ws-icon--optimize {
  background: #F3F1EA;
  color: var(--primary);
  border: 1px solid #D8D2C4;
}
.ws-card--active .ws-icon-wrap { border-color: #C8A96B; box-shadow: inset 0 0 0 1px rgba(200,169,107,.22); }
.ws-badge--neutral, .ws-badge--ai, .ws-badge--premium {
  background: #F4EDDC;
  color: #80652D;
  border-color: #D8BF8A;
}
.panel-icon--explore, .panel-icon--match, .panel-icon--optimize {
  background: #F3F1EA;
  color: var(--primary);
  border-color: #D8D2C4;
}
.panel-header { border-bottom-color: var(--border); }
.form-section-label, .kw-block-title, .sg-title {
  color: #80652D;
  letter-spacing: .12em;
}
.panel-form-card, .card, .match-panel, .result-card {
  background: var(--surface);
  border-color: var(--border);
}
.jobs-input, .jobs-select, textarea, .modal-input {
  color: var(--text);
  background: #FFFDF8;
  border-color: var(--border);
}
.jobs-input:focus, .jobs-select:focus, textarea:focus, .modal-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(200,169,107,.25);
}
.upload-zone { background: var(--surface-2); border-color: #BDB5A5; }
.upload-zone:hover, .upload-zone.drag-over { background: #F4EDDC; border-color: #C8A96B; }
.upload-primary strong { color: var(--primary); }
.btn-primary {
  background: var(--primary);
  color: #FFFDF8;
  border: 1px solid var(--primary);
  box-shadow: 0 6px 15px rgba(15,59,46,.2);
}
.btn-primary:hover:not(:disabled) { background: var(--primary-hover); box-shadow: 0 10px 22px rgba(15,59,46,.25); }
.btn-gradient, .btn-shine {
  background: var(--primary);
  border: 1px solid var(--primary);
  box-shadow: 0 7px 18px rgba(15,59,46,.22);
}
.btn-gradient:hover:not(:disabled), .btn-shine:hover:not(:disabled) { background: var(--primary-hover); }
.btn-secondary {
  background: var(--surface);
  color: var(--text);
  border-color: #B9A875;
}
.btn-secondary:hover { background: #F4EDDC; border-color: #C8A96B; color: var(--primary); }
.btn-fetch-link, .btn-save-edit {
  background: var(--primary);
  border-color: var(--primary);
}
.btn-action { border-radius: 8px; }
.btn-pdf, .btn-download {
  background: #F4EDDC;
  border-color: #D8BF8A;
  color: #80652D;
}
.btn-pdf:hover:not(:disabled), .btn-download:hover:not(:disabled) { background: #EDE1C4; border-color: #C8A96B; }
.match-panel { box-shadow: var(--shadow-lg); }
.dial-bg { stroke: #E5E1D6; }
.dial-high { stroke: var(--primary); }
.tag-matched { background: var(--high-bg); color: var(--primary); border-color: var(--high-border); }
.tag-missing { background: var(--medium-bg); color: #80652D; border-color: var(--medium-border); }
.sg-list li { background: var(--surface-2); border-left-color: #C8A96B; }
.result-card-header { background: var(--surface-2); border-bottom-color: var(--border); }
.results-done-badge { background: var(--high-bg); color: var(--primary); border-color: var(--high-border); }
.sc-bar--before { background: #B59A5A; }
.sc-bar--after { background: var(--primary); }
.sc-label--after, .sc-num--after { color: var(--primary); }
.loaded-job-banner { background: #E9E6D9; border-color: #C8A96B; }
.outreach-section-title, .diff-title, .results-heading { color: var(--text); }

/* ── Luxury command center layout ── */
body { padding-left: 250px; }
header {
  position: sticky;
  top: 0;
  z-index: 100;
}
.career-sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: 250px;
  padding: 28px 18px 22px;
  display: flex;
  flex-direction: column;
  background: #0F3B2E;
  color: #F8F6F1;
  z-index: 120;
  box-shadow: 8px 0 30px rgba(15,59,46,.10);
}
.sidebar-brand { display: flex; align-items: center; gap: 11px; padding: 0 10px 38px; }
.sidebar-brand .logo-mark { width: 34px; height: 34px; flex: 0 0 34px; background: #151515; }
.sidebar-brand strong { display: block; font: 700 17px "Space Grotesk", sans-serif; letter-spacing: -.03em; }
.sidebar-brand span { display: block; margin-top: 3px; color: #D8BF8A; font-size: 8px; letter-spacing: .13em; }
.sidebar-nav { display: flex; flex-direction: column; gap: 5px; }
.sidebar-link {
  border: 1px solid transparent;
  background: transparent;
  color: rgba(248,246,241,.68);
  display: flex; align-items: center; gap: 12px;
  width: 100%; padding: 11px 12px;
  border-radius: 9px; text-align: left;
  font: 500 12px "DM Sans", sans-serif;
  cursor: pointer; transition: background .18s, color .18s, border-color .18s;
}
.sidebar-link:hover, .sidebar-link.is-active {
  color: #FFFDF8; background: rgba(216,191,138,.12); border-color: rgba(216,191,138,.2);
}
.sidebar-link.is-active { box-shadow: inset 3px 0 #C8A96B; }
.nav-glyph { width: 17px; text-align: center; color: #D8BF8A; font-size: 16px; line-height: 1; }
.sidebar-user {
  margin-top: auto; display: flex; gap: 10px; align-items: center;
  border-top: 1px solid rgba(216,191,138,.2); padding: 18px 8px 0;
}
.sidebar-user-mark { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: #D8BF8A; color: #0F3B2E; font-size: 10px; font-weight: 700; }
.sidebar-user-label { display: block; color: rgba(248,246,241,.5); font-size: 10px; }
.sidebar-user strong { display: block; color: #FFFDF8; font-size: 12px; margin-top: 2px; }
main { max-width: 1280px; padding: 72px 52px 110px; }
.hero { display: flex; text-align: left; align-items: center; justify-content: space-between; gap: 40px; max-width: none; margin-bottom: 56px; min-height: 330px; }
.hero-copy { max-width: 670px; position: relative; z-index: 2; }
.hero-heading { font-size: clamp(42px, 5vw, 70px); line-height: 1.03; max-width: 720px; }
.hero-heading span { color: #9A7836; }
.hero-sub { margin: 22px 0 0; max-width: 590px; font-size: 16px; }
.hero-trust { display: flex; flex-wrap: wrap; gap: 8px 20px; margin-top: 28px; color: #0F3B2E; font-size: 11px; font-weight: 600; }
.hero-trust span { display: inline-flex; align-items: center; gap: 6px; }
.hero-trust i { color: #9A7836; font-style: normal; font-size: 15px; }
.hero-visual { width: 310px; height: 310px; position: relative; flex: 0 0 310px; border-radius: 50%; background: radial-gradient(circle, rgba(216,191,138,.22), transparent 64%); }
.orbit { position: absolute; border: 1px solid rgba(15,59,46,.22); border-radius: 50%; transform: rotate(-24deg); }
.orbit-one { inset: 20px 0; border-left-color: #C8A96B; border-right-color: #C8A96B; }
.orbit-two { inset: 47px 27px; transform: rotate(56deg); border-top-color: #C8A96B; border-bottom-color: #C8A96B; }
.compass-core { position: absolute; inset: 88px; border-radius: 50%; background: #0F3B2E; color: #D8BF8A; display: grid; place-items: center; text-align: center; box-shadow: 0 12px 34px rgba(15,59,46,.26); }
.compass-core span { font: 700 25px "Space Grotesk"; }
.compass-core b { font-size: 7px; letter-spacing: .19em; line-height: 1.5; }
.gold-route { position: absolute; height: 1px; background: #C8A96B; transform-origin: left; }
.route-one { width: 95px; top: 82px; right: 8px; transform: rotate(33deg); }
.route-two { width: 80px; bottom: 68px; left: 15px; transform: rotate(-26deg); }
.visual-label { position: absolute; font-size: 8px; letter-spacing: .18em; color: #80652D; }
.visual-label--top { top: 38px; right: 8px; }.visual-label--bottom { bottom: 38px; left: 9px; }
.workflow-selector { gap: 20px; margin-bottom: 62px; }
.ws-card { min-height: 250px; padding: 26px; border-radius: 16px; }
.ws-card::before { content: ""; position: absolute; inset: 0 0 auto; height: 3px; background: #C8A96B; }
.ws-title { font-family: "Space Grotesk"; font-size: 16px; margin-top: 6px; }
.ws-desc { font-size: 13px; line-height: 1.6; }
.ws-cta { margin-top: auto; border: 0; padding: 0; background: transparent; color: #0F3B2E; font: 700 12px "DM Sans"; text-align: left; cursor: pointer; }
.ws-cta b { color: #9A7836; font-size: 16px; margin-left: 4px; }
.ws-ribbon { position: absolute; top: 15px; right: -28px; transform: rotate(35deg); background: #C8A96B; color: #151515; padding: 4px 28px; font-size: 8px; font-weight: 700; letter-spacing: .12em; }
.panel-header { padding-bottom: 23px; }
.panel-title { font-family: "Space Grotesk"; font-size: 25px; }
.panel-form-card { border-radius: 16px; }
.workflow-panel#panel-optimize .panel-header { background: #0F3B2E; color: #F8F6F1; margin: -18px -52px 28px; padding: 21px 52px; border-bottom: 3px solid #C8A96B; }
.workflow-panel#panel-optimize .panel-title, .workflow-panel#panel-optimize .panel-sub { color: #F8F6F1; }
.result-content { padding: 28px; background: #FFFDF8; }
.result-content pre { font-family: "DM Sans"; font-size: 13px; line-height: 1.9; }
.result-card-title { font-family: "Space Grotesk"; color: #0F3B2E; }

@media (max-width: 900px) {
  body { padding-left: 76px; }
  .career-sidebar { width: 76px; padding: 22px 10px; }
  .sidebar-brand { justify-content: center; padding: 0 0 32px; }
  .sidebar-brand > div:last-child, .sidebar-link:not(.is-active)::after, .sidebar-user > div:last-child { display: none; }
  .sidebar-link { justify-content: center; padding: 12px 8px; }
  .nav-glyph { font-size: 18px; }
  .sidebar-user { justify-content: center; padding-left: 0; padding-right: 0; }
  main { padding: 52px 30px 90px; }
  .hero { min-height: 280px; }
  .hero-visual { width: 240px; height: 240px; flex-basis: 240px; }
  .compass-core { inset: 68px; }
  .workflow-panel#panel-optimize .panel-header { margin-left: -30px; margin-right: -30px; padding-left: 30px; padding-right: 30px; }
}
@media (max-width: 640px) {
  body { padding-left: 0; }
  .career-sidebar { position: static; width: 100%; height: auto; padding: 13px 16px; flex-direction: row; align-items: center; }
  .sidebar-brand { padding: 0; }.sidebar-brand .logo-mark { width: 30px; height: 30px; }
  .sidebar-nav { margin-left: auto; flex-direction: row; gap: 3px; }
  .sidebar-link { width: 36px; height: 36px; padding: 0; }.sidebar-link:not(.is-active) { display: none; }
  .sidebar-user { display: none; }
  header { top: 56px; }
  main { padding: 38px 16px 72px; }
  .hero { display: block; min-height: 0; margin-bottom: 38px; }
  .hero-heading { font-size: 39px; }
  .hero-visual { width: 210px; height: 210px; margin: 34px auto 0; }
  .compass-core { inset: 60px; }
  .hero-trust { gap: 9px; }
  .hero-trust span { width: 100%; }
  .workflow-selector { margin-bottom: 40px; }
  .ws-card { min-height: 220px; }
  .workflow-panel#panel-optimize .panel-header { margin-left: -16px; margin-right: -16px; padding-left: 16px; padding-right: 16px; }
}

/* Verification hardening: keep the premium shell visible in the desktop preview. */
@media (min-width: 1200px) {
  body { padding-left: 250px !important; }
  .career-sidebar {
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
    position: fixed !important;
    left: 0 !important;
    top: 0 !important;
    bottom: 0 !important;
    width: 250px !important;
    background: #0F3B2E !important;
    z-index: 110 !important;
  }
  .career-sidebar .sidebar-brand,
  .career-sidebar .sidebar-nav,
  .career-sidebar .sidebar-user { display: flex !important; visibility: visible !important; }
  .career-sidebar .sidebar-nav { flex-direction: column !important; }
  .career-sidebar .sidebar-link {
    display: flex !important;
    visibility: visible !important;
    color: rgba(248,246,241,.72) !important;
  }
  .career-sidebar .sidebar-brand > div:last-child,
  .career-sidebar .sidebar-user > div:last-child { display: block !important; }
}

/* Overlays and dialogs must always sit above the persistent navigation rail. */
.modal-overlay { z-index: 1000 !important; }
.side-panel-overlay { z-index: 300 !important; }
.side-panel { z-index: 400 !important; }

.hero {
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  text-align: left !important;
}
.hero-copy {
  display: block !important;
  width: auto !important;
  max-width: 670px !important;
}
.hero-kicker {
  display: block !important;
  writing-mode: horizontal-tb !important;
  width: auto !important;
  margin: 0 0 16px !important;
}
.hero-heading {
  display: block !important;
  width: auto !important;
  margin: 0 !important;
}
.hero-sub {
  display: block !important;
  width: auto !important;
  margin: 22px 0 0 !important;
}
.hero-trust {
  display: flex !important;
  visibility: visible !important;
  width: auto !important;
  margin-top: 28px !important;
}
.hero-visual {
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
  flex: 0 0 310px !important;
  width: 310px !important;
  height: 310px !important;
}
.workflow-selector {
  display: grid !important;
  visibility: visible !important;
}
.ws-card {
  display: flex !important;
  visibility: visible !important;
}
.ws-cta {
  display: inline-flex !important;
  visibility: visible !important;
  position: relative !important;
  z-index: 3 !important;
}
.ws-ribbon {
  display: block !important;
  visibility: visible !important;
  z-index: 4 !important;
}
@media (max-width: 640px) {
  .hero { display: block !important; }
  .hero-visual { width: 210px !important; height: 210px !important; flex-basis: auto !important; }
}

/* Mobile shell: an intentional, scrollable command strip rather than a clipped sidebar. */
@media (max-width: 640px) {
  body { padding-left: 0 !important; overflow-x: hidden; }
  .career-sidebar {
    display: flex !important;
    position: relative !important;
    inset: auto !important;
    width: 100% !important;
    height: 66px !important;
    min-height: 66px !important;
    padding: 10px 14px !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: 14px !important;
    overflow: hidden !important;
    box-shadow: 0 4px 16px rgba(15,59,46,.15);
  }
  .sidebar-brand {
    display: flex !important;
    flex: 0 0 auto !important;
    width: auto !important;
    padding: 0 !important;
    justify-content: flex-start !important;
  }
  .sidebar-brand > div:last-child { display: block !important; }
  .sidebar-brand strong { font-size: 14px; }
  .sidebar-brand span { font-size: 7px; }
  .sidebar-brand .logo-mark { width: 32px !important; height: 32px !important; }
  .sidebar-nav {
    display: flex !important;
    flex: 1 1 auto !important;
    min-width: 0 !important;
    margin: 0 !important;
    padding: 2px 0 !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 7px !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    scrollbar-width: none;
  }
  .sidebar-nav::-webkit-scrollbar { display: none; }
  .sidebar-link,
  .sidebar-link:not(.is-active) {
    display: inline-flex !important;
    flex: 0 0 auto !important;
    width: auto !important;
    height: 34px !important;
    min-height: 34px !important;
    padding: 0 12px !important;
    justify-content: center !important;
    gap: 6px !important;
    white-space: nowrap !important;
    border-radius: 999px !important;
    font-size: 11px !important;
  }
  .sidebar-link .nav-glyph { display: inline-block !important; width: auto !important; font-size: 14px !important; }
  .sidebar-user { display: none !important; }
  header { top: auto !important; }

  /* Restore the intended vertical reading order inside each workflow module. */
  .workflow-selector {
    display: flex !important;
    flex-direction: column !important;
    gap: 14px !important;
  }
  .ws-card {
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 10px !important;
    width: 100% !important;
    min-height: 0 !important;
    padding: 22px !important;
  }
  .ws-number {
    position: static !important;
    order: 0 !important;
    width: 100% !important;
  }
  .ws-icon-wrap {
    order: 1 !important;
    width: 44px !important;
    height: 44px !important;
  }
  .ws-title {
    order: 2 !important;
    width: 100% !important;
    margin-top: 2px !important;
  }
  .ws-desc {
    order: 3 !important;
    width: 100% !important;
    flex: none !important;
    font-size: 13px !important;
    line-height: 1.55 !important;
  }
  .ws-badge {
    order: 4 !important;
    display: inline-flex !important;
    margin-top: 2px !important;
  }
  .ws-cta {
    order: 5 !important;
    width: 100% !important;
    min-height: 40px !important;
    padding: 9px 12px !important;
    border: 1px solid #B9A875 !important;
    border-radius: 9px !important;
    justify-content: space-between !important;
    background: #F4EDDC !important;
    font-size: 12px !important;
  }
  .ws-ribbon { top: 16px !important; right: -29px !important; }
}
