:root {
  --bg: #f4f6f8;
  --surface: #ffffff;
  --surface-2: #f8fafc;
  --text: #111827;
  --muted: #667085;
  --line: #e5e7eb;
  --accent: #111827;
  --accent-soft: #eef2f7;
  --good: #0f766e;
  --good-soft: #ecfdf5;
  --danger: #b42318;
  --danger-soft: #fef3f2;
  --warning: #92400e;
  --warning-soft: #fffbeb;
  --shadow: 0 8px 30px rgba(15, 23, 42, 0.06);
  --radius: 18px;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
}
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }

.app-shell { min-height: 100vh; display: grid; grid-template-columns: 250px 1fr; }
.sidebar {
  background: #0f172a;
  color: #fff;
  padding: 24px 18px;
  display: flex;
  flex-direction: column;
  gap: 24px;
  position: sticky;
  top: 0;
  height: 100vh;
}
.brand { display: flex; align-items: center; gap: 12px; padding: 0 6px; }
.brand-mark {
  width: 42px; height: 42px; border-radius: 13px; display: grid; place-items: center;
  background: #fff; color: #111827; font-weight: 800; font-size: 22px;
}
.brand-title { font-weight: 800; font-size: 18px; }
.brand-subtitle { font-size: 12px; color: #94a3b8; margin-top: 3px; }
.nav { display: grid; gap: 7px; }
.nav-item {
  border: 0; background: transparent; color: #cbd5e1; border-radius: 12px;
  padding: 12px 14px; text-align: start; display: flex; gap: 10px; align-items: center;
}
.nav-item:hover { background: rgba(255,255,255,.06); color: #fff; }
.nav-item.active { background: #fff; color: #0f172a; font-weight: 700; }
.sidebar-note {
  margin-top: auto; border: 1px solid rgba(255,255,255,.12); border-radius: 14px;
  padding: 14px; display: grid; gap: 5px; color: #cbd5e1; font-size: 12px;
}
.sidebar-note strong { color: #fff; }

.main { min-width: 0; padding: 28px; }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 24px; }
.topbar h1 { margin: 0; font-size: 28px; }
.topbar p { margin: 5px 0 0; color: var(--muted); }
.primary-btn, .secondary-btn, .danger-btn, .file-btn {
  border-radius: 11px; padding: 10px 16px; border: 1px solid transparent; font-weight: 700;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
}
.primary-btn { background: var(--accent); color: #fff; }
.primary-btn:hover { opacity: .9; }
.secondary-btn, .file-btn { background: #fff; color: var(--text); border-color: var(--line); }
.danger-btn { background: var(--danger-soft); color: var(--danger); border-color: #fecdca; }

.view { display: none; }
.view.active { display: block; }
.stats-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-bottom: 16px; }
.stat-card, .panel {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow);
}
.stat-card { padding: 20px; display: grid; gap: 7px; min-height: 135px; align-content: center; }
.stat-card.accent { background: #111827; color: #fff; }
.stat-card.accent .stat-label, .stat-card.accent .stat-meta { color: #cbd5e1; }
.stat-label { font-size: 13px; color: var(--muted); }
.stat-value { font-size: 30px; line-height: 1; }
.stat-value.small { font-size: 20px; line-height: 1.25; }
.stat-meta { font-size: 12px; color: var(--muted); }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 16px; }
.panel { padding: 20px; margin-bottom: 16px; }
.panel-head { display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; margin-bottom: 18px; }
.panel-head h2 { margin: 0; font-size: 18px; }
.panel-head p { margin: 5px 0 0; font-size: 13px; color: var(--muted); }
.empty-state { color: var(--muted); font-size: 14px; }
.empty-state.padded { padding: 28px 0; text-align: center; }

.ranking { display: grid; gap: 13px; }
.rank-row { display: grid; grid-template-columns: minmax(120px, 1fr) 2fr auto; gap: 12px; align-items: center; }
.rank-name strong { display: block; font-size: 14px; }
.rank-name span { color: var(--muted); font-size: 12px; }
.rank-track, .bar-track { height: 9px; background: #eef2f7; border-radius: 999px; overflow: hidden; }
.rank-fill, .bar-fill { height: 100%; background: #111827; border-radius: inherit; }
.rank-score { font-size: 12px; color: var(--muted); white-space: nowrap; }

.recommendations { display: grid; gap: 10px; }
.recommendation {
  border: 1px solid var(--line); background: var(--surface-2); border-radius: 13px; padding: 13px 14px;
}
.recommendation strong { display: block; margin-bottom: 5px; }
.recommendation span { color: var(--muted); font-size: 13px; }
.recommendation .saving { color: var(--good); font-weight: 700; }

.bar-list { display: grid; gap: 12px; }
.bar-row { display: grid; grid-template-columns: minmax(150px, 1fr) 3fr auto; align-items: center; gap: 14px; }
.bar-name { font-size: 13px; }
.bar-value { font-weight: 700; font-size: 13px; white-space: nowrap; }

.toolbar-row { display: flex; gap: 10px; margin-bottom: 16px; }
.search-wrap { flex: 1; }
input, select, textarea {
  width: 100%; border: 1px solid #d0d5dd; background: #fff; color: var(--text);
  border-radius: 10px; padding: 10px 12px; outline: none;
}
input:focus, select:focus, textarea:focus { border-color: #667085; box-shadow: 0 0 0 3px rgba(17,24,39,.06); }
textarea { resize: vertical; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th { color: var(--muted); font-weight: 600; text-align: start; border-bottom: 1px solid var(--line); padding: 11px 10px; white-space: nowrap; }
td { border-bottom: 1px solid #f0f2f5; padding: 13px 10px; vertical-align: middle; }
.badge { display: inline-flex; border-radius: 999px; padding: 4px 8px; background: var(--accent-soft); font-size: 11px; }
.row-actions { display: flex; align-items: center; gap: 6px; white-space: nowrap; }
.edit-btn { border: 0; background: var(--accent-soft); color: var(--text); padding: 6px 9px; border-radius: 8px; font-size: 12px; font-weight: 700; }
.edit-btn:hover { background: #e2e8f0; }
.icon-btn { border: 0; background: transparent; color: var(--muted); padding: 6px; border-radius: 8px; }
.icon-btn:hover { background: var(--danger-soft); color: var(--danger); }
.hidden { display: none !important; }

.form-panel { max-width: 900px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.field { display: grid; gap: 7px; }
.field > span { font-size: 13px; font-weight: 700; }
.span-2 { grid-column: span 2; }
.form-actions { display: flex; gap: 10px; padding-top: 4px; }


.barcode-row { display: grid; grid-template-columns: 1fr auto; gap: 10px; }
.field-help { color: var(--muted); font-size: 12px; font-weight: 400; }
.barcode-lookup {
  border: 1px solid var(--line); border-radius: 14px; background: var(--surface-2);
  padding: 14px; display: grid; gap: 10px;
}
.barcode-summary { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.barcode-summary strong { display: block; margin-bottom: 3px; }
.barcode-summary .meta { color: var(--muted); font-size: 12px; }
.lookup-prices { display: grid; gap: 7px; max-height: 310px; overflow: auto; }
.lookup-price-row {
  display: grid; grid-template-columns: minmax(0,1fr) auto auto; gap: 10px; align-items: center;
  background: #fff; border: 1px solid var(--line); border-radius: 11px; padding: 9px 10px;
}
.lookup-price-row.cheapest { border-color: #a6f4c5; background: var(--good-soft); }
.lookup-store { min-width: 0; }
.lookup-store strong { display: block; font-size: 13px; }
.lookup-store span { display: block; color: var(--muted); font-size: 11px; margin-top: 2px; }
.lookup-price { font-weight: 800; white-space: nowrap; }
.lookup-use { padding: 7px 9px; font-size: 11px; }
.lookup-message { color: var(--muted); font-size: 13px; }
.lookup-saving { color: var(--good); background: var(--good-soft); border: 1px solid #a6f4c5; border-radius: 10px; padding: 9px 10px; font-size: 13px; font-weight: 700; }

.api-search-row { display: grid; grid-template-columns: 2fr 1fr auto; gap: 10px; }
.status-pill { padding: 6px 10px; border-radius: 999px; background: var(--good-soft); color: var(--good); font-size: 11px; font-weight: 700; }
.api-hint { margin-top: 10px; color: var(--muted); font-size: 12px; }
.api-results { margin-top: 18px; display: grid; gap: 10px; }
.api-product, .api-price-row {
  border: 1px solid var(--line); border-radius: 13px; padding: 13px 14px; background: var(--surface-2);
}
.api-product { display: flex; justify-content: space-between; align-items: center; gap: 14px; }
.api-product h3 { margin: 0 0 5px; font-size: 14px; }
.api-product p { margin: 0; color: var(--muted); font-size: 12px; }
.api-product button { white-space: nowrap; }
.api-price-row { display: grid; grid-template-columns: 1fr auto; gap: 12px; }
.api-price-row .store { font-weight: 700; }
.api-price-row .address { color: var(--muted); font-size: 12px; margin-top: 4px; }
.api-price-row .price { font-weight: 800; font-size: 18px; }
.api-back { margin-bottom: 4px; }
.cheapest { border-color: #a6f4c5; background: var(--good-soft); }

.danger-zone { display: flex; justify-content: space-between; align-items: center; gap: 20px; border-color: #fecdca; }
.danger-zone h2 { margin: 0 0 5px; font-size: 18px; }
.danger-zone p { margin: 0; color: var(--muted); }

.toast {
  position: fixed; inset-inline-start: 24px; bottom: 24px; background: #111827; color: #fff;
  border-radius: 12px; padding: 11px 15px; box-shadow: var(--shadow); opacity: 0;
  transform: translateY(8px); pointer-events: none; transition: .2s ease; z-index: 50;
}
.toast.show { opacity: 1; transform: translateY(0); }

@media (max-width: 1050px) {
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .two-col { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .app-shell { grid-template-columns: 1fr; }
  .sidebar { position: static; height: auto; padding: 16px; }
  .nav { grid-template-columns: repeat(5, minmax(0,1fr)); gap: 5px; }
  .nav-item { justify-content: center; padding: 10px 7px; font-size: 18px; }
  .nav-item span { display: none; }
  .sidebar-note { display: none; }
  .main { padding: 16px; }
  .topbar { align-items: flex-start; }
  .topbar h1 { font-size: 24px; }
  .topbar p { font-size: 13px; }
  .topbar .primary-btn { padding: 9px 11px; font-size: 13px; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .stat-card { min-height: 120px; padding: 16px; }
  .stat-value { font-size: 25px; }
  .form-grid { grid-template-columns: 1fr; }
  .span-2 { grid-column: span 1; }
  .api-search-row, .barcode-row { grid-template-columns: 1fr; }
  .lookup-price-row { grid-template-columns: 1fr auto; }
  .lookup-use { grid-column: 1 / -1; }
  .toolbar-row { flex-direction: column; }
  .rank-row, .bar-row { grid-template-columns: 1fr; gap: 6px; }
  .danger-zone { flex-direction: column; align-items: stretch; }
}

/* V1.7 area filters */
.area-filter-row {
  margin-top: 10px;
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 10px;
}
.distance-pill {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 3px 8px;
  margin-inline-start: 6px;
  background: #eef2f7;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}
.barcode-name-only {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.barcode-name-only strong { font-size: 15px; }
.barcode-name-only .source { color: var(--muted); font-size: 11px; }

@media (max-width: 760px) {
  .area-filter-row { grid-template-columns: 1fr; }
}

/* V1.8 smart memory */
.smart-suggestions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}
.smart-suggestions:empty { display: none; }
.smart-chip {
  border: 1px solid var(--border, #d7dde6);
  background: #f7f9fc;
  color: #172033;
  border-radius: 999px;
  padding: 6px 10px;
  font: inherit;
  font-size: 0.82rem;
  cursor: pointer;
}
.smart-chip:hover { background: #eef2f7; }
.smart-chip small { color: #6b778c; }
.memory-note {
  margin-top: 6px;
  color: #6b778c;
  font-size: 0.82rem;
}

/* V2.0 accounts */
.sidebar-user {
  margin-top: auto; border: 1px solid rgba(255,255,255,.12); border-radius: 14px;
  padding: 12px 14px; display: flex; align-items: center; justify-content: space-between; gap: 10px;
  color: #cbd5e1; font-size: 13px;
}
.sidebar-user strong { color: #fff; display: block; }
.sidebar-user + .sidebar-note { margin-top: 0; }
.logout-btn {
  border: 1px solid rgba(255,255,255,.2); background: transparent; color: #fff;
  border-radius: 9px; padding: 6px 10px; font-size: 12px; white-space: nowrap;
}
.logout-btn:hover { background: rgba(255,255,255,.08); }
.invite-box {
  margin-top: 16px; border: 1px solid #a6f4c5; background: var(--good-soft);
  border-radius: 14px; padding: 14px; display: grid; gap: 10px; font-size: 13px;
}
.invite-row { display: grid; grid-template-columns: 1fr auto; gap: 10px; }
.invite-row input { direction: ltr; text-align: left; font-size: 12px; }
.family-row {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  border: 1px solid var(--line); background: var(--surface-2); border-radius: 13px; padding: 12px 14px;
}
.family-row strong { display: block; }
.family-row .muted, .muted { color: var(--muted); font-size: 12px; }
.family-list { display: grid; gap: 10px; }

.auth-body { min-height: 100vh; display: grid; place-items: center; padding: 16px; }
.auth-card { width: 100%; max-width: 400px; padding: 28px; margin: 0; display: grid; gap: 18px; }
.auth-brand { padding: 0; }
.auth-brand .brand-mark { background: #111827; color: #fff; }
.auth-brand .brand-subtitle { color: var(--muted); }
.auth-form { display: grid; gap: 14px; }
.auth-form h1 { margin: 0; font-size: 22px; }
.auth-text { margin: 0; font-size: 14px; }
.auth-message {
  border: 1px solid #fecdca; background: var(--danger-soft); color: var(--danger);
  border-radius: 10px; padding: 10px 12px; font-size: 13px;
}
.auth-note { margin: 0; color: var(--muted); font-size: 12px; text-align: center; }

@media (max-width: 760px) {
  .nav { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); }
  .sidebar-user { margin-top: 0; }
  .family-row, .invite-row { grid-template-columns: 1fr; flex-direction: column; align-items: stretch; }
}

/* The purchases search takes the row; the category list keeps its own width. */
.toolbar-row .search-wrap { flex: 1 1 auto; min-width: 0; }
.toolbar-row select { width: auto; flex: 0 0 auto; min-width: 190px; }
@media (max-width: 760px) {
  .toolbar-row select { width: 100%; }
}

/* V2.1 receipts */
#receiptPanel.dragging { border-color: #111827; box-shadow: 0 0 0 3px rgba(17,24,39,.12); }
.receipt-actions { align-items: center; flex-wrap: wrap; margin-top: 10px; }
.receipt-head { grid-template-columns: repeat(5, minmax(0, 1fr)); margin: 14px 0; }
.receipt-table input { padding: 7px 9px; font-size: 13px; }
.receipt-table input[type="checkbox"] { width: 18px; height: 18px; padding: 0; }
.receipt-table .col-name { min-width: 190px; }
.receipt-table .col-code { min-width: 130px; direction: ltr; text-align: left; }
.receipt-table .col-num { width: 84px; direction: ltr; text-align: left; }
.receipt-table tr.off td { opacity: .45; }
.receipt-warning {
  border: 1px solid #fedf89; background: var(--warning-soft); color: var(--warning);
  border-radius: 10px; padding: 9px 12px; font-size: 13px; margin-top: 10px;
}
.receipt-unread { margin-top: 10px; font-size: 12px; color: var(--muted); }
.receipt-unread li { direction: rtl; }
@media (max-width: 1050px) { .receipt-head { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 760px) { .receipt-head { grid-template-columns: 1fr; } #receiptDropHint { display: none; } }
.receipt-table input.doubt { border-color: var(--danger); background: var(--danger-soft); }
.official-price { color: var(--good); font-weight: 700; }
.chain-filter { margin-top: 12px; }
.smart-chip.active { background: #111827; border-color: #111827; color: #fff; }
.smart-chip.active small { color: #cbd5e1; }
#priceRows { margin-top: 10px; }

/* V2.2 shopping list and status */
.list-table-wrap { margin: 14px 0; }
.basket-card { border: 1px solid var(--line); border-radius: 13px; padding: 13px 14px; background: var(--surface-2); }
.basket-card.cheapest { border-color: #a6f4c5; background: var(--good-soft); }
.basket-head { display: grid; grid-template-columns: 1fr auto; gap: 12px; align-items: start; }
.basket-head .store { font-weight: 700; }
.basket-head .price { font-weight: 800; font-size: 18px; white-space: nowrap; }
.basket-card .address { color: var(--muted); font-size: 12px; margin-top: 4px; }
.basket-card details { margin-top: 8px; font-size: 12px; color: var(--muted); }
.basket-card summary { cursor: pointer; }
.basket-card .missing { color: var(--warning); font-weight: 700; }
.basket-lines { display: grid; gap: 3px; margin-top: 6px; }
.basket-lines div { display: flex; justify-content: space-between; gap: 10px; }
.status-ok { color: var(--good); font-weight: 700; }
.status-bad { color: var(--danger); font-weight: 700; }

/* V2.3 promotions and basket options */
.promo-line { font-size: 12px; margin-top: 4px; color: var(--good); }
.promo-line.club { color: var(--warning); }
.shelf-price { font-size: 12px; font-weight: 400; color: var(--muted); text-decoration: line-through; text-align: left; }
.shelf-price.plain { text-decoration: none; }
.smart-chip.off { text-decoration: line-through; opacity: .55; }
#listProducts .field-help { flex-basis: 100%; }

/* JobFinder — what prix did not need */
.lang-switch { display: flex; gap: 6px; justify-content: center; }
.lang-btn {
  border: 1px solid var(--line); background: #fff; color: var(--muted); border-radius: 999px;
  padding: 5px 11px; font-size: 12px; font-weight: 700;
}
.lang-btn.active { background: var(--accent); color: #fff; border-color: var(--accent); }
.check-field { display: flex; align-items: center; gap: 10px; font-size: 14px; }
.check-field input { width: 18px; height: 18px; padding: 0; margin: 0; }
.field .field-help { font-weight: 400; }
@media (max-width: 760px) {
  /* On a phone the menu takes only its own height; the page gets the rest. */
  .app-shell { grid-template-rows: auto 1fr; }
}

/* Phase 1 — CVs, profile form, search profiles */
.upload-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.notice-warning, .notice-info { border-radius: 10px; padding: 9px 12px; font-size: 13px; margin-top: 12px; }
.notice-warning { border: 1px solid #fedf89; background: var(--warning-soft); color: var(--warning); }
.notice-info { border: 1px solid var(--line); background: var(--accent-soft); color: var(--text); }
.row-actions.wrap { flex-wrap: wrap; white-space: normal; }
.cv-columns { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-top: 8px; }
.cv-columns h3 { margin: 0 0 4px; font-size: 15px; }
.cv-columns .muted { margin: 0 0 10px; }
#cvText { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; line-height: 1.45; }
.profile-form { display: grid; gap: 14px; }
.profile-form .field > span { display: flex; justify-content: space-between; gap: 8px; }
.profile-form .field-help { font-weight: 400; }
.mini-table { width: 100%; border-collapse: collapse; }
.mini-table td, .mini-table th { padding: 4px 3px; border-bottom: 1px solid #f0f2f5; font-size: 12px; }
.mini-table input, .mini-table select { padding: 6px 8px; font-size: 13px; }
.mini-table .col-years { width: 70px; }
.mini-table .col-level { width: 130px; }
.mini-table .col-x { width: 32px; }
.mini-table input.years { direction: ltr; text-align: left; }
.add-row { justify-self: start; }
.sp-list { display: grid; gap: 12px; }
.sp-card { border: 1px solid var(--line); background: var(--surface-2); border-radius: 13px; padding: 14px; display: grid; gap: 10px; }
.sp-card.off { opacity: .6; }
.sp-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.sp-grid .span-2 { grid-column: span 2; }
.sp-card .field > span { font-size: 12px; }
.sp-card input, .sp-card select { padding: 7px 9px; font-size: 13px; }
.sp-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.sp-why { font-size: 12px; color: var(--muted); }
.cv-row.selected { border-color: var(--accent); box-shadow: 0 0 0 2px rgba(17,24,39,.08); }
@media (max-width: 1050px) { .cv-columns { grid-template-columns: 1fr; } }
@media (max-width: 760px) { .sp-grid { grid-template-columns: 1fr; } .sp-grid .span-2 { grid-column: span 1; } }

/* Phase 2 — companies and collection */
.company-main { min-width: 0; }
.company-main .muted a { color: inherit; }
.company-jobs { margin: -4px 0 6px; padding: 0 10px; display: grid; gap: 6px; }
.job-line { display: flex; justify-content: space-between; align-items: center; gap: 10px; border-bottom: 1px solid #f0f2f5; padding: 7px 4px; }
.job-line strong { display: block; font-size: 13px; }
.job-line .muted { font-size: 12px; }
.job-line a.edit-btn { text-decoration: none; white-space: nowrap; }
.sync-log { font-size: 11px; white-space: pre-wrap; max-height: 260px; overflow: auto; background: var(--surface-2); border-radius: 8px; padding: 8px; direction: ltr; text-align: left; }
.family-row > div > span { display: block; }

/* Mixed Hebrew / Latin lines: each item keeps its own direction, so numbers stay with their words. */
.meta-line { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; }
.meta-line > * { unicode-bidi: isolate; }
.meta-line > br { flex-basis: 100%; height: 0; }
.job-line .muted { unicode-bidi: plaintext; }
.meta-line > .meta-item + .meta-item::before, .meta-line > .badge + .meta-item::before { content: "·"; margin-inline-end: 8px; }

/* Phase 3 — dashboard, applications, cost */
.dash-stats { margin: -8px 0 14px; font-size: 13px; }
.match-list { display: grid; gap: 14px; }
.match-card { padding: 18px 20px; display: grid; gap: 12px; }
.match-head { display: flex; justify-content: space-between; gap: 14px; align-items: flex-start; flex-wrap: wrap; }
.match-head h2 { margin: 0; font-size: 17px; }
.match-head .muted { display: block; margin-top: 3px; font-size: 13px; }
.score-pill { min-width: 54px; height: 54px; border-radius: 16px; display: grid; place-items: center; background: var(--accent-soft); font-weight: 800; font-size: 20px; }
.score-pill.good { background: var(--good-soft); color: var(--good); }
.score-pill.bad { background: var(--danger-soft); color: var(--danger); }
.interest { display: inline-flex; border-radius: 999px; padding: 4px 9px; font-size: 11px; font-weight: 700; }
.interest.hot { background: #fee2e2; color: #b42318; }
.interest.warm { background: var(--warning-soft); color: var(--warning); }
.interest.cold { background: #e0f2fe; color: #075985; }
.match-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 14px; font-size: 13px; }
.match-grid h3 { margin: 0 0 5px; font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .03em; }
.match-grid ul { margin: 0; padding-inline-start: 18px; }
.match-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.match-actions a.primary-btn, .match-actions a.secondary-btn { text-decoration: none; }
.match-card.done { opacity: .55; }
.app-row { display: grid; grid-template-columns: 1fr auto; gap: 12px; align-items: start; border: 1px solid var(--line); background: var(--surface-2); border-radius: 13px; padding: 12px 14px; }
.app-row .field { min-width: 180px; }
.app-row textarea { min-height: 60px; }
.app-form { display: grid; gap: 8px; grid-template-columns: 1fr; min-width: 220px; }
@media (max-width: 760px) { .match-grid { grid-template-columns: 1fr; } .app-row { grid-template-columns: 1fr; } }
/* Present for password managers (which ignore display:none), invisible for people. */
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; padding: 0; margin: -1px; }

/* Phase 4 — tailored CV */
.tailor-box { border-top: 1px solid var(--line); padding-top: 14px; display: grid; gap: 10px; }
.tailor-box h3 { margin: 0; font-size: 15px; }
.tailor-form { display: flex; gap: 10px; align-items: end; flex-wrap: wrap; }
.tailor-form .field { min-width: 240px; }
.tailor-result { display: grid; gap: 10px; }
.tailor-result ul { margin: 4px 0 0; padding-inline-start: 18px; font-size: 13px; }
.diff-head { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; font-size: 12px; color: var(--muted); font-weight: 700; }
.diff { display: grid; gap: 2px; font-size: 12px; max-height: 520px; overflow: auto; border: 1px solid var(--line); border-radius: 10px; padding: 6px; background: var(--surface-2); }
.diff-block { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.diff-col { white-space: pre-wrap; word-break: break-word; padding: 2px 6px; border-radius: 6px; }
.diff-block.replace .old, .diff-block.delete .old { background: #fee2e2; }
.diff-block.replace .new, .diff-block.insert .new { background: #dcfce7; }
.diff-line { min-height: 1.3em; }
.tailor-existing { font-size: 13px; display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
@media (max-width: 760px) { .diff-block, .diff-head { grid-template-columns: 1fr; } }

/* Phase 5 — network */
.known-badge, .meta-item.known { display: inline-flex; border-radius: 999px; padding: 3px 9px; font-size: 11px; font-weight: 700; background: #ede9fe; color: #5b21b6; }
.known-badge { margin-top: 4px; }
.notes-box summary { cursor: pointer; font-size: 13px; }
.notes-form { display: grid; gap: 6px; margin-top: 6px; }
.notes-form button { justify-self: start; }

.intro h2 { margin: 0 0 10px; font-size: 20px; }
.intro p { margin: 0 0 10px; line-height: 1.55; max-width: 72ch; }

.gaps-check { display: grid; gap: 8px; width: 100%; border: 1px solid var(--line); border-radius: 12px; padding: 12px; background: var(--surface-2); }
.gaps-check p { margin: 0; }
.gap-row { display: grid; grid-template-columns: 1fr auto auto 1fr; gap: 10px; align-items: center; font-size: 13px; }
.gap-row input[type="text"], .gap-row input:not([type]) { padding: 7px 9px; font-size: 13px; }
.tailor-form .field.span-2 { flex-basis: 100%; }
@media (max-width: 760px) { .gap-row { grid-template-columns: 1fr; } }
