/* Functional detail views that are shared by the sober admin interface. */
.study-admin-slot { margin-left:auto; min-width:0 }
.study-admin-runs { display:flex; flex-wrap:wrap; align-items:center; justify-content:flex-end; gap:8px; margin-left:auto }
.study-admin-runs select { width:auto; max-width:240px; min-height:36px; border-radius:8px; font-size:.8rem }
.study-admin-runs .audit-buttons { gap:6px; flex-wrap:wrap; justify-content:flex-end }
.study-admin-runs .tool { min-height:36px; padding:6px 10px; border:1px solid var(--line); border-radius:8px; font-size:.8rem; color:var(--muted); background:var(--panel) }
.study-admin-runs .tool:hover { color:var(--ink); border-color:var(--rose); background:var(--panel-2) }
.study-admin-runs .tool:focus-visible { outline:2px solid var(--rose); outline-offset:3px }
.study-admin-runs .tool:active { background:var(--panel-2) }
.message-audit-head { display:flex; align-items:flex-start; justify-content:space-between; gap:16px; margin-bottom:12px }
.message-audit-head > details { flex:1; min-width:0 }
.case-page-head:has(.study-admin-slot), .visual-page-head:has(.study-admin-slot) { flex-wrap:wrap }
@media(max-width:700px) {
  .study-admin-slot { flex-basis:100% }
  .study-admin-runs, .study-admin-runs .audit-buttons { justify-content:flex-start }
  .message-audit-head { flex-wrap:wrap }
  .message-audit-head > .study-admin-runs { margin-left:0; flex-basis:100% }
  .study-admin-runs .tool { min-height:40px }
}
.question-preview {
  overflow:hidden;
  display:-webkit-box;
  -webkit-box-orient:vertical;
  -webkit-line-clamp:3
}
.detail-list {
  display:grid;
  grid-template-columns:minmax(120px,.35fr) minmax(0,1fr);
  gap:8px 16px
}
.detail-list dd {
  margin:0;
  overflow-wrap:anywhere
}
.panel summary,.instruction-files summary,.delivery-fallback summary {
  cursor:pointer;
  font-weight:650
}
.instruction-files {
  margin-top:18px
}
.instruction-files details {
  padding:6px 0;
  border-top:1px solid var(--line)
}
.delivery-fallback,.prepared-mode-legend {
  margin:0 0 16px;
  padding:10px 12px;
  border:1px solid var(--rose);
  border-left-width:3px;
  background:var(--panel-2)
}
.deployment-banner,.deployment-notice {
  color:var(--rose);
  font-size:.78rem;
  font-weight:700;
  letter-spacing:.04em
}
.deployment-notice {
  display:inline-block;
  margin:0 0 12px;
  padding:5px 8px;
  border:1px solid var(--rose)
}
.modal:has(.tabs),.modal:has(.table-wrap) {
  width:min(1100px,calc(100vw - 64px))
}
.modal:has(.account-panel) { width:min(540px,calc(100vw - 28px)) }
.modal:has(.export-options) { width:min(500px,calc(100vw - 28px)) }
.modal pre,.admin-layout pre {
  white-space:pre-wrap;
  overflow-wrap:anywhere
}
.test-batch h2 {
  margin:0 0 4px
}
.test-batch td small,.compare-result small {
  display:block;
  margin-top:4px
}
.test-batch td .tool {
  display:block;
  width:100%;
  text-align:left;
  white-space:nowrap
}
.test-batch-findings,.test-batch-feedback {
  padding-left:10px;
  border-left:2px solid var(--rose)
}
.prepared-comparison .record {
  min-width:0;
  max-height:none;
  overflow:visible;
  white-space:normal
}
.notes-editor {
  display:flex;
  flex-direction:column;
  gap:10px
}
.notes-area {
  display:block;
  width:100%;
  min-height:clamp(320px,55vh,640px);
  resize:vertical;
  line-height:1.6
}
.notes-actions,.record-head,.audit-buttons {
  display:flex;
  align-items:start;
  justify-content:space-between;
  gap:12px;
  flex-wrap:wrap
}
.notes-status,.compare-chosen {
  color:var(--muted);
  font-size:.82rem;
  overflow-wrap:anywhere
}
.annotation-tools {
  margin:10px 0
}
.annotation-composer {
  display:grid;
  gap:8px;
  padding:12px;
  border:1px solid var(--line);
  background:var(--panel-2)
}
.annotation-composer[hidden] { display:none }
.compare-form,.compare-picker {
  margin:0;
  padding:12px;
  border:1px solid var(--line)
}
.compare-choices,.compare-filters {
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:10px
}
.compare-results {
  max-height:220px;
  overflow:auto
}
.compare-result {
  display:block;
  width:100%;
  padding:10px;
  border:1px solid transparent;
  text-align:left;
  white-space:normal;
  overflow-wrap:anywhere
}
.compare-result[aria-pressed="true"] {
  border-color:var(--rose);
  background:var(--panel-2)
}
.audit-removed {
  padding:.35rem;
  color:#d99898;
  text-decoration:line-through;
  background:#631e292e
}
.audit-added {
  padding:.35rem;
  color:#e6c0ca;
  background:#8b1e3f40
}
.run-journey .journey-steps {
  margin:1.2rem 0;
  padding-left:1.8rem
}
.run-journey .journey-step {
  padding:0 0 1rem .5rem
}
.journey-fields {
  display:grid;
  grid-template-columns:minmax(100px,auto) minmax(0,1fr);
  gap:.45rem 1rem;
  margin:.8rem 0
}
.journey-fields dd {
  margin:0;
  white-space:pre-wrap;
  overflow-wrap:anywhere
}
.journey-evidence,.journey-omission,.journey-failed {
  padding:.65rem;
  border-left:2px solid var(--line)
}
.journey-omission,.journey-failed {
  border-left-color:var(--rose)
}
.run-journey pre {
  max-height:45vh;
  overflow:auto;
  white-space:pre-wrap;
  overflow-wrap:anywhere
}
.pipeline-catalog{margin-top:14px}.pipeline-mode{display:grid;gap:12px}.pipeline-flow{display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:8px;margin:0;padding-left:22px}.pipeline-flow li{padding:9px;border-left:2px solid var(--rose);background:var(--panel-2)}.pipeline-example{padding:10px 12px;border-left:3px solid var(--rose);background:var(--panel-2)}.pipeline-prompt{padding:8px 0;border-top:1px solid var(--line)}.pipeline-prompt summary{cursor:pointer}.pipeline-services{margin-top:22px}.pipeline-services p{overflow-wrap:anywhere}.pipeline-services a:focus-visible{outline:2px solid var(--rose);outline-offset:3px}
@media (max-width:800px) {
  .compare-choices,.compare-filters,.detail-list,.journey-fields {
    grid-template-columns:1fr
  }
}
