/* Case Law Reporter — Read-only. No write paths. No chat. No authority. */

.registry-banner {
  background: #1a1a2e;
  color: #eaeaea;
  padding: 0.75rem 1rem;
  text-align: center;
  font-size: 0.9rem;
  border-bottom: 1px solid #16213e;
}

.registry-banner strong { font-weight: 600; }

/* Trust framing (30-F): determinism, authority disclaimer, replay sufficiency. Procedure-grounded trust. */
.registry-trust-framing {
  padding: 0.75rem 1rem;
  background: #f0f4f8;
  border-bottom: 1px solid #e2e8f0;
  font-size: 0.9rem;
  color: #334155;
}
.registry-trust-framing p { margin: 0.35rem 0; }
.registry-trust-framing p:first-child { margin-top: 0; }
.registry-trust-framing p:last-child { margin-bottom: 0; }
.registry-trust-determinism { font-weight: 500; }
.registry-trust-authority { font-style: italic; }
.registry-trust-replay { }

/* Hosted Viewer (30-C): hosted read + submit-only. Cannot advance cases or invoke the court. */
.registry-hosted-banner {
  padding: 0.75rem 1rem;
  background: #1a237e;
  color: #e8eaf6;
  text-align: center;
  font-size: 0.9rem;
  border-bottom: 1px solid #3949ab;
}
.registry-halt-primary { border-left: 4px solid #1565c0; }
.registry-halt-reason { font-weight: 600; font-size: 1.05rem; }
.registry-derived-note { font-size: 0.8rem; color: #6c757d; margin-bottom: 0.5rem; }
.registry-motions-list { list-style: none; padding: 0; margin: 0; }
.registry-motions-list li { margin: 0.25rem 0; }

/* Submit page (30-C): procedural filing. No upload/run/execute/certify/approve language. */
.registry-hosted-mode { margin-top: 0; }
.registry-execution-mode { font-size: 1rem; font-weight: 600; }
.registry-hosted-desc { margin-top: 0.5rem; font-size: 0.95rem; }
.registry-nonguarantee { font-style: italic; }

/* Finality (PROMPT 33): procedural closure. This lifecycle is final. No further procedures may attach. */
.registry-finality { border-left: 4px solid #1565c0; }
.registry-finality-statement { font-weight: 600; font-size: 1rem; }
.registry-finality-reason { margin-top: 0.5rem; font-size: 0.9rem; color: #37474f; }

/* Minimal human intake (30-SUBMIT): one textarea, one submit button, one response box. */
.registry-submit { margin: 1rem 0; }
.registry-submit h1 { font-size: 1.5rem; margin-bottom: 0.75rem; }
.registry-submit label { display: block; margin: 0.75rem 0 0.25rem 0; font-weight: 500; }
.registry-submit textarea { width: 100%; max-width: 40rem; min-height: 6rem; padding: 0.5rem; font-family: inherit; font-size: 0.95rem; border: 1px solid #dee2e6; border-radius: 4px; }
.registry-submit button { margin-top: 0.75rem; padding: 0.4rem 0.75rem; font-size: 0.95rem; cursor: pointer; }
.registry-result { margin-top: 1rem; padding: 1rem; background: #f8f9fa; border: 1px solid #dee2e6; border-radius: 4px; font-size: 0.85rem; white-space: pre-wrap; word-break: break-all; overflow-x: auto; }
.registry-result-link { margin-top: 0.5rem; font-size: 0.9rem; }
.registry-result-link a { color: #667eea; }

.registry-blocked {
  background: #f8d7da;
  border: 1px solid #f5c6cb;
  padding: 1rem;
  margin: 1rem 0;
  border-radius: 4px;
}

.registry-published { margin: 1rem 0; }

.registry-section {
  margin: 1rem 0;
  padding: 0.75rem 1rem;
  background: #f8f9fa;
  border-radius: 4px;
  border-left: 3px solid #667eea;
}

.registry-section h3 { margin-top: 0; margin-bottom: 0.5rem; font-size: 1rem; }

.registry-code { font-family: monospace; font-size: 0.85rem; white-space: pre-wrap; word-break: break-all; }

/* Certificate viewer — signed order */
.registry-certificate { background: #fff; border: 1px solid #dee2e6; padding: 1rem; border-radius: 4px; }

/* Court transcript — reasoning record */
.registry-transcript { background: #f8f9fa; border-left: 3px solid #6c757d; padding: 0.75rem; }

.registry-deposition { margin: 0.5rem 0; padding: 0.5rem; background: #fff; border-radius: 2px; }

/* Rule citation panel — LAW.* with links */
.registry-rules { margin: 1rem 0; }
.registry-rules ul { list-style: none; padding: 0; margin: 0; }
.registry-rules li { margin: 0.25rem 0; }
.registry-rules a { color: #667eea; text-decoration: none; }
.registry-rules a:hover { text-decoration: underline; }

/* StandardOfReviewClass badge */
.registry-badge {
  display: inline-block;
  padding: 0.2rem 0.5rem;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-radius: 3px;
  margin-right: 0.5rem;
}

.registry-badge-de-novo { background: #d4edda; color: #155724; }
.registry-badge-clear-error { background: #cce5ff; color: #004085; }
.registry-badge-pending { background: #fff3cd; color: #856404; }

/* Appeal status */
.registry-appeal { font-size: 0.85rem; color: #6c757d; }

/* Fork / supersession graph */
.registry-graph { font-size: 0.9rem; }
.registry-graph ul { list-style: none; padding: 0; margin: 0.5rem 0 0 0; }
.registry-graph li { margin: 0.25rem 0; }
.registry-graph a { color: #667eea; }

/* Replay button — verifies hashes + digestStage FINAL */
.registry-replay {
  display: inline-block;
  margin-top: 0.5rem;
  padding: 0.5rem 1rem;
  background: #667eea;
  color: #fff;
  border: none;
  border-radius: 4px;
  font-size: 0.9rem;
  cursor: pointer;
}

.registry-replay:hover { background: #5a6fd6; }
.registry-replay:disabled { background: #adb5bd; cursor: not-allowed; }

.registry-replay-note { font-size: 0.8rem; color: #6c757d; margin-top: 0.25rem; }

/* Precedent index table */
.registry-index table { width: 100%; border-collapse: collapse; margin-top: 1rem; }
.registry-index th, .registry-index td { padding: 0.5rem 0.75rem; text-align: left; border-bottom: 1px solid #dee2e6; }
.registry-index th { background: #f8f9fa; font-weight: 600; }
.registry-index a { color: #667eea; }

.court-valid { color: #155724; }
.court-invalid { color: #721c24; }

/* Appellate UI — appeal graph P-0001 ──(appealed)──▶ P-0001A */
.registry-appeal-graph {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin: 1rem 0;
  padding: 1rem;
  background: #f8f9fa;
  border-radius: 4px;
  font-size: 0.95rem;
}

.registry-appeal-graph-node {
  padding: 0.25rem 0.5rem;
  background: #fff;
  border: 1px solid #dee2e6;
  border-radius: 3px;
}

.registry-appeal-graph-node a { color: #667eea; text-decoration: none; }
.registry-appeal-graph-node a:hover { text-decoration: underline; }

.registry-appeal-graph-edge {
  color: #6c757d;
  font-size: 0.85rem;
}

.registry-appeal-graph-edge .relation { font-style: italic; color: #495057; }

/* Appeal diff links — read-only, hash-verified */
.registry-diff-links { margin: 0.75rem 0; }
.registry-diff-links ul { list-style: none; padding: 0; margin: 0; }
.registry-diff-links li { margin: 0.25rem 0; }
.registry-diff-links a { color: #667eea; font-size: 0.9rem; }
.registry-diff-links .hash-verified { font-size: 0.75rem; color: #6c757d; }

/* Ratio (binding) / Dicta (persuasive) */
.registry-ratio { border-left-color: #155724; }
.registry-binding { font-size: 0.8rem; color: #155724; font-weight: 600; }
.registry-dicta { border-left-color: #856404; }
.registry-persuasive { font-size: 0.8rem; color: #856404; font-style: italic; }

/* Three-node appeal graph caption */
.registry-appeal-graph-three { flex-wrap: wrap; }
.registry-graph-caption { font-size: 0.85rem; color: #6c757d; margin-top: 0.5rem; font-family: monospace; }

/* Holding ID (composite doctrine unit) */
.registry-holding-id { font-size: 0.95rem; }
.registry-holding-note { font-size: 0.85rem; color: #6c757d; margin-top: 0.25rem; }
.registry-ratio-decidendi { list-style: none; padding: 0; margin: 0.25rem 0 0 0; }
.registry-ratio-decidendi li { margin: 0.2rem 0; }
.registry-ratio-decidendi code { font-size: 0.9rem; }

/* Doctrinal stability marker (historical intent). Purely informational. */
.registry-stability-settled { background: #d4edda; color: #155724; }
.registry-stability-open { background: #fff3cd; color: #856404; }
.registry-stability-fragile { background: #f8d7da; color: #721c24; }

/* Institute Layer (Visibility): Timeline view — jurisprudence temporal */
.registry-timeline-wrap { overflow-x: auto; }
.registry-timeline-caption { font-size: 0.85rem; color: #6c757d; margin-bottom: 1rem; }
.registry-timeline {
  display: flex;
  align-items: flex-start;
  gap: 0;
  flex-wrap: nowrap;
  padding: 0.5rem 0;
  min-width: min-content;
}
.registry-timeline-node {
  flex: 0 0 auto;
  min-width: 140px;
  max-width: 180px;
  padding: 0.75rem;
  background: #fff;
  border: 1px solid #dee2e6;
  border-radius: 4px;
  font-size: 0.8rem;
}
.registry-timeline-stage {
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  margin-bottom: 0.5rem;
  padding-bottom: 0.25rem;
  border-bottom: 1px solid #eee;
  color: #495057;
}
.registry-timeline-details { margin: 0; }
.registry-timeline-details dt { font-weight: 600; font-size: 0.7rem; color: #6c757d; margin-top: 0.35rem; }
.registry-timeline-details dt:first-child { margin-top: 0; }
.registry-timeline-details dd { margin: 0.15rem 0 0 0; word-break: break-word; }
.registry-timeline-details code { font-size: 0.7rem; }
.registry-timeline-replay { font-size: 0.65rem; white-space: normal; word-break: break-all; }
.registry-timeline-arrow {
  flex: 0 0 auto;
  align-self: center;
  padding: 0 0.25rem;
  color: #adb5bd;
  font-weight: 700;
}

/* Lifecycle Trace (28-C): run-manifest. Deterministic lifecycle runner, pinned law. */
.registry-lifecycle-trace { margin-top: 1rem; }
.registry-lifecycle-banner {
  margin: 0 0 1rem 0;
  padding: 0.75rem 1rem;
  background: #e8eaf6;
  border: 1px solid #c5cae9;
  border-radius: 4px;
  font-size: 0.9rem;
  color: #1a237e;
}
.registry-lifecycle-halt { margin-bottom: 1rem; font-size: 0.9rem; }
.registry-lifecycle-halt-reason { font-weight: 600; }
.registry-lifecycle-steps {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 0.5rem;
}
.registry-lifecycle-step {
  flex: 0 0 auto;
  min-width: 160px;
  padding: 0.6rem;
  background: #fafafa;
  border: 1px solid #e0e0e0;
  border-radius: 4px;
  font-size: 0.85rem;
}
.registry-lifecycle-step-header { margin-bottom: 0.35rem; }
.registry-lifecycle-index { font-weight: 700; color: #6c757d; margin-right: 0.35rem; }
.registry-lifecycle-actor { font-weight: 600; text-transform: uppercase; margin-right: 0.35rem; color: #37474f; }
.registry-lifecycle-action { font-weight: 500; }
.registry-lifecycle-details { margin: 0; }
.registry-lifecycle-details dt { font-weight: 600; font-size: 0.7rem; color: #6c757d; margin-top: 0.35rem; }
.registry-lifecycle-details dt:first-child { margin-top: 0; }
.registry-lifecycle-details dd { margin: 0.15rem 0 0 0; word-break: break-word; }
.registry-lifecycle-details code { font-size: 0.7rem; }
.registry-lifecycle-replay { font-size: 0.65rem; white-space: normal; word-break: break-all; }
.registry-lifecycle-arrow {
  flex: 0 0 auto;
  align-self: center;
  padding: 0 0.25rem;
  color: #adb5bd;
  font-weight: 700;
}

/* Institute Rendering: Case table (Pass, Required, Executed, Satisfied, Exhausted, Receipt, Rule) */
.registry-case-table .registry-table { width: 100%; border-collapse: collapse; margin-top: 0.5rem; font-size: 0.9rem; }
.registry-case-table .registry-table th,
.registry-case-table .registry-table td { padding: 0.4rem 0.6rem; text-align: left; border: 1px solid #dee2e6; }
.registry-case-table .registry-table th { background: #f8f9fa; font-weight: 600; }
.registry-case-table .registry-table td code { font-size: 0.8rem; }

/* Attack Exhaustion panel */
.registry-attack-panel .registry-table { width: 100%; border-collapse: collapse; margin-top: 0.5rem; font-size: 0.9rem; }
.registry-attack-panel .registry-table th,
.registry-attack-panel .registry-table td { padding: 0.4rem 0.6rem; text-align: left; border: 1px solid #dee2e6; }
.registry-attack-panel .registry-table th { background: #f8f9fa; font-weight: 600; }
.registry-attack-panel .registry-table td:first-child { font-weight: 500; }

/* Institute Visibility (26-E): Executed Passes — procedural proof, not analytics */
.registry-exhaustion-banner {
  margin: 1rem 0;
  padding: 0.75rem 1rem;
  background: #e8f5e9;
  border: 1px solid #a5d6a7;
  border-radius: 4px;
  font-size: 0.9rem;
  color: #1b5e20;
}
.registry-executed-passes .registry-table { width: 100%; border-collapse: collapse; margin-top: 0.5rem; font-size: 0.9rem; }
.registry-executed-passes .registry-table th,
.registry-executed-passes .registry-table td { padding: 0.4rem 0.6rem; text-align: left; border: 1px solid #dee2e6; }
.registry-executed-passes .registry-table th { background: #f8f9fa; font-weight: 600; }
.registry-executed-passes .registry-table td code { font-size: 0.8rem; }
.registry-visibility-note { font-size: 0.8rem; color: #6c757d; margin: 0 0 0.5rem 0; }
.registry-pass-satisfied { color: #155724; font-weight: 500; }
.registry-pass-failed { color: #721c24; font-weight: 500; }
.registry-pass-exhausted { color: #004d40; font-weight: 500; }

/* Institute Procedural Ledger: docket by tick, motion ledger (idempotencyKey), clerk plan, why stuck */
.registry-ledger .registry-ledger-sub { font-size: 0.95rem; margin: 1rem 0 0.5rem 0; }
.registry-ledger .registry-ledger-sub:first-of-type { margin-top: 0; }
.registry-docket-tick, .registry-motion-ledger { width: 100%; border-collapse: collapse; margin-top: 0.25rem; font-size: 0.9rem; }
.registry-docket-tick th, .registry-docket-tick td,
.registry-motion-ledger th, .registry-motion-ledger td { padding: 0.35rem 0.6rem; text-align: left; border: 1px solid #dee2e6; }
.registry-docket-tick th, .registry-motion-ledger th { background: #f8f9fa; font-weight: 600; }
.registry-motion-ledger td code { font-size: 0.8rem; }
.registry-clerk-plan { margin: 0.25rem 0; font-size: 0.9rem; }
.registry-action-chain { margin: 0.25rem 0; font-size: 0.9rem; }
.registry-why-stuck { margin: 0.5rem 0 0.25rem 0; color: #721c24; }
.registry-why-stuck-desc { margin: 0; font-size: 0.85rem; color: #6c757d; }

/* Run Status (Refusal-Aware). REFUSED ≠ BLOCKED. Refusal = legal denial. Blocked = lawful wait state. */
.registry-badge-run-status { display: inline-block; padding: 0.25rem 0.5rem; font-size: 0.8rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; border-radius: 3px; }
.registry-badge-refused { background: #8b0000; color: white; }
.registry-badge-blocked { background: #b8860b; color: black; }
.registry-badge-running { background: #4682b4; color: white; }
.registry-badge-complete { background: #006400; color: white; }
.registry-run-hash { margin-top: 0.5rem; font-size: 0.85rem; }
.registry-ledger-receipts { list-style: none; padding: 0; margin: 0.25rem 0 0 0; font-size: 0.9rem; }
.registry-ledger-receipts li { margin: 0.2rem 0; }
.registry-ledger-receipts code { font-size: 0.8rem; }

/* Batch Status (29-C): system-wide operational state. Read-only. No controls. No mutation paths. */
.registry-batch-status { margin: 1rem 0; }
.registry-batch-note { font-size: 0.9rem; color: #6c757d; margin-bottom: 1rem; }
.registry-batch-table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.registry-batch-table th,
.registry-batch-table td { padding: 0.5rem 0.75rem; text-align: left; border: 1px solid #dee2e6; }
.registry-batch-table th { background: #f8f9fa; font-weight: 600; }
.registry-batch-table a { color: #667eea; text-decoration: none; }
.registry-batch-table a:hover { text-decoration: underline; }
.registry-batch-copy { font-size: 0.85rem; padding: 0.2rem 0.5rem; cursor: pointer; }
.registry-batch-mapping { font-size: 0.8rem; color: #6c757d; margin-top: 0.75rem; font-style: italic; }
.registry-batch-status-complete { color: #155724; font-weight: 500; }
.registry-batch-status-blocked { color: #856404; font-weight: 500; }
.registry-batch-status-refused { color: #721c24; font-weight: 500; }

/* I-1 Dual-Mode: Explore vs Commit. Authority boundary. No irreversible action outside Commit. */
.registry-mode-explore {
  padding: 0.75rem 1rem;
  background: #e8f5e9;
  color: #1b5e20;
  text-align: center;
  font-size: 0.95rem;
  border-bottom: 2px solid #81c784;
}
.registry-mode-explore strong { font-weight: 600; }
.registry-mode-commit-banner {
  padding: 0.75rem 1rem;
  background: #fff3e0;
  color: #e65100;
  text-align: center;
  font-size: 0.95rem;
  border-bottom: 2px solid #ffb74d;
}
.registry-mode-commit-banner strong { font-weight: 600; }
.registry-commit-modal-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 1rem;
}
.registry-commit-modal {
  background: #fff;
  border: 3px solid #e65100;
  border-radius: 8px;
  max-width: 32rem;
  width: 100%;
  padding: 1.5rem;
  box-shadow: 0 4px 20px rgba(0,0,0,0.2);
}
.registry-commit-modal h2 { margin-top: 0; font-size: 1.25rem; color: #bf360c; }
.registry-commit-modal .registry-commit-copy { margin: 1rem 0; font-size: 0.95rem; color: #37474f; }
.registry-commit-modal .registry-commit-submit { margin-top: 1rem; padding: 0.5rem 1rem; font-size: 1rem; font-weight: 600; background: #e65100; color: #fff; border: none; border-radius: 4px; cursor: pointer; }
.registry-commit-modal .registry-commit-submit:hover { background: #bf360c; }
.registry-commit-modal .registry-commit-cancel { margin-left: 0.75rem; padding: 0.5rem 1rem; font-size: 0.95rem; background: #f5f5f5; color: #37474f; border: 1px solid #e0e0e0; border-radius: 4px; cursor: pointer; }
.registry-commit-modal .registry-commit-cancel:hover { background: #eee; }
.registry-proceed-commit { padding: 0.5rem 1rem; font-size: 0.95rem; font-weight: 600; background: #1b5e20; color: #fff; border: none; border-radius: 4px; cursor: pointer; margin-top: 0.5rem; }
.registry-proceed-commit:hover { background: #2e7d32; }

/* I-2 Draft: candidates only. No submissions, no hashes, no lineage. */
.registry-draft-banner { padding: 0.75rem 1rem; background: #e3f2fd; color: #0d47a1; border-bottom: 1px solid #90caf9; font-size: 0.9rem; }
.registry-draft-candidates { margin: 1rem 0; }
.registry-draft-candidate { margin-bottom: 1rem; padding: 1rem; background: #fafafa; border: 1px solid #e0e0e0; border-radius: 4px; }
.registry-draft-candidate textarea { width: 100%; min-height: 4rem; padding: 0.5rem; font-family: inherit; font-size: 0.9rem; border: 1px solid #dee2e6; border-radius: 4px; }
.registry-draft-actions { margin-top: 0.5rem; display: flex; gap: 0.5rem; flex-wrap: wrap; }
.registry-draft-actions button { padding: 0.35rem 0.75rem; font-size: 0.85rem; cursor: pointer; border-radius: 4px; border: 1px solid #dee2e6; background: #fff; }
.registry-draft-actions button:hover { background: #f5f5f5; }
.registry-draft-hint { margin-top: 0.5rem; padding: 0.5rem; background: #fff8e1; border-left: 3px solid #ffa000; font-size: 0.85rem; color: #5d4037; }
.registry-draft-compare { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-top: 1rem; }
@media (max-width: 600px) { .registry-draft-compare { grid-template-columns: 1fr; } }
.registry-draft-compare pre { margin: 0; padding: 0.75rem; background: #f5f5f5; border-radius: 4px; font-size: 0.8rem; white-space: pre-wrap; }

/* I-4 Cold Paths: commitment points. No animation, muted colors, slight delay, explicit language. */
.registry-cold-path { animation: none !important; transition: none !important; }
.registry-commit-modal-overlay.registry-cold-path { background: rgba(55, 65, 81, 0.5); }
.registry-commit-modal.registry-cold-path {
  background: #f9fafb;
  border: 2px solid #6b7280;
  box-shadow: none;
}
.registry-commit-modal.registry-cold-path h2 { color: #374151; font-size: 1.1rem; }
.registry-commit-modal.registry-cold-path .registry-commit-copy { color: #4b5563; font-size: 0.9rem; }
.registry-commit-submit.registry-cold-path {
  background: #6b7280;
  color: #fff;
}
.registry-commit-submit.registry-cold-path:hover { background: #4b5563; }
.registry-commit-submit.registry-cold-path:disabled { background: #9ca3af; color: #d1d5db; cursor: not-allowed; }
.registry-finality.registry-cold-path {
  background: #f3f4f6;
  border-left-color: #6b7280;
}
.registry-finality.registry-cold-path .registry-finality-statement { color: #374151; }
.registry-finality.registry-cold-path .registry-finality-reason { color: #6b7280; }

/* J-1 Why It Stopped: explain halts without coaching. No fixes or strategies. */
.registry-why-stopped-panel {
  margin: 1rem 0;
  padding: 1rem 1.25rem;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-left: 4px solid #64748b;
  font-size: 0.95rem;
}
.registry-why-stopped-panel h3 { margin-top: 0; margin-bottom: 0.75rem; font-size: 1rem; color: #334155; }
.registry-why-stopped-panel dl { margin: 0; }
.registry-why-stopped-panel dt { font-weight: 600; color: #475569; margin-top: 0.5rem; font-size: 0.85rem; }
.registry-why-stopped-panel dt:first-child { margin-top: 0; }
.registry-why-stopped-panel dd { margin: 0.15rem 0 0 0; color: #334155; }
.registry-why-stopped-panel .registry-why-not-next { font-style: italic; color: #64748b; margin-top: 0.75rem; }
.registry-why-stopped-panel .registry-why-allowed { margin-top: 0.5rem; }

/* J-2 Explicit empty / idle state. Inaction is valid. */
.registry-idle-state {
  padding: 1rem 1.25rem;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  border-radius: 4px;
  font-size: 0.95rem;
  color: #475569;
  text-align: center;
}
.registry-idle-state strong { color: #334155; }
