    *, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

    body {
      font-family: 'Inter', system-ui, sans-serif;
      background: #fff;
      color: #111;
      min-height: 100vh;
      padding: 0;
    }

    .main-wrap { max-width: 1300px; margin: 0 auto; padding: 0 40px; }

    /* ── Page hero ── */
    .page-hero {
      background: linear-gradient(135deg, #443d69 0%, #3d3060 100%);
      padding: 52px 0 48px;
      margin-bottom: 40px;
    }
    .hero-inner { max-width: 1300px; margin: 0 auto; padding: 0 40px; }
    .page-title {
      font-family: 'Poppins', sans-serif;
      font-size: 2.2rem;
      font-weight: 800;
      color: #fff;
      line-height: 1.1;
    }
    .page-subtitle {
      font-size: 0.85rem;
      color: rgba(255,255,255,0.55);
      margin-top: 10px;
      line-height: 1.6;
    }
    .internal-badge {
      font-size: 0.62rem;
      font-weight: 700;
      letter-spacing: 1.5px;
      text-transform: uppercase;
      background: #1bc5ec;
      color: #fff;
      border: 1px solid #1bc5ec;
      padding: 5px 12px;
      border-radius: 20px;
      white-space: nowrap;
    }
    .focus-btn {
      font-family: 'Inter', system-ui, sans-serif;
      font-size: 0.75rem; font-weight: 600;
      color: #443d69; background: #f5f3ff;
      border: 1.5px solid #c4b5f4; border-radius: 6px;
      padding: 8px 16px; cursor: pointer;
      white-space: nowrap;
      transition: background 0.15s, border-color 0.15s;
    }
    .focus-btn:hover { background: #ede9fe; border-color: #a78bfa; }

    /* ── Focus card ── */
    .focus-card {
      border: 1px solid #e5e7eb;
      border-left: 4px solid #443d69;
      border-radius: 8px;
      padding: 20px 24px;
      margin-bottom: 36px;
      background: #fafafe;
      display: flex;
      align-items: flex-start;
      justify-content: space-between;
      gap: 24px;
    }
    .fc-body { flex: 1; min-width: 0; }
    .fc-eyebrow {
      font-size: 0.58rem; font-weight: 700; letter-spacing: 2px; text-transform: uppercase;
      color: #7c6fa0; margin-bottom: 6px;
    }
    .fc-title {
      font-family: 'Poppins', sans-serif; font-size: 1rem; font-weight: 800;
      color: #443d69; margin-bottom: 8px;
    }
    .fc-role {
      font-size: 0.8rem; color: #666; line-height: 1.65; margin-bottom: 10px;
    }
    .fc-reqs { display: flex; flex-direction: column; gap: 4px; }
    .fc-req { font-size: 0.78rem; color: #888; padding-left: 14px; position: relative; }
    .fc-req::before { content: '—'; position: absolute; left: 0; color: #ccc; }
    .fc-actions { display: flex; flex-direction: row; gap: 8px; align-items: flex-start; flex-shrink: 0; padding-top: 2px; }
    .fc-btn {
      font-family: 'Inter', system-ui, sans-serif; font-size: 0.73rem; font-weight: 600;
      color: #443d69; background: transparent; border: 1.5px solid #c4b5f4;
      border-radius: 6px; padding: 6px 14px; cursor: pointer;
      white-space: nowrap; text-decoration: none; display: inline-block;
      transition: background 0.15s, border-color 0.15s;
    }
    .fc-btn:hover { background: #ede9fe; border-color: #a78bfa; }
    .fc-empty { font-size: 0.82rem; color: #bbb; }
    .fc-empty a { color: #443d69; }

    /* ── Focus history modal ── */
    .fh-overlay {
      display: none; position: fixed; inset: 0;
      background: rgba(0,0,0,0.4); z-index: 1000;
      align-items: flex-start; justify-content: center;
      padding: 40px 20px; overflow-y: auto;
    }
    .fh-overlay.open { display: flex; }
    .fh-modal {
      background: #fff; border-radius: 12px;
      width: 100%; max-width: 700px;
      box-shadow: 0 16px 48px rgba(0,0,0,0.18);
    }
    .fh-header {
      padding: 22px 28px 18px;
      border-bottom: 1px solid #f0f0f0;
      display: flex; align-items: center; justify-content: space-between;
    }
    .fh-title { font-family: 'Poppins', sans-serif; font-size: 1rem; font-weight: 800; color: #443d69; }
    .fh-close { background: none; border: none; cursor: pointer; font-size: 1.2rem; color: #aaa; padding: 4px; }
    .fh-close:hover { color: #111; }
    .fh-body { padding: 0; }
    .fh-entry {
      border-bottom: 1px solid #f3f4f6;
      padding: 20px 28px;
    }
    .fh-entry:last-child { border-bottom: none; }
    .fh-entry-head {
      display: flex; align-items: center; justify-content: space-between;
      gap: 12px; margin-bottom: 12px; flex-wrap: wrap;
    }
    .fh-date { font-size: 0.72rem; font-weight: 700; color: #aaa; }
    .fh-current-badge {
      font-size: 0.6rem; font-weight: 700; letter-spacing: 1px;
      text-transform: uppercase; padding: 2px 9px; border-radius: 20px;
      background: #d1fae5; color: #065f46;
    }
    .fh-restore-btn {
      font-family: 'Inter', system-ui, sans-serif;
      font-size: 0.7rem; font-weight: 600;
      padding: 5px 12px; border-radius: 6px;
      border: 1.5px solid #e5e7eb; background: #fff; color: #443d69;
      cursor: pointer; transition: all 0.15s;
    }
    .fh-restore-btn:hover { border-color: #443d69; background: #f5f3ff; }
    .fh-track { font-size: 0.65rem; font-weight: 700; letter-spacing: 2px; text-transform: uppercase; color: #443d69; margin-bottom: 4px; }
    .fh-stmt-title { font-family: 'Poppins', sans-serif; font-size: 0.95rem; font-weight: 800; color: #443d69; margin-bottom: 10px; }
    .fh-role { font-size: 0.82rem; color: #444; line-height: 1.7; margin-bottom: 10px; }
    .fh-rates { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 10px; }
    .fh-rate-pill {
      font-size: 0.72rem; font-weight: 600; color: #111;
      background: #f3f4f6; border-radius: 4px; padding: 3px 10px;
    }
    .fh-reqs { display: flex; flex-direction: column; gap: 4px; }
    .fh-req { font-size: 0.78rem; color: #666; padding-left: 14px; position: relative; }
    .fh-req::before { content: '—'; position: absolute; left: 0; color: #ccc; }
    .fh-empty { padding: 40px 28px; text-align: center; font-size: 0.88rem; color: #ccc; }

    /* ── Track filter ── */
    .filter-bar {
      display: flex;
      gap: 8px;
      margin-bottom: 28px;
    }
    .filter-btn {
      padding: 7px 18px;
      border-radius: 100px;
      border: 1.5px solid #e5e7eb;
      background: #fff;
      font-family: 'Inter', system-ui, sans-serif;
      font-size: 0.8rem;
      font-weight: 600;
      color: #888;
      cursor: pointer;
      transition: all 0.15s;
    }
    .filter-btn:hover { border-color: #443d69; color: #443d69; }
    .filter-btn.active { background: #443d69; border-color: #443d69; color: #fff; }

    /* ── Section title ── */
    .section-heading {
      font-family: 'Poppins', sans-serif;
      font-size: 1.1rem;
      font-weight: 700;
      color: #443d69;
      margin-bottom: 4px;
      display: flex;
      align-items: center;
      justify-content: space-between;
      cursor: pointer;
      user-select: none;
    }
    .section-heading:hover { color: #443d69; }
    .section-chevron {
      font-size: 1.2rem; color: #bbb; transition: transform 0.2s; flex-shrink: 0;
    }
    .section-heading.collapsed .section-chevron { transform: rotate(-90deg); }
    .section-collapsible { overflow: hidden; }
    .section-collapsible.collapsed { display: none; }
    .section-sub {
      font-size: 0.8rem;
      color: #aaa;
      margin-bottom: 20px;
    }

/* ── Keyword table ── */
    .table-wrap {
      background: #fff;
      border: 1px solid #e5e7eb;
      border-radius: .5rem;
      overflow: hidden;
      margin-bottom: 48px;
    }
    table { width: 100%; border-collapse: collapse; }
    thead { background: #fafafa; }
    th {
      text-align: left;
      padding: 12px 16px;
      font-size: 0.6rem;
      font-weight: 700;
      letter-spacing: 1.5px;
      text-transform: uppercase;
      color: #888;
      border-bottom: 1px solid #e5e7eb;
    }
    td {
      padding: 13px 16px;
      font-size: 0.84rem;
      color: #444;
      border-bottom: 1px solid #f3f4f6;
      vertical-align: top;
    }
    tr:last-child td { border-bottom: none; }
    tr:hover td { background: #fafafe; }
    tr.hidden-row { display: none; }

    .td-term { font-weight: 600; color: #443d69; }
    .td-notes { color: #999; font-size: 0.78rem; }
    .td-source { color: #888; font-size: 0.78rem; }
    .td-date { color: #bbb; font-size: 0.75rem; white-space: nowrap; }

    .track-badge {
      display: inline-block;
      font-size: 0.62rem;
      font-weight: 700;
      letter-spacing: 1px;
      text-transform: uppercase;
      padding: 2px 9px;
      border-radius: 20px;
      white-space: nowrap;
    }
    .track-badge.technology { background: #eee9f8; color: #443d69; }
    .track-badge.design     { background: #fce7f3; color: #9d174d; }
    .track-badge.health     { background: #d1fae5; color: #065f46; }

    .status-badge {
      display: inline-flex;
      align-items: center;
      gap: 5px;
      font-size: 0.72rem;
      font-weight: 600;
      padding: 3px 10px;
      border-radius: 20px;
      white-space: nowrap;
    }
    .status-badge.in-resume   { background: #d1fae5; color: #065f46; }
    .status-badge.not-in-resume{ background: #fef3c7; color: #92600a; }
    .status-dot { width: 5px; height: 5px; border-radius: 50%; background: currentColor; }

    /* ── Job Scanner ── */
    .scanner-bar {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 16px;
      background: #fff;
      border: 1px solid #e5e7eb;
      border-left: 4px solid #443d69;
      border-radius: 8px;
      padding: 16px 24px;
      margin-bottom: 24px;
      flex-wrap: wrap;
    }
    .scanner-meta { font-size: 0.8rem; color: #999; }
    .scanner-meta strong { color: #443d69; font-weight: 600; }
    .scanner-actions { display: flex; gap: 10px; align-items: center; }
    .scan-btn {
      font-family: 'Inter', system-ui, sans-serif;
      font-size: 0.78rem;
      font-weight: 700;
      padding: 8px 18px;
      border-radius: 6px;
      border: none;
      background: #443d69;
      color: #fff;
      cursor: pointer;
      transition: opacity 0.15s;
    }
    .scan-btn:hover { opacity: 0.85; }
    .scan-btn:disabled { opacity: 0.5; cursor: default; }
    .scan-btn.secondary { background: #fff; color: #443d69; border: 1.5px solid #d1d5db; font-size: 0.72rem; }
    .scan-btn.secondary:hover { border-color: #443d69; opacity: 1; }
    .scan-status.is-active { color: #16a34a; font-weight: 700; animation: scan-text-blink 1.1s ease-in-out infinite; }
    @keyframes scan-text-blink {
      0%, 100% { opacity: 1;   color: #16a34a; }
      50%      { opacity: 0.35; color: #22c55e; }
    }
    .sf-toggle { display: flex; align-items: center; gap: 8px; font-size: 0.8rem; font-weight: 500; color: #443d69; cursor: pointer; white-space: nowrap; padding: 7px 12px; border: 1.5px solid #e5e7eb; border-radius: 8px; background: #fff; transition: border-color 0.15s; }
    .sf-toggle:hover { border-color: #443d69; }
    .sf-toggle input { accent-color: #443d69; cursor: pointer; margin: 0; }
    .scan-card.is-expired { opacity: 0.45; }
    .scan-badge.expired { background: #fee2e2; color: #b91c1c; border-color: #fca5a5; }
    .scan-status { font-size: 0.75rem; color: #aaa; }
    .jm-heart {
      background: none; border: none; cursor: pointer; font-size: 1.3rem;
      line-height: 1; padding: 2px 4px 2px 20px; color: #d1d5db; transition: color 0.15s, transform 0.12s;
      flex-shrink: 0;
    }
    .jm-heart:hover { color: #f43f5e; transform: scale(1.15); }
    .jm-heart.active { color: #f43f5e; }
    .sf-fav-btn {
      display: flex; align-items: center; gap: 6px;
      font-size: 0.8rem; font-weight: 600; color: #888;
      padding: 7px 14px; border: 1.5px solid #e5e7eb; border-radius: 8px;
      background: #fff; cursor: pointer; white-space: nowrap; transition: all 0.15s;
      font-family: 'Inter', system-ui, sans-serif;
    }
    .sf-fav-btn:hover { border-color: #f43f5e; color: #f43f5e; }
    .sf-fav-btn.active { border-color: #f43f5e; color: #f43f5e; background: #fff1f2; }
    .scan-list-row.is-favorited .scan-list-title::before {
      content: '♥'; color: #f43f5e; font-size: 0.7rem;
      display: inline-block; margin-right: 8px;
    }

    /* ── Paywall wall ── */
    .paywall-wrap {
      position: relative;
      margin-bottom: 40px;
    }
    .paywall-ghost-list {
      display: flex; flex-direction: column;
      border: 1.5px solid #e5e7eb; border-radius: 10px; overflow: hidden;
      filter: blur(3px); opacity: 0.35; pointer-events: none; user-select: none;
    }
    .paywall-ghost-row {
      display: grid;
      grid-template-columns: minmax(0,2fr) minmax(0,1fr) 110px 90px 88px;
      gap: 0 12px; padding: 12px 16px;
      border-bottom: 1px solid #f0f0f0;
    }
    .paywall-ghost-row:last-child { border-bottom: none; }
    .ghost-line { background: #e5e7eb; border-radius: 4px; height: 11px; align-self: center; }
    .paywall-overlay {
      position: absolute;
      inset: 0;
      display: flex;
      align-items: center;
      justify-content: center;
      background: linear-gradient(to bottom, rgba(250,250,250,0) 0%, rgba(250,250,250,0.85) 30%, rgba(250,250,250,1) 60%);
    }
    .paywall-box {
      background: #fff;
      border: 1.5px solid #d1c9e8;
      border-radius: 14px;
      padding: 32px 36px;
      text-align: center;
      max-width: 420px;
      width: 100%;
      box-shadow: 0 8px 32px rgba(45,36,72,0.1);
      margin-top: 60px;
    }
    .paywall-box h3 {
      font-family: 'Poppins', sans-serif;
      font-size: 1.05rem;
      font-weight: 800;
      color: #443d69;
      margin-bottom: 8px;
    }
    .paywall-box p {
      font-size: 0.82rem;
      color: #666;
      line-height: 1.6;
      margin-bottom: 20px;
    }
    .paywall-box a {
      display: inline-block;
      font-family: 'Inter', system-ui, sans-serif;
      font-size: 0.88rem;
      font-weight: 700;
      color: #fff;
      background: #443d69;
      border-radius: 8px;
      padding: 12px 24px;
      text-decoration: none;
      transition: opacity 0.15s;
    }
    .paywall-box a:hover { opacity: 0.85; }
    .scan-badge {
      font-size: 0.6rem;
      font-weight: 700;
      letter-spacing: 1px;
      text-transform: uppercase;
      padding: 2px 8px;
      border-radius: 20px;
    }
    .scan-badge.remote      { background: #dbeafe; color: #1e40af; }
    .scan-badge.hybrid      { background: #fef3c7; color: #92600a; }
    .scan-badge.onsite      { background: #f3f4f6; color: #555; }
    .scan-badge.health      { background: #d1fae5; color: #065f46; }
    .scan-badge.source      { background: #f3f4f6; color: #666; }
    .scan-badge.saved       { background: #d1fae5; color: #065f46; }
    .scan-badge.linkedin    { background: #dbeafe; color: #1d4ed8; }
    .scan-badge.indeed      { background: #fef3c7; color: #92600a; }
    .scan-badge.wwr         { background: #dcfce7; color: #166534; }
    .scan-badge.adzuna      { background: #fce7f3; color: #9d174d; }
    .scan-badge.remoteok    { background: #ffedd5; color: #9a3412; }
    .scan-badge.himalayas   { background: #f0fdf4; color: #166534; }
    .scan-badge.jobicy      { background: #ede9fe; color: #5b21b6; }
    .scan-badge.workday     { background: #e0f2fe; color: #0369a1; }
    .scan-badge.jsearch     { background: #f0fdf4; color: #166534; }
    .scan-badge.type        { background: #f3e8ff; color: #6b21a8; }

    /* ── Scan filter bar ── */
    .scan-filter-bar {
      display: flex;
      flex-direction: row;
      align-items: flex-end;
      gap: 16px;
      flex-wrap: wrap;
      background: #fafafa;
      border: 1px solid #fafafa;
      border-radius: 10px;
      padding: 14px 20px;
      margin-bottom: 20px;
    }
    .scan-filter-divider {
      width: 1px;
      height: 28px;
      background: #e5e7eb;
      flex-shrink: 0;
      align-self: flex-end;
      margin-bottom: 2px;
    }
    .scan-filter-group { display: flex; flex-direction: column; gap: 5px; }
    .scan-filter-label {
      font-size: 0.58rem;
      font-weight: 700;
      letter-spacing: 1.5px;
      text-transform: uppercase;
      color: #bbb;
    }
    .sf-select {
      font-family: 'Inter', system-ui, sans-serif;
      font-size: 0.8rem; font-weight: 500; color: #443d69;
      padding: 7px 32px 7px 12px;
      border: 1.5px solid #e5e7eb; border-radius: 8px;
      background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%236b7280' d='M6 8L1 3h10z'/%3E%3C/svg%3E") no-repeat right 10px center;
      appearance: none; cursor: pointer; outline: none; transition: border-color 0.15s;
    }
    .sf-select:focus { border-color: #443d69; }
    .scan-search {
      font-family: 'Inter', system-ui, sans-serif;
      font-size: 0.8rem;
      padding: 5px 14px;
      border: 1.5px solid #e5e7eb;
      border-radius: 20px;
      outline: none;
      width: 200px;
      transition: border-color 0.15s;
    }
    .scan-search:focus { border-color: #443d69; }
    .scan-count { font-size: 0.75rem; color: #aaa; white-space: nowrap; margin-left: auto; }

    .scan-skill-row { font-size: 0.73rem; }
    .scan-skill-label { font-weight: 600; color: #555; margin-bottom: 4px; }
    .scan-tags { display: flex; flex-wrap: wrap; gap: 4px; }
    .scan-tag {
      font-size: 0.65rem;
      padding: 2px 7px;
      border-radius: 20px;
      line-height: 1.6;
      flex-shrink: 0;
      white-space: nowrap;
    }
    .scan-tag.matched { background: #eee9f8; color: #443d69; }
    .scan-tag.gap     { background: #fef3c7; color: #92600a; }

    .jm-action-row { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
    .scan-action-btn {
      font-family: 'Inter', system-ui, sans-serif;
      font-size: 0.7rem;
      font-weight: 600;
      padding: 5px 12px;
      border-radius: 6px;
      border: 1.5px solid #e5e7eb;
      background: #fff;
      color: #555;
      cursor: pointer;
      text-decoration: none;
      transition: all 0.15s;
      display: inline-flex;
      align-items: center;
      white-space: nowrap;
    }
    .scan-action-btn:hover      { border-color: #443d69; color: #443d69; }
    .scan-action-btn.view       { font-weight: 700; }
    .scan-action-btn.primary    { background: #443d69; border-color: #443d69; color: #fff; }
    .scan-action-btn.primary:hover { opacity: 0.85; }
    .scan-action-btn.not-fit    { font-size: 0.65rem; color: #9ca3af; border-color: #e5e7eb; }
    .scan-action-btn.not-fit:hover { color: #c2410c; border-color: #f97316; background: #fff7ed; }
    .scan-action-btn.no-qual    { font-size: 0.65rem; color: #9ca3af; border-color: #e5e7eb; }
    .scan-action-btn.no-qual:hover { color: #b91c1c; border-color: #ef4444; background: #fef2f2; }
    .scan-action-btn.archive    { font-size: 0.65rem; color: #9ca3af; border-color: #e5e7eb; }
    .scan-action-btn.archive:hover { color: #555; }
    .scan-action-btn.interviewed { background: #fff; border-color: #c4b5f4; color: #5b21b6; }
    .scan-action-btn.interviewed:hover { background: #f5f3ff; }
    .scan-action-btn.ghosted    { background: #fff; border-color: #d1d5db; color: #9ca3af; }
    .scan-action-btn.ghosted:hover { background: #f9fafb; color: #6b7280; }
    .scan-action-btn.hired      { background: #fff; border-color: #86efac; color: #15803d; }
    .scan-action-btn.hired:hover { background: #f0fdf4; }
    .scan-action-btn:disabled   { opacity: 0.4; cursor: default; }
    .scan-status-line { font-size: 0.68rem; color: #888; }
    .scan-status-line strong { color: #443d69; }
    .scan-card-notes {
      font-family: 'Inter', system-ui, sans-serif; font-size: 0.78rem; color: #333;
      width: 100%; padding: 7px 10px; border: 1.5px solid #e5e7eb; border-radius: 7px;
      outline: none; resize: vertical; min-height: 44px; line-height: 1.5;
    }
    .scan-card-notes:focus { border-color: #443d69; }
    .scan-card-notes::placeholder { color: #bbb; }

    /* ── Job detail modal ── */
    .jm-overlay {
      position: fixed; inset: 0; background: rgba(0,0,0,0.45);
      display: none; align-items: center; justify-content: center;
      z-index: 1000; padding: 20px;
    }
    .jm-overlay.open { display: flex; }
    .jm-modal {
      background: #fff; border-radius: 14px; width: 100%; max-width: 580px;
      max-height: 90vh; overflow-y: auto; position: relative;
      box-shadow: 0 24px 64px rgba(0,0,0,0.18);
    }
    .jm-header { padding: 26px 52px 18px 26px; border-bottom: 1px solid #f0f0f0; }
    .jm-close {
      position: absolute; top: 14px; right: 18px;
      font-size: 1.4rem; line-height: 1; color: #ccc; cursor: pointer;
      background: none; border: none; padding: 0;
    }
    .jm-close:hover { color: #333; }
    .jm-title { font-family: 'Poppins', sans-serif; font-size: 1.05rem; font-weight: 700; color: #443d69; line-height: 1.3; }
    .jm-co { font-size: 0.82rem; color: #888; margin-top: 4px; }
    .jm-meta { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: 10px; }
    .jm-meta-date { font-size: 0.72rem; color: #bbb; }
    .jm-body { padding: 20px 26px 26px; display: flex; flex-direction: column; gap: 18px; }
    .jm-section-label { font-size: 0.58rem; font-weight: 700; letter-spacing: 1.5px; text-transform: uppercase; color: #bbb; margin-bottom: 7px; }
    .jm-pills { display: flex; flex-wrap: wrap; gap: 5px; }
    .jm-divider { border: none; border-top: 1px solid #f0f0f0; }
    .jm-apply-wrap { display: none; flex-direction: column; gap: 10px; padding: 14px; background: #fafafa; border-radius: 8px; border: 1px solid #e5e7eb; }
    .jm-apply-wrap.open { display: flex; }
    .jm-apply-label { font-size: 0.6rem; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; color: #aaa; margin-bottom: 3px; }
    .jm-apply-wrap input, .jm-apply-wrap select {
      font-family: 'Inter', system-ui, sans-serif; font-size: 0.82rem;
      padding: 7px 12px; border: 1.5px solid #e5e7eb; border-radius: 8px;
      outline: none; width: 100%;
    }
    .jm-apply-wrap input:focus, .jm-apply-wrap select:focus { border-color: #443d69; }

    /* ── Keyword gap ── */
    .gap-list {
      display: grid;
      grid-template-columns: repeat(3, 1fr);
      gap: 8px;
      margin-bottom: 48px;
    }
    @media (max-width: 900px) { .gap-list { grid-template-columns: repeat(2, 1fr); } }
    @media (max-width: 560px) { .gap-list { grid-template-columns: 1fr; } }
    .gap-item {
      display: flex;
      align-items: center;
      gap: 10px;
      padding: 14px 18px;
      border: 1px solid #e5e7eb;
      border-radius: 8px;
      background: #fff;
      flex-wrap: wrap;
    }
    .gap-term { font-weight: 600; color: #443d69; font-size: 0.84rem; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .gap-count { font-size: 0.68rem; color: #aaa; white-space: nowrap; }
    .gap-add-btn {
      font-family: 'Inter', system-ui, sans-serif;
      font-size: 0.68rem;
      font-weight: 700;
      padding: 4px 12px;
      border-radius: 6px;
      border: 1.5px solid #e5e7eb;
      background: #fff;
      color: #443d69;
      cursor: pointer;
      transition: all 0.15s;
      white-space: nowrap;
    }
    .gap-add-btn:hover { background: #443d69; color: #fff; border-color: #443d69; }
    .gap-add-btn:disabled { opacity: 0.4; cursor: default; }
    .gap-track-select {
      font-family: 'Inter', system-ui, sans-serif;
      font-size: 0.68rem; font-weight: 600;
      color: #443d69; background: #f5f3ff;
      border: 1.5px solid #c4b5f4; border-radius: 6px;
      padding: 4px 6px; cursor: pointer;
      appearance: none; -webkit-appearance: none;
      white-space: nowrap; flex-shrink: 0;
    }

    .job-status {
      display: inline-block;
      font-size: 0.65rem;
      font-weight: 700;
      letter-spacing: 1px;
      text-transform: uppercase;
      padding: 3px 10px;
      border-radius: 20px;
    }
    .job-status.current   { background: #d1fae5; color: #065f46; }
    .job-status.applied   { background: #dbeafe; color: #1e40af; }
    .job-status.tracked   { background: #f3f4f6; color: #666; }
    .job-status.closed    { background: #fee2e2; color: #991b1b; }

    /* ── Empty state ── */
    .empty-state {
      text-align: center;
      padding: 48px 0;
      color: #ccc;
      font-size: 0.88rem;
    }

    /* ── Footer ── */
    footer {
      background: #fafafa;
      border-top: 1px solid #e5e7eb;
      margin-top: 80px;
      padding: 48px 0 32px;
    }
    .footer-grid {
      max-width: 1300px;
      margin: 0 auto 36px;
      padding: 0 24px;
      display: grid;
      grid-template-columns: repeat(5, 1fr);
      gap: 16px;
    }
    .footer-col { min-width: 0; }
    .footer-col-label {
      font-size: 0.62rem;
      font-weight: 700;
      letter-spacing: 1.5px;
      text-transform: uppercase;
      color: #111;
      margin-bottom: 10px;
    }
    .footer-links { display: flex; flex-direction: column; gap: 9px; }
    .footer-links a { font-size: 0.82rem; color: #999; text-decoration: none; transition: color 0.15s; }
    .footer-links a:hover { color: #111; }
    .footer-bottom {
      max-width: 1300px;
      margin: 0 auto;
      padding: 24px 40px 0;
      border-top: 1px solid #f0f0f0;
      font-size: 0.72rem;
      color: #ccc;
      text-align: center;
    }

    @media (max-width: 860px) { .footer-grid { grid-template-columns: repeat(2, 1fr); gap: 32px; } }

    @media (max-width: 780px) {
      .scan-filter-bar { flex-wrap: wrap; gap: 10px; }
      .scan-filter-divider { display: none; }
      .scan-filter-group { flex-direction: row; align-items: center; gap: 8px; }
      .scan-filter-label { white-space: nowrap; }
      .page-header { flex-direction: column; align-items: flex-start; gap: 12px; }
    }

    @media (max-width: 720px) {
      .main-wrap { padding: 0 20px; }
      /* Scan list: hide header, show rows as cards */
      .scan-list-header { display: none; }
      .scan-list-row {
        grid-template-columns: 1fr auto;
        grid-template-rows: auto auto;
        padding: 12px 14px;
        gap: 4px 10px;
      }
      .scan-list-title { grid-column: 1; grid-row: 1; white-space: normal; }
      .scan-list-company { grid-column: 1; grid-row: 2; }
      .scan-list-badges { grid-column: 2; grid-row: 1; justify-content: flex-end; }
      .scan-list-date { grid-column: 2; grid-row: 2; text-align: right; }
      .scan-list-action { display: none; }
      .focus-card { flex-direction: column; gap: 14px; }
      .fc-actions { flex-direction: row; }
      .track-pill-bar { gap: 6px; }
    }

    @media (max-width: 480px) {
      .footer-grid { grid-template-columns: 1fr; gap: 24px; padding: 0 20px; }
      .footer-bottom { padding: 24px 20px 0; }
      .scanner-bar { flex-direction: column; align-items: flex-start; gap: 10px; }
      .scanner-actions { flex-wrap: wrap; }
      .gap-item { flex-wrap: wrap; }
      .gap-track-select { width: 100%; }
    }
    /* ── Track filter pills ── */
    .track-pill-bar { display: flex; gap: 6px; margin-bottom: 20px; flex-wrap: wrap; align-items: center; }
    .track-pill {
      font-family: 'Inter', system-ui, sans-serif; font-size: 0.72rem; font-weight: 700;
      letter-spacing: 0.5px; text-transform: capitalize; padding: 5px 14px;
      border-radius: 100px; border: 1.5px solid #e5e7eb; background: #fff;
      color: #888; cursor: pointer; transition: all 0.15s;
    }
    .track-pill:hover { border-color: #443d69; color: #443d69; }
    .track-pill.active { background: #443d69; border-color: #443d69; color: #fff; }

    /* ── List view ── */
    .scan-list { display: flex; flex-direction: column; gap: 0; margin-bottom: 40px; border: 1.5px solid #e5e7eb; border-radius: 10px; overflow: hidden; }
    .scan-list-header {
      display: grid;
      grid-template-columns: minmax(0,2fr) minmax(0,1fr) 110px 90px 88px;
      align-items: center;
      gap: 0 12px;
      padding: 8px 16px;
      background: #fafafa;
      border-bottom: 1.5px solid #e5e7eb;
      font-size: 0.62rem; font-weight: 700; letter-spacing: 1.5px;
      text-transform: uppercase; color: #aaa;
    }
    .scan-list-row {
      display: grid;
      grid-template-columns: minmax(0,2fr) minmax(0,1fr) 110px 90px 88px;
      align-items: center;
      gap: 0 12px;
      padding: 11px 16px;
      border-bottom: 1px solid #f0f0f0;
      transition: background 0.1s;
      cursor: pointer;
    }
    .scan-list-row:last-child { border-bottom: none; }
    .scan-list-row:hover { background: #fafafe; }
    .scan-list-row:hover .scan-list-action { border-color: #443d69; background: #f5f3ff; }
    .scan-list-title {
      font-family: 'Poppins', sans-serif; font-size: 0.85rem; font-weight: 700;
      color: #443d69; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    }
    .scan-list-company { font-size: 0.78rem; color: #555; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
    .scan-list-badges { display: flex; gap: 4px; align-items: center; }
    .scan-list-date { font-size: 0.72rem; color: #bbb; white-space: nowrap; }
    .scan-list-action {
      font-family: 'Inter', system-ui, sans-serif; font-size: 0.7rem; font-weight: 700;
      padding: 5px 10px; border-radius: 6px; border: 1.5px solid #e5e7eb;
      background: #fff; color: #443d69; white-space: nowrap;
      display: inline-block; text-align: center; transition: all 0.15s;
    }
