/* CALIBER Jobs workspace (v125). The job matches panel (#cwTracker) is its own dashboard view (#jobs) and reads like a
   working list, not a showcase: one quiet toolbar (filter, the existing chips, the match filter), rows laid out as a
   two-line record (title and where it is applied on top, company, location and dates under it), a plain score with a
   thin bar, and one clear action per row. No glows, gradients or badges on the rows; violet marks only focus and the
   one primary action. The renderer (caliber-dashboard.js) is unchanged: this sheet only lays out what it draws, and
   caliber-jobs.js adds the toolbar, filtering and keyboard movement. */

/* ------------------------------------------------------------------ views */
#dashboardView[data-cal-view="jobs"] > :not(#accountNavTabs):not(#caliberTermsBanner):not(#cwTracker) { display: none !important; }
#dashboardView:not([data-cal-view="jobs"]) #cwTracker { display: none !important; }
#dashboardView:not([data-cal-view="overview"]) #cwJobsSummary { display: none !important; }
.jw-navcount:not(:empty) {
  display: inline-block; min-width: 20px; margin-left: 7px; padding: 1px 6px; border-radius: 999px;
  font: 600 11.5px/1.5 var(--font-body); text-align: center; color: var(--ds-ink); background: rgba(164, 92, 255, .22);
}

/* ------------------------------------------------------------------ panel */
html.cw-app #cwTracker { padding: clamp(18px, 2.4vw, 28px); }
html.cw-app #cwTracker .jw-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px 20px; margin-bottom: 14px; }
html.cw-app #cwTracker .jw-head h2 { margin: 0 !important; }
.jw-sum { margin: 6px 0 0 !important; font: 500 15px/1.5 var(--font-body); color: var(--ds-ink-2) !important; }
.jw-sum b { color: var(--ds-ink); font-weight: 600; font-variant-numeric: tabular-nums; }
html.cw-app #cwTracker .jw-head .actions .btn { box-shadow: none !important; }

/* how applying works: the four explanation paragraphs, folded */
.jw-help { margin: 0 0 14px; border: 1px solid var(--ds-panel-border); border-radius: 12px; background: rgba(13, 12, 19, .5); }
.jw-help > summary {
  display: flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 14px; cursor: pointer; list-style: none;
  font: 600 14px/1.3 var(--font-body); color: var(--ds-ink-2);
}
.jw-help > summary::-webkit-details-marker { display: none; }
.jw-help > summary::before { content: ""; width: 7px; height: 7px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(-45deg); transition: transform .15s ease; }
.jw-help[open] > summary::before { transform: rotate(45deg); }
.jw-help > summary:hover { color: var(--ds-ink); }
.jw-help__body { padding: 0 14px 12px; }
.jw-help__body p { margin: 0 0 8px !important; font-size: 14px !important; line-height: 1.55 !important; color: var(--ds-ink-2) !important; }

/* the Assist banner stays visible (it is an action) but quieter */
html.cw-app #cwTracker #calAssistBanner { margin: 0 0 14px; padding: 12px 14px; border-radius: 12px; font-size: 14px; line-height: 1.5; box-shadow: none; }

/* ------------------------------------------------------------------ toolbar */
.jw-bar {
  position: sticky; top: var(--jw-top, 0px); z-index: 5; display: grid; gap: 10px; margin: 0 0 12px; padding: 12px;
  border: 1px solid var(--ds-panel-border); border-radius: 12px; background: rgba(12, 11, 17, .96);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
}
.jw-bar__row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.jw-search { position: relative; flex: 1 1 280px; min-width: 0; }
.jw-search input {
  width: 100%; min-height: 42px; padding: 0 40px 0 36px !important; border-radius: 10px !important;
  font: 500 15px/1 var(--font-body) !important; color: var(--ds-ink) !important;
  background: #0B0A10 !important; border: 1px solid rgba(178, 120, 255, .28) !important; box-shadow: none !important;
}
.jw-search input::placeholder { color: var(--ds-ink-3); }
.jw-search input:focus { border-color: var(--ds-violet-hi) !important; outline: none; box-shadow: 0 0 0 3px rgba(164, 92, 255, .22) !important; }
.jw-search svg { position: absolute; left: 12px; top: 50%; width: 16px; height: 16px; transform: translateY(-50%); color: var(--ds-ink-3); pointer-events: none; }
.jw-search kbd { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); }
kbd.jw-k {
  display: inline-block; min-width: 20px; padding: 1px 6px; border-radius: 5px; text-align: center;
  font: 600 11.5px/1.5 var(--font-body); color: var(--ds-ink-2); background: #17151F; border: 1px solid rgba(255, 255, 255, .12); border-bottom-width: 2px;
}
.jw-count { font: 500 13.5px/1.3 var(--font-body); color: var(--ds-ink-3); font-variant-numeric: tabular-nums; white-space: nowrap; }
.jw-keys { margin-left: auto; font: 500 12.5px/1.3 var(--font-body); color: var(--ds-ink-3); white-space: nowrap; }
.jw-keys kbd { margin: 0 2px; }

/* the renderer's chips and match filter, as one row of quiet segmented controls */
html.cw-app #cwTracker .jw-bar #trackerFilterBar, html.cw-app #cwTracker .jw-bar #trackerMatchBar { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 !important; padding: 0 !important; border: 0 !important; background: none !important; }
html.cw-app #cwTracker .jw-bar :is(#trackerFilterBar, #trackerMatchBar) :is(button, .chip, a) {
  min-height: 34px; padding: 6px 12px !important; border-radius: 8px !important;
  font: 600 13px/1.2 var(--font-body) !important; letter-spacing: 0 !important; text-transform: none !important;
  color: var(--ds-ink-2) !important; background: transparent !important; border: 1px solid rgba(255, 255, 255, .1) !important; box-shadow: none !important;
}
html.cw-app #cwTracker .jw-bar :is(#trackerFilterBar, #trackerMatchBar) :is(button, .chip, a):hover { color: var(--ds-ink) !important; border-color: rgba(178, 120, 255, .4) !important; }
html.cw-app #cwTracker .jw-bar :is(#trackerFilterBar, #trackerMatchBar) :is(.btn.primary, .active, [aria-pressed="true"]) {
  color: #FFFFFF !important; background: rgba(164, 92, 255, .22) !important; border-color: rgba(198, 155, 255, .55) !important;
}
html.cw-app #cwTracker .jw-bar #trackerMatchBar > :not(button):not(a):not(.chip) { font: 600 12px/1.2 var(--font-body) !important; letter-spacing: .12em; color: var(--ds-ink-3) !important; align-self: center; }

/* ------------------------------------------------------------------ the list */
html.cw-app #cwTracker .table-wrap { overflow: visible; border: 0 !important; background: none !important; box-shadow: none !important; padding: 0 !important; }
html.cw-app #cwTracker .table-wrap table { width: 100%; min-width: 0 !important; border-collapse: separate; border-spacing: 0; }
html.cw-app #cwTracker .table-wrap thead { display: none !important; }
html.cw-app #dashboardView #cwTracker tbody { display: grid !important; gap: 0; padding: 0 !important; }

/* group heading: Ready to apply (2) / To review (32) */
html.cw-app #dashboardView #cwTracker tbody tr.cal-sec-row { display: block !important; margin: 18px 0 6px; padding: 0; background: none !important; }
html.cw-app #dashboardView #cwTracker tbody tr.cal-sec-row:first-child { margin-top: 2px; }
html.cw-app #dashboardView #cwTracker tbody tr.cal-sec-row td {
  display: flex !important; align-items: center; gap: 10px; padding: 0 2px 8px !important; border: 0 !important; border-bottom: 1px solid rgba(255, 255, 255, .08) !important;
  font: 600 12.5px/1.3 var(--font-body) !important; letter-spacing: .14em; text-transform: uppercase; color: var(--ds-gold) !important; background: none !important;
}

/* a job: two lines, one action */
html.cw-app #dashboardView #cwTracker tbody tr[data-job-id] {
  --jw-m: 0;
  display: grid !important; position: relative;
  grid-template-columns: 74px minmax(0, 1.55fr) minmax(0, 1fr) minmax(0, 1.05fr) 148px 196px;
  grid-template-areas: "m t t p s a" "m c l h d a";
  column-gap: 16px; row-gap: 4px; align-items: center;
  margin: 0; padding: 14px 14px 14px 12px !important; border: 0 !important; border-radius: 10px;
  border-bottom: 1px solid rgba(255, 255, 255, .06) !important; background: transparent !important; box-shadow: none !important;
  outline: none; transition: background-color .12s ease;
}
html.cw-app #dashboardView #cwTracker tbody tr[data-job-id]:hover { background: rgba(255, 255, 255, .025) !important; }
html.cw-app #dashboardView #cwTracker tbody tr[data-job-id]:is(:focus, .jw-current) { background: rgba(164, 92, 255, .08) !important; }
html.cw-app #dashboardView #cwTracker tbody tr[data-job-id]:focus-visible { box-shadow: inset 0 0 0 2px var(--ds-violet-hi) !important; }
html.cw-app #dashboardView #cwTracker tbody tr[data-job-id]::before {   /* the current row's left edge */
  content: ""; position: absolute; left: 0; top: 12px; bottom: 12px; width: 2px; border-radius: 2px; background: transparent;
}
html.cw-app #dashboardView #cwTracker tbody tr[data-job-id]:is(:focus, .jw-current)::before { background: var(--ds-violet-hi); }
html.cw-app #dashboardView #cwTracker tbody tr[data-job-id] > td {
  display: block !important; min-width: 0; padding: 0 !important; border: 0 !important; background: none !important;
  font-size: 14px; line-height: 1.4; color: var(--ds-ink-2);
}
html.cw-app #dashboardView #cwTracker tbody tr[data-job-id] > td::before { content: none !important; }
html.cw-app #dashboardView #cwTracker tbody tr[data-job-id] > td:nth-child(1) { grid-area: c; color: var(--ds-ink); font-weight: 500; }
html.cw-app #dashboardView #cwTracker tbody tr[data-job-id] > td:nth-child(2) { grid-area: t; display: flex !important; flex-wrap: wrap; align-items: baseline; gap: 2px 12px; font: 600 16.5px/1.3 var(--font-body); color: var(--ds-ink); }
html.cw-app #dashboardView #cwTracker tbody tr[data-job-id] > td:nth-child(3) { grid-area: l; }
html.cw-app #dashboardView #cwTracker tbody tr[data-job-id] > td:nth-child(4) { grid-area: p; }
html.cw-app #dashboardView #cwTracker tbody tr[data-job-id] > td:nth-child(5) { grid-area: h; display: block !important; font-size: 0; }
html.cw-app #dashboardView #cwTracker tbody tr[data-job-id] > td:nth-child(6) { grid-area: m; align-self: stretch; }
html.cw-app #dashboardView #cwTracker tbody tr[data-job-id] > td:nth-child(7) { grid-area: s; }
html.cw-app #dashboardView #cwTracker tbody tr[data-job-id] > td:nth-child(8) { grid-area: d; }
html.cw-app #dashboardView #cwTracker tbody tr[data-job-id] > td:nth-child(9) { grid-area: a; display: grid !important; gap: 6px; justify-items: stretch; align-self: center; }

/* title + "See description" as a text link */
html.cw-app #cwTracker .cal-desc-btn {
  min-height: 0 !important; padding: 0 !important; border: 0 !important; background: none !important; box-shadow: none !important;
  font: 500 13px/1.3 var(--font-body) !important; color: var(--ds-violet-hi) !important; text-decoration: underline; text-underline-offset: 3px; text-decoration-color: rgba(198, 155, 255, .4); cursor: pointer;
}
html.cw-app #cwTracker .cal-desc-btn:hover { color: #FFFFFF !important; }
/* the location reads as the company's place: "Northwind Logistics · Savannah, GA" */
html.cw-app #dashboardView #cwTracker tbody tr[data-job-id] > td:nth-child(3)::before { content: "·" !important; margin-right: 8px; color: var(--ds-ink-3); }
html.cw-app #cwTracker .cal-posting-link { font-size: 13.5px; color: var(--ds-ink-2) !important; text-decoration: underline; text-underline-offset: 3px; text-decoration-color: rgba(255, 255, 255, .25); }
html.cw-app #cwTracker .cal-posting-link:hover { color: var(--ds-ink) !important; }

/* where it is applied: the plain sentence, without the raw source name or the extra chip */
html.cw-app #cwTracker td:nth-child(5) .cal-auto { display: none !important; }
html.cw-app #cwTracker td:nth-child(5) :is(.cal-how, .cal-how-up) {
  display: inline-flex !important; align-items: center; gap: 7px; margin: 0 !important; padding: 0 !important; border: 0 !important; background: none !important;
  font: 500 13px/1.35 var(--font-body) !important; color: var(--ds-ink-2) !important; letter-spacing: 0 !important; text-transform: none !important;
}
html.cw-app #cwTracker td:nth-child(5) .cal-how::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--ds-ink-3); flex: none; }
html.cw-app #cwTracker td:nth-child(5) .cal-how--auto::before { background: #6FD9A2; }
html.cw-app #cwTracker td:nth-child(5) .cal-how--assist::before { background: var(--ds-violet-hi); }
html.cw-app #cwTracker td:nth-child(5) .cal-how-up { display: block !important; margin-top: 2px !important; font-size: 12.5px !important; color: var(--ds-gold) !important; }

/* match: a plain number and a thin bar, no glow; the Calibration note small beneath */
html.cw-app #dashboardView #cwTracker tbody tr[data-job-id] > td:nth-child(6) {
  display: grid !important; align-content: center; justify-items: start; gap: 5px; padding-right: 4px !important;
  font: 600 22px/1 var(--font-body) !important; letter-spacing: -.01em; color: var(--ds-ink) !important; font-variant-numeric: tabular-nums;
}
html.cw-app #dashboardView #cwTracker tbody tr[data-job-id] > td:nth-child(6)::after {
  content: ""; display: block; width: 100%; height: 3px; border-radius: 2px; order: 1;
  background: linear-gradient(90deg, var(--jw-bar, #A99FC0) calc(var(--jw-m) * 1%), rgba(255, 255, 255, .08) 0);
}
html.cw-app #dashboardView #cwTracker tbody tr[data-job-id][data-jw-band="high"] { --jw-bar: #6FD9A2; }
html.cw-app #dashboardView #cwTracker tbody tr[data-job-id][data-jw-band="mid"] { --jw-bar: #E6C681; }
html.cw-app #cwTracker .cal-fit { order: 2; margin: 0 !important; font: 500 11.5px/1.2 var(--font-body) !important; letter-spacing: 0 !important; color: var(--ds-ink-3) !important; }

/* status: a flat outline tag */
html.cw-app #cwTracker td:nth-child(7) .pill {
  display: inline-block; padding: 3px 9px !important; border-radius: 6px !important;
  font: 600 12px/1.35 var(--font-body) !important; letter-spacing: .02em !important; text-transform: none !important;
  color: var(--ds-ink-2) !important; background: transparent !important; border: 1px solid rgba(255, 255, 255, .16) !important; box-shadow: none !important;
}
html.cw-app #cwTracker tr[data-sec="ready"] td:nth-child(7) .pill { color: #9EE6C0 !important; border-color: rgba(111, 217, 162, .45) !important; }
/* dates */
html.cw-app #cwTracker .cal-date-cell { display: grid !important; gap: 2px; font-size: 13px !important; }
html.cw-app #cwTracker .cal-applyby { color: var(--ds-ink-2); }
html.cw-app #cwTracker .cal-matched-on { font-size: 12.5px; color: var(--ds-ink-3); }

/* one clear action per row: flat buttons, no glow; the secondary ones as quiet outlines */
html.cw-app #cwTracker tr[data-job-id] td:nth-child(9) :is(.btn, a.btn, button) {
  width: 100%; min-height: 38px; padding: 8px 12px !important; border-radius: 9px !important; white-space: nowrap;
  font: 600 13.5px/1.2 var(--font-body) !important; box-shadow: none !important; text-shadow: none !important; transform: none !important;
}
html.cw-app #cwTracker tr[data-job-id] td:nth-child(9) .btn.primary { background: #7C42E2 !important; border: 1px solid #8F5BEA !important; color: #FFFFFF !important; }
html.cw-app #cwTracker tr[data-job-id] td:nth-child(9) .btn.primary:hover { background: #8A52EE !important; }
html.cw-app #cwTracker tr[data-job-id] td:nth-child(9) .btn.ghost { background: transparent !important; border: 1px solid rgba(255, 255, 255, .18) !important; color: var(--ds-ink) !important; }
html.cw-app #cwTracker tr[data-job-id] td:nth-child(9) .btn.ghost:hover { border-color: rgba(198, 155, 255, .55) !important; }
html.cw-app #cwTracker tr[data-job-id] td:nth-child(9) :not(.btn):not(button):not(a) { font-size: 12px; line-height: 1.3; color: var(--ds-ink-3); text-align: center; }
html.cw-app #cwTracker .cw-charge::before, html.cw-app #cwTracker .cw-charge::after { content: none !important; }

/* rows that follow a job (fill panel, receipts) span the list */
html.cw-app #dashboardView #cwTracker tbody tr:not([data-job-id]):not(.cal-sec-row) { display: block !important; margin: 0 0 8px; }
html.cw-app #dashboardView #cwTracker tbody tr:not([data-job-id]):not(.cal-sec-row) > td { display: block !important; border: 0 !important; }
html.cw-app #dashboardView #cwTracker tbody tr[hidden] { display: none !important; }

/* empty filter result */
.jw-empty { margin: 8px 0 4px; padding: 22px 16px; border: 1px dashed rgba(255, 255, 255, .14); border-radius: 12px; text-align: center; font: 500 15px/1.5 var(--font-body); color: var(--ds-ink-2); }
.jw-empty button { margin-top: 8px; }

/* pager */
html.cw-app #cwTracker #trackerShowMore { margin-top: 16px !important; }

/* ------------------------------------------------------------------ the Overview summary */
#cwJobsSummary .jw-ov { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 18px 28px; align-items: start; }
#cwJobsSummary h2 { margin: 0 0 6px !important; }
.jw-ov__stats { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 16px; }
.jw-ov__stat { display: grid; gap: 2px; min-width: 112px; padding: 10px 12px; border: 1px solid rgba(255, 255, 255, .1); border-radius: 10px; text-decoration: none; }
.jw-ov__stat:hover { border-color: rgba(198, 155, 255, .45); }
.jw-ov__stat b { font: 600 22px/1 var(--font-body); color: var(--ds-ink); font-variant-numeric: tabular-nums; }
.jw-ov__stat span { font: 500 12.5px/1.3 var(--font-body); color: var(--ds-ink-3); }
.jw-ov__top { display: grid; gap: 0; margin: 0; padding: 0; list-style: none; }
.jw-ov__top li a {
  display: grid; grid-template-columns: 48px minmax(0, 1fr); gap: 12px; align-items: center; padding: 10px 6px; border-bottom: 1px solid rgba(255, 255, 255, .06);
  text-decoration: none; color: var(--ds-ink-2); border-radius: 8px;
}
.jw-ov__top li a:hover { background: rgba(255, 255, 255, .03); }
.jw-ov__top b { font: 600 18px/1 var(--font-body); color: var(--ds-ink); font-variant-numeric: tabular-nums; }
.jw-ov__top strong { display: block; font: 600 15px/1.3 var(--font-body); color: var(--ds-ink); }
.jw-ov__top span { font-size: 13.5px; color: var(--ds-ink-3); }
.jw-ov__empty { margin: 8px 0 0 !important; color: var(--ds-ink-3) !important; }

/* ------------------------------------------------------------------ narrower containers and phones */
@container cw-tracker (max-width: 1080px) {
  html.cw-app #dashboardView #cwTracker tbody tr[data-job-id] {
    grid-template-columns: 64px minmax(0, 1.5fr) minmax(0, 1fr) 170px;
    grid-template-areas: "m t t a" "m c l a" "m h p a" "m s d a";
  }
}
@container cw-tracker (max-width: 700px) {
  html.cw-app #dashboardView #cwTracker tbody tr[data-job-id] {
    grid-template-columns: 56px minmax(0, 1fr);
    grid-template-areas: "m t" "m c" "m l" "h h" "p p" "s d" "a a";
    row-gap: 6px; padding: 14px 12px !important; margin-bottom: 10px; border: 1px solid rgba(255, 255, 255, .08) !important; border-radius: 12px;
  }
  html.cw-app #dashboardView #cwTracker tbody tr[data-job-id] > td:nth-child(3)::before { content: none !important; }
  html.cw-app #dashboardView #cwTracker tbody tr[data-job-id] > td:nth-child(6) { align-self: start; font-size: 20px !important; }
  html.cw-app #dashboardView #cwTracker tbody tr[data-job-id] > td:nth-child(8) { justify-self: end; text-align: right; }
  html.cw-app #dashboardView #cwTracker tbody tr[data-job-id] > td:nth-child(9) { margin-top: 6px; }
  html.cw-app #cwTracker tr[data-job-id] td:nth-child(9) :is(.btn, a.btn, button) { min-height: 44px; white-space: normal; }
}
@media (max-width: 760px) {
  #cwJobsSummary .jw-ov { grid-template-columns: 1fr; }
  .jw-keys { display: none; }
  .jw-search kbd { display: none; }
  .jw-bar { position: static; }
}
@media (prefers-reduced-motion: reduce) { html.cw-app #dashboardView #cwTracker tbody tr[data-job-id], .jw-help > summary::before { transition: none; } }
@media (forced-colors: active) {
  html.cw-app #dashboardView #cwTracker tbody tr[data-job-id]:is(:focus, .jw-current) { outline: 2px solid Highlight; }
  html.cw-app #dashboardView #cwTracker tbody tr[data-job-id] > td:nth-child(6)::after { background: CanvasText; }
}

/* status lines between the help and the toolbar take no room until they have something to say (they stay in the page
   for screen readers: aria-live) */
html.cw-app #cwTracker :is(#discoveryStatus, #trackerMoveStatus, #trackerTargets):empty { min-height: 0 !important; margin: 0 !important; }
/* phones: the Calibration note is in "How applying works"; under the score it collided with the title */
@container cw-tracker (max-width: 700px) { html.cw-app #cwTracker tr[data-job-id] .cal-fit { display: none !important; } }
