/* Projects app — the pages. Everything inside the work panel: the views
   (Projects, Topics, Studio, Console, Sources, Chat, the reader) and their
   components (buttons, fields, cards, tabs, drawers, the step dock).
   The frame around them (top bar, rail, work panel) and the brand basics are
   projects-shell.css; a rule for the frame goes there, never here.
   Only on the projects port (<html data-experience="projects">, set by the
   server so nothing flashes). Built on the shared --rp- tokens so light and
   dark themes both work. */

html[data-experience="projects"] body.pj-drawer-open { overflow: hidden; }

.pj {
  /* Desk (DESIGN.md, user 2026-11-06): 16px cards and panels on hairlines
     with the source's faint layered shadow; things that float go one step up. */
  --pj-radius: var(--rp-radius-xl);
  --pj-line: var(--rp-border);
  --pj-soft: var(--rp-surface-muted);
  --pj-shadow: var(--rp-shadow-sm);
  --pj-shadow-hover: var(--rp-shadow-md);
  /* The card look (project cards, report cards, source cards). */
  --pj-card-radius: var(--rp-radius-xl);
  --pj-card-shadow: var(--rp-shadow-sm);
  --pj-card-shadow-hover: var(--rp-shadow-md);
  max-width: 1080px;
  margin: 0 auto;
  width: 100%;
  box-sizing: border-box;
  padding: 4px 0 120px;
}
.pj *, .pj *::before, .pj *::after { box-sizing: border-box; }
/* Dialogs (Settings, Automation's + New) sit on <body>, outside .pj: same variables. */
.pj-sethost {
  --pj-radius: var(--rp-radius-xl);
  --pj-line: var(--rp-border);
  --pj-soft: var(--rp-surface-muted);
  --pj-shadow: var(--rp-shadow-sm);
  --pj-shadow-hover: var(--rp-shadow-md);
}
.pj-sethost *, .pj-sethost *::before, .pj-sethost *::after { box-sizing: border-box; }
.pj-sethost svg { flex: none; }
.pj svg { flex: none; }

/* ── type and basics ─────────────────────────────────────── */
.pj-h1 { margin: 0; font-size: var(--rp-text-xl); font-weight: 600; letter-spacing: -0.025em; line-height: 1.2; color: var(--rp-heading); overflow-wrap: anywhere; }
.pj-h1--topic { font-size: var(--rp-text-xl); }
.pj-h1--report { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; overflow: hidden; }
.pj-h2 { margin: 0; font-size: var(--rp-text-md); font-weight: 600; color: var(--rp-heading); }
html[lang="fa"] .pj-h1 { letter-spacing: 0; line-height: 1.5; }
.pj-lede { margin: 4px 0 0; color: var(--rp-text-muted); font-size: var(--rp-text-sm); }
.pj-label { display: block; margin-bottom: 8px; font-size: var(--rp-text-xs); font-weight: 600; letter-spacing: 0.02em; color: var(--rp-text-muted); }
.pj-muted { color: var(--rp-text-muted); }
.pj-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.pj-err { margin: 6px 0 0; min-height: 1em; color: var(--rp-danger-text); font-size: var(--rp-text-xs); }
.pj-empty-line { display: flex; align-items: center; gap: 8px; margin: 8px 0; color: var(--rp-text-muted); font-size: var(--rp-text-sm); }
.pj-empty-line svg { width: 16px; height: 16px; opacity: 0.7; }

.pj-top { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin: 0 0 24px; }
.pj-top__copy { min-width: 0; }
.pj-top--topic { margin-bottom: 22px; }

.pj-crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 0 0 10px; font-size: var(--rp-text-xs); color: var(--rp-text-muted); }
.pj-crumbs a { color: var(--rp-text-secondary); text-decoration: none; }
.pj-crumbs a:hover { color: var(--rp-heading); }
.pj-crumbs__sep { opacity: 0.4; }
/* Back to the project, at the far end of a topic step's crumb line. Arrow points to the start side. */
.pj-crumbrow { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0 0 10px; }
.pj-crumbrow .pj-crumbs { margin: 0; min-width: 0; }
.pj-crumbrow__acts { flex: none; display: inline-flex; align-items: center; gap: 8px; }
.pj-crumbrow .pj-icon-btn--crumb { width: 28px; height: 28px; }
.pj-crumbrow .pj-icon-btn--crumb svg { width: 14px; height: 14px; }
.pj-backlink { flex: none; display: inline-flex; align-items: center; gap: 6px; height: 28px; margin: 0; padding: 0 12px; border: 1px solid var(--rp-border-control); border-radius: 999px; background: var(--rp-surface); color: var(--rp-text-secondary); font-size: var(--rp-text-xs); font-weight: 600; text-decoration: none; transition: border-color var(--rp-duration-fast), color var(--rp-duration-fast); }
.pj-backlink:hover { border-color: var(--rp-border-strong, var(--rp-border-control)); color: var(--rp-heading); }
.pj-backlink svg { width: 14px; height: 14px; }
html:not([dir="rtl"]) .pj-backlink svg { transform: scaleX(-1); }

/* ── controls ─────────────────────────────────────────────── */
.pj-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 38px; padding: 0 14px;
  border: 1px solid var(--pj-line); border-radius: var(--rp-radius-lg);
  background: var(--rp-surface); color: var(--rp-heading);
  font: inherit; font-size: var(--rp-text-sm); font-weight: 600; white-space: nowrap;
  text-decoration: none; cursor: pointer;
  transition: background var(--rp-duration-fast) var(--rp-ease-out), border-color var(--rp-duration-fast), box-shadow var(--rp-duration-fast), transform var(--rp-duration-fast);
}
.pj-btn svg { width: 16px; height: 16px; }
.pj-btn:hover { border-color: var(--rp-border-strong); }
.pj-btn:active { transform: scale(0.98); }
.pj-btn:disabled, .pj-btn.is-disabled { opacity: 0.45; cursor: not-allowed; }
.pj-btn--primary { background: var(--rp-heading); border-color: var(--rp-heading); color: var(--rp-surface); }
.pj-btn--primary:hover { background: var(--rp-action); border-color: var(--rp-action); color: var(--rp-text-on-action); }
.pj-btn--ghost { background: transparent; border-color: transparent; color: var(--rp-text-secondary); }
.pj-btn--ghost:hover { background: var(--pj-soft); border-color: transparent; }
.pj-btn--sm { height: 30px; padding: 0 10px; font-size: var(--rp-text-xs); border-radius: var(--rp-radius-lg); }
/* Arrows point the way the steps go. */
html[dir="rtl"] .pj-btn > svg:last-child { transform: scaleX(-1); }

.pj-icon-btn {
  display: inline-grid; place-items: center; width: 34px; height: 34px; flex: none;
  border: 0; border-radius: var(--rp-radius-lg); background: transparent; color: var(--rp-text-muted);
  cursor: pointer; text-decoration: none;
  transition: background var(--rp-duration-fast), color var(--rp-duration-fast);
}
.pj-icon-btn svg { width: 17px; height: 17px; }
.pj-icon-btn:hover { background: var(--pj-soft); color: var(--rp-heading); }
.pj-icon-btn--danger:hover { background: var(--rp-danger-soft); color: var(--rp-danger-text); }
.pj-icon-btn--solid { background: var(--rp-heading); color: var(--rp-surface); }
.pj-icon-btn--solid:hover { background: var(--rp-action); color: var(--rp-text-on-action); }

.pj-link { border: 0; background: none; padding: 0; color: var(--pj-accent); font: inherit; font-size: var(--rp-text-xs); font-weight: 600; cursor: pointer; }
.pj-link:hover { text-decoration: underline; }

/* The card's tag input keeps the app's own compact field (styles.css). */
.pj input:not([type="checkbox"]):not(.library-tag-input), .pj textarea {
  width: 100%; padding: 10px 12px;
  border: 1px solid var(--pj-line); border-radius: var(--rp-radius-lg);
  background: var(--rp-surface); color: var(--rp-text);
  font: inherit; font-size: var(--rp-text-sm); line-height: var(--rp-leading-body);
  resize: vertical; transition: border-color var(--rp-duration-fast), box-shadow var(--rp-duration-fast);
}
.pj input::placeholder, .pj textarea::placeholder { color: var(--rp-text-faint); }
.pj input:not(.library-tag-input):focus, .pj textarea:focus { outline: none; border-color: var(--rp-focus); box-shadow: 0 0 0 1px var(--rp-focus); }
.pj .pj-input--lg { font-size: var(--rp-text-md); font-weight: 500; }
.pj-field { display: block; margin-bottom: 16px; }

.pj-chip {
  display: inline-flex; align-items: center; height: 28px; padding: 0 10px;
  border: 1px solid var(--pj-line); border-radius: 999px; background: transparent;
  color: var(--rp-text-secondary); font: inherit; font-size: var(--rp-text-xs); font-weight: 600; cursor: pointer;
}
.pj-chip:hover { color: var(--rp-heading); border-color: var(--rp-border-strong); }
.pj-chip--dashed { border-style: dashed; }
.pj-tag { display: inline-flex; align-items: center; margin: 0 4px 4px 0; padding: 2px 8px; border-radius: var(--rp-radius-md); background: var(--pj-soft); font-size: var(--rp-text-xs); color: var(--rp-text-secondary); }

/* segmented control */
.pj-seg { display: inline-flex; flex-wrap: wrap; gap: 2px; padding: 3px; margin: 14px 0 12px; border-radius: var(--rp-radius-lg); background: var(--pj-soft); }
.pj-seg__btn { position: relative; height: 30px; padding: 0 12px; border: 0; border-radius: var(--rp-radius-lg); background: transparent; color: var(--rp-text-secondary); font: inherit; font-size: var(--rp-text-xs); font-weight: 600; cursor: pointer; }
.pj-seg__btn:hover { color: var(--rp-heading); }
.pj-seg__btn.is-on { background: var(--rp-surface); color: var(--rp-heading); box-shadow: var(--pj-shadow); }
.pj-seg__btn.has-pick::after { content: ""; position: absolute; top: 6px; inset-inline-end: 5px; width: 5px; height: 5px; border-radius: 50%; background: var(--pj-accent); }
.pj-seg--sm { margin: 10px 0 8px; }

/* toggle */
.pj-toggle { position: relative; display: inline-flex; cursor: pointer; }
.pj-toggle input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; z-index: 1; }
.pj-toggle__track { width: 34px; height: 20px; border-radius: 999px; background: var(--rp-border-strong); transition: background var(--rp-duration-fast); position: relative; }
.pj-toggle__track::after { content: ""; position: absolute; top: 2px; inset-inline-start: 2px; width: 16px; height: 16px; border-radius: 50%; background: var(--rp-white); box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2); transition: inset-inline-start var(--rp-duration-fast) var(--rp-ease-out); }
.pj-toggle input:checked + .pj-toggle__track { background: var(--rp-heading); }
.pj-toggle input:checked + .pj-toggle__track::after { inset-inline-start: 16px; }
.pj-toggle input:focus-visible + .pj-toggle__track { outline: 2px solid var(--rp-focus); outline-offset: 2px; }

/* status: dot + pill, one colour per state */
.pj-state--ready { --pj-state: var(--rp-success-indicator); }
.pj-state--pending { --pj-state: var(--rp-info-indicator); }
.pj-state--awaiting_input { --pj-state: var(--rp-warning-indicator); }
.pj-state--failed { --pj-state: var(--rp-danger-indicator); }
.pj-state--stopped { --pj-state: var(--rp-inactive); }
.pj-state--runnable { --pj-state: var(--rp-success-indicator); }
.pj-state--draft { --pj-state: var(--rp-border-strong); }
.pj-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--pj-state, var(--rp-border-strong)); flex: none; }
.pj-dot--awaiting_input { --pj-state: var(--rp-warning-indicator); }
.pj-state--pending .pj-dot { animation: pj-pulse 1.4s ease-in-out infinite; }
.pj-pill {
  display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 9px;
  border-radius: 999px; font-size: var(--rp-text-2xs); font-weight: 600; white-space: nowrap;
  background: color-mix(in srgb, var(--pj-state) 12%, transparent);
  color: color-mix(in srgb, var(--pj-state) 70%, var(--rp-heading));
}
.pj-pill.pj-state--draft { background: var(--pj-soft); color: var(--rp-text-muted); }
@keyframes pj-pulse { 50% { opacity: 0.3; } }
@keyframes pj-fade { from { opacity: 0; } }

.pj-spinner { width: 14px; height: 14px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: pj-spin 0.8s linear infinite; display: inline-block; }
@keyframes pj-spin { to { transform: rotate(360deg); } }
.pj-skeleton { height: 150px; border-radius: var(--pj-radius); background: linear-gradient(90deg, var(--pj-soft), var(--rp-surface), var(--pj-soft)); background-size: 200% 100%; animation: pj-shimmer 1.4s linear infinite; }
.pj-skeleton--row { height: 64px; }
.pj-skeleton--tall { height: 360px; }
@keyframes pj-shimmer { to { background-position: -200% 0; } }
.pj-problem { max-width: 380px; margin: 0 auto; padding: 72px 0; text-align: center; color: var(--rp-text-secondary); }
.pj-problem__title { margin: 0 0 8px; font-size: var(--rp-text-base); font-weight: 600; color: var(--rp-heading); }
.pj-problem__hint { margin: 0 0 24px; font-size: var(--rp-text-sm); line-height: 1.7; }
.pj-problem .pj-row { justify-content: center; gap: 8px; }
.pj-problem { --pj-problem-tint: var(--rp-text-muted); --pj-problem-soft: var(--pj-soft); }
.pj-problem--offline { --pj-problem-tint: var(--rp-warning); --pj-problem-soft: var(--rp-warning-soft); }
.pj-problem--server { --pj-problem-tint: var(--rp-danger); --pj-problem-soft: var(--rp-danger-soft); }
.pj-problem__icon { display: inline-grid; place-items: center; width: 56px; height: 56px; margin-bottom: 18px; border-radius: 50%; background: var(--pj-problem-soft); color: var(--pj-problem-tint); animation: pj-problem-in 320ms var(--rp-ease-out, ease-out) both; }
.pj-problem__icon svg { width: 26px; height: 26px; }
.pj-problem__live { display: inline-flex; align-items: center; gap: 8px; margin: -8px 0 22px; font-size: var(--rp-text-xs); color: var(--rp-text-muted); }
.pj-problem__live.is-trying { color: var(--rp-heading); }
.pj-problem__pulse { width: 7px; height: 7px; border-radius: 50%; background: var(--pj-problem-tint); animation: pj-problem-pulse 1.6s ease-in-out infinite; }
.pj-problem__live.is-trying .pj-problem__pulse { background: var(--pj-accent); animation-duration: 0.8s; }
@keyframes pj-problem-in { from { opacity: 0; transform: translateY(4px) scale(0.94); } }
@keyframes pj-problem-pulse { 50% { opacity: 0.25; transform: scale(0.7); } }
@media (prefers-reduced-motion: reduce) { .pj-problem__icon, .pj-problem__pulse { animation: none; } }

/* ── 1 Projects ─────────────────────────────────────────── */
.pj-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; }
.pj-card {
  position: relative; overflow: hidden;
  display: flex; flex-direction: column; gap: 8px; min-height: 160px; padding: 20px;
  border: 1px solid var(--pj-line); border-radius: var(--pj-radius);
  background: var(--rp-surface); color: inherit; text-decoration: none; text-align: start;
  box-shadow: var(--pj-shadow);
  animation: pj-deal 380ms var(--rp-ease-out) both; animation-delay: calc(var(--i, 0) * 40ms);
  transition: transform var(--rp-duration-base) var(--rp-ease-out), box-shadow var(--rp-duration-base) var(--rp-ease-out), border-color var(--rp-duration-base);
}
.pj-card:hover { transform: translateY(-2px); box-shadow: var(--pj-shadow-hover); border-color: var(--rp-border-strong); }
.pj-card::before { content: ""; position: absolute; inset-inline: 0; top: 0; height: 2px; background: var(--pj-accent, transparent); }
.pj-card--awaiting_input { --pj-accent: var(--rp-warning-indicator); }
.pj-card--failed { --pj-accent: var(--rp-danger-indicator); }
.pj-card--pending { --pj-accent: var(--rp-info-indicator); }
.pj-card__num { position: absolute; inset-inline-end: 16px; top: 10px; font-size: var(--rp-text-xl); font-weight: 600; line-height: 1; letter-spacing: -0.05em; color: var(--rp-heading); opacity: 0.05; pointer-events: none; user-select: none; transition: opacity var(--rp-duration-base), transform var(--rp-duration-base) var(--rp-ease-out); }
html[lang="fa"] .pj-card__num { letter-spacing: 0; }
.pj-card:hover .pj-card__num { opacity: 0.1; transform: translateY(2px); }
.pj-card__title { position: relative; padding-inline-end: 52px; font-size: var(--rp-text-md); font-weight: 400; letter-spacing: -0.01em; line-height: 1.35; color: var(--rp-heading); overflow-wrap: anywhere; }
html[lang="fa"] .pj-card__title { letter-spacing: 0; }
.pj-card__desc { position: relative; padding-inline-end: 52px; color: var(--rp-text-muted); font-size: var(--rp-text-xs); line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pj-card__alert { display: inline-flex; align-items: center; gap: 6px; font-size: var(--rp-text-xs); font-weight: 600; color: var(--rp-warning-text); }
.pj-strip { display: flex; gap: 3px; height: 4px; margin-top: auto; }
.pj-strip__seg { flex: 1; max-width: 32px; border-radius: 2px; background: var(--pj-state); }
.pj-strip__seg.pj-state--pending { animation: pj-pulse 1.4s ease-in-out infinite; }
.pj-card__meta { display: flex; align-items: center; gap: 14px; padding-top: 12px; border-top: 1px solid var(--rp-border-subtle); color: var(--rp-text-muted); font-size: var(--rp-text-xs); font-weight: 600; }
.pj-strip + .pj-card__meta { margin-top: 4px; }
.pj-card__title + .pj-card__meta, .pj-card__desc + .pj-card__meta { margin-top: auto; }
.pj-card__meta > span { display: inline-flex; align-items: center; gap: 5px; }
.pj-card__meta svg { width: 14px; height: 14px; opacity: 0.7; }
.pj-card__date { margin-inline-start: auto; }
.pj-card--earlier { background: transparent; box-shadow: none; border-style: dashed; }
.pj-card--earlier .pj-card__title { color: var(--rp-text-secondary); }
.pj-card--add { align-items: center; justify-content: center; gap: 10px; border-style: dashed; background: transparent; box-shadow: none; color: var(--rp-text-secondary); font: inherit; font-weight: 600; cursor: pointer; }
.pj-card--add svg { width: 22px; height: 22px; padding: 8px; box-sizing: content-box; border-radius: 50%; background: var(--pj-soft); }
.pj-card--add:hover { color: var(--rp-heading); background: var(--rp-surface); }
.pj-card--wide { width: 100%; min-height: 120px; }
@keyframes pj-deal { from { opacity: 0; transform: translateY(6px); } }

/* ── 2 Topics: list rows ─────────────────────────────────── */
.pj-tlist { border: 1px solid var(--pj-line); border-radius: var(--pj-radius); background: var(--rp-surface); box-shadow: var(--pj-shadow); overflow: hidden; }
.pj-trow {
  position: relative; display: grid; grid-template-columns: auto minmax(0, 1fr) auto 44px 20px; align-items: center; gap: 14px;
  padding: 14px 18px; color: inherit; text-decoration: none;
  transition: background var(--rp-duration-fast);
}
.pj-trow + .pj-trow { border-top: 1px solid var(--rp-border-subtle); }
.pj-trow::before { content: ""; position: absolute; inset-inline-start: 0; top: 12px; bottom: 12px; width: 3px; border-radius: 0 3px 3px 0; background: var(--pj-state); }
html[dir="rtl"] .pj-trow::before { border-radius: 3px 0 0 3px; }
.pj-trow.pj-state--draft::before { background: transparent; }
.pj-trow:hover { background: var(--pj-soft); }
.pj-trow__icon { display: grid; place-items: center; width: 36px; height: 36px; border-radius: var(--rp-radius-lg); background: var(--rp-tile); color: var(--rp-tile-text); }
.pj-trow__icon svg { width: 18px; height: 18px; }
.pj-trow__icon.is-empty { background: transparent; border: 1px dashed var(--rp-border-strong); color: var(--rp-text-faint); }
.pj-trow__main { display: grid; gap: 2px; min-width: 0; }
.pj-trow__title { font-size: var(--rp-text-sm); font-weight: 600; color: var(--rp-heading); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pj-trow__fw { font-size: var(--rp-text-xs); color: var(--rp-text-muted); }
.pj-trow__count { display: inline-flex; align-items: center; gap: 4px; justify-content: flex-end; font-size: var(--rp-text-xs); font-weight: 600; color: var(--rp-text-muted); }
.pj-trow__count svg { width: 14px; height: 14px; opacity: 0.7; }
.pj-trow__go { color: var(--rp-text-faint); transition: transform var(--rp-duration-fast); }
.pj-trow__go svg { width: 16px; height: 16px; display: block; }
html[dir="rtl"] .pj-trow__go svg { transform: scaleX(-1); }
.pj-trow:hover .pj-trow__go { transform: translateX(2px); color: var(--rp-heading); }
html[dir="rtl"] .pj-trow:hover .pj-trow__go { transform: translateX(-2px); }

/* ── panels ─────────────────────────────────────────────── */
.pj-panel { padding: 18px; margin-bottom: 14px; border: 1px solid var(--pj-line); border-radius: var(--pj-radius); background: var(--rp-surface); box-shadow: var(--pj-shadow); }
.pj-trio { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.pj-trio .pj-panel { margin: 0; }

/* framework picker */
.pj-fw { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 8px; }
.pj-fw--engines { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); margin-top: 12px; }
.pj-fw__card {
  position: relative; display: flex; align-items: center; gap: 10px; min-height: 52px; padding: 10px 12px; text-align: start;
  border: 1px solid var(--pj-line); border-radius: var(--rp-radius-lg); background: var(--rp-surface); color: inherit; font: inherit; cursor: pointer;
  transition: border-color var(--rp-duration-fast), background var(--rp-duration-fast), box-shadow var(--rp-duration-fast);
}
.pj-fw__card:hover { border-color: var(--rp-border-strong); box-shadow: var(--pj-shadow); }
.pj-fw__card.is-on { border-color: var(--rp-heading); box-shadow: 0 0 0 1px var(--rp-heading); }
.pj-fw__card--big { min-height: 64px; padding: 14px; }
.pj-fw__icon { display: grid; place-items: center; width: 30px; height: 30px; flex: none; border-radius: var(--rp-radius-lg); background: var(--rp-tile); color: var(--rp-tile-text); }
.pj-fw__icon svg { width: 16px; height: 16px; }
.pj-fw__card--big .pj-fw__icon { width: 36px; height: 36px; }
.pj-fw__card.is-on .pj-fw__icon { background: var(--rp-heading); color: var(--rp-surface); }
.pj-fw__name { font-size: var(--rp-text-sm); font-weight: 600; color: var(--rp-heading); line-height: 1.3; }
.pj-fw__card--big .pj-fw__name { font-size: var(--rp-text-md); }
.pj-fw__check { margin-inline-start: auto; color: var(--rp-heading); }
.pj-fw__check svg { width: 15px; height: 15px; display: block; }
.pj-fw__picked { display: flex; align-items: center; gap: 12px; }
.pj-fw__picked b { font-size: var(--rp-text-md); color: var(--rp-heading); }
.pj-fw__picked .pj-btn { margin-inline-start: auto; }
.pj-search { position: relative; display: flex; align-items: center; max-width: 380px; }
.pj-search > svg { position: absolute; inset-inline-start: 11px; width: 16px; height: 16px; color: var(--rp-text-faint); pointer-events: none; }
.pj .pj-search input { padding-inline-start: 34px; }
.pj-search .pj-icon-btn { position: absolute; inset-inline-end: 3px; width: 30px; height: 30px; }

/* scope */

.pj-saved { display: inline-flex; align-items: center; gap: 4px; font-size: var(--rp-text-xs); color: var(--rp-text-muted); }
.pj-saved svg { width: 13px; height: 13px; color: var(--rp-success-indicator); }

/* ── 4 Studio ─────────────────────────────────────────── */
/* No frame of its own: Studio's two panes sit on the page's column edges. */
.pj-studio__frame { display: block; width: 100%; height: calc(100dvh - 300px); min-height: 560px; border: 0; background: transparent; }
.pj-skip { display: flex; flex-direction: column; align-items: center; gap: 14px; padding: 56px 24px; text-align: center; border: 1px dashed var(--rp-border-strong); border-radius: var(--pj-radius); }
.pj-skip__icon { display: grid; place-items: center; width: 48px; height: 48px; border-radius: var(--rp-radius-xl); background: var(--rp-tile); color: var(--rp-tile-text); }
.pj-skip__icon svg { width: 22px; height: 22px; }
.pj-skip p { margin: 0; color: var(--rp-text-secondary); font-weight: 500; }

/* ── 5 Console ─────────────────────────────────────────── */
.pj-console { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 14px; align-items: start; }
.pj-console .pj-panel { margin: 0; padding: 20px; }
.pj-review__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.pj-review__tally { font-size: var(--rp-text-xs); font-weight: 600; color: var(--rp-text-muted); font-variant-numeric: tabular-nums; }
.pj-review__tally.is-missing { color: var(--rp-warning-text); }
.pj-review__bar { height: 3px; margin: 12px 0 16px; border-radius: 2px; background: var(--pj-soft); overflow: hidden; }
.pj-review__bar span { display: block; height: 100%; border-radius: 2px; background: var(--rp-heading); transition: width 500ms var(--rp-ease-out); }
.pj-dl { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 0 18px; margin: 0; font-size: var(--rp-text-sm); }
.pj-dl dt, .pj-dl dd { padding: 10px 0; border-top: 1px solid var(--rp-border-subtle); }
.pj-dl dt:first-of-type, .pj-dl dt:first-of-type + dd { border-top: 0; }
.pj-dl dt { display: flex; align-items: center; gap: 9px; color: var(--rp-text-muted); font-weight: 500; }
.pj-dl dd { position: relative; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; margin: 0; padding-inline-end: 30px; color: var(--rp-text); overflow-wrap: anywhere; }
.pj-dl dd .pj-tag { margin: 0; }
.pj-focuspills { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; width: 100%; }
.pj-tag--pill { border-radius: 999px; padding: 3px 10px; }
.pj-tag--in { background: var(--rp-success-soft); box-shadow: inset 0 0 0 1px var(--rp-success-border); color: var(--rp-success-text); }
.pj-tag--out { background: var(--rp-danger-soft); box-shadow: inset 0 0 0 1px var(--rp-danger-border); color: var(--rp-danger-text); }
.pj-row-edit { position: absolute; inset-inline-end: 0; top: 50%; transform: translateY(-50%); display: grid; place-items: center; width: 26px; height: 26px; border-radius: var(--rp-radius-lg); color: var(--rp-text-faint); opacity: 0; transition: opacity var(--rp-duration-fast), background var(--rp-duration-fast); }
.pj-row-edit svg { width: 14px; height: 14px; }
.pj-dl dd:hover .pj-row-edit, .pj-row-edit:focus-visible { opacity: 1; }
.pj-row-edit:hover { background: var(--pj-soft); color: var(--rp-heading); }
@media (hover: none) { .pj-row-edit { opacity: 1; } }
.pj-inline-icon { display: inline-grid; place-items: center; color: var(--rp-text-muted); }
.pj-inline-icon svg { width: 15px; height: 15px; }
.pj-clamp { display: -webkit-box; -webkit-line-clamp: 3; line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; white-space: pre-line; }
.pj-tick { display: inline-grid; place-items: center; flex: none; width: 16px; height: 16px; border-radius: 50%; border: 1.5px solid var(--rp-border-strong); font-size: var(--rp-text-2xs); font-weight: 600; line-height: 1; }
.pj-tick svg { width: 9px; height: 9px; }
.pj-check--done .pj-tick { background: var(--rp-heading); border-color: var(--rp-heading); color: var(--rp-surface); }
.pj-check--missing .pj-tick { border-color: var(--rp-warning-indicator); color: var(--rp-warning-text); }
.pj-check--missing { color: var(--rp-warning-text); }
.pj-check--empty .pj-tick { border-style: dashed; }

.pj-runbar { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 8px; padding-top: 16px; border-top: 1px solid var(--rp-border-subtle); }
/* The Console's back · cost · Run sit on top, as the step bar does on the
   other steps (user, 2026-10-17): one card in the flow bar's frame. */
.pj-runbar.pj-runbar--top { margin: 0; padding: 14px 16px; border: 1px solid var(--border, var(--rp-border)); border-radius: var(--rp-radius-xl); background: var(--card-bg, var(--rp-surface)); box-shadow: none; }
.pj-review__end { display: inline-flex; align-items: center; gap: 10px; }
.pj-cost { display: inline-flex; align-items: center; gap: 6px; margin-inline-end: auto; font-size: var(--rp-text-xs); font-weight: 600; color: var(--rp-heading); }
.pj-cost svg { width: 15px; height: 15px; color: var(--rp-text-muted); }
.pj-cost .pj-muted { font-weight: 500; }
.pj-btn--run { min-width: 120px; height: 40px; }
/* The Console's back, opposite Run: the arrow points back along the flow. */
.pj-btn.pj-runback { background: var(--rp-surface); border-color: var(--rp-border-strong); color: var(--rp-heading); }
.pj-btn.pj-runback:hover { background: var(--pj-soft); border-color: var(--rp-border-strong); }
.pj-runback > svg:first-child { transform: scaleX(-1); }
html[dir="rtl"] .pj-runback > svg:first-child { transform: none; }
.pj-confirm { display: flex; align-items: center; gap: 8px; font-size: var(--rp-text-sm); font-weight: 600; color: var(--rp-heading); animation: pj-deal 180ms var(--rp-ease-out) both; }
.pj-cov { display: inline-flex; align-items: center; gap: 6px; font-size: var(--rp-text-xs); font-weight: 600; color: var(--rp-text-secondary); }
.pj-cov svg { width: 20px; height: 20px; transform: rotate(-90deg); }
.pj-ring__track { fill: none; stroke: var(--rp-border); stroke-width: 3.5; }
.pj-ring__fill { fill: none; stroke: var(--rp-warning-indicator); stroke-width: 3.5; stroke-linecap: round; transition: stroke-dashoffset 600ms var(--rp-ease-out); }
.pj-cov.is-full .pj-ring__fill { stroke: var(--rp-success-indicator); }

.pj-reports { scroll-margin-top: 72px; } /* clears the sticky top bar when a run scrolls here */
.pj-reports .pj-h2 { margin-bottom: 12px; }
.pj-runs { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.pj-run { display: grid; gap: 8px; padding: 10px 12px; border: 1px solid var(--rp-border-subtle); border-radius: var(--rp-radius-lg); }
.pj-run__top { display: flex; align-items: center; gap: 8px; }
.pj-run__top .pj-tag { margin: 0; }
.pj-run__date { margin-inline-start: auto; font-size: var(--rp-text-xs); color: var(--rp-text-muted); }
.pj-run .pj-icon-btn { width: 28px; height: 28px; }
.pj-run__err { margin: 0; font-size: var(--rp-text-2xs); color: var(--rp-danger-text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pj-progress { height: 4px; border-radius: 2px; background: var(--pj-soft); overflow: hidden; }
.pj-progress span { display: block; height: 100%; border-radius: 2px; background: var(--rp-info-indicator); transition: width 600ms var(--rp-ease-out); }

/* ── drawer: the app's own .usecase-drawer (styles.css); only what this page adds ── */
.pj-drawer { display: flex; flex-direction: column; }
.pj-drawer--wide { width: min(720px, 94vw); }
.pj-drawer__form { display: contents; }
.pj-drawer__body { flex: 1; overflow-y: auto; }
.pj-drawer__foot { display: flex; justify-content: flex-end; gap: 8px; }

.pj-coach { margin-top: 6px; padding: 14px; border-radius: var(--rp-radius-xl); background: var(--pj-soft); }
.pj-coach__head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.pj-coach__badge { display: inline-flex; align-items: center; gap: 6px; font-size: var(--rp-text-xs); font-weight: 600; color: var(--pj-ai); }
.pj-coach__badge svg { width: 15px; height: 15px; }
.pj-coach__line { display: flex; align-items: center; gap: 8px; margin: 12px 0 0; font-size: var(--rp-text-xs); color: var(--rp-text-secondary); }
.pj-coach__line--err { color: var(--rp-danger-text); }
.pj-coach__score { display: grid; grid-template-columns: 44px 1fr; align-items: center; gap: 12px; margin-top: 12px; }
.pj-coach__score svg { width: 44px; height: 44px; transform: rotate(-90deg); grid-row: 1; grid-column: 1; }
.pj-coach__num { grid-row: 1; grid-column: 1; text-align: center; font-size: var(--rp-text-xs); font-weight: 600; color: var(--rp-heading); }
.pj-coach__why { grid-row: 1; grid-column: 2; font-size: var(--rp-text-xs); line-height: 1.5; color: var(--rp-text-secondary); }
.pj-coach__score.is-ready .pj-ring__fill { stroke: var(--rp-success-indicator); }
.pj-coach .pj-seg { background: var(--rp-surface); }
.pj-coach .pj-seg__btn.is-on { background: var(--pj-soft); box-shadow: none; }
.pj-coach__drafts { display: grid; gap: 6px; }
.pj-draft { display: flex; gap: 8px; align-items: flex-start; padding: 10px 12px; text-align: start; border: 1px solid transparent; border-radius: var(--rp-radius-lg); background: var(--rp-surface); color: var(--rp-text); font: inherit; font-size: var(--rp-text-xs); line-height: 1.5; cursor: pointer; transition: border-color var(--rp-duration-fast); }
.pj-draft svg { width: 14px; height: 14px; margin-top: 2px; color: var(--pj-accent); }
.pj-draft:hover { border-color: var(--rp-action-border); }


/* ── moving between steps ─────────────────────────────── */
.pj-stepbody--fwd { animation: pj-step-in 240ms var(--rp-ease-out) both; --pj-from: 16px; }
.pj-stepbody--back { animation: pj-step-in 240ms var(--rp-ease-out) both; --pj-from: -16px; }
html[dir="rtl"] .pj-stepbody--fwd { --pj-from: -16px; }
html[dir="rtl"] .pj-stepbody--back { --pj-from: 16px; }
@keyframes pj-step-in { from { opacity: 0; transform: translateX(var(--pj-from)); } }

/* ── narrow screens ─────────────────────────────────────── */
@media (max-width: 900px) {
  .pj-console, .pj-trio { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .pj-top { flex-wrap: wrap; }
  .pj-step__label { font-size: var(--rp-text-2xs); }
  .pj-trow { grid-template-columns: auto minmax(0, 1fr) auto 16px; gap: 10px; padding: 12px 14px; }
  .pj-trow__count { display: none; }
}
@keyframes pj-sheet-in { from { transform: translateY(40px); opacity: 0; } }
@media (prefers-reduced-motion: reduce) {
  .pj-card, .pj-confirm, .pj-stepbody--fwd, .pj-stepbody--back { animation: none; }
  .pj-state--pending .pj-dot, .pj-strip__seg.pj-state--pending { animation: none; }
}

/* ── project tabs: Topics · Reports · Chat ───────────────── */
.pj-tabs { display: flex; gap: 22px; margin: -6px 0 18px; border-bottom: 1px solid var(--rp-border-subtle); }
.pj-tabs__tab { position: relative; display: inline-flex; align-items: center; gap: 6px; padding: 10px 0 12px; color: var(--rp-text-muted); text-decoration: none; font-size: var(--rp-text-sm); font-weight: 500; }
.pj-tabs__tab svg { width: 15px; height: 15px; }
.pj-tabs__tab:hover { color: var(--rp-heading); }
.pj-tabs__tab.is-on { color: var(--rp-heading); font-weight: 600; }
.pj-tabs__tab.is-on::after { content: ""; position: absolute; inset-inline: 0; bottom: -1px; height: 2px; border-radius: 2px; background: var(--rp-heading); }
.pj-tabs__count { min-width: 20px; padding: 1px 6px; border-radius: 999px; background: var(--pj-soft); font-size: var(--rp-text-2xs); font-weight: 600; text-align: center; color: var(--rp-text-muted); }

/* report rows reuse the topic row */
.pj-trow--report { grid-template-columns: auto minmax(0, 1fr) auto 44px 64px 34px; }
.pj-trow--report .pj-trow__title { color: var(--rp-heading); text-decoration: none; }
.pj-trow--report a.pj-trow__title:hover { text-decoration: underline; }
.pj-trow--report .pj-trow__fw { text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pj-trow--report .pj-trow__fw:hover { color: var(--rp-heading); }
.pj-trow__date { font-size: var(--rp-text-xs); color: var(--rp-text-muted); text-align: end; }

/* ── chat: the research desk (user, 2026-10-25) ─────────────
   Both chats (a project's Ask tab and the rail's Chat page). A centred
   reading column: each question a headline, its answer under a small
   "Answer" label, then source cards and quiet Copy / Ask again. One composer
   card at the bottom holds the box, the scope picker and send. */
/* No card of its own (user, 2026-11-05): the chat sits straight in the
   white work panel, like OpenAI Playground's thread column — 750px of thread,
   a 792px composer. */
.pj-chat { position: relative; display: flex; flex-direction: column; height: calc(100dvh - 220px); min-height: 520px; border: 0; border-radius: 0; background: transparent; box-shadow: none; overflow: hidden; }
.pj-chat__thread { flex: 1; min-height: 0; overflow-y: auto; padding: 40px 0 16px; }
.pj-chat__col { display: flex; flex-direction: column; gap: 44px; max-width: 750px; min-height: 100%; margin: 0 auto; }

/* empty: what it is for, and questions to start from */
.pj-chat__welcome { display: flex; flex-direction: column; align-items: center; gap: 10px; margin: auto 0; padding: 24px 0; text-align: center; }
.pj-chat__mark { display: grid; place-items: center; width: 52px; height: 52px; border-radius: var(--rp-radius-xl); background: var(--pj-accent-tint); color: var(--pj-accent); box-shadow: inset 0 0 0 1px var(--rp-action-border); }
.pj-chat__mark svg { width: 24px; height: 24px; }
.pj-chat__hello { margin: 8px 0 0; font-family: var(--rp-font-display); font-size: var(--rp-text-xl); font-weight: 600; letter-spacing: -0.01em; color: var(--rp-heading); }
.pj-chat__sub { max-width: 440px; margin: 0; font-size: var(--rp-text-sm); line-height: 1.6; color: var(--rp-text-muted); }
.pj-chat__ideas { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 8px; width: 100%; margin-top: 20px; }
.pj-chat__idea { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; min-height: 66px; padding: 12px 14px; border: 1px solid var(--rp-border); border-radius: var(--rp-radius-xl); background: var(--rp-surface); color: var(--rp-text-secondary); font: inherit; font-size: var(--rp-text-sm); line-height: 1.45; text-align: start; cursor: pointer; transition: border-color var(--rp-duration-fast), background var(--rp-duration-fast), color var(--rp-duration-fast); }
.pj-chat__idea svg { flex: none; width: 14px; height: 14px; margin-top: 3px; opacity: 0; transition: opacity var(--rp-duration-fast), transform var(--rp-duration-fast) var(--rp-ease-out); transform: translateX(-4px); }
.pj-chat__idea:hover { border-color: var(--rp-action-border); background: var(--pj-accent-tint); color: var(--rp-heading); }
.pj-chat__idea:hover svg { opacity: 1; transform: none; color: var(--pj-accent); }
html[dir="rtl"] .pj-chat__idea svg { transform: scaleX(-1) translateX(-4px); }
html[dir="rtl"] .pj-chat__idea:hover svg { transform: scaleX(-1); }

/* a turn: the question as a headline, the answer under it */
.pj-turn { display: flex; flex-direction: column; gap: 14px; }
.pj-turn--pending { animation: pj-turn-in 260ms var(--rp-ease-out) both; }
.pj-turn__q { margin: 0; font-family: var(--rp-font-display); font-size: var(--rp-text-xl); font-weight: 600; line-height: 1.4; letter-spacing: -0.01em; color: var(--rp-heading); white-space: pre-wrap; overflow-wrap: anywhere; }
.pj-turn__a { padding-top: 14px; border-top: 1px solid var(--rp-border-subtle); }
.pj-turn__kicker { display: flex; align-items: center; gap: 6px; margin: 0 0 10px; font-family: var(--hud-mono, var(--rp-font-mono)); font-size: var(--rp-text-2xs); font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--pj-accent); }
html[dir="rtl"] .pj-turn__kicker { font-family: inherit; letter-spacing: 0; font-size: var(--rp-text-xs); }
.pj-turn__kicker svg { width: 13px; height: 13px; flex: none; }
.pj-turn__scope { color: var(--rp-text-muted); }
.pj-turn__scope::before { content: "·"; margin-inline-end: 6px; }
.pj-turn__kicker.is-live { color: var(--rp-text-muted); }
.pj-turn__kicker.is-live svg { color: var(--pj-accent); animation: pj-chat-spin 2.4s linear infinite; }
.pj-turn__body { font-size: var(--rp-text-md); line-height: 1.75; color: var(--rp-text); overflow-wrap: anywhere; }
.pj-turn__body p { margin: 0 0 12px; }
.pj-turn__body ul { margin: 0 0 12px; padding-inline-start: 22px; }
.pj-turn__body li { margin: 4px 0; }
.pj-turn__body li::marker { color: var(--pj-accent); }
.pj-turn__body b { font-weight: 600; color: var(--rp-heading); }
.pj-turn__body > :last-child { margin-bottom: 0; }
.pj-cite { position: relative; top: -0.4em; margin-inline-start: 2px; padding: 1px 5px; border-radius: var(--rp-radius-md); background: var(--pj-accent-tint); color: var(--pj-accent); font-size: var(--rp-text-2xs); font-weight: 600; line-height: 1; vertical-align: baseline; }
.pj-turn__shimmer { display: flex; flex-direction: column; gap: 10px; padding-top: 4px; }
.pj-turn__shimmer span { height: 10px; border-radius: var(--rp-radius-md); background: linear-gradient(90deg, var(--rp-surface-muted) 0%, var(--rp-border-subtle) 50%, var(--rp-surface-muted) 100%); background-size: 200% 100%; animation: pj-chat-shimmer 1.4s linear infinite; }
.pj-turn__shimmer span:nth-child(1) { width: 92%; }
.pj-turn__shimmer span:nth-child(2) { width: 78%; }
.pj-turn__shimmer span:nth-child(3) { width: 54%; }

/* sources: numbered cards, the section and the report it is from */
.pj-turn__sources { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px; margin-top: 18px; }
.pj-src { display: flex; align-items: flex-start; gap: 10px; min-width: 0; padding: 10px 12px; border: 1px solid var(--rp-border); border-radius: var(--rp-radius-lg); background: var(--rp-surface); color: var(--rp-text-secondary); text-decoration: none; transition: border-color var(--rp-duration-fast), background var(--rp-duration-fast); }
a.pj-src:hover { border-color: var(--rp-action-border); background: var(--pj-accent-tint); }
.pj-src__n { min-width: 14px; padding-top: 1px; font-family: var(--hud-mono, var(--rp-font-mono)); font-size: var(--rp-text-2xs); font-weight: 600; color: var(--pj-accent); }
.pj-src__copy { display: flex; flex: 1; flex-direction: column; gap: 2px; min-width: 0; }
.pj-src__t { display: -webkit-box; overflow: hidden; -webkit-line-clamp: 2; -webkit-box-orient: vertical; font-size: var(--rp-text-sm); font-weight: 400; line-height: 1.65; color: var(--rp-heading); }
.pj-src__from { overflow: hidden; font-size: var(--rp-text-2xs); color: var(--rp-text-muted); white-space: nowrap; text-overflow: ellipsis; }
.pj-src > svg { flex: none; width: 13px; height: 13px; margin-top: 2px; opacity: 0; color: var(--pj-accent); transition: opacity var(--rp-duration-fast); }
a.pj-src:hover > svg { opacity: 1; }
html[dir="rtl"] .pj-src > svg { transform: scaleX(-1); }
.pj-turn__tools { display: flex; gap: 2px; margin-top: 12px; margin-inline-start: -8px; }
.pj-turn__tool { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 8px; border: 0; border-radius: var(--rp-radius-lg); background: transparent; color: var(--rp-text-muted); font: inherit; font-size: var(--rp-text-xs); font-weight: 600; cursor: pointer; transition: background var(--rp-duration-fast), color var(--rp-duration-fast); }
.pj-turn__tool:hover { background: var(--rp-surface-muted); color: var(--rp-heading); }
.pj-turn__tool.is-done { color: var(--rp-success-text, var(--pj-accent)); }
.pj-turn__tool svg { width: 13px; height: 13px; }

/* the composer card */
.pj-chat__dock { padding: 8px 0 20px; background: linear-gradient(to bottom, transparent, var(--rp-surface) 28%); }
.pj-chat__dock > .pj-err, .pj-chat__composer { max-width: 792px; margin-inline: auto; }
.pj-chat__dock > .pj-err { margin-bottom: 8px; }
.pj-chat__composer { display: flex; flex-direction: column; gap: 6px; padding: 10px 10px 8px; padding-inline-start: 14px; border: 1px solid var(--rp-border-strong); border-radius: var(--rp-radius-xl); background: var(--rp-surface); box-shadow: none; transition: border-color var(--rp-duration-fast), box-shadow var(--rp-duration-fast); }
.pj-chat__composer:focus-within { border-color: var(--rp-focus); box-shadow: 0 0 0 1px var(--rp-focus); }
.pj .pj-chat__composer textarea, .pj .pj-chat__composer textarea:focus { width: 100%; min-height: 26px; max-height: 200px; padding: 4px 0; border: 0; border-radius: 0; background: transparent; box-shadow: none; outline: none; resize: none; font-size: var(--rp-text-md); line-height: 1.55; }
.pj .pj-chat__composer textarea:disabled { cursor: not-allowed; }
.pj-chat__bar { display: flex; align-items: center; gap: 4px; }
.pj-chat__head { position: relative; display: flex; flex: 1; align-items: center; min-width: 0; }
.pj-chat__tool { display: grid; place-items: center; width: 32px; height: 32px; padding: 0; border: 0; border-radius: var(--rp-radius-lg); background: transparent; color: var(--rp-text-muted); cursor: pointer; transition: background var(--rp-duration-fast), color var(--rp-duration-fast); }
.pj-chat__tool svg { width: 15px; height: 15px; }
.pj-chat__clear:hover { background: var(--rp-danger-soft); color: var(--rp-danger-text); }
.pj-chat__composer .pj-chat__send { flex: none; width: 34px; height: 34px; border-radius: var(--rp-radius-lg); }
.pj-chat__send svg { width: 16px; height: 16px; }
.pj-chat__send:disabled { opacity: 0.35; cursor: not-allowed; }

@keyframes pj-turn-in { from { opacity: 0; transform: translateY(6px); } }
@keyframes pj-chat-shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }
@keyframes pj-chat-spin { to { transform: rotate(360deg); } }
@media (max-width: 640px) {
  .pj-trow--report { grid-template-columns: auto minmax(0, 1fr) auto 34px; }
  .pj-trow--report .pj-trow__count, .pj-trow--report .pj-trow__date { display: none; }
  .pj-chat { height: calc(100dvh - 190px); }
  .pj-chat__thread { padding: 24px 14px 12px; }
  .pj-chat__col { gap: 32px; }
  .pj-chat__dock { padding: 6px 10px 12px; }
  .pj-turn__q { font-size: var(--rp-text-xl); }
  .pj-chat__hello { font-size: var(--rp-text-xl); }
}
@media (prefers-reduced-motion: reduce) { .pj-turn--pending, .pj-turn__shimmer span, .pj-turn__kicker.is-live svg { animation: none; } }

/* ── step dock: back · the three steps · next, floating at the bottom ── */
.pj-dock {
  position: fixed; z-index: 40; bottom: 18px; left: 50%; transform: translateX(-50%);
  display: flex; align-items: center; gap: 6px; padding: 6px;
  max-width: calc(100vw - 24px);
  border: 1px solid var(--rp-border); border-radius: 999px;
  background: color-mix(in srgb, var(--rp-surface) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(14px);
  box-shadow: var(--rp-shadow-md);
  animation: pj-dock-in 320ms var(--rp-ease-out) both;
}
@keyframes pj-dock-in { from { opacity: 0; transform: translate(-50%, 12px); } }
.pj-dock__back { width: 38px; height: 38px; border-radius: 50%; }
.pj-dock__back svg { transform: scaleX(-1); }
html[dir="rtl"] .pj-dock__back svg { transform: none; }
.pj-dock__segs { display: flex; gap: 2px; padding: 3px; border-radius: 999px; background: var(--rp-surface-muted); }
.pj-dock__seg {
  display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 14px;
  border-radius: 999px; color: var(--rp-text-muted); text-decoration: none;
  font-size: var(--rp-text-xs); font-weight: 600; white-space: nowrap;
  transition: background var(--rp-duration-fast), color var(--rp-duration-fast);
}
.pj-dock__seg:hover { color: var(--rp-heading); }
.pj-dock__seg.is-on { background: var(--rp-heading); color: var(--rp-surface); box-shadow: none; }
.pj-dock__seg.is-done { color: var(--rp-heading); }
.pj-dock__seg.is-skipped { color: var(--rp-text-faint); text-decoration: line-through; text-decoration-color: var(--rp-border-strong); }
.pj-dock__tick { display: grid; place-items: center; width: 15px; height: 15px; border-radius: 50%; background: var(--rp-success-indicator); color: var(--rp-white); }
.pj-dock__tick svg { width: 9px; height: 9px; }
.pj-dock .pj-saved:empty { display: none; }
.pj-dock .pj-saved { padding: 0 6px; }
.pj-dock__next { height: 38px; border-radius: 999px; padding: 0 16px; }

/* ── 3 setup: one row per part, each opening its drawer ── */
.pj-sheet { border: 1px solid var(--pj-line); border-radius: var(--pj-radius); background: var(--rp-surface); box-shadow: var(--pj-shadow); overflow: hidden; }
.pj-setrow {
  display: grid; grid-template-columns: auto minmax(0, 1fr) 20px; align-items: center; gap: 16px; width: 100%;
  padding: 18px 20px; border: 0; background: transparent; color: inherit; font: inherit; text-align: start; cursor: pointer;
  transition: background var(--rp-duration-fast);
}
.pj-setrow + .pj-setrow { border-top: 1px solid var(--rp-border-subtle); }
.pj-setrow:hover { background: var(--pj-soft); }
.pj-setrow__icon { display: grid; place-items: center; width: 38px; height: 38px; border-radius: var(--rp-radius-lg); background: var(--rp-tile); color: var(--rp-tile-text); }
.pj-setrow__icon svg { width: 18px; height: 18px; }
.pj-setrow--set .pj-setrow__icon { background: var(--rp-heading); color: var(--rp-surface); }
.pj-setrow--missing .pj-setrow__icon { background: transparent; border: 1px dashed var(--rp-warning-indicator); color: var(--rp-warning-text); }
.pj-setrow__main { display: grid; gap: 4px; min-width: 0; }
.pj-setrow__label { display: inline-flex; align-items: center; gap: 6px; font-size: var(--rp-text-xs); font-weight: 600; color: var(--rp-text-muted); }
.pj-setrow__dot { width: 6px; height: 6px; border-radius: 50%; background: var(--rp-warning-indicator); }
.pj-setrow__value { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; min-width: 0; font-size: var(--rp-text-sm); color: var(--rp-heading); line-height: 1.5; }
.pj-setrow__value .pj-tag { margin: 0; }
.pj-setrow__value b { font-weight: 600; }
.pj-setrow__add { display: inline-flex; align-items: center; gap: 4px; color: var(--rp-text-faint); font-weight: 500; }
.pj-setrow__add svg { width: 14px; height: 14px; }
.pj-setrow__go { color: var(--rp-text-faint); }
.pj-setrow__go svg { width: 16px; height: 16px; display: block; }
html[dir="rtl"] .pj-setrow__go svg { transform: scaleX(-1); }
.pj-setrow:hover .pj-setrow__go { color: var(--rp-heading); }

.pj-drawer--wide { width: min(720px, calc(100vw - 16px)); }
.pj-drawer .pj-search { max-width: none; }
.pj-drawer .pj-fw--engines { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.pj-drawer textarea.pj-input--lg { min-height: 120px; }

@media (max-width: 640px) {
  .pj-dock { bottom: 10px; gap: 4px; }
  .pj-dock__seg { padding: 0 10px; }
  .pj-dock__seg:not(.is-on) span:not(.pj-dock__tick) { display: none; }
  .pj-dock__seg:not(.is-on) { width: 32px; padding: 0; justify-content: center; }
  .pj-dock__seg:not(.is-on):not(.is-done)::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
  .pj-dock__next { padding: 0 12px; }
  .pj-drawer .pj-fw--engines { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) { .pj-dock { animation: none; } }
/* The reports the chat asks about: a pill in the composer that opens a checklist (user, 2026-10-15). */
.pj-chat__scope { display: inline-flex; align-items: center; gap: 5px; max-width: 320px; height: 28px; padding: 0 8px 0 9px; border: 1px solid var(--rp-border); border-radius: 999px; background: transparent; color: var(--rp-text-secondary); font: inherit; font-size: var(--rp-text-xs); font-weight: 600; cursor: pointer; transition: border-color 120ms ease, color 120ms ease; }
.pj-chat__scope span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pj-chat__scope:hover, .pj-chat__scope[aria-expanded="true"] { border-color: var(--rp-border-strong); color: var(--rp-heading); }
.pj-chat__scope.is-some { border-color: var(--rp-action-border); background: var(--pj-accent-tint); color: var(--pj-accent); }
.pj-chat__scope svg { width: 13px; height: 13px; flex: none; }
.pj-chat__scope svg:last-child { width: 11px; height: 11px; transform: rotate(-90deg); }
.pj-scope { position: absolute; z-index: 5; top: 46px; inset-inline-end: 14px; width: min(360px, calc(100% - 28px)); box-sizing: border-box; display: flex; flex-direction: column; max-height: min(440px, calc(100dvh - 320px)); padding: 12px; border: 1px solid var(--pj-line); border-radius: var(--pj-radius); background: var(--rp-surface); box-shadow: var(--rp-shadow-md); }
.pj-scope__title { margin: 0 0 8px; font-size: var(--rp-text-xs); font-weight: 600; color: var(--rp-text-muted); }
/* All or one tag (user, 2026-10-17): one row of chips, nothing else. */
.pj-scope__tags { display: flex; flex-wrap: wrap; gap: 6px; min-height: 0; overflow-y: auto; }
.pj-scope__none { margin: 10px 0 0; font-size: var(--rp-text-xs); color: var(--rp-text-muted); }
/* It sits in the composer, so it opens upward. */
.pj-chat__head .pj-scope { top: auto; bottom: calc(100% + 14px); inset-inline-start: -6px; inset-inline-end: auto; width: min(360px, calc(100vw - 48px)); }

/* ── new topic, inline at the top of the Topics tab ───────
   Collapsed: one quiet line. Open: the topic (growing from one line), the
   coach's suggestions unfolding under it, then one toolbar — the coach's
   status on one side, cancel/create on the other. The coach parts keep the
   original app's .coach* classes; only their frame is reset here. */
.pj-compose {
  position: relative; margin-bottom: 14px;
  border: 1px solid var(--pj-line); border-radius: var(--pj-radius);
  background: var(--rp-surface); box-shadow: var(--pj-shadow);
  transition: border-color var(--rp-duration-fast), box-shadow var(--rp-duration-base);
}
.pj-compose:not(.is-open) { display: flex; align-items: center; gap: 6px; padding: 4px 6px 4px 14px; cursor: text; }
html[dir="rtl"] .pj-compose:not(.is-open) { padding: 4px 14px 4px 6px; }
.pj-compose:not(.is-open):hover { border-color: var(--rp-border-strong); }
.pj-compose__lead { display: grid; place-items: center; color: var(--rp-text-faint); }
.pj-compose__lead svg { width: 18px; height: 18px; }
.pj .pj-compose textarea { border: 0; box-shadow: none; background: transparent; resize: none; }
.pj .pj-compose textarea:focus { box-shadow: none; }
.pj .pj-compose:not(.is-open) textarea { height: 44px; padding: 11px 4px; overflow: hidden; cursor: text; }
.pj-compose.is-open { padding: 14px 16px 10px; border-color: var(--rp-border-strong); box-shadow: var(--pj-shadow-hover); }
.pj .pj-compose__input { display: block; min-height: 30px; padding: 2px 0; font-size: var(--rp-text-md); font-weight: 500; line-height: 1.6; overflow-y: auto; }
.pj-compose .pj-err { margin: 2px 0 0; }
.pj-compose .pj-err:empty { display: none; }

.pj-compose .coach { padding: 0; border: 0; border-radius: 0; background: none; }
.pj-compose .coach--detail { margin: 10px -16px 0; padding: 12px 16px 2px; border-top: 1px solid var(--rp-border-subtle); animation: pj-fade 200ms var(--rp-ease-out) both; }
.pj-compose .coach--detail .coach__hint { margin: 0 0 8px; }
.pj-compose .coach--detail .coach__foot { margin-top: 6px; }

.pj-compose__bar { display: flex; align-items: center; gap: 10px; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--rp-border-subtle); }
.pj-compose__coach { min-width: 0; }
.pj-compose__coach[hidden] { display: none; }
.pj-compose .coach--bar .coach__head { margin: 0; gap: 8px; }
.pj-compose .coach--bar .coach__ring { width: 22px; height: 22px; }
.pj-compose .coach--bar .coach__score { font-size: var(--rp-text-md); }
.pj-compose .coach--bar .coach__action { margin-inline-start: 4px; display: grid; place-items: center; width: 26px; height: 26px; border-radius: var(--rp-radius-lg); }
.pj-compose .coach--bar .coach__action:hover { background: var(--pj-soft); }
.pj-compose .coach--bar .coach__error { display: block; margin-top: 4px; font-size: var(--rp-text-xs); color: var(--rp-danger-text); }
.pj-compose__actions { display: flex; gap: 6px; margin-inline-start: auto; }


/* ── AI suggestions in the scope / context / focus drawers ── */
.pj-sugg { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--rp-border-subtle); }
.pj-sugg__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.pj-sugg__badge { display: inline-flex; align-items: center; gap: 6px; font-size: var(--rp-text-xs); font-weight: 600; color: var(--pj-ai); }
.pj-sugg__badge svg { width: 15px; height: 15px; }
.pj-sugg__refresh { width: 28px; height: 28px; }
.pj-sugg__refresh svg { width: 15px; height: 15px; }
.pj-sugg__line { display: flex; align-items: center; gap: 8px; margin: 4px 0; font-size: var(--rp-text-xs); color: var(--rp-text-muted); }
.pj-sugg__line--err { color: var(--rp-danger-text); }
.pj-sugg__dots { display: inline-flex; gap: 4px; }
.pj-sugg__dots i { width: 5px; height: 5px; border-radius: 50%; background: var(--pj-ai); animation: pj-pulse 1s ease-in-out infinite; }
.pj-sugg__dots i:nth-child(2) { animation-delay: 0.15s; }
.pj-sugg__dots i:nth-child(3) { animation-delay: 0.3s; }
.pj-sugg__group { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-bottom: 10px; }
.pj-sugg__label { font-size: var(--rp-text-2xs); font-weight: 600; color: var(--rp-text-muted); margin-inline-end: 2px; }
.pj-sugg__chip {
  display: inline-flex; align-items: center; gap: 4px; height: 28px; padding: 0 10px 0 8px;
  border: 1px dashed color-mix(in srgb, var(--pj-ai) 45%, var(--rp-border)); border-radius: 999px;
  background: color-mix(in srgb, var(--pj-ai) 6%, var(--rp-surface)); color: var(--rp-heading);
  font: inherit; font-size: var(--rp-text-xs); font-weight: 500; cursor: pointer;
  transition: border-color var(--rp-duration-fast), background var(--rp-duration-fast);
}
html[dir="rtl"] .pj-sugg__chip { padding: 0 8px 0 10px; }
.pj-sugg__chip svg { width: 12px; height: 12px; color: var(--pj-ai); }
.pj-sugg__chip:hover { border-style: solid; background: color-mix(in srgb, var(--pj-ai) 12%, var(--rp-surface)); }
.pj-sugg__chip--exclude svg { color: var(--rp-danger-text); }
.pj-sugg__row {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 10px; width: 100%;
  margin-bottom: 6px; padding: 9px 12px; text-align: start;
  border: 1px dashed color-mix(in srgb, var(--pj-ai) 40%, var(--rp-border)); border-radius: var(--rp-radius-lg);
  background: color-mix(in srgb, var(--pj-ai) 5%, var(--rp-surface)); color: var(--rp-heading);
  font: inherit; font-size: var(--rp-text-xs); cursor: pointer;
}
.pj-sugg__row:hover { border-style: solid; }
.pj-sugg__row .pj-sugg__label { min-width: 60px; }
.pj-sugg__text { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pj-sugg__row svg { width: 14px; height: 14px; color: var(--pj-ai); }
@media (prefers-reduced-motion: reduce) { .pj-sugg__dots i { animation: none; } }

/* ── the way on: a next-step card at the end of a step, a clear dock button ── */
.pj-nextcard {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 16px;
  margin-top: 16px; padding: 18px 20px;
  border: 1px dashed var(--rp-border-strong); border-radius: var(--pj-radius);
  color: inherit; text-decoration: none;
  transition: border-color var(--rp-duration-fast), background var(--rp-duration-fast), transform var(--rp-duration-fast), box-shadow var(--rp-duration-fast);
}
.pj-nextcard:hover { border-style: solid; border-color: var(--pj-accent); transform: translateY(-1px); }
.pj-nextcard__icon { display: grid; place-items: center; width: 42px; height: 42px; border-radius: var(--rp-radius-xl); background: var(--rp-tile); color: var(--rp-tile-text); }
.pj-nextcard__icon svg { width: 20px; height: 20px; }
.pj-nextcard__copy { display: grid; gap: 2px; min-width: 0; }
.pj-nextcard__kicker { font-size: var(--rp-text-2xs); font-weight: 600; color: var(--rp-text-muted); }
.pj-nextcard__title { font-size: var(--rp-text-base); font-weight: 600; color: var(--rp-heading); }
.pj-nextcard__hint { font-size: var(--rp-text-xs); color: var(--rp-text-muted); }
.pj-nextcard__go { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--rp-surface-muted); color: var(--rp-heading); transition: transform var(--rp-duration-fast); }
.pj-nextcard__go svg { width: 18px; height: 18px; }
html[dir="rtl"] .pj-nextcard__go svg { transform: scaleX(-1); }
.pj-nextcard:hover .pj-nextcard__go { transform: translateX(3px); }
html[dir="rtl"] .pj-nextcard:hover .pj-nextcard__go { transform: translateX(-3px); }
/* Ready to move on: the card becomes the page's one strong action. */
.pj-nextcard.is-ready { border: 1px solid var(--rp-action); background: var(--rp-action); box-shadow: var(--rp-shadow-action); }
.pj-nextcard.is-ready .pj-nextcard__icon, .pj-nextcard.is-ready .pj-nextcard__go { background: color-mix(in srgb, var(--rp-text-on-action) 16%, transparent); color: var(--rp-text-on-action); }
.pj-nextcard.is-ready .pj-nextcard__kicker, .pj-nextcard.is-ready .pj-nextcard__hint { color: color-mix(in srgb, var(--rp-text-on-action) 78%, transparent); }
.pj-nextcard.is-ready .pj-nextcard__title { color: var(--rp-text-on-action); }
.pj-nextcard.is-ready:hover { background: var(--rp-action-hover); border-color: var(--rp-action-hover); }
.pj-nextcard.is-blocked { cursor: default; opacity: 0.85; }
.pj-nextcard.is-blocked .pj-nextcard__kicker { color: var(--rp-warning-text); }
.pj-studio + .pj-nextcard { margin-top: 12px; }
.pj-studio__frame { height: calc(100dvh - 400px); min-height: 480px; }

.pj-dock__next { background: var(--rp-action); border-color: var(--rp-action); color: var(--rp-text-on-action); box-shadow: var(--rp-shadow-action); }
.pj-dock__next:hover { background: var(--rp-action-hover); border-color: var(--rp-action-hover); color: var(--rp-text-on-action); }
.pj-dock__next.is-blocked { background: var(--rp-surface-muted); border-color: transparent; color: var(--rp-text-muted); box-shadow: none; }
.pj-dock__need { padding: 0 4px; font-size: var(--rp-text-xs); font-weight: 600; color: var(--rp-warning-text); white-space: nowrap; }
@media (max-width: 640px) { .pj-dock__need { display: none; } }

/* ── favorites and delete on project cards; favorite topics ── */
.pj-card__actions { display: inline-flex; gap: 2px; margin-inline-start: 6px; }
.pj-card__date + .pj-card__actions { margin-inline-start: 6px; }
.pj-card__meta .pj-card__actions:first-child { margin-inline-start: auto; }
.pj-card__act { display: grid; place-items: center; width: 26px; height: 26px; padding: 0; border: 0; border-radius: var(--rp-radius-lg); background: transparent; color: var(--rp-text-faint); cursor: pointer; opacity: 0; transition: opacity var(--rp-duration-fast), background var(--rp-duration-fast), color var(--rp-duration-fast); }
.pj-card__act svg { width: 15px; height: 15px; opacity: 1 !important; }
.pj-card:hover .pj-card__act, .pj-card__act:focus-visible, .pj-card__fav.is-on { opacity: 1; }
.pj-card__act:hover { background: var(--rp-surface-muted); color: var(--rp-heading); }
.pj-card__del:hover { background: var(--rp-danger-soft); color: var(--rp-danger-text); }
.pj-card__fav.is-on { color: var(--rp-favorite); }
.pj-card__fav.is-on svg { fill: currentColor; }
@media (hover: none) { .pj-card__act { opacity: 1; } }
.pj-trow__star { display: inline-grid; place-items: center; margin-inline-end: 6px; color: var(--rp-favorite); vertical-align: -2px; }
.pj-trow__star svg { width: 14px; height: 14px; fill: currentColor; }
.pj-cards { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.pj-grid.is-settled .pj-card { animation: none; }

/* ── a project's Data tab: the app's Collections view, held to the project's folder ── */
.pj-datahost .pj-collections { display: block; padding: 0; margin: 0; max-width: none; }
/* New collection sits in the tab row, as New report does; the header keeps only its hidden inputs. */
.pj-datahost .pj-collections > .view-header { justify-content: flex-end; margin: 0; padding: 0; }
.pj-datahost .pj-collections > .view-header > div:first-child,
.pj-datahost #collections-create-folder-btn,
.pj-datahost #collections-create-btn,
.pj-datahost #collections-breadcrumb { display: none !important; }

/* Each report keeps its own "Ask" (that report's editor chat), beside Slides and Listen; the Ask tab asks across the project. */
.pj-card__ask:hover { color: var(--pj-ai); }
.pj-setup-link svg { width: 14px; height: 14px; }

/* ════════════════════════════════════════════════════════════════════
   One look across the new experience. The page mixes its own parts with
   the app's (report cards, collections, drawer, coach, Studio); these
   rules hold all of them to the same few decisions:
     accent    --rp-action (blue) for every primary action and selected
               state; navy (--rp-heading) is for text only
     corners   14px cards and panels · 10px buttons and inputs · pills for
               chips, tags and segments
     lines     one border tone (--pj-line), one soft shadow
   ════════════════════════════════════════════════════════════════════ */
/* Strict green (Desk, user 2026-11-05): the accent is ink, so
   selected states, links, icons and marks read neutral. Green stays on the
   primary actions alone — primary and send buttons, New report, the Run
   step, the add button on Sources, and switched-on toggles. */
.pj, .pj-sethost { --pj-accent: var(--rp-text); --pj-accent-hover: var(--rp-text-secondary); --pj-accent-tint: var(--rp-fill); --pj-on-accent: var(--rp-surface); }
.pj :is(.pj-btn--primary, .pj-icon-btn--solid, .pj-tabs__new, .pj-toggle),
.pj-flownav .pj-nextcard.is-ready,
:is(.pj-sourcespage, .pj-datahost) .collections-add-btn { --pj-accent: var(--rp-action); --pj-accent-hover: var(--rp-action-hover); --pj-accent-tint: var(--rp-action-tint); --pj-on-accent: var(--rp-text-on-action); }

/* accent: primary actions */
.pj-btn--primary, .pj-icon-btn--solid { background: var(--pj-accent); border-color: var(--pj-accent); color: var(--rp-text-on-action); }
.pj-btn--primary:hover, .pj-icon-btn--solid:hover { background: var(--pj-accent-hover); border-color: var(--pj-accent-hover); color: var(--rp-text-on-action); }

/* accent: selected and done states */
.pj-tabs__tab.is-on::after { background: var(--pj-accent); }
.pj-dock__seg.is-on { background: var(--pj-accent); color: var(--pj-on-accent); }
.pj-dock__tick { background: var(--pj-accent); }
.pj-fw__card.is-on { border-color: var(--pj-accent); box-shadow: 0 0 0 1px var(--pj-accent); background: var(--pj-accent-tint); }
.pj-fw__card.is-on .pj-fw__icon { background: var(--pj-accent); }
.pj-fw__check { color: var(--pj-accent); }
.pj-check--done .pj-tick { background: var(--pj-accent); border-color: var(--pj-accent); }
/* The review's rows wear their own icon: blue when set, dashed and grey when
   optional and empty, amber when the run needs it. */
.pj-tick.pj-tick--icon { width: 28px; height: 28px; border-width: 1.5px; }
.pj-tick.pj-tick--icon svg { width: 15px; height: 15px; }
.pj-check--done .pj-tick--icon { background: var(--pj-accent-tint); border-color: transparent; color: var(--pj-accent); }
.pj-check--empty .pj-tick--icon { background: transparent; border-color: var(--rp-border-strong); color: var(--rp-text-muted); }
.pj-check--missing .pj-tick--icon { background: var(--rp-warning-soft); border-color: var(--rp-warning-indicator); color: var(--rp-warning-text); }
.pj-review__bar span { background: var(--pj-accent); }
.pj-toggle input:checked + .pj-toggle__track { background: var(--pj-accent); }
/* a part that is set: a soft tint, not a solid block */
.pj-setrow--set .pj-setrow__icon { background: var(--pj-accent-tint); color: var(--pj-accent); }

/* the app's report cards, as cards of this page */
/* No overflow clipping: the card's ⋮ menu opens past its edge. */
.pj .library-card { border-radius: var(--pj-radius); border-color: var(--pj-line); box-shadow: var(--pj-shadow); overflow: visible; }
.pj .library-feed-list-item:has(.library-card-menu.is-open) { position: relative; z-index: 5; }
.pj .library-card:hover { box-shadow: var(--pj-shadow-hover); }
.pj .library-card-link { border-radius: var(--rp-radius-lg); }
.pj .library-feed-list-item + .library-feed-list-item { margin-top: 0; }
/* library toolbar: same button language as the page (pj-btn / pj-btn--primary) */
.pj .library-search-input { height: 38px; padding-block: 0; border-radius: var(--rp-radius-lg); border-color: var(--pj-line); }
.pj .library-search-button, .pj .library-filters-toggle { height: 38px; padding-block: 0; border-radius: var(--rp-radius-lg); font-size: var(--rp-text-sm); font-weight: 600; }
.pj .library-search-button { background: var(--rp-fill); color: var(--rp-text); border-color: transparent; }
.pj .library-search-button:hover { background: var(--rp-fill-strong); }
.pj .library-filters-toggle:not([aria-expanded="true"]):not(.has-active) { border-color: var(--pj-line); color: var(--rp-heading); }
.pj .library-filters-toggle:not([aria-expanded="true"]):not(.has-active):hover { border-color: var(--rp-border-strong); }
/* a report not run yet sits in the list as a card of the same shape */
.pj [data-unified] .pj-tlist { box-shadow: var(--pj-shadow); }

/* the app's collections, inside a project's Data tab */
.pj-datahost .collections-card { border-radius: var(--pj-radius); border-color: var(--pj-line); box-shadow: var(--pj-shadow); overflow: visible; }
.pj-datahost .collections-add-btn {
  height: 38px; padding: 0 14px; gap: 6px; border: 1px solid var(--pj-accent); border-radius: var(--rp-radius-lg);
  background: var(--pj-accent); color: var(--rp-text-on-action); font-size: var(--rp-text-sm);
}
.pj-datahost .collections-add-btn:hover { background: var(--pj-accent-hover); border-color: var(--pj-accent-hover); }
.pj-datahost .collections-add-btn__icon { background: transparent; color: inherit; }
.pj-datahost .collections-empty, .pj-datahost [class*="collections-empty"] { border-radius: var(--pj-radius); }

/* the app's drawer: this page's corners on its fields */
/* Card buttons keep their family colour (--card-accent is a signal: explore,
   market, design, operation); only their corners follow this page. */
.pj .library-card, .pj-datahost .collections-card { --card-radius: 8px; }

/* ── report cards, decluttered: engine, status, title, actions, tags, date ──
   No family/language/model/web-search kickers and no context excerpt (it is
   the report's own setup). The tag row is the app's own: everyone's tags and
   "+ Tag", and the Demo/Website/Roadmap marks for admins only. */
.pj .library-card-excerpt,
.pj .library-card-meta > .library-card-kicker--config,
.pj .library-card-meta > .library-card-kicker-sep:has(+ .library-card-kicker--config),
.pj .library-card-meta > .library-card-kicker:first-child:not(:last-child),
.pj .library-card-meta > .library-card-kicker:first-child:not(:last-child) + .library-card-kicker-sep { display: none !important; }
.pj .library-card-foot { padding-top: 0; }

/* The card also opens the report. Unfinished reports drop the greyed "View". */
.pj .library-card-links > .library-card-link--disabled { display: none !important; }
.pj .library-card.pj-card-link { cursor: pointer; transition: box-shadow var(--rp-duration-base), border-color var(--rp-duration-base), transform var(--rp-duration-base); }
.pj .library-card.pj-card-link:hover { border-color: var(--rp-action-border); transform: translateY(-1px); }

/* The card's buttons in one row under the title, using the card's width. */
.pj .library-card-title-row { flex-direction: column; align-items: stretch; gap: 10px; }
.pj .library-card-links { flex-direction: row; flex-wrap: wrap; justify-content: flex-start; align-items: center; gap: 6px; width: auto; }
.pj .library-card-links > * { width: auto; }


/* Setup is a secondary action, like Slides and Listen: the card's soft tint,
   not View's outline. The app outlines every card link it doesn't name, with a
   selector too specific to out-rank without !important. */
.pj .library-card-title-row .library-card-link.pj-setup-link { background: var(--card-accent-soft) !important; border-color: transparent !important; color: var(--card-accent) !important; }

/* A report still being set up, drawn as a report card (pj-setupcard). Its two
   states take the card's status style in this page's state colours. */
.pj .library-card-status.pj-status--draft { background: var(--rp-surface-sunken); color: var(--rp-text-muted); }
.pj .library-card-status.pj-status--runnable { background: var(--rp-success-soft); color: var(--rp-success-text); border-color: var(--rp-success-border); }
.pj .pj-setupcard { border-style: dashed; box-shadow: none; }
.pj .pj-setupcard:hover { border-style: solid; }

/* Project card actions (ask, star, delete): always shown, larger and clearer. */
.pj-card__actions { gap: 6px; }
.pj-card__act {
  width: 32px; height: 32px; border-radius: var(--rp-radius-lg); opacity: 1;
  background: var(--rp-surface-muted); color: var(--rp-text-secondary);
}
.pj-card__act svg { width: 18px; height: 18px; }
.pj-card__act:hover { background: var(--rp-action-tint); color: var(--pj-accent); }
.pj-card__ask { color: var(--pj-ai); }
.pj-card__fav.is-on { background: color-mix(in srgb, var(--rp-favorite) 14%, var(--rp-surface)); color: var(--rp-favorite); }
.pj-card__del:hover { background: var(--rp-danger-soft); color: var(--rp-danger-text); }
.pj-card__meta { padding-top: 10px; }

/* One style for every icon action — project cards and page headers alike:
   white, a hairline border, a grey icon; blue on hover (red for delete).
   Only meaning gets colour at rest: a set star is gold. */
.pj-card__act, .pj-top .pj-icon-btn {
  width: 34px; height: 34px; border-radius: var(--rp-radius-lg); opacity: 1;
  border: 1px solid var(--pj-line); background: var(--rp-surface); color: var(--rp-text-secondary);
}
.pj-card__act svg, .pj-top .pj-icon-btn svg { width: 17px; height: 17px; }
.pj-card__act:hover, .pj-top .pj-icon-btn:hover { border-color: var(--rp-action-border); background: var(--rp-action-tint); color: var(--pj-accent); }
.pj-card__del:hover, .pj-top .pj-icon-btn--danger:hover { border-color: var(--rp-danger-border); background: var(--rp-danger-soft); color: var(--rp-danger-text); }
.pj-card__ask { color: var(--rp-text-secondary); }
.pj-card__fav.is-on { border-color: var(--pj-line); background: var(--rp-surface); color: var(--rp-favorite); }
.pj-card__fav.is-on svg { fill: currentColor; }
/* the header's text button (Ask) at the same height */
.pj-top .pj-btn:not(.pj-btn--primary) { height: 34px; color: var(--rp-text-secondary); }
.pj-top .pj-btn--primary { height: 34px; }

/* ── report card, design B (projects.js shapeCard) ─────────────────────
   The family's colour on the inline-start edge; the title first; one bottom
   line: actions (View labelled, the rest as icons), then tags, then date. */
.pj .pj-rcard {
  border-inline-start: 3px solid var(--card-accent, var(--pj-line));
  border-start-start-radius: 6px; border-end-start-radius: 6px;
}
.pj .pj-rcard.pj-setupcard { border-inline-start-style: dashed; }
.pj .pj-rcard .library-card-title { font-size: var(--rp-text-xl); font-weight: 400; line-height: 1.45; letter-spacing: -0.01em; }
html[lang="fa"] .pj .pj-rcard .library-card-title { letter-spacing: 0; }
/* A title reads in its own direction: an English title runs and aligns left on the Farsi page. */
.pj .pj-rcard .library-card-title { unicode-bidi: plaintext; text-align: start; }
.pj .pj-rcard .library-card-title-row { gap: 0; }
/* The foot is two rows (user, 2026-10-15): the tags on their own, then
   the version on one side and the date and time on the other. */
.pj .pj-rcard .library-card-foot { display: flex; flex-direction: column; align-items: stretch; gap: 10px; padding-top: 6px; }
.pj .pj-rcard .library-card-header-row > .library-card-links { flex: 0 1 auto; min-width: 0; margin: 0; flex-wrap: wrap; }
/* the engine, as the first tag */
.pj .pj-rcard .pj-engine-tag { display: inline-flex; align-items: center; color: var(--rp-text-secondary); }
.pj .pj-rcard .library-card-tagging { flex: none; width: 100%; min-width: 0; margin: 0; display: flex; justify-content: flex-start; }
.pj .pj-rcard .library-card-tagging-row { justify-content: flex-start; }
.pj .pj-rcard .library-card-tagging { cursor: default; }
.pj .pj-rcard .library-card-meta-footer { display: flex; flex: none; width: 100%; margin: 0; padding: 8px 0 0; justify-content: flex-end; border-top: 1px solid var(--rp-border-subtle); }
/* icon-only secondary actions */
.pj .pj-rcard .pj-iconlink { width: 32px; min-width: 32px; padding: 0; justify-content: center; position: relative; }
.pj .pj-rcard .pj-iconlink svg { width: 16px; height: 16px; margin: 0; }
.pj .pj-rcard .pj-linklabel { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
/* In the bottom line every action has the card's soft tint (View is the one
   with a label); the app's outline/fill rules were tied to the title row. */
.pj .pj-rcard :is(.library-card-header-row, .library-card-foot) .library-card-link:not(.library-card-link--stop) {
  background: var(--card-accent-soft) !important; border-color: transparent !important; color: var(--card-accent) !important;
}
.pj .pj-rcard :is(.library-card-header-row, .library-card-foot) .library-card-link:not(.library-card-link--stop):hover {
  background: color-mix(in srgb, var(--card-accent) 16%, var(--rp-surface)) !important;
}
/* An icon-only action keeps its "ready" dot (slides made, audio made) as a
   corner badge, so the buttons stay the same size and the icon centred. */
.pj .pj-rcard .pj-iconlink .library-card-link-dot { position: absolute; top: 4px; inset-inline-end: 4px; width: 7px; height: 7px; margin: 0; border: 1.5px solid var(--rp-surface); box-sizing: content-box; }

/* ── project cards: the report card's anatomy (pj-projcard) ── */
.pj-grid .pj-projcard { display: flex; flex-direction: column; min-height: 168px; padding: 0; color: inherit; text-decoration: none; cursor: pointer; animation: pj-deal 380ms var(--rp-ease-out) both; animation-delay: calc(var(--i, 0) * 40ms); }
.pj-grid.is-settled .pj-projcard { animation: none; }
.pj-projcard .library-card-body { display: flex; flex-direction: column; flex: 1; }
.pj-projcard .library-card-main { flex: 1; }
.pj-projcard__desc { margin: 4px 0 0; font-size: var(--rp-text-xs); line-height: 1.5; color: var(--rp-text-muted); display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
.pj-projcard .library-card-foot .library-card-link svg { width: 15px; height: 15px; }
.pj-projcard:hover { border-color: var(--rp-action-border); transform: translateY(-1px); box-shadow: var(--pj-shadow-hover); }
.pj-projcard .pj-projcard__del:hover { color: var(--rp-danger-text); }
.pj-projcard .pj-projcard__edit:hover { color: var(--pj-accent-hover); }
.pj-projcard .pj-projcard__move:hover:not(:disabled) { color: var(--pj-accent-hover); }
.pj-projcard .pj-projcard__move:disabled { opacity: 0.3; cursor: default; }
.pj-projcard--earlier { --pj-edge: var(--rp-border-strong) !important; background: transparent; box-shadow: none; }
.pj .library-card-status.pj-status--failed { background: var(--error-bg); color: var(--error); border-color: var(--rp-danger-border); }
.pj .library-card-status.pj-status--awaiting_input { background: var(--rp-warning-soft); color: var(--rp-warning-text); border-color: var(--rp-warning-border); }
.pj .library-card-status.pj-status--pending { background: color-mix(in srgb, var(--rp-info-indicator) 12%, var(--rp-surface)); color: var(--rp-info-text); }
/* A project card's edge shows what most needs attention; its buttons keep the accent. */
.pj .pj-projcard { --card-accent: var(--rp-action); --card-accent-soft: var(--rp-action-tint); border-inline-start-color: var(--pj-edge, var(--rp-action)); }

/* ════════════════════════════════════════════════════════════════════
   Colour with a purpose. Each colour means one thing, and appears only
   where that thing is true; everything else is neutral.
     blue (--rp-action)      the thing to do / where you are
     family (--card-accent)  which kind of report — the report card's edge only
     green · amber · red     how a run went (status; a project's edge when
                             something inside needs attention)
     violet (--rp-personalized)  AI — the coach, AI suggestions, Ask
     gold (--rp-favorite)    your favourites
   ════════════════════════════════════════════════════════════════════ */

/* Report-card actions: View is the thing to do (blue); the rest are neutral
   until hovered. The family colour stays on the edge, not on the buttons. */
.pj .pj-rcard :is(.library-card-header-row, .library-card-foot) .library-card-link:not(.library-card-link--stop) {
  background: var(--rp-surface-muted) !important; color: var(--rp-text-secondary) !important;
}
.pj .pj-rcard :is(.library-card-header-row, .library-card-foot) .library-card-links > .library-card-link:first-child:not(.pj-iconlink):not(.library-card-link--stop):not([data-act="project-ask"]) {
  background: var(--rp-action-tint) !important; color: var(--pj-accent) !important;
}
.pj .pj-rcard :is(.library-card-header-row, .library-card-foot) .library-card-link:not(.library-card-link--stop):hover {
  background: var(--rp-action-tint) !important; color: var(--pj-accent) !important;
}
/* Setup is a step, not AI and not an outcome: neutral like the other icons. */
.pj .pj-rcard :is(.library-card-header-row, .library-card-foot) .pj-setup-link { background: var(--rp-surface-muted) !important; color: var(--rp-text-secondary) !important; }
.pj .pj-rcard :is(.library-card-header-row, .library-card-foot) .pj-setup-link:hover { background: var(--rp-action-tint) !important; color: var(--pj-accent) !important; }

/* A project's edge speaks only when something inside needs attention
   (projects.js sets --pj-edge; neutral otherwise). */

/* AI is violet: Ask (card, header, tab), the coach, AI suggestions. */
.pj .pj-projcard .library-card-foot .library-card-link[data-act="project-ask"] {
  background: color-mix(in srgb, var(--pj-ai) 10%, var(--rp-surface)) !important; color: var(--pj-ai) !important;
}
.pj .pj-projcard .library-card-foot .library-card-link[data-act="project-ask"]:hover {
  background: color-mix(in srgb, var(--pj-ai) 18%, var(--rp-surface)) !important;
}
.pj-top a.pj-btn[href$="/chat"] { color: var(--pj-ai); }
.pj-top a.pj-btn[href$="/chat"]:hover { border-color: color-mix(in srgb, var(--pj-ai) 40%, var(--pj-line)); background: color-mix(in srgb, var(--pj-ai) 8%, var(--rp-surface)); color: var(--pj-ai); }
.pj-tabs__tab[href$="/chat"] svg { color: var(--pj-ai); }

/* Nothing else gets colour for decoration. */
.pj .library-card-kicker { color: var(--rp-text-muted); }

/* AI's colour: the design system's --rp-ai (a clear violet; its dark-theme
   value lives with the tokens). Ask, AI suggestions and the coach use it. */
.pj, .pj-bar { --pj-ai: var(--rp-ai); }
/* the app's coach, inside this page, speaks in the AI colour */
.pj .coach { --co-accent: var(--pj-ai); --co-accent-soft: color-mix(in srgb, var(--pj-ai) 10%, var(--rp-surface)); }

/* Column width (user, 2026-10-17): every page of the new app is as wide as the
   Studio step (1080px, the .pj rule above), so Studio keeps its two columns and
   the rest line up with it. One card per row is kept. */
.pj-grid { grid-template-columns: minmax(0, 1fr); gap: 16px; }
.pj-grid .pj-projcard { min-height: 0; }
.pj-cards { gap: 16px; }
.pj-console { grid-template-columns: minmax(0, 1fr); }

/* New report (user, 2026-10-12): the first step, drawn as the original app's
   composer (styles.css draws it); the arrow goes on to Studio or Console.
   2026-10-14: scope and focus are part of the coach, framework and context
   sit inline under it — no pickers, no drawers. */
.pj-nrc .composer-stack { max-width: none; margin: 0; }
.pj-nrc__tick { display: inline-flex; color: var(--rp-success-text); }
.pj-nrc__tick svg { width: 13px; height: 13px; }

/* Scope and focus inside the coach's detail. */
.pj-coachset { display: grid; gap: 14px; }
.pj-nrc :is(.coach__foot, .coach__paths) + .pj-coachset { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--rp-border-subtle); }
.pj-coachset__part { display: grid; gap: 8px; }
.pj-coachset__label, .pj-nrsec__label { display: inline-flex; align-items: center; gap: 6px; margin: 0; font-size: var(--rp-text-xs); font-weight: 600; color: var(--rp-text-secondary); }
.pj-coachset__label svg, .pj-nrsec__label svg { width: 14px; height: 14px; color: var(--rp-text-muted); }
.pj-coachset__part.is-missing .pj-coachset__label { color: var(--rp-warning-text); }
.pj-coachset .pj-sugg, .pj-nrsec .pj-sugg { margin-top: 2px; padding-top: 0; border-top: 0; }
.pj-coachset .pj-sugg__head, .pj-nrsec .pj-sugg__head { margin-bottom: 6px; }
.pj .pj-coachset__text, .pj .pj-nrsec__text { width: 100%; resize: vertical; min-height: 0; font-size: var(--rp-text-sm); line-height: 1.6; }

/* Framework and context, on the page under the composer: one card with the
   composer's own skin (18px frame, its lift), one hairline-divided row each —
   not two loose boxes in a different style. */
.pj-nrset, .pj-nrcard { margin-top: 20px; border: 1px solid var(--border, var(--rp-border)); border-radius: var(--rp-radius-xl); background: var(--card-bg, var(--rp-surface)); box-shadow: none; }
.pj-nrsec { padding: 16px; }
.pj-nrsec + .pj-nrsec { border-top: 1px solid var(--rp-border-subtle); }
.pj-nrsec__head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 10px; }
.pj-nrsec .pj-search { max-width: none; }
.pj .pj-nrsec__text, .pj .pj-coachset__text { border-color: transparent; background: var(--pj-soft); }
.pj .pj-nrsec__text:focus, .pj .pj-coachset__text:focus { border-color: var(--rp-focus); box-shadow: 0 0 0 1px var(--rp-focus); background: var(--rp-surface); }
.pj-nrc .pj-err:empty { display: none; }

/* The coach is the composer's own, always joined under the topic. The
   composer's body reserves 230px for its "thinking" swap, which here only
   showed as a blank band where the coach should be. */
.pj .pj-nrc .composer-card__body,
.pj .pj-nrc .composer-card--compose { min-height: 0 !important; }
.pj-nrc .coach__start:disabled { opacity: 0.45; cursor: default; }
.pj-nrc .coach--bar .coach__head { margin-bottom: 0; }
.pj-nrc .coach--bar .coach__error { display: block; margin-top: 8px; }
/* Bar and detail read as one coach panel: the detail continues the bar's
   frame and takes over the bottom corners. */
.pj-nrc .coach:has(+ .coach:not([hidden])) { border-bottom: 0; border-radius: 0; }
/* The framework menu (user, 2026-10-15: inline, no drawer): opens under the
   coach strip from its chip, a searchable list of quiet rows. */
.pj-fwmenu__list { display: grid; gap: 14px; }
.pj-fwmenu__group { display: grid; gap: 4px; }
.pj-fwmenu__label { font-size: var(--rp-text-xs); font-weight: 600; color: var(--rp-text-muted); padding-inline: 8px; }
.pj-fwmenu__rows { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2px 8px; }
.pj-fwmenu__row { display: flex; align-items: center; gap: 8px; width: 100%; min-height: 36px; padding: 6px 8px; border: 0; border-radius: var(--rp-radius-lg); background: none; color: var(--rp-heading); font: inherit; font-size: var(--rp-text-sm); text-align: start; cursor: pointer; }
.pj-fwmenu__row:hover { background: var(--pj-soft); }
.pj-fwmenu__row.is-on { background: var(--pj-accent-tint); color: var(--pj-accent); font-weight: 600; }
.pj-fwmenu__icon { display: grid; place-items: center; width: 26px; height: 26px; flex: none; border-radius: var(--rp-radius-lg); background: var(--rp-tile); color: var(--rp-tile-text); }
.pj-fwmenu__row.is-on .pj-fwmenu__icon { background: var(--pj-accent); color: var(--rp-surface); }
.pj-fwmenu__icon svg { width: 14px; height: 14px; }
.pj-fwmenu__name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pj-fwmenu__row > svg { width: 14px; height: 14px; flex: none; }
.pj-fwmenu__none { margin: 4px 8px; color: var(--rp-text-muted); font-size: var(--rp-text-sm); }
@media (max-width: 560px) { .pj-fwmenu__rows { grid-template-columns: minmax(0, 1fr); } }
.pj-nrc .coach[hidden] { display: none; }
/* The framework is the coach's lens (user, 2026-10-15): a chip at the strip's
   end, opening the framework drawer. Unpicked, it asks in the warning tone. */
.pj-coachbar__row { display: flex; align-items: center; gap: 12px; min-height: 30px; }
.pj-coachbar__row > :first-child { flex: 1; min-width: 0; }
.pj-coachfw { display: inline-flex; align-items: center; gap: 6px; flex: none; max-width: 55%; padding: 4px 10px 4px 8px; border: 1px solid var(--rp-border-subtle); border-radius: 999px; background: var(--rp-surface); color: var(--rp-heading); font: inherit; font-size: var(--rp-text-sm); font-weight: 600; cursor: pointer; }
.pj-coachfw:hover { border-color: var(--rp-border-strong); }
.pj-coachfw__icon { display: inline-grid; color: var(--rp-text-secondary); }
.pj-coachfw svg { width: 14px; height: 14px; flex: none; }
.pj-coachfw > svg:last-child { width: 12px; height: 12px; color: var(--rp-text-muted); }
.pj-coachfw__name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pj-coachfw.is-empty { border-style: dashed; border-color: var(--rp-warning-border); color: var(--rp-warning-text); }
.pj-coachfw.is-empty .pj-coachfw__icon { color: inherit; }
.pj-nrc .coach__paths > .coach__thinking, .pj-nrc .coach__paths > .coach__hint, .pj-nrc .coach__paths > .coach__error { margin: 0; }
.pj-nrc .coach--detail { padding-top: 4px; border-top: 0; }
.pj-nrc .coach--detail > .coach__hint:first-child { margin-top: 10px; }
.pj-nrc .coach--detail > .pj-coachset:first-child { margin-top: 10px; padding-top: 14px; border-top: 1px solid var(--rp-border-subtle); }
.pj-coachset__part + .pj-coachset__part { padding-top: 14px; border-top: 1px solid var(--rp-border-subtle); }
.pj-coachset .pj-sugg:empty, .pj-nrsec .pj-sugg:empty { display: none; }
.pj-nrsec--fw .pj-fw__picked { gap: 10px; }
.pj-nrsec--fw .pj-fw__picked .pj-nrsec__label { margin-inline-end: 6px; }
.pj-nrsec--fw .pj-fw__picked b { font-size: var(--rp-text-sm); }
.pj-nrsec--fw .pj-fw--engines { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.pj-nrsec .pj-seg { margin-top: 12px; }
.pj-nrsec .pj-seg + .pj-fw { margin-top: 10px; }
@media (max-width: 560px) { .pj-nrsec--fw .pj-fw--engines { grid-template-columns: 1fr; } }
/* The page's own form rules would draw a second frame and a resize grip;
   these restore what the original composer computes to. */
.pj .pj-nrc .composer-card { min-height: 0; padding: 0; box-shadow: none; background: transparent; }
.pj .pj-nrc .chat-composer-prompt { width: 100%; min-height: 140px; padding: 0 0 8px; resize: none; border: 0; background: transparent; color: var(--text); font-size: var(--rp-text-xl); line-height: 1.75; box-shadow: none; }
.pj-empty { display: flex; align-items: center; justify-content: center; gap: 8px; padding: 28px; border: 1px dashed var(--rp-border); border-radius: var(--rp-radius-xl); color: var(--rp-text-secondary); text-decoration: none; }
.pj-empty:hover { border-color: var(--rp-action-border); color: var(--pj-accent); }
.pj-empty svg { width: 16px; height: 16px; }
/* The library toolbar sits under the app bar while the list scrolls. */
.pj .pj-library > .library-toolbar { top: 72px; }
.pj .pj-nrc .chat-composer-prompt:focus { border: 0; box-shadow: none; }

/* Moving a report to another project (user, 2026-10-12): an icon on every
   report card; the drawer lists the other projects, or makes a new one. */
.pj-move__what { margin: 0 0 14px; color: var(--rp-text-secondary); font-size: var(--rp-text-sm); line-height: 1.5; }
.pj-move__list { display: flex; flex-direction: column; gap: 6px; }
.pj-move__to { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 10px; width: 100%; padding: 12px 14px; border: 1px solid var(--rp-border-subtle); border-radius: var(--rp-radius-xl); background: var(--rp-surface); color: var(--rp-heading); font: inherit; font-size: var(--rp-text-sm); text-align: start; cursor: pointer; }
.pj-move__to:hover { border-color: var(--rp-action-border); background: var(--rp-action-tint); }
.pj-move__to span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pj-move__to svg { width: 16px; height: 16px; color: var(--rp-text-muted); }
html[dir="rtl"] .pj-move__to svg:last-child { transform: scaleX(-1); }
.pj-move__new { display: flex; gap: 8px; margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--rp-border-subtle); }
.pj-move__new input { flex: 1; min-width: 0; }
.pj-move__new .pj-btn { flex: none; }
.pj-move-link { font: inherit; cursor: pointer; }
.pj-move-link svg { width: 14px; height: 14px; }
.pj .pj-rcard :is(.library-card-header-row, .library-card-foot) .pj-move-link { border-color: transparent !important; background: var(--rp-surface-muted) !important; color: var(--rp-text-secondary) !important; }
.pj .pj-rcard :is(.library-card-header-row, .library-card-foot) .pj-move-link:hover { background: var(--rp-action-tint) !important; color: var(--pj-accent) !important; }
.pj .pj-rcard :is(.library-card-header-row, .library-card-foot) .pj-setup-del:hover { background: var(--rp-danger-soft) !important; color: var(--rp-danger-text) !important; }

/* New report as steps of the report's one flow (user, 2026-10-15): engine,
   topic + coach, context; then Studio and Console. Every step is one card in
   the composer's skin (.pj-nrcard shares .pj-nrset's frame), the dock under
   them all. */
.pj-nrflow { padding-bottom: 96px; }
.pj-nrflow > .pj-nrcard:first-child, .pj-nrflow > .pj-nrc:first-child { margin-top: 0; }
.pj-nrcard { padding: 16px; }
.pj-nrcard__head { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 28px; margin-bottom: 12px; }
.pj-nrcard__end { display: inline-flex; align-items: center; gap: 8px; min-width: 0; }
.pj-nrcard__end .pj-coachfw { max-width: 220px; }
.pj-nrcard__skip { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 12px; border: 1px solid var(--rp-border-subtle); border-radius: 999px; background: none; color: var(--rp-text-secondary); font: inherit; font-size: var(--rp-text-xs); font-weight: 600; cursor: pointer; }
.pj-nrcard__skip:hover { border-color: var(--rp-border-strong); color: var(--rp-heading); }
.pj-nrcard__skip svg { width: 13px; height: 13px; }
html[dir="rtl"] .pj-nrcard__skip svg { transform: scaleX(-1); }
/* The original app's context presets, drawn as the coach's pills. */
.pj-ctxpresets { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 12px; }
.pj-ctxpreset { padding: 6px 13px; border: 1px solid var(--rp-border-subtle); border-radius: 999px; background: var(--rp-surface); color: var(--rp-heading); font: inherit; font-size: var(--rp-text-sm); font-weight: 500; cursor: pointer; }
.pj-ctxpreset:hover { border-color: var(--rp-border-strong); }
.pj-ctxpreset.is-on { border-color: var(--pj-accent); background: var(--pj-accent-tint); color: var(--pj-accent); font-weight: 600; }
/* Context and its AI suggestions are one field, as the topic and its coach
   (user, 2026-10-15): the box on top, the coach's strip joined under it. */
.pj-ctxcoach { border: 1px solid var(--rp-border-subtle); border-radius: var(--rp-radius-xl); background: var(--rp-surface); overflow: hidden; transition: border-color 120ms ease, box-shadow 120ms ease; }
.pj-ctxcoach:focus-within { border-color: var(--rp-focus); box-shadow: 0 0 0 1px var(--rp-focus); }
.pj-ctxcoach__field { position: relative; }
.pj .pj-ctxcoach .pj-nrsec__text, .pj .pj-ctxcoach .pj-nrsec__text:focus { display: block; padding: 14px 16px; border: 0; border-radius: 0; background: transparent; box-shadow: none; outline: none; }
/* "Upload a file" sits in the field, above the coach's strip. */
.pj-ctxfile { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; padding: 8px 14px; border-top: 1px solid var(--rp-border-subtle); }
.pj-ctxfile__btn { display: inline-flex; align-items: center; gap: 6px; padding: 4px 2px; border: 0; background: none; color: var(--rp-text-secondary); font: inherit; font-size: var(--rp-text-xs); font-weight: 600; cursor: pointer; }
.pj-ctxfile__btn:hover { color: var(--rp-heading); }
.pj-ctxfile__btn[disabled] { opacity: .55; cursor: progress; }
.pj-ctxfile__btn svg { width: 14px; height: 14px; }
.pj-ctxfile__status { font-size: var(--rp-text-xs); color: var(--rp-text-secondary); }
.pj-ctxfile__status.is-error { color: var(--rp-danger-text); }
/* In the focus card the row sits on the card itself, so it lines up with the lists above. */
.pj-ctxfile--focus { padding: 10px 0 0; margin-top: 14px; }
.pj-ctxcoach .coach { border: 0; border-top: 1px solid var(--rp-border-subtle); border-radius: 0; }
.pj-ctxcoach .coach--bar { padding-block: 11px; }
.pj-ctxcoach .coach--bar .coach__head { margin: 0; }
.pj-ctxcoach .coach--bar .coach__error { display: block; margin-top: 6px; }
.pj-ctxcoach .coach--detail { padding-top: 0; border-top: 0; }
.pj-ctxcoach .coach--detail > .coach__hint:first-child { margin-top: 0; }
.pj-ctxcoach__title { cursor: default; }
/* A step the flow cannot reach yet. */
.pj-dock__seg.is-off { color: var(--rp-text-faint); cursor: default; }
.pj-dock__seg.is-off:hover { color: var(--rp-text-faint); }

/* New report leaves the tabs (user, 2026-10-15): a pill at the row's end. */
.pj-tabs { align-items: center; }
.pj-tabs__new { display: inline-flex; align-items: center; gap: 6px; height: 32px; margin-inline-start: auto; padding: 0 14px 0 12px; border-radius: 999px; background: var(--pj-accent); color: var(--rp-text-on-action); font-size: var(--rp-text-sm); font-weight: 600; text-decoration: none; box-shadow: var(--rp-shadow-action); transition: background-color 120ms ease; }
.pj-tabs__new:hover { background: var(--pj-accent-hover); color: var(--rp-text-on-action); }
.pj-tabs__new svg { width: 15px; height: 15px; }
button.pj-tabs__new { border: 0; font-family: inherit; cursor: pointer; }
.pj-tabs__new.is-on { background: var(--pj-accent-tint); color: var(--pj-accent); box-shadow: inset 0 0 0 1px var(--pj-accent); }

/* Back and on at the top of every step (user, 2026-10-17; was at the end
   since 2026-10-15): one joined control in the step cards' frame — a quiet back half
   at the start, the blue way on filling the rest — with the flow's progress
   as a hairline along the top. Arrows sit at the outer edges. */
.pj-flownav {
  position: relative; display: grid; grid-template-columns: var(--pj-flow-cols, minmax(0, 2fr) minmax(0, 1fr));
  margin-bottom: 20px; border: 1px solid var(--border, var(--rp-border)); border-radius: var(--rp-radius-xl); overflow: hidden;
  background: var(--card-bg, var(--rp-surface));
  box-shadow: none;
}
.pj-flownav::before { content: ""; position: absolute; z-index: 1; inset-block-start: 0; inset-inline-start: 0; width: var(--pj-flow, 0%); height: 3px; background: var(--pj-accent); border-end-end-radius: 3px; }
.pj-flownav.no-next::before { background: var(--rp-success-indicator); }
.pj-flownav .pj-nextcard {
  display: grid; align-items: center; gap: 14px; min-height: 84px; margin: 0; padding: 16px 20px;
  border: 0; border-radius: 0; box-shadow: none; transform: none;
  font: inherit; text-align: start; text-decoration: none; cursor: pointer;
}
.pj-flownav .pj-nextcard:hover { transform: none; }
.pj-flownav .pj-nextcard__copy { display: grid; gap: 3px; min-width: 0; }
.pj-flownav .pj-nextcard__kicker { font-size: var(--rp-text-2xs); font-weight: 600; letter-spacing: 0.01em; }
.pj-flownav .pj-nextcard__title { display: flex; align-items: center; gap: 8px; font-size: var(--rp-text-md); font-weight: 600; line-height: 1.3; }
.pj-flownav .pj-nextcard__hint { font-size: var(--rp-text-xs); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pj-nextcard__ticon { display: inline-grid; flex: none; }
.pj-nextcard__ticon svg { width: 16px; height: 16px; }
.pj-flownav .pj-nextcard__go { width: 36px; height: 36px; flex: none; transition: transform var(--rp-duration-fast) var(--rp-ease-out), background-color var(--rp-duration-fast); }
.pj-flownav .pj-nextcard__go svg { width: 16px; height: 16px; transform: none; }
/* Arrows point along the flow: on = the reading direction's end, back = its start. */
html[dir="rtl"] .pj-flownav .pj-nextcard.is-ready .pj-nextcard__go svg, html[dir="rtl"] .pj-flownav .pj-nextcard.is-blocked .pj-nextcard__go svg,
html:not([dir="rtl"]) .pj-flownav .pj-nextcard--back .pj-nextcard__go svg { transform: scaleX(-1); }
/* back: quiet, arrow first */
.pj-flownav .pj-nextcard--back { grid-template-columns: auto minmax(0, 1fr); background: transparent; border-inline-end: 1px solid var(--rp-border-subtle); }
.pj-flownav .pj-nextcard--back:hover { background: var(--pj-soft); }
.pj-flownav .pj-nextcard--back .pj-nextcard__kicker, .pj-flownav .pj-nextcard--back .pj-nextcard__hint { color: var(--rp-text-muted); }
.pj-flownav .pj-nextcard--back .pj-nextcard__title { color: var(--rp-text-secondary); }
.pj-flownav .pj-nextcard--back .pj-nextcard__go { background: var(--pj-soft); color: var(--rp-text-secondary); }
.pj-flownav .pj-nextcard--back:hover .pj-nextcard__go { transform: translateX(-3px); }
/* here: the current step between back and on — where you are, not a link. */
.pj-flownav .pj-nextcard--current { grid-template-columns: auto minmax(0, 1fr); cursor: default; background: var(--pj-accent-tint); border-inline-end: 1px solid var(--rp-border-subtle); }
.pj-flownav.no-next .pj-nextcard--current { border-inline-end: 0; }
.pj-flownav .pj-nextcard--current .pj-nextcard__go { background: var(--rp-surface); color: var(--pj-accent); }
.pj-flownav .pj-nextcard--current .pj-nextcard__kicker { color: var(--pj-accent); }
.pj-flownav .pj-nextcard--current .pj-nextcard__title { color: var(--rp-heading); }
.pj-flownav .pj-nextcard--current .pj-nextcard__hint { color: var(--rp-text-secondary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pj-flownav .pj-nextcard--current.is-waiting .pj-nextcard__hint { color: var(--rp-warning-text); font-weight: 600; white-space: normal; }
html[dir="rtl"] .pj-flownav .pj-nextcard--back:hover .pj-nextcard__go { transform: translateX(3px); }
/* on: the blue half, arrow last */
.pj-flownav .pj-nextcard.is-ready, .pj-flownav .pj-nextcard.is-blocked { grid-template-columns: minmax(0, 1fr) auto; }
.pj-flownav .pj-nextcard.is-ready { background: var(--pj-accent); color: var(--rp-text-on-action); }
.pj-flownav .pj-nextcard.is-ready:hover { background: var(--pj-accent-hover); }
.pj-flownav .pj-nextcard.is-ready .pj-nextcard__title { color: var(--rp-text-on-action); }
.pj-flownav .pj-nextcard.is-ready .pj-nextcard__kicker, .pj-flownav .pj-nextcard.is-ready .pj-nextcard__hint { color: var(--rp-text-on-action); }
.pj-flownav .pj-nextcard.is-ready .pj-nextcard__go { background: var(--rp-text-on-action); color: var(--pj-accent); }
.pj-flownav .pj-nextcard.is-ready:hover .pj-nextcard__go { transform: translateX(3px); }
html[dir="rtl"] .pj-flownav .pj-nextcard.is-ready:hover .pj-nextcard__go { transform: translateX(-3px); }
.pj-flownav .pj-nextcard.is-blocked { background: var(--rp-surface-muted); cursor: default; opacity: 1; }
.pj-flownav .pj-nextcard.is-blocked .pj-nextcard__title { color: var(--rp-text-muted); }
.pj-flownav .pj-nextcard.is-blocked .pj-nextcard__go { background: var(--rp-surface); color: var(--rp-text-faint); }
@media (max-width: 640px) {
  .pj-flownav { grid-template-columns: minmax(0, 1fr); }
  .pj-flownav .pj-nextcard--current { order: -1; min-height: 64px; border-inline-end: 0; border-bottom: 1px solid var(--rp-border-subtle); }
  .pj-flownav .pj-nextcard--back { order: 1; min-height: 64px; border-inline-end: 0; border-top: 1px solid var(--rp-border-subtle); }
}
@media (prefers-reduced-motion: reduce) { .pj-flownav .pj-nextcard__go { transition: none; } }


/* Readable, easy to follow (user, 2026-10-15): larger type, near-full
   contrast on the blue, and a labelled "Continue" pill where the bare arrow
   was. */
.pj-flownav .pj-nextcard { min-height: 92px; }
.pj-flownav .pj-nextcard__copy { gap: 4px; }
.pj-flownav .pj-nextcard__kicker { font-size: var(--rp-text-xs); font-weight: 600; letter-spacing: 0; }
.pj-flownav .pj-nextcard__title { font-size: var(--rp-text-xl); font-weight: 600; }
.pj-flownav .pj-nextcard__hint { font-size: var(--rp-text-sm); line-height: 1.5; white-space: normal; }
.pj-flownav .pj-nextcard.is-ready .pj-nextcard__kicker, .pj-flownav .pj-nextcard.is-ready .pj-nextcard__hint { color: var(--rp-text-on-action); }
.pj-flownav .pj-nextcard--back .pj-nextcard__title { color: var(--rp-heading); }
.pj-flownav .pj-nextcard--back .pj-nextcard__kicker, .pj-flownav .pj-nextcard--back .pj-nextcard__hint { color: var(--rp-text-secondary); }
.pj-nextcard__cta { display: inline-flex; align-items: center; gap: 6px; flex: none; height: 30px; padding: 0 10px 0 13px; border-radius: 999px; background: var(--rp-text-on-action); color: var(--pj-accent); font-size: var(--rp-text-xs); font-weight: 600; transition: transform var(--rp-duration-fast) var(--rp-ease-out); }
html[dir="rtl"] .pj-nextcard__cta { padding: 0 13px 0 10px; }
.pj-nextcard__cta svg { width: 14px; height: 14px; }
html[dir="rtl"] .pj-nextcard__cta svg { transform: scaleX(-1); }
.pj-flownav .pj-nextcard.is-ready:hover .pj-nextcard__cta { transform: translateX(3px); }
html[dir="rtl"] .pj-flownav .pj-nextcard.is-ready:hover .pj-nextcard__cta { transform: translateX(-3px); }
.pj-flownav .pj-nextcard.is-blocked .pj-nextcard__cta { background: var(--rp-surface); color: var(--rp-text-faint); }
/* The Console's Run sits in the next slot; its confirm keeps the slot. */
button.pj-nextcard { font: inherit; text-align: start; }
button.pj-nextcard__cta { border: 0; cursor: pointer; font-family: inherit; }
.pj-flownav .pj-nextcard.is-ready.pj-nextcard--confirm { grid-template-columns: minmax(0, 1fr); align-content: center; gap: 10px; cursor: default; }
.pj-flownav .pj-nextcard--confirm .pj-nextcard__title { font-size: var(--rp-text-md); }
.pj-flownav .pj-nextcard--confirm .pj-confirm { animation: none; }
.pj-flownav .pj-nextcard--confirm .pj-btn--ghost { background: transparent; border-color: color-mix(in srgb, var(--rp-text-on-action) 45%, transparent); color: var(--rp-text-on-action); }
.pj-flownav .pj-nextcard--confirm .pj-btn--ghost:hover { background: color-mix(in srgb, var(--rp-text-on-action) 14%, transparent); }
.pj-flownav .pj-nextcard--current .pj-cov { vertical-align: middle; }
@media (max-width: 640px) { .pj-nextcard__cta { padding-inline: 12px; } }
@media (prefers-reduced-motion: reduce) { .pj-nextcard__cta { transition: none; } }
.pj-flownav .pj-nextcard--back .pj-nextcard__hint { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 640px) { .pj-dock__next, .pj-dock__need { display: none; } }
/* Arrow direction (user, 2026-10-15): back points to the start side (left in
   LTR, right in RTL), on points to the end side — set last so the older
   per-card RTL flips cannot win. */
html:not([dir="rtl"]) .pj-flownav .pj-nextcard--back .pj-nextcard__go svg { transform: scaleX(-1); }
html[dir="rtl"] .pj-flownav .pj-nextcard--back .pj-nextcard__go svg { transform: none; }

/* Engine step, a little more compact (user, 2026-10-15: "more compact",
   then "not that much" after a chip-cloud try): the same list rows, tighter,
   three to a line. */
.pj-fwmenu__list { gap: 10px; }
.pj-fwmenu__group { gap: 2px; }
.pj-fwmenu__group .pj-fwmenu__rows { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 6px; }
.pj-fwmenu__group .pj-fwmenu__row { min-height: 32px; padding: 3px 8px; gap: 7px; font-size: var(--rp-text-sm); }
.pj-fwmenu__group .pj-fwmenu__icon { width: 22px; height: 22px; border-radius: var(--rp-radius-md); }
.pj-fwmenu__group .pj-fwmenu__icon svg { width: 12px; height: 12px; }
@media (max-width: 640px) { .pj-fwmenu__group .pj-fwmenu__rows { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 420px) { .pj-fwmenu__group .pj-fwmenu__rows { grid-template-columns: minmax(0, 1fr); } }
/* Atlas and Delta lead the step as large cards with one line each (user,
   2026-10-15); under them, frameworks suggested for the account's role, with
   the role itself a select so it can be changed in place. */
.pj-fwengines { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.pj-fwengine { display: flex; align-items: flex-start; gap: 12px; width: 100%; min-height: 88px; padding: 14px 16px; border: 1px solid var(--rp-border-subtle); border-radius: var(--rp-radius-xl); background: none; color: var(--rp-heading); font: inherit; text-align: start; cursor: pointer; transition: border-color 0.15s, background 0.15s; }
.pj-fwengine:hover { border-color: var(--rp-border); background: var(--pj-soft); }
.pj-fwengine.is-on { border-color: var(--pj-accent); background: var(--pj-accent-tint); }
.pj-fwengine__icon { display: grid; place-items: center; width: 40px; height: 40px; flex: none; border-radius: var(--rp-radius-lg); background: var(--rp-tile); color: var(--rp-tile-text); }
.pj-fwengine.is-on .pj-fwengine__icon { background: var(--pj-accent); color: var(--rp-surface); }
.pj-fwengine__icon svg { width: 20px; height: 20px; }
.pj-fwengine__text { display: grid; gap: 4px; flex: 1; min-width: 0; }
.pj-fwengine__name { font-size: var(--rp-text-base); font-weight: 600; word-spacing: 0.15em; } /* Yekan Bakh tucks «ر» into the next word */
.pj-fwengine.is-on .pj-fwengine__name { color: var(--pj-accent); }
.pj-fwengine__blurb { font-size: var(--rp-text-xs); line-height: 1.6; color: var(--rp-text-secondary); }
.pj-fwengine > svg { width: 16px; height: 16px; flex: none; color: var(--pj-accent); }
.pj-fwsuggest { display: grid; grid-template-columns: minmax(170px, 0.8fr) minmax(0, 2fr); border: 1px solid var(--rp-border-subtle); border-radius: var(--rp-radius-xl); overflow: hidden; }
.pj-fwsuggest.is-empty { grid-template-columns: minmax(0, 1fr); }
.pj-fwsuggest__ask { display: flex; align-items: center; gap: 6px; padding: 0 10px 6px; font-size: var(--rp-text-xs); font-weight: 600; word-spacing: 0.15em; color: var(--rp-text-muted); }
.pj-fwsuggest__ask svg { width: 13px; height: 13px; color: var(--pj-accent); }
.pj-fwsuggest__areas { display: grid; align-content: start; gap: 2px; padding: 12px 8px; background: var(--pj-soft); }
.pj-fwsuggest.is-empty .pj-fwsuggest__areas { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.pj-fwsuggest.is-empty .pj-fwsuggest__ask { grid-column: 1 / -1; }
.pj-fwsuggest__persona { display: flex; align-items: center; gap: 9px; width: 100%; min-height: 40px; padding: 6px 10px; border: 0; border-radius: var(--rp-radius-lg); background: none; color: var(--rp-text-secondary); font: inherit; font-size: var(--rp-text-sm); font-weight: 600; text-align: start; cursor: pointer; transition: background 0.15s, color 0.15s; }
.pj-fwsuggest__persona:hover { background: var(--rp-surface); color: var(--rp-heading); }
.pj-fwsuggest__persona.is-on { background: var(--rp-surface); color: var(--pj-accent); box-shadow: 0 1px 2px rgb(15 23 42 / 0.06), inset 0 0 0 1px var(--rp-border-subtle); }
.pj-fwsuggest__persona:focus-visible { outline: 2px solid var(--rp-focus); outline-offset: 2px; }
.pj-fwsuggest__pico { display: grid; place-items: center; width: 26px; height: 26px; flex: none; border-radius: var(--rp-radius-lg); color: inherit; }
.pj-fwsuggest__persona.is-on .pj-fwsuggest__pico { background: var(--pj-accent); color: var(--rp-surface); }
.pj-fwsuggest__pico svg { width: 15px; height: 15px; }
.pj-fwsuggest__picks { display: grid; align-content: start; gap: 4px; padding: 12px; }
.pj-fwsuggest__row { display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px 12px; border: 1px solid transparent; border-radius: var(--rp-radius-xl); background: none; color: var(--rp-heading); font: inherit; text-align: start; cursor: pointer; transition: background 0.15s, border-color 0.15s; }
.pj-fwsuggest__row:hover { background: var(--pj-soft); }
.pj-fwsuggest__row.is-on { border-color: var(--pj-accent); background: var(--pj-accent-tint); }
.pj-fwsuggest__row .pj-fwmenu__icon { width: 34px; height: 34px; border-radius: var(--rp-radius-lg); }
.pj-fwsuggest__row .pj-fwmenu__icon svg { width: 16px; height: 16px; }
.pj-fwsuggest__row.is-on .pj-fwmenu__icon { background: var(--pj-accent); color: var(--rp-surface); }
.pj-fwsuggest__row > svg { width: 16px; height: 16px; flex: none; color: var(--pj-accent); }
.pj-fwsuggest__text { display: grid; gap: 2px; flex: 1; min-width: 0; }
.pj-fwsuggest__name { font-size: var(--rp-text-sm); font-weight: 600; }
.pj-fwsuggest__row.is-on .pj-fwsuggest__name { color: var(--pj-accent); }
.pj-fwsuggest__why { font-size: var(--rp-text-xs); line-height: 1.5; color: var(--rp-text-secondary); }
.pj-fwfamily__name { flex: 1; min-width: 0; }
.pj-fwfamily__n { font-size: var(--rp-text-xs); font-weight: 600; color: var(--rp-text-muted); font-variant-numeric: tabular-nums; }
.pj-fwsuggest__persona > svg { width: 14px; height: 14px; flex: none; color: var(--pj-accent); }
.pj-fwsuggest--families .pj-fwsuggest__picks { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 720px) { .pj-fwsuggest--families .pj-fwsuggest__picks { grid-template-columns: minmax(0, 1fr); } }
/* Its own card above the engine card: the card is the frame, so no inner border. */
.pj-nrcard--suggest { padding: 0; overflow: hidden; }
.pj-nrcard--suggest .pj-fwsuggest { border: 0; border-radius: 0; }
/* Folds (user, 2026-10-15): open for an account's first ten runs, folded after. */
.pj-suggesthead { display: flex; align-items: center; gap: 8px; width: 100%; padding: 12px 16px; border: 0; background: none; color: var(--rp-heading); font: inherit; font-size: var(--rp-text-sm); font-weight: 600; text-align: start; cursor: pointer; }
.pj-suggesthead:hover { background: var(--pj-soft); }
.pj-suggesthead:focus-visible { outline: 2px solid var(--rp-focus); outline-offset: -2px; }
.pj-nrcard--suggest.is-open .pj-suggesthead { border-bottom: 1px solid var(--rp-border-subtle); }
.pj-suggesthead__icon { display: grid; place-items: center; width: 26px; height: 26px; border-radius: var(--rp-radius-lg); background: var(--rp-tile); color: var(--rp-tile-text); }
.pj-suggesthead__icon svg { width: 14px; height: 14px; }
.pj-suggesthead__area { padding: 2px 9px; border-radius: 999px; background: var(--pj-soft); color: var(--rp-text-secondary); font-size: var(--rp-text-xs); font-weight: 600; }
.pj-suggesthead__chev { display: grid; margin-inline-start: auto; color: var(--rp-text-muted); transition: transform 0.2s; transform: rotate(90deg); }
.pj-nrcard--suggest.is-open .pj-suggesthead__chev { transform: rotate(-90deg); }
.pj-suggesthead__chev svg { width: 16px; height: 16px; }
.pj-nrcard--suggest .pj-fwsuggest__areas, .pj-nrcard--suggest .pj-fwsuggest__picks { padding: 16px 12px; }
@media (max-width: 640px) {
  .pj-fwsuggest { grid-template-columns: minmax(0, 1fr); }
  .pj-fwsuggest__areas, .pj-fwsuggest.is-empty .pj-fwsuggest__areas { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pj-fwsuggest__ask { grid-column: 1 / -1; }
}
@media (max-width: 480px) { .pj-fwengines { grid-template-columns: minmax(0, 1fr); } }

/* Focus sits in the context step (user, 2026-10-15), under a hairline. */
.pj-nrcard__part { margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--rp-border-subtle); }
/* Focus lists: the original app's drawer markup (styles.css draws them). */
.pj-focuslists { display: grid; gap: 14px; }
.pj-focuslists .usecase-drawer__focus-group + .usecase-drawer__focus-group { margin-top: 0; }
/* Console's sources drawer: this project's data, then the shared Sources. */

/* ── Sources (#/sources): the app's Collections view as a page of this app
   (user, 2026-10-15: "consistent with the others"). Same frame as Projects
   (.pj: the 760px column), a .pj-top header — the page name, no subtitle,
   the primary action in the accent — and the cards shared with a project's
   Data tab: rounded, hairline, light lift, the family colour on the start
   edge as on report cards. */
.pj-sourcespage { padding-top: 4px; }
.pj-sourcespage > .view-header { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin: 0 0 24px; padding: 0; border: 0; }
.pj-sourcespage .view-title { margin: 0; font-size: var(--rp-text-xl); font-weight: 600; line-height: 1.2; letter-spacing: -0.025em; color: var(--rp-heading); }
html[lang="fa"] .pj-sourcespage .view-title { letter-spacing: 0; line-height: 1.5; }
.pj-sourcespage .view-subtitle { display: none; }
.pj-sourcespage .collections-header-actions { display: flex; align-items: center; gap: 6px; }
.pj-sourcespage .collections-add-btn {
  display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 14px;
  border: 1px solid var(--pj-accent); border-radius: var(--rp-radius-lg); background: var(--pj-accent);
  color: var(--rp-text-on-action); font-size: var(--rp-text-sm); font-weight: 600; box-shadow: none;
}
.pj-sourcespage .collections-add-btn:hover { background: var(--pj-accent-hover); border-color: var(--pj-accent-hover); }
.pj-sourcespage .collections-add-btn--folder { border-color: var(--pj-line); background: var(--rp-surface); color: var(--rp-text-secondary); }
.pj-sourcespage .collections-add-btn--folder:hover { border-color: var(--rp-border-strong); background: var(--rp-surface); color: var(--rp-heading); }
.pj-sourcespage .collections-add-btn__icon { background: transparent; color: inherit; }
.pj-sourcespage .collections-section-label { margin: 0 0 8px; font-size: var(--rp-text-xs); font-weight: 600; letter-spacing: 0.02em; color: var(--rp-text-muted); }
.pj-sourcespage .collections-breadcrumb { margin: 0 0 16px; font-size: var(--rp-text-sm); }
.pj-sourcespage .collections-breadcrumb__back { color: var(--rp-text-secondary); }
.pj-sourcespage .collections-breadcrumb__current { color: var(--rp-heading); font-weight: 600; }
.pj-sourcespage .collections-list { gap: 12px; }
:is(.pj-sourcespage, .pj-datahost) .collections-card {
  --card-radius: 8px;
  border: 1px solid var(--pj-line); border-inline-start: 3px solid var(--card-accent, var(--pj-line));
  border-radius: var(--pj-radius); border-start-start-radius: 6px; border-end-start-radius: 6px;
  background: var(--rp-surface); box-shadow: var(--pj-shadow); overflow: visible;
  transition: box-shadow var(--rp-duration-base), border-color var(--rp-duration-base);
}
:is(.pj-sourcespage, .pj-datahost) .collections-card:hover { box-shadow: var(--pj-shadow-hover); }
:is(.pj-sourcespage, .pj-datahost) .collections-card--folder { border-inline-start-color: var(--pj-line); cursor: pointer; }
:is(.pj-sourcespage, .pj-datahost) .collections-card--folder:hover { border-color: var(--rp-action-border); }
:is(.pj-sourcespage, .pj-datahost) .collections-card__title { font-size: var(--rp-text-base); font-weight: 400; color: var(--rp-heading); }
:is(.pj-sourcespage, .pj-datahost) .collections-card__type,
:is(.pj-sourcespage, .pj-datahost) .collections-card__kind { border-color: transparent; background: var(--pj-soft); color: var(--rp-text-secondary); font-weight: 600; }
:is(.pj-sourcespage, .pj-datahost) .collections-card__members-empty { color: var(--rp-text-muted); font-size: var(--rp-text-xs); }
:is(.pj-sourcespage, .pj-datahost) .collections-card__member-row { border-radius: var(--rp-radius-lg); border-color: var(--pj-line); background: var(--pj-soft); }
:is(.pj-sourcespage, .pj-datahost) .library-card-link { border-radius: var(--rp-radius-lg); }
.pj-sourcespage .collections-empty, .pj-sourcespage [class*="collections-empty"] { border-radius: var(--pj-radius); }
@media (max-width: 560px) {
  .pj-sourcespage > .view-header { flex-wrap: wrap; }
}

/* ── Colour pass (user, 2026-10-15: "use the right colour palette") ──
   The rules at "Colour with a purpose" applied to the parts borrowed from
   the original app. */
/* Collection cards (Sources, a project's Data tab): the family colour stays
   on the edge; the card's main action is blue, the rest neutral — as on
   report cards. */
:is(.pj-sourcespage, .pj-datahost) .collections-card .library-card-link {
  border-color: transparent !important; background: var(--rp-surface-muted) !important; color: var(--rp-text-secondary) !important;
}
:is(.pj-sourcespage, .pj-datahost) .collections-card .library-card-link--action {
  background: var(--rp-action-tint) !important; color: var(--pj-accent) !important;
}
:is(.pj-sourcespage, .pj-datahost) .collections-card .library-card-link:hover {
  background: var(--pj-accent) !important; color: var(--pj-on-accent) !important;
}
:is(.pj-sourcespage, .pj-datahost) .collections-card__family-icon { color: var(--rp-text-secondary); background: var(--rp-surface-muted); }
/* Focus lists (the original drawer's markup), drawn as the rest of the
   context card (user, 2026-10-15: "consistent with the others"):
   sub-labels under the section head, not above it; fields like the context
   box (soft, borderless until focused); the page's square blue add button;
   the topics as pills like the context presets, each with its ×. */
.pj-focuslists { --brand: var(--pj-accent); gap: 16px; }
.pj-focuslists .usecase-drawer__focus-group { gap: 8px; }
.pj-focuslists .usecase-drawer__field-label { font-size: var(--rp-text-xs); font-weight: 600; color: var(--rp-text-secondary); }
.pj-focuslists .usecase-drawer__focus-list { flex-direction: row; flex-wrap: wrap; gap: 6px; margin: 0; }
.pj-focuslists .usecase-drawer__focus-list li {
  display: inline-flex; align-items: center; gap: 4px; padding: 3px 4px 3px 12px;
  border: 1px solid var(--pj-line); border-radius: 999px; background: var(--rp-surface);
  color: var(--rp-heading); font-size: var(--rp-text-sm); line-height: 1.6;
}
html[dir="rtl"] .pj-focuslists .usecase-drawer__focus-list li { padding: 3px 12px 3px 4px; }
.pj-focuslists .usecase-drawer__question-actions { display: inline-flex; }
.pj-focuslists .usecase-drawer__question-action { display: grid; place-items: center; width: 22px; height: 22px; padding: 0; border: 0; border-radius: 50%; background: none; color: var(--rp-text-muted); cursor: pointer; }
.pj-focuslists .usecase-drawer__question-action:hover { background: var(--rp-danger-soft); color: var(--rp-danger-text); }
.pj-focuslists .usecase-drawer__question-action svg { width: 12px; height: 12px; }
.pj-focuslists .usecase-drawer__question-add { gap: 6px; }
/* Cover and leave-out side by side (user, 2026-10-25); each add field sits at
   its column's foot so the two line up whatever the lists hold. */
.pj-focuslists { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 24px; align-items: stretch; }
.pj-focuslists .usecase-drawer__focus-list { flex: 1; align-content: flex-start; }
@media (max-width: 720px) { .pj-focuslists { grid-template-columns: 1fr; } }
.pj .pj-focuslists .usecase-drawer__question-input {
  height: 40px; padding: 0 12px; border: 1px solid transparent; border-radius: var(--rp-radius-lg);
  background: var(--pj-soft); color: var(--rp-heading); font-size: var(--rp-text-sm); box-shadow: none;
}
.pj .pj-focuslists .usecase-drawer__question-input:focus { border-color: var(--rp-focus); background: var(--rp-surface); box-shadow: 0 0 0 1px var(--rp-focus); }
.pj-focuslists .usecase-drawer__question-add-btn { width: 40px; height: 40px; border-radius: var(--rp-radius-lg); background: var(--rp-fill); color: var(--rp-text); }
.pj-focuslists .usecase-drawer__question-add-btn:hover { background: var(--rp-fill-strong); }
.pj-focuslists .usecase-drawer__question-add-btn svg { width: 16px; height: 16px; }
/* The library toolbar's "where you are" is this app's blue. */
.pj .library-sort-tab.is-active { color: var(--pj-accent); }

/* ── Consistency pass (user, 2026-10-15: "review the whole app") ──
   One scale, measured across every page:
     page title   .pj-h1 (1.75rem/800); a report's own page 1.5rem
     buttons      34px in page headers, 40px beside a 40px field, 10px corners
     fields       in a card: soft, borderless until focused, 40px, 10px corners
     chips/pills  ~30px, 0.81rem
     cards        lists 14px (--pj-radius); the report flow's steps 18px,
                  the composer's own frame */
/* Sources' title is the page title (styles.css sizes .view-title smaller). */
#view-collections.pj-sourcespage .view-title { font-size: var(--rp-text-xl); }
/* "+ New collection" is a header button in the Data tab too: 34px. */
.pj-datahost .collections-add-btn { height: 34px; }
/* Engine search: a field in a card, like the context and focus fields. */
.pj .pj-nrcard .pj-search input {
  height: 40px; border: 1px solid transparent; border-radius: var(--rp-radius-lg); background: var(--pj-soft); box-shadow: none;
}
.pj .pj-nrcard .pj-search input:focus { border-color: var(--rp-focus); background: var(--rp-surface); box-shadow: 0 0 0 1px var(--rp-focus); }
/* Context presets: the same pill size as the focus topics and the coach's pills. */
.pj-ctxpreset { padding: 4px 12px; line-height: 1.6; }
/* Console is a step of the report flow: its panels take the flow's 18px. */
.pj-stepbody .pj-panel { border-radius: var(--rp-radius-xl); }
/* Card titles are headings: the heading colour everywhere. */
.pj .library-card-title, .pj .library-card-title a { color: var(--rp-heading); }
/* The app's hidden file/text inputs stay 1px: this page's full-width field
   rule (.pj input) otherwise made them 100% wide, and in RTL that pushed the
   Sources and Data pages 15px sideways on phones. */
.pj .visually-hidden-input { width: 1px !important; height: 1px !important; min-width: 0 !important; padding: 0 !important; border: 0 !important; }
/* Move a collection: group labels inside the card's ⋮ menu (Sources · Projects). */

/* ── Projects home as NotebookLM's notebooks (user, 2026-10-15) ──
   Tiles in a grid: emoji and ⋮ on top, the title on one line, then
   "date · n reports". The app's surface, hairline and lift; the flow's 18px
   corners; colour only where it means something (the status dot, the pin). */
/* Two per row (user, 2026-10-15: more room for the titles); one on phones. */
.pj-tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
@media (max-width: 520px) { .pj-tiles { grid-template-columns: minmax(0, 1fr); } }
.pj-tile {
  position: relative; display: flex; flex-direction: column; gap: 6px; min-height: 172px; padding: 18px 18px 16px;
  border: 1px solid var(--pj-line); border-radius: var(--rp-radius-xl); background: var(--rp-surface); box-shadow: var(--pj-shadow);
  color: inherit; text-decoration: none; text-align: start; font: inherit; cursor: pointer;
  transition: box-shadow var(--rp-duration-base), border-color var(--rp-duration-base), transform var(--rp-duration-base);
  animation: pj-fade 220ms var(--rp-ease-out) both; animation-delay: calc(var(--i, 0) * 30ms);
}
.pj-tiles.is-settled .pj-tile { animation: none; }
.pj-tile:hover { border-color: var(--rp-action-border); box-shadow: var(--pj-shadow-hover); transform: translateY(-1px); }
.pj-tile:focus-visible { outline: 2px solid var(--rp-focus); outline-offset: 2px; }
.pj-tile__top { display: flex; align-items: flex-start; gap: 8px; margin-bottom: auto; }
.pj-tile__emoji { font-size: var(--rp-text-xl); line-height: 1; }
.pj-tile__pin { display: inline-grid; place-items: center; margin-inline-start: 2px; color: var(--rp-favorite); }
.pj-tile__pin svg { width: 15px; height: 15px; }
.pj-tile__menu { position: relative; margin-inline-start: auto; }
.pj-tile .pj-tile__more { display: grid; place-items: center; width: 30px; height: 30px; border: 0; border-radius: var(--rp-radius-lg); background: none; color: var(--rp-text-muted); cursor: pointer; }
.pj-tile .pj-tile__more:hover, .pj-tile__menu.is-open .pj-tile__more { background: var(--pj-soft); color: var(--rp-heading); }
.pj-tile__more svg { width: 18px; height: 18px; }
.pj-tile__panel { position: absolute; top: calc(100% + 4px); inset-inline-end: 0; z-index: 20; min-width: 190px; }
.pj-tile__panel .library-card-menu-item svg { width: 16px; height: 16px; }
.pj-tile__title { margin: 14px 0 0; overflow: hidden; color: var(--rp-heading); font-size: var(--rp-text-xl); font-weight: 400; line-height: 1.45; text-overflow: ellipsis; white-space: nowrap; }
.pj-tile__meta { display: flex; align-items: center; gap: 6px; min-width: 0; margin: 0; color: var(--rp-text-muted); font-size: var(--rp-text-xs); }
.pj-tile__meta > span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pj-tile__dot { width: 7px; height: 7px; flex: none; border-radius: 50%; }
.pj-tile__dot--failed { background: var(--rp-danger-indicator); }
.pj-tile__dot--awaiting_input { background: var(--rp-warning-indicator); }
.pj-tile__dot--pending { background: var(--rp-info-indicator); }
.pj-tile--earlier { border-style: dashed; box-shadow: none; }
/* The first tile: start a new project. */
.pj-tile--new { align-items: center; justify-content: center; gap: 12px; border-style: dashed; border-color: var(--rp-border-strong); background: transparent; box-shadow: none; color: var(--rp-text-secondary); }
.pj-tile--new:hover { border-style: solid; border-color: var(--pj-accent); background: var(--pj-accent-tint); color: var(--pj-accent); }
.pj-tile__plus { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 50%; background: var(--pj-accent-tint); color: var(--pj-accent); }
.pj-tile__plus svg { width: 22px; height: 22px; }
.pj-tile__newlabel { font-size: var(--rp-text-sm); font-weight: 600; }
.pj-tiles .pj-skeleton.pj-tile { animation: none; }
@media (prefers-reduced-motion: reduce) { .pj-tile { animation: none; transition: none; } }
/* A title in another script (an English name on the Farsi page) runs in its own direction, so the ellipsis lands at its end. */
.pj-tile__title { unicode-bidi: plaintext; text-align: start; }

/* Project tiles, design B (user, 2026-10-15: no icons): title (up to two
   lines) with the ⋮ at its end, the purpose under it (two lines), and a
   footer under a hairline — count (with the status dot) and date. */
.pj-tile { min-height: 168px; gap: 0; }
.pj-tile__top { align-items: flex-start; gap: 6px; margin: 0; }
.pj-tile .pj-tile__title {
  flex: 1; min-width: 0; margin: 2px 0 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden; white-space: normal; text-overflow: clip; font-size: var(--rp-text-xl); font-weight: 400; line-height: 1.45;
}
.pj-tile__pin { margin-top: 6px; }
.pj-tile__menu { margin-inline-start: 0; margin-top: -2px; }
.pj-tile__desc {
  margin: 6px 0 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  color: var(--rp-text-secondary); font-size: var(--rp-text-sm); line-height: 1.6; unicode-bidi: plaintext; text-align: start;
}
.pj-tile__foot {
  display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: auto; padding-top: 12px;
  border-top: 1px solid var(--rp-border-subtle); color: var(--rp-text-muted); font-size: var(--rp-text-xs);
}
.pj-tile__count { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; color: var(--rp-text-secondary); }
.pj-tile__date { white-space: nowrap; }
.pj-tile > .pj-tile__foot { margin-top: auto; }
.pj-tile > .pj-tile__top + .pj-tile__desc { margin-bottom: 14px; }
.pj-tile > .pj-tile__top:not(:has(+ .pj-tile__desc)) { margin-bottom: 14px; }
/* Every tile lines up on the page's side, whatever script its title and purpose are in. */
html[dir="rtl"] .pj-tile .pj-tile__title, html[dir="rtl"] .pj-tile__desc { text-align: right; }
html:not([dir="rtl"]) .pj-tile .pj-tile__title, html:not([dir="rtl"]) .pj-tile__desc { text-align: left; }

/* Sources cards: every action in the ⋮ (user, 2026-10-15). The inline rename
   pencil and a folder's loose rename/delete icons give way to it. Pinned
   cards come first and carry a gold tack before the name. */
:is(.pj-sourcespage, .pj-datahost) .collections-card__rename-btn,
:is(.pj-sourcespage, .pj-datahost) .collections-card__folder-controls { display: none !important; }
:is(.pj-sourcespage, .pj-datahost) .collections-card.pj-ctile--pinned { order: -1; }
/* the same pin as a project tile's (.pj-tile__pin): gold, 15px, at the name's end */
.pj-ctile__tack { flex: none; order: 2; margin-top: 6px; }
/* a ⋮ of its own for folders and shared cards, placed like a collection's */
.pj-cmenu { position: absolute; top: 14px; inset-inline-end: 12px; z-index: 3; }
.pj-cmenu__btn { display: grid; place-items: center; width: 30px; height: 30px; border: 0; border-radius: var(--rp-radius-lg); background: none; color: var(--rp-text-muted); cursor: pointer; }
.pj-cmenu__btn:hover, .pj-cmenu.is-open .pj-cmenu__btn { background: var(--pj-soft); color: var(--rp-heading); }
.pj-cmenu__btn svg { width: 18px; height: 18px; }
.pj-cmenu__panel { position: absolute; top: calc(100% + 4px); inset-inline-end: 0; z-index: 20; min-width: 190px; }
.pj-cmenu__panel[hidden] { display: none !important; }
.pj-cmenu__panel .library-card-menu-item svg,
:is(.pj-sourcespage, .pj-datahost) [data-pj-card-act] svg { width: 16px; height: 16px; }
/* ── Sources: folders as the Projects home's tiles (user, 2026-10-15) ──
   Two per row: the name (two lines) with the pin and ⋮ at its end, the count
   as the footer under a hairline. Knowledge collections keep their own
   full-width card (files and actions in view), styled earlier in this file. */
:is(.pj-sourcespage, .pj-datahost) .collections-folder-section { margin-bottom: 18px; }
:is(.pj-sourcespage, .pj-datahost) .collections-folder-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin: 0; padding: 0; list-style: none; }
@media (max-width: 520px) { :is(.pj-sourcespage, .pj-datahost) .collections-folder-grid { grid-template-columns: minmax(0, 1fr); } }
:is(.pj-sourcespage, .pj-datahost) .collections-card.collections-card--folder {
  position: relative; display: flex; flex-direction: column; min-height: 168px; margin: 0; padding: 18px 18px 54px;
  border: 1px solid var(--pj-line); border-radius: var(--rp-radius-xl); background: var(--rp-surface); box-shadow: var(--pj-shadow); cursor: pointer;
  transition: box-shadow var(--rp-duration-base), border-color var(--rp-duration-base), transform var(--rp-duration-base);
}
:is(.pj-sourcespage, .pj-datahost) .collections-card.collections-card--folder:hover { border-color: var(--rp-action-border); box-shadow: var(--pj-shadow-hover); transform: translateY(-1px); }
:is(.pj-sourcespage, .pj-datahost) .collections-card--folder :is(.collections-card__folder-top, .collections-card__folder-icon) { display: none !important; }
:is(.pj-sourcespage, .pj-datahost) .collections-card--folder .collections-card__folder-info {
  display: flex; flex-direction: row; align-items: flex-start; gap: 0 6px; width: 100%; margin: 0; padding: 0; padding-inline-end: 34px;
}
:is(.pj-sourcespage, .pj-datahost) .collections-card--folder .collections-card__title {
  flex: 1 1 0; min-width: 0; margin: 2px 0 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  color: var(--rp-heading); font-size: var(--rp-text-xl); font-weight: 400; line-height: 1.45; white-space: normal; unicode-bidi: plaintext;
}
html[dir="rtl"] :is(.pj-sourcespage, .pj-datahost) .collections-card--folder .collections-card__title { text-align: right; }
html:not([dir="rtl"]) :is(.pj-sourcespage, .pj-datahost) .collections-card--folder .collections-card__title { text-align: left; }
:is(.pj-sourcespage, .pj-datahost) .collections-card--folder .collections-card__folder-info > :not(.collections-card__title):not(.pj-ctile__tack) {
  position: absolute; bottom: 16px; inset-inline: 18px; margin: 0; padding-top: 12px; border-top: 1px solid var(--rp-border-subtle);
  color: var(--rp-text-secondary); font-size: var(--rp-text-xs); font-weight: 600;
}
:is(.pj-sourcespage, .pj-datahost) .collections-card--folder .pj-ctile__tack { position: static; margin: 6px 0 0; padding: 0; border: 0; }
/* a collection's pin: at its name's end, as on a project tile */
:is(.pj-sourcespage, .pj-datahost) .collections-card:not(.collections-card--folder) .pj-ctile__tack { display: inline-grid; vertical-align: middle; margin: 0 4px; }

/* ── Drawers as the original app's (user, 2026-10-15) ──
   Same frame (styles.css .usecase-drawer), the original's field
   (.usecase-drawer__question-input), labels (.usecase-drawer__field-label)
   and one full-width footer button (.usecase-drawer__select-btn); the
   header ✕ closes, no extra Cancel. */
.pj-drawer .usecase-drawer__question-input { width: 100%; box-sizing: border-box; }
.pj-drawer textarea.usecase-drawer__question-input { resize: vertical; line-height: 1.6; }
.pj-drawer .pj-field.usecase-drawer__focus-group { margin: 0 0 16px; }
.pj-drawer .pj-drawer__foot { display: block; }
.pj-move__new { align-items: center; }
/* This page's own field rule (.pj input/textarea) outranks the original's
   class; restate the original field (styles.css .usecase-drawer__question-input). */
.pj .pj-drawer .usecase-drawer__question-input, .pj-drawer .usecase-drawer__question-input {
  height: auto; min-height: 0; padding: 9px 12px; border: 1px solid var(--border-section, var(--border)); border-radius: var(--rp-radius-lg);
  background: color-mix(in srgb, var(--brand) 5%, var(--card-bg, var(--rp-surface))); color: var(--brand);
  font: inherit; font-size: var(--rp-text-sm); font-weight: 400; box-shadow: none;
}
.pj .pj-drawer .usecase-drawer__question-input:focus, .pj-drawer .usecase-drawer__question-input:focus {
  outline: none; border-color: var(--rp-focus); box-shadow: 0 0 0 1px var(--rp-focus);
}

/* ── Sharing a project (user, 2026-10-15) ── */
.pj-tile__shared { display: flex; align-items: center; gap: 6px; margin: 6px 0 0; color: var(--rp-text-secondary); font-size: var(--rp-text-xs); font-weight: 600; }
.pj-tile__shared svg { width: 14px; height: 14px; flex: none; color: var(--rp-text-muted); }
.pj-top__shared { margin-top: 6px; }
/* the tile's people: overlapping initials in the footer, owner first and ringed */
.pj-tile__meta { display: inline-flex; align-items: center; flex-wrap: wrap; justify-content: flex-end; gap: 6px 10px; min-width: 0; }
.pj-faces { display: inline-flex; align-items: center; padding-inline-start: 6px; }
.pj-face {
  --pj-face: var(--rp-text-muted);
  display: inline-grid; place-items: center; width: 24px; height: 24px; margin-inline-start: -6px; border-radius: 50%;
  border: 2px solid var(--card-bg, var(--rp-surface)); box-sizing: border-box;
  background: color-mix(in srgb, var(--pj-face) 16%, var(--rp-surface));
  color: color-mix(in srgb, var(--pj-face) 70%, var(--rp-text));
  font-size: var(--rp-text-2xs); font-weight: 600; line-height: 1; cursor: default;
}
/* owner in the brand, everyone else alternating so neighbours never match */
.pj-face--0 { --pj-face: var(--rp-text-muted); }
.pj-face--1 { --pj-face: var(--rp-green-600); }
.pj-face--owner { --pj-face: var(--rp-brand); box-shadow: 0 0 0 1.5px var(--rp-brand); position: relative; z-index: 1; }
.pj-face--more { --pj-face: var(--rp-text-muted); font-weight: 500; }
/* the share drawer: an add line (email · role · +), then everyone on the project */
.pj-share__add { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; margin: 0; }
/* the drawer body spaces its children; an empty error line takes no slot */
.pj-share__add + .pj-err:empty { display: none; }
.pj-share__add + .pj-err { margin: -12px 0 0; }
/* email and role are one field (the original's field box); the role sits at its end */
.pj-share__field {
  display: flex; align-items: center; min-width: 0; padding-inline-end: 4px;
  border: 1px solid var(--border-section, var(--border)); border-radius: var(--rp-radius-lg);
  background: color-mix(in srgb, var(--brand) 5%, var(--card-bg, var(--rp-surface)));
}
.pj-share__field:focus-within { border-color: var(--rp-focus); box-shadow: 0 0 0 1px var(--rp-focus); }
.pj .pj-drawer .pj-share__input, .pj-drawer .pj-share__input {
  flex: 1; min-width: 0; height: auto; min-height: 0; padding: 9px 12px; border: 0; border-radius: var(--rp-radius-lg);
  background: transparent; color: var(--brand); font: inherit; font-size: var(--rp-text-sm); box-shadow: none; outline: none;
}
/* the role: plain text and a small chevron, tinted only on hover/focus */
.pj-share__rolewrap { position: relative; display: inline-flex; flex: none; color: var(--brand); }
.pj-share__rolewrap::after {
  content: ""; position: absolute; inset-inline-end: 10px; top: 50%; width: 5px; height: 5px; margin-top: -4px;
  border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(45deg); pointer-events: none; opacity: .7;
}
.pj .pj-drawer .pj-share__role, .pj-drawer .pj-share__role {
  appearance: none; -webkit-appearance: none; width: auto; min-width: 0; height: auto; min-height: 0; margin: 0;
  padding: 5px 10px; padding-inline-end: 24px; border: 0; border-radius: var(--rp-radius-md); background: transparent;
  color: inherit; font: inherit; font-size: var(--rp-text-xs); font-weight: 600; box-shadow: none; cursor: pointer;
}
.pj-drawer .pj-share__role:hover { background: color-mix(in srgb, var(--brand) 8%, transparent); }
.pj-drawer .pj-share__role:focus-visible { outline: 2px solid var(--rp-focus); outline-offset: 2px; }
.pj-share__list { margin-top: 0; }
.pj-share__row { display: grid !important; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 4px; min-height: 42px; padding-block: 4px !important; }
.pj-share__email { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; direction: ltr; text-align: start; unicode-bidi: plaintext; }
.pj-share__owner { grid-column: 2 / -1; padding-inline: 10px 34px; color: var(--rp-text-muted); font-size: var(--rp-text-xs); font-weight: 600; }
.pj-share__none { margin: 10px 0 0; color: var(--rp-text-muted); font-size: var(--rp-text-sm); }
/* a member's view of the report cards: no owner-only actions; viewers also no setup */
.pj-shared-view :is(.library-card-menu, .library-card-favorite, .library-card-pin, .library-card-tagging, .pj-move-link, .pj-setup-del) { display: none !important; }
.pj-shared-readonly :is(.pj-setup-link) { display: none !important; }
/* a member's Data tab: the owner's data, read-only */
.pj-sdata__note { display: flex; align-items: center; gap: 8px; margin: 0 0 12px; color: var(--rp-text-secondary); font-size: var(--rp-text-sm); }
.pj-sdata__note svg { width: 16px; height: 16px; color: var(--rp-text-muted); }
.pj-sdata { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.pj-sdata__row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 16px; border: 1px solid var(--pj-line); border-radius: var(--pj-radius); background: var(--rp-surface); box-shadow: var(--pj-shadow); }
.pj-sdata__name { overflow: hidden; color: var(--rp-heading); font-weight: 600; text-overflow: ellipsis; white-space: nowrap; unicode-bidi: plaintext; }
.pj-sdata__meta { flex: none; color: var(--rp-text-muted); font-size: var(--rp-text-xs); }

/* An open ⋮ menu sits above the tiles after its own (each tile is its own
   layer: later tiles were painted over the menu and hid "Delete"). */
.pj-tile:has(.pj-tile__menu.is-open),
:is(.pj-sourcespage, .pj-datahost) .collections-card:has(.pj-cmenu.is-open, .library-card-menu.is-open, [data-card-menu-panel]:not([hidden])) { z-index: 40; }

/* The model drawer: the composer's own options, as a list. */
.pj-models { display: flex; flex-direction: column; gap: 6px; }
.pj-models__option { width: 100%; }

/* Report length (Atlas): two options in one pill (user, 2026-10-18). */
.pj-seg { display: inline-flex; padding: 2px; border: 1px solid var(--rp-border-control); border-radius: 999px; background: var(--rp-surface); }
.pj-seg__opt { height: 26px; padding: 0 14px; border: 0; border-radius: 999px; background: none; color: var(--rp-text-secondary); font: inherit; font-size: var(--rp-text-xs); font-weight: 600; cursor: pointer; transition: background var(--rp-duration-fast), color var(--rp-duration-fast); }
.pj-seg__opt:hover { color: var(--rp-heading); }
.pj-seg__opt.is-on { background: var(--pj-accent); color: var(--pj-on-accent); }
.pj-seg__hint { margin-inline-start: 10px; font-size: var(--rp-text-xs); }

/* ── Engine step: every family as a row — name and blurb beside all its
   template cards, nothing to open first (user, 2026-10-21). */
.pj-fwshow { display: grid; gap: 4px; padding: 8px; border-radius: var(--rp-radius-xl); background: var(--pj-soft); }
.pj-fwrow { display: grid; grid-template-columns: minmax(150px, 0.55fr) minmax(0, 2fr); gap: 16px; align-items: start; padding: 14px 12px; }
.pj-fwrow + .pj-fwrow { border-top: 1px solid var(--rp-border-subtle); }
.pj-fwrow__head { display: grid; gap: 4px; padding-top: 6px; }
.pj-fwrow__name { margin: 0; font-size: var(--rp-text-md); font-weight: 600; color: var(--rp-heading); word-spacing: 0.15em; }
.pj-fwrow__blurb { margin: 0; font-size: var(--rp-text-xs); line-height: 1.6; color: var(--rp-text-secondary); }
/* A family's templates, one click to pick. */
.pj-fwgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 8px; min-width: 0; }
.pj-fwcard { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 64px; padding: 10px 12px; border: 1px solid transparent; border-radius: var(--rp-radius-xl); background: var(--rp-surface); color: var(--rp-heading); font: inherit; text-align: start; cursor: pointer; box-shadow: none; transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s; }
.pj-fwcard:hover { border-color: var(--rp-border); box-shadow: none; transform: translateY(-1px); }
.pj-fwcard:focus-visible { outline: 2px solid var(--rp-focus); outline-offset: 2px; }
.pj-fwcard.is-on { border-color: var(--pj-accent); background: var(--pj-accent-tint); }
.pj-fwcard__glyph { display: grid; place-items: center; width: 38px; height: 38px; flex: none; border-radius: var(--rp-radius-xl); background: var(--rp-tile); color: var(--pj-accent); }
.pj-fwcard.is-on .pj-fwcard__glyph { background: var(--pj-accent); color: var(--rp-surface); }
.pj-fwcard__glyph svg { width: 19px; height: 19px; }
.pj-fwcard__text { display: grid; gap: 3px; flex: 1; min-width: 0; }
.pj-fwcard__name { font-size: var(--rp-text-sm); font-weight: 600; word-spacing: 0.15em; }
.pj-fwcard.is-on .pj-fwcard__name { color: var(--pj-accent); }
.pj-fwcard__why { font-size: var(--rp-text-xs); line-height: 1.5; color: var(--rp-text-secondary); }
.pj-fwcard__mark { display: grid; place-items: center; flex: none; color: var(--pj-accent); }
.pj-fwcard__mark svg { width: 15px; height: 15px; }
/* Atlas and Delta lead, a size up. */
.pj-fwrow--engines .pj-fwgrid { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.pj-fwrow--engines .pj-fwcard { min-height: 76px; }
.pj-fwrow--engines .pj-fwcard__glyph { width: 44px; height: 44px; }
.pj-fwrow--engines .pj-fwcard__name { font-size: var(--rp-text-md); }
@media (max-width: 760px) {
  .pj-fwrow { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .pj-fwrow__head { padding-top: 0; }
}

/* ── Projects home (user, 2026-10-24, from their design) ─────────────
   Greeting and New project; a search box and a list/grid switch; cards three
   per row — title and ⋮, an access badge, a facts line, then name chips under
   a hairline; a pager at the foot. Plain surfaces, one hairline, small radius. */
.pj-top--home { align-items: flex-start; margin-bottom: 40px; padding-bottom: 0; }
.pj-top--home::after { display: none; }
.pj-top--home .pj-h1 { font-size: var(--rp-text-xl); font-weight: 600; }
.pj-top--home .pj-lede { margin-top: 10px; color: var(--rp-text-secondary); }
.pj-top--home .pj-btn--primary { flex: none; }

.pj-hometools { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 24px; }
.pj-homesearch {
  display: flex; align-items: center; gap: 10px; width: min(352px, 100%); height: 44px; padding: 0 14px;
  border: 1px solid var(--rp-border-control, var(--rp-border)); border-radius: var(--rp-radius-lg); background: var(--rp-surface);
  color: var(--rp-text-muted); cursor: text;
}
.pj-homesearch:focus-within { border-color: var(--rp-focus); box-shadow: 0 0 0 1px var(--rp-focus); }
.pj-homesearch svg { width: 18px; height: 18px; }
.pj .pj-homesearch input { flex: 1; min-width: 0; height: 100%; padding: 0; border: 0 !important; background: none; box-shadow: none !important; color: var(--rp-text); font: inherit; font-size: var(--rp-text-sm); outline: none; }
.pj-homesearch input::-webkit-search-cancel-button { cursor: pointer; }
.pj-viewswitch { display: inline-flex; flex: none; overflow: hidden; border: 1px solid var(--rp-border-control, var(--rp-border)); border-radius: var(--rp-radius-lg); background: var(--rp-surface); }
.pj-viewswitch__opt { display: grid; place-items: center; width: 46px; height: 42px; border: 0; background: none; color: var(--rp-text-secondary); cursor: pointer; }
.pj-viewswitch__opt + .pj-viewswitch__opt { border-inline-start: 1px solid var(--rp-border-control, var(--rp-border)); }
.pj-viewswitch__opt:hover { color: var(--rp-heading); }
.pj-viewswitch__opt.is-on { background: var(--rp-surface-muted); color: var(--rp-heading); }
.pj-viewswitch__opt svg { width: 20px; height: 20px; }

/* the cards */
.pj-pcards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
@media (max-width: 960px) { .pj-pcards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 620px) { .pj-pcards { grid-template-columns: minmax(0, 1fr); } }
.pj-pcard {
  position: relative; display: flex; flex-direction: column; min-height: 252px;
  border: 1px solid var(--rp-border); border-radius: var(--pj-card-radius); background: var(--rp-surface);
  box-shadow: var(--pj-card-shadow);
  color: inherit; text-decoration: none; text-align: start;
  transition: border-color var(--rp-duration-base), box-shadow var(--rp-duration-base);
  animation: pj-fade 220ms var(--rp-ease-out) both; animation-delay: calc(var(--i, 0) * 30ms);
}
.pj-pcards.is-settled .pj-pcard, .pj-prows.is-settled .pj-prow { animation: none; }
.pj-pcard:hover { border-color: var(--rp-border-strong); box-shadow: var(--pj-card-shadow-hover); }
.pj-pcard:focus-visible, .pj-prow:focus-visible { outline: 2px solid var(--rp-focus); outline-offset: 2px; }
.pj-pcard:has(.pj-tile__menu.is-open), .pj-prow:has(.pj-tile__menu.is-open) { z-index: 40; }
.pj-pcard--earlier { border-style: dashed; box-shadow: none; }
.pj-pcard__body { display: flex; flex-direction: column; align-items: flex-start; flex: 1; padding: 16px 16px 18px; }
.pj-pcard__top { display: flex; align-items: flex-start; gap: 6px; width: 100%; }
.pj-pcard__title {
  flex: 1; min-width: 0; margin: 4px 0 0; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  color: var(--rp-heading); font-size: var(--rp-text-base); font-weight: 500; line-height: 1.45; unicode-bidi: plaintext; text-wrap: pretty;
}
html[dir="rtl"] .pj-pcard__title { text-align: right; }
html:not([dir="rtl"]) .pj-pcard__title { text-align: left; }
.pj-pcard .pj-tile__pin, .pj-prow .pj-tile__pin { display: inline-grid; margin-top: 8px; color: var(--rp-favorite); }
.pj-pcard .pj-tile__pin svg, .pj-prow .pj-tile__pin svg { width: 15px; height: 15px; }
:is(.pj-pcard, .pj-prow) .pj-tile__menu { position: relative; flex: none; margin-inline-start: auto; }
:is(.pj-pcard, .pj-prow) .pj-tile__more { display: grid; place-items: center; width: 28px; height: 28px; border: 0; border-radius: var(--rp-radius-md); background: none; color: var(--rp-text-muted); cursor: pointer; }
:is(.pj-pcard, .pj-prow) .pj-tile__more:hover, :is(.pj-pcard, .pj-prow) .pj-tile__menu.is-open .pj-tile__more { background: var(--rp-surface-muted); color: var(--rp-heading); }
:is(.pj-pcard, .pj-prow) .pj-tile__more svg { width: 18px; height: 18px; }
:is(.pj-pcard, .pj-prow) .pj-tile__panel { position: absolute; top: calc(100% + 4px); inset-inline-end: 0; z-index: 20; min-width: 190px; }
:is(.pj-pcard, .pj-prow) .pj-tile__panel .library-card-menu-item svg { width: 16px; height: 16px; }

/* who can see it */
.pj-badge {
  display: inline-flex; align-items: center; height: 22px; margin-top: 8px; padding: 0 7px; flex: none;
  border: 1px solid var(--rp-border); border-radius: var(--rp-radius-sm);
  background: var(--rp-surface-muted);
  color: var(--rp-text-muted); font-size: var(--rp-text-xs); font-weight: 500; white-space: nowrap;
}
.pj-badge--archive { border-style: dashed; border-color: var(--rp-border-strong); background: transparent; color: var(--rp-text-secondary); }

/* size, age, attention */
.pj-pcard__meta { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 20px; margin-top: auto; padding-top: 36px; color: var(--rp-text-secondary); font-size: var(--rp-text-xs); font-variant-numeric: tabular-nums; }
.pj-pcard__fact { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.pj-pcard__fact svg { width: 15px; height: 15px; color: var(--rp-text-muted); }
.pj-pcard__fact--failed { color: var(--rp-danger-text, var(--rp-danger-indicator)); }
.pj-pcard__fact--awaiting_input { color: var(--rp-warning-text, var(--rp-warning-indicator)); }

/* everyone on it */
.pj-pcard__people { display: flex; flex-wrap: wrap; gap: 8px; padding: 14px 16px 16px; border-top: 1px solid var(--rp-border-subtle); }
.pj-chip {
  display: inline-flex; align-items: center; gap: 5px; height: 24px; max-width: 100%; padding: 0 7px 0 4px;
  border: 1px solid var(--rp-border); border-radius: var(--rp-radius-md); background: var(--rp-surface);
  color: var(--rp-text); font-size: var(--rp-text-xs); white-space: nowrap; overflow: hidden; cursor: default;
}
.pj-chip bdi { overflow: hidden; text-overflow: ellipsis; }
.pj-chip__face {
  --pj-face: var(--rp-text-muted);
  display: inline-grid; place-items: center; width: 16px; height: 16px; flex: none; border-radius: 50%;
  background: color-mix(in srgb, var(--pj-face) 22%, var(--rp-surface)); color: color-mix(in srgb, var(--pj-face) 75%, var(--rp-text));
  font-size: var(--rp-text-2xs); font-weight: 600; line-height: 1;
}
.pj-chip__face.pj-face--owner { box-shadow: none; }
.pj-chip--more { padding-inline-start: 6px; color: var(--rp-text-secondary); }
.pj-chip--more svg { width: 13px; height: 13px; color: var(--rp-text-muted); }

/* list view: a table — header row, striped rows, faces, edit/delete at the end */
.pj-prows { overflow: hidden; border: 1px solid var(--rp-border); border-radius: var(--rp-radius-lg); background: var(--rp-surface); box-shadow: 0 1px 0 var(--rp-border); }
.pj-prow {
  position: relative; display: grid; grid-template-columns: minmax(200px, 2.2fr) minmax(110px, 1fr) minmax(110px, 1fr) minmax(70px, 0.8fr) minmax(130px, 1.1fr) 88px;
  align-items: center; min-height: 72px; padding: 0 16px 0 24px; color: inherit; text-decoration: none;
  animation: pj-fade 220ms var(--rp-ease-out) both; animation-delay: calc(var(--i, 0) * 20ms);
}
html[dir="rtl"] .pj-prow { padding: 0 24px 0 16px; }
.pj-prow + .pj-prow { border-top: 1px solid var(--rp-border-subtle); }
.pj-prow:nth-child(even):not(.pj-prow--head) { background: color-mix(in srgb, var(--rp-surface-muted) 70%, var(--rp-surface)); }
a.pj-prow:hover { background: var(--rp-surface-muted) !important; }
.pj-prow--head { min-height: 42px; animation: none; color: var(--rp-text-secondary); font-size: var(--rp-text-xs); font-weight: 500; }
.pj-prow__cell { display: flex; align-items: center; gap: 6px; min-width: 0; padding-inline-end: 16px; color: var(--rp-heading); font-size: var(--rp-text-sm); font-weight: 500; }
.pj-prow--head .pj-prow__cell { color: inherit; font-size: inherit; }
.pj-prow .pj-pcard__title { flex: 0 1 auto; margin: 0; -webkit-line-clamp: 1; font-size: var(--rp-text-sm); font-weight: 500; }
.pj-prow--earlier .pj-pcard__title { color: var(--rp-text-secondary); }
.pj-prow .pj-tile__pin { margin-top: 0; }
.pj-prow__access { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.pj-prow__access svg { width: 17px; height: 17px; color: var(--rp-text-secondary); }
.pj-prow__num { font-variant-numeric: tabular-nums; white-space: nowrap; }
.pj-prow__people .pj-faces { padding-inline-start: 6px; }
.pj-prow__people .pj-face { width: 26px; height: 26px; }
.pj-prow__acts { justify-content: flex-end; gap: 4px; padding-inline-end: 0; }
.pj-prow__act { display: grid; place-items: center; width: 36px; height: 36px; border: 0; border-radius: var(--rp-radius-lg); background: none; color: var(--rp-text-secondary); cursor: pointer; }
.pj-prow__act:hover { background: var(--rp-surface); color: var(--rp-heading); box-shadow: inset 0 0 0 1px var(--rp-border); }
.pj-prow__act--danger:hover { color: var(--rp-danger-text, var(--rp-danger-indicator)); }
.pj-prow__act svg { width: 19px; height: 19px; }
@media (max-width: 900px) {
  .pj-prow { grid-template-columns: minmax(0, 1fr) auto; gap: 6px 12px; padding: 12px 12px 12px 16px; }
  html[dir="rtl"] .pj-prow { padding: 12px 16px 12px 12px; }
  .pj-prow--head { display: none; }
  .pj-prow__name { grid-column: 1; }
  .pj-prow__acts { grid-column: 2; grid-row: 1 / span 2; }
  .pj-prow__cell:not(.pj-prow__name):not(.pj-prow__acts) { grid-column: 1; color: var(--rp-text-secondary); font-size: var(--rp-text-xs); font-weight: 400; }
  .pj-prow__cell:empty { display: none; }
}

/* pager */
.pj-pager { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 24px; }
.pj-pager__step { display: inline-flex; align-items: center; gap: 8px; }
.pj-pager__step svg { width: 18px; height: 18px; }
html[dir="rtl"] .pj-pager__step svg { transform: scaleX(-1); }
.pj-pager__step:disabled { opacity: 0.45; cursor: default; }
.pj-pager__nums { display: flex; align-items: center; gap: 2px; }
.pj-pager__num, .pj-pager__gap { display: grid; place-items: center; min-width: 40px; height: 40px; padding: 0 6px; border-radius: 50%; color: var(--rp-text-secondary); font-size: var(--rp-text-sm); font-variant-numeric: tabular-nums; }
.pj-pager__num { border: 0; background: none; font: inherit; font-size: var(--rp-text-sm); font-weight: 500; cursor: pointer; }
.pj-pager__num:hover { color: var(--rp-heading); background: var(--rp-surface-muted); }
.pj-pager__num.is-on { background: var(--rp-surface-muted); color: var(--rp-heading); font-weight: 600; }
@media (max-width: 620px) {
  .pj-pager__step { padding-inline: 10px; font-size: 0; gap: 0; }
  .pj-pager__num, .pj-pager__gap { min-width: 32px; height: 32px; }
}

.pj-home-empty { display: flex; flex-direction: column; align-items: center; gap: 14px; padding: 56px 0; color: var(--rp-text-secondary); text-align: center; }
.pj-home-empty p { margin: 0; }
.pj-pcards .pj-skeleton.pj-pcard { min-height: 252px; animation: pj-shimmer 1.4s linear infinite; }
/* Home while the list loads: hidden for a quick load, then a faint outline of the page to come. */
.pj-home-skeleton { animation: pj-skel-in 300ms ease-out 450ms both; }
@keyframes pj-skel-in { from { opacity: 0; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .pj-pcard, .pj-prow { animation: none; transition: none; } }
@media (max-width: 620px) {
  .pj-top--home { margin-bottom: 24px; }
  .pj-hometools { margin-bottom: 16px; }
}
/* Dark theme: a member's initials circle at 16% vanished into the page; more
   tint and a faint ring of its own colour keep every face visible. */
html[data-theme="monochrome"] .pj-face { background: color-mix(in srgb, var(--pj-face) 32%, var(--rp-surface)); }
html[data-theme="monochrome"] .pj-face:not(.pj-face--owner) { box-shadow: 0 0 0 1px color-mix(in srgb, var(--pj-face) 55%, transparent); }

/* The Chat page (rail, 2026-10-24): the project Ask across every project. */
.pj-xchat { height: calc(100dvh - 200px); }
@media (max-width: 640px) { .pj-xchat { height: calc(100dvh - 170px); } }

/* Report and source cards in the project cards' look (user, 2026-10-24):
   8px corners on every side, one plain border with no family-colour edge,
   the hairline shadow, and a darker border with a soft lift on hover. The
   report cards' !important layer was in projects-hud.css (removed 2026-11-05). */
.pj .library-card.pj-rcard,
:is(.pj-sourcespage, .pj-datahost) .collections-card.collections-card {
  border: 1px solid var(--rp-border); border-radius: var(--pj-card-radius);
  background: var(--rp-surface); box-shadow: var(--pj-card-shadow); transform: none;
  transition: border-color var(--rp-duration-base), box-shadow var(--rp-duration-base);
}
.pj .library-card.pj-rcard:hover,
:is(.pj-sourcespage, .pj-datahost) .collections-card.collections-card:hover {
  border-color: var(--rp-border-strong); box-shadow: var(--pj-card-shadow-hover); transform: none;
}

/* ── the reader: a cited report beside the chat (user, 2026-10-25) ──
   A source card or [n] mark opens its report in a panel next to the chat,
   the cited passage highlighted. Desktop: the page widens into two columns,
   chat | report. Narrow screens: the report covers the page. */
.pj.is-reading { max-width: 1640px; padding-inline: 16px; }
.pj-split { min-width: 0; }
.pj.is-reading .pj-split { display: grid; grid-template-columns: minmax(380px, 0.85fr) minmax(0, 1.15fr); gap: 16px; align-items: start; }
.pj-main { min-width: 0; }
.pj-reader { position: sticky; top: 12px; display: flex; flex-direction: column; height: calc(100dvh - 24px); min-height: 520px; min-width: 0; border: 1px solid var(--pj-line); border-radius: var(--pj-radius); background: var(--rp-surface); box-shadow: var(--pj-shadow); overflow: hidden; animation: pj-reader-in 220ms var(--rp-ease-out) both; }
.pj-reader[hidden] { display: none; }
.pj-reader__head { display: flex; align-items: flex-start; gap: 12px; padding: 14px 14px 12px 18px; border-bottom: 1px solid var(--rp-border-subtle); }
.pj-reader__copy { flex: 1; min-width: 0; }
.pj-reader__kicker { display: flex; align-items: center; gap: 8px; margin: 0; font-size: var(--rp-text-xs); color: var(--rp-text-muted); }
.pj-reader__kicker > span[dir] { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.pj-reader__n { flex: none; padding: 2px 6px; border-radius: var(--rp-radius-md); background: var(--pj-accent-tint); color: var(--pj-accent); font-family: var(--hud-mono, var(--rp-font-mono)); font-size: var(--rp-text-2xs); font-weight: 600; line-height: 1.2; }
.pj-reader__title { margin: 4px 0 0; font-family: var(--rp-font-display); font-size: var(--rp-text-base); font-weight: 600; line-height: 1.35; color: var(--rp-heading); overflow-wrap: anywhere; }
.pj-reader__note { margin: 6px 0 0; font-size: var(--rp-text-xs); color: var(--rp-text-muted); }
.pj-reader__tools { display: flex; flex: none; gap: 2px; }
.pj-reader__tools .pj-icon-btn svg { width: 15px; height: 15px; }
.pj-reader__body { position: relative; flex: 1; min-height: 0; }
.pj-reader__frame { display: block; width: 100%; height: 100%; border: 0; background: var(--rp-white); }
.pj-reader__body.is-loading .pj-reader__frame { visibility: hidden; }
.pj-reader__state { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; padding: 24px; text-align: center; font-size: var(--rp-text-sm); color: var(--rp-text-muted); }
.pj-reader__state p { margin: 0; }
.pj-reader__state--loading { display: none; }
.pj-reader__body.is-loading .pj-reader__state--loading { display: flex; }
.pj-reader__state .pj-btn svg { width: 14px; height: 14px; }

/* the chat while reading: the column fits its half; the source on show is lit */
.pj.is-reading .pj-chat__thread { padding-inline: 20px; }
.pj.is-reading .pj-turn__sources { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); }
.pj-src.is-reading { border-color: var(--pj-accent); background: var(--pj-accent-tint); box-shadow: inset 0 0 0 1px var(--pj-accent); }
.pj-src.is-reading > svg { opacity: 1; }
button.pj-cite { border: 0; font-family: inherit; cursor: pointer; transition: background var(--rp-duration-fast), color var(--rp-duration-fast); }
button.pj-cite:hover, button.pj-cite:focus-visible { background: var(--pj-accent); color: var(--rp-surface); }

@keyframes pj-reader-in { from { opacity: 0; transform: translateX(12px); } }
html[dir="rtl"] .pj-reader { animation-name: pj-reader-in-rtl; }
@keyframes pj-reader-in-rtl { from { opacity: 0; transform: translateX(-12px); } }
@media (max-width: 960px) {
  .pj.is-reading { max-width: 1080px; padding-inline: 0; }
  .pj.is-reading .pj-split { display: block; }
  .pj-reader { position: fixed; inset: 0; z-index: 60; height: auto; min-height: 0; border: 0; border-radius: 0; }
}
@media (prefers-reduced-motion: reduce) { .pj-reader { animation: none; } }

/* ── Desk components (DESIGN.md: the DeepSeek Harness mirror) ─────
   One layer on top of the rules above, so the component sizes match the
   source: 36px buttons with 12px corners, 32px fields, 0.5px hairlines,
   ink for the main action, blue only for focus, links and info. The brand
   prefix sits in :where() so each rule keeps the specificity of the rule
   it restyles and wins by coming later. */
:where(html[data-brand="desk"]) .pj-btn { height: 36px; padding: 0 14px; gap: 4px; border-width: 0.5px; border-color: var(--rp-border); border-radius: var(--rp-radius-md); font-size: var(--rp-text-md); font-weight: 500; line-height: 22px; }
:where(html[data-brand="desk"]) .pj-btn:hover { background: var(--rp-fill); border-color: var(--rp-border); }
:where(html[data-brand="desk"]) .pj-btn:active { transform: none; background: var(--rp-fill-strong); }
:where(html[data-brand="desk"]) .pj-btn:disabled, :where(html[data-brand="desk"]) .pj-btn.is-disabled { opacity: 0.4; }
:where(html[data-brand="desk"]) .pj-btn--primary, :where(html[data-brand="desk"]) .pj-btn--primary:hover { border-color: transparent; }
:where(html[data-brand="desk"]) .pj-btn--primary:hover { background: var(--pj-accent-hover); }
:where(html[data-brand="desk"]) .pj-btn--ghost, :where(html[data-brand="desk"]) .pj-btn--ghost:hover { border-color: transparent; }
:where(html[data-brand="desk"]) .pj-top .pj-btn { height: 36px; }
:where(html[data-brand="desk"]) .pj-btn--sm { height: 28px; padding: 0 10px; font-size: var(--rp-text-xs); line-height: 18px; border-radius: var(--rp-radius-sm); }
:where(html[data-brand="desk"]) .pj-icon-btn { width: 32px; height: 32px; border-radius: var(--rp-radius-sm); }
:where(html[data-brand="desk"]) .pj-icon-btn svg { width: 16px; height: 16px; }
:where(html[data-brand="desk"]) .pj-icon-btn:hover { background: var(--rp-fill); }
:where(html[data-brand="desk"]) .pj-icon-btn--solid:hover { background: var(--pj-accent-hover); color: var(--rp-text-on-action); }
:where(html[data-brand="desk"]) .pj-icon-btn--danger:hover { background: var(--rp-danger-soft); color: var(--rp-danger-text); }
:where(html[data-brand="desk"]) .pj-link { color: var(--rp-brand-bright); font-weight: 500; }

/* fields: 0.5px AA border, 12px corners; focus turns the border blue */
:where(html[data-brand="desk"]) .pj input:not([type="checkbox"]):not(.library-tag-input), :where(html[data-brand="desk"]) .pj textarea {
  padding: 5px 10px; border: 0.5px solid var(--rp-border-control); border-radius: var(--rp-radius-md);
  font-size: var(--rp-text-md); line-height: 22px;
}
:where(html[data-brand="desk"]) .pj input:not(.library-tag-input):focus, :where(html[data-brand="desk"]) .pj textarea:focus { border-color: var(--rp-focus); box-shadow: none; }
:where(html[data-brand="desk"]) .pj-homesearch { border-width: 0.5px; border-radius: var(--rp-radius-xl); }
:where(html[data-brand="desk"]) .pj-homesearch:focus-within { box-shadow: none; }
:where(html[data-brand="desk"]) .pj-viewswitch { border-width: 0.5px; border-radius: var(--rp-radius-md); }

/* pills, tags and badges */
:where(html[data-brand="desk"]) .pj-chip { height: 24px; padding: 0 8px; border: 0; background: var(--rp-fill); color: var(--rp-text-muted); font-size: var(--rp-text-xs); font-weight: 400; }
:where(html[data-brand="desk"]) .pj-chip:hover { background: var(--rp-fill-strong); color: var(--rp-text); }
:where(html[data-brand="desk"]) .pj-chip--dashed { border: 0.5px dashed var(--rp-border-strong); background: transparent; }
:where(html[data-brand="desk"]) .pj-tag { padding: 1px 8px; border-radius: 999px; background: var(--rp-surface-sunken); color: var(--rp-text-muted); font-size: var(--rp-text-2xs); font-weight: 500; line-height: 17px; }
:where(html[data-brand="desk"]) .pj-tag--in { background: var(--rp-success-soft); color: var(--rp-success-text); }
:where(html[data-brand="desk"]) .pj-tag--out { background: var(--rp-danger-soft); color: var(--rp-danger-text); }
:where(html[data-brand="desk"]) .pj-badge { height: auto; padding: 1px 8px; border: 0.5px solid var(--rp-border-strong); border-radius: 999px; background: transparent; color: var(--rp-text-subtle); font-size: var(--rp-text-2xs); font-weight: 500; line-height: 17px; }

/* segmented control: a wash track, a raised white thumb */
:where(html[data-brand="desk"]) .pj-seg { gap: 2px; padding: 4px; border-radius: var(--rp-radius-md); background: var(--rp-fill); }
:where(html[data-brand="desk"]) .pj-seg__btn { height: 28px; padding: 0 16px; border-radius: var(--rp-radius-sm); color: var(--rp-text-muted); font-size: var(--rp-text-sm); font-weight: 500; }
:where(html[data-brand="desk"]) .pj-seg__btn.is-on { background: var(--rp-surface); color: var(--rp-text); box-shadow: var(--rp-shadow-sm), 0 0 0 0.5px var(--rp-border); }

/* switch: 36×20, AA off track, ink when on */
:where(html[data-brand="desk"]) .pj-toggle__track { width: 36px; background: var(--rp-border-control); }
:where(html[data-brand="desk"]) .pj-toggle__track::after { box-shadow: none; }
:where(html[data-brand="desk"]) .pj-toggle input:checked + .pj-toggle__track { background: var(--rp-switch-on); }
:where(html[data-brand="desk"]) .pj-toggle input:checked + .pj-toggle__track::after { inset-inline-start: 18px; }

/* tabs: hairline under the row */
:where(html[data-brand="desk"]) .pj-tabs { border-bottom: 0.5px solid var(--rp-border); }
:where(html[data-brand="desk"]) .pj-tabs__tab { font-size: var(--rp-text-md); }
/* the active tab is blue (live app: text and a 2px underline); the text takes the AA link blue */
:where(html[data-brand="desk"]) .pj-tabs__tab.is-on { color: var(--rp-brand-bright); font-weight: 500; }
:where(html[data-brand="desk"]) .pj-tabs__tab.is-on::after { background: var(--rp-focus); }
:where(html[data-brand="desk"]) .pj-tabs__new { height: 32px; border-radius: var(--rp-radius-md); font-weight: 500; }

/* cards and panels: 16px, hairline, faint shadow; hover lifts the shadow only */
:where(html[data-brand="desk"]) :is(.pj-card, .pj-tlist, .pj-panel, .pj-sheet, .pj-nrset, .pj-nrcard) { border-width: 0.5px; }
:where(html[data-brand="desk"]) .pj-card:hover { transform: none; border-color: var(--pj-line); }

/* chat: your question in a blue bubble at the end side; the answer as prose */
:where(html[data-brand="desk"]) .pj-chat__col { max-width: clamp(680px, 64%, 920px); gap: 28px; }
:where(html[data-brand="desk"]) .pj-turn__q {
  align-self: flex-end; max-width: min(70.2%, 82%); padding: 10px 16px;
  border-radius: 20px; background: var(--rp-brand-soft);
  font-family: inherit; font-size: var(--rp-text-md); font-weight: 400; line-height: 22px; letter-spacing: 0; color: var(--rp-text);
}
:where(html[data-brand="desk"]) .pj-turn__a { padding-top: 0; border-top: 0; }
:where(html[data-brand="desk"]) .pj-turn__body { font-size: var(--rp-text-md); line-height: 24px; }
:where(html[data-brand="desk"]) .pj-turn__body li::marker { color: var(--rp-text-muted); }
:where(html[data-brand="desk"]) .pj-turn__kicker, :where(html[data-brand="desk"]) .pj-src__n, :where(html[data-brand="desk"]) .pj-src > svg { color: var(--rp-text-subtle); }
:where(html[data-brand="desk"]) .pj-cite { background: var(--rp-info-soft); color: var(--rp-info-text); }
:where(html[data-brand="desk"]) .pj-src { border-width: 0.5px; }
:where(html[data-brand="desk"]) .pj-chat__idea { border-width: 0.5px; border-radius: var(--rp-radius-xl); }
:where(html[data-brand="desk"]) .pj-chat__mark { box-shadow: none; background: var(--rp-tile); color: var(--rp-tile-text); }
:where(html[data-brand="desk"]) .pj-chat__hello { font-size: 1.625rem; line-height: 32px; font-weight: 500; letter-spacing: 0; }

/* the composer: an 18px card on the soft shadow, its hairline drawn by the shadow */
:where(html[data-brand="desk"]) .pj-chat__dock > .pj-err, :where(html[data-brand="desk"]) .pj-chat__composer { max-width: calc(clamp(680px, 64%, 920px) + 32px); }
:where(html[data-brand="desk"]) .pj-chat__composer {
  gap: 8px; padding: 8px 10px 10px; padding-inline-start: 14px;
  border: 0; border-radius: var(--pj-composer-radius); background: var(--rp-surface);
  box-shadow: 0 0 0 0.5px var(--rp-composer-edge), 0 0 0 3.5px var(--rp-composer-glow), var(--rp-shadow-sm);
}
:where(html[data-brand="desk"]) .pj-chat__composer:focus-within { border: 0; box-shadow: 0 0 0 0.5px var(--rp-composer-edge-focus), 0 0 0 3.5px var(--rp-composer-glow), var(--rp-shadow-md); }
:where(html[data-brand="desk"]) .pj .pj-chat__composer textarea { min-height: 36px; max-height: 336px; font-size: max(16px, var(--rp-text-md)); line-height: 24px; }
@media (min-width: 768px) {
  :where(html[data-brand="desk"]) .pj .pj-chat__composer textarea { font-size: var(--rp-text-md); }
}
/* send: the one blue fill in the source, a 34px circle with a white arrow, 40% while empty */
:where(html[data-brand="desk"]) .pj-chat__composer .pj-chat__send { width: 34px; height: 34px; border-radius: 50%; background: var(--rp-info-indicator); color: var(--rp-white); }
:where(html[data-brand="desk"]) .pj-chat__composer .pj-chat__send:hover { background: color-mix(in srgb, var(--rp-info-indicator) 86%, var(--rp-text)); color: var(--rp-white); }
:where(html[data-brand="desk"]) .pj-chat__send:disabled { opacity: 0.4; }
:where(html[data-brand="desk"]) .pj-chat__tool { border-radius: var(--rp-radius-sm); }

/* floating: the dock, popovers and drawers take the floating shadow */
:where(html[data-brand="desk"]) :is(.pj-dock, .pj-scope) { border-width: 0.5px; box-shadow: var(--rp-shadow-md); }
:where(html[data-brand="desk"]) .pj-scope { border-radius: var(--rp-radius-xl); }

/* ── Home: the composer (DeepSeek Harness, docs/projects-dsh-ux.md phase 1) ──
   The headline, the workspace and mode pickers, and the composer card:
   dsh's hero, centred in the work area at the chat width plus 32px. */
.pj-hero { display: grid; grid-template-columns: minmax(0, 1fr); place-items: center; min-height: calc(100dvh - 220px); padding: 0 0 12vh; }
.pj-hero__stack { display: flex; flex-direction: column; gap: 12px; width: min(100%, calc(clamp(680px, 64%, 920px) + 32px)); min-width: 0; }
.pj-hero__headline { margin: 0 0 8px; text-align: center; font-size: 1.625rem; line-height: 32px; font-weight: 500; letter-spacing: 0; color: var(--rp-heading); }
html[lang="fa"] .pj-hero__headline { line-height: 1.5; }
/* The original app's brand line above the headline (user 2026-11-16). */
.pj-hero__brand { display: flex; align-items: center; justify-content: center; gap: 8px; margin-bottom: -4px; }
.pj-hero__logo { display: block; width: 28px; height: 28px; object-fit: contain; }
.pj-hero__logo--dark { display: none; }
html[data-theme="monochrome"] .pj-hero__logo--light { display: none; }
html[data-theme="monochrome"] .pj-hero__logo--dark { display: block; }
.pj-hero__name { font-size: var(--rp-text-base); font-weight: 600; color: var(--rp-text-secondary); }
.pj-hero__pickers { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; padding-inline-start: 8px; }

.pj-pick__wrap { position: relative; display: inline-flex; }
.pj-pick {
  display: inline-flex; align-items: center; gap: 4px; max-width: min(100%, 360px); height: 28px; padding: 0 8px;
  border: 0; border-radius: var(--rp-radius-sm); background: transparent; color: var(--rp-text-muted);
  font: inherit; font-size: var(--rp-text-sm); line-height: 20px; font-weight: 500; cursor: pointer;
}
.pj-hero__pickers .pj-pick { color: var(--rp-text); }
.pj-pick > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pj-pick svg { flex: none; width: 15px; height: 15px; }
.pj-pick > svg:last-child { width: 12px; height: 12px; color: var(--rp-text-subtle); transform: rotate(90deg); }
html[dir="rtl"] .pj-pick > svg:last-child { transform: rotate(90deg) scaleY(-1); }
.pj-pick:hover, .pj-pick.is-open { background: var(--rp-hover-wash); color: var(--rp-text); }
.pj-pick__svg { width: 15px; height: 15px; }
/* The composer's model picker: the original app's filled pill, name only, no
   icon (user 2026-11-16); the same 34px tile, 13px/500 type and content
   width as the Chat/Report halves beside it (user, 2026-11-17). */
.pj-composer__bar .pj-pick[data-menu="model"] {
  height: 34px; gap: 6px; padding-inline: 12px 8px;
  border-radius: var(--rp-radius-md); background: var(--pj-ctile); color: var(--rp-text); font-weight: 500;
}
.pj-composer__bar .pj-pick[data-menu="model"]:hover,
.pj-composer__bar .pj-pick[data-menu="model"].is-open { background: var(--pj-ctile-hover); }
.pj-menu.pj-pick__menu { top: calc(100% + 6px); inset-inline-start: 0; }
.pj-menu.pj-pick__menu--up { top: auto; bottom: calc(100% + 6px); }
.pj-menu.pj-pick__menu--end { inset-inline-start: auto; inset-inline-end: 0; }
.pj-menu.pj-pick__menu--wide { min-width: 300px; }
.pj-menu__svg { width: 16px; height: 16px; }

/* The composer card: dsh's input-major card, its hairline drawn by the shadow;
   the text grows to 336px and then scrolls. Its corners are the 12px tiles'
   plus 6px, so the card's curve follows the buttons' (as on 3004, user,
   2026-11-26). */
:root { --pj-composer-radius: calc(var(--rp-radius-lg) + 6px); }
.pj-composer {
  display: flex; flex-direction: column; gap: 12px; padding-top: 8px; box-sizing: border-box;
  border-radius: var(--pj-composer-radius); background: var(--rp-surface);
  box-shadow: 0 0 0 0.5px var(--rp-composer-edge), 0 0 0 3.5px var(--rp-composer-glow), var(--rp-shadow-sm);
}
.pj-composer:focus-within { box-shadow: 0 0 0 0.5px var(--rp-composer-edge-focus), 0 0 0 3.5px var(--rp-composer-glow), var(--rp-shadow-md); }
.pj .pj-composer__input, .pj .pj-composer__input:focus {
  display: block; width: 100%; min-height: 36px; max-height: 336px; padding: 4px 8px 0 14px; box-sizing: border-box;
  border: 0; border-radius: 0; background: transparent; box-shadow: none; outline: none; resize: none;
  color: var(--rp-text); font: inherit; font-size: var(--rp-text-md); line-height: 24px;
}
@media (max-width: 767px) { .pj .pj-composer__input { font-size: max(16px, var(--rp-text-md)); } }
/* Home's composer opens taller, about 3004's 184px card (user, 2026-11-26). */
.pj .pj-hero .pj-composer__input { min-height: 110px; }
/* One grey for every tile in the bar: +, globe, Chat/Report track, model
   pill and the empty Send (user, 2026-11-16). */
.pj-composer__bar {
  --pj-ctile: color-mix(in srgb, var(--rp-text-muted) 8%, var(--rp-surface));
  --pj-ctile-hover: color-mix(in srgb, var(--rp-text-muted) 14%, var(--rp-surface));
  display: flex; align-items: center; gap: 8px; padding: 10px;
}
/* The generic .pj-seg margin (14px over, 12px under) made the bar 70px tall and
   floated its buttons 23px off the card's foot (user, 2026-11-26). */
.pj-composer__bar .pj-seg { margin: 0; }
.pj-composer__spacer { flex: 1; }
/* dsh's `+`: a round ghost button opening the Add / Commands menu above the
   composer, at the composer's full width (so its wrap is not the anchor). */
.pj-composer { position: relative; }
.pj-pick__wrap.pj-plus__wrap { position: static; }
.pj-composer__plus {
  display: grid; place-items: center; flex: none; width: 34px; height: 34px; padding: 0; box-sizing: border-box;
  border: 1px solid transparent; border-radius: var(--rp-radius-lg);
  background: var(--pj-ctile); color: var(--rp-text); cursor: pointer;
  transition: background var(--rp-duration-fast), color var(--rp-duration-fast), border-color var(--rp-duration-fast), box-shadow var(--rp-duration-fast);
}
.pj-composer__plus svg { width: 18px; height: 18px; }
.pj-composer__plus:hover { background: var(--pj-ctile-hover); }
/* Open or focused, the tile goes light with a soft ring, as on 3004. */
.pj-composer__plus.is-open, .pj-composer__plus:focus-visible, .pj-composer__bar .pj-webtoggle:not(.is-on):focus-visible {
  outline: none; background: var(--rp-surface);
  border-color: color-mix(in srgb, var(--rp-border) 70%, var(--rp-info-indicator) 18%);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--rp-info-indicator) 16%, transparent);
}
.pj-menu.pj-slash.pj-plus { bottom: calc(100% + 8px); }
/* Home's `/` menu sits above its composer, as the `+` menu does; a skill
   picked from it shows as a chip at the top of the card until sent. */
.pj-composer__slashhost:empty { display: none; }
.pj-composer__slashhost .pj-menu.pj-slash { bottom: calc(100% + 8px); max-height: min(360px, 38vh); }
/* Home's composer sits mid-screen: its menu opens below, where the room is,
   so the first rows are never cut off at the top of the window. */
.pj-hero .pj-composer__slashhost .pj-menu.pj-slash { top: calc(100% + 8px); bottom: auto; max-height: min(360px, 44vh); }
.pj-composer__skill { display: flex; flex-wrap: wrap; gap: 6px; padding: 2px 10px 0; }
.pj-skillchip {
  display: inline-flex; align-items: center; gap: 6px; max-width: 100%; height: 28px; padding: 0 4px 0 10px; box-sizing: border-box;
  border-radius: 999px; background: var(--rp-info-soft); color: var(--rp-info-text); font-size: var(--rp-text-sm); font-weight: 500;
}
html[dir="rtl"] .pj-skillchip { padding: 0 10px 0 4px; }
.pj-skillchip > svg, .pj-skillchip > img { flex: none; width: 15px; height: 15px; }
.pj-skillchip > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pj-skillchip__x { display: grid; place-items: center; flex: none; width: 20px; height: 20px; padding: 0; border: 0; border-radius: 50%; background: transparent; color: inherit; cursor: pointer; }
.pj-skillchip__x svg { width: 10px; height: 10px; }
.pj-skillchip__x:hover { background: color-mix(in srgb, var(--rp-info-indicator) 18%, transparent); }
/* Attached files (dsh's): chips across the top of the composer card, each an
   icon tile, the name over its size, and a × that shows on hover or focus.
   The row is gone while it is empty; a file dragged over the card rings it. */
.pj-attach { display: flex; flex-wrap: wrap; gap: 8px; padding: 4px 10px 0; }
.pj-attach:empty { display: none; }
.pj-attach__chip {
  position: relative; display: inline-flex; align-items: center; gap: 8px; width: 200px; max-width: 100%; padding: 6px 8px; box-sizing: border-box;
  border: 0.5px solid var(--rp-border); border-radius: var(--rp-radius-md); background: var(--rp-surface); color: var(--rp-text);
}
.pj-attach__icon { display: grid; place-items: center; flex: none; width: 32px; height: 32px; border-radius: var(--rp-radius-sm); background: var(--rp-info-soft); color: var(--rp-info-text); }
.pj-attach__icon svg { width: 16px; height: 16px; }
.pj-attach__copy { display: flex; flex-direction: column; min-width: 0; }
.pj-attach__name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: var(--rp-text-sm); line-height: 18px; font-weight: 500; }
.pj-attach__sub { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: var(--rp-text-xs); line-height: 16px; color: var(--rp-text-subtle); }
.pj-attach__chip.is-error { border-color: var(--rp-danger-text); }
.pj-attach__chip.is-error .pj-attach__icon { background: var(--rp-danger-soft); color: var(--rp-danger-text); }
.pj-attach__chip.is-error .pj-attach__sub { color: var(--rp-danger-text); }
.pj-attach__x {
  position: absolute; top: -7px; inset-inline-end: -7px; display: grid; place-items: center; width: 20px; height: 20px; padding: 0;
  border: 0.5px solid var(--rp-border); border-radius: 50%; background: var(--rp-surface); color: var(--rp-text-muted); cursor: pointer;
  opacity: 0; transition: opacity var(--rp-duration-fast);
}
.pj-attach__x svg { width: 11px; height: 11px; }
.pj-attach__chip:hover .pj-attach__x, .pj-attach__x:focus-visible, .pj-attach__chip.is-error .pj-attach__x { opacity: 1; }
@media (hover: none) { .pj-attach__x { opacity: 1; } }
/* + → Sources: the + menu turned into a searchable list of the account's
   sources; a ticked row shows a check in place of its kind icon. */
.pj-menu.pj-slash.pj-srcpick { display: flex; flex-direction: column; max-height: min(380px, 42vh); overflow: hidden; }
.pj-srcpick__head { display: flex; align-items: center; gap: 8px; padding: 2px 2px 4px; }
.pj-srcpick__head .pj-slash__head { flex: none; }
.pj-srcpick__q {
  flex: 1; min-width: 0; height: 30px; padding: 0 10px; box-sizing: border-box;
  border: 0.5px solid var(--rp-border); border-radius: var(--rp-radius-sm); background: var(--rp-surface); color: var(--rp-text);
  font: inherit; font-size: var(--rp-text-md);
}
.pj-srcpick__q:focus-visible { outline: none; border-color: var(--rp-focus); box-shadow: 0 0 0 2px color-mix(in srgb, var(--rp-focus) 22%, transparent); }
.pj-srcpick__list { flex: 1; min-height: 0; overflow-y: auto; }
.pj-srcpick__row.is-on .pj-slash__icon { color: var(--rp-info-text); }
.pj-srcpick__manage { flex: none; margin-top: 2px; border-top: 0.5px solid var(--rp-border); border-radius: 0; }
.pj-srcpick__manage .pj-slash__name { max-width: none; color: var(--rp-text-muted); font-size: var(--rp-text-sm); }
.pj-composer.is-drop { box-shadow: 0 0 0 1.5px var(--rp-focus), var(--rp-shadow-md); }
/* Under a sent message, the files that went with it. */
.pj-msg__files { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; margin-bottom: 6px; }
.pj-msg--you .pj-msg__files { align-self: stretch; }
.pj-src--file { cursor: default; }
/* The run plan's attached files: names with a × each. */
.pj-plan__files { display: flex; flex-wrap: wrap; gap: 4px 10px; }
.pj-plan__file { display: inline-flex; align-items: center; gap: 2px; min-width: 0; }
.pj-plan__file > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 220px; }
.pj-plan__unfile { display: grid; place-items: center; width: 18px; height: 18px; padding: 0; border: 0; border-radius: 50%; background: transparent; color: var(--rp-text-subtle); cursor: pointer; }
.pj-plan__unfile svg { width: 10px; height: 10px; }
.pj-plan__unfile:hover { background: var(--rp-hover-wash); color: var(--rp-text); }
/* An empty box takes the page's direction, so a Farsi placeholder starts on
   the right; once there is text, dir="auto" follows what was typed. */
html[dir="rtl"] .pj :is(input, textarea)[dir="auto"]:placeholder-shown { direction: rtl; }
/* Chat / Report: a segmented switch in the composer bar (user, 2026-11-16).
   Both halves always show; the one in force is a raised white tile on a
   sunken track, the 34px height of the tiles beside it. A disabled half
   (a started session) stays readable but cannot be pressed. */
.pj-seg {
  display: inline-flex; flex: none; align-items: center; gap: 2px; height: 34px; padding: 3px; box-sizing: border-box;
  border: 0; border-radius: var(--rp-radius-md); background: var(--pj-ctile, var(--rp-fill));
}
.pj-seg__opt {
  display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 10px; box-sizing: border-box;
  border: 0; border-radius: calc(var(--rp-radius-md) - 3px); background: transparent; color: var(--rp-text-muted);
  font: inherit; font-size: var(--rp-text-sm); line-height: 20px; font-weight: 500; white-space: nowrap; cursor: pointer;
  transition: background var(--rp-duration-fast), color var(--rp-duration-fast), box-shadow var(--rp-duration-fast);
}
.pj-seg__opt svg { flex: none; width: 14px; height: 14px; }
.pj-seg__opt:hover { color: var(--rp-text); }
.pj-seg__opt.is-on { background: var(--rp-surface); color: var(--rp-heading); box-shadow: var(--rp-shadow-sm); cursor: default; }
.pj-seg__opt[aria-disabled="true"] { color: var(--rp-text-disabled); cursor: not-allowed; }
.pj-seg__opt[aria-disabled="true"]:hover { color: var(--rp-text-disabled); }
html[data-theme="monochrome"] .pj-composer__bar { --pj-ctile: var(--rp-surface-sunken); }
html[data-theme="monochrome"] .pj-seg__opt.is-on { background: var(--rp-fill-strong); }
/* Phones: the model name gives way first; the switch keeps its words. */
@media (max-width: 480px) {
  /* The switch takes its own full-width row above the tools. */
  .pj-composer__bar { flex-wrap: wrap; gap: 8px 6px; }
  .pj-composer__bar .pj-seg { order: -1; width: 100%; }
  .pj-seg__opt { flex: 1; justify-content: center; }
  .pj-composer__bar .pj-pick__wrap { min-width: 0; flex: 0 1 auto; }
  .pj-composer__bar .pj-pick__wrap .pj-pick { max-width: 100%; }
  .pj-composer__bar .pj-pick[data-menu="model"] { padding-inline: 10px 8px; }
}

/* Web search: one toggle button. On, it takes the info tint; off, it is a
   quiet ghost button. aria-pressed carries the state for assistive tech. */
.pj-webtoggle {
  display: inline-flex; flex: none; align-items: center; gap: 4px; height: 28px; padding: 0 10px; white-space: nowrap;
  border: 0.5px solid var(--rp-border); border-radius: 999px; background: transparent; color: var(--rp-text-muted);
  font: inherit; font-size: var(--rp-text-sm); line-height: 20px; font-weight: 500; cursor: pointer;
  transition: background var(--rp-duration-fast), color var(--rp-duration-fast), border-color var(--rp-duration-fast);
}
.pj-webtoggle svg { flex: none; width: 15px; height: 15px; }
/* In a composer bar the toggle is the globe alone (user, 2026-11-09); the name is its aria-label. */
.pj-webtoggle:hover { background: var(--rp-hover-wash); color: var(--rp-text); }
.pj-webtoggle.is-on { border-color: transparent; background: var(--rp-info-soft); color: var(--rp-info-text); }
.pj-webtoggle.is-on:hover { background: color-mix(in srgb, var(--rp-info-indicator) 16%, transparent); }
/* …and wears the original app's (3004) tile, like the + beside it: a filled
   rounded square; on, a blue tint with a blue edge (user, 2026-11-10). */
.pj-composer__bar .pj-webtoggle {
  justify-content: center; width: 34px; height: 34px; padding: 0; box-sizing: border-box;
  border: 1px solid transparent; border-radius: var(--rp-radius-lg);
  background: var(--pj-ctile); color: var(--rp-text-muted);
  transition: background var(--rp-duration-fast), color var(--rp-duration-fast), border-color var(--rp-duration-fast), box-shadow var(--rp-duration-fast);
}
.pj-composer__bar .pj-webtoggle svg { width: 18px; height: 18px; }
.pj-composer__bar .pj-webtoggle:hover { background: var(--pj-ctile-hover); color: var(--rp-text); }
/* On, it keeps the shared grey tile (user, 2026-11-16): the blue glyph and a
   blue edge carry the state. */
.pj-composer__bar .pj-webtoggle.is-on {
  background: var(--pj-ctile);
  border-color: color-mix(in srgb, var(--rp-info-indicator) 40%, transparent); color: var(--rp-info-text);
}
.pj-composer__bar .pj-webtoggle.is-on:hover { background: var(--pj-ctile-hover); }
.pj-composer__bar .pj-webtoggle.is-on:focus-visible { outline: none; box-shadow: 0 0 0 3px color-mix(in srgb, var(--rp-info-indicator) 16%, transparent); }
/* Send wears the same tile as + and the globe (user, 2026-11-11): a 34px
   rounded square, solid blue when ready, the grey tile while empty. */
.pj-composer__send {
  display: grid; place-items: center; flex: none; width: 34px; height: 34px; padding: 0; box-sizing: border-box;
  border: 1px solid transparent; border-radius: var(--rp-radius-lg);
  background: var(--rp-info-indicator); color: var(--rp-white); cursor: pointer;
  transition: background var(--rp-duration-fast), color var(--rp-duration-fast), box-shadow var(--rp-duration-fast);
}
.pj-composer__send svg { width: 18px; height: 18px; }
.pj-composer__send:hover { background: color-mix(in srgb, var(--rp-info-indicator) 86%, var(--rp-text)); }
.pj-composer__send:focus-visible { outline: none; box-shadow: 0 0 0 3px color-mix(in srgb, var(--rp-info-indicator) 16%, transparent); }
.pj-composer__send.is-empty, .pj-composer__send.is-empty:hover {
  background: var(--pj-ctile); color: var(--rp-text-subtle); cursor: default;
}
.pj-composer__send .pj-spinner { width: 14px; height: 14px; }
/* Stop takes Send's place while an answer is coming (user, 2026-11-16): the
   same blue tile with a filled square; a spinner once Stop is pressed. */
.pj-composer__send--stop svg { width: 14px; height: 14px; }
.pj-composer__send--stop:disabled { cursor: default; }

/* ── Shared page frame (Automation tasks, Skills, Contexts, Sources, Search) ── */
.pj-page { width: 100%; max-width: 960px; margin: 0 auto; padding: 8px 0 80px; }
.pj-page__head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin: 0 0 16px; }
.pj-page__title { margin: 0; font-size: var(--rp-text-xl); line-height: 28px; font-weight: 500; color: var(--rp-heading); }
.pj-auto__empty { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 72px 16px; text-align: center; }
.pj-auto__emptyicon { display: grid; place-items: center; width: 56px; height: 56px; margin-bottom: 6px; border-radius: var(--rp-radius-xl); background: var(--rp-tile); color: var(--rp-tile-text); }
.pj-auto__emptyicon svg { width: 24px; height: 24px; }
.pj-auto__emptytitle { margin: 0; font-size: var(--rp-text-md); font-weight: 500; color: var(--rp-text); }
.pj-auto__emptysub { margin: 0; max-width: 380px; font-size: var(--rp-text-sm); color: var(--rp-text-subtle); }

/* Search (#/search): the field is the page's control. Results reuse the
   source rows. The input is not redrawn while typing, so an IME keeps going. */
.pj-findpage .pj-srcpage__head { margin-bottom: 16px; }
.pj-find {
  display: flex; align-items: center; gap: 10px; height: 48px; margin: 0 0 16px; padding-inline: 14px 8px; box-sizing: border-box;
  border: 0.5px solid var(--rp-border-control); border-radius: var(--rp-radius-lg); background: var(--rp-surface);
  color: var(--rp-text-subtle);
}
.pj-find:focus-within { border-color: var(--rp-focus); }
.pj-find__label { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; height: 100%; cursor: text; }
.pj-find__icon { display: grid; place-items: center; flex: none; }
.pj-find__icon svg { width: 18px; height: 18px; }
.pj .pj-find input {
  flex: 1; min-width: 0; height: 100%; padding: 0; border: 0 !important; outline: none; background: none;
  box-shadow: none !important; color: var(--rp-text); font: inherit; font-size: var(--rp-text-md); caret-color: var(--rp-focus);
}
.pj-find input::-webkit-search-decoration,
.pj-find input::-webkit-search-cancel-button { display: none; appearance: none; }
.pj-find__clear {
  display: grid; place-items: center; flex: none; width: 32px; height: 32px; padding: 0; border: 0;
  border-radius: var(--rp-radius-sm); background: transparent; color: var(--rp-text-subtle); cursor: pointer;
}
.pj-find__clear[hidden] { display: none; }
.pj-find__clear svg { width: 16px; height: 16px; }
.pj-find__clear:hover { background: var(--rp-hover-wash); color: var(--rp-text); }
.pj-find__clear:focus-visible { outline: 2px solid var(--rp-focus); outline-offset: 2px; }
.pj-find__kbd {
  flex: none; margin-inline-end: 6px; padding: 1px 6px; border: 0.5px solid var(--rp-border); border-radius: var(--rp-radius-sm);
  color: var(--rp-text-subtle); font: inherit; font-size: var(--rp-text-2xs); line-height: 16px;
}
.pj-find__kbd[hidden] { display: none; }
.pj-findpage .pj-src-row.is-on { background: var(--rp-wash-on); }
.pj-find__row.is-archived .pj-src-row__name { color: var(--rp-text-muted); }
.pj-find__row--slides .pj-src-row__tile { color: var(--rp-warning-indicator); }
.pj-find__row--listen .pj-src-row__tile { color: var(--rp-info-indicator); }
.pj-find__mark { background: color-mix(in srgb, var(--rp-focus) 28%, transparent); color: inherit; border-radius: 2px; }
.pj-find__more {
  height: 32px; margin-top: 4px; padding: 0 8px; border: 0; border-radius: var(--rp-radius-md); background: transparent;
  color: var(--rp-text-subtle); font: inherit; font-size: var(--rp-text-sm); cursor: pointer;
}
.pj-find__more:hover { background: var(--rp-hover-wash); color: var(--rp-text); }
.pj-find__more:focus-visible { outline: 2px solid var(--rp-focus); outline-offset: 2px; }
@media (max-width: 767px) {
  .pj-find input { font-size: max(16px, var(--rp-text-md)); }
  .pj-find__kbd { display: none; }
}
.pj-tag--quiet { background: transparent; color: var(--rp-text-subtle); }

/* ── The session (DeepSeek Harness, phase 2) ─────────────────────
   Tabs over the work area, the transcript at the chat width, the composer
   docked at the foot with the cap line under it. */
.pj-sess { --pj-chat-w: clamp(680px, 64%, 920px); display: flex; flex-direction: column; min-height: calc(100dvh - 140px); }
.pj-sess__head {
  position: sticky; top: var(--desk-top, 0px); z-index: 6;
  display: flex; align-items: flex-end; justify-content: space-between; gap: 12px;
  margin: -12px 0 0; padding: 4px 0 0; background: var(--rp-surface); border-bottom: 0.5px solid var(--rp-border);
}
.pj-sess__tabs { display: flex; gap: 20px; }
.pj-sess__tab {
  position: relative; padding: 8px 0 10px; color: var(--rp-text-subtle); font-size: var(--rp-text-sm); line-height: 16px; font-weight: 500; text-decoration: none;
}
.pj-sess__tab:hover { color: var(--rp-text); }
.pj-sess__tab.is-on { color: var(--rp-brand-bright); }
.pj-sess__tab.is-on::after { content: ""; position: absolute; inset-inline: 0; bottom: -0.5px; height: 2px; border-radius: 2px; background: var(--rp-focus); }
.pj-sess__tabdot { display: inline-block; width: 6px; height: 6px; margin-inline-start: 6px; border-radius: 50%; background: var(--rp-success-indicator); vertical-align: 2px; }
.pj-sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.pj-sess__tools { display: inline-flex; align-items: center; gap: 4px; padding-bottom: 4px; }
/* Phones: the tabs scroll sideways under the tools instead of pushing them off
   the screen; the tools keep their place at the row's end. */
@media (max-width: 767px) {
  .pj-sess__tabs { flex: 1 1 auto; min-width: 0; gap: 16px; overflow-x: auto; scrollbar-width: none; }
  .pj-sess__tabs::-webkit-scrollbar { display: none; }
  .pj-sess__tab { flex: none; white-space: nowrap; }
  .pj-sess__tools { flex: none; }
}

.pj-sess__thread { flex: 1; padding: 24px 0 8px; }
.pj-sess__col { display: flex; flex-direction: column; gap: 14px; width: min(100%, var(--pj-chat-w)); margin: 0 auto; }
.pj-sess__loading { display: grid; place-items: center; padding: 64px 0; }
/* A thread still loading: hairline bars shaped like a question and an
   answer (user, 2026-11-20: message skeletons, no spinner). */
.pj-skel { display: flex; flex-direction: column; gap: 10px; padding: 8px 0; }
.pj-skel__bar { height: 12px; border-radius: var(--rp-radius-pill); background: var(--rp-fill); animation: pj-skel-pulse 1.4s var(--rp-ease-out) infinite alternate; }
.pj-skel__bar--you { align-self: flex-end; height: 36px; border-radius: 18px; margin-bottom: 8px; }
@keyframes pj-skel-pulse { from { opacity: 1; } to { opacity: .45; } }
@media (prefers-reduced-motion: reduce) { .pj-skel__bar { animation: none; } }
.pj-sess__empty { margin: 18vh auto 0; color: var(--rp-text-subtle); font-size: var(--rp-text-md); text-align: center; }
.pj-sess__page { width: min(100%, var(--pj-chat-w)); margin: 0 auto; padding: 24px 0 64px; }
/* Report, Slides, Listen: the document fills the rest of the window. */
.pj-sess--doc { height: calc(100dvh - var(--desk-top, 0px) - 24px); min-height: 360px; }
.pj-sess__doc { display: flex; flex: 1; flex-direction: column; min-height: 0; padding-bottom: 12px; }

.pj-msg { display: flex; flex-direction: column; gap: 6px; }
.pj-msg--you { align-items: flex-end; }
.pj-bubble {
  max-width: min(70.2%, 82%); padding: 10px 16px; border-radius: 20px;
  background: var(--rp-brand-soft); color: var(--rp-text);
  font-size: var(--rp-text-md); line-height: 22px; white-space: pre-wrap; overflow-wrap: anywhere;
}
/* The message's own script sets its direction and its alignment. dir="auto"
   follows each line's first letter, so a Farsi line opening with "(1)" or
   "GPU" ran left to right; the page's .pj-bidi alignment would also pin it
   to the UI's side. */
.pj-bubble.pj-bidi[dir],
.pj-handoff__request.pj-bidi[dir],
.pj-turn__q[dir],
.pj-turn__body[dir],
.pj-msg__body[dir],
.pj-prose > [dir] { text-align: start; unicode-bidi: isolate; }
.pj-msg__time { font-size: var(--rp-text-sm); line-height: 24px; color: var(--rp-text-subtle); padding-inline-end: 12px; }
.pj-msg--ai { padding-top: 2px; }
.pj-msg__model { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 0; }
.pj-msg__model .pj-tag {
  margin: 0;
  height: 22px;
  padding: 0 8px;
  background: var(--rp-fill);
  color: var(--rp-text-secondary);
  font-size: var(--rp-text-xs);
  font-weight: 500;
}
.pj-msg__model .pj-tag__meta { color: var(--rp-text-muted); }
.pj-prose { font-size: var(--rp-text-md); line-height: 24px; color: var(--rp-text); overflow-wrap: anywhere; }
.pj-prose p { margin: 0 0 12px; }
.pj-prose ul { margin: 0 0 12px; padding-inline-start: 18px; }
.pj-prose li { margin: 2px 0; }
.pj-prose b { font-weight: 600; }
.pj-prose > :last-child { margin-bottom: 0; }
/* Quick-run sections (option A): headings in the prose size, tables ruled by hairlines only. */
.pj-prose .pj-prose__h { font-size: var(--rp-text-md); line-height: 24px; font-weight: 600; color: var(--rp-text); margin: 20px 0 4px; }
.pj-prose h4.pj-prose__h { margin-top: 12px; color: var(--rp-text-secondary); }
.pj-prose > .pj-prose__h:first-child { margin-top: 0; }
.pj-prose__table { overflow-x: auto; margin: 4px 0 14px; }
.pj-prose__table table { width: 100%; border-collapse: collapse; font-size: var(--rp-text-sm); line-height: 20px; }
/* break-word, not the prose's anywhere: anywhere lets a column shrink to one letter (زیرسیست|م). */
.pj-prose__table th, .pj-prose__table td { text-align: start; vertical-align: top; padding: 6px 12px 6px 0; overflow-wrap: break-word; }
.pj-prose__table th:last-child, .pj-prose__table td:last-child { padding-inline-end: 0; }
.pj-prose__table th { font-weight: 500; color: var(--rp-text-secondary); border-bottom: 0.5px solid var(--rp-border-strong); }
.pj-prose__table td { border-bottom: 0.5px solid var(--rp-border-subtle); }
.pj-prose__table tr:last-child td { border-bottom: 0; }
.pj-prose a.pj-cite, .pj-prose button.pj-cite, .pj-prose .pj-cite {
  display: inline-grid; place-items: center; min-width: 18px; height: 18px; margin-inline-start: 2px; padding: 0 4px; box-sizing: border-box;
  border-radius: 999px; background: var(--rp-info-soft); color: var(--rp-info-text);
  font-size: var(--rp-text-2xs); line-height: 1; font-weight: 500; vertical-align: 2px; text-decoration: none;
  position: relative; z-index: 1;
}
.pj-prose a.pj-cite, .pj-prose button.pj-cite { cursor: pointer; }
.pj-prose button.pj-cite { border: 0; font-family: inherit; }
.pj-prose a.pj-cite:hover, .pj-prose button.pj-cite:hover { background: color-mix(in srgb, var(--rp-info-indicator) 18%, transparent); }
.pj-prose a.pj-mdlink { color: var(--rp-info-text); text-underline-offset: 2px; }
.pj-src.is-jump { border-color: var(--rp-info-indicator); background: var(--rp-info-soft); }
.pj-msg__sources { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 6px; margin-top: 16px; padding-top: 16px; border-top: 0.5px solid var(--rp-border-subtle); }
.pj-msg__sources .pj-src { border: 0.5px solid var(--rp-border); border-radius: var(--rp-radius-md); padding: 8px 10px; }
.pj-msg__sources .pj-src:hover { background: var(--rp-hover-wash); }
.pj-msg__tools { display: flex; gap: 2px; margin-inline-start: -6px; }
.pj-msg__tool {
  display: grid; place-items: center; width: 28px; height: 28px; padding: 0; border: 0; border-radius: var(--rp-radius-sm);
  background: transparent; color: var(--rp-text-subtle); cursor: pointer;
}
.pj-msg__tool svg { width: 15px; height: 15px; }
.pj-msg__tool:hover { background: var(--rp-hover-wash); color: var(--rp-text); }
.pj-msg__tool.is-done { color: var(--rp-success-text); }
.pj-msg__tool.is-on { color: var(--rp-info-text); }
/* Listen with its audio made: tinted chip, heavier stroke, solid ear cups. */
.pj-msg__tool.is-ready { background: var(--rp-info-soft); color: var(--rp-info-text); }
.pj-msg__tool.is-ready:hover { background: color-mix(in srgb, var(--rp-info-indicator) 18%, transparent); color: var(--rp-info-text); }
.pj-msg__tool.is-ready svg { stroke-width: 2.6; }
.pj-msg__tool.is-ready svg rect { fill: currentColor; }
/* Share link popover (answer-share.js): opens upward, out of the composer's way. */
.pj-share__wrap { position: relative; display: inline-flex; }
.pj-menu.pj-share {
  bottom: calc(100% + 6px); inset-inline-start: -4px; width: 340px; max-width: calc(100vw - 32px);
  padding: 12px; display: flex; flex-direction: column; gap: 10px; align-items: flex-start;
}
.pj-menu.pj-share.pj-share--down { bottom: auto; top: calc(100% + 6px); }
.pj-share__intro, .pj-share__note { margin: 0; font-size: var(--rp-text-xs); line-height: 1.55; color: var(--rp-text-secondary); }
.pj-share__note { color: var(--rp-text-muted); }
.pj-share__row { display: flex; gap: 6px; width: 100%; }
.pj-share__url {
  flex: 1; min-width: 0; height: 30px; padding: 0 10px; box-sizing: border-box;
  border: 0.5px solid var(--rp-border-strong); border-radius: var(--rp-radius-lg);
  background: var(--rp-surface-sunken); color: var(--rp-text-secondary);
  font: var(--rp-text-xs) / 1 var(--rp-font-mono);
}
.pj-share__url:focus { outline: 2px solid var(--rp-focus); outline-offset: -1px; }
.pj-share__stop {
  padding: 0; border: 0; background: none; font: inherit; color: var(--rp-danger-text);
  text-decoration: underline; text-underline-offset: 0.2em; cursor: pointer;
}
.pj-share__stop:disabled { opacity: 0.5; cursor: default; }
/* The answer's audio on its link: a switch once the link exists, a tick before it. */
.pj-share__audio { display: flex; align-items: center; gap: 8px; width: 100%; font-size: var(--rp-text-sm); color: var(--rp-text); }
.pj-share__audio svg { width: 15px; height: 15px; color: var(--rp-text-subtle); flex: none; }
.pj-share__audio > span { flex: 1; }
.pj-share__audio--pick { cursor: pointer; }
.pj-share__audio--pick input { width: 16px; height: 16px; margin: 0; accent-color: var(--rp-text); }
.pj-share__changed {
  display: flex; align-items: center; gap: 8px; width: 100%; box-sizing: border-box; padding-block: 6px; padding-inline: 10px 6px;
  border-radius: var(--rp-radius-md); background: var(--rp-warning-soft); color: var(--rp-warning-text); font-size: var(--rp-text-xs);
}
.pj-share__changed > span { flex: 1; }
.pj-switch {
  position: relative; flex: none; width: 30px; height: 18px; padding: 0; border: 0; border-radius: 999px;
  background: var(--rp-border-strong); cursor: pointer; transition: background var(--rp-duration-fast) ease;
}
.pj-switch.is-on { background: var(--rp-switch-on); }
.pj-switch__knob {
  position: absolute; top: 2px; inset-inline-start: 2px; width: 14px; height: 14px; border-radius: 50%;
  background: var(--rp-surface); transition: inset-inline-start var(--rp-duration-fast) ease;
}
.pj-switch.is-on .pj-switch__knob { inset-inline-start: 14px; }
.pj-switch:focus-visible { outline: 2px solid var(--rp-focus); outline-offset: 2px; }
.pj-switch:disabled { opacity: 0.5; cursor: default; }

/* Listen to one answer: the headphones tool's popover (two deliberate steps),
   then a player under the answer. */
.pj-al { gap: 10px; }
.pj-al__title { margin: 0; font-size: var(--rp-text-sm); font-weight: 600; color: var(--rp-heading); }
/* Language: the report Listen page's chips, each language named in itself,
   the answer's own first and tagged. Radios, so arrows and screen readers work. */
.pj-al__field { margin: 0; padding: 0; border: 0; min-width: 0; display: grid; gap: 6px; }
.pj-al__chips { display: flex; flex-wrap: wrap; gap: 6px; }
.pj-al__chip { position: relative; cursor: pointer; }
.pj-al__chip input { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; }
.pj-al__chiptext {
  display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px; border: 1px solid var(--rp-border-control); border-radius: 999px;
  background: var(--rp-surface); color: var(--rp-text-secondary); font-size: var(--rp-text-xs); line-height: 18px;
  transition: background var(--rp-duration-fast) ease, border-color var(--rp-duration-fast) ease;
}
.pj-al__chip:hover .pj-al__chiptext { background: var(--rp-surface-sunken); }
.pj-al__chip input:checked + .pj-al__chiptext { color: var(--rp-heading); font-weight: 600; border-color: var(--rp-heading); box-shadow: inset 0 0 0 1px var(--rp-heading); }
.pj-al__chip input:focus-visible + .pj-al__chiptext { outline: 2px solid var(--rp-focus); outline-offset: 2px; }
.pj-al__tag { font-weight: 400; color: var(--rp-text-subtle); }
.pj-al__tag::before { content: "· "; }
/* The audio tile, as on the report's Listen page: a round mark, a title and
   its length, and the one action at the end. */
.pj-al__tile {
  display: flex; align-items: center; gap: 10px; width: 100%; box-sizing: border-box; padding: 8px 10px;
  border: 1px solid var(--rp-border); border-radius: var(--rp-radius-lg); background: var(--rp-surface);
}
.pj-al__mark {
  flex: none; display: grid; place-items: center; width: 32px; height: 32px; border: 1px solid var(--rp-border-strong);
  border-radius: 50%; color: var(--rp-text-subtle);
}
.pj-al__mark svg { width: 16px; height: 16px; }
.pj-al__body { flex: 1 1 auto; min-width: 0; display: grid; gap: 1px; }
.pj-al__name { font-size: var(--rp-text-sm); font-weight: 600; line-height: 20px; color: var(--rp-heading); }
.pj-al__meta { font-size: var(--rp-text-xs); line-height: 18px; color: var(--rp-text-subtle); }
.pj-al__tile .pj-btn { flex: none; }
.pj-al__spin {
  width: 14px; height: 14px; flex: none; border-radius: 50%;
  border: 2px solid var(--rp-border-strong); border-top-color: var(--rp-text); animation: pj-spin 0.8s linear infinite;
}
@media (prefers-reduced-motion: reduce) { .pj-al__spin { animation: none; } }
.pj-al__warn, .pj-al__error { margin: 0; font-size: var(--rp-text-xs); line-height: 1.5; }
.pj-al__warn { color: var(--rp-warning-text); }
.pj-al__error { color: var(--rp-danger-text); }
.pj-al__line { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; }
.pj-al__link, .pj-al__quiet, .pj-al__danger {
  display: inline-flex; align-items: center; gap: 4px; padding: 0; border: 0; background: none;
  font: inherit; font-size: var(--rp-text-xs); cursor: pointer;
}
.pj-al__link { color: var(--rp-info-text); }
.pj-al__link svg { width: 12px; height: 12px; }
.pj-al__quiet { color: var(--rp-text-secondary); }
.pj-al__danger { color: var(--rp-danger-text); }
.pj-al__link:hover, .pj-al__quiet:hover, .pj-al__danger:hover { text-decoration: underline; text-underline-offset: 0.2em; }
.pj-al__quiet:disabled, .pj-al__danger:disabled { opacity: 0.5; cursor: default; }
.pj-al__acts { display: flex; align-items: center; justify-content: flex-end; gap: 6px; width: 100%; }

/* As wide as the answer's column, like the source cards above it (user, 2026-11-23).
   A voice note (option B, 2026-11-23): a pill, a drawn waveform you scrub, the time beside it. */
.pj-al-player {
  display: flex; align-items: center; gap: 10px; margin: 2px 0 0; padding-block: 6px; padding-inline: 6px 8px;
  border: 0.5px solid var(--rp-border); border-radius: 999px; background: var(--rp-surface);
}
.pj-al-player__play {
  flex: none; display: grid; place-items: center; width: 34px; height: 34px; padding: 0; border: 0; border-radius: 50%;
  background: var(--rp-heading); color: var(--rp-surface); cursor: pointer;
  transition: transform var(--rp-duration-fast);
}
.pj-al-player__play:active { transform: scale(0.94); }
.pj-al-player__play svg { width: 14px; height: 14px; }
.pj-al-player__play:not(.is-playing) svg { fill: currentColor; margin-inline-start: 1px; }
.pj-al-player__play:focus-visible, .pj-al-player__tool:focus-visible, .pj-al-player__seek:focus-visible { outline: 2px solid var(--rp-focus); outline-offset: 2px; }
/* Time runs left to right in every language. The played bars are a copy of
   the waveform in ink, clipped to --played; the range input lies on top, unseen. */
.pj-al-player__wave { position: relative; flex: 1 1 auto; min-width: 60px; height: 26px; }
.pj-al-player__bars { position: absolute; inset: 0; display: flex; align-items: center; justify-content: space-between; gap: 2px; pointer-events: none; }
.pj-al-player__bars > span { flex: 0 1 3px; min-width: 1px; border-radius: 999px; background: var(--rp-border-strong); }
.pj-al-player__bars--played { clip-path: inset(0 calc(100% - var(--played, 0%)) 0 0); }
.pj-al-player__bars--played > span { background: var(--rp-heading); }
.pj-al-player__wave:hover .pj-al-player__bars:not(.pj-al-player__bars--played) > span { background: var(--rp-text-subtle); }
/* border/padding/radius reset: `.pj input:not(…):not(…)` (0,3,1) otherwise draws the
   input as a white box over the waveform, so this selector must outrank it. */
.pj .pj-al-player__wave input[type="range"].pj-al-player__seek { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; padding: 0; border: 0; border-radius: 0; -webkit-appearance: none; appearance: none; background: transparent; cursor: pointer; }
.pj .pj-al-player__wave input[type="range"].pj-al-player__seek:focus-visible { outline: 2px solid var(--rp-focus); outline-offset: 2px; border-radius: var(--rp-radius-sm); }
.pj-al-player__seek::-webkit-slider-runnable-track { height: 100%; background: transparent; }
.pj-al-player__seek::-moz-range-track { height: 100%; background: transparent; }
.pj-al-player__seek::-webkit-slider-thumb { -webkit-appearance: none; width: 2px; height: 100%; border: 0; border-radius: 0; background: transparent; }
.pj-al-player__seek::-moz-range-thumb { width: 2px; height: 100%; border: 0; border-radius: 0; background: transparent; }
.pj-al-player__time {
  flex: none; display: inline-flex; align-items: baseline; gap: 4px; min-width: 2.6em; justify-content: center;
  font-size: var(--rp-text-xs); line-height: 16px; color: var(--rp-text-muted); font-variant-numeric: tabular-nums; white-space: nowrap;
}
.pj-al-player__time > bdi:first-child:not(:only-child) { color: var(--rp-text); }
.pj-al-player__of { color: var(--rp-text-subtle); }
.pj-al-player__tool {
  flex: none; display: grid; place-items: center; min-width: 26px; height: 26px; padding: 0 4px; border: 0; border-radius: var(--rp-radius-sm);
  background: transparent; color: var(--rp-text-subtle); font: inherit; font-size: var(--rp-text-xs); font-weight: 600; font-variant-numeric: tabular-nums; cursor: pointer;
}
.pj-al-player__tool svg { width: 15px; height: 15px; }
/* The download menu: one line per speed, the format a quiet tag at the end. */
.pj-al-player__menu .pj-menu__item { white-space: nowrap; }
.pj-al-player__menu { min-width: max-content; }
.pj-al-player__menu .pj-menu__item > .pj-al-player__fmt { flex: none; font-size: var(--rp-text-xs); color: var(--rp-text-muted); letter-spacing: 0.02em; }
.pj-al-player__tool:hover { background: var(--rp-hover-wash); color: var(--rp-text); }
.pj-al-player__speed { min-width: 34px; height: 22px; padding: 0 7px; border: 0.5px solid var(--rp-border-strong); border-radius: 999px; }
.pj-al-player .pj-pick__wrap { position: relative; display: inline-flex; }
.pj-msg__note { margin: 0; font-size: var(--rp-text-md); line-height: 24px; color: var(--rp-text); }
.pj-msg__thinking { display: flex; align-items: center; gap: 8px; margin: 0; font-size: var(--rp-text-md); line-height: 24px; color: var(--rp-text-subtle); }

.pj-sess__dock {
  position: sticky; bottom: 0; z-index: 5;
  display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 12px 0 10px;
  background: linear-gradient(to bottom, transparent, var(--rp-surface) 28px);
}
.pj-sess__dock > .pj-composer, .pj-sess__dock > .pj-takeover, .pj-sess__skillhost { width: min(100%, calc(var(--pj-chat-w) + 32px)); }
.pj-sess__skillhost { position: relative; height: 0; }
.pj-sess__cap { margin: 0; font-size: var(--rp-text-xs); line-height: 20px; color: var(--rp-text-subtle); text-align: center; }
.pj-sess__cap--own { display: flex; align-items: center; justify-content: center; gap: 6px; max-width: min(100%, calc(var(--pj-chat-w) + 32px)); padding-inline: 12px; }
.pj-sess__cap--own svg { width: 12px; height: 12px; flex: none; }
.pj-sess__capcopy { display: flex; flex-direction: column; align-items: center; min-width: 0; text-align: center; }
.pj-sess__capmain { color: var(--rp-text); }
.pj-composer__send--label { display: inline-flex; align-items: center; width: auto; gap: 4px; padding: 0 12px 0 14px; font-size: var(--rp-text-xs); font-weight: 500; }

/* The `/` menu (dsh's): Commands, then Skills, above the composer at its
   width; each row a name on the start side and its description on the end. */
.pj-menu.pj-slash { position: absolute; bottom: 8px; inset-inline: 0; width: auto; max-height: 360px; overflow-y: auto; padding: 4px 6px; }
.pj-slash__head { padding: 8px 8px 4px; font-size: var(--rp-text-xs); color: var(--rp-text-subtle); }
.pj-slash__row {
  display: flex; align-items: center; gap: 8px; width: 100%; min-height: 34px; padding: 0 8px; box-sizing: border-box;
  border: 0; border-radius: var(--rp-radius-sm); background: transparent; color: var(--rp-heading);
  font: inherit; font-size: var(--rp-text-md); text-align: start; cursor: pointer;
}
.pj-slash__row:hover, .pj-slash__row.is-active { background: var(--rp-hover-wash); }
.pj-slash__icon { display: grid; place-items: center; flex: none; width: 16px; height: 16px; color: var(--rp-text-muted); }
.pj-slash__icon :is(svg, img) { width: 15px; height: 15px; }
.pj-slash__icon > * { max-width: 16px; max-height: 16px; }
.pj-slash__name { flex: none; max-width: 40%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pj-slash__hint { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-align: end; font-size: var(--rp-text-sm); color: var(--rp-text-subtle); }
html[dir="rtl"] .pj-slash__hint.pj-bidi { text-align: left; }
html:not([dir="rtl"]) .pj-slash__hint.pj-bidi { text-align: right; }

/* dsh's takeover panel: a decision in the composer's place (paid messages). */
.pj-takeover {
  display: flex; flex-direction: column; gap: 4px; padding: 14px 16px; box-sizing: border-box;
  border-radius: var(--rp-radius-xl); background: var(--rp-surface);
  box-shadow: 0 0 0 0.5px var(--rp-border-strong), var(--rp-shadow-md);
}
.pj-takeover__title { margin: 0; font-size: var(--rp-text-md); line-height: 22px; font-weight: 500; color: var(--rp-heading); }
.pj-takeover__body { margin: 0; font-size: var(--rp-text-sm); line-height: 20px; color: var(--rp-text-muted); }
.pj-takeover__acts { display: flex; justify-content: flex-end; gap: 8px; margin-top: 8px; }

/* Trajectory (phase 4): one row per stage, opening to its models and searches;
   the sources line at the end counts the report's sources by grade. */
.pj-traj__sum { margin: 0 0 8px; font-size: var(--rp-text-sm); color: var(--rp-text-subtle); }
.pj-traj { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; }
.pj-traj__item { border-bottom: 0.5px solid var(--rp-border-subtle); }
.pj-traj__row {
  display: flex; align-items: center; gap: 12px; width: 100%; min-height: 44px; padding: 8px 4px; box-sizing: border-box;
  border: 0; border-radius: var(--rp-radius-sm); background: transparent; color: inherit; font: inherit; text-align: start;
}
button.pj-traj__row { cursor: pointer; }
button.pj-traj__row:hover { background: var(--rp-hover-wash); }
.pj-traj__dot { flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--rp-success-indicator); }
.pj-traj__item--error .pj-traj__dot { background: var(--rp-danger-indicator); }
.pj-traj__item--running .pj-traj__dot { background: var(--rp-info-indicator); animation: pj-pulse 1.4s ease-in-out infinite; }
.pj-traj__name { flex: none; min-width: 110px; font-size: var(--rp-text-md); font-weight: 500; color: var(--rp-text); }
.pj-traj__meta { flex: 1; font-size: var(--rp-text-sm); color: var(--rp-text-subtle); }
.pj-traj__chev { flex: none; display: inline-flex; width: 16px; color: var(--rp-text-subtle); transition: transform var(--rp-duration-fast); }
.pj-traj__chev svg { width: 14px; height: 14px; }
.pj-traj__item.is-open .pj-traj__chev { transform: rotate(180deg); }
.pj-traj__detail { padding: 0 4px 14px 24px; padding-inline: 24px 4px; }
.pj-traj__label { margin: 10px 0 4px; font-size: var(--rp-text-xs); font-weight: 500; color: var(--rp-text-subtle); }
.pj-traj__models, .pj-traj__queries { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 2px; }
.pj-traj__models li { display: flex; align-items: baseline; gap: 8px; font-size: var(--rp-text-sm); line-height: 20px; color: var(--rp-text); }
.pj-traj__models bdi { font-family: var(--rp-font-mono); font-size: var(--rp-text-xs); }
.pj-traj__x { color: var(--rp-text-subtle); }
.pj-traj__queries li { font-size: var(--rp-text-sm); line-height: 20px; color: var(--rp-text-muted); overflow-wrap: anywhere; }
.pj-traj__more { margin: 4px 0 0; font-size: var(--rp-text-xs); color: var(--rp-text-subtle); }
.pj-traj__sources { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 16px; margin: 14px 0 0; padding: 0 4px; font-size: var(--rp-text-sm); color: var(--rp-text); }
.pj-traj__sources .pj-traj__label { margin: 0; }
.pj-traj__grade { display: inline-flex; align-items: center; gap: 6px; }
.pj-traj__gdot { width: 6px; height: 6px; border-radius: 50%; background: var(--rp-text-subtle); }
.pj-traj__grade--verified .pj-traj__gdot { background: var(--rp-success-indicator); }
.pj-traj__grade--media .pj-traj__gdot { background: var(--rp-info-indicator); }
.pj-traj__grade--web .pj-traj__gdot { background: var(--rp-warning-indicator); }
@media (prefers-reduced-motion: reduce) { .pj-traj__item--running .pj-traj__dot { animation: none; } .pj-traj__chev { transition: none; } }

/* The version chip's menu: one row per version, what changed under it. */
.pj-vermenu { min-width: 280px; max-height: 60dvh; overflow: auto; }
.pj-vermenu__title { margin: 2px 10px 4px; font-size: var(--rp-text-xs); font-weight: 500; color: var(--rp-text-subtle); }
.pj-vermenu__item { align-items: flex-start; padding-block: 8px; }
.pj-vermenu__n { flex: none !important; min-width: 28px; font-weight: 500; font-variant-numeric: tabular-nums; }
.pj-vermenu__copy { display: flex; flex-direction: column; gap: 1px; }
.pj-vermenu__meta { font-size: var(--rp-text-xs); line-height: 18px; color: var(--rp-text-subtle); }
.pj-vermenu__diff { font-size: var(--rp-text-sm); line-height: 20px; color: var(--rp-text); overflow-wrap: anywhere; }
.pj-vermenu__check { flex: none !important; display: inline-flex; padding-top: 2px; }
.pj-vermenu__check svg { color: var(--rp-brand-bright); }

/* ── Report mode (phase 3): the question panel, the run plan, the run ── */
/* The question card (dsh's): a category over the question, numbered options
   (title, a Recommended tag, a line on what it means), "Type your answer",
   then ‹ 1/4 › and Skip / Next. The picked option is washed; folded, only
   the head and the question show. */
.pj-qcard {
  display: flex; flex-direction: column; gap: 6px; width: min(100%, calc(var(--pj-chat-w) + 32px)); padding: 14px 10px 10px; box-sizing: border-box;
  border-radius: var(--rp-radius-xl); background: var(--rp-surface);
  box-shadow: 0 0 0 0.5px var(--rp-border-strong), var(--rp-shadow-md);
}
.pj-qcard.is-busy { padding: 14px 16px; }
.pj-qcard__head { display: flex; align-items: center; gap: 4px; min-height: 24px; padding: 0 6px 0 10px; }
.pj-qcard__cat { font-size: var(--rp-text-xs); line-height: 18px; color: var(--rp-text-subtle); }
.pj-qcard__q { margin: 0 0 6px; padding: 0 10px; font-size: var(--rp-text-base); line-height: 24px; font-weight: 500; color: var(--rp-heading); }
.pj-qcard.is-folded .pj-qcard__q { margin: 0; }
.pj-qcard__icon {
  display: grid; place-items: center; flex: none; width: 26px; height: 26px; padding: 0; border: 0; border-radius: var(--rp-radius-sm);
  background: transparent; color: var(--rp-text-muted); cursor: pointer;
}
.pj-qcard__icon svg { width: 14px; height: 14px; }
.pj-qcard__icon:hover:not(:disabled) { background: var(--rp-hover-wash); color: var(--rp-text); }
.pj-qcard__icon:disabled { opacity: 0.35; cursor: default; }
.pj-qcard__head .pj-qcard__icon:first-of-type svg { transform: rotate(90deg); }
.pj-qcard__head .pj-qcard__icon.is-folded svg { transform: rotate(-90deg); }
.pj-qcard__prev svg { transform: scaleX(-1); }
html[dir="rtl"] .pj-qcard__foot .pj-qcard__icon svg { transform: scaleX(-1); }
html[dir="rtl"] .pj-qcard__foot .pj-qcard__prev svg { transform: none; }
.pj-qcard__opts { display: flex; flex-direction: column; gap: 2px; }
.pj-qcard__opt {
  display: flex; align-items: flex-start; gap: 10px; width: 100%; min-height: 38px; padding: 8px 10px; box-sizing: border-box;
  border: 0.5px solid transparent; border-radius: var(--rp-radius-md); background: transparent;
  color: var(--rp-text); font: inherit; font-size: var(--rp-text-md); line-height: 22px; text-align: start; cursor: pointer;
}
.pj-qcard__opt:hover { background: var(--rp-hover-wash); }
.pj-qcard__opt.is-on { border-color: var(--rp-border); background: var(--rp-hover-wash); }
.pj-qcard__n {
  display: grid; place-items: center; flex: none; width: 20px; height: 20px; margin-top: 1px; border-radius: 4px;
  background: var(--rp-fill); color: var(--rp-text-muted); font-size: var(--rp-text-xs); line-height: 1;
}
.pj-qcard__n--icon svg { width: 12px; height: 12px; }
.pj-qcard__copy { min-width: 0; }
/* The card's text carries its own dir (the language it is written in), which
   may differ from the UI's, so it aligns to that rather than to the page. */
.pj-qcard .pj-bidi[dir] { text-align: start; }
.pj-qcard__title { font-weight: 500; color: var(--rp-heading); }
.pj-qcard__rec { display: inline-block; margin-inline-start: 8px; padding: 0 6px; border-radius: 4px; background: var(--rp-info-soft); color: var(--rp-info-text); font-size: var(--rp-text-xs); line-height: 18px; font-weight: 500; vertical-align: 1px; }
.pj-qcard__desc { color: var(--rp-text-muted); }
/* The picked option's line drops under its title, as dsh's. */
.pj-qcard__opt.is-on .pj-qcard__desc { display: block; }
.pj-qcard__opt--own { align-items: center; cursor: text; }
html[data-brand="desk"] .pj .pj-qcard input.pj-qcard__own, html[data-brand="desk"] .pj .pj-qcard input.pj-qcard__own:focus {
  border-radius: 0;
  flex: 1; min-width: 0; height: 22px; padding: 0; border: 0; background: transparent; box-shadow: none; outline: none;
  color: var(--rp-text); font: inherit; font-size: var(--rp-text-md);
}
.pj-qcard__opt--own:focus-within { border-color: var(--rp-focus); }
.pj-qcard__foot { display: flex; align-items: center; gap: 4px; padding: 6px 4px 0; }
.pj-qcard__count { min-width: 32px; text-align: center; font-size: var(--rp-text-sm); color: var(--rp-text-muted); }
.pj-qcard__foot .pj-btn { min-width: 64px; }
/* In the thread while the card waits. */
.pj-waiting { display: flex; align-items: center; gap: 8px; margin: 4px 0 0; padding-bottom: 10px; border-bottom: 0.5px solid var(--rp-border-subtle); font-size: var(--rp-text-md); line-height: 22px; color: var(--rp-text-muted); }
.pj-waiting svg { flex: none; width: 15px; height: 15px; }

.pj-msg__label { font-size: var(--rp-text-xs); line-height: 18px; color: var(--rp-text-subtle); padding-inline-end: 12px; }
.pj-settled { margin: 2px 0 0; max-width: 100%; font-size: var(--rp-text-xs); line-height: 18px; color: var(--rp-text-muted); }
.pj-settled__q { color: var(--rp-text-subtle); }

.pj-plan {
  width: 100%; padding: 12px 14px 12px; box-sizing: border-box;
  border-radius: var(--rp-radius-xl); background: var(--rp-surface);
  box-shadow: 0 0 0 0.5px var(--rp-border-strong), var(--rp-shadow-sm);
}
.pj-plan__head { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; font-size: var(--rp-text-md); font-weight: 500; color: var(--rp-heading); }
.pj-plan__head svg { width: 16px; height: 16px; color: var(--rp-text-muted); }
.pj-plan__row { display: flex; align-items: center; gap: 8px; min-height: 30px; border-bottom: 0.5px solid var(--rp-border-subtle); font-size: var(--rp-text-sm); }
.pj-plan__row--topic { align-items: flex-start; padding-block: 6px; }
.pj-plan__row--topic .pj-plan__label { line-height: 1.6; }
.pj-plan__row--topic .pj-plan__value { line-height: 1.6; }
.pj-plan__label { flex: none; min-width: 96px; color: var(--rp-text-subtle); }
/* Farsi's longest label («تصویرهای هوش مصنوعی», 2026-11-28) sets the column, so every value lines up. */
html[lang="fa"] .pj-plan__row:not(.pj-plan__row--part) > .pj-plan__label { min-width: 144px; }
.pj-plan__value { flex: 1; min-width: 0; color: var(--rp-text); }
.pj-plan__value b { font-weight: 600; }
.pj-plan__note { color: var(--rp-text-muted); }
.pj-plan__warn { color: var(--rp-warning-text); }
/* Question or topic (A2): a row like the others, the switch at the end (reason in the tooltip) */
.pj-plan__shape { flex: none; height: 24px; font-size: var(--rp-text-xs); }
/* Models row (B1, 2026-11-26): opens into the report's parts, each with its
   model, who pays (key and last four) and a picker for this run; struck price. */
.pj-plan__disclose svg { transform: rotate(90deg); transition: transform 160ms var(--rp-ease-out); }
.pj-plan__disclose.is-open svg { transform: rotate(-90deg); }
.pj-plan__row--part { padding-block: 4px; padding-inline-start: 12px; }
.pj-plan__row--part .pj-plan__label { min-width: 84px; }
.pj-plan__partval { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; }
.pj-plan__row--part .pj-partpick { height: 28px; max-width: 200px; font-size: var(--rp-text-xs); }
@media (max-width: 640px) {
  .pj-plan__row--part { flex-wrap: wrap; }
  .pj-plan__row--part .pj-partpick { max-width: none; width: 100%; margin-block-end: 6px; }
}
.pj-plan__payer { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.pj-plan__payer svg { flex: none; width: 14px; height: 14px; color: var(--rp-text-muted); }
.pj-plan__tail { font-family: var(--rp-font-mono); font-size: var(--rp-text-xs); color: var(--rp-text-muted); unicode-bidi: isolate; }
.pj-plan__hint { font-size: var(--rp-text-xs); color: var(--rp-text-subtle); }
/* A job changed for this run, or since the plan of a stopped run (option A, 2026-11-30). */
.pj-plan__row--part.is-hit { margin-inline: -8px; padding-inline: 20px 8px; border-radius: var(--rp-radius-sm); background: var(--rp-warning-soft); }
.pj-plan__diff { flex-basis: 100%; font-size: var(--rp-text-xs); line-height: 16px; color: var(--rp-warning-text); }
.pj-plan__diff .pj-link { margin-inline-start: 6px; font-size: inherit; }
/* A run refused because its models changed: said at the top of its plan. */
.pj-plan__stop { display: flex; flex-direction: column; gap: 2px; margin: 4px 0 8px; padding: 10px 12px; border: 0.5px solid var(--rp-warning-border); border-radius: var(--rp-radius-md); background: var(--rp-warning-soft); font-size: var(--rp-text-sm); line-height: 20px; color: var(--rp-text-secondary); }
.pj-plan__stop b { font-weight: 600; color: var(--rp-heading); }
.pj-plan__was { margin-inline-start: 6px; color: var(--rp-text-subtle); font-size: var(--rp-text-xs); }
/* Metered billing: the wallet estimate, then the balance and (when it can't run) why, each on its own line. */
.pj-plan__value .pj-plan__sub, .pj-plan__value > .pj-plan__warn { display: block; font-size: var(--rp-text-xs); line-height: 18px; }
.pj-plan__sub { color: var(--rp-text-subtle); }
.pj-plan__pen { display: grid; place-items: center; width: 26px; height: 26px; padding: 0; border: 0; border-radius: var(--rp-radius-sm); background: transparent; color: var(--rp-text-subtle); cursor: pointer; }
.pj-plan__pen svg { width: 14px; height: 14px; }
.pj-plan__pen:hover { background: var(--rp-hover-wash); color: var(--rp-text); }
.pj-plan__acts { display: flex; justify-content: flex-end; gap: 8px; margin-top: 12px; }
.pj-plan__acts .pj-btn svg { width: 14px; height: 14px; }
.pj-plan--stale { display: inline-flex; align-items: center; gap: 6px; color: var(--rp-text-subtle); font-size: var(--rp-text-sm); }
.pj-plan--stale svg { width: 14px; height: 14px; }

/* Same chrome as the plan card it answers, but the thread's full width. */
.pj-runcard {
  display: flex; flex-direction: column; gap: 12px; width: 100%; padding: 12px 14px; box-sizing: border-box;
  border-radius: var(--rp-radius-xl); background: var(--rp-surface);
  box-shadow: 0 0 0 0.5px var(--rp-border-strong), var(--rp-shadow-sm);
}
.pj-runcard__row { display: flex; align-items: center; gap: 12px; }
.pj-runcard__acts { display: flex; flex-wrap: wrap; gap: 6px; }
.pj-runcard__acts .pj-btn { height: 28px; border-radius: var(--rp-radius-lg); font-weight: 500; font-size: var(--rp-text-xs); }
.pj-runcard__acts .pj-btn svg { width: 13px; height: 13px; }
/* A failed run's refund line. */
.pj-runcard__note { margin: 0; font-size: var(--rp-text-sm); color: var(--rp-text-muted); }
.pj-runcard__ask { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; font-size: var(--rp-text-sm); color: var(--rp-text); }
.pj-runcard__askacts { display: inline-flex; gap: 6px; }
.pj-btn--danger { background: var(--rp-danger-fill); border-color: var(--rp-danger-fill); color: var(--rp-text-on-action); }
.pj-btn--danger:hover { background: var(--rp-danger-strong); border-color: var(--rp-danger-strong); }

/* A finished run's files (dsh's file cards): the report, its slides, its audio. */
/* auto-fit: the cards share the card's full width instead of leaving empty tracks. */
.pj-files { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 6px; }
.pj-file {
  display: flex; align-items: center; gap: 10px; min-width: 0; padding: 8px 10px; box-sizing: border-box;
  border: 0.5px solid var(--rp-border); border-radius: var(--rp-radius-lg); background: var(--rp-surface); color: inherit; font: inherit; text-align: start; cursor: pointer;
}
.pj-file:hover { background: var(--rp-hover-wash); }
.pj-file:focus-visible { outline: 2px solid var(--rp-focus); outline-offset: 1px; }
.pj-file__icon { display: grid; place-items: center; flex: none; width: 28px; height: 28px; border-radius: var(--rp-radius-sm); background: var(--rp-surface-sunken); color: var(--rp-danger-indicator); }
.pj-file--slides .pj-file__icon { color: var(--rp-warning-indicator); }
.pj-file--listen .pj-file__icon { color: var(--rp-info-indicator); }
.pj-file__icon svg { width: 15px; height: 15px; }
.pj-file__copy { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.pj-file__name { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: var(--rp-text-sm); line-height: 18px; font-weight: 500; color: var(--rp-heading); }
.pj-file__sub { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: var(--rp-text-xs); line-height: 16px; color: var(--rp-text-subtle); }
.pj-ws__tack { display: inline-flex; flex: none; color: var(--rp-text-subtle); }
.pj-ws__tack svg { width: 12px; height: 12px; }
.pj-runcard__icon { display: grid; place-items: center; flex: none; width: 28px; height: 28px; border-radius: 50%; background: var(--rp-surface-sunken); color: var(--rp-text-muted); }
.pj-runcard__icon svg { width: 14px; height: 14px; }
.pj-runcard--ready .pj-runcard__icon { color: var(--rp-success-text); }
.pj-runcard--failed .pj-runcard__icon, .pj-runcard--stopped .pj-runcard__icon { color: var(--rp-danger-text); }
.pj-runcard--awaiting_input .pj-runcard__icon { color: var(--rp-warning-text); }
.pj-runcard__copy { display: flex; flex: 1; flex-direction: column; min-width: 0; }
.pj-runcard__title { font-size: var(--rp-text-md); font-weight: 500; color: var(--rp-text); }
.pj-runcard__meta { font-size: var(--rp-text-xs); color: var(--rp-text-subtle); }

.pj-plan-edit { margin: 0 0 20px; }
.pj-plan-edit__h { margin: 0 0 6px; font-size: var(--rp-text-md); font-weight: 500; color: var(--rp-heading); }
.pj-plan-edit__hint { margin: 0 0 10px; font-size: var(--rp-text-sm); color: var(--rp-text-subtle); }
.pj-plan-edit__list { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 2px; }
.pj-plan-edit__src { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 36px; padding: 0 8px; border-radius: var(--rp-radius-md); }
.pj-plan-edit__src:hover { background: var(--rp-hover-wash); }
.pj-plan-edit__pick, .pj-plan-edit__subject { display: inline-flex; align-items: center; gap: 8px; min-width: 0; font-size: var(--rp-text-md); cursor: pointer; }
.pj-plan-edit__pick span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pj-plan-edit__subject { flex: none; font-size: var(--rp-text-xs); color: var(--rp-text-muted); }
.pj-plan-edit__link { display: block; margin: 0 0 8px; font-size: var(--rp-text-sm); }

/* ── Sources (phase 5): dsh's Plugins page. A 960px column; the title and a
   one-line description, Refresh and the ink "+ Add source" split button;
   sections of rows, each a 36px icon tile, a name and its kind and size. ── */
.pj-srcpage__head { align-items: flex-start; margin-bottom: 28px; }
.pj-srcpage__sub { margin: 4px 0 0; max-width: 620px; font-size: var(--rp-text-sm); line-height: 20px; color: var(--rp-text-muted); }
.pj-srcpage__tools { display: inline-flex; flex: none; align-items: center; gap: 8px; }
.pj-srcpage__tools .pj-btn { height: 32px; border-radius: var(--rp-radius-lg); font-weight: 400; font-size: var(--rp-text-sm); }
.pj-srcpage__tools .pj-btn svg { width: 14px; height: 14px; }
.pj-btn--quiet { background: transparent; border-color: var(--rp-border); color: var(--rp-text); }
.pj-btn--quiet:hover { background: var(--rp-hover-wash); border-color: var(--rp-border); }
.pj-splitbtn { display: inline-flex; }
.pj-splitbtn .pj-splitbtn__main { border-start-end-radius: 0; border-end-end-radius: 0; }
.pj-splitbtn .pj-splitbtn__more { width: 28px; padding: 0; border-start-start-radius: 0; border-end-start-radius: 0; border-inline-start-color: var(--rp-text-secondary); }

.pj-src-sec { margin: 0 0 28px; }
.pj-src-sec__title { display: flex; align-items: baseline; gap: 8px; margin: 0 0 8px; font-size: var(--rp-text-md); line-height: 22px; font-weight: 500; color: var(--rp-heading); }
.pj-src-sec__ws { min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: var(--rp-text-sm); font-weight: 400; color: var(--rp-text-subtle); }
.pj-src-sec__empty { margin: 0; padding: 12px 8px; font-size: var(--rp-text-sm); line-height: 20px; color: var(--rp-text-subtle); }
.pj-src-list { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 2px; }
.pj-src-row {
  display: flex; align-items: center; gap: 14px; width: 100%; min-height: 66px; padding: 8px; box-sizing: border-box;
  border: 0; border-radius: var(--rp-radius-lg); background: transparent; color: inherit; font: inherit; text-align: start; cursor: pointer;
}
.pj-src-row:hover { background: var(--rp-hover-wash); }
.pj-src-row:focus-visible { outline: 2px solid var(--rp-focus); outline-offset: -2px; }
.pj-src-row__tile {
  display: grid; place-items: center; flex: none; width: 36px; height: 36px; box-sizing: border-box;
  border: 0.5px solid var(--rp-tile-border); border-radius: var(--rp-radius-md); background: var(--rp-tile); color: var(--rp-tile-text);
}
.pj-src-row__tile svg { width: 18px; height: 18px; }
.pj-src-row__tile--relational { color: var(--rp-success-text); }
.pj-src-row__tile--vectordb { color: var(--rp-info-text); }
.pj-src-row__copy { display: flex; flex: 1; flex-direction: column; gap: 2px; min-width: 0; }
.pj-src-row__name { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: var(--rp-text-md); line-height: 20px; font-weight: 500; color: var(--rp-heading); }
.pj-src-row__meta { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: var(--rp-text-sm); line-height: 18px; color: var(--rp-text-subtle); }
/* A library source that says where it came from (option C, 2026-11-28): a
   kicker over the name. The name button opens it across the whole row; the
   report link and the move button sit above that. */
.pj-srcrow { position: relative; cursor: default; }
.pj-srcrow__kicker { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: var(--rp-text-xs); line-height: 16px; color: var(--rp-text-subtle); }
.pj-srcrow__link { position: relative; z-index: 1; color: var(--pj-accent); text-decoration: none; }
.pj-srcrow__link:hover { text-decoration: underline; text-underline-offset: 3px; }
.pj-srcrow__link:focus-visible { outline: 2px solid var(--rp-focus); outline-offset: 2px; border-radius: var(--rp-radius-sm); }
.pj-srcrow__open { display: flex; min-width: 0; padding: 0; border: 0; background: none; color: inherit; font: inherit; text-align: start; cursor: pointer; }
.pj-srcrow__open::after { content: ""; position: absolute; inset: 0; border-radius: var(--rp-radius-lg); }
.pj-srcrow__open:focus-visible { outline: none; }
.pj-srcrow:has(.pj-srcrow__open:focus-visible) { outline: 2px solid var(--rp-focus); outline-offset: -2px; }
.pj-srcrow__act { position: relative; z-index: 1; flex: none; }
.pj-srcrow__act .pj-btn { height: 28px; border-radius: var(--rp-radius-lg); font-weight: 400; font-size: var(--rp-text-xs); }
.pj-srcrow__act .pj-menu__item { white-space: nowrap; }
@media (max-width: 640px) {
  .pj-srcpage__head { flex-direction: column; gap: 12px; }
}

/* ── Skills and Contexts pages (user, 2026-11-08): Sources' list rows. A skill
   row carries an "In chat" switch; a context row its edit and delete. ── */
.pj-skrow, .pj-ctxrow { cursor: default; }
.pj-skpage__bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.pj-skpage__bar .pj-skpage__count { margin-bottom: 0; }
.pj-skpage__count { margin-bottom: 8px; font-size: var(--rp-text-sm); font-weight: 400; color: var(--rp-text-subtle); }
.pj-skrow__star {
  display: inline-grid; place-items: center; flex: none; width: 28px; height: 28px;
  border: 0; background: transparent; color: var(--rp-text-subtle); cursor: pointer;
  opacity: 0; transition: opacity var(--rp-duration-fast);
}
.pj-skrow:hover .pj-skrow__star,
.pj-skrow:focus-within .pj-skrow__star,
.pj-skrow__star.is-on { opacity: 1; }
.pj-skrow__star svg { width: 16px; height: 16px; }
.pj-skrow__star:hover { color: var(--rp-favorite); }
.pj-skrow__star.is-on,
.pj-skrow__star.is-on:hover { color: var(--rp-favorite); }
.pj-skrow__star.is-on svg { fill: currentColor; }
.pj-skrow__star:focus-visible { outline: 2px solid var(--rp-focus); outline-offset: 2px; }
.pj-skrow__switch { display: inline-flex; flex: none; align-items: center; gap: 10px; cursor: pointer; }
.pj-skrow__label { font-size: var(--rp-text-sm); color: var(--rp-text-muted); }
/* Skills page filters: All, Favorite, Your, Built-in and Community wear the
   info blue; the category pills stay neutral. */
.pj-skcats { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 16px; }
.pj-skcats__chip {
  height: 28px; padding: 0 12px; border: 1px solid var(--rp-border); border-radius: 999px;
  background: var(--rp-chip); color: var(--rp-text-muted); font: inherit; font-size: var(--rp-text-sm); cursor: pointer;
}
.pj-skcats__chip:hover { border-color: var(--rp-border-strong); color: var(--rp-text); }
.pj-skcats__chip.is-on { border-color: var(--rp-info-text); background: var(--rp-info-text); color: var(--rp-text-on-action); }
.pj-skcats__chip--source {
  border-color: color-mix(in srgb, var(--rp-info-indicator) 45%, var(--rp-border));
  background: color-mix(in srgb, var(--rp-info-indicator) 8%, var(--rp-surface));
  color: var(--rp-info-text);
}
.pj-skcats__chip--source:hover { border-color: var(--rp-info-indicator); color: var(--rp-info-text); }
.pj-skcats__chip--source.is-on,
.pj-skcats__chip--source.is-on:hover {
  border-color: var(--rp-info-text); background: var(--rp-info-text); color: var(--rp-text-on-action);
}
.pj-skcats__chip:focus-visible { outline: 2px solid var(--rp-focus); outline-offset: 2px; }
.pj-skgroup { margin-top: 20px; }
.pj-skgroup__title { display: flex; align-items: baseline; gap: 8px; margin: 0 0 4px; font-size: var(--rp-text-sm); font-weight: 500; color: var(--rp-text-secondary); }
.pj-skgroup__hint { font-weight: 400; color: var(--rp-text-subtle); }
.pj-ctxrow__acts { display: inline-flex; flex: none; gap: 4px; opacity: 0; transition: opacity var(--rp-duration-fast); }
.pj-ctxrow:hover .pj-ctxrow__acts, .pj-ctxrow:focus-within .pj-ctxrow__acts,
.pj-skrow:hover .pj-ctxrow__acts, .pj-skrow:focus-within .pj-ctxrow__acts { opacity: 1; }
@media (hover: none) { .pj-ctxrow__acts, .pj-skrow__star { opacity: 1; } }
/* Skills library (user, 2026-11-25): where publishing an own skill stands, as
   a quiet outlined pill (no green on Desk); a library skill reads in place. */
.pj-skpill {
  display: inline-flex; flex: none; align-items: center; padding: 1px 8px;
  border: 0.5px solid var(--rp-border-strong); border-radius: 999px;
  color: var(--rp-text-subtle); font-size: var(--rp-text-2xs); font-weight: 500; line-height: 17px; white-space: nowrap;
}
.pj-skpill--review { border-color: var(--rp-warning-border); color: var(--rp-warning-text); }
.pj-skpill--rejected { border-color: var(--rp-danger-border); color: var(--rp-danger-text); }
.pj-skrow__why { color: var(--rp-danger-text); }
.pj-sklib__sub { margin: -2px 0 8px; }
.pj-sklib {
  display: flex; flex-direction: column; gap: 12px; margin: 0 0 8px; padding: 12px 16px;
  border: 1px solid var(--rp-border); border-radius: var(--rp-radius-md); background: var(--rp-surface-muted);
}
.pj-sklib__part { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.pj-sklib__label { margin: 0; font-size: var(--rp-text-xs); font-weight: 500; color: var(--rp-text-subtle); }
.pj-sklib__text { margin: 0; white-space: pre-wrap; font-size: var(--rp-text-sm); line-height: 20px; color: var(--rp-text); }
.pj-sklib__list { margin: 0; padding-inline-start: 20px; font-size: var(--rp-text-sm); line-height: 20px; color: var(--rp-text); }
/* fa counts its questions in Persian digits, like every other number on the page. */
html[lang="fa"] ol.pj-sklib__list { list-style-type: persian; }
.pj-sklib__ctxs { padding-inline-start: 0; list-style: none; display: flex; flex-direction: column; gap: 6px; }
.pj-sklib__ctxname { display: block; font-weight: 500; color: var(--rp-heading); }
.pj-sklib__none { margin: 0; font-size: var(--rp-text-sm); color: var(--rp-text-subtle); }
/* Contexts page: rows and copy run the full column (user, 2026-11-10). A
   row's actions take no room until hover, then join the row so the copy
   ellipsises before them (floating them over the copy hid the text). */
.pj-ctxpage .pj-srcpage__sub { max-width: none; }
.pj-ctxpage .pj-srcpage__head > div { flex: 1; min-width: 0; }
@media (hover: hover) {
  .pj-ctxpage .pj-ctxrow__acts { display: none; }
  .pj-ctxpage .pj-ctxrow:hover .pj-ctxrow__acts,
  .pj-ctxpage .pj-ctxrow:focus-within .pj-ctxrow__acts { display: inline-flex; }
}
/* Automation tasks (user, 2026-12-03, option A): a ledger. Report, when, next
   and what is left are columns; the name links to the session; the switch
   pauses; an ended task reads quieter. On a narrow screen When and Left fold
   away and Next stays. */
.pj-autocols, .pj-autorow {
  display: grid; align-items: center; gap: 12px;
  grid-template-columns: 36px minmax(140px, 1.35fr) minmax(92px, 0.65fr) minmax(84px, 0.6fr) minmax(148px, 1fr) 28px auto;
}
.pj-autocols {
  margin: 0 0 2px; padding: 0 8px;
  font-size: var(--rp-text-xs); line-height: 16px; color: var(--rp-text-subtle);
}
.pj-autorow__who { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.pj-autorow__who .pj-src-row__name { display: block; }
.pj-autorow__open { display: block; min-width: 0; color: inherit; text-decoration: none; }
.pj-autorow__open:hover .pj-src-row__name { text-decoration: underline; text-underline-offset: 3px; }
.pj-autorow__open:focus-visible { outline: 2px solid var(--rp-focus); outline-offset: 2px; border-radius: var(--rp-radius-sm); }
.pj-autorow__when, .pj-autorow__next, .pj-autorow__left {
  display: flex; flex-direction: column; gap: 1px; min-width: 0;
  font-size: var(--rp-text-sm); line-height: 18px; color: var(--rp-text);
}
.pj-autorow__time, .pj-autorow__next b { font-variant-numeric: tabular-nums; }
.pj-autorow__when .pj-autorow__time { color: var(--rp-text-subtle); }
.pj-autorow__left .pj-src-row__meta { white-space: normal; }
.pj-autorow__next b { font-size: var(--rp-text-md); line-height: 20px; font-weight: 500; color: var(--rp-heading); }
.pj-autorow__next b.is-muted, .pj-autorow.is-ended .pj-autorow__next b { font-weight: 400; color: var(--rp-text-muted); }
.pj-autorow.is-ended .pj-src-row__name { color: var(--rp-text-muted); }
.pj-autorow.is-ended .pj-src-row__tile { color: var(--rp-text-subtle); }
.pj-autorow .pj-ctxrow__acts { justify-content: center; opacity: 1; }
/* Why a task couldn't run (it paused itself, or its last slot failed). */
.pj-src-row__meta.pj-autorow__error { color: var(--rp-warning-text); white-space: normal; }
@media (max-width: 860px) {
  .pj-autocols { display: none; }
  .pj-autorow { grid-template-columns: 36px minmax(0, 1fr) minmax(72px, auto) 28px auto; }
  .pj-autorow__when, .pj-autorow__left { display: none; }
}
.pj-ctxform {
  display: flex; flex-direction: column; gap: 12px; margin: 0 0 16px; padding: 16px;
  border: 1px solid var(--rp-border); border-radius: var(--rp-radius-lg); background: var(--rp-surface);
}
.pj-ctxform__field { display: flex; flex-direction: column; gap: 6px; font-weight: 400; } /* a <label>: its boxes inherit this, not the global label weight; the label text sets its own */
.pj-ctxform__label { font-size: var(--rp-text-sm); font-weight: 500; color: var(--rp-heading); }
.pj-ctxform input, .pj-ctxform textarea {
  width: 100%; box-sizing: border-box; padding: 8px 10px; border: 1px solid var(--rp-border-control, var(--rp-border));
  border-radius: var(--rp-radius-md); background: var(--rp-surface); color: var(--rp-heading); font: inherit; font-size: var(--rp-text-md); line-height: 22px;
}
.pj-ctxform textarea { resize: vertical; min-height: 120px; }
.pj-ctxform input:focus-visible, .pj-ctxform textarea:focus-visible { outline: 2px solid var(--rp-focus); outline-offset: 1px; }
.pj-ctxform__foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
/* Same rhythm as the Skills page (user, 2026-11-12): 28px between sections,
   20px between skill groups, 8px title to chips, 4px group title to rows. */
.pj-ctxpage__exsub { margin: 0 0 8px; }
.pj-ctxpage__skill { display: flex; align-items: center; gap: 8px; margin: 20px 0 4px; font-size: var(--rp-text-sm); line-height: 20px; font-weight: 500; color: var(--rp-text-secondary); }
.pj-ctxpage__skillicon { display: inline-grid; place-items: center; color: var(--rp-text-subtle); }
.pj-ctxpage__skillicon svg { width: 16px; height: 16px; }
.pj-ctxform__count { font-size: var(--rp-text-sm); color: var(--rp-text-subtle); font-variant-numeric: tabular-nums; }

/* ── The skill page and a session's Questions page (user, 2026-11-09): one
   page for creating and editing a skill, with Studio's question designer
   (skill-designer.js) under its fields; the same designer edits a session's
   list. A 960px column like Sources; flat sections, hairline cards. ── */
.pj-skb { max-width: 960px; }
.pj-skb__head { margin-bottom: 20px; }
.pj-skb__head .pj-srcpage__tools { flex-wrap: wrap; justify-content: flex-end; }
.pj-skb__about { display: flex; flex-direction: column; gap: 14px; margin: 0 0 28px; }
.pj-skb__pair { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); gap: 14px; }
.pj-skb__field input, .pj-skb__field textarea {
  width: 100%; box-sizing: border-box; padding: 8px 10px; border: 1px solid var(--rp-border-control, var(--rp-border));
  border-radius: var(--rp-radius-md); background: var(--rp-surface); color: var(--rp-heading); font: inherit; font-size: var(--rp-text-md); line-height: 22px;
}
.pj-skb__field textarea { resize: vertical; min-height: 64px; }
.pj-skb__field--instructions textarea { min-height: 120px; }
.pj-skb__field input:focus-visible, .pj-skb__field textarea:focus-visible { outline: 2px solid var(--rp-focus); outline-offset: 1px; }
.pj-skb__field > .pj-ctxform__count { align-self: flex-end; }
.pj-skb__note { margin: 12px 0 0; }
/* The form: three numbered steps, one after another (user, 2026-11-09: "simple to follow"). */
.pj-skb__steps { gap: 28px; }
.pj-skb__step { display: flex; flex-direction: column; gap: 12px; }
.pj-skb__steph { display: flex; align-items: center; gap: 10px; margin: 0; font-size: var(--rp-text-md); line-height: 22px; font-weight: 500; color: var(--rp-heading); }
.pj-skb__stepn {
  display: inline-grid; place-items: center; flex: none; width: 24px; height: 24px; border: 1px solid var(--rp-border-strong);
  border-radius: 50%; font-size: var(--rp-text-xs); color: var(--rp-text-secondary); font-variant-numeric: tabular-nums;
}
.pj-skb__steps .pj-skb__step > .pj-skb__pair, .pj-skb__steps .pj-skb__step > .pj-skb__field { margin-inline-start: 34px; }
.pj-skb__opt { font-weight: 400; color: var(--rp-text-subtle); }
/* After an import (option B, 2026-11-10): what the file lost, above the form; shortened fields tagged. */
.pj-skb__from { font-weight: 400; font-size: var(--rp-text-xs); color: var(--rp-warning-text); }
.pj-skb__import {
  margin: 0 0 24px; padding: 10px 14px; border: 1px solid var(--rp-warning-border); border-radius: var(--rp-radius-md);
  background: var(--rp-warning-soft); color: var(--rp-warning-text); font-size: var(--rp-text-sm); line-height: 20px;
}
.pj-skb__import-more > summary { cursor: pointer; list-style: none; }
.pj-skb__import-more > summary::-webkit-details-marker { display: none; }
.pj-skb__import-show { text-decoration: underline; text-underline-offset: 2px; }
.pj-skb__import-more[open] .pj-skb__import-show { display: none; }
.pj-skb__import-more ul { margin: 8px 0 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 8px; }
.pj-skb__import-more li { display: flex; flex-direction: column; gap: 2px; color: var(--rp-heading); }
.pj-skb__import-why { color: var(--rp-text-secondary); }
.pj-skb__import-short { margin: 0; }
.pj-skb__import-more + .pj-skb__import-short { margin-top: 8px; }
/* Step 4: the skill's example contexts, one bordered row each (option A, 2026-11-11). */
.pj-skb__steps .pj-skb__step > .pj-skb__note, .pj-skb__ctxs, .pj-skb__ctxadd { margin-inline-start: 34px; }
.pj-skb__steps .pj-skb__step > .pj-skb__note { margin-top: 0; }
.pj-skb__ctxs { display: flex; flex-direction: column; gap: 10px; }
.pj-skb__ctxs:empty { display: none; }
.pj-skb__ctx {
  display: flex; align-items: flex-start; gap: 8px; padding: 12px 12px 12px 14px;
  border: 1px solid var(--rp-border); border-radius: var(--rp-radius-md);
}
.pj-skb__ctxfields { flex: 1; min-width: 0; display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 5fr); gap: 12px; }
.pj-skb__ctxdel { flex: none; margin-top: 22px; }
.pj-skb__ctxadd { align-self: flex-start; }
.pj-skb__field > .pj-ctxform__count.is-over { color: var(--rp-danger-text); }
.pj-skb__field textarea[aria-invalid] { border-color: var(--rp-danger-text); }
/* Studio in the same three steps (user, 2026-11-22): the form holds steps 1–2, the designer is step 3. */
.pj-skb__steps--studio > form { display: flex; flex-direction: column; gap: 28px; }
.pj-skb__steps .pj-skb__step > .pj-skb__qd { margin-inline-start: 34px; }
@media (max-width: 640px) {
  .pj-skb__steps .pj-skb__step > .pj-skb__qd { margin-inline-start: 0; }
  .pj-skb__steps .pj-skb__step > .pj-skb__pair, .pj-skb__steps .pj-skb__step > .pj-skb__field { margin-inline-start: 0; }
  .pj-skb__steps .pj-skb__step > .pj-skb__note, .pj-skb__ctxs, .pj-skb__ctxadd { margin-inline-start: 0; }
  .pj-skb__ctxfields { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 640px) {
  .pj-skb__pair { grid-template-columns: minmax(0, 1fr); }
}

/* Studio, step by step (option 1, 2026-12-02): a track of four stops, one
   plain question, the step's panel, and a bar with Back · count · Next. */
.pj-skb--studio { max-width: 760px; }
.pj-skw__track { display: flex; margin: 4px 0 28px; padding: 0; list-style: none; }
.pj-skw__stop { display: flex; flex: 1; align-items: center; min-width: 0; }
.pj-skw__stop:last-child { flex: none; }
.pj-skw__stop:not(:last-child)::after { content: ""; flex: 1; height: 1px; margin-inline: 10px; background: var(--rp-border-strong); }
.pj-skw__stop.is-done:not(:last-child)::after { background: var(--rp-success-border); }
.pj-skw__stop > button {
  display: inline-flex; align-items: center; gap: 8px; padding: 4px 6px; margin: -4px -6px; border: 0; border-radius: var(--rp-radius-md);
  background: none; color: var(--rp-text-muted); font: inherit; font-size: var(--rp-text-sm); white-space: nowrap; cursor: pointer;
}
.pj-skw__stop > button:hover { background: var(--rp-hover-wash); color: var(--rp-text); }
.pj-skw__stop > button:focus-visible { outline: 2px solid var(--rp-focus); outline-offset: 1px; }
.pj-skw__dot {
  display: inline-grid; place-items: center; flex: none; width: 24px; height: 24px; border: 1px solid var(--rp-border-strong); border-radius: 50%;
  background: var(--rp-surface); font-size: var(--rp-text-xs); font-variant-numeric: tabular-nums; color: var(--rp-text-secondary);
}
.pj-skw__dot svg { width: 12px; height: 12px; }
.pj-skw__stop.is-done .pj-skw__dot { border-color: var(--rp-success-border); background: var(--rp-success-soft); color: var(--rp-success-text); }
.pj-skw__stop.is-now > button { color: var(--rp-heading); font-weight: 600; }
.pj-skw__stop.is-now .pj-skw__dot { border-color: transparent; background: var(--rp-action); color: var(--rp-text-on-action); }

.pj-skw__intro { margin: 0 0 18px; }
.pj-skw__kicker { margin: 0 0 4px; font-size: var(--rp-text-xs); font-weight: 600; color: var(--rp-text-subtle); }
.pj-skw__ask { margin: 0; font-size: var(--rp-text-xl); line-height: 1.35; font-weight: 700; color: var(--rp-heading); }
.pj-skw__ask:focus { outline: none; }
.pj-skw__help { margin: 6px 0 0; max-width: 62ch; font-size: var(--rp-text-sm); line-height: 22px; color: var(--rp-text-muted); }

/* One panel per step; the designer's panel serves steps 2 (its scope) and 3 (its list, AI under it). */
.pj-skw__panel { display: none; }
.pj-skw[data-skw-step="1"] .pj-skw__panel--goal { display: flex; flex-direction: column; gap: 16px; }
.pj-skw[data-skw-step="2"] .pj-skw__panel--design,
.pj-skw[data-skw-step="3"] .pj-skw__panel--design,
.pj-skw[data-skw-step="4"] .pj-skw__panel--review { display: block; }
.pj-skw[data-skw-step="2"] .pj-qd__grid,
.pj-skw[data-skw-step="3"] .pj-qd__scope { display: none; }
.pj-skw .pj-qd__scope > .pj-qd__h, .pj-skw .pj-qd__scope > .pj-qd__hint { display: none; }
.pj-skw .pj-qd__scope .pj-qd__chips { margin-top: 0; }
.pj-skw .pj-qd--ai .pj-qd__grid { grid-template-columns: minmax(0, 1fr); }

.pj-skw__review { margin: 0; border: 1px solid var(--rp-border); border-radius: var(--rp-radius-lg); background: var(--rp-surface); }
.pj-skw__row { display: grid; grid-template-columns: 140px minmax(0, 1fr) auto; gap: 6px 16px; align-items: baseline; padding: 14px 16px; }
.pj-skw__row + .pj-skw__row { border-top: 1px solid var(--rp-border-subtle); }
.pj-skw__row > dt { font-size: var(--rp-text-sm); font-weight: 600; color: var(--rp-text-secondary); }
.pj-skw__row > dd { margin: 0; }
.pj-skw__row > dd:not(.pj-skw__act) { display: flex; flex-direction: column; gap: 2px; min-width: 0; color: var(--rp-heading); }
.pj-skw__edit { font-size: var(--rp-text-sm); }
.pj-skw__sub, .pj-skw__none { color: var(--rp-text-muted); font-size: var(--rp-text-sm); }
.pj-skw__goal { white-space: pre-line; }
.pj-skw__chips { display: flex; flex-wrap: wrap; gap: 6px; }
.pj-skw__chip { padding: 2px 10px; border-radius: var(--rp-radius-pill); background: var(--rp-chip-on); font-size: var(--rp-text-sm); }
.pj-skw__chip b { font-weight: 600; }
.pj-skw__qs { margin: 0; padding-inline-start: 20px; display: flex; flex-direction: column; gap: 4px; }
html[lang="fa"] .pj-skw__qs { list-style: persian; }

.pj-skw__bar {
  position: sticky; bottom: 0; z-index: 2; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px;
  margin-top: 28px; padding: 12px 0; border-top: 1px solid var(--rp-border); background: var(--rp-surface);
}
.pj-skw__bar > :first-child { justify-self: start; }
.pj-skw__bar > :last-child { justify-self: end; }
.pj-skw__count { font-size: var(--rp-text-sm); color: var(--rp-text-subtle); font-variant-numeric: tabular-nums; }
html[dir="rtl"] .pj-skw__back > svg { transform: scaleX(-1); }
@media (max-width: 640px) {
  .pj-skw__stop > button > span:last-child { display: none; }
  .pj-skw__stop.is-now > button > span:last-child { display: inline; }
  .pj-skw__row { grid-template-columns: minmax(0, 1fr) auto; }
  .pj-skw__row > dd:not(.pj-skw__act) { grid-column: 1 / -1; grid-row: 2; }
  .pj-skw__count { display: none; }
}

/* The question designer: scope chips, then the list and (admins) the AI's
   suggestions side by side; stacked under 900px. */
.pj-qd { display: flex; flex-direction: column; gap: 24px; }
.pj-qd__grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 24px; align-items: start; }
.pj-qd--ai .pj-qd__grid { grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); }
@media (max-width: 900px) {
  .pj-qd--ai .pj-qd__grid { grid-template-columns: minmax(0, 1fr); }
}
.pj-qd__sec { min-width: 0; }
.pj-qd__h { display: flex; align-items: baseline; gap: 8px; margin: 0; font-size: var(--rp-text-md); line-height: 22px; font-weight: 500; color: var(--rp-heading); }
.pj-qd__count { font-size: var(--rp-text-sm); font-weight: 400; color: var(--rp-text-subtle); font-variant-numeric: tabular-nums; }
.pj-qd__hint { margin: 4px 0 0; font-size: var(--rp-text-sm); line-height: 20px; color: var(--rp-text-muted); }
.pj-qd__note { margin: 0 0 8px; font-size: var(--rp-text-sm); line-height: 20px; color: var(--rp-warning-text); }
.pj-qd__head { display: flex; align-items: center; gap: 10px; min-height: 32px; margin: 0 0 8px; }
.pj-qd__head .pj-qd__h { flex: 1; min-width: 0; }

/* Scope chips: set ones solid, emptied ones dashed, the AI's missing ones amber dashed. */
.pj-qd__chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.pj-qd-chip {
  display: inline-flex; align-items: center; min-height: 30px; box-sizing: border-box; border: 1px solid var(--rp-border);
  border-radius: var(--rp-radius-pill); background: var(--rp-surface); color: var(--rp-text); font: inherit; font-size: var(--rp-text-sm); line-height: 18px;
}
button.pj-qd-chip { gap: 4px; padding: 4px 12px 4px 10px; cursor: pointer; }
button.pj-qd-chip:hover, .pj-qd-chip__val:hover, .pj-qd-chip__x:hover { background: var(--rp-hover-wash); }
.pj-qd-chip svg { width: 14px; height: 14px; flex: none; }
.pj-qd-chip__val { display: inline-flex; align-items: center; gap: 6px; padding: 4px 4px 4px 12px; border: 0; border-radius: var(--rp-radius-pill); background: transparent; color: inherit; font: inherit; cursor: pointer; }
.pj-qd-chip__val b { font-weight: 500; color: var(--rp-heading); }
.pj-qd-chip__x { display: inline-grid; place-items: center; width: 26px; height: 26px; margin-inline-end: 2px; padding: 0; border: 0; border-radius: 50%; background: transparent; color: var(--rp-text-subtle); cursor: pointer; }
.pj-qd-chip--empty, .pj-qd-chip--add { border-style: dashed; color: var(--rp-text-muted); }
.pj-qd-chip--missing { border-style: dashed; border-color: var(--rp-warning-border); background: var(--rp-warning-soft); color: var(--rp-warning-text); }
.pj-qd-chip.is-on { border-color: var(--rp-heading); }
.pj-qd-chip:focus-visible, .pj-qd-chip__val:focus-visible, .pj-qd-chip__x:focus-visible { outline: 2px solid var(--rp-focus); outline-offset: 1px; }
.pj-qd-pick {
  display: flex; flex-direction: column; gap: 10px; max-width: 560px; margin-top: 10px; padding: 12px;
  border: 1px solid var(--rp-border); border-radius: var(--rp-radius-lg); background: var(--rp-surface);
}
.pj-qd-pick__head { display: flex; align-items: baseline; gap: 8px; margin: 0; font-size: var(--rp-text-sm); color: var(--rp-text-muted); }
.pj-qd-pick__head b { font-weight: 500; color: var(--rp-heading); }
.pj-qd-pick__opts { display: flex; flex-wrap: wrap; gap: 6px; }
.pj-qd-opt {
  display: inline-flex; align-items: center; gap: 4px; min-height: 28px; padding: 3px 10px; border: 1px solid var(--rp-border);
  border-radius: var(--rp-radius-pill); background: transparent; color: var(--rp-text); font: inherit; font-size: var(--rp-text-sm); cursor: pointer;
}
.pj-qd-opt svg { width: 13px; height: 13px; }
.pj-qd-opt.is-picked { border-color: var(--rp-heading); background: var(--rp-surface-muted); color: var(--rp-heading); }
.pj-qd-pick__row { display: flex; gap: 8px; }
.pj-qd-pick__row input {
  flex: 1; min-width: 0; padding: 6px 10px; border: 1px solid var(--rp-border-control, var(--rp-border)); border-radius: var(--rp-radius-md);
  background: var(--rp-surface); color: var(--rp-heading); font: inherit; font-size: var(--rp-text-sm); line-height: 20px;
}
.pj-qd-pick__row input:focus-visible { outline: 2px solid var(--rp-focus); outline-offset: 1px; }
.pj-qd-pick__acts { display: flex; justify-content: flex-end; gap: 8px; }

/* The list: numbered rows grouped by coverage area. */
.pj-qd__cov { display: inline-flex; align-items: center; gap: 6px; font-size: var(--rp-text-xs); color: var(--rp-text-secondary); }
.pj-qd-ring { width: 18px; height: 18px; transform: rotate(-90deg); }
.pj-qd-ring__track { fill: none; stroke: var(--rp-border); stroke-width: 3; }
.pj-qd-ring__fill { fill: none; stroke: var(--rp-warning-indicator); stroke-width: 3; stroke-linecap: round; transition: stroke-dashoffset 600ms var(--rp-ease-out); }
.pj-qd__cov.is-full .pj-qd-ring__fill { stroke: var(--rp-success-indicator); }
.pj-qd__qs, .pj-qd__gaps { margin: 0; padding: 0; list-style: none; }
.pj-qd__qs { border: 1px solid var(--rp-border-subtle); border-radius: var(--rp-radius-lg); background: var(--rp-surface); }
.pj-qd__empty { padding: 16px; font-size: var(--rp-text-sm); line-height: 20px; color: var(--rp-text-subtle); }
.pj-qd-group { display: flex; align-items: center; gap: 8px; padding: 10px 12px 2px; }
.pj-qd-group:not(:first-child) { border-top: 1px solid var(--rp-border-subtle); }
.pj-qd-group__name {
  padding: 0; border: 0; background: none; font: inherit; font-size: var(--rp-text-xs); font-weight: 500; letter-spacing: 0.02em;
  color: var(--rp-text-muted); text-align: start; cursor: pointer;
}
.pj-qd-group__name:disabled { cursor: default; }
.pj-qd-group__name:not(:disabled):hover, .pj-qd-group.is-on .pj-qd-group__name { color: var(--rp-heading); }
.pj-qd-group__ideas, .pj-qd-gap__ideas { font-size: var(--rp-text-xs); color: var(--rp-info-text); }
.pj-qd-q { display: flex; align-items: flex-start; gap: 10px; padding: 6px 8px 6px 12px; }
.pj-qd-q__n { flex: none; min-width: 20px; padding-top: 7px; font-size: var(--rp-text-xs); color: var(--rp-text-subtle); font-variant-numeric: tabular-nums; text-align: end; }
.pj-qd-q__text {
  flex: 1; min-width: 0; padding: 6px 8px; border: 0; border-radius: var(--rp-radius-md); background: transparent;
  color: var(--rp-heading); font: inherit; font-size: var(--rp-text-md); line-height: 22px; text-align: start; cursor: text;
}
.pj-qd-q__text:hover { background: var(--rp-hover-wash); }
.pj-qd-q__text:focus-visible { outline: 2px solid var(--rp-focus); outline-offset: -2px; }
.pj-qd-q__tools { display: inline-flex; flex: none; gap: 2px; padding-top: 2px; opacity: 0; transition: opacity var(--rp-duration-fast); }
.pj-qd-q:hover .pj-qd-q__tools, .pj-qd-q:focus-within .pj-qd-q__tools { opacity: 1; }
@media (hover: none) { .pj-qd-q__tools { opacity: 1; } }
.pj-qd-q__tools .pj-icon-btn { width: 28px; height: 28px; }
.pj-qd-q.is-new .pj-qd-q__text { background: var(--rp-info-soft); transition: background var(--rp-duration-base); }
.pj-qd-q__form { display: flex; flex: 1; flex-direction: column; gap: 8px; min-width: 0; }
.pj-qd-q__form textarea, .pj-qd-add textarea {
  width: 100%; box-sizing: border-box; padding: 6px 10px; border: 1px solid var(--rp-border-control, var(--rp-border)); border-radius: var(--rp-radius-md);
  background: var(--rp-surface); color: var(--rp-heading); font: inherit; font-size: var(--rp-text-md); line-height: 22px; resize: vertical;
}
.pj-qd-q__form textarea:focus-visible, .pj-qd-add textarea:focus-visible { outline: 2px solid var(--rp-focus); outline-offset: 1px; }
.pj-qd-q__acts { display: flex; justify-content: flex-end; gap: 8px; }
.pj-qd__undo { display: flex; align-items: center; gap: 8px; margin: 8px 0 0; font-size: var(--rp-text-sm); color: var(--rp-text-muted); }
.pj-qd-add { display: flex; align-items: flex-end; gap: 8px; margin-top: 10px; }
.pj-qd-add textarea { flex: 1; min-height: 38px; resize: none; }
.pj-qd-add textarea:disabled { background: var(--rp-surface-muted); color: var(--rp-text-subtle); }
.pj-qd-add__btn { flex: none; width: 38px; height: 38px; border: 1px solid var(--rp-border); border-radius: var(--rp-radius-md); }
.pj-qd__tools { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 10px; }
.pj-qd__tools .pj-btn svg { width: 14px; height: 14px; }
.pj-qd__clear { display: inline-flex; align-items: center; gap: 8px; margin-inline-start: auto; }
.pj-qd__ask { font-size: var(--rp-text-sm); color: var(--rp-text-muted); }
.pj-qd__danger { font-size: var(--rp-text-sm); color: var(--rp-danger-text); }
.pj-qd__gaps { display: flex; flex-direction: column; gap: 6px; margin-top: 20px; }
.pj-qd__gapstitle { font-size: var(--rp-text-xs); font-weight: 500; letter-spacing: 0.02em; color: var(--rp-text-muted); }
.pj-qd-gap {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; width: 100%; padding: 10px 12px; box-sizing: border-box;
  border: 1px dashed var(--rp-border-strong); border-radius: var(--rp-radius-lg); background: transparent; color: inherit; font: inherit; text-align: start; cursor: pointer;
}
.pj-qd-gap:disabled { cursor: default; }
.pj-qd-gap:not(:disabled):hover, .pj-qd-gap.is-on { border-color: var(--rp-heading); }
.pj-qd-gap__area { font-size: var(--rp-text-sm); font-weight: 500; color: var(--rp-heading); }
.pj-qd-gap__note { font-size: var(--rp-text-xs); color: var(--rp-text-subtle); }
.pj-qd-gap.is-partly { border-style: solid; border-color: var(--rp-border-subtle); }

/* The AI's suggestions (admins). */
.pj-qd__ai { padding: 12px; border-radius: var(--rp-radius-lg); background: var(--rp-surface-sunken); }
.pj-qd__status { font-size: var(--rp-text-xs); color: var(--rp-text-subtle); white-space: nowrap; }
.pj-qd__status.is-busy { color: var(--rp-info-text); }
.pj-qd__status.is-stale { color: var(--rp-warning-text); }
.pj-qd__status.is-error { color: var(--rp-danger-text); }
.pj-qd__ai .pj-icon-btn { width: 28px; height: 28px; }
.pj-qd-filter { gap: 6px; margin: 0 0 8px; padding: 3px 8px 3px 12px; }
.pj-qd__sugs { display: flex; flex-direction: column; gap: 8px; }
.pj-qd__ask-ai { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; }
.pj-qd__ask-ai .pj-qd__hint { margin: 0; }
.pj-qd__ask-ai .pj-btn svg { width: 14px; height: 14px; }
.pj-qd-sug {
  display: grid; grid-template-columns: minmax(0, 1fr); gap: 4px; padding: 10px 12px; border: 1px solid var(--rp-border-subtle);
  border-radius: var(--rp-radius-lg); background: var(--rp-surface);
}
.pj-qd-sug__area { font-size: var(--rp-text-xs); color: var(--rp-text-muted); }
.pj-qd-sug__area.is-gap { color: var(--rp-warning-text); }
.pj-qd-sug__q { margin: 0; font-size: var(--rp-text-md); line-height: 22px; color: var(--rp-heading); }
.pj-qd-sug__why { margin: 0; font-size: var(--rp-text-sm); line-height: 20px; color: var(--rp-text-muted); }
.pj-qd-sug__acts { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 4px; }
.pj-qd-sug__acts .pj-btn svg { width: 14px; height: 14px; }
.pj-qd .pj-btn--sm { height: 30px; border-radius: var(--rp-radius-lg); font-weight: 400; font-size: var(--rp-text-sm); }

/* ── Settings (phase 5): dsh's dialog, enlarged to 920 × 760 (2026-11-28), radius 28, the section list
   on the start side (200px), the section's cards on the rest. ── */
/* The dialog fits its tab (option A, 2026-11-28), so it hangs from a fixed top
   rather than re-centring: switching tabs moves only its foot. */
.pj-sethost { --pj-set-max: min(760px, calc(100dvh - 32px)); position: fixed; inset: 0; z-index: 80; display: grid; place-items: start center; padding: max(16px, calc((100dvh - 760px) / 2)) 16px 16px; }
.pj-sethost[hidden] { display: none; }
body.pj-set-open { overflow: hidden; }
.pj-set__scrim { position: absolute; inset: 0; background: var(--rp-scrim); }
.pj-set {
  position: relative; display: grid; grid-template-columns: 200px minmax(0, 1fr); width: min(920px, 100%); max-height: var(--pj-set-max);
  border-radius: var(--rp-radius-panel); background: var(--rp-surface); box-shadow: 0 0 0 0.5px var(--rp-border), var(--rp-shadow-lg); overflow: hidden;
  animation: pj-set-in 160ms var(--rp-ease-out) both;
}
.pj-set:focus { outline: none; }
@keyframes pj-set-in { from { opacity: 0; transform: scale(0.98); } }
@media (prefers-reduced-motion: reduce) { .pj-set { animation: none; } }
.pj-set__nav { display: flex; flex-direction: column; gap: 2px; padding: 16px 8px 16px 12px; padding-inline: 12px 8px; }
/* Two labelled groups (option A, 2026-11-28): you, then preferences. */
.pj-set__tabs { display: flex; flex-direction: column; gap: 2px; }
.pj-set__grp { padding: 14px 12px 4px; font-size: var(--rp-text-xs); line-height: 16px; color: var(--rp-text-subtle); }
.pj-set__grp:first-child { padding-top: 0; }
.pj-set__title { margin: 4px 4px 14px; font-size: var(--rp-text-base); line-height: 24px; font-weight: 500; color: var(--rp-heading); }
.pj-set__tab {
  display: flex; align-items: center; gap: 8px; height: 40px; padding: 0 12px; border: 0; border-radius: var(--rp-radius-lg);
  background: transparent; color: var(--rp-text); font: inherit; font-size: var(--rp-text-md); text-align: start; cursor: pointer;
}
.pj-set__tab svg { width: 16px; height: 16px; color: var(--rp-text-muted); }
.pj-set__tab:hover { background: var(--rp-hover-wash); }
.pj-set__tab.is-on { background: var(--rp-wash-on); }
.pj-set__body { display: flex; flex-direction: column; gap: 12px; min-height: 0; max-height: var(--pj-set-max); padding: 56px 24px 24px; overflow: auto; }
.pj-set__close { position: absolute; top: 12px; inset-inline-end: 12px; }
.pj-set__h { margin: 0; font-size: var(--rp-text-md); line-height: 22px; font-weight: 500; color: var(--rp-heading); }
.pj-set__sub { margin: -8px 0 4px; font-size: var(--rp-text-sm); line-height: 20px; color: var(--rp-text-subtle); }
.pj-set__card { display: flex; flex-direction: column; gap: 4px; padding: 12px 16px; border: 0.5px solid var(--rp-border); border-radius: 20px; background: var(--rp-surface); }
.pj-set__who { flex-direction: row; align-items: center; gap: 12px; }
/* Account (option A, 2026-11-28): the account's facts, then Sign out at the foot. */
.pj-set__facts { gap: 0; }
.pj-set__facts .pj-set__row { min-height: 40px; }
.pj-set__facts .pj-set__row + .pj-set__row { border-top: 0.5px solid var(--rp-border-subtle); }
.pj-set__facts .pj-set__value { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* Sign out, then the deletion request at the far end, quiet but red (option A, 2026-11-28). */
.pj-set__acctfoot { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.pj-set__delete { padding: 4px 2px; color: var(--rp-danger-text); }
.pj-set__delete:hover { color: var(--rp-danger-text); text-decoration: underline; }
.pj-set__signout { display: inline-flex; align-self: flex-start; align-items: center; gap: 6px; padding: 4px 2px; }
.pj-set__signout svg { width: 14px; height: 14px; }
html[dir="rtl"] .pj-set__signout svg { transform: scaleX(-1); }
.pj-set__avatar { display: grid; place-items: center; flex: none; width: 32px; height: 32px; border-radius: 50%; background: var(--rp-surface-sunken); color: var(--rp-text-muted); font-size: var(--rp-text-xs); font-weight: 600; }
.pj-set__whocopy { display: flex; flex: 1; flex-direction: column; gap: 2px; min-width: 0; text-align: start; }
.pj-set__name { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: var(--rp-text-md); line-height: 20px; font-weight: 500; color: var(--rp-heading); }
.pj-set__hint { font-size: var(--rp-text-sm); line-height: 18px; color: var(--rp-text-subtle); }
.pj-set__row { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 44px; }
.pj-set__row--foot { margin-top: 8px; padding-top: 12px; border-top: 0.5px solid var(--rp-border-subtle); }
.pj-set__label { font-size: var(--rp-text-sm); line-height: 20px; color: var(--rp-text); }
.pj-set__big { font-size: var(--rp-text-lg); line-height: 28px; font-weight: 600; color: var(--rp-heading); font-variant-numeric: tabular-nums; }
.pj-set__value { font-size: var(--rp-text-sm); color: var(--rp-text-muted); font-variant-numeric: tabular-nums; }
.pj-set__acts { display: inline-flex; gap: 8px; }
.pj-set__acts .pj-btn { height: 32px; border-radius: var(--rp-radius-lg); font-weight: 500; font-size: var(--rp-text-sm); }
.pj-set__link { padding: 0; border: 0; background: none; color: var(--rp-text-subtle); font: inherit; font-size: var(--rp-text-sm); cursor: pointer; }
.pj-set__link:hover, .pj-set__link[aria-expanded="true"] { color: var(--rp-text); }
.pj-set__redeem { display: flex; flex-wrap: wrap; gap: 8px; padding: 8px 0 4px; }
.pj-set__redeem input { flex: 1; min-width: 180px; height: 32px; padding: 0 12px; border: 0.5px solid var(--rp-border); border-radius: var(--rp-radius-lg); background: var(--rp-surface); color: var(--rp-text); font: inherit; font-size: var(--rp-text-sm); letter-spacing: 0.04em; }
.pj-set__redeem input:focus { outline: 2px solid var(--rp-focus); outline-offset: -1px; }
.pj-set__redeem .pj-btn { height: 32px; }
.pj-set__feedback { flex-basis: 100%; margin: 0; font-size: var(--rp-text-xs); color: var(--rp-text-muted); }
/* Billing (option B, 2026-11-27): subscription and wallet side by side, then
   the month. The bar's kinds stay in Desk's ink-and-blue range: no green. */
/* The original app's Billing page (billing-page.js) keeps these cards. */
.pj-bill__cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.pj-bill__card { gap: 2px; padding: 14px 16px; }
.pj-bill__state { font-size: var(--rp-text-lg); line-height: 26px; font-weight: 600; color: var(--rp-heading); }
.pj-bill__split { display: flex; flex-direction: column; }
.pj-bill__num, .pj-bill__amt, .pj-bill__math, .pj-bill__legend { font-variant-numeric: tabular-nums; }
.pj-bill__act { display: flex; gap: 8px; margin-top: 10px; }
.pj-bill__act .pj-btn { height: 32px; border-radius: var(--rp-radius-lg); font-weight: 500; font-size: var(--rp-text-sm); }
.pj-bill__topup { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; padding: 12px 16px; border: 0.5px solid var(--rp-border); border-radius: 20px; background: var(--rp-surface); }
.pj-bill__presets, .pj-bill__custom { display: inline-flex; flex-wrap: wrap; gap: 8px; }
.pj-bill__custom input { width: 150px; height: 32px; padding: 0 12px; border: 0.5px solid var(--rp-border-control); border-radius: var(--rp-radius-lg); background: var(--rp-surface); color: var(--rp-text); font: inherit; font-size: var(--rp-text-sm); }
.pj-bill__custom input:focus { outline: 2px solid var(--rp-focus); outline-offset: -1px; }
.pj-bill__custom .pj-btn { height: 32px; }
.pj-bill__topup > [role="alert"] { flex-basis: 100%; margin: 0; }
.pj-bill__month { gap: 10px; padding: 14px 16px; }
.pj-bill__head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 12px; }
.pj-bill__math { font-size: var(--rp-text-sm); color: var(--rp-text-subtle); }
.pj-bill__math b { font-weight: 600; color: var(--rp-heading); }
.pj-bill__bar { display: flex; gap: 2px; height: 10px; overflow: hidden; border-radius: var(--rp-radius-sm); }
.pj-bill__seg { flex-basis: 0; min-width: 4px; }
.pj-bill__seg--reports { background: var(--rp-heading); }
.pj-bill__seg--chat { background: var(--rp-focus); }
.pj-bill__seg--decks { background: var(--rp-border-bold); }
.pj-bill__seg--listen { background: var(--rp-fill-bold); }
.pj-bill__seg--other { background: var(--rp-border-strong); }
.pj-bill__legend { display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 0; padding: 0; list-style: none; font-size: var(--rp-text-xs); color: var(--rp-text-muted); }
.pj-bill__legend li { display: inline-flex; align-items: center; gap: 6px; }
.pj-bill__dot { display: inline-block; flex: none; width: 8px; height: 8px; border-radius: 2px; }
.pj-bill__lines { display: flex; flex-direction: column; margin: 4px 0 0; padding: 0; list-style: none; }
.pj-bill__line { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0; border-top: 0.5px solid var(--rp-border-subtle); }
.pj-bill__what { display: flex; flex-direction: column; gap: 2px; min-width: 0; font-size: var(--rp-text-sm); color: var(--rp-text); }
.pj-bill__what > .pj-bidi { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.pj-bill__amt { flex: none; font-size: var(--rp-text-sm); font-weight: 500; color: var(--rp-heading); }
/* Own-key use is a count, not money (user, 2026-11-28): quieter than a charge. */
.pj-bill__amt.is-own { display: flex; flex-direction: column; align-items: flex-end; font-weight: 400; color: var(--rp-text-muted); }
/* One model's share of a run (Lines A): in and out are the text; the title repeats them. */
.pj-bill__own { white-space: nowrap; cursor: help; }
/* Option A, "wallet first" (2026-12-03), the Settings tab: the balance as the
   headline with its amounts, the subscription as a row under a hairline, then
   the month, the activity and the account's own keys. */
.pj-bill__hero { gap: 12px; padding: 18px 20px; }
.pj-bill__top { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 12px; }
.pj-bill__balance { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.pj-bill__big { font-size: var(--rp-text-3xl); line-height: 40px; font-weight: 600; color: var(--rp-heading); font-variant-numeric: tabular-nums; }
.pj-bill__quick { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px; }
.pj-bill__quick .pj-chip { height: 30px; padding: 0 12px; font-size: var(--rp-text-sm); font-variant-numeric: tabular-nums; }
.pj-bill__quick .pj-chip[aria-expanded="true"] { background: var(--rp-wash-on); color: var(--rp-text); }
.pj-bill__hero .pj-bill__custom { display: flex; align-items: center; }
.pj-bill__hero .pj-bill__code { padding: 0; }
.pj-bill__hero > p { margin: 0; }
.pj-bill__sub { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding-top: 12px; border-top: 0.5px solid var(--rp-border-subtle); }
.pj-bill__subicon { display: grid; place-items: center; flex: none; width: 28px; height: 28px; border-radius: 50%; background: var(--rp-surface-sunken); color: var(--rp-focus); }
.pj-bill__subicon svg { width: 14px; height: 14px; }
.pj-bill__sub.is-off .pj-bill__subicon { color: var(--rp-warning-text); }
.pj-bill__subcopy { display: flex; flex: 1 1 200px; flex-direction: column; min-width: 0; }
.pj-bill__total { font-size: var(--rp-text-lg); line-height: 26px; font-weight: 600; color: var(--rp-heading); font-variant-numeric: tabular-nums; }
.pj-bill__activity { gap: 6px; padding: 14px 16px 6px; }
.pj-bill__activity .pj-bill__lines { margin: 0; }
.pj-bill__kicker { font-size: var(--rp-text-xs); line-height: 17px; color: var(--rp-text-subtle); }
.pj-bill__title { align-self: flex-start; max-width: 100%; line-height: 20px; color: var(--rp-heading); }
.pj-bill__activity .pj-bill__amt.is-in { color: var(--rp-success-text); }
.pj-bill__keys { gap: 8px; padding: 12px 16px; }
.pj-bill__keyrow { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.pj-bill__keycopy { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.pj-bill__keysum { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 8px; }
.pj-bill__toggle { display: inline-flex; flex: none; align-items: center; gap: 4px; }
.pj-bill__toggle svg { width: 14px; height: 14px; }
.pj-bill__toggle[aria-expanded="true"] svg { transform: rotate(180deg); }
.pj-bill__group { margin: 4px 0 -4px; }
.pj-bill__foot { margin: 0; }
.pj-bill__more { align-self: flex-start; }
/* History (2026-11-28, option A): what the account made — reports, slides,
   Listen — as the workspace Reports tab's kicker rows: what it is over the
   title, a hairline between rows, date and credits at the end. */
.pj-hist__chips { display: flex; flex-wrap: wrap; gap: 6px; }
.pj-hist__chip {
  display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 10px;
  border: 1px solid var(--rp-border); border-radius: 999px; background: transparent;
  color: var(--rp-text-secondary); font: inherit; font-size: var(--rp-text-xs); font-weight: 600; cursor: pointer;
}
.pj-hist__chip:hover { color: var(--rp-heading); border-color: var(--rp-border-strong); }
.pj-hist__chip.is-on { background: var(--rp-chip-on); border-color: transparent; color: var(--rp-chip-on-text); }
.pj-hist__n { font-weight: 400; color: var(--rp-text-muted); font-variant-numeric: tabular-nums; }
.pj-hist { display: flex; flex-direction: column; margin: 0; padding: 0; list-style: none; }
.pj-hist__item { border-bottom: 0.5px solid var(--rp-border); }
.pj-hist__row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 4px; color: inherit; text-decoration: none; }
/* The whole row opens it (option A, 2026-11-28). */
a.pj-hist__row { margin-inline: -8px; padding-inline: 12px; border-radius: var(--rp-radius-md); transition: background var(--rp-duration-fast); }
a.pj-hist__row:hover { background: var(--rp-hover-wash); }
a.pj-hist__row:focus-visible { outline: 2px solid var(--rp-focus); outline-offset: -2px; }
.pj-hist__go { display: inline-flex; width: 14px; color: var(--rp-text-muted); }
.pj-hist__go svg { width: 14px; height: 14px; }
html[dir="rtl"] .pj-hist__go svg { transform: scaleX(-1); }
.pj-hist__copy { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.pj-hist__kick { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: var(--rp-text-xs); line-height: 16px; color: var(--rp-text-subtle); }
.pj-hist__state.is-warn { color: var(--rp-warning-text); }
.pj-hist__title { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: var(--rp-text-sm); color: var(--rp-text); }
.pj-hist__end { display: flex; flex: none; align-items: center; gap: 14px; font-size: var(--rp-text-sm); color: var(--rp-text-subtle); font-variant-numeric: tabular-nums; }
.pj-hist__amt { min-width: 3.5em; text-align: end; font-weight: 500; color: var(--rp-heading); }
.pj-hist__more { align-self: flex-start; }
.pj-hist__empty { padding: 12px 4px; }
/* General: one card, two rows (the 3004 Preferences look) — Appearance, and a
   trigger whose menu sits in the host, outside the dialog's clip. */
.pj-set__prefs { gap: 0; padding: 0; }
.pj-set__pref { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 18px; }
.pj-set__pref + .pj-set__pref { border-top: 0.5px solid var(--rp-border-subtle); }
.pj-set__linecopy { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.pj-set__label--strong { font-size: var(--rp-text-md); font-weight: 600; color: var(--rp-heading); }
/* Appearance (option A, 2026-11-28): Light / Dark / System as one segmented
   control over native radios, so arrow keys move the choice. */
.pj-set__seg { display: inline-flex; flex: none; gap: 2px; padding: 3px; border-radius: var(--rp-radius-pill); background: var(--rp-surface-sunken); }
.pj-set__segopt { position: relative; display: inline-flex; cursor: pointer; }
.pj-set__segopt input { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.pj-set__segopt span { padding: 5px 14px; border-radius: var(--rp-radius-pill); font-size: var(--rp-text-sm); line-height: 20px; color: var(--rp-text-muted); transition: background var(--rp-duration-fast), color var(--rp-duration-fast); }
.pj-set__segopt:hover span { color: var(--rp-text); }
.pj-set__segopt input:checked + span { background: var(--rp-surface); box-shadow: var(--rp-shadow-sm); color: var(--rp-heading); font-weight: 500; }
.pj-set__segopt input:focus-visible + span { outline: 2px solid var(--rp-focus); outline-offset: 1px; }
.pj-set__pick {
  display: inline-flex; flex: none; align-items: center; gap: 10px; height: 40px; min-width: 172px; padding-inline: 16px 14px;
  border: 1px solid var(--rp-border-strong); border-radius: var(--rp-radius-lg); background: var(--rp-surface); color: var(--rp-heading);
  font: inherit; font-size: var(--rp-text-sm); font-weight: 600; cursor: pointer; transition: border-color 160ms var(--rp-ease-out);
}
.pj-set__pick:hover { border-color: var(--rp-border-bold); }
.pj-set__pick.is-open { border-color: var(--rp-focus); box-shadow: 0 0 0 3px var(--rp-info-soft); }
.pj-set__pickvalue { flex: 1; min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; text-align: start; }
.pj-set__pick svg { width: 14px; height: 14px; color: var(--rp-text-muted); transform: rotate(90deg); transition: transform 160ms var(--rp-ease-out); }
.pj-set__pick.is-open svg { transform: rotate(-90deg); }
.pj-set__menu {
  position: fixed; z-index: 1; display: flex; flex-direction: column; gap: 2px; width: 220px; max-height: calc(100dvh - 24px); overflow: auto; padding: 6px;
  border: 0.5px solid var(--rp-border); border-radius: var(--rp-radius-xl); background: var(--rp-surface); box-shadow: var(--rp-shadow-lg);
  animation: pj-set-menu-in 140ms var(--rp-ease-out);
}
.pj-set__menu[hidden] { display: none; }
@keyframes pj-set-menu-in { from { opacity: 0; transform: translateY(-4px); } }
@media (prefers-reduced-motion: reduce) { .pj-set__menu { animation: none; } }
.pj-set__opt {
  display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%; padding: 10px 12px; border: 0; border-radius: var(--rp-radius-md);
  background: transparent; color: var(--rp-heading); font: inherit; font-size: var(--rp-text-sm); font-weight: 600; text-align: start; cursor: pointer;
}
.pj-set__opt:hover, .pj-set__opt:focus-visible { outline: none; background: var(--rp-hover-wash); }
.pj-set__opt.is-on { background: var(--rp-brand-soft); color: var(--rp-info-text); }
.pj-set__opt svg { width: 16px; height: 16px; opacity: 0; }
.pj-set__opt.is-on svg { opacity: 1; }
.pj-set__select {
  flex: none; height: 32px; padding: 0 28px 0 12px; padding-inline: 12px 28px; border: 0.5px solid var(--rp-border); border-radius: var(--rp-radius-lg);
  background: var(--rp-surface); color: var(--rp-text); font: inherit; font-size: var(--rp-text-sm); cursor: pointer;
}
.pj-set__select:focus-visible { outline: 2px solid var(--rp-focus); outline-offset: 1px; }
.pj-set__models { display: flex; flex-direction: column; gap: 8px; }
.pj-set__model { flex-direction: row; align-items: center; gap: 12px; color: inherit; font: inherit; text-align: start; cursor: pointer; }
.pj-set__model:hover:not(:disabled) { background: var(--rp-hover-wash); }
.pj-set__model:disabled { opacity: 0.45; cursor: not-allowed; }
.pj-set__model.is-on { border-color: var(--rp-text-muted); }
.pj-set__modelicon { flex: none; width: 18px; height: 18px; color: var(--rp-text-muted); }
.pj-set__badge { flex: none; padding: 0 8px; border-radius: var(--rp-radius-pill); background: var(--rp-surface-sunken); color: var(--rp-text-muted); font-size: var(--rp-text-xs); line-height: 20px; }
/* Models and keys (2026-11-26): one page. A summary card (what a report costs
   at these picks, the saved keys, Manage keys), then rows named by job, each
   with a chip that says who pays: "Included" (quiet) or "your key" (info blue,
   Desk's accent; no green). The chip is a native select dressed as a pill. */
/* Every Settings tab opens the same way (option A, 2026-11-28): its name, any hint under it. */
.pj-mkhead { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; }
/* The keys page (option A, 2026-11-26): one row per provider, its key added
   or replaced in the row. */
/* The same outlined card as General and Custom (2026-11-30). */
.pj-keyrows { display: flex; flex-direction: column; border: 0.5px solid var(--rp-border); border-radius: 20px; background: var(--rp-surface); padding: 4px 18px; }
.pj-keyrow { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; padding: 14px 0; border-top: 0.5px solid var(--rp-border-subtle); }
/* Quiet rows (option A, 2026-11-27): the actions are links, not six outlined buttons. No monogram tile since 2026-11-28. */
.pj-keyrow__acts { display: inline-flex; align-items: center; gap: 2px; flex: none; }
/* A saved key's on/off (2026-11-29): its state word beside the shared toggle, after the links. */
.pj-keyrow__switch { display: inline-flex; align-items: center; gap: var(--rp-space-2); margin-inline-start: var(--rp-space-3); cursor: pointer; }
.pj-keyrow__use { font-size: var(--rp-text-sm); color: var(--rp-text-muted); min-width: 4ch; text-align: end; }
.pj-keylink {
  display: inline-flex; align-items: center; gap: 4px; height: 28px; padding: 0 8px; border: 0; border-radius: var(--rp-radius-md);
  background: transparent; color: var(--rp-info-text); font: inherit; font-size: var(--rp-text-sm); font-weight: 500; white-space: nowrap; cursor: pointer;
  transition: background var(--rp-duration-fast), color var(--rp-duration-fast);
}
.pj-keylink:hover { background: var(--rp-hover-wash); }
.pj-keylink:focus-visible { outline: 2px solid var(--rp-focus); outline-offset: 0; }
.pj-keylink.is-quiet { color: var(--rp-text-muted); font-weight: 400; }
.pj-keylink.is-quiet:hover { color: var(--rp-text); }
.pj-keylink svg { flex: none; width: 13px; height: 13px; }
.pj-keyrow:first-child { border-top: 0; }
.pj-keyrow__copy { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
.pj-keyrow__name { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; font-size: var(--rp-text-md); font-weight: 500; color: var(--rp-heading); }
.pj-keyrow__tail { font-family: var(--rp-font-mono); font-size: var(--rp-text-xs); font-weight: 400; color: var(--rp-text-muted); unicode-bidi: isolate; }
.pj-keyrow__state { font-size: var(--rp-text-xs); font-weight: 400; color: var(--rp-success-text); }
.pj-keyrow__state.is-bad { color: var(--rp-danger-text); }
.pj-keyrow .pj-btn svg { width: 13px; height: 13px; margin-inline-end: 4px; }
.pj-mkform { flex-basis: 100%; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.pj-mkform input {
  flex: 1; min-width: 200px; height: 32px; padding: 0 10px; border: 0.5px solid var(--rp-border-strong); border-radius: var(--rp-radius-lg);
  background: var(--rp-surface); color: var(--rp-text); font-family: var(--rp-font-mono); font-size: var(--rp-text-sm);
}
.pj-mkform input::placeholder, .pj-mkform input:placeholder-shown { font-family: inherit; }
html[dir="rtl"] .pj-mkform input:placeholder-shown { direction: rtl; }
.pj-mkform input:focus { outline: 2px solid var(--rp-focus); outline-offset: -1px; }
.pj-mkform .pj-spinner { width: 12px; height: 12px; margin-inline-end: 6px; }
/* Settings → Custom (option C, user, 2026-11-30): one card like General's —
   the preset row (Appearance's segmented radios), then a summary row per job.
   A row reads: the job and what it does, then the model and who pays; pressing
   it opens its three fields. All three tabs share these rows. */
.pj-mkcard { padding: 0; gap: 0; }
.pj-mkpreset { flex-wrap: wrap; }
.pj-mkpreset .pj-set__linecopy { flex: 1 1 160px; }
.pj-mkpreset .pj-set__segopt span { display: inline-flex; align-items: center; gap: 5px; }
.pj-mkpreset .pj-set__segopt svg { flex: none; width: 12px; height: 12px; }
.pj-mkgroup { padding: 4px 18px 6px; border-top: 0.5px solid var(--rp-border-subtle); }
.pj-mksec { margin: 10px 0 2px; font-size: var(--rp-text-xs); font-weight: 500; color: var(--rp-text-subtle); }
.pj-mkrows { display: flex; flex-direction: column; }
.pj-mkrow + .pj-mkrow { border-top: 0.5px solid var(--rp-border-subtle); }
/* The wash reaches 8px past the text, so the words stay on the card's edge line. */
.pj-mksum {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, auto) 12px; grid-template-areas: "job val chev"; align-items: center; column-gap: 16px;
  width: calc(100% + 16px); margin: 2px -8px; padding: 6px 8px; border: 0; border-radius: var(--rp-radius-sm);
  background: transparent; color: inherit; font: inherit; text-align: start;
}
button.pj-mksum { cursor: pointer; transition: background var(--rp-duration-fast); }
button.pj-mksum:hover { background: var(--rp-hover-wash); }
button.pj-mksum:focus-visible { outline: 2px solid var(--rp-focus); outline-offset: -2px; }
.pj-mksum__job { grid-area: job; display: flex; flex-direction: column; min-width: 0; }
.pj-mksum__name { font-size: var(--rp-text-sm); line-height: 20px; font-weight: 500; color: var(--rp-heading); }
.pj-mksum__desc { font-size: var(--rp-text-xs); line-height: 16px; color: var(--rp-text-subtle); }
.pj-mksum__val { grid-area: val; display: flex; flex-direction: column; align-items: flex-end; min-width: 0; text-align: end; }
.pj-mksum__model { display: flex; flex-wrap: wrap; justify-content: flex-end; column-gap: 0; font-size: var(--rp-text-sm); line-height: 20px; color: var(--rp-text); }
.pj-mksum__sep { white-space: pre; }
.pj-mksum__chev { grid-area: chev; display: inline-flex; color: var(--rp-text-subtle); }
.pj-mksum__chev svg { width: 12px; height: 12px; transform: rotate(90deg); transition: transform var(--rp-duration-fast); }
.pj-mkrow.is-open .pj-mksum__chev svg { transform: rotate(-90deg); }
@media (prefers-reduced-motion: reduce) { .pj-mksum__chev svg { transition: none; } }
.pj-mkrow__note { display: flex; flex-wrap: wrap; justify-content: flex-end; column-gap: 10px; max-width: 280px; font-size: var(--rp-text-xs); line-height: 16px; color: var(--rp-text-subtle); }
.pj-mkrow__note.is-warn, .pj-mkrow__note .is-warn { color: var(--rp-warning-text); }
.pj-mkpay { display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; }
.pj-mkpay svg { flex: none; width: 12px; height: 12px; }
.pj-mkpay.is-own { color: var(--rp-info-text); }
/* Fixed rows (Embedding, Search) and a locked tab's preview: nothing to press,
   their values on the same line as the jobs' (the chevron's column stays empty). */
.pj-mkrow.is-fixed .pj-mksum__name, .pj-mkrow.is-preview .pj-mksum__name { font-weight: 400; color: var(--rp-text-muted); }
.pj-mkrow.is-fixed .pj-mksum__model, .pj-mkrow.is-preview .pj-mksum__model { color: var(--rp-text-subtle); }

/* An open job's fields: provider, model, thinking, each under its own label. */
.pj-mkedit {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.5fr) minmax(0, 1fr); gap: 8px 10px;
  margin: 0 -8px 8px; padding: 10px 12px 12px; border-radius: var(--rp-radius-md); background: var(--rp-surface-sunken);
}
.pj-mkfield { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.pj-mkfield__label { font-size: var(--rp-text-xs); line-height: 16px; color: var(--rp-text-subtle); }
.pj-mkedit__hint { grid-column: 1 / -1; margin: 0; font-size: var(--rp-text-xs); line-height: 16px; color: var(--rp-text-subtle); }
/* A picker fills its field, with a native select laid over it. Its name gives
   way (ellipsis) before the field does, so a column never changes width. */
.pj-mkpick {
  position: relative; display: inline-flex; align-items: center; justify-content: flex-start; gap: 8px; min-width: 0; width: 100%; height: 28px; padding-inline: 10px 8px;
  border: 0.5px solid var(--rp-border-control); border-radius: var(--rp-radius-sm); background: var(--rp-surface); color: var(--rp-text); font-size: var(--rp-text-sm);
  transition: border-color var(--rp-duration-fast), background var(--rp-duration-fast);
}
.pj-mkpick:hover { border-color: var(--rp-border-strong); color: var(--rp-heading); }
.pj-mkpick:focus-within { outline: 2px solid var(--rp-focus); outline-offset: 1px; }
.pj-mkpick__name { flex: 0 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pj-mkpick > svg { flex: none; width: 12px; height: 12px; margin-inline-start: auto; transform: rotate(90deg); color: var(--rp-text-subtle); pointer-events: none; }
.pj-mkpick select { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; border: 0; opacity: 0; font: inherit; cursor: pointer; appearance: none; -webkit-appearance: none; }
/* A value that can't be changed is text, not a field; it starts where a field's text does. */
.pj-mkpick.is-fixed { border-color: transparent; background: transparent; color: var(--rp-text-subtle); }
.pj-mkpick.is-fixed:hover { border-color: transparent; background: transparent; color: var(--rp-text-subtle); }

/* A tab without its key: what it needs, and the way there. */
.pj-mklock { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; padding: 12px 18px; border-top: 0.5px solid var(--rp-border-subtle); background: var(--rp-info-soft); font-size: var(--rp-text-sm); line-height: 20px; color: var(--rp-text); }
.pj-mklock > span { flex: 1 1 220px; }

/* A job's key: the same ghost size; says Ours, or My key in the info
   colour, and switches side when pressed (the swap icon shows on hover). */
.pj-mkkey {
  display: inline-flex; align-items: center; gap: 4px; height: 28px; padding-inline: 8px; min-width: 84px;
  border: 0; border-radius: var(--rp-radius-sm); background: transparent; color: var(--rp-text-secondary); font: inherit; font-size: var(--rp-text-sm); white-space: nowrap; cursor: pointer;
  transition: background var(--rp-duration-fast);
}
.pj-mkkey svg { flex: none; width: 12px; height: 12px; }
.pj-mkkey > svg:last-child { margin-inline-start: auto; color: var(--rp-text-subtle); opacity: 0; transition: opacity var(--rp-duration-fast); }
.pj-mkkey:hover, .pj-mkkey:focus-visible { background: var(--rp-hover-wash); color: var(--rp-heading); }
.pj-mkkey:hover > svg:last-child, .pj-mkkey:focus-visible > svg:last-child { opacity: 1; }
.pj-mkkey:focus-visible { outline: 2px solid var(--rp-focus); outline-offset: 1px; }
.pj-mkkey.is-own { color: var(--rp-info-text); }
.pj-mkkey.is-off { cursor: help; }
.pj-mkkey.is-off > svg:last-child { display: none; }
.pj-mkkey.is-fixed { color: var(--rp-text-subtle); cursor: default; }
.pj-mkkey.is-fixed:hover { background: transparent; color: var(--rp-text-subtle); }
@media (hover: none) { .pj-mkkey > svg:last-child { opacity: 1; } }

/* Narrow: a job's model and payer go under its name, and its fields stack. */
@media (max-width: 640px) {
  .pj-mksum { grid-template-columns: minmax(0, 1fr) 12px; grid-template-areas: "job chev" "val chev"; row-gap: 4px; }
  .pj-mksum__val { align-items: flex-start; text-align: start; }
  .pj-mksum__model, .pj-mkrow__note { justify-content: flex-start; }
  .pj-mkedit { grid-template-columns: minmax(0, 1fr); }
}
.pj-set__part { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 18px; }
.pj-set__part + .pj-set__part { border-top: 0.5px solid var(--rp-border-subtle); }
.pj-set__hint.is-warn { color: var(--rp-warning-text); }
.pj-set__part > .pj-set__value { flex: none; white-space: nowrap; }
.pj-partpick {
  flex: none; max-width: 300px; height: 32px; padding-inline: 10px 26px; border: 0.5px solid var(--rp-border-strong);
  border-radius: var(--rp-radius-lg); background: var(--rp-surface); color: var(--rp-text); font: inherit; font-size: var(--rp-text-sm); cursor: pointer;
}
.pj-partpick:focus-visible { outline: 2px solid var(--rp-focus); outline-offset: 1px; }
@media (max-width: 640px) {
  .pj-set__part { flex-direction: column; align-items: stretch; gap: 8px; }
  .pj-partpick { max-width: none; width: 100%; }
}

/* Your keys (2026-11-26): one hairline row per provider. A key shows only as
   its last four; a working one stays quiet (Desk has no green), a refused one
   speaks in the danger text. */
.pj-set__keys { gap: 0; padding: 0; }
.pj-set__key { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 8px 16px; padding: 14px 18px; }
.pj-set__key + .pj-set__key { border-top: 0.5px solid var(--rp-border-subtle); }
.pj-set__keystate { display: inline-flex; align-items: center; gap: 8px; font-size: var(--rp-text-sm); }
.pj-set__tail { font-family: var(--rp-font-mono); font-size: var(--rp-text-xs); color: var(--rp-text-muted); unicode-bidi: isolate; }
.pj-set__status { font-size: var(--rp-text-xs); color: var(--rp-text-muted); }
.pj-set__status.is-bad { color: var(--rp-danger-text); }
.pj-set__keyform { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.pj-set__keyform input { flex: 1; min-width: 200px; height: 32px; padding: 0 12px; border: 0.5px solid var(--rp-border); border-radius: var(--rp-radius-lg); background: var(--rp-surface); color: var(--rp-text); font-family: var(--rp-font-mono); font-size: var(--rp-text-sm); }
.pj-set__keyform input:focus { outline: 2px solid var(--rp-focus); outline-offset: -1px; }
/* The key is LTR mono; the hint before it is the UI's own words and direction. */
.pj-set__keyform input::placeholder { font-family: inherit; }
.pj-set__keyform input:placeholder-shown { font-family: inherit; }
html[dir="rtl"] .pj-set__keyform input:placeholder-shown { direction: rtl; }
.pj-set__keyform .pj-spinner { width: 12px; height: 12px; margin-inline-end: 6px; }
.pj-set__feedback.is-error { color: var(--rp-danger-text); }
.pj-set__notice { margin: 0; padding: 10px 14px; border-radius: var(--rp-radius-lg); background: var(--rp-surface-sunken); color: var(--rp-text-muted); font-size: var(--rp-text-sm); }
.pj-set__foot { margin: 0; font-size: var(--rp-text-xs); line-height: 18px; color: var(--rp-text-subtle); }
@media (max-width: 640px) {
  .pj-set__key { grid-template-columns: minmax(0, 1fr) auto; }
  .pj-set__keystate { grid-column: 1; grid-row: 2; }
  .pj-set__key > .pj-set__acts { grid-column: 2; grid-row: 1 / span 2; }
}
.pj-set button:focus-visible { outline: 2px solid var(--rp-focus); outline-offset: 1px; }
@media (max-width: 640px) {
  .pj-sethost { --pj-set-max: none; padding: 0; place-items: stretch; }
  .pj-set { grid-template-columns: 1fr; grid-template-rows: auto minmax(0, 1fr); width: 100%; height: 100dvh; border-radius: 0; }
  .pj-set__nav { flex-direction: row; flex-wrap: wrap; padding: 12px; }
  /* One strip that scrolls sideways (option A, 2026-11-28); the group labels step aside. */
  .pj-set__nav { min-width: 0; }
  .pj-set__tabs { flex: 1 1 100%; flex-direction: row; gap: 4px; min-width: 0; margin-inline: -12px; padding-inline: 12px; scroll-padding-inline: 12px; overflow-x: auto; scrollbar-width: none; }
  .pj-set__tabs::-webkit-scrollbar { display: none; }
  .pj-set__grp { display: none; }
  .pj-set__tab { flex: none; }
  /* Appearance: the three choices go under their label rather than squeezing it. */
  .pj-set__pref--seg { flex-direction: column; align-items: flex-start; gap: 10px; }
  .pj-mkpreset .pj-set__linecopy { flex-basis: auto; } /* stacked: a 160px basis became a 160px gap */
  .pj-set__title { flex-basis: 100%; margin-bottom: 6px; }
  .pj-set__tab { height: 34px; }
  .pj-set__body { padding: 16px; }
}

/* ── New task (#/automation/new; user, 2026-11-10, option B): New skill's
   page and numbered steps; report rows to pick from, the app's segmented
   control, a 24h time in two selects, and the summary said before Create. ── */
.pj-autonew__form { display: flex; flex-direction: column; }
.pj-autonew__stepbody { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; margin-inline-start: 34px; }
.pj-autonew__stepbody > .pj-src-list { align-self: stretch; }
.pj-autonew__row { position: relative; min-height: 56px; padding-inline-start: 40px; }
.pj .pj-autonew__row > input[type="radio"] { position: absolute; padding: 0; border: 0; background: none; inset-inline-start: 12px; top: 50%; width: 16px; height: 16px; margin: 0; transform: translateY(-50%); accent-color: var(--rp-text); }
.pj-autonew__row.is-on { background: var(--rp-surface-sunken); }
.pj-autonew__row:focus-within { outline: 2px solid var(--rp-focus); outline-offset: -2px; }
.pj-autonew__row input:focus-visible { outline: none; }
.pj-autonew__more { font-size: var(--rp-text-sm); }
.pj-autonew__seg { margin: 0; }
.pj-autonew__seg .pj-seg__btn { display: inline-flex; align-items: center; font-weight: 500; }
.pj .pj-autonew__seg input[type="radio"] { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; padding: 0; opacity: 0; pointer-events: none; }
.pj-autonew__seg .pj-seg__btn:focus-within { outline: 2px solid var(--rp-focus); outline-offset: 1px; }
.pj-autonew__line { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: var(--rp-text-sm); color: var(--rp-text-muted); }
.pj-autonew__select { width: auto; min-width: 0; }
.pj-autonew__time { display: inline-flex; align-items: center; gap: 4px; color: var(--rp-text-muted); }
.pj .pj-autonew input.pj-autonew__num {
  width: 64px; height: 32px; padding: 0 8px; box-sizing: border-box; border: 0.5px solid var(--rp-border); border-radius: var(--rp-radius-lg);
  background: var(--rp-surface); color: var(--rp-text); font: inherit; font-size: var(--rp-text-sm); font-variant-numeric: tabular-nums; direction: ltr; text-align: start;
}
.pj-autonew__num:focus-visible { outline: 2px solid var(--rp-focus); outline-offset: 1px; }
.pj .pj-autonew input.pj-autonew__date { width: auto; height: 32px; padding: 0 12px; direction: ltr; }
.pj-autonew__sum {
  margin: 0; padding: 14px 16px; border-radius: var(--rp-radius-lg); background: var(--rp-surface-sunken);
  font-size: var(--rp-text-sm); line-height: 20px; color: var(--rp-heading);
}
.pj-autonew__error { margin: -16px 0 0; font-size: var(--rp-text-sm); line-height: 20px; color: var(--rp-danger-text); }
@media (max-width: 640px) { .pj-autonew__stepbody { margin-inline-start: 0; } }

/* Farsi line heights. Persian letters render 110% of the set size
   (projects-shell.css, "Persian type"), so the px line heights sized for
   English are tight for them: running text gets about 1.7x the Persian size,
   titles about 1.45x, and labels that can wrap a little more room. */
html[data-brand="desk"][lang="fa"] .pj :is(.pj-composer__input, .pj-prose, .pj-msg__note, .pj-msg__thinking, .pj-bubble, .pj-turn__body,
  .pj-qcard__q, .pj-qcard__opt, .pj-takeover__body, .pj-vermenu__diff, .pj-traj__queries li, .pj-srcpage__sub, .pj-src-sec__empty,
  .pj-autonew__sum, .pj-autonew__error, .pj-set__sub, .pj-set__label, .pj-sess__empty) { line-height: 2; }
html[data-brand="desk"][lang="fa"] .pj :is(.pj-hero__headline, .pj-chat__hello, .pj-page__title, .pj-set__title, .pj-set__big, .pj-takeover__title, .pj-set__h) { line-height: 1.7; }
html[data-brand="desk"][lang="fa"] .pj :is(.pj-menu__hint, .pj-hovercard__title, .pj-sess__tab, .pj-slash__hint, .pj-sess__cap, .pj-msg__label, .pj-settled, .pj-file__sub, .pj-set__hint) { line-height: 1.75; }

/* The workspace page (user, 2026-11-07; option B): Chat and Data tabs in a
   session's tab bar. */
.pj-ws__toggle.is-on .pj-ws__name { color: var(--rp-heading); font-weight: 500; }

/* The Data tab: a full-page list, laid out like the Sources page was. */
.pj-wspdata { display: flex; flex-direction: column; gap: 20px; padding: 16px 0; }
.pj-wspdata__bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.pj-wspdata__counts { font-size: var(--rp-text-sm); color: var(--rp-text-subtle); }
.pj-wspdata__note { margin: 8px 0 0; padding: 0 8px; font-size: var(--rp-text-xs); line-height: 18px; color: var(--rp-text-subtle); }
a.pj-src-row { text-decoration: none; }
span.pj-src-row { cursor: default; }
span.pj-src-row:hover { background: transparent; }

/* The session helper's hand-off ("Make this a report") under its last reply. */
.pj-handoff {
  display: flex; flex-direction: column; align-items: flex-start; gap: 6px; margin: 10px 0 0; padding: 12px 14px;
  border-radius: var(--rp-radius-lg); box-shadow: 0 0 0 0.5px var(--rp-border-strong);
}
.pj-handoff__label { display: inline-flex; align-items: center; gap: 6px; margin: 0; font-size: var(--rp-text-xs); color: var(--rp-text-subtle); }
.pj-handoff__label svg { width: 14px; height: 14px; }
.pj-handoff__request { margin: 0 0 4px; font-size: var(--rp-text-sm); line-height: 20px; color: var(--rp-text); }
html[data-brand="desk"][lang="fa"] .pj :is(.pj-handoff__request, .pj-wspdata__note) { line-height: 2; }

/* Quick run (Chat mode, 2026-11-09): the skill chip and confirm strip in the composer, the tag and actions on the answer. */
.pj-quickstrip__icon svg { width: 14px; height: 14px; flex: none; }
.pj-quickstrip {
  display: flex; align-items: center; gap: 10px; margin: 0 0 4px; padding: 10px 12px;
  border-bottom: 0.5px solid var(--rp-border-subtle);
}
.pj-quickstrip__icon { display: inline-flex; color: var(--rp-brand-ink); }
.pj-quickstrip__copy { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
.pj-quickstrip__title { font-size: var(--rp-text-sm); color: var(--rp-text); }
.pj-quickstrip__meta { font-size: var(--rp-text-xs); color: var(--rp-text-subtle); }
.pj-quickstrip__acts { display: inline-flex; gap: 6px; flex: none; }
.pj-quicktag { display: flex; align-items: center; gap: 6px; margin: 0 0 8px; font-size: var(--rp-text-xs); color: var(--rp-text-subtle); }
.pj-quicktag__info { display: inline-grid; place-items: center; color: inherit; cursor: help; border-radius: 50%; }
.pj-quicktag__info svg { width: 14px; height: 14px; }
.pj-quicktag__info:focus-visible { outline: 2px solid var(--rp-focus); outline-offset: 1px; }
.pj-quicktag__time { font-variant-numeric: tabular-nums; }
.pj-quickacts {
  display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin: 10px 0 0; padding: 10px 0 0;
  border-top: 0.5px solid var(--rp-border-subtle);
}
.pj-quickacts__hint { font-size: var(--rp-text-xs); color: var(--rp-text-subtle); }
@media (max-width: 560px) {
  .pj-quickstrip { flex-wrap: wrap; }
  .pj-quickstrip__acts { width: 100%; justify-content: flex-end; }
  .pj-quickacts__hint { width: 100%; }
}

/* Workspace Reports tab (2026-11-08; 2026-11-13 list rows; 2026-11-16 option
   B, "kicker rows"): the Data tab's bar with the home page's search box and
   the composer's picker for the sort; rows with the type as a kicker over the
   title, a hairline between rows, no tile; marks, date and score at the end. */
.pj-wsr .pj-srcpage__tools { flex: 1; justify-content: flex-end; min-width: 0; }
.pj-wsr__search { flex: 0 1 352px; min-width: 0; }
/* One voice across the bar: 13px regular, muted ink, 32px controls with
   the refresh button's border and radius (count, search, sort, refresh). */
.pj-wsr .pj-wspdata__counts { color: var(--rp-text-muted); }
.pj-wsr .pj-wsr__search { height: 32px; gap: 8px; padding: 0 10px; border: 1px solid var(--rp-border); border-radius: var(--rp-radius-lg); font-weight: 400; }
.pj-wsr .pj-wsr__search svg { width: 14px; height: 14px; }
.pj .pj-wsr .pj-wsr__search input { font-size: var(--rp-text-sm); font-weight: 400; }
.pj-wsr .pj-srcpage__tools .pj-pick { height: 32px; font-weight: 400; }
.pj-wsr .pj-srcpage__tools .pj-pick svg { color: currentColor; }
.pj-wsr .pj-srcpage__tools .pj-btn--quiet { color: var(--rp-text-muted); }
.pj-wsr .pj-src-list { gap: 0; }
.pj-wsr__row { min-height: 0; padding: 12px 8px; gap: 16px; border-radius: 0; border-bottom: 0.5px solid var(--rp-border); }
.pj-wsr__row:hover { border-radius: var(--rp-radius-md); }
.pj-wsr__row .pj-src-row__copy { gap: 3px; }
.pj-wsr__kicker { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: var(--rp-text-xs); line-height: 16px; color: var(--rp-text-subtle); }
.pj-wsr__meta { display: flex; align-items: center; gap: 6px; min-width: 0; color: var(--rp-text-muted); }
.pj-wsr__meta > span { flex: none; }
.pj-wsr__meta > .pj-wsr__session { flex: 0 1 auto; min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.pj-wsr__dot { color: var(--rp-text-faint); }
.pj-wsr__end { display: flex; flex: none; align-items: center; gap: 14px; font-size: var(--rp-text-sm); color: var(--rp-text-subtle); font-variant-numeric: tabular-nums; }
.pj-wsr__marks { display: inline-flex; gap: 6px; }
.pj-wsr__mark { display: inline-flex; color: var(--rp-text-faint); }
.pj-wsr__mark svg { width: 13px; height: 13px; }
.pj-wsr__state { display: inline-flex; align-items: center; gap: 6px; }
/* The star (user, 2026-11-22, option A): the owner's button closes the row,
   over the link's own end padding so the hover wash covers it; outline on
   hover or focus, always shown once starred or on touch screens. Starring is
   a mark for the "Starred only" filter, never a move to the top (that's pin). */
.pj-wsr__item { position: relative; }
.pj-wsr__item:has(.pj-wsr__star) .pj-wsr__row { padding-inline-end: 44px; }
.pj-wsr__star {
  position: absolute; inset-inline-end: 8px; top: 50%; transform: translateY(-50%);
  display: inline-grid; place-items: center; width: 28px; height: 28px; padding: 0;
  border: 0; border-radius: var(--rp-radius-md); background: transparent; color: var(--rp-text-faint); cursor: pointer;
  opacity: 0; transition: opacity 0.12s, color 0.12s;
}
.pj-wsr__star svg { width: 16px; height: 16px; }
.pj-wsr__item:hover .pj-wsr__star, .pj-wsr__star:focus-visible, .pj-wsr__star.is-on { opacity: 1; }
.pj-wsr__star:hover { color: var(--rp-text-muted); background: var(--rp-hover-wash); }
.pj-wsr__star:focus-visible { outline: 2px solid var(--rp-focus); outline-offset: -2px; }
.pj-wsr__star.is-on, .pj-wsr__star.is-on:hover { color: var(--rp-favorite); }
.pj-wsr__star.is-on svg { fill: currentColor; }
@media (hover: none) { .pj-wsr__star { opacity: 1; } }
.pj-wsr__starred .pj-wsr__starcount { flex: none; color: var(--rp-text-subtle); font-variant-numeric: tabular-nums; }
.pj-wsr__starred.is-on > svg:first-child, .pj-wsr .pj-srcpage__tools .pj-wsr__pick--starred .pj-pick > svg:first-child { color: var(--rp-favorite); fill: currentColor; }
@media (max-width: 640px) {
  .pj-wsr .pj-srcpage__tools { flex-wrap: wrap; justify-content: flex-start; }
  .pj-wsr__search { flex-basis: 100%; }
  .pj-wsr__marks { display: none; }
}
/* A started session's mode: shown, not changeable. */
.pj-pick--fixed { cursor: default; }
.pj-pick--fixed:hover { background: transparent; color: var(--rp-text-muted); }

/* ── Solutions (2026-11-12) ──────────────────────────────────────
   The shared #view-solutions markup, worn like the app's other pages:
   page head as Skills/Sources, solutions as rows, the run page quiet. */
html[data-experience="projects"] #view-solutions { max-width: 960px; padding: 8px 0 80px; }
html[data-experience="projects"] #solutions-view-header { display: block; margin: 0 0 28px; padding: 0; border: 0; }
html[data-experience="projects"] #solutions-view-header[hidden] { display: none; }
html[data-experience="projects"] #view-solutions .view-title { margin: 0; font-size: var(--rp-text-xl) !important; line-height: 28px; font-weight: 500; color: var(--rp-heading); }
html[data-experience="projects"] #view-solutions .view-subtitle { margin: 4px 0 0; max-width: 620px; font-size: var(--rp-text-sm); line-height: 20px; color: var(--rp-text-muted); }
html[data-experience="projects"] .sol-grid { display: block; }
html[data-experience="projects"] .sol-grid[hidden] { display: none; }
.sol-rows { display: flex; flex-direction: column; gap: 2px; margin: 0; padding: 0; list-style: none; }
.sol-row {
  display: flex; align-items: center; gap: 14px; width: 100%; min-height: 66px; padding: 8px; box-sizing: border-box;
  border: 0; border-radius: var(--rp-radius-lg); background: transparent; color: inherit; font: inherit; text-align: start; cursor: pointer;
}
.sol-row:hover { background: var(--rp-hover-wash); }
.sol-row:focus-visible { outline: 2px solid var(--rp-focus); outline-offset: -2px; }
.sol-row__tile {
  display: grid; place-items: center; flex: none; width: 36px; height: 36px; box-sizing: border-box;
  border: 0.5px solid var(--rp-tile-border); border-radius: var(--rp-radius-md); background: var(--rp-tile); color: var(--rp-tile-text);
}
.sol-row__tile svg { width: 18px; height: 18px; }
.sol-row__copy { display: flex; flex: 1; flex-direction: column; gap: 2px; min-width: 0; }
.sol-row__name { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: var(--rp-text-md); line-height: 20px; font-weight: 500; color: var(--rp-heading); }
.sol-row__meta { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: var(--rp-text-sm); line-height: 18px; color: var(--rp-text-subtle); }
.sol-row__cta {
  display: inline-flex; flex: none; align-items: center; gap: 6px; height: 30px; padding: 0 10px; box-sizing: border-box;
  border: 1px solid var(--rp-border); border-radius: var(--rp-radius-lg); color: var(--rp-text); font-size: var(--rp-text-xs); font-weight: 500;
}
.sol-row:hover .sol-row__cta { border-color: var(--rp-border-strong); }
.sol-row__cta svg { width: 14px; height: 14px; }
html[dir="rtl"] .sol-row__cta svg { transform: scaleX(-1); }
.sol-rows-soon { margin: 12px 8px 0; font-size: var(--rp-text-sm); color: var(--rp-text-subtle); }
@media (max-width: 560px) { .sol-row__meta { white-space: normal; } }

/* The run page: back link, head, three quiet steps, the spend at the foot. */
html[data-experience="projects"] .sol-flow { max-width: 680px; }
html[data-experience="projects"] .sol-flow-back { margin-bottom: 20px; font-size: var(--rp-text-sm); font-weight: 400; color: var(--rp-text-subtle); }
html[data-experience="projects"] .sol-flow-back:hover { color: var(--rp-text); }
html[data-experience="projects"] .sol-flow-back svg { width: 14px; height: 14px; }
html[data-experience="projects"] .sol-flow-head { gap: 14px; margin-bottom: 24px; padding-bottom: 20px; border-bottom: 0.5px solid var(--rp-border); }
html[data-experience="projects"] .sol-flow-head__icon { width: 36px; height: 36px; box-sizing: border-box; border: 0.5px solid var(--rp-tile-border); border-radius: var(--rp-radius-md); background: var(--rp-tile); color: var(--rp-tile-text); }
html[data-experience="projects"] .sol-flow-head__icon svg { width: 18px; height: 18px; }
html[data-experience="projects"] .sol-flow-head__title { margin: 0 0 2px; font-size: var(--rp-text-xl); line-height: 28px; font-weight: 500; color: var(--rp-heading); }
html[data-experience="projects"] .sol-flow-head__sub { font-size: var(--rp-text-sm); color: var(--rp-text-muted); }
html[data-experience="projects"] .sol-flow-head__badge { padding: 1px 8px; border: 0; border-radius: 999px; background: var(--rp-surface-sunken); color: var(--rp-text-muted); font-size: var(--rp-text-2xs); font-weight: 500; line-height: 17px; }
html[data-experience="projects"] .sol-flow-section { margin-bottom: 28px; }
html[data-experience="projects"] .sol-flow-section__head { align-items: center; gap: 10px; }
html[data-experience="projects"] .sol-flow-section__num { width: 20px; height: 20px; background: var(--rp-surface-sunken); color: var(--rp-text-muted); font-size: var(--rp-text-2xs); font-weight: 600; font-variant-numeric: tabular-nums; }
html[data-experience="projects"] .sol-flow-section__title { font-size: var(--rp-text-md); line-height: 22px; font-weight: 500; color: var(--rp-heading); }
html[data-experience="projects"] .sol-flow-section__hint { margin: 2px 0 12px; margin-inline-start: 30px; font-size: var(--rp-text-sm); line-height: 20px; color: var(--rp-text-subtle); }
html[data-experience="projects"] .sol-opt-grid { gap: 8px; margin-inline-start: 30px; }
html[data-experience="projects"] .sol-flow-fields,
html[data-experience="projects"] .sol-flow-section__note { margin-inline-start: 30px; }
html[data-experience="projects"] .sol-flow-sample { margin-inline-start: 30px; font-size: var(--rp-text-sm); line-height: 20px; color: var(--rp-text-muted); }
html[data-experience="projects"] .sol-flow-sample:hover:not(:disabled) { color: var(--rp-heading); }
html[data-experience="projects"] .sol-flow-section__optional { border-width: 0.5px; font-size: var(--rp-text-2xs); line-height: 17px; }
html[data-experience="projects"] .sol-flow-format { margin-inline-start: 30px; font-size: var(--rp-text-sm); line-height: 20px; }
html[data-experience="projects"] .sol-flow-format__body { border: 0.5px solid var(--rp-border); border-radius: var(--rp-radius-lg); }
html[data-experience="projects"] .sol-flow-format__preview { font-size: var(--rp-text-xs); }
html[data-experience="projects"] .sol-flow-format__download { color: var(--rp-action); font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }
html[data-experience="projects"] .sol-flow-format__download:hover { color: var(--rp-action-hover); }
html[data-experience="projects"] .sol-opt-card { padding: 12px 14px; border: 0.5px solid var(--rp-border); border-radius: var(--rp-radius-lg); background: var(--rp-surface); }
html[data-experience="projects"] .sol-opt-card:hover { border-color: var(--rp-border-strong); background: var(--rp-hover-wash); }
html[data-experience="projects"] .sol-opt-card:focus-visible { outline: 2px solid var(--rp-focus); outline-offset: 1px; border-color: var(--rp-border); box-shadow: none; }
html[data-experience="projects"] .sol-opt-card.is-selected { border-color: var(--rp-heading); background: var(--rp-surface); box-shadow: inset 0 0 0 0.5px var(--rp-heading); }
html[data-experience="projects"] .sol-opt-card__label { font-size: var(--rp-text-sm); font-weight: 500; color: var(--rp-heading); }
html[data-experience="projects"] .sol-opt-card__radio { width: 18px; height: 18px; border-width: 1px; border-color: var(--rp-border-strong); }
html[data-experience="projects"] .sol-opt-card__radio::before,
html[data-experience="projects"] .sol-opt-card__radio::after { background: var(--rp-text-subtle); }
html[data-experience="projects"] .sol-opt-card.is-selected .sol-opt-card__radio { border-color: var(--rp-heading); background: var(--rp-heading); }
html[data-experience="projects"] .sol-opt-card.is-selected .sol-opt-card__radio::before,
html[data-experience="projects"] .sol-opt-card.is-selected .sol-opt-card__radio::after { background: var(--rp-surface); }
html[data-experience="projects"] .sol-opt-card__chip { border: 0.5px solid var(--rp-border); background: var(--rp-surface-sunken); font-size: var(--rp-text-xs); }
html[data-experience="projects"] .sol-flow-foot { justify-content: flex-end; gap: 8px; padding: 16px 0 4px; border-top: 0.5px solid var(--rp-border); background: var(--rp-surface); }
html[data-experience="projects"] .sol-flow-btn { height: 38px; padding: 0 14px; border-radius: var(--rp-radius-lg); font-size: var(--rp-text-sm); font-weight: 500; }
html[data-experience="projects"] .sol-flow-btn--ghost { border: 1px solid var(--rp-border); background: transparent; color: var(--rp-text); }
html[data-experience="projects"] .sol-flow-btn--ghost:hover { border-color: var(--rp-border-strong); background: var(--rp-hover-wash); }
html[data-experience="projects"] .sol-flow-btn--primary { flex: none; background: var(--rp-heading); color: var(--rp-surface); }
html[data-experience="projects"] .sol-flow-btn--primary:hover:not(:disabled) { opacity: 1; background: var(--rp-action); color: var(--rp-text-on-action); }
html[data-experience="projects"] .sol-flow-btn--ghost:focus-visible,
html[data-experience="projects"] .sol-flow-btn--primary:focus-visible { outline: 2px solid var(--rp-focus); outline-offset: 2px; box-shadow: none; }
/* A hairline, not a "·": in fa a middle dot reads as the digit zero. */
html[data-experience="projects"] .sol-flow-btn__cost { padding: 0; padding-inline-start: 9px; border-inline-start: 1px solid color-mix(in srgb, currentColor 35%, transparent); border-radius: 0; background: none; font-weight: 400; opacity: 0.8; }
html[data-experience="projects"] .sol-flow-notice { border: 0.5px solid var(--rp-border); border-radius: var(--rp-radius-lg); background: var(--rp-surface-sunken); font-size: var(--rp-text-sm); color: var(--rp-text-muted); }
html[data-experience="projects"] .sol-run { gap: 8px; margin-top: 16px; padding: 14px 16px; border: 0.5px solid var(--rp-border); border-radius: var(--rp-radius-lg); background: var(--rp-surface); }
html[data-experience="projects"] .sol-run__title { font-size: var(--rp-text-sm); font-weight: 500; line-height: 20px; color: var(--rp-heading); }
html[data-experience="projects"] .sol-run__hint,
html[data-experience="projects"] .sol-run__meta { font-size: var(--rp-text-sm); line-height: 20px; color: var(--rp-text-muted); }
html[data-experience="projects"] .sol-run__track { background: var(--rp-surface-sunken); }
html[data-experience="projects"] .sol-run__fill { background: var(--rp-heading); }

/* Kavosh in Chat mode (2026-11-16, design B "claim underlines"): solid under
   a claim two or more models made, dotted under one model's; a "resolved" tag
   where they disagreed and a source decided. The offset clears Persian
   descenders; skip-ink keeps the line off them. */
.pj-kv { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 6px; margin: 0 0 8px; color: var(--rp-text-muted); font-size: var(--rp-text-xs); line-height: 1.5; }
.pj-kv > span:first-child { color: var(--rp-text); font-weight: 500; }
.pj-kv--live { margin-top: 4px; }
/* The quick answer's steps while it runs (user, 2026-11-23). */
.pj-qsteps { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; font-size: var(--rp-text-md); line-height: 24px; color: var(--rp-text-subtle); }
.pj-qsteps__step { display: flex; align-items: center; gap: 8px; }
.pj-qsteps__step > svg, .pj-qsteps__fold > svg { width: 14px; height: 14px; flex: none; }
.pj-qsteps__step.is-done { color: var(--rp-text-muted); }
.pj-qsteps__step.is-next { color: var(--rp-text-muted); opacity: 0.7; }
.pj-qsteps__dot { width: 14px; height: 14px; flex: none; display: inline-grid; place-items: center; }
.pj-qsteps__dot::before { content: ""; width: 4px; height: 4px; border-radius: 50%; background: currentColor; }
.pj-qsteps__time { font-size: var(--rp-text-xs); color: var(--rp-text-muted); font-variant-numeric: tabular-nums; }
.pj-qsteps__qs { display: flex; flex-wrap: wrap; gap: 4px; padding-inline-start: 22px; margin: 2px 0 4px; }
.pj-qsteps__q { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: var(--rp-text-xs); line-height: 20px; padding: 0 8px; border: 1px solid var(--rp-border); border-radius: 999px; color: var(--rp-text-subtle); }
.pj-qsteps .pj-kv--live { padding-inline-start: 22px; margin: 0 0 4px; }
.pj-qsteps__fold { display: flex; align-items: center; gap: 6px; margin: 0 0 8px; font-size: var(--rp-text-xs); color: var(--rp-text-muted); }
.pj-kv--live > span:first-child { color: inherit; font-weight: 400; }
.pj-kv__model.is-done { color: var(--rp-text); }
.pj-kv__model.is-failed { color: var(--rp-danger-text); }
/* The margin rail (2026-11-16, option A, replacing the claim underlines): a
   bar on the inline-start side of each paragraph, list item or table with
   claims, solid when all were made by 2+ models, dashed when one model alone
   made any; its mean confidence on top. The bar is the button for the panel. */
.pj-rail { position: relative; padding-inline-start: 36px; border-radius: var(--rp-radius-sm); transition: background var(--rp-duration-fast); }
.pj-rail.is-open { background: var(--rp-hover-wash); }
.pj-rail__btn { position: absolute; inset-block: 2px; inset-inline-start: 0; display: flex; flex-direction: column; justify-content: flex-start; align-items: flex-end; width: 28px; padding: 0; padding-inline-end: 9px; border: 0; border-radius: var(--rp-radius-sm); background: none; color: var(--rp-text-muted); text-align: end; cursor: pointer; }
.pj-rail__btn::after { content: ""; position: absolute; inset-block: 0; inset-inline-end: 2px; border-inline-start: 3px solid var(--rp-info); border-radius: 2px; }
.pj-rail--single > .pj-rail__btn::after { inset-inline-end: 2.5px; border-inline-start: 2px dashed var(--rp-text-subtle); border-radius: 0; }
.pj-rail__n { display: block; padding-top: 0.25em; font-size: var(--rp-text-2xs); font-weight: 500; line-height: 1.4; font-variant-numeric: tabular-nums; }
.pj-rail--shared .pj-rail__n { color: var(--rp-info-text); }
.pj-rail__btn:hover, .pj-rail.is-open > .pj-rail__btn { color: var(--rp-text); }
.pj-rail__btn:focus-visible { outline: 2px solid var(--rp-focus); outline-offset: 1px; }
/* Kavosh's hover card (2026-11-16, option A): the session card's dark look
   (.pj-hovercard), but it takes the pointer so a row can light its claim. */
.pj-hovercard--kv { pointer-events: auto; width: max-content; max-width: 320px; }
.pj-kvh__rows { display: grid; gap: 1px; margin: 6px -6px 0; }
.pj-kvh__row { display: grid; grid-template-columns: 22px minmax(0, 1fr) auto; gap: 8px; align-items: baseline; padding: 3px 6px; border-radius: var(--rp-radius-sm); }
.pj-kvh__row:hover { background: var(--rp-chrome-surface-hover); }
.pj-kvh__n { font-weight: 500; font-variant-numeric: tabular-nums; }
.pj-kvh__w { color: var(--rp-chrome-text); overflow-wrap: anywhere; }
.pj-kvh__dots { display: inline-flex; gap: 3px; align-self: center; }
.pj-kvh__dot { width: 6px; height: 6px; border-radius: 50%; background: var(--rp-chrome-text); }
.pj-kvh__dot.is-off { background: none; box-shadow: inset 0 0 0 1px var(--rp-chrome-text-muted); }
.pj-kvh__line { display: flex; align-items: center; gap: 6px; margin-top: 4px; }
.pj-kvh__foot { margin-top: 6px; padding-top: 6px; border-top: 0.5px solid var(--rp-chrome-surface-hover); color: var(--rp-chrome-text-muted); }
.pj-kvw { border-radius: 2px; transition: background var(--rp-duration-fast), box-shadow var(--rp-duration-fast); }
.pj-kvw.is-lit { background: var(--rp-info-soft); box-shadow: 0 0 0 2px var(--rp-info-soft); }
.pj-kvn:focus-visible { outline: 2px solid var(--rp-focus); outline-offset: 1px; }
.pj-kvclaim { margin: 10px 0 4px; padding: 12px 14px; border: 0.5px solid var(--rp-border); border-radius: var(--rp-radius-md); background: var(--rp-surface); font-size: var(--rp-text-sm); }
.pj-kvclaim__head { display: flex; align-items: center; gap: 10px; }
.pj-kvclaim__conf { color: var(--rp-text); font-weight: 600; font-variant-numeric: tabular-nums; }
.pj-kvclaim__facts { flex: 1; color: var(--rp-text-muted); }
.pj-kvclaim__close { display: inline-flex; padding: 4px; border: 0; border-radius: var(--rp-radius-sm); background: none; color: var(--rp-text-muted); cursor: pointer; }
.pj-kvclaim__close:hover { background: var(--rp-hover-wash); color: var(--rp-text); }
.pj-kvclaim__close svg { width: 14px; height: 14px; }
.pj-kvclaim__note { margin: 8px 0 0; color: var(--rp-text-subtle); }
.pj-kvclaim__list { display: grid; gap: 6px; margin: 10px 0 0; padding: 0; list-style: none; }
.pj-kvclaim__list li { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 10px; }
.pj-kvclaim__model { display: flex; flex-direction: column; color: var(--rp-text-muted); font-size: var(--rp-text-xs); line-height: 1.6; }
.pj-kvclaim__self { color: var(--rp-text-subtle); font-size: var(--rp-text-2xs); font-variant-numeric: tabular-nums; }
.pj-kvclaim__text { color: var(--rp-text); }
.pj-kvclaim__top { display: flex; align-items: center; gap: 10px; }
.pj-kvclaim__claims { display: grid; gap: 12px; margin: 8px 0 0; padding: 0; list-style: none; }
.pj-kvclaim__claim + .pj-kvclaim__claim { padding-top: 12px; border-top: 0.5px solid var(--rp-border); }
.pj-kvclaim__claim .pj-kvclaim__list { margin-top: 6px; }
.pj-kvclaim__how { margin: 10px 0 0; color: var(--rp-text-muted); font-size: var(--rp-text-xs); }
/* The compare page (2026-11-16): each model's own answer side by side, a
   claim's confidence as a small number after its words (no underlines). */
.pj-kv__cmp { color: var(--rp-info-text); text-decoration: none; }
.pj-kv__cmp:hover { text-decoration: underline; text-underline-offset: 0.25em; }
.pj-page.pj-kvcmp-page { max-width: 1320px; }
.pj-kvcmp__asked { display: flex; gap: 8px; margin: 0 0 8px; font-size: var(--rp-text-sm); }
.pj-kvcmp__asked > span:first-child { color: var(--rp-text-muted); flex: none; }
.pj-kvcmp { display: grid; grid-template-columns: repeat(var(--pj-kvcmp-cols, 3), minmax(0, 1fr)); gap: 16px; margin: 12px 0 20px; align-items: start; }
.pj-kvcmp__col { min-width: 0; padding: 14px 16px; border: 0.5px solid var(--rp-border); border-radius: var(--rp-radius-md); background: var(--rp-surface); }
.pj-kvcmp__col.is-empty { background: none; border-style: dashed; }
.pj-kvcmp__model { margin: 0 0 8px; color: var(--rp-text); font-size: var(--rp-text-sm); font-weight: 600; }
.pj-kvcmp__none { margin: 0; color: var(--rp-text-muted); font-size: var(--rp-text-sm); }
.pj-kvcmp__body { font-size: var(--rp-text-sm); }
.pj-kvcmp__more { margin: 12px 0 0; padding: 10px 0 0; border-top: 0.5px solid var(--rp-border); font-size: var(--rp-text-xs); }
.pj-kvcmp__morehead { margin: 0 0 6px; color: var(--rp-text-muted); }
.pj-kvcmp__more ul { display: grid; gap: 4px; margin: 0; padding: 0; list-style: none; color: var(--rp-text-subtle); }
.pj-kvn { display: inline-block; margin-inline-start: 4px; padding: 0 5px; border: 0.5px solid var(--rp-border-bold); border-radius: var(--rp-radius-sm); color: var(--rp-text-muted); font-size: var(--rp-text-2xs); font-weight: 500; line-height: 1.5; font-variant-numeric: tabular-nums; vertical-align: 0.1em; cursor: default; }
.pj-kvn--shared { border-color: var(--rp-info); color: var(--rp-info-text); }
@media (max-width: 900px) { .pj-kvcmp { grid-template-columns: minmax(0, 1fr); } }

/* ── How it was checked (user, 2026-11-16) ─────────────────────────
   The report's review on top of the Trajectory tab: the score, the rubric as
   a radar (pass zone 4-5 shaded, the delivered shape in ink, a dip below the
   pass line in amber), the source grades as a donut (verified count in the
   middle) and the user's questions as tiles. Colour carries meaning only:
   the source grades and a point below the bar. Plus the Report tab's one
   line, and the score on workspace report rows. */
.pj-rev {
  display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(210px, 1fr); gap: 20px 28px; align-items: start;
  margin: 0 0 24px; padding: 18px 20px; box-sizing: border-box;
  border: 0.5px solid var(--rp-border); border-radius: var(--rp-radius-lg); background: var(--rp-surface);
}
@media (max-width: 640px) { .pj-rev { grid-template-columns: minmax(0, 1fr); padding: 14px; } }
.pj-rev__col { min-width: 0; }
.pj-rev__head { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.pj-rev__score { display: inline-flex; align-items: baseline; gap: 2px; color: var(--rp-heading); }
.pj-rev__score b { font-size: var(--rp-text-xl); font-weight: 600; line-height: 1.2; }
.pj-rev__score span { font-size: var(--rp-text-sm); color: var(--rp-text-muted); }
.pj-rev__score.is-below b { color: var(--rp-warning-text); }
.pj-rev__verdict { font-size: var(--rp-text-sm); color: var(--rp-text-muted); }
.pj-rev__verdict.is-below { color: var(--rp-warning-text); }
.pj-rev__by, .pj-rev__note { margin: 4px 0 0; font-size: var(--rp-text-xs); line-height: 18px; color: var(--rp-text-muted); }
.pj-rev__line { margin: 8px 0 0; font-size: var(--rp-text-sm); line-height: 20px; color: var(--rp-text); }
.pj-rev__toggle { font-size: var(--rp-text-sm); }
.pj-rev__radar { display: block; width: 100%; max-width: 420px; height: auto; margin-top: 6px; direction: ltr; }
.pj-rev__band { fill: var(--rp-surface-sunken); }
.pj-rev__pass { fill: var(--rp-surface); stroke: var(--rp-border-strong); stroke-width: 1; stroke-dasharray: 3 3; }
.pj-rev__grid { fill: none; stroke: var(--rp-border); stroke-width: 1; }
.pj-rev__shape { fill: color-mix(in srgb, var(--rp-heading) 8%, transparent); stroke: var(--rp-heading); stroke-width: 1.75; stroke-linejoin: round; }
.pj-rev__first { fill: none; stroke: var(--rp-text-muted); stroke-width: 1.5; stroke-dasharray: 4 3; }
.pj-rev__pt { fill: var(--rp-heading); }
.pj-rev__pt.is-low { fill: var(--rp-warning-indicator); }
.pj-rev__axis { font-size: 12px; fill: var(--rp-text-muted); font-family: inherit; }
.pj-rev__axis.is-low { fill: var(--rp-warning-text); font-weight: 600; }
.pj-rev__legend { display: flex; align-items: center; gap: 6px 10px; flex-wrap: wrap; margin: 6px 0 0; font-size: var(--rp-text-xs); color: var(--rp-text-muted); }
.pj-rev__key { display: inline-block; width: 16px; border-top: 2px solid var(--rp-heading); }
.pj-rev__key--first { border-top: 1.5px dashed var(--rp-text-muted); margin-inline-start: 6px; }
.pj-rev__block + .pj-rev__block { margin-top: 20px; }
.pj-rev__h { margin: 0 0 10px; font-size: var(--rp-text-md); font-weight: 500; color: var(--rp-heading); }
.pj-rev__donutrow { display: flex; align-items: center; gap: 16px; }
.pj-rev__donut { flex: none; direction: ltr; }
.pj-rev__seg { fill: none; stroke-width: 10; }
.pj-rev__seg--verified { stroke: var(--rp-success-indicator); }
.pj-rev__seg--media { stroke: var(--rp-info-indicator); }
.pj-rev__seg--web { stroke: var(--rp-warning-indicator); }
.pj-rev__seg--estimate { stroke: var(--rp-fill-bold); }
.pj-rev__dnum { font-size: 18px; font-weight: 600; fill: var(--rp-heading); font-family: inherit; }
.pj-rev__dsub { font-size: 6.5px; fill: var(--rp-text-muted); font-family: inherit; }
.pj-rev__legendlist { flex: 1; min-width: 0; margin: 0; display: grid; gap: 6px; }
.pj-rev__lg { display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: var(--rp-text-sm); }
.pj-rev__lg dt { display: inline-flex; align-items: center; gap: 8px; color: var(--rp-text); white-space: nowrap; }
.pj-rev__lg dd { margin: 0; color: var(--rp-text-muted); font-variant-numeric: tabular-nums; }
.pj-rev__sw { width: 10px; height: 10px; border-radius: 50%; flex: none; }
.pj-rev__lg--verified .pj-rev__sw { background: var(--rp-success-indicator); }
.pj-rev__lg--media .pj-rev__sw { background: var(--rp-info-indicator); }
.pj-rev__lg--web .pj-rev__sw { background: var(--rp-warning-indicator); }
.pj-rev__lg--estimate .pj-rev__sw { background: var(--rp-fill-bold); }
.pj-rev__tiles { display: flex; gap: 3px; }
.pj-rev__tile {
  flex: 1; min-width: 6px; height: 12px; padding: 0; border: 0; border-radius: 3px; cursor: pointer;
  background: var(--rp-success-indicator); transition: transform var(--rp-duration-fast), opacity var(--rp-duration-fast);
}
.pj-rev__tile:hover { transform: scaleY(1.35); }
.pj-rev__tile--thin { background: var(--rp-warning-indicator); }
.pj-rev__tile--missing { background: transparent; box-shadow: inset 0 0 0 1.5px var(--rp-warning-indicator); }

/* The verified ring: the Report bar's meta line (projects-docpane.css) and the Review tab. */
.pj-rev__ring { width: 18px; height: 18px; flex: none; }
.pj-rev__ringbg { fill: none; stroke: var(--rp-fill); stroke-width: 14; }
.pj-rev__ringfg { fill: none; stroke: var(--rp-success-indicator); stroke-width: 14; }

/* Workspace report rows: the score at the row's end. */
.pj-wsr__score { display: inline-flex; align-items: center; gap: 6px; flex: none; color: var(--rp-heading); font-size: var(--rp-text-md); }
.pj-wsr__score b { font-weight: 600; font-variant-numeric: tabular-nums; }
.pj-wsr__score.is-below b { color: var(--rp-warning-text); }
.pj-wsr__below { color: var(--rp-warning-text); }

/* Web images above a Chat answer (2026-11-28, layout A): up to four tiles,
   the first twice as wide, the last one +N when there are more. Over a photo
   the +N wash and its text are fixed dark and white in both themes. */
.pj-imgs { display: flex; gap: 6px; height: 148px; margin: 2px 0 14px; }
.pj-imgs__tile {
  position: relative; flex: 1 1 0; min-width: 0; padding: 0; border: 0; border-radius: var(--rp-radius-md);
  overflow: hidden; background: var(--rp-surface-sunken); cursor: zoom-in;
}
.pj-imgs__tile:first-child { flex-grow: 2; }
.pj-imgs__tile:only-child { flex: 0 1 50%; }
.pj-imgs__img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform var(--rp-duration-base) var(--rp-ease-out); }
.pj-imgs__tile:hover .pj-imgs__img { transform: scale(1.03); }
.pj-imgs__tile:focus-visible { outline: 2px solid var(--rp-focus); outline-offset: 2px; }
.pj-imgs__more {
  position: absolute; inset: 0; display: grid; place-items: center;
  background: color-mix(in srgb, var(--rp-ink-950) 52%, transparent); color: var(--rp-white);
  font-size: var(--rp-text-md); font-weight: 500; font-variant-numeric: tabular-nums;
  direction: ltr; unicode-bidi: isolate; /* the sign stays left of the figure in Farsi too */
}
@media (max-width: 560px) {
  .pj-imgs { height: 112px; }
}
@media (prefers-reduced-motion: reduce) {
  .pj-imgs__img { transition: none; }
  .pj-imgs__tile:hover .pj-imgs__img { transform: none; }
}

/* The image viewer: one picture large, its title, site and page. */
.pj-imgview { position: fixed; inset: 0; z-index: 1200; display: grid; place-items: center; width: auto; max-width: none; margin: 0; padding: 24px; box-sizing: border-box; }
.pj-imgview__scrim { position: absolute; inset: 0; background: color-mix(in srgb, var(--rp-ink-950) 64%, transparent); }
.pj-imgview__card {
  position: relative; display: flex; flex-direction: column; width: min(720px, 100%); max-height: 100%; margin: 0;
  border-radius: var(--rp-radius-xl); background: var(--rp-surface); box-shadow: var(--rp-shadow-lg); overflow: hidden;
}
/* A fixed stage height, so the card doesn't jump between pictures of different shapes.
   The photo is taken out of flow: as a grid item its intrinsic size ignores the
   stage height and paints over the caption, leaving only the tail of the title
   in the gutter beside it (a "made-in-china.com" line reading "de-in-china.com"). */
.pj-imgview__stage { position: relative; height: min(58vh, 440px); background: var(--rp-surface-sunken); overflow: hidden; }
.pj-imgview__img { position: absolute; inset: 0; margin: auto; width: auto; height: auto; max-width: 100%; max-height: 100%; object-fit: contain; }
.pj-imgview__nav, .pj-imgview__close {
  position: absolute; display: grid; place-items: center; width: 36px; height: 36px; padding: 0;
  border: 0.5px solid var(--rp-border); border-radius: var(--rp-radius-pill); background: var(--rp-surface); color: var(--rp-text); cursor: pointer;
  box-shadow: var(--rp-shadow-sm);
}
.pj-imgview__nav:hover, .pj-imgview__close:hover { background: var(--rp-hover-wash); }
.pj-imgview__nav:focus-visible, .pj-imgview__close:focus-visible { outline: 2px solid var(--rp-focus); outline-offset: 2px; }
.pj-imgview__nav svg, .pj-imgview__close svg { width: 16px; height: 16px; }
.pj-imgview__nav { top: 50%; margin-top: -18px; }
.pj-imgview__nav--prev { inset-inline-start: 12px; }
.pj-imgview__nav--next { inset-inline-end: 12px; }
.pj-imgview__nav--prev svg, html[dir="rtl"] .pj-imgview__nav--next svg { transform: scaleX(-1); }
html[dir="rtl"] .pj-imgview__nav--prev svg { transform: none; }
.pj-imgview__close { top: 12px; inset-inline-end: 12px; }
.pj-imgview__cap { display: flex; align-items: center; gap: 12px; padding: 12px 16px; }
.pj-imgview__copy { display: flex; flex: 1; flex-direction: column; gap: 2px; min-width: 0; }
.pj-imgview__t { overflow: hidden; color: var(--rp-heading); font-size: var(--rp-text-sm); font-weight: 500; white-space: nowrap; text-overflow: ellipsis; }
.pj-imgview__from { overflow: hidden; color: var(--rp-text-muted); font-size: var(--rp-text-2xs); white-space: nowrap; text-overflow: ellipsis; }
.pj-imgview__cap .pj-btn { flex: none; }

/* ── Pay sheet (projects-pay.js; sheet option B, 2026-11-28) ─────────────
   The month, then the wallet, one total, one button. Sits in a .pj-sethost
   like Settings, narrower; a phone gets the full screen. */
.pj-payhost { place-items: center; }
.pj-pay {
  position: relative; display: flex; flex-direction: column; gap: 14px; width: min(420px, 100%); max-height: calc(100dvh - 32px); overflow: auto;
  padding: 20px 22px 22px; border-radius: var(--rp-radius-panel); background: var(--rp-surface);
  box-shadow: 0 0 0 0.5px var(--rp-border), var(--rp-shadow-lg); animation: pj-set-in 160ms var(--rp-ease-out) both;
}
.pj-pay:focus { outline: none; }
.pj-pay__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.pj-pay__title { margin: 0; font-size: var(--rp-text-lg); font-weight: 600; color: var(--rp-heading); }
.pj-pay__head .pj-icon-btn svg { width: 16px; height: 16px; }
.pj-pay__part { display: flex; flex-direction: column; gap: 8px; padding-top: 14px; border-top: 0.5px solid var(--rp-border); }
.pj-pay__part:first-of-type { padding-top: 0; border-top: 0; }
.pj-pay__step { display: flex; align-items: center; gap: 8px; margin: 0; font-size: var(--rp-text-xs); font-weight: 600; color: var(--rp-text-secondary); }
.pj-pay__num { display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 999px; background: var(--rp-surface-muted); color: var(--rp-text-secondary); font-size: var(--rp-text-xs); }
.pj-pay__line { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; font-size: var(--rp-text-md); color: var(--rp-text); }
.pj-pay__line b { font-weight: 600; color: var(--rp-heading); white-space: nowrap; }
.pj-pay__hint { margin: 0; font-size: var(--rp-text-xs); color: var(--rp-text-subtle); }
.pj-pay__chips { display: flex; flex-wrap: wrap; gap: 6px; }
/* The picked amount is filled, like the dock's lit segment: a money choice must read at a glance. */
.pj-pay__chip[aria-pressed="true"], .pj-pay__chip[aria-pressed="true"]:hover { border-color: var(--rp-heading); background: var(--rp-heading); color: var(--rp-surface); }
.pj-pay__other { display: inline-flex; align-items: center; gap: 8px; font-size: var(--rp-text-sm); color: var(--rp-text-secondary); }
.pj-pay__other input { width: 170px; height: 32px; padding: 0 12px; border: 0.5px solid var(--rp-border-control); border-radius: var(--rp-radius-lg); background: var(--rp-surface); color: var(--rp-text); font: inherit; font-size: var(--rp-text-sm); }
.pj-pay__other input:focus { outline: 2px solid var(--rp-focus); outline-offset: -1px; }
.pj-pay__total { padding-top: 14px; border-top: 0.5px solid var(--rp-border); font-weight: 600; }
.pj-pay__err { margin: 0; font-size: var(--rp-text-xs); color: var(--rp-danger-text); }
.pj-pay__go { width: 100%; }
.pj-pay button:focus-visible { outline: 2px solid var(--rp-focus); outline-offset: 1px; }
@media (max-width: 640px) {
  .pj-payhost { padding: 0; place-items: stretch; }
  .pj-pay { width: 100%; max-height: none; height: 100dvh; border-radius: 0; }
}

/* ── The original app's Billing page (billing-page.js; option A, 2026-11-29) ──
   The projects app's Billing tab outside the projects app: the same parts,
   so it takes the same variables the Settings dialog sets. */
.pj-billpage {
  --pj-radius: var(--rp-radius-xl);
  --pj-line: var(--rp-border);
  --pj-soft: var(--rp-surface-muted);
  --pj-shadow: var(--rp-shadow-sm);
  --pj-shadow-hover: var(--rp-shadow-md);
  --pj-accent: var(--rp-text);
  --pj-accent-hover: var(--rp-text-secondary);
  --pj-accent-tint: var(--rp-fill);
  --pj-on-accent: var(--rp-surface);
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 760px;
}
.pj-billpage[hidden] { display: none; }
.pj-billpage *, .pj-billpage *::before, .pj-billpage *::after { box-sizing: border-box; }
.pj-billpage svg { flex: none; }
.pj-billpage .pj-btn--primary { --pj-accent: var(--rp-action); --pj-accent-hover: var(--rp-action-hover); }
/* "Have a code?" under the cards (both Billing pages): a quiet link that opens the form. */
.pj-bill__codeline { margin: 0; }
.pj-bill__code { align-items: center; padding: 0; }
.pj-bill__code .pj-set__link { flex: none; }

/* Agents (#/agents): a catalog, then the Database agent's request, plan and tables. */
.pj-ag { display: flex; flex-direction: column; gap: 20px; min-width: 0; }
.pj-ag__crumb { color: var(--rp-text-subtle); font-size: var(--rp-text-sm); text-decoration: none; }
.pj-ag__crumb:hover { color: var(--rp-heading); }
html[dir="rtl"] .pj-ag__back > svg { transform: scaleX(-1); }
.pj-ag__field { display: flex; flex-direction: column; gap: 8px; color: var(--rp-text); font-size: var(--rp-text-sm); }
.pj-ag__request {
  width: 100%; min-height: 120px; margin: 0; padding: 12px 14px; box-sizing: border-box;
  border: 1px solid var(--rp-border-control); border-radius: var(--rp-radius-lg);
  background: var(--rp-surface); color: var(--rp-text); font: inherit; font-size: var(--rp-text-md); line-height: 1.55;
  resize: vertical;
}
/* iOS zooms the page when a field is under 16px. Same floor as the composer. */
@media (max-width: 767px) {
  .pj .pj-ag__request { font-size: max(16px, var(--rp-text-md)); }
}
.pj-ag__acts { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; }
.pj-ag__hint { font-size: var(--rp-text-sm); color: var(--rp-text-subtle); }
/* One database's own page: the way back, its name and state, what was asked. */
.pj-ag__all { display: inline-flex; align-self: flex-start; align-items: center; gap: 6px; font-size: var(--rp-text-sm); color: var(--rp-text-subtle); text-decoration: none; }
.pj-ag__all svg { width: 14px; height: 14px; }
.pj-ag__all:hover { color: var(--rp-heading); }
.pj-ag__titlerow { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; min-width: 0; }
.pj-ag__titlerow .pj-page__title { min-width: 0; margin: 0; overflow-wrap: anywhere; }
.pj-ag__end { margin-inline-start: auto; }
.pj-ag__record .pj-ag__meta { margin-top: 4px; }
.pj-ag__quote { margin: 0; padding-inline-start: 12px; border-inline-start: 2px solid var(--rp-border-strong); }
.pj-ag__quote figcaption { font-size: var(--rp-text-xs); color: var(--rp-text-subtle); }
.pj-ag__quote blockquote { max-height: 8.5em; margin: 2px 0 0; overflow: auto; font-size: var(--rp-text-md); line-height: var(--rp-leading-body); color: var(--rp-text); white-space: pre-wrap; overflow-wrap: anywhere; }
/* The words keep their own direction and stay beside the rule. */
[dir="rtl"] .pj-ag__quote blockquote { text-align: right; }
.pj-ag__status { flex: none; padding: 1px 10px; border-radius: 999px; background: var(--rp-surface-sunken); color: var(--rp-text-subtle); font-size: var(--rp-text-xs); font-weight: 500; line-height: 20px; white-space: nowrap; }
.pj-ag__status--ready { background: var(--rp-success-soft); color: var(--rp-success-text); }
.pj-ag__status--planned { background: var(--rp-warning-soft); color: var(--rp-warning-text); }
.pj-ag__status--failed { background: var(--rp-danger-soft); color: var(--rp-danger-text); }
.pj-ag__line { display: flex; align-items: baseline; gap: 10px; min-width: 0; }
.pj-ag .pj-src-row__meta.pj-ag__line { white-space: nowrap; }
.pj-ag__ask { flex: 0 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pj-ag__when { flex: none; font-variant-numeric: tabular-nums; }
.pj-ag__open .pj-src-row__copy { flex: 1; min-width: 0; }
.pj-ag__menu { white-space: nowrap; }
/* On a phone the name needs the row: no tile, and the state goes underneath. */
@media (max-width: 767px) {
  .pj-ag__run .pj-ag__open { flex-direction: column; align-items: flex-start; gap: 4px; }
  .pj-ag__run .pj-ag__open .pj-ag__avatar { display: none; }
  .pj-ag__run .pj-ag__open .pj-src-row__copy { flex: none; width: 100%; }
  .pj-ag__line { flex-direction: column; align-items: flex-start; gap: 0; }
  .pj-ag__ask { max-width: 100%; }
}
.pj-ag__list { margin: 8px 0 0; }
.pj-ag__meta { margin: 0; font-size: var(--rp-text-sm); color: var(--rp-text-subtle); }
/* The plan, as a spec sheet: label rail, hairline sections, price beside Run. */
.pj-plan.pj-agplan { padding: 0; overflow: hidden; }
.pj-agplan__head { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; padding: 12px 16px; border-bottom: 0.5px solid var(--rp-border); }
.pj-agplan__title { font-size: var(--rp-text-md); font-weight: var(--rp-weight-semibold); color: var(--rp-heading); }
.pj-agplan__counts { margin-inline-start: auto; font-size: var(--rp-text-sm); color: var(--rp-text-subtle); }
.pj-agplan__row { display: grid; grid-template-columns: 112px minmax(0, 1fr); gap: 6px 16px; padding: 14px 16px; }
.pj-agplan__row + .pj-agplan__row { border-top: 0.5px solid var(--rp-border); }
.pj-agplan__label { font-size: var(--rp-text-sm); line-height: var(--rp-leading-body); color: var(--rp-text-subtle); }
.pj-agplan__body { min-width: 0; }
.pj-agplan__tables, .pj-agplan__cols, .pj-agplan__searches { margin: 0; padding: 0; list-style: none; }
.pj-agplan__tables { display: flex; flex-direction: column; gap: 18px; }
.pj-agplan__name {
  display: block; text-align: start; overflow-wrap: anywhere;
  font-family: var(--rp-font-mono); font-size: var(--rp-text-md); font-weight: var(--rp-weight-semibold);
  line-height: var(--rp-leading-body); color: var(--rp-heading);
}
/* The name is left to right; it still starts where the page starts. */
[dir="rtl"] .pj-agplan__name { text-align: right; }
.pj-agplan__cols { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(140px, 100%), 1fr)); column-gap: 16px; margin-top: 6px; }
.pj-agplan__cols li {
  min-width: 0; padding: 5px 0; border-top: 0.5px solid var(--rp-border-subtle); overflow-wrap: anywhere;
  font-family: var(--rp-font-mono); font-size: var(--rp-text-sm); line-height: var(--rp-leading-ui); color: var(--rp-text);
}
.pj-agplan__note { margin: 8px 0 0; font-size: var(--rp-text-xs); color: var(--rp-text-subtle); }
.pj-agplan__searches { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.pj-agplan__searches li { display: flex; align-items: baseline; gap: 10px; font-size: var(--rp-text-md); line-height: var(--rp-leading-body); color: var(--rp-text); }
.pj-agplan__searches bdi { min-width: 0; overflow-wrap: anywhere; }
.pj-agplan__lang {
  flex: none; width: 26px; text-align: center; font-size: var(--rp-text-xs); line-height: 16px;
  color: var(--rp-text-subtle); border: 0.5px solid var(--rp-border-strong); border-radius: var(--rp-radius-sm);
}
.pj-agplan__foot { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; padding: 12px 16px; border-top: 0.5px solid var(--rp-border); background: var(--rp-surface-sunken); }
.pj-agplan__cost { display: flex; flex-direction: column; flex: 1; min-width: 0; font-size: var(--rp-text-sm); line-height: var(--rp-leading-body); color: var(--rp-text); }
.pj-agplan__muted { font-size: var(--rp-text-xs); color: var(--rp-text-subtle); }
.pj-agplan__muted > span { display: block; }
.pj-agplan__foot .pj-btn svg { width: 14px; height: 14px; }
.pj-agplan__spin { flex: none; color: var(--rp-agent-blue); }
@media (max-width: 560px) {
  .pj-agplan__row { grid-template-columns: minmax(0, 1fr); }
  .pj-agplan__counts { flex-basis: 100%; margin-inline-start: 0; }
}
/* Wider than the page. The scroller has to be allowed to shrink, or the table
   spills off the inline end and the source column is clipped. */
.pj-ag > section { min-width: 0; }
.pj-ag__place { position: relative; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.pj-ag__tabs { margin: 0 0 14px; overflow-x: auto; }
.pj-ag__tabs .pj-tabs__tab { flex: none; border: 0; padding-inline: 0; background: transparent; font-family: inherit; cursor: pointer; }
/* A column's header and cells share one edge, set by the table's direction. */
.pj-ag-scroll[dir="ltr"] .pj-ag-table :is(th, td) { text-align: left; }
.pj-ag-scroll[dir="rtl"] .pj-ag-table :is(th, td) { text-align: right; }
.pj-ag__place .pj-menu__item { white-space: nowrap; }
/* The workspace menu is 300px and pinned to the button. On a phone that
   hangs off the screen, so it spans the action row instead. */
@media (max-width: 640px) {
  .pj-ag__place .pj-pick__wrap { position: static; }
  .pj-ag__place .pj-pick__menu--wide {
    inset-inline: 0; width: auto; min-width: 0; max-width: 100%;
  }
  .pj-ag__place .pj-menu__item > span {
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  }
}
.pj-ag__tablehead { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-width: 0; margin-bottom: 12px; }
.pj-ag__tablehead .pj-src-sec__title { flex: 1; min-width: 0; margin: 0; }
.pj-ag__tablehead .pj-bidi { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pj-ag__tablehead .pj-src-sec__ws { flex: none; }
.pj-ag__tablehead .pj-btn { flex: none; }
@media (max-width: 767px) {
  .pj-ag__tablehead { flex-wrap: wrap; }
  .pj-ag__tablehead .pj-src-sec__title { flex-basis: 100%; }
}
.pj-ag__menunote { margin: 0; padding: 8px 12px; font-size: var(--rp-text-sm); color: var(--rp-text-subtle); }
.pj-ag-scroll { overflow: auto; max-width: 100%; min-width: 0; max-height: 70vh; border: 1px solid var(--rp-border); border-radius: var(--rp-radius-lg); }
.pj-ag-table { width: max-content; min-width: 100%; border-collapse: collapse; font-size: var(--rp-text-sm); }
.pj-ag-table th, .pj-ag-table td {
  padding: 8px 10px; border-bottom: 1px solid var(--rp-border); text-align: start; white-space: nowrap;
  color: var(--rp-text);
}
.pj-ag-table th { position: sticky; top: 0; z-index: 1; font-weight: 500; color: var(--rp-text-subtle); background: var(--rp-surface-sunken); }
.pj-ag-table td[dir="ltr"] { max-width: 280px; overflow: hidden; text-overflow: ellipsis; }
.pj-ag-table__url { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
.pj-ag-table__url:hover { color: var(--rp-heading); }
.pj-ag-table__url + .pj-ag-table__url { margin-inline-start: 10px; }
.pj-ag__note { margin: 8px 0 0; font-size: var(--rp-text-sm); color: var(--rp-text-subtle); }
.pj-ag__id { display: flex; align-items: flex-start; gap: 16px; min-width: 0; }
/* The agent tile: the icon in the agent's colour on a pale wash of it. The
   :is() outranks the row and card-head svg sizes. */
.pj-ag__avatar { display: grid; place-items: center; flex: none; width: 44px; height: 44px; border-radius: var(--rp-radius-md); color: var(--pj-agent-hue); background: color-mix(in srgb, var(--pj-agent-hue) 14%, transparent); }
:is(.pj-ag, .pj-plan) .pj-ag__avatar svg { display: block; width: 28px; height: 28px; color: inherit; }
.pj-ag__avatar--lg { width: 64px; height: 64px; border-radius: var(--rp-radius-xl); }
:is(.pj-ag, .pj-plan) .pj-ag__avatar--lg svg { width: 40px; height: 40px; }
.pj-ag__avatar--sm { width: 28px; height: 28px; border-radius: var(--rp-radius-sm); }
:is(.pj-ag, .pj-plan) .pj-ag__avatar--sm svg { width: 18px; height: 18px; }
.pj-ag-hue--blue { --pj-agent-hue: var(--rp-agent-blue); }
.pj-ag-hue--violet { --pj-agent-hue: var(--rp-agent-violet); }
.pj-ag-hue--amber { --pj-agent-hue: var(--rp-agent-amber); }
.pj-ag-hue--pink { --pj-agent-hue: var(--rp-agent-pink); }
.pj-ag-hue--orange { --pj-agent-hue: var(--rp-agent-orange); }
.pj-ag .pj-src-row { align-items: center; }
.pj-ag__run { cursor: default; }
.pj-ag .pj-ctxrow__acts { opacity: 1; }
.pj-ag__open {
  display: flex; align-items: center; gap: 14px; flex: 1; min-width: 0;
  color: inherit; text-decoration: none;
}
.pj-ag__open:hover .pj-src-row__name { text-decoration: underline; text-underline-offset: 3px; }
.pj-ag__open:focus-visible { outline: 2px solid var(--rp-focus); outline-offset: 2px; border-radius: var(--rp-radius-sm); }
.pj-ag .pj-src-row__meta { overflow: visible; white-space: normal; text-overflow: clip; }
