/* static/css/workstyle.css — "Your workstyle" (static/js/workstyle.js) and its live nudge
 * (static/js/workstyle_nudge.js).
 *
 * The card spends the Insights tokens (#bx-insights --pk-*, insights.css) and sits in the chart
 * grid, directly above "Your most-used keywords". Every card rule is under #bx-insights .pk-ws; the nudge's under
 * .pk-ws-nudge. Delete the script tags and nothing here matches anything (C3).
 */
/* Its own grid row directly above "Your most-used keywords" (kw). The areas below restate
 * insights.css's three layouts with one "ws" row added; .pk-grid--ws is set by workstyle.js
 * only while the card is in the grid, so without it insights.css's areas apply unchanged. */
#bx-insights .pk-grid > .pk-ws { grid-area: ws; }
#bx-insights .pk-grid.pk-grid--ws {
  grid-template-areas:
    "act act act act act act act act mon mon mon mon"
    "bar bar bar bar bar bar rej rej rej rec rec rec"
    "ws  ws  ws  ws  ws  ws  ws  ws  ws  ws  ws  ws"
    "kw  kw  kw  kw  kw  kw  kw  kw  kw  kw  kw  kw";
}
@media (max-width: 1439px) {
  #bx-insights .pk-grid.pk-grid--ws { grid-template-areas: "act act" "mon rec" "bar bar" "ws ws" "rej kw"; }
}
@media (max-width: 899px) {
  #bx-insights .pk-grid.pk-grid--ws { grid-template-areas: "act" "mon" "rej" "bar" "rec" "ws" "kw"; }
}

#bx-insights .pk-ws { gap: 12px; }
#bx-insights .pk-ws .pk-card__head { align-items: center; }
#bx-insights .pk-ws__meta { display: flex; align-items: center; gap: 10px; min-width: 180px; }
#bx-insights .pk-ws__meta .pk-meter { width: 120px; flex: none; }
#bx-insights .pk-ws__sub { margin: -6px 0 0; font-size: 13px; color: var(--pk-muted); }

#bx-insights .pk-ws__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  /* Never more than three across: six thin columns on a wide screen cut the values short. */
  grid-template-columns: repeat(auto-fill, minmax(max(260px, calc((100% - 20px) / 3)), 1fr));
  gap: 10px;
}
#bx-insights .pk-ws__row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 10px;
  background: var(--pk-subtle);
  border: 1px solid var(--pk-border);
  min-width: 0;
}
#bx-insights .pk-ws__row--season {
  grid-column: 1 / -1;
  background: var(--pk-gold-tint);
  border-color: transparent;
}
#bx-insights .pk-ws__icon {
  flex: none;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--pk-gold-text);
  background: var(--pk-gold-tint);
}
#bx-insights .pk-ws__row--season .pk-ws__icon { background: var(--pk-card); }
#bx-insights .pk-ws__row.is-learning .pk-ws__icon { color: var(--pk-faint); background: var(--pk-track); }
#bx-insights .pk-ws__body { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
#bx-insights .pk-ws__label { font-size: 12.5px; font-weight: 500; color: var(--pk-muted); }
#bx-insights .pk-ws__value { font-size: 15px; font-weight: 600; line-height: 1.35; color: var(--pk-text); overflow-wrap: anywhere; }
#bx-insights .pk-ws__ev { font-size: 12.5px; line-height: 1.45; color: var(--pk-muted); }
#bx-insights .pk-ws__need { font-size: 13px; line-height: 1.45; color: var(--pk-faint); font-style: italic; }
#bx-insights .pk-ws__acts { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; margin-top: 8px; }
#bx-insights .pk-ws__do { font-size: 13px; padding: 6px 12px; }
#bx-insights .pk-ws__do:disabled { opacity: .6; cursor: default; }
#bx-insights .pk-ws__no,
#bx-insights .pk-ws__forget {
  font: inherit;
  font-size: 13px;
  background: none;
  border: 0;
  padding: 2px 0;
  color: var(--pk-muted);
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
}
#bx-insights .pk-ws__no:hover,
#bx-insights .pk-ws__forget:hover { color: var(--pk-text); }
#bx-insights .pk-ws__no:focus-visible,
#bx-insights .pk-ws__forget:focus-visible,
#bx-insights .pk-ws__do:focus-visible { outline: 2px solid var(--pk-video); outline-offset: 2px; }

#bx-insights .pk-ws__privacy {
  margin: 2px 0 0;
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--pk-muted);
}
#bx-insights .pk-ws__privacy .pk-ws__icon { width: 18px; height: 18px; background: none; color: var(--pk-muted); }
#bx-insights .pk-ws__privacy .pk-ws__icon svg { width: 15px; height: 15px; }
#bx-insights .pk-ws__privacy-text { min-width: 0; }
#bx-insights .pk-ws__privacy .pk-ws__forget { font-size: 12.5px; padding: 0; white-space: nowrap; }
#bx-insights .pk-ws__part { white-space: nowrap; }

@media (max-width: 599px) {
  #bx-insights .pk-ws .pk-card__head { flex-direction: column; align-items: flex-start; }
  #bx-insights .pk-ws__list { grid-template-columns: minmax(0, 1fr); }
}

/* ---------- The live nudge ---------- */
.pk-ws-nudge {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%);
  z-index: 9999;              /* under the toast stack (10000) */
  width: min(520px, calc(100vw - 32px));
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 16px;
  padding: 12px 16px;
  border-radius: var(--r, 10px);
  background: var(--s2);
  color: var(--text);
  border: 1px solid var(--border2);
  box-shadow: 0 6px 24px rgba(0, 0, 0, .35);
  font-size: .85rem;
  line-height: 1.4;
}
.pk-ws-nudge__text { margin: 0; min-width: 0; flex: 1 1 220px; }
.pk-ws-nudge__acts { display: flex; align-items: center; gap: 12px; }
.pk-ws-nudge__yes {
  font: inherit;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: 8px;
  border: 0;
  cursor: pointer;
  background: var(--gold);
  color: var(--on-gold, #1a1400);
}
.pk-ws-nudge__no {
  font: inherit;
  background: none;
  border: 0;
  padding: 2px 0;
  cursor: pointer;
  color: var(--dim);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.pk-ws-nudge__yes:focus-visible,
.pk-ws-nudge__no:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
