/* Parallax — shares EYE's token set so the suite reads as one product line. */

:root {
  --bg: #0b0f14;
  --bg-elev: #111820;
  --bg-sunk: #0d1117;
  --ink: #e6edf3;
  --ink-2: #a0aab4;
  --muted: #6b7a8a;
  --accent: #58a6ff;
  --accent-green: #3fb950;
  --accent-red: #f85149;
  --accent-yellow: #d29922;
  --rule: #21262d;
  --rule-soft: #1a1f26;
  --mono: 'JetBrains Mono', ui-monospace, monospace;
  --sans: 'IBM Plex Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --serif: 'Fraunces', 'Times New Roman', serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
  /* Nav + app split the viewport; the app takes whatever the nav leaves. */
  display: flex;
  flex-direction: column;
}

/* ── Suite nav (identical to EYE / PRISM) ─────────────────────────────────── */
.site-nav { position: relative; z-index: 900; flex-shrink: 0; background: var(--bg); border-bottom: 1px solid var(--rule); }
.site-nav .wrap { display: flex; align-items: center; justify-content: space-between; padding: 0.7rem clamp(1rem, 3vw, 2.25rem); }
.nav-logo { display: flex; align-items: center; text-decoration: none; gap: 0.75rem; }
.nav-logo img { width: 30px; height: auto; filter: invert(1); opacity: 0.9; }
.nav-logo-name { font-family: var(--serif); font-size: 1.05rem; font-weight: 400; color: var(--ink); letter-spacing: -0.01em; }
.nav-links { display: flex; align-items: center; gap: 2rem; }
.suite-dropdown { position: relative; }
.suite-btn { font-family: var(--mono); font-size: 0.72rem; font-weight: 500; letter-spacing: 0.18em; color: var(--muted); text-transform: uppercase; background: none; border: none; cursor: pointer; padding: 0; display: flex; align-items: center; gap: 5px; transition: color 0.2s; }
.suite-btn:hover, .suite-btn.open { color: var(--ink); }
.suite-arrow { font-size: 0.55rem; display: inline-block; transition: transform 0.2s; }
.suite-btn.open .suite-arrow { transform: rotate(180deg); }
.suite-menu { display: none; position: absolute; top: calc(100% + 14px); right: 0; background: var(--bg-elev); border: 1px solid var(--rule); border-radius: 8px; padding: 6px; min-width: 158px; z-index: 950; box-shadow: 0 8px 28px rgba(0,0,0,0.55); }
.suite-btn.open + .suite-menu { display: block; }
.suite-item { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 5px; font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.12em; text-transform: uppercase; text-decoration: none; color: var(--muted); transition: all 0.15s; white-space: nowrap; }
.suite-item:hover { background: rgba(255,255,255,0.05); color: var(--ink); }
.suite-item.current { color: var(--accent); }
.suite-sep { height: 1px; background: var(--rule); margin: 4px 0; }

/* ── Shell ────────────────────────────────────────────────────────────────── */
#parallax-root { flex: 1; min-height: 0; position: relative; }
.px-shell { display: flex; flex-direction: column; height: 100%; min-height: 0; }

.px-body { flex: 1; display: flex; min-height: 0; position: relative; }

/* ── Sidebar ──────────────────────────────────────────────────────────────── */
.px-sidebar {
  width: 348px; flex-shrink: 0; display: flex; flex-direction: column;
  background: var(--bg-elev); border-right: 1px solid var(--rule); min-height: 0;
  transition: width 0.18s ease;
}
.px-sidebar.is-collapsed { width: 38px; }

/* Collapsed: a rail that both reopens the panel and says which tab it will
   land on, so nothing is lost by keeping it closed. */
.px-rail { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 6px 0; }
.px-rail-expand {
  width: 26px; height: 26px; flex-shrink: 0; border-radius: 5px; cursor: pointer;
  background: transparent; border: 1px solid var(--rule); color: var(--muted);
  font-family: var(--mono); font-size: 0.7rem; line-height: 1; transition: all 0.15s;
}
.px-rail-expand:hover { color: var(--accent); border-color: var(--accent); background: rgba(88,166,255,0.08); }
.px-rail-tab {
  writing-mode: vertical-rl; text-orientation: mixed;
  padding: 12px 5px; margin-top: 2px; border: none; border-radius: 5px; cursor: pointer;
  background: transparent; color: var(--muted);
  font-family: var(--mono); font-size: 0.64rem; letter-spacing: 0.16em; text-transform: uppercase;
  transition: all 0.15s;
}
.px-rail-tab:hover { color: var(--ink-2); background: rgba(255,255,255,0.04); }
.px-rail-tab.is-on { color: var(--accent); background: rgba(88,166,255,0.08); }

.px-tabs { display: flex; align-items: stretch; border-bottom: 1px solid var(--rule); flex-shrink: 0; }
.px-collapse {
  flex-shrink: 0; width: 34px; background: none; border: none; cursor: pointer;
  color: var(--muted); font-family: var(--mono); font-size: 0.7rem;
  border-left: 1px solid var(--rule); transition: all 0.15s;
}
.px-collapse:hover { color: var(--accent); background: rgba(88,166,255,0.07); }
.px-tab {
  flex: 1; padding: 0.7rem 0.5rem; background: none; border: none; cursor: pointer;
  font-family: var(--mono); font-size: 0.68rem; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--muted); border-bottom: 2px solid transparent; transition: all 0.15s;
}
.px-tab:hover { color: var(--ink-2); }
.px-tab.is-on { color: var(--accent); border-bottom-color: var(--accent); background: rgba(88,166,255,0.05); }
.px-panel-scroll { flex: 1; overflow-y: auto; min-height: 0; }
.px-dot { width: 6px; height: 6px; border-radius: 50%; display: inline-block; }
.px-dot.ok { background: var(--accent-green); }
.px-dot.warn { background: var(--accent-yellow); }
.px-sep { opacity: 0.5; }

.px-panel-section { padding: 1rem; border-bottom: 1px solid var(--rule-soft); }
.px-panel-head { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; margin-bottom: 0.75rem; }
.px-panel-head h3 { font-family: var(--mono); font-size: 0.7rem; font-weight: 500; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); }
.px-count { font-family: var(--mono); font-size: 0.62rem; color: var(--muted); }

/* ── Controls ─────────────────────────────────────────────────────────────── */
.px-btn {
  padding: 8px 14px; border-radius: 6px; border: 1px solid transparent;
  font-family: var(--mono); font-size: 0.72rem; font-weight: 500; letter-spacing: 0.08em;
  text-transform: uppercase; cursor: pointer; background: rgba(255,255,255,0.06); color: var(--ink);
  transition: background 0.15s, border-color 0.15s, opacity 0.15s; white-space: nowrap;
}
.px-btn:hover:not(:disabled) { background: rgba(255,255,255,0.11); }
.px-btn:disabled { opacity: 0.38; cursor: not-allowed; }
.px-btn-primary { background: var(--accent); color: #08111d; }
.px-btn-primary:hover:not(:disabled) { background: #79b8ff; }
.px-btn-ghost { background: transparent; border-color: var(--rule); color: var(--ink-2); }
.px-btn-ghost:hover:not(:disabled) { background: rgba(255,255,255,0.05); color: var(--ink); }
/* Destructive actions stay quiet at rest and declare themselves on hover.
   Painted red permanently, "Clear galaxy" was the loudest thing in the sidebar
   — the rarest and most dangerous action pulling the most attention. */
.px-btn-danger { color: var(--ink-2); border-color: var(--rule); }
.px-btn-danger:hover:not(:disabled) {
  background: rgba(248,81,73,0.12); color: var(--accent-red); border-color: rgba(248,81,73,0.45);
}
.px-btn-sm { padding: 6px 10px; font-size: 0.65rem; }
.px-btn-xs { padding: 3px 8px; font-size: 0.58rem; letter-spacing: 0.06em; flex-shrink: 0; }
.px-btn-block { display: block; width: 100%; margin-top: 0.65rem; }
/* Equal-width pairs beat a wrapping row of differently-sized buttons */
.px-btn-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0.35rem; }
.px-btn-grid .px-btn { width: 100%; padding-left: 6px; padding-right: 6px; text-align: center; }
.px-file-input { display: none; }

.px-icon-btn {
  background: none; border: none; color: var(--muted); cursor: pointer;
  font-size: 0.85rem; line-height: 1; padding: 5px 6px; border-radius: 4px; transition: all 0.15s;
}
.px-icon-btn:hover { color: var(--ink); background: rgba(255,255,255,0.07); }
/* Deleting a rubric takes every score attached to it — say so on hover */
.px-icon-btn.is-danger:hover { color: var(--accent-red); background: rgba(248,81,73,0.12); }
.px-link-btn { background: none; border: none; color: var(--muted); cursor: pointer; font-family: var(--mono); font-size: 0.6rem; text-decoration: underline; padding: 0; }
.px-link-btn:hover { color: var(--accent-red); }

.px-input, .px-select, .px-textarea {
  width: 100%; padding: 7px 10px; background: var(--bg-sunk);
  border: 1px solid var(--rule); border-radius: 6px; color: var(--ink);
  font-family: var(--mono); font-size: 0.75rem; outline: none; transition: border-color 0.15s;
}
.px-input::placeholder, .px-textarea::placeholder { color: #4a5867; }
.px-input:focus, .px-select:focus, .px-textarea:focus { border-color: var(--accent); }
.px-textarea { resize: vertical; line-height: 1.5; }
.px-input-weight { width: 74px; flex-shrink: 0; text-align: center; }

.px-field { display: block; margin-bottom: 0.9rem; }
.px-field > span {
  display: block; margin-bottom: 0.35rem; font-family: var(--mono);
  font-size: 0.63rem; letter-spacing: 0.13em; text-transform: uppercase; color: var(--muted);
}
.px-field > span em { font-style: normal; text-transform: none; letter-spacing: 0.04em; color: var(--ink-2); }
.px-row { display: flex; gap: 0.5rem; align-items: center; }
.px-row-wrap { flex-wrap: wrap; }

.px-range { -webkit-appearance: none; appearance: none; width: 100%; height: 3px; border-radius: 2px; background: var(--rule); outline: none; }
.px-range::-webkit-slider-thumb { -webkit-appearance: none; width: 13px; height: 13px; border-radius: 50%; background: var(--accent); cursor: pointer; border: none; }
.px-range::-moz-range-thumb { width: 13px; height: 13px; border-radius: 50%; background: var(--accent); cursor: pointer; border: none; }
.px-slider { display: block; margin-top: 0.7rem; }
.px-slider > span { display: flex; justify-content: space-between; font-family: var(--mono); font-size: 0.62rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); margin-bottom: 0.3rem; }
.px-slider > span em { font-style: normal; color: var(--ink-2); letter-spacing: 0.04em; text-transform: none; }
.px-slider-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }

.px-checks { display: grid; grid-template-columns: 1fr 1fr; gap: 0.4rem 0.75rem; }
.px-check { display: flex; align-items: center; gap: 7px; font-size: 0.73rem; color: var(--ink-2); cursor: pointer; }
.px-check input { accent-color: var(--accent); width: 13px; height: 13px; cursor: pointer; }
.px-check.is-disabled { opacity: 0.4; cursor: not-allowed; }
.px-check.is-disabled input { cursor: not-allowed; }
/* The dimension switch reads as a decision, not one toggle among four */
.px-check-wide { font-size: 0.78rem; color: var(--ink); margin-bottom: 0.2rem; }
.px-legend-note { font-size: 0.63rem; color: var(--muted); line-height: 1.45; margin-bottom: 0.6rem; }

.px-segment { display: flex; gap: 4px; }
.px-segment-btn {
  flex: 1; padding: 5px 8px; border-radius: 5px; cursor: pointer;
  background: var(--bg-sunk); border: 1px solid var(--rule); color: var(--muted);
  font-family: var(--mono); font-size: 0.62rem; letter-spacing: 0.08em; text-transform: uppercase;
  transition: all 0.15s;
}
.px-segment-btn:hover { color: var(--ink-2); }
.px-segment-btn.is-on { background: rgba(88,166,255,0.14); border-color: var(--accent); color: var(--accent); }

.px-switch {
  position: relative; width: 34px; height: 18px; border-radius: 10px; flex-shrink: 0;
  background: var(--bg-sunk); border: 1px solid var(--rule); cursor: pointer; transition: all 0.18s;
}
.px-switch-knob { position: absolute; top: 2px; left: 2px; width: 12px; height: 12px; border-radius: 50%; background: var(--muted); transition: all 0.18s; }
.px-switch.is-on { background: rgba(88,166,255,0.22); border-color: var(--accent); }
.px-switch.is-on .px-switch-knob { left: 18px; background: var(--accent); }
.px-switch.is-locked { opacity: 0.45; cursor: not-allowed; }

.px-gradient-picker { display: flex; align-items: center; gap: 0.5rem; }
.px-gradient-swatch { width: 56px; height: 22px; border-radius: 4px; border: 1px solid var(--rule); flex-shrink: 0; }

/* ── Ingest ───────────────────────────────────────────────────────────────── */
.px-ingest-rows { display: flex; flex-direction: column; gap: 0.75rem; margin-bottom: 0.75rem; }
.px-ingest-row { border-left: 2px solid var(--rule); padding-left: 0.6rem; display: flex; flex-direction: column; gap: 0.35rem; }
.px-ingest-row.is-error { border-left-color: var(--accent-red); }
.px-ingest-line { display: flex; gap: 0.4rem; align-items: center; }
/* Solicitation and topic share a line — both are short identifiers */
.px-ingest-ids .px-input { flex: 1; min-width: 0; }
.px-ingest-note { font-size: 0.66rem; color: var(--muted); line-height: 1.4; }

/* An uploaded document. Marked in the accent colour rather than shown as a
   text field, because there is nothing here for the user to edit: the file is
   already read and stored. */
.px-ingest-row.is-file { border-left-color: var(--accent); }
.px-ingest-file {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: baseline;
  gap: 0.4rem;
  font-family: var(--mono);
  font-size: 0.66rem;
  padding: 0.32rem 0.5rem;
  border: 1px dashed var(--rule);
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.02);
}
.px-ingest-file-icon { color: var(--accent); flex: none; }
.px-ingest-file-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.px-ingest-file-meta { margin-left: auto; flex: none; color: var(--muted); font-size: 0.6rem; }

/* Drop target. The section keeps its layout and gains an outline, so the queue
   below it does not jump while a file is being dragged over. */
.px-panel-section.is-dropping { outline: 1px dashed var(--accent); outline-offset: 4px; border-radius: 4px; }
.px-dropzone {
  margin: 0.5rem 0;
  padding: 0.9rem 0.6rem;
  text-align: center;
  font-size: 0.68rem;
  color: var(--accent);
  border: 1px dashed var(--accent);
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.03);
}
.px-bulk { display: flex; flex-direction: column; gap: 0.5rem; margin: 0.6rem 0; }
.px-note { font-size: 0.72rem; color: var(--muted); line-height: 1.5; margin: 0.6rem 0; }
.px-note-tight { font-size: 0.66rem; margin-top: 0.5rem; margin-bottom: 0; }
.px-note-warn { color: var(--accent-yellow); }
.px-note strong { color: var(--ink-2); }
.px-stat-row { display: flex; justify-content: space-between; font-family: var(--mono); font-size: 0.65rem; color: var(--muted); padding: 0.3rem 0; border-bottom: 1px dashed var(--rule-soft); margin-bottom: 0.6rem; }

/* ── Rubric cards ─────────────────────────────────────────────────────────── */
.px-rubric { border: 1px solid var(--rule); border-radius: 8px; padding: 0.7rem; margin-bottom: 0.65rem; background: var(--bg-sunk); transition: border-color 0.15s; }
.px-rubric.is-on { border-color: rgba(88,166,255,0.4); }
.px-rubric-head { display: flex; align-items: center; gap: 0.6rem; }
.px-rubric-id { flex: 1; min-width: 0; }
.px-rubric-name { display: block; font-size: 0.82rem; color: var(--ink); font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.px-rubric-meta { display: block; font-family: var(--mono); font-size: 0.6rem; color: var(--muted); }
.px-rubric-swatch { width: 26px; height: 14px; border-radius: 3px; border: 1px solid var(--rule); flex-shrink: 0; }
.px-rubric-lock { font-size: 0.66rem; color: var(--accent-yellow); margin-top: 0.5rem; line-height: 1.4; }
.px-rubric-body { margin-top: 0.85rem; padding-top: 0.75rem; border-top: 1px dashed var(--rule); }
.px-control { margin-bottom: 0.75rem; }
.px-control-label { display: block; font-family: var(--mono); font-size: 0.6rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); margin-bottom: 0.3rem; }

.px-legend { display: flex; flex-direction: column; gap: 0.35rem; }
.px-legend-row { display: flex; align-items: center; gap: 0.5rem; font-size: 0.72rem; color: var(--ink-2); }
.px-legend-dot { width: 9px; height: 9px; border-radius: 50%; flex-shrink: 0; }
.px-legend-label { flex: 1; }
.px-legend-count { font-family: var(--mono); font-size: 0.65rem; color: var(--muted); }

/* ── Stage ────────────────────────────────────────────────────────────────── */
.px-stage { flex: 1; position: relative; min-width: 0; background: #05070b; }
.px-canvas { position: absolute; inset: 0; }
.px-canvas canvas { display: block; touch-action: none; }

.px-hints {
  position: absolute; left: 16px; bottom: 14px; display: flex; gap: 0.9rem; flex-wrap: wrap;
  font-family: var(--mono); font-size: 0.6rem; letter-spacing: 0.08em; color: var(--muted);
  pointer-events: none; text-shadow: 0 1px 6px rgba(0,0,0,0.8);
}
.px-hints b { color: var(--ink-2); font-weight: 500; }

.px-empty { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; pointer-events: none; }
.px-empty-card {
  pointer-events: auto; max-width: 430px; text-align: center; padding: 1.75rem;
  background: rgba(17,24,32,0.85); border: 1px solid var(--rule); border-radius: 12px;
  backdrop-filter: blur(10px);
}
.px-empty-tag { font-family: var(--mono); font-size: 0.62rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--muted); margin-bottom: 0.6rem; }
.px-empty-card h2 { font-family: var(--serif); font-weight: 400; font-size: 1.4rem; margin-bottom: 0.5rem; }
.px-empty-card p { font-size: 0.82rem; color: var(--ink-2); margin-bottom: 1.15rem; }

/* ── Corner dock: Legend + Search (bottom-right of the map) ───────────────── */
.px-dock {
  position: absolute; right: 16px; bottom: 14px; z-index: 20;
  width: max-content; max-width: 280px;
  /* The HUD owns the top-right, so the dock stays in the bottom half and both
     scroll internally rather than covering each other. */
  max-height: calc(54% - 20px); display: flex; flex-direction: column;
  background: rgba(17,24,32,0.92); border: 1px solid var(--rule); border-radius: 10px;
  backdrop-filter: blur(12px); box-shadow: 0 14px 40px rgba(0,0,0,0.55); overflow: hidden;
}
.px-dock-tabs { display: flex; flex-shrink: 0; }
.px-dock-tab {
  display: flex; align-items: center; gap: 6px; flex: 1;
  padding: 7px 12px; background: none; border: none; cursor: pointer; color: var(--muted);
  font-family: var(--mono); font-size: 0.62rem; letter-spacing: 0.14em; text-transform: uppercase;
  white-space: nowrap; transition: color 0.15s, background 0.15s;
}
.px-dock-tab + .px-dock-tab { border-left: 1px solid var(--rule-soft); }
.px-dock-tab:hover { color: var(--ink-2); }
.px-dock-tab.is-on { color: var(--accent); background: rgba(88,166,255,0.07); }
.px-dock.is-open .px-dock-tabs { border-bottom: 1px solid var(--rule-soft); }
.px-dock-caret { font-size: 0.5rem; }
.px-dock-body { width: 280px; overflow-y: auto; min-height: 0; }
.px-dock-body .px-checks { grid-template-columns: 1fr 1fr; gap: 0.35rem 0.6rem; }
.px-dock-body .px-check span { font-size: 0.7rem; }
.px-dock-body .px-btn-block { margin-top: 0.7rem; }
.px-dock-body::-webkit-scrollbar { width: 8px; }
.px-dock-body::-webkit-scrollbar-thumb { background: var(--rule); border-radius: 4px; }
.px-dock-body::-webkit-scrollbar-track { background: transparent; }

/* ── Search panel ─────────────────────────────────────────────────────────── */
.px-search { padding: 0.7rem 0.85rem 0.85rem; }
.px-search-modes { margin-bottom: 0.7rem; }
.px-search-actions { margin-top: 0.5rem; gap: 0.4rem; }
.px-search-meta {
  display: flex; align-items: baseline; justify-content: space-between; gap: 0.5rem;
  font-family: var(--mono); font-size: 0.58rem; color: var(--muted); margin: 0.5rem 0 0.35rem;
}
.px-search-results { display: flex; flex-direction: column; gap: 2px; max-height: 260px; overflow-y: auto; }
.px-search-results::-webkit-scrollbar { width: 6px; }
.px-search-results::-webkit-scrollbar-thumb { background: var(--rule); border-radius: 3px; }
.px-search-hit {
  display: flex; align-items: flex-start; gap: 7px; width: 100%; text-align: left;
  padding: 5px 6px; border: none; border-radius: 5px; background: none; cursor: pointer;
  transition: background 0.12s;
}
.px-search-hit:hover { background: rgba(88,166,255,0.1); }
.px-search-dot { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; margin-top: 5px; }
.px-search-hit-body { min-width: 0; flex: 1; }
.px-search-hit-title {
  display: block; font-size: 0.72rem; color: var(--ink-2); line-height: 1.35;
  overflow: hidden; text-overflow: ellipsis; display: -webkit-box;
  -webkit-line-clamp: 2; -webkit-box-orient: vertical;
}
.px-search-hit:hover .px-search-hit-title { color: var(--ink); }
.px-search-hit-meta { display: block; font-family: var(--mono); font-size: 0.55rem; color: var(--muted); margin-top: 1px; }
.px-probe-result { margin-top: 0.8rem; padding-top: 0.7rem; border-top: 1px solid var(--rule-soft); }

/* ── Select table ─────────────────────────────────────────────────────────── */
/* A table of 30+ documents needs more room than a legend does */
.px-dock.is-select { max-width: 440px; max-height: calc(66% - 20px); }
.px-dock.is-select .px-dock-body { width: 440px; }

.px-select-panel { padding: 0.7rem 0.85rem 0.75rem; display: flex; flex-direction: column; min-height: 0; }
.px-select-tools { display: flex; gap: 0.4rem; }
/* Quick-selects for the documents a rubric has not reached yet */
.px-select-gaps { margin-top: 0.5rem; }
.px-select-gaps .px-hud-label { display: block; margin-bottom: 0.3rem; }
.px-select-gap-row { display: flex; align-items: center; flex-wrap: wrap; gap: 0.3rem; margin-bottom: 0.25rem; }
.px-select-gap-name {
  flex: 1 0 100%; font-size: 0.66rem; color: var(--ink-2);
}
/* Wide enough for the score-sort labels, which name a rubric and a kind */
.px-select-sort { width: 152px; flex-shrink: 0; }
.px-select-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0.5rem 0 0.35rem; border-bottom: 1px solid var(--rule-soft);
}
.px-select-all span { font-family: var(--mono); font-size: 0.58rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.px-select-count { font-family: var(--mono); font-size: 0.58rem; color: var(--accent); }

.px-select-rows { overflow-y: auto; max-height: 320px; min-height: 0; margin-top: 2px; }
.px-select-rows::-webkit-scrollbar { width: 7px; }
.px-select-rows::-webkit-scrollbar-thumb { background: var(--rule); border-radius: 4px; }
.px-select-row {
  display: flex; align-items: center; gap: 7px;
  padding: 3px 4px; border-radius: 4px; transition: background 0.12s;
}
.px-select-row:hover { background: rgba(255,255,255,0.04); }
.px-select-row.is-on { background: rgba(88,166,255,0.1); }
.px-select-box { accent-color: var(--accent); width: 13px; height: 13px; cursor: pointer; flex-shrink: 0; }
.px-select-dot { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; }
.px-select-title {
  flex: 1; min-width: 0; text-align: left; background: none; border: none; cursor: pointer;
  color: var(--ink-2); font-size: 0.72rem; padding: 2px 0; line-height: 1.3;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.px-select-title:hover { color: var(--accent); }
.px-select-id {
  font-style: normal; font-family: var(--mono); font-size: 0.55rem;
  color: var(--muted); margin-left: 0.4rem;
}
.px-row-scores { display: flex; gap: 4px; flex-shrink: 0; }
.px-row-score { font-family: var(--mono); font-size: 0.62rem; min-width: 18px; text-align: right; }
.px-row-score.is-approximate { font-style: italic; opacity: 0.75; }
.px-row-score-none { color: var(--muted); opacity: 0.5; }

.px-select-summary {
  display: flex; flex-wrap: wrap; gap: 0.75rem;
  padding: 0.5rem 0 0.1rem; margin-top: 0.4rem; border-top: 1px solid var(--rule-soft);
}
.px-select-summary-item { font-size: 0.68rem; color: var(--ink-2); }
.px-select-summary-item b { font-family: var(--mono); font-size: 0.78rem; margin: 0 0.2rem; }
.px-select-summary-item em { font-style: normal; font-family: var(--mono); font-size: 0.55rem; color: var(--muted); }

.px-select-actions {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.35rem;
  padding-top: 0.6rem; margin-top: 0.5rem; border-top: 1px solid var(--rule-soft);
}
.px-select-actions .px-btn { width: 100%; padding-left: 4px; padding-right: 4px; text-align: center; }

/* With a dock open, the HUD keeps the top half and scrolls rather than sliding
   under it. Both stay fully reachable; neither hides the other. */
.px-stage.has-dock .px-hud { max-height: calc(46% - 20px); }

.px-legend-section { padding: 0.7rem 0.85rem; border-bottom: 1px solid var(--rule-soft); }
.px-legend-section:last-child { border-bottom: none; }
.px-legend-heading {
  font-family: var(--mono); font-size: 0.58rem; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--muted); margin-bottom: 0.5rem;
}

/* Read-only gradient scale: what the heatmap colors currently mean.
   Choosing the gradient stays in the Score panel. */
.px-scale { margin-bottom: 0.6rem; }
.px-scale:last-child { margin-bottom: 0; }
.px-scale-name { font-size: 0.72rem; color: var(--ink-2); margin-bottom: 0.25rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.px-scale-ramp { height: 8px; border-radius: 3px; border: 1px solid var(--rule); }
.px-scale-ticks {
  display: flex; justify-content: space-between;
  font-family: var(--mono); font-size: 0.55rem; color: var(--muted); margin-top: 2px;
}
/* One scroll region for the whole card (see .px-dock-body) rather than a
   nested one per section — nested scrollers slice rows and hide their own bars. */

/* ── HUD ──────────────────────────────────────────────────────────────────── */
.px-hud {
  position: absolute; top: 16px; right: 16px; width: 342px;
  max-height: calc(100% - 32px); overflow-y: auto;
  /* see .px-stage.has-dock below — the HUD yields the bottom half to the dock */
  background: rgba(17,24,32,0.92); border: 1px solid var(--rule); border-radius: 10px;
  padding: 1rem; backdrop-filter: blur(12px); box-shadow: 0 14px 40px rgba(0,0,0,0.55);
}
.px-hud-head { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; margin-bottom: 0.6rem; }
.px-chip { font-family: var(--mono); font-size: 0.58rem; letter-spacing: 0.12em; text-transform: uppercase; padding: 3px 8px; border-radius: 3px; border: 1px solid var(--rule); }
.px-hud-title { font-family: var(--serif); font-weight: 400; font-size: 1.12rem; line-height: 1.25; margin-bottom: 0.4rem; }
.px-hud-url { display: block; font-family: var(--mono); font-size: 0.63rem; color: var(--accent); text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-bottom: 0.7rem; }
.px-hud-url:hover { text-decoration: underline; }
/* An uploaded document has no address to link to; it is opened from the cache,
   so it is a button that looks like the link it replaces. */
button.px-hud-url-local { background: none; border: 0; padding: 0; text-align: left; width: 100%; cursor: pointer; font: inherit; font-family: var(--mono); font-size: 0.63rem; color: var(--accent); }
span.px-hud-url-local { cursor: default; }
.px-hud-ids { display: flex; flex-wrap: wrap; gap: 0.35rem 0.8rem; margin: -0.35rem 0 0.7rem; }
.px-hud-id { font-family: var(--mono); font-size: 0.64rem; color: var(--ink-2); }
.px-hud-id em {
  display: block; font-style: normal; font-size: 0.52rem; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--muted);
}
.px-hud-abstract { font-size: 0.76rem; color: var(--ink-2); line-height: 1.5; margin-bottom: 0.9rem; }
.px-hud-section { margin-bottom: 1rem; }
.px-hud-label { display: block; font-family: var(--mono); font-size: 0.6rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); margin-bottom: 0.45rem; }
.px-tags { display: flex; flex-wrap: wrap; gap: 5px; }
.px-tag { font-family: var(--mono); font-size: 0.62rem; padding: 3px 7px; border-radius: 3px; background: rgba(255,255,255,0.05); border: 1px solid var(--rule); color: var(--ink-2); }
.px-empty-inline { font-size: 0.73rem; color: var(--muted); line-height: 1.5; }

.px-score { margin-bottom: 0.7rem; }
.px-score-head {
  display: flex; align-items: baseline; gap: 0.4rem; width: 100%;
  background: none; border: none; padding: 0; cursor: pointer; text-align: left;
}
.px-score-caret { font-size: 0.55rem; color: var(--muted); width: 9px; flex-shrink: 0; }
.px-score-head:hover .px-score-caret { color: var(--accent); }
.px-score-name { flex: 1; min-width: 0; font-size: 0.78rem; color: var(--ink); }
.px-score-name em { font-style: normal; color: var(--accent-yellow); font-family: var(--mono); font-size: 0.66rem; letter-spacing: 0.06em; }
.px-score-value { font-family: var(--mono); font-size: 1rem; flex-shrink: 0; }
.px-score-confidence {
  font-family: var(--mono); font-size: 0.56rem; color: var(--muted);
  border: 1px solid var(--rule); border-radius: 3px; padding: 0 4px; flex-shrink: 0;
}
.px-score-bar { height: 4px; border-radius: 2px; background: var(--bg-sunk); overflow: hidden; margin: 4px 0 0 13px; }
.px-score-fill { height: 100%; border-radius: 2px; transition: width 0.3s; }

/* Expanded: the sub-scores that produced the overall number */
.px-score-detail { margin: 0.5rem 0 0 13px; padding-left: 0.6rem; border-left: 1px solid var(--rule); }
.px-subscores { display: flex; flex-direction: column; gap: 3px; }
.px-subscore {
  display: grid; grid-template-columns: 1fr 54px 26px; align-items: center; gap: 0.5rem;
  width: 100%; background: none; border: none; padding: 1px 0; text-align: left;
}
.px-subscore-clickable { cursor: pointer; border-radius: 3px; }
.px-subscore-clickable:hover { background: rgba(255,255,255,0.04); }
.px-subscore-clickable:hover .px-subscore-label { color: var(--accent); }
.px-subscore-label { font-size: 0.7rem; color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.px-subscore-label em { font-style: normal; font-family: var(--mono); font-size: 0.58rem; color: var(--muted); margin-left: 0.3rem; }
.px-subscore-bar { height: 3px; border-radius: 2px; background: var(--bg-sunk); overflow: hidden; }
.px-subscore-bar span { display: block; height: 100%; border-radius: 2px; }
.px-subscore-meta { font-family: var(--mono); font-size: 0.56rem; color: var(--muted); text-align: right; white-space: nowrap; }
.px-subscore-value { font-family: var(--mono); font-size: 0.68rem; color: var(--ink); text-align: right; }
.px-score-detail-foot {
  display: flex; align-items: baseline; justify-content: space-between; gap: 0.5rem;
  margin-top: 0.4rem; font-family: var(--mono); font-size: 0.56rem; color: var(--muted);
}

/* ── Multi-select HUD ─────────────────────────────────────────────────────── */
.px-hud-selection { border-color: rgba(88,166,255,0.35); }
.px-chip-accent { border-color: var(--accent); color: var(--accent); background: rgba(88,166,255,0.1); }
.px-selection-clusters { margin-bottom: 0.9rem; }
.px-selection-list { max-height: 190px; overflow-y: auto; display: flex; flex-direction: column; gap: 1px; }
.px-selection-row { display: flex; align-items: center; gap: 0.5rem; padding: 2px 0; }
.px-selection-dot { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; }
.px-selection-title {
  flex: 1; min-width: 0; text-align: left; background: none; border: none; cursor: pointer;
  color: var(--ink-2); font-size: 0.74rem; padding: 2px 0;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.px-selection-title:hover { color: var(--accent); }

.px-summary { margin-bottom: 0.7rem; }
.px-summary-head { display: flex; align-items: baseline; justify-content: space-between; gap: 0.5rem; }
.px-summary-name { font-size: 0.78rem; color: var(--ink); }
.px-summary-mean { font-family: var(--mono); font-size: 1rem; }
.px-summary-meta { font-family: var(--mono); font-size: 0.58rem; color: var(--muted); }

/* ── Batch modal result lists ─────────────────────────────────────────────── */
.px-batch-list {
  max-height: 260px; overflow-y: auto; margin: 0.75rem 0;
  border: 1px solid var(--rule); border-radius: 6px; background: var(--bg-sunk);
}
.px-batch-row {
  display: flex; align-items: center; gap: 0.6rem;
  padding: 0.4rem 0.6rem; border-bottom: 1px solid var(--rule-soft);
}
.px-batch-row:last-child { border-bottom: none; }
.px-batch-row.is-skipped { opacity: 0.55; }
.px-batch-title { flex: 1; min-width: 0; font-size: 0.74rem; color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.px-batch-was { font-family: var(--mono); font-size: 0.58rem; color: var(--muted); flex-shrink: 0; }
.px-batch-skip { font-family: var(--mono); font-size: 0.58rem; color: var(--accent-yellow); flex-shrink: 0; }
.px-batch-value { font-family: var(--mono); font-size: 0.8rem; min-width: 26px; text-align: right; flex-shrink: 0; }

/* Actions span the full card width so no button is left looking optional */
.px-hud-actions { display: grid; grid-template-columns: 1fr; gap: 0.35rem; margin-bottom: 0.75rem; }
.px-hud-actions .px-btn { width: 100%; padding-left: 4px; padding-right: 4px; font-size: 0.66rem; text-align: center; }

/* The three ordered steps, numbered so the sequence is legible at a glance */
.px-hud-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.35rem; margin-bottom: 0.35rem; }
.px-step-btn {
  width: 100%; padding-left: 4px; padding-right: 4px; font-size: 0.66rem;
  display: flex; align-items: center; justify-content: center; gap: 4px;
}
.px-step-n {
  font-family: var(--mono); font-size: 0.58rem; color: var(--muted);
  border: 1px solid var(--rule); border-radius: 3px; padding: 0 3px; line-height: 1.4;
}
.px-btn-primary .px-step-n { color: inherit; border-color: currentColor; opacity: 0.7; }
.px-step-btn.is-done .px-step-n { color: var(--accent-green); border-color: currentColor; }

/* Step framing inside the modals */
.px-step-line { font-size: 0.7rem; color: var(--muted); margin-bottom: 0.9rem; }
.px-step-line strong { color: var(--ink-2); font-weight: 500; }
.px-step-hint {
  padding: 0.55rem 0.7rem; margin-bottom: 0.8rem; border-radius: 6px;
  background: var(--bg-sunk); border: 1px solid var(--rule);
  font-size: 0.7rem; line-height: 1.5; color: var(--muted);
}
.px-step-hint strong { color: var(--ink-2); font-weight: 500; }
/* A signed-off evaluation reads as settled, not as a warning */
.px-step-hint.px-locked {
  background: rgba(63,185,80,0.08); border-color: rgba(63,185,80,0.3); color: var(--ink-2);
}
.px-hud-confirmed {
  margin-bottom: 0.5rem; padding: 0.35rem 0.55rem; border-radius: 5px;
  background: rgba(63,185,80,0.1); border: 1px solid rgba(63,185,80,0.3);
  font-family: var(--mono); font-size: 0.6rem; color: var(--accent-green);
}
.px-step-hint .px-btn { margin-top: 0.45rem; }
.px-step-empty { text-align: left; padding: 0.5rem 0 0.2rem; }
.px-step-empty .px-btn { margin-top: 0.6rem; }
.px-sub-agent-value { font-family: var(--mono); font-size: 0.9rem; flex-shrink: 0; margin-left: 0.5rem; }

.px-hud-foot {
  display: flex; align-items: center; justify-content: space-between; gap: 0.6rem;
  border-top: 1px solid var(--rule-soft); padding-top: 0.5rem;
}
.px-hud-coords { font-family: var(--mono); font-size: 0.58rem; color: var(--muted); min-width: 0; }

/* ── Context menu ─────────────────────────────────────────────────────────── */
.px-menu {
  position: fixed; z-index: 1000; padding: 5px;
  background: var(--bg-elev); border: 1px solid var(--rule); border-radius: 8px;
  box-shadow: 0 14px 38px rgba(0,0,0,0.65);
}
.px-menu-title {
  font-family: var(--mono); font-size: 0.6rem; color: var(--muted); padding: 6px 8px 8px;
  border-bottom: 1px solid var(--rule-soft); margin-bottom: 4px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.px-menu-item {
  display: block; width: 100%; text-align: left; padding: 7px 9px; border: none; border-radius: 5px;
  background: none; cursor: pointer; color: var(--ink-2); transition: all 0.12s;
}
.px-menu-item:hover { background: rgba(88,166,255,0.12); color: var(--ink); }
.px-menu-item.danger:hover { background: rgba(248,81,73,0.14); color: var(--accent-red); }
.px-menu-label { display: block; font-size: 0.78rem; }
.px-menu-hint { display: block; font-family: var(--mono); font-size: 0.58rem; color: var(--muted); }
.px-menu-sep { height: 1px; background: var(--rule-soft); margin: 4px 0; }

/* ── Modals ───────────────────────────────────────────────────────────────── */
.px-modal-backdrop {
  position: fixed; inset: 0; z-index: 1100; background: rgba(3,6,10,0.72);
  backdrop-filter: blur(3px); display: flex; align-items: center; justify-content: center; padding: 1.5rem;
}
.px-modal { width: 100%; max-width: 460px; max-height: 88vh; display: flex; flex-direction: column; background: var(--bg-elev); border: 1px solid var(--rule); border-radius: 12px; box-shadow: 0 24px 60px rgba(0,0,0,0.6); }
.px-modal-wide { max-width: 580px; }
/* The panel review is a workspace, not a dialog — it takes the viewport. */
.px-modal-full { max-width: min(1500px, 96vw); width: 96vw; height: 92vh; display: flex; flex-direction: column; }
.px-modal-full .px-modal-body { flex: 1; min-height: 0; display: flex; flex-direction: column; }

/* ── Panel review ─────────────────────────────────────────────────────────── */
.px-panel-progress {
  display: flex; align-items: center; justify-content: space-between; gap: 0.75rem;
  padding-bottom: 0.7rem; margin-bottom: 0.7rem; border-bottom: 1px solid var(--rule);
  font-family: var(--mono); font-size: 0.68rem; color: var(--ink-2); flex-shrink: 0;
}
.px-panel-progress-actions { display: flex; gap: 0.4rem; flex-shrink: 0; }

.px-panel-list { flex: 1; overflow-y: auto; min-height: 0; padding-right: 0.3rem; }
.px-panel-list-head {
  display: grid; grid-template-columns: 34px 1fr 58px 82px 52px; gap: 0.8rem; align-items: center;
  padding: 0 0.5rem 0.35rem; position: sticky; top: 0; background: var(--bg-elev); z-index: 2;
  font-family: var(--mono); font-size: 0.54rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted);
}
.px-panel-list-head span:nth-child(n+3) { text-align: right; }

.px-panel-row {
  display: grid; grid-template-columns: 34px 8px 1fr auto 58px 82px 52px; gap: 0.8rem;
  align-items: center; padding: 0.45rem 0.5rem; border-radius: 6px; cursor: pointer;
  border: 1px solid transparent; transition: background 0.12s, border-color 0.12s;
}
.px-panel-row:hover { background: rgba(255,255,255,0.035); }
.px-panel-row.is-active { background: rgba(88,166,255,0.09); border-color: rgba(88,166,255,0.4); }
.px-panel-row.is-flagged { background: rgba(210,153,34,0.07); }
.px-panel-row.is-confirmed { opacity: 0.78; }
.px-panel-row.is-dragging { opacity: 0.4; }
.px-panel-rank { font-family: var(--mono); font-size: 0.72rem; color: var(--muted); text-align: right; }
.px-panel-dot { width: 8px; height: 8px; border-radius: 50%; }
.px-panel-title { min-width: 0; font-size: 0.76rem; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.px-panel-meta { display: block; font-style: normal; font-family: var(--mono); font-size: 0.55rem; color: var(--muted); }
.px-panel-tags { display: flex; gap: 3px; flex-shrink: 0; }
.px-panel-tag {
  font-family: var(--mono); font-size: 0.5rem; letter-spacing: 0.06em; text-transform: uppercase;
  padding: 1px 4px; border-radius: 3px; background: rgba(255,255,255,0.07); color: var(--muted);
}
.px-panel-tag.is-flag { background: rgba(210,153,34,0.18); color: var(--accent-yellow); }
.px-panel-tag.is-ok { background: rgba(63,185,80,0.16); color: var(--accent-green); }
.px-panel-ai { font-family: var(--mono); font-size: 0.66rem; color: var(--muted); text-align: right; }
/* The neighbourhood score carries its confidence with it — the number means
   little without knowing how close the documents behind it sat. */
.px-panel-approx { font-family: var(--mono); font-size: 0.66rem; color: var(--ink-2); text-align: right; }
.px-panel-approx.is-none { color: var(--muted); }

/* Confidence reads as a bar, never as a second percentage: a row already
   carries a weight in percent, and two identical-looking numbers meaning
   different things is the whole problem this avoids. */
.px-neighbor-value { display: block; }
.px-neighbor-conf {
  display: block; height: 3px; border-radius: 2px; margin-top: 2px;
  background: var(--bg-sunk); overflow: hidden;
}
.px-neighbor-conf span { display: block; height: 100%; border-radius: 2px; background: var(--ink-2); opacity: 0.55; }
.px-panel-final { font-family: var(--mono); font-size: 0.95rem; text-align: right; }
.px-panel-hint { font-size: 0.64rem; color: var(--muted); padding: 0.6rem 0.5rem 0; line-height: 1.5; }

/* One proposal takes the whole workspace: document on the left, evaluation on
   the right, and the ranked list steps aside until the evaluator goes back. */
.px-panel-proposal { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.px-panel-detail-head {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem;
  flex-shrink: 0; padding-bottom: 0.6rem; border-bottom: 1px solid var(--rule);
}
.px-panel-detail-id { min-width: 0; }
.px-panel-back {
  background: none; border: none; padding: 0; cursor: pointer; color: var(--accent);
  font-family: var(--mono); font-size: 0.66rem; letter-spacing: 0.08em;
}
.px-panel-back:hover { text-decoration: underline; }
.px-panel-nav { display: inline-flex; align-items: center; gap: 0.3rem; margin-left: 0.8rem; }
.px-panel-nav-rank { font-family: var(--mono); font-size: 0.6rem; color: var(--muted); }
.px-panel-detail-title { font-family: var(--serif); font-weight: 400; font-size: 1rem; line-height: 1.25; margin: 0.25rem 0 0.2rem; }

.px-panel-split {
  flex: 1; min-height: 0; display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 1rem; padding-top: 0.7rem;
}
.px-panel-detail-score { text-align: right; flex-shrink: 0; }
.px-panel-detail-score span:last-of-type { display: block; font-family: var(--mono); font-size: 1.5rem; line-height: 1.1; }
.px-panel-detail-score em { font-style: normal; font-family: var(--mono); font-size: 0.56rem; color: var(--muted); }

.px-panel-target {
  margin: 0.7rem 0 0; padding: 0.55rem 0.7rem; border-radius: 6px;
  background: rgba(88,166,255,0.1); border: 1px solid rgba(88,166,255,0.35);
  font-size: 0.7rem; line-height: 1.5; color: var(--ink-2);
}
.px-panel-target.is-met { background: rgba(63,185,80,0.1); border-color: rgba(63,185,80,0.35); color: var(--accent-green); }

.px-panel-tabs { display: flex; gap: 0.3rem; margin: 0.8rem 0 0.6rem; border-bottom: 1px solid var(--rule); }
.px-panel-tab {
  padding: 0.4rem 0.6rem; background: none; border: none; border-bottom: 2px solid transparent;
  cursor: pointer; color: var(--muted); font-family: var(--mono); font-size: 0.62rem;
  letter-spacing: 0.1em; text-transform: uppercase; transition: all 0.15s;
}
.px-panel-tab:hover { color: var(--ink-2); }
.px-panel-tab.is-on { color: var(--accent); border-bottom-color: var(--accent); }

/* Scoring is laid out as the rubric is: criteria, each holding sub-criteria,
   each carrying the share of the final score it is worth. */
.px-panel-scores {
  --px-cols: minmax(0, 1fr) 54px 52px 62px 70px;
  overflow-y: auto; min-height: 0; min-width: 0; padding-right: 0.3rem;
}
.px-panel-sub-legend {
  display: grid; grid-template-columns: var(--px-cols); gap: 0.8rem;
  padding: 0 0 0.3rem; border-bottom: 1px solid var(--rule);
  font-family: var(--mono); font-size: 0.5rem;
  letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted);
}
.px-panel-sub-legend span { text-align: right; }
.px-panel-sub-legend span:first-child { text-align: left; }

.px-panel-group { margin-top: 0.7rem; }
.px-panel-group-head {
  display: grid; grid-template-columns: var(--px-cols); gap: 0.8rem;
  align-items: baseline; padding: 0.25rem 0 0.3rem; border-bottom: 1px solid var(--rule-soft);
}
.px-panel-group-label { font-size: 0.8rem; color: var(--ink); }
/* Weight sits in its own column under a "weight" heading, so a bare percent is
   unambiguous — and visibly different from the confidence, which is a bar. */
.px-panel-group-share {
  font-family: var(--mono); font-size: 0.62rem; color: var(--accent); text-align: right;
}
.px-panel-group-value { font-family: var(--mono); font-size: 0.9rem; text-align: right; }
.px-panel-group-gap { display: block; }

.px-panel-sub { padding: 0.35rem 0; }
.px-panel-sub + .px-panel-sub { border-top: 1px dashed var(--rule-soft); }
.px-panel-sub.is-flagged { background: rgba(210,153,34,0.06); border-radius: 5px; padding-left: 0.35rem; padding-right: 0.35rem; }
.px-panel-sub-head { display: grid; grid-template-columns: var(--px-cols); gap: 0.8rem; align-items: center; }
.px-panel-sub-open {
  display: flex; align-items: baseline; gap: 0.35rem; min-width: 0; padding: 0;
  background: none; border: none; cursor: pointer; text-align: left;
}
.px-panel-sub-label {
  min-width: 0; flex: 1; font-size: 0.72rem; color: var(--ink-2);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.px-panel-sub-open:hover .px-panel-sub-label { color: var(--ink); }
.px-panel-sub-share { font-family: var(--mono); font-size: 0.62rem; color: var(--accent); text-align: right; opacity: 0.85; }
.px-panel-sub-ai { font-family: var(--mono); font-size: 0.72rem; text-align: right; color: var(--muted); }
.px-panel-sub-approx { font-family: var(--mono); font-size: 0.72rem; text-align: right; color: var(--ink-2); }
.px-panel-sub-approx.is-none { color: var(--muted); }
.px-panel-sub-input { padding: 3px 6px; font-size: 0.78rem; width: 100%; }

.px-panel-cite {
  margin: 0.45rem 0 0.3rem 13px; padding: 0.5rem 0.7rem;
  border-left: 2px solid var(--rule); background: rgba(255,255,255,0.02); border-radius: 0 6px 6px 0;
}

/* The document pane fills its column — a half-height PDF is unreadable. */
.px-panel-pdf { display: flex; flex-direction: column; min-height: 0; min-width: 0; }
.px-panel-frame {
  flex: 1; width: 100%; height: 100%; min-height: 0;
  border: 1px solid var(--rule); border-radius: 6px; background: var(--bg-sunk);
}
.px-panel-pdf-note { flex-shrink: 0; font-size: 0.62rem; color: var(--muted); margin-top: 0.35rem; line-height: 1.45; }
.px-panel-pdf-note a { color: var(--accent); }

.px-panel-detail-actions { display: flex; justify-content: flex-end; gap: 0.5rem; margin-top: 1rem; padding-top: 0.8rem; border-top: 1px solid var(--rule); }

.px-panel-summary { overflow-y: auto; min-height: 0; }
.px-panel-disclosure { margin: 1rem 0; }
.px-panel-disclose-note { font-size: 0.66rem; color: var(--muted); line-height: 1.5; margin: 0.25rem 0 0.45rem; }
.px-panel-disclose-row {
  display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; gap: 0.6rem; align-items: center;
  padding: 0.3rem 0.4rem; border-radius: 4px;
}
.px-panel-disclose-row.is-flag { background: rgba(210,153,34,0.08); }
.px-panel-disclose-rank { font-family: var(--mono); font-size: 0.66rem; color: var(--muted); text-align: right; }
.px-panel-disclose-title { font-size: 0.74rem; color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.px-panel-disclose-move { font-family: var(--mono); font-size: 0.62rem; color: var(--ink); }
.px-panel-export { margin-top: 1.2rem; padding-top: 0.9rem; border-top: 1px solid var(--rule); }
.px-panel-topn { width: 110px; }
.px-panel-export-note { font-size: 0.68rem; color: var(--muted); line-height: 1.5; margin-top: 0.4rem; }
.px-modal-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; padding: 1.1rem 1.25rem 0.85rem; border-bottom: 1px solid var(--rule); }
.px-modal-title { font-family: var(--serif); font-weight: 400; font-size: 1.25rem; line-height: 1.2; }
.px-modal-sub { font-size: 0.76rem; color: var(--muted); margin-top: 0.2rem; }
.px-modal-body { padding: 1.15rem 1.25rem 1.35rem; overflow-y: auto; }

.px-form-actions { display: flex; justify-content: flex-end; gap: 0.5rem; margin-top: 1.1rem; }

.px-run-block { text-align: left; }
.px-result { border-top: 1px solid var(--rule-soft); padding-top: 0.9rem; margin-top: 0.4rem; }
.px-result-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 0.9rem; }
.px-result-total { font-family: var(--mono); font-size: 2rem; line-height: 1; }
.px-result-total em { font-style: normal; font-size: 0.8rem; color: var(--muted); }

/* Confidence: proximity of the contributing neighbours against the radius */
.px-confidence { margin: 0.7rem 0 0.9rem; }
.px-confidence-head { display: flex; align-items: baseline; justify-content: space-between; gap: 0.5rem; }
.px-confidence-value { font-family: var(--mono); font-size: 1rem; color: var(--ink); }
.px-confidence-bar {
  height: 4px; border-radius: 2px; background: var(--bg-sunk); margin-top: 0.35rem; overflow: hidden;
}
.px-confidence-fill { height: 100%; border-radius: 2px; background: var(--accent); transition: width 0.2s; }
.px-confidence-note { font-size: 0.66rem; color: var(--muted); line-height: 1.5; margin-top: 0.35rem; }
.px-confidence-toggle {
  display: flex; align-items: center; gap: 0.35rem; margin-top: 0.4rem; padding: 0;
  background: none; border: none; cursor: pointer; color: var(--ink-2);
  font-family: var(--mono); font-size: 0.62rem;
}
.px-confidence-toggle:hover { color: var(--accent); }
.px-confidence-rows { margin-top: 0.4rem; display: flex; flex-direction: column; gap: 3px; }
.px-confidence-row {
  display: grid; grid-template-columns: minmax(0, 1fr) 34px 70px 38px;
  align-items: center; gap: 0.5rem;
}
.px-confidence-row-label {
  font-size: 0.68rem; color: var(--ink-2);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.px-confidence-row-share { font-family: var(--mono); font-size: 0.56rem; color: var(--muted); text-align: right; }
.px-confidence-row-bar { height: 3px; border-radius: 2px; background: var(--bg-sunk); overflow: hidden; }
.px-confidence-row-bar span { display: block; height: 100%; border-radius: 2px; background: var(--accent); }
.px-confidence-row-value { font-family: var(--mono); font-size: 0.62rem; color: var(--ink); text-align: right; }
.px-confidence-row-value.is-none { color: var(--muted); }

.px-contributors { display: flex; flex-direction: column; gap: 0.4rem; margin: 0.75rem 0; }
.px-contributor { text-align: left; background: var(--bg-sunk); border: 1px solid var(--rule); border-radius: 6px; padding: 0.5rem 0.6rem; cursor: pointer; transition: border-color 0.15s; }
.px-contributor:hover { border-color: var(--accent); }
.px-contributor-title { display: block; font-size: 0.75rem; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.px-contributor-meta { display: block; font-family: var(--mono); font-size: 0.58rem; color: var(--muted); margin-top: 1px; }
.px-contributor-bar { display: block; height: 3px; background: var(--rule); border-radius: 2px; margin-top: 5px; overflow: hidden; }
.px-contributor-bar span { display: block; height: 100%; background: var(--accent); border-radius: 2px; }

/* ── Rubric structure (the method, readable without running one) ──────────── */
.px-rubric-method {
  display: flex; align-items: center; gap: 6px; width: 100%; margin-top: 0.5rem;
  padding: 4px 0; background: none; border: none; cursor: pointer; text-align: left;
  font-family: var(--mono); font-size: 0.6rem; letter-spacing: 0.08em; color: var(--muted);
}
.px-rubric-method:hover { color: var(--accent); }
.px-rubric-flagged { color: var(--accent-yellow); }

.px-structure { margin: 0.35rem 0 0.2rem; padding-left: 0.6rem; border-left: 1px solid var(--rule); }
.px-structure-crit { margin-bottom: 0.6rem; }
.px-structure-crit-head, .px-structure-sub-head {
  display: flex; align-items: baseline; justify-content: space-between; gap: 0.5rem;
}
.px-structure-name { font-size: 0.75rem; color: var(--ink); }
.px-structure-share { font-family: var(--mono); font-size: 0.58rem; color: var(--accent); flex-shrink: 0; }
.px-structure-sub { margin: 0.3rem 0 0.3rem 0.6rem; padding-left: 0.5rem; border-left: 1px dashed var(--rule); }
.px-structure-sub-name { font-size: 0.71rem; color: var(--ink-2); }
.px-structure-sub-name em { font-style: italic; color: var(--muted); }
.px-structure-guidance { font-size: 0.66rem; color: var(--muted); line-height: 1.45; margin: 2px 0; }
.px-structure-muted { opacity: 0.7; }
.px-structure-tools { margin-top: 3px; }
.px-structure-tools .px-tag { font-size: 0.55rem; padding: 1px 5px; }
.px-structure-focus { margin-top: 0.5rem; padding-top: 0.4rem; border-top: 1px dashed var(--rule); }

/* ── Rubric builder ───────────────────────────────────────────────────────── */
.px-crit-card {
  border: 1px solid var(--rule); border-radius: 8px; padding: 0.6rem;
  margin-bottom: 0.5rem; background: var(--bg-sunk);
}
.px-crit-head { display: flex; gap: 0.4rem; align-items: center; }
.px-crit-subs { margin: 0.5rem 0 0.4rem 0.4rem; padding-left: 0.5rem; border-left: 1px dashed var(--rule); }
.px-crit-sub { margin-bottom: 0.35rem; }
.px-crit-sub-row { display: flex; gap: 0.35rem; align-items: center; }
.px-crit-share {
  font-family: var(--mono); font-size: 0.58rem; color: var(--accent);
  width: 34px; text-align: right; flex-shrink: 0;
}
.px-crit-sub-detail {
  margin: 0.4rem 0 0.5rem 1.4rem; padding: 0.5rem 0.6rem;
  border-left: 2px solid var(--rule); background: rgba(255,255,255,0.02); border-radius: 0 6px 6px 0;
}
.px-crit-sub-detail .px-field { margin-bottom: 0.6rem; }
.px-crit-sub-detail .px-field:last-child { margin-bottom: 0; }

.px-tool-picker { display: flex; flex-wrap: wrap; gap: 4px; }
.px-tool {
  padding: 3px 8px; border-radius: 4px; cursor: pointer;
  background: var(--bg-sunk); border: 1px solid var(--rule); color: var(--muted);
  font-family: var(--mono); font-size: 0.58rem; letter-spacing: 0.04em; transition: all 0.15s;
}
.px-tool:hover { color: var(--ink-2); }
.px-tool.is-on { background: rgba(88,166,255,0.14); border-color: var(--accent); color: var(--accent); }

/* ── Evaluation review ────────────────────────────────────────────────────── */
.px-run-plan {
  margin: 0.6rem 0 0.9rem; padding: 0.5rem 0.7rem;
  border: 1px solid var(--rule); border-radius: 6px; background: var(--bg-sunk);
}
.px-run-plan-row {
  display: flex; align-items: baseline; justify-content: space-between; gap: 0.5rem;
  font-size: 0.75rem; color: var(--ink-2); padding: 2px 0;
}
.px-run-plan-row em { font-style: normal; font-family: var(--mono); font-size: 0.58rem; color: var(--muted); }

.px-criterion { margin-bottom: 0.9rem; }
.px-criterion-head {
  display: flex; align-items: baseline; justify-content: space-between; gap: 0.5rem;
  padding-bottom: 0.3rem; border-bottom: 1px solid var(--rule);
}
.px-criterion-name { font-size: 0.86rem; color: var(--ink); }
.px-criterion-value { font-family: var(--mono); font-size: 1rem; }

.px-sub { padding: 0.5rem 0 0.55rem; border-bottom: 1px dashed var(--rule-soft); }
.px-sub:last-child { border-bottom: none; }
.px-sub.is-flagged { background: rgba(210,153,34,0.06); border-radius: 5px; padding-left: 0.4rem; padding-right: 0.4rem; }
.px-sub-toggle {
  display: flex; align-items: baseline; gap: 0.4rem; width: 100%;
  background: none; border: none; padding: 0; cursor: pointer; text-align: left;
}
.px-sub-toggle-sm { width: auto; flex-shrink: 0; }
.px-sub-label { flex: 1; min-width: 0; font-size: 0.78rem; color: var(--ink-2); }
.px-sub-toggle:hover .px-sub-label { color: var(--ink); }
.px-sub-share { font-family: var(--mono); font-size: 0.55rem; color: var(--muted); flex-shrink: 0; }

.px-sub-numbers { display: grid; grid-template-columns: 1fr 1fr 1.2fr; gap: 0.5rem; margin: 0.4rem 0 0.35rem 13px; }
.px-sub-metric { display: flex; flex-direction: column; gap: 2px; }
.px-sub-metric-label {
  font-family: var(--mono); font-size: 0.52rem; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--muted);
}
.px-sub-metric-value { font-family: var(--mono); font-size: 1.05rem; line-height: 1.1; }
.px-sub-metric-none { color: var(--muted); }
.px-sub-entry { cursor: text; }
.px-sub-input { padding: 3px 7px; font-size: 0.85rem; width: 100%; }

.px-sub-bar { position: relative; height: 4px; border-radius: 2px; background: var(--bg-sunk); margin: 0.35rem 0 0 13px; }
.px-sub-bar-fill { height: 100%; border-radius: 2px; transition: width 0.2s; }
.px-sub-bar-tick {
  position: absolute; top: -3px; width: 2px; height: 10px;
  background: var(--ink-2); opacity: 0.8; border-radius: 1px; transform: translateX(-1px);
}
.px-sub-flag {
  margin: 0.35rem 0 0 13px; font-size: 0.66rem; line-height: 1.45;
  color: var(--accent-yellow);
}

.px-sub-detail {
  margin: 0.5rem 0 0.2rem 13px; padding: 0.5rem 0.7rem;
  border-left: 2px solid var(--rule); background: rgba(255,255,255,0.02); border-radius: 0 6px 6px 0;
}
.px-sub-block { margin-bottom: 0.6rem; }
.px-sub-block:last-child { margin-bottom: 0; }
.px-sub-rationale { font-size: 0.72rem; color: var(--ink-2); line-height: 1.55; }
/* The comparables here carry both a distance and a weight, so the meta column
   needs to size to its content instead of the HUD's narrower fixed width. */
.px-sub-detail .px-subscore { grid-template-columns: minmax(0, 1fr) auto 28px; }

.px-flag-banner {
  padding: 0.5rem 0.7rem; margin-bottom: 0.8rem; border-radius: 6px;
  background: rgba(210,153,34,0.12); border: 1px solid rgba(210,153,34,0.35);
  color: var(--accent-yellow); font-size: 0.72rem; line-height: 1.45;
}

/* Sub-scores inside the document HUD */
.px-hud-criterion { margin-bottom: 0.5rem; }
.px-hud-sub { margin-left: 0.6rem; }
.px-hud-sub.is-flagged .px-hud-sub-label { color: var(--accent-yellow); }
.px-hud-sub-row {
  display: flex; align-items: center; gap: 5px; width: 100%;
  background: none; border: none; padding: 2px 0; cursor: pointer; text-align: left;
}
.px-hud-sub-label { flex: 1; min-width: 0; font-size: 0.68rem; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.px-hud-sub-row:hover .px-hud-sub-label { color: var(--ink-2); }
.px-hud-sub-value { font-family: var(--mono); font-size: 0.65rem; color: var(--ink-2); }
.px-hud-sub-tag {
  font-family: var(--mono); font-size: 0.5rem; letter-spacing: 0.06em; text-transform: uppercase;
  padding: 1px 4px; border-radius: 3px; background: rgba(255,255,255,0.08); color: var(--muted);
}
.px-hud-sub-tag.is-flag { background: rgba(210,153,34,0.18); color: var(--accent-yellow); }
.px-hud-sub-detail { margin: 2px 0 6px 14px; padding-left: 0.5rem; border-left: 1px solid var(--rule); }
.px-hud-sub-meta {
  display: flex; flex-wrap: wrap; gap: 0.6rem; margin-top: 3px;
  font-family: var(--mono); font-size: 0.55rem; color: var(--muted);
}

/* ── Settings menu (gear in the top bar) ──────────────────────────────────── */
.px-settings { position: relative; display: flex; align-items: center; }
.px-settings-btn {
  position: relative; display: flex; align-items: center; justify-content: center;
  width: 28px; height: 28px; border-radius: 5px; cursor: pointer;
  background: none; border: 1px solid transparent; color: var(--muted);
  transition: color 0.2s, border-color 0.2s, background 0.2s;
}
.px-settings-btn:hover, .px-settings-btn.is-open { color: var(--ink); border-color: var(--rule); background: rgba(255,255,255,0.04); }
.px-settings-gear { font-size: 0.95rem; line-height: 1; }
.px-settings-btn.is-open .px-settings-gear { color: var(--accent); }
.px-settings-badge {
  position: absolute; top: -4px; right: -4px; min-width: 14px; height: 14px; padding: 0 3px;
  border-radius: 7px; background: var(--accent-yellow); color: #1a1400;
  font-family: var(--mono); font-size: 0.55rem; font-weight: 500; line-height: 14px; text-align: center;
}

.px-settings-panel {
  position: absolute; top: calc(100% + 14px); right: 0; z-index: 950;
  width: min(460px, 82vw); background: var(--bg-elev);
  border: 1px solid var(--rule); border-radius: 8px;
  box-shadow: 0 12px 34px rgba(0,0,0,0.6); overflow: hidden;
}
.px-settings-head {
  display: flex; align-items: center; justify-content: space-between; gap: 0.75rem;
  padding: 0.7rem 0.9rem; border-bottom: 1px solid var(--rule);
}
.px-settings-title { font-family: var(--mono); font-size: 0.7rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink-2); }
.px-settings-status { display: flex; align-items: center; gap: 6px; font-family: var(--mono); font-size: 0.6rem; color: var(--muted); }
.px-settings-section { padding: 0.7rem 0.9rem 0.9rem; }
.px-settings-section-head { display: flex; align-items: baseline; justify-content: space-between; }
.px-settings-list { max-height: 300px; overflow-y: auto; }
.px-settings-line {
  font-family: var(--mono); font-size: 0.65rem; color: var(--ink-2);
  line-height: 1.55; padding: 1px 0;
}
.px-settings-time { color: var(--muted); margin-right: 0.55rem; opacity: 0.75; }
.px-settings-empty { font-family: var(--mono); font-size: 0.65rem; color: var(--muted); }
.px-settings-list::-webkit-scrollbar { width: 8px; }
.px-settings-list::-webkit-scrollbar-thumb { background: var(--rule); border-radius: 4px; }
.px-settings-list::-webkit-scrollbar-track { background: transparent; }

.tone-ok { color: var(--accent-green); }
.tone-warn { color: var(--accent-yellow); }
.tone-info { color: var(--ink-2); }

/* ── Fallbacks ────────────────────────────────────────────────────────────── */
.px-fallback { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.6rem; padding: 2rem; text-align: center; }
.px-fallback-title { font-family: var(--serif); font-size: 1.3rem; }
.px-fallback-body { font-family: var(--mono); font-size: 0.75rem; color: var(--accent-red); max-width: 60ch; }
.px-fallback-hint { font-size: 0.8rem; color: var(--muted); max-width: 55ch; }

.px-boot { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; flex-direction: column; gap: 0.75rem; color: var(--muted); font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.12em; text-transform: uppercase; }
.px-boot-orbit { width: 34px; height: 34px; border: 1px solid var(--rule); border-top-color: var(--accent); border-radius: 50%; animation: px-spin 1s linear infinite; }
@keyframes px-spin { to { transform: rotate(360deg); } }

/* ── Scrollbars ───────────────────────────────────────────────────────────── */
.px-panel-scroll::-webkit-scrollbar, .px-hud::-webkit-scrollbar, .px-modal-body::-webkit-scrollbar { width: 8px; }
.px-panel-scroll::-webkit-scrollbar-thumb, .px-hud::-webkit-scrollbar-thumb, .px-modal-body::-webkit-scrollbar-thumb { background: var(--rule); border-radius: 4px; }
.px-panel-scroll::-webkit-scrollbar-track, .px-hud::-webkit-scrollbar-track, .px-modal-body::-webkit-scrollbar-track { background: transparent; }

/* ── Responsive ───────────────────────────────────────────────────────────── */
@media (max-width: 1180px) {
  .px-hud { width: 300px; }
}

@media (max-width: 900px) {
  /* Too narrow to give the panel its own column: expanded, it floats over the
     canvas; collapsed, the rail stays in flow and the canvas gets the rest. */
  .px-sidebar:not(.is-collapsed) {
    position: absolute; top: 0; bottom: 0; left: 0; z-index: 800;
    width: min(320px, 88vw);
    box-shadow: 12px 0 34px rgba(0,0,0,0.5);
  }
  .px-hud { top: auto; bottom: 0; right: 0; left: 0; width: auto; max-height: 52%; border-radius: 10px 10px 0 0; }
  .px-hints { display: none; }
  /* The HUD claims the bottom of the screen here, so the legend moves up top */
  .px-dock, .px-dock.is-select { bottom: auto; top: 12px; right: 12px; max-width: calc(100vw - 24px); max-height: 46%; }
  .px-dock-body, .px-dock.is-select .px-dock-body { width: min(440px, calc(100vw - 26px)); }
  .px-dock-body { width: min(280px, calc(100vw - 26px)); }
  /* Drop the suite dropdown, not the whole nav — the settings gear has to stay
     reachable, since the console now lives behind it. */
  .nav-links .suite-dropdown { display: none; }
  .nav-links { gap: 0.75rem; }
}

/* Cohort readiness on the Score tab: what is scored, and the way to close the
   gap without visiting every planet. */
.px-cohort { margin-top: 0.9rem; }
.px-cohort-state {
  display: flex; flex-wrap: wrap; gap: 0.2rem 0.7rem; margin-bottom: 0.55rem;
  font-family: var(--mono); font-size: 0.6rem; color: var(--muted);
}
.px-cohort-state .is-todo { color: var(--accent-yellow); }
.px-cohort-state .is-done { color: var(--accent-green); }
.px-cohort-steps { margin-top: 0.4rem; }
.px-cohort .px-btn-block { margin-top: 0.5rem; }
.px-cohort-note { font-size: 0.64rem; color: var(--muted); line-height: 1.45; margin-top: 0.35rem; }

/* ── First-run tour ───────────────────────────────────────────────────────── */
/* The spotlight is a hole in a very large shadow, so the highlighted control
   stays live and clickable while everything around it dims. */
.px-tour { position: fixed; inset: 0; z-index: 1200; pointer-events: none; }
.px-tour-scrim { position: absolute; inset: 0; background: rgba(3, 6, 10, 0.72); pointer-events: auto; }
.px-tour-spot {
  position: fixed; border-radius: 10px; pointer-events: none;
  box-shadow: 0 0 0 9999px rgba(3, 6, 10, 0.72), 0 0 0 1px var(--accent) inset;
  transition: top 0.22s ease, left 0.22s ease, width 0.22s ease, height 0.22s ease;
}
.px-tour-card {
  pointer-events: auto; z-index: 2;
  background: var(--bg-elev); border: 1px solid var(--rule); border-radius: 10px;
  padding: 1rem 1.1rem 0.9rem; box-shadow: 0 18px 48px rgba(0, 0, 0, 0.6);
}
.px-tour-progress { display: flex; gap: 5px; margin-bottom: 0.7rem; }
.px-tour-pip {
/* The tour has two halves — solo work, then panel work. The gap in the pips is
   the only place that shows, and it is worth showing: someone evaluating alone
   can stop at it. */
.px-tour-pip.is-act-break { margin-left: 0.55rem; position: relative; }
.px-tour-pip.is-act-break::before {
  content: ""; position: absolute; left: -0.34rem; top: 50%;
  width: 1px; height: 0.6rem; transform: translateY(-50%);
  background: var(--rule);
}
  width: 22px; height: 3px; border-radius: 2px; border: none; padding: 0; cursor: pointer;
  background: var(--rule); transition: background 0.15s;
}
.px-tour-pip:hover { background: var(--ink-2); }
.px-tour-pip.is-past { background: var(--muted); }
.px-tour-pip.is-on { background: var(--accent); }
.px-tour-title { font-family: var(--serif); font-weight: 400; font-size: 1.1rem; line-height: 1.25; margin-bottom: 0.4rem; }
.px-tour-body { font-size: 0.78rem; line-height: 1.6; color: var(--ink-2); }
.px-tour-body strong { color: var(--ink); font-weight: 500; }
.px-tour-note {
  font-size: 0.66rem; line-height: 1.5; color: var(--muted); margin-top: 0.5rem;
  padding-top: 0.5rem; border-top: 1px dashed var(--rule);
}
.px-tour-card .px-btn-block { margin-top: 0.7rem; }
.px-tour-actions {
  display: flex; align-items: center; justify-content: space-between; gap: 0.5rem;
  margin-top: 0.9rem; padding-top: 0.7rem; border-top: 1px solid var(--rule);
}
.px-tour-nav { display: flex; gap: 0.4rem; }

@media (max-width: 720px) {
  .px-tour-card { left: 50% !important; right: auto !important; top: auto !important;
    bottom: 16px !important; transform: translateX(-50%) !important; width: calc(100vw - 32px); }
}

/* Local-only mode: one switch every outbound request consults. */
.px-toggle-row { display: flex; align-items: flex-start; gap: 0.6rem; cursor: pointer; }
.px-toggle-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.px-toggle-label { font-size: 0.76rem; color: var(--ink); }
.px-toggle-hint { font-size: 0.64rem; line-height: 1.45; color: var(--muted); }
/* ── Saved probes and white space ────────────────────────────────── */

.px-probe-save { display: flex; gap: 0.4rem; margin: 0.5rem 0; }
.px-probe-save .px-input { flex: 1; min-width: 0; }

.px-saved-probes { display: flex; flex-direction: column; gap: 0.3rem; margin-top: 0.8rem; }
.px-saved-probe { display: flex; align-items: center; gap: 0.3rem; }
.px-saved-probe-body {
  flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 0.1rem;
  background: none; border: 0; border-left: 2px solid var(--rule); padding: 0.25rem 0.5rem;
  cursor: pointer; font: inherit; text-align: left; color: var(--text);
}
.px-saved-probe-body:hover { border-left-color: var(--accent); color: var(--accent); }
.px-saved-probe-query {
  font-size: 0.68rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.px-saved-probe-meta { font-family: var(--mono); font-size: 0.56rem; color: var(--muted); }

.px-ws-body { display: flex; flex-direction: column; gap: 0.5rem; padding-top: 0.35rem; }
.px-ws-rows { display: flex; flex-direction: column; gap: 0.35rem; }
.px-ws-main {
  width: 100%; display: grid; grid-template-columns: 2.2rem 1fr 2.5rem;
  align-items: center; gap: 0.5rem;
  background: none; border: 0; border-left: 2px solid var(--rule);
  padding: 0.3rem 0.5rem; cursor: pointer; font: inherit; text-align: left; color: var(--text);
}
.px-ws-main:hover { border-left-color: var(--accent); }
.px-ws-score {
  font-family: var(--mono); font-size: 0.8rem; color: var(--accent);
  font-variant-numeric: tabular-nums;
}
.px-ws-detail { display: flex; flex-direction: column; gap: 0.1rem; min-width: 0; }
.px-ws-where { font-family: var(--mono); font-size: 0.6rem; }
.px-ws-meta {
  font-size: 0.58rem; color: var(--muted);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
/* Confidence as a bar, never a second percentage — it is not a score. */
.px-ws-confidence {
  display: block; height: 0.3rem; background: var(--rule-soft); border-radius: 2px; overflow: hidden;
}
.px-ws-confidence span { display: block; height: 100%; background: var(--accent); border-radius: 2px; }
.px-ws-evidence {
  display: flex; flex-direction: column; gap: 0.3rem;
  padding: 0.4rem 0 0.4rem 0.6rem; border-left: 1px dashed var(--rule-soft); margin-left: 0.5rem;
}

/* ── Rubric health ───────────────────────────────────────────────────────── */

.px-health { border-top: 1px dashed var(--rule-soft); margin-top: 0.5rem; padding-top: 0.5rem; }
.px-health-toggle {
  display: flex; align-items: center; gap: 0.4rem; width: 100%;
  background: none; border: 0; padding: 0.25rem 0; cursor: pointer;
  font: inherit; font-size: 0.68rem; color: var(--muted); text-align: left;
}
.px-health-toggle:hover { color: var(--text); }
.px-health-verdict { margin-left: auto; font-family: var(--mono); font-size: 0.58rem; flex: none; }
.px-health-verdict.is-warn { color: var(--accent-yellow); }
.px-health-verdict.is-ok { color: var(--muted); }
.px-health-body { display: flex; flex-direction: column; gap: 0.5rem; padding: 0.35rem 0 0.5rem; }
.px-health-section { display: flex; flex-direction: column; gap: 0.35rem; margin-top: 0.2rem; }
.px-health-rows { display: flex; flex-direction: column; gap: 0.3rem; }
.px-health-row { display: grid; grid-template-columns: 7rem 1fr auto; align-items: center; gap: 0.5rem; }
.px-health-label {
  font-size: 0.66rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.px-health-num {
  font-family: var(--mono); font-size: 0.6rem; color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.px-health-effect { font-family: var(--mono); font-size: 0.6rem; color: var(--accent); text-align: right; }
.px-health-effect.is-inert { color: var(--muted); }
.px-health-warn {
  font-size: 0.63rem; line-height: 1.5; color: var(--accent-yellow);
  margin: 0.1rem 0 0.2rem; padding-left: 0.5rem; border-left: 2px solid var(--accent-yellow);
}

/* Spread against the widest criterion, so a flat one is visibly flat rather
   than merely a smaller number in a column of numbers. */
.px-spread { height: 0.4rem; background: var(--rule-soft); border-radius: 2px; overflow: hidden; }
.px-spread-fill { display: block; height: 100%; background: var(--accent); border-radius: 2px; }
.px-spread-fill.is-flat { background: var(--accent-yellow); }

/* ── Ownership ───────────────────────────────────────────────── */

/* A proposal somebody else holds. Amber rather than red: this is not an error,
   it is the system working, and the way through is right there. */
.px-hud-owned {
  border-left: 2px solid var(--accent-yellow);
  background: rgba(210, 153, 34, 0.06);
  padding: 0.6rem 0.75rem;
  margin-bottom: 0.7rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.px-hud-owned p { margin: 0; font-size: 0.68rem; line-height: 1.5; color: var(--muted); }
.px-hud-owned .px-btn { align-self: flex-start; }
.px-hud-steps.is-locked { opacity: 0.5; }

/* The score somebody actually gave, beside the one the ranking used. Small and
   quiet: it is context for the number, not a competing number. */
.px-panel-raw {
  display: block;
  font-family: var(--mono);
  font-size: 0.55rem;
  font-style: normal;
  color: var(--muted);
  line-height: 1.2;
}

/* ── Calibration ─────────────────────────────────────────────────────────── */

/* Scores as a strip of dots rather than a smoothed curve. With ten or twelve
   proposals an evaluator has points, not a distribution, and a bell curve drawn
   over twelve numbers claims a precision the data does not have. */
.px-strip-scale {
  display: flex; justify-content: space-between;
  font-family: var(--mono); font-size: 0.58rem; color: var(--muted);
  padding: 0 0 0.2rem;
}
.px-calib-rows { display: flex; flex-direction: column; gap: 0.85rem; margin-bottom: 0.7rem; }
.px-calib-row { display: flex; flex-direction: column; gap: 0.3rem; }
.px-calib-head { display: flex; align-items: baseline; justify-content: space-between; gap: 0.5rem; }
.px-calib-name { font-size: 0.72rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.px-calib-meta {
  font-family: var(--mono); font-size: 0.58rem; color: var(--muted);
  flex: none; font-variant-numeric: tabular-nums;
}
.px-calib-effect { font-size: 0.63rem; line-height: 1.45; color: var(--muted); margin: 0.1rem 0 0; }

.px-strip { position: relative; height: 1.1rem; }
.px-strip-axis {
  position: absolute; left: 0; right: 0; top: 50%; height: 1px;
  background: var(--rule-soft); display: block;
}
.px-strip-dot {
  position: absolute; top: 50%; width: 0.4rem; height: 0.4rem; margin: -0.2rem 0 0 -0.2rem;
  border-radius: 50%; background: var(--accent); opacity: 0.75; display: block;
}
.px-strip-dot.is-calibrated { background: var(--accent-yellow); opacity: 0.6; }
.px-strip-median {
  position: absolute; top: 12%; height: 76%; width: 1px; margin-left: -0.5px;
  background: var(--text); display: block;
}

/* The fitted map, against the diagonal it would follow if no correction were
   needed. The gap between the two IS the correction. */
.px-curve { width: 100%; height: 4.5rem; margin-top: 0.25rem; }
.px-curve-identity { stroke: var(--rule); stroke-width: 0.6; stroke-dasharray: 2 2; vector-effect: non-scaling-stroke; }
.px-curve-line { fill: none; stroke: var(--accent-yellow); stroke-width: 1.4; vector-effect: non-scaling-stroke; }
.px-curve-point { fill: var(--accent); opacity: 0.7; }

/* ── Blind comparison ────────────────────────────────────────────────────── */

.px-compare-progress { display: flex; align-items: center; gap: 0.7rem; margin-bottom: 0.7rem; }
.px-compare-progress > span {
  font-family: var(--mono); font-size: 0.65rem; color: var(--muted); flex: none;
  font-variant-numeric: tabular-nums;
}
.px-compare-track { flex: 1; height: 2px; background: var(--rule-soft); border-radius: 1px; }
.px-compare-track span { display: block; height: 100%; background: var(--accent); border-radius: 1px; }
.px-compare-instruction { font-size: 0.72rem; color: var(--muted); line-height: 1.5; margin: 0 0 0.9rem; }

.px-compare-split { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; min-height: 24rem; }
@media (max-width: 900px) { .px-compare-split { grid-template-columns: 1fr; } }
.px-compare-side { display: flex; flex-direction: column; gap: 0.55rem; min-width: 0; }
.px-compare-head { display: flex; flex-direction: column; gap: 0.2rem; }
.px-compare-label {
  font-family: var(--mono); font-size: 0.6rem; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--accent);
}
.px-compare-title { font-size: 0.85rem; margin: 0; line-height: 1.35; }
.px-compare-meta { font-size: 0.63rem; color: var(--muted); }
.px-compare-frame {
  flex: 1; min-height: 20rem; width: 100%; border: 1px solid var(--rule);
  border-radius: 3px; background: var(--bg-raised, rgba(255,255,255,0.02));
}
.px-compare-done { display: flex; flex-direction: column; gap: 0.8rem; align-items: flex-start; }

/* ── The panel tab: people, assignment, coverage ─────────────────────────── */

.px-evaluator-list { display: flex; flex-direction: column; gap: 0.4rem; margin-bottom: 0.7rem; }
.px-evaluator { border-left: 2px solid var(--rule); padding-left: 0.6rem; }
.px-evaluator.is-me { border-left-color: var(--accent); }
.px-evaluator-head { display: flex; align-items: center; gap: 0.4rem; }
.px-evaluator-name {
  flex: 1; min-width: 0; display: flex; align-items: baseline; gap: 0.4rem;
  background: none; border: 0; padding: 0.3rem 0; cursor: pointer;
  font: inherit; font-size: 0.78rem; color: var(--text); text-align: left;
}
.px-evaluator-name:hover { color: var(--accent); }
.px-evaluator-caret { color: var(--muted); font-size: 0.6rem; flex: none; }
.px-evaluator-you {
  font-family: var(--mono); font-size: 0.58rem; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--accent); flex: none;
}
.px-evaluator-body { display: flex; flex-direction: column; gap: 0.55rem; padding: 0.3rem 0 0.6rem; }
.px-evaluator-field { display: flex; flex-direction: column; gap: 0.28rem; }

.px-anchor-control { display: flex; align-items: center; gap: 0.5rem; }
.px-anchor-control input[type='range'] { width: 6.5rem; accent-color: var(--accent); }
.px-anchor-value { font-family: var(--mono); min-width: 2.2rem; text-align: right; }

/* Coverage: two stacked fills in one track, so "scored" and "signed off" read
   as stages of the same quantity rather than as two competing bars. */
.px-coverage { display: flex; flex-direction: column; gap: 0.4rem; margin-bottom: 0.6rem; }
.px-coverage-row { display: grid; grid-template-columns: 6.5rem 1fr 2.6rem; align-items: center; gap: 0.5rem; }
.px-coverage-name {
  font-size: 0.7rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.px-coverage-bar {
  position: relative; height: 0.5rem; border-radius: 2px;
  background: var(--rule-soft, rgba(255,255,255,0.07)); overflow: hidden;
}
.px-coverage-bar span { position: absolute; inset: 0 auto 0 0; display: block; border-radius: 2px; }
.px-coverage-scored { background: color-mix(in srgb, var(--accent) 45%, transparent); }
.px-coverage-confirmed { background: var(--accent); }
.px-coverage-count {
  font-family: var(--mono); font-size: 0.64rem; color: var(--muted); text-align: right;
  font-variant-numeric: tabular-nums;
}
.px-coverage-legend {
  display: flex; gap: 0.9rem; font-size: 0.62rem; color: var(--muted); margin-bottom: 0.5rem;
}
.px-coverage-legend span { display: flex; align-items: center; gap: 0.3rem; }
.px-coverage-legend i { width: 0.6rem; height: 0.5rem; border-radius: 2px; display: block; }
.px-swatch-scored { background: color-mix(in srgb, var(--accent) 45%, transparent); }
.px-swatch-confirmed { background: var(--accent); }

/* A settings row whose control is a text field rather than a switch. Stacked,
   because a name field beside a hint reads as a caption for the hint. */
.px-field-row { display: flex; flex-direction: column; gap: 0.45rem; padding: 0.1rem 0 0.3rem; }
.px-field-row .px-input { width: 100%; }
.px-input-attention { border-color: var(--accent-yellow); }

.px-toggle-caveat {
  margin-top: 0.5rem; padding: 0.45rem 0.6rem; border-radius: 5px;
  background: var(--bg-sunk); border: 1px solid var(--rule);
  font-size: 0.62rem; line-height: 1.5; color: var(--muted);
}
/* The document pane, when local-only mode declines to load it */
.px-panel-frame-off {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 0.7rem; text-align: center; padding: 1.5rem; color: var(--muted);
  font-size: 0.72rem; line-height: 1.55;
}
.px-panel-frame-off p { max-width: 34ch; }

/* Provenance: a sub-criterion the model could not actually judge */
.px-sub-unassessed {
  font-family: var(--mono); font-size: 0.5rem; letter-spacing: 0.06em; text-transform: uppercase;
  padding: 1px 5px; border-radius: 3px; flex-shrink: 0;
  background: rgba(210,153,34,0.16); color: var(--accent-yellow);
}
.px-toggle-second { margin-top: 0.7rem; padding-top: 0.7rem; border-top: 1px dashed var(--rule); }

/* What a sub-score's evidence rested on, when it was not the document itself */
.px-basis {
  font-family: var(--mono); font-size: 0.5rem; letter-spacing: 0.06em; text-transform: uppercase;
  padding: 1px 5px; border-radius: 3px; flex-shrink: 0;
}
.px-basis-knowledge { background: rgba(88,166,255,0.16); color: var(--accent); }
.px-basis-none { background: rgba(210,153,34,0.16); color: var(--accent-yellow); }

/* ── Quality check (agent vs approximated) ────────────────────────────────────
   Mark colours are chart-specific rather than the app's --accent/--accent-yellow:
   those sit at OKLCH L~0.72, above the 0.48–0.67 band a dark surface wants, so
   they bloom against #111820. These are the same two hues, stepped down until
   they pass the lightness band, chroma floor, CVD separation (ΔE 27.4 protan),
   normal-vision floor (ΔE 30.7) and 3:1 contrast checks. */

.px-q-controls {
  display: flex; align-items: center; gap: 0.9rem; flex-wrap: wrap;
  padding-bottom: 0.85rem; border-bottom: 1px solid var(--rule); margin-bottom: 0.9rem;
}
.px-q-field { display: flex; align-items: center; gap: 0.45rem; }
.px-q-field > span {
  font-family: var(--mono); font-size: 0.6rem; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--muted);
}
.px-q-field select {
  background: var(--bg-sunk); color: var(--ink); border: 1px solid var(--rule);
  border-radius: 5px; padding: 4px 8px; font-family: var(--sans); font-size: 0.78rem;
}
.px-q-note { font-size: 0.72rem; color: var(--muted); }

.px-q-stats { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 0.85rem; }
.px-q-stat {
  display: flex; flex-direction: column; gap: 1px; min-width: 118px;
  background: var(--bg-sunk); border: 1px solid var(--rule);
  border-radius: 7px; padding: 0.5rem 0.7rem;
}
.px-q-stat-label {
  font-family: var(--mono); font-size: 0.56rem; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--muted);
}
.px-q-stat-value {
  font-family: var(--mono); font-size: 1.05rem; color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.px-q-stat-hint { font-size: 0.63rem; color: var(--muted); }
.px-q-stat.is-weak { border-color: rgba(210,153,34,0.45); }
.px-q-stat.is-weak .px-q-stat-value, .px-q-stat.is-weak .px-q-stat-hint { color: var(--accent-yellow); }

/* Status colours carry an icon-free sentence, so the text itself is the label. */
.px-q-verdict {
  font-size: 0.82rem; line-height: 1.5; padding: 0.6rem 0.8rem; border-radius: 7px;
  border: 1px solid var(--rule); background: var(--bg-sunk); color: var(--ink-2);
  margin-bottom: 1rem;
}
.px-q-verdict.is-good { border-color: rgba(63,185,80,0.35); }
.px-q-verdict.is-warning { border-color: rgba(210,153,34,0.35); }
.px-q-verdict.is-serious { border-color: rgba(210,153,34,0.5); }
.px-q-verdict.is-critical { border-color: rgba(248,81,73,0.45); }

.px-q-chart { position: relative; flex: 1; min-height: 0; display: flex; justify-content: center; }
/* Square plot: size from the height and let width follow, so the diagonal stays 45°. */
.px-q-plotwrap { position: relative; display: flex; min-height: 0; }
.px-q-svg { height: 100%; max-height: 58vh; width: auto; max-width: 100%; display: block; }
.px-q-plot { fill: var(--bg-sunk); stroke: var(--rule); stroke-width: 1; }
.px-q-grid { stroke: var(--rule-soft); stroke-width: 1; }
.px-q-tick {
  fill: var(--muted); font-family: var(--mono); font-size: 10px;
  font-variant-numeric: tabular-nums;
}
.px-q-axis {
  fill: var(--ink-2); font-family: var(--mono); font-size: 10px;
  letter-spacing: 0.12em; text-transform: uppercase;
}

.px-q-identity { stroke: var(--muted); stroke-width: 1.5; stroke-dasharray: 5 5; opacity: 0.7; }
.px-q-fit { stroke: #c98500; stroke-width: 2; stroke-linecap: round; }
.px-q-linelabel { font-family: var(--mono); font-size: 10px; letter-spacing: 0.06em; }
.px-q-linelabel.is-identity { fill: var(--muted); }
.px-q-linelabel.is-fit { fill: #c98500; }

/* The 2px surface ring keeps overlapping documents countable. */
.px-q-dot {
  fill: #3987e5; stroke: var(--bg-sunk); stroke-width: 2;
  transition: r 0.1s ease;
}
.px-q-dot.is-on { fill: #6da7ec; stroke: var(--ink); }

/* Top-left of the plot: the corner an agreement scatter leaves emptiest. */
.px-q-tip {
  position: absolute; top: 14px; left: 68px; pointer-events: none;
  display: flex; flex-direction: column; gap: 2px; max-width: 340px;
  background: var(--bg-elev); border: 1px solid var(--rule); border-radius: 7px;
  padding: 0.5rem 0.7rem; box-shadow: 0 8px 24px rgba(0,0,0,0.5); font-size: 0.74rem;
}
.px-q-tip strong { color: var(--ink); font-weight: 500; }
.px-q-tip span { color: var(--ink-2); }
.px-q-tip-res { font-family: var(--mono); font-size: 0.68rem; }

.px-q-tablewrap { flex: 1; min-height: 0; overflow-y: auto; }
.px-q-table { width: 100%; border-collapse: collapse; font-size: 0.78rem; }
.px-q-table th {
  position: sticky; top: 0; background: var(--bg-elev); text-align: left;
  font-family: var(--mono); font-size: 0.58rem; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--muted); font-weight: 500;
  padding: 0.4rem 0.6rem 0.35rem 0; border-bottom: 1px solid var(--rule);
}
.px-q-table td {
  padding: 0.4rem 0.6rem 0.4rem 0; border-bottom: 1px solid var(--rule-soft);
  color: var(--ink-2);
}
.px-q-table td.n, .px-q-table th.n {
  text-align: right; font-family: var(--mono); font-variant-numeric: tabular-nums;
}
.px-q-table td.is-far { color: var(--accent-yellow); }

/* ── arXiv ingest ─────────────────────────────────────────────────────────── */
.px-arxiv-row { display: flex; gap: 0.5rem; margin-bottom: 0.55rem; }
.px-arxiv-field { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.px-arxiv-cat { flex: 1 1 auto; }
.px-arxiv-n { flex: 0 0 74px; }
.px-arxiv-field > span {
  font-family: var(--mono); font-size: 0.56rem; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--muted);
}
.px-arxiv-field input {
  width: 100%; background: var(--bg-sunk); color: var(--ink);
  border: 1px solid var(--rule); border-radius: 5px; padding: 5px 8px;
  font-family: var(--mono); font-size: 0.75rem;
}
.px-arxiv-field input:focus { outline: none; border-color: var(--accent); }
