/* The document pane (projects-docpane.js), DeepSeek Harness's file pane: the
   full height of the window on the end edge (right in en, left in fa), a
   hairline from the session, a strip with the document's tab and tools, a
   path line, and the page on a sunken backdrop. While it's open the work
   area makes room for it. */
html { --pj-docpane-w: clamp(420px, 46vw, 980px); }

.pj-docpane {
  position: fixed; top: 0; bottom: 0; inset-inline-end: 0; z-index: 55;
  display: flex; flex-direction: column; width: var(--pj-docpane-w); min-width: 0;
  background: var(--rp-surface); border-inline-start: 0.5px solid var(--rp-border);
  animation: pj-docpane-in 200ms var(--rp-ease-out) both;
}
.pj-docpane[hidden] { display: none; }
.pj-docpane.is-wide { width: 100vw; z-index: 70; }
html[dir="rtl"] .pj-docpane { animation-name: pj-docpane-in-rtl; }
@keyframes pj-docpane-in { from { opacity: 0; transform: translateX(16px); } }
@keyframes pj-docpane-in-rtl { from { opacity: 0; transform: translateX(-16px); } }
@media (prefers-reduced-motion: reduce) { .pj-docpane { animation: none; } }

html.pj-docpane-open[data-experience="projects"] .app-main { margin-inline-end: var(--pj-docpane-w); }
/* Full width: the pane (fixed, z 70) is stacked inside .app-main (z 1), under
   the Desk top bar (z 55); lift the work area for as long as it lasts. */
html.pj-docpane-wide .app-main { z-index: 60; }

/* The strip: a tab per open file (icon, name, ×) and the tools at the end:
   "Open with ▾", full width, close. */
.pj-docpane__strip {
  flex: none; display: flex; align-items: center; gap: 8px; height: 44px; padding: 0 8px;
  border-bottom: 0.5px solid var(--rp-border);
}
.pj-docpane__strip[hidden] { display: none; }
.pj-docpane__tabs { display: flex; flex: 1; align-items: center; gap: 4px; min-width: 0; overflow-x: auto; scrollbar-width: none; }
.pj-docpane__tab {
  display: inline-flex; flex: 0 1 auto; align-items: center; gap: 2px; min-width: 96px; max-width: 240px; height: 30px; padding-inline: 2px 4px;
  border-radius: var(--rp-radius-sm); color: var(--rp-text-muted); font-size: var(--rp-text-sm);
}
.pj-docpane__tab:hover { background: var(--rp-hover-wash); }
.pj-docpane__tab.is-on { background: var(--rp-wash-on); color: var(--rp-text); }
.pj-docpane__tabbtn {
  display: inline-flex; flex: 1; align-items: center; gap: 6px; min-width: 0; height: 100%; padding-inline: 8px 2px;
  border: 0; background: transparent; color: inherit; font: inherit; text-align: start; cursor: pointer;
}
.pj-docpane__tabbtn:focus-visible { outline: 2px solid var(--rp-focus); outline-offset: -2px; border-radius: var(--rp-radius-sm); }
.pj-docpane__tabicon { display: inline-flex; flex: none; color: var(--rp-danger-indicator); }
.pj-docpane__tabicon--slides { color: var(--rp-warning-indicator); }
.pj-docpane__tabicon--listen { color: var(--rp-info-indicator); }
.pj-docpane__tabicon svg { width: 14px; height: 14px; }
.pj-docpane__tabname { flex: 1; min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.pj-docpane__tools { display: inline-flex; flex: none; align-items: center; gap: 2px; margin-inline-start: auto; }
.pj-docpane__withwrap { position: relative; }
.pj-docpane__with {
  display: inline-flex; align-items: center; gap: 4px; height: 28px; padding: 0 8px; margin-inline-end: 4px;
  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-xs); cursor: pointer;
}
.pj-docpane__with:hover { background: var(--rp-hover-wash); }
.pj-docpane__with svg { width: 12px; height: 12px; color: var(--rp-text-subtle); }
.pj-docpane__with:focus-visible, .pj-docpane__menuitem:focus-visible { outline: 2px solid var(--rp-focus); outline-offset: 1px; }
.pj-docpane__menu {
  position: absolute; top: calc(100% + 4px); inset-inline-end: 0; z-index: 3; min-width: 200px; padding: 4px;
  border: 0.5px solid var(--rp-border); border-radius: var(--rp-radius-lg); background: var(--rp-surface); box-shadow: var(--rp-shadow-lg);
}
.pj-docpane__menuitem {
  display: flex; align-items: center; gap: 8px; width: 100%; min-height: 32px; padding: 6px 10px;
  border: 0; border-radius: var(--rp-radius-sm); background: transparent; color: var(--rp-text); font: inherit; font-size: var(--rp-text-sm); text-align: start; white-space: nowrap; cursor: pointer;
}
.pj-docpane__menuitem:hover { background: var(--rp-hover-wash); }
.pj-docpane__menuitem svg { width: 14px; height: 14px; color: var(--rp-text-muted); }
.pj-docpane__btn {
  display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; padding: 0;
  border: 0; border-radius: var(--rp-radius-sm); background: transparent; color: var(--rp-text-muted); cursor: pointer; text-decoration: none;
}
.pj-docpane__btn:hover { background: var(--rp-hover-wash); color: var(--rp-text); }
.pj-docpane__btn:focus-visible, .pj-docpane__qtoggle:focus-visible, .pj-docpane__q:focus-visible { outline: 2px solid var(--rp-focus); outline-offset: 1px; }
.pj-docpane__btn--sm { width: 22px; height: 22px; }
.pj-docpane__btn--sm svg { width: 13px; height: 13px; }

/* The path line, with "Your questions" at its end opening to the list. */
.pj-docpane__path {
  position: relative; flex: none; display: flex; align-items: center; gap: 8px; min-height: 34px; padding: 0 12px;
  border-bottom: 0.5px solid var(--rp-border-subtle); font-size: var(--rp-text-xs); color: var(--rp-text-subtle);
}
.pj-docpane__pathtext { flex: 1; min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.pj-docpane__qtoggle {
  flex: none; display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 8px;
  border: 0; border-radius: var(--rp-radius-sm); background: transparent; color: var(--rp-text); font: inherit; font-size: var(--rp-text-xs); font-weight: 500; cursor: pointer;
}
.pj-docpane__qtoggle:hover { background: var(--rp-hover-wash); }
.pj-docpane__qtoggle svg { width: 13px; height: 13px; color: var(--rp-text-subtle); transition: transform var(--rp-duration-fast); }
.pj-docpane__qtoggle[aria-expanded="true"] svg { transform: rotate(180deg); }
.pj-docpane__count { min-width: 16px; padding: 0 5px; border-radius: var(--rp-radius-pill); background: var(--rp-hover-wash); color: var(--rp-text-muted); line-height: 16px; text-align: center; }
.pj-docpane__qlist {
  position: absolute; top: calc(100% + 4px); inset-inline-end: 8px; z-index: 2; width: min(440px, calc(100% - 16px)); max-height: 50dvh; overflow: auto;
  margin: 0; padding: 4px; list-style: none;
  border: 0.5px solid var(--rp-border); border-radius: var(--rp-radius-lg); background: var(--rp-surface); box-shadow: var(--rp-shadow-lg);
}
.pj-docpane__q {
  display: flex; align-items: baseline; gap: 10px; width: 100%; padding: 6px 8px; box-sizing: border-box;
  border: 0; border-radius: var(--rp-radius-sm); background: transparent; color: var(--rp-text); font: inherit; font-size: var(--rp-text-sm); line-height: 20px; text-align: start; cursor: pointer;
}
.pj-docpane__q:hover { background: var(--rp-hover-wash); }
.pj-docpane__qn { flex: none; min-width: 18px; color: var(--rp-text-subtle); font-variant-numeric: tabular-nums; }

/* The page on its backdrop; the frame scrolls itself so the page's own
   panels (claims, contents) keep working. */
.pj-docpane__stage { position: relative; flex: 1; min-height: 0; background: var(--rp-surface-sunken); }
.pj-docpane__frame { position: absolute; inset: 0; display: block; width: 100%; height: 100%; border: 0; background: var(--rp-white); }
.pj-docpane__frame[hidden] { display: none; }
.pj-docpane__state {
  position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; padding: 24px; text-align: center;
}
.pj-docpane__stage[data-state="ready"] .pj-docpane__state { display: none; }
.pj-docpane__stateicon { display: inline-flex; color: var(--rp-text-subtle); }
.pj-docpane__stateicon svg { width: 22px; height: 22px; }
.pj-docpane__statetitle { margin: 4px 0 0; font-size: var(--rp-text-md); font-weight: 500; color: var(--rp-text); }
.pj-docpane__statesub { margin: 0; font-size: var(--rp-text-sm); color: var(--rp-text-subtle); }
.pj-docpane__spin { width: 18px; height: 18px; border: 2px solid var(--rp-border); border-top-color: var(--rp-text-muted); border-radius: 50%; animation: pj-docpane-spin 0.8s linear infinite; }
@keyframes pj-docpane-spin { to { transform: rotate(360deg); } }

/* No room for both: the pane covers the work area; its close leads back. */
@media (max-width: 940px) {
  html { --pj-docpane-w: 100vw; }
  html.pj-docpane-open[data-experience="projects"] .app-main { margin-inline-end: 0; }
}

/* The pane icon draws the pane on its own side. */
html[dir="rtl"] .pj-docpane__tools > .pj-docpane__btn:last-child svg { transform: scaleX(-1); }

/* Inline (a session's Report, Slides and Listen tabs): the pane fills the
   work area under the session's tabs. Slides and Listen draw their own bar;
   the Report's strip is that same bar (listen.css's Desk .bar, user
   2026-11-21): 48px inside the stage's frame, a meta line at the start,
   questions and one ⋯ at the end. */
.pj-docpane.is-inline {
  position: relative; inset: auto; z-index: auto; flex: 1; width: auto; min-height: 0;
  border-inline-start: 0; animation: none;
}
.pj-docpane.is-inline.is-wide { position: fixed; inset: 0; z-index: 70; width: auto; }
.pj-docpane.is-inline .pj-docpane__path:not(.has-share) { display: none; }
.pj-docpane.is-inline .pj-docpane__strip {
  height: 48px; padding: 0 10px 0 8px; gap: var(--rp-space-3);
  border: 0.5px solid var(--rp-border-subtle); background: var(--rp-surface);
}
.pj-docpane.is-inline.is-wide .pj-docpane__strip { border-width: 0 0 0.5px; }
.pj-docpane__meta {
  display: flex; flex: 1; align-items: center; gap: 8px; min-width: 0; padding-inline-start: 6px;
  font-size: var(--rp-text-xs); color: var(--rp-text-subtle); white-space: nowrap;
}
.pj-docpane__meta .pj-rev__ring { width: 14px; height: 14px; }
.pj-rev-meta__score { font-weight: 600; color: var(--rp-heading); }
.pj-rev-meta__score.is-below { color: var(--rp-warning-text); }
.pj-rev-meta__bits { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.pj-docpane__qwrap { position: relative; }
.pj-docpane.is-inline .pj-docpane__qtoggle {
  height: 30px; padding: 0 12px; color: var(--rp-text-muted); font-size: var(--rp-text-sm); font-weight: 500;
}
.pj-docpane.is-inline .pj-docpane__qtoggle:hover,
.pj-docpane.is-inline .pj-docpane__qtoggle[aria-expanded="true"] { color: var(--rp-text); }
.pj-docpane__qwrap .pj-docpane__qlist { top: calc(100% + 4px); inset-inline-end: 0; width: min(440px, calc(100vw - 32px)); }
.pj-docpane__more {
  display: grid; place-items: center; width: 30px; height: 30px; padding: 0;
  border: 0; border-radius: var(--rp-radius-sm); background: transparent; color: var(--rp-text-muted); cursor: pointer;
}
.pj-docpane__more:hover, .pj-docpane__more[aria-expanded="true"] { background: var(--rp-hover-wash); color: var(--rp-text); }
.pj-docpane__more:focus-visible { outline: 2px solid var(--rp-focus); outline-offset: 1px; }
.pj-docpane__rule { height: 0; margin: 4px 6px; border: 0; border-top: 0.5px solid var(--rp-border-subtle); }
.pj-docpane__out { display: inline-flex; flex: none; margin-inline-start: auto; padding-inline-start: 12px; color: var(--rp-text-subtle); }
.pj-docpane__out svg { width: 14px; height: 14px; }
/* The admin's Publish group in the Report's ⋯: a quiet heading, then switches ticked at the end. */
.pj-docpane__menuhead { padding: 6px 10px 2px; font-size: var(--rp-text-xs); color: var(--rp-text-subtle); white-space: nowrap; }
.pj-docpane__tick { display: inline-flex; flex: none; margin-inline-start: auto; padding-inline-start: 12px; }
.pj-docpane__tick[hidden] { display: none; }
.pj-docpane__menuitem .pj-docpane__tick svg { color: var(--rp-text); }
/* Square corners: the stage hangs from the tabs' rule (user, 2026-11-21);
   under the Report's bar it shares the bar's frame. */
.pj-docpane.is-inline .pj-docpane__stage { border: 0.5px solid var(--rp-border-subtle); overflow: hidden; }
.pj-docpane.is-inline .pj-docpane__strip:not([hidden]) + .pj-docpane__path + .pj-docpane__stage { border-top: 0; }
.pj-docpane.is-inline.is-wide .pj-docpane__stage { border: 0; }

/* The Report's Publish (user, 2026-11-20): the bar's one primary button, as
   on the Slides and Listen pages; and its public link in a hairline strip
   under the bar (deck-edit.css's Desk .share). */
.pj-docpane__primary {
  height: 30px; margin-inline-start: 6px; padding: 0 12px;
  border: 0.5px solid var(--rp-heading); border-radius: var(--rp-radius-sm);
  background: var(--rp-heading); color: var(--rp-surface);
  font: inherit; font-size: var(--rp-text-sm); font-weight: 500; white-space: nowrap; cursor: pointer;
  transition: background var(--rp-duration-fast) var(--rp-ease-out), border-color var(--rp-duration-fast), color var(--rp-duration-fast);
}
.pj-docpane__primary:hover:not(:disabled) { background: var(--rp-action); border-color: var(--rp-action); color: var(--rp-text-on-action); }
.pj-docpane__primary:disabled { opacity: 0.45; cursor: default; }
.pj-docpane__primary:focus-visible, .pj-docpane__sharecopy:focus-visible { outline: 2px solid var(--rp-focus); outline-offset: 1px; }
.pj-docpane.is-inline .pj-docpane__path.has-share {
  display: flex; flex: none; align-items: center; flex-wrap: wrap; gap: var(--rp-space-2) var(--rp-space-3);
  height: auto; padding: 6px 14px;
  border: 0.5px solid var(--rp-border-subtle); border-top: 0; background: var(--rp-surface);
  font-size: var(--rp-text-xs); color: var(--rp-text-muted);
}
.pj-docpane.is-inline.is-wide .pj-docpane__path.has-share { border-width: 0 0 0.5px; }
.pj-docpane__sharelabel { font-weight: 500; color: var(--rp-text); }
.pj-docpane__sharelink { color: var(--rp-action); overflow-wrap: anywhere; unicode-bidi: isolate; }
.pj-docpane__sharecopy {
  height: 24px; padding: 0 10px; border: 0.5px 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-xs); cursor: pointer;
}
.pj-docpane__sharecopy:hover { background: var(--rp-hover-wash); }
.pj-docpane__sharepending { color: var(--rp-warning-text); }
/* The admin's Show-on switches, at the link row's end (user, 2026-11-27). */
.pj-docpane__toggles { display: inline-flex; align-items: center; flex-wrap: wrap; gap: 6px; margin-inline-start: auto; }
.pj-docpane__toggleslabel { margin-inline-end: 2px; color: var(--rp-text-subtle); }
.pj-docpane__toggle {
  display: inline-flex; align-items: center; gap: 4px; height: 24px; padding: 0 10px;
  border: 0.5px solid var(--rp-border); border-radius: var(--rp-radius-pill);
  background: var(--rp-surface); color: var(--rp-text-muted); font: inherit; font-size: var(--rp-text-xs); cursor: pointer;
}
.pj-docpane__toggle:hover { background: var(--rp-hover-wash); color: var(--rp-text); }
.pj-docpane__toggle[aria-pressed="true"] { border-color: var(--rp-heading); color: var(--rp-heading); font-weight: 500; }
.pj-docpane__toggle svg { width: 12px; height: 12px; margin-inline-start: -2px; }
.pj-docpane__toggle:focus-visible { outline: 2px solid var(--rp-focus); outline-offset: 1px; }
