:root {
  color-scheme: dark;
  --bg: #0a0b0a;
  --bg-panel: #101210;
  --bg-raised: #171a17;
  --bg-soft: #1d211d;
  --line: rgba(230, 235, 225, 0.12);
  --line-strong: rgba(230, 235, 225, 0.22);
  --text: #edf2ea;
  --muted: #a3aea2;
  --dim: #687367;
  --green: #37d67a;
  --blue: #5bb8ff;
  --amber: #f0b84a;
  --red: #ff6b6b;
  --violet: #b692ff;
  --accent: #37d67a;
  --shadow: 0 18px 54px rgba(0, 0, 0, 0.28);
  --radius: 8px;
  --font: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", "Fira Code", Consolas, ui-monospace, monospace;
  --motion-fast: 120ms;
  --motion-base: 220ms;
  --motion-slow: 420ms;
  --motion-proof: 700ms;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-verify: cubic-bezier(0.22, 1, 0.36, 1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
  margin: 0;
}

body {
  background:
    linear-gradient(rgba(255, 255, 255, 0.012) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.012) 1px, transparent 1px),
    var(--bg);
  background-size: 48px 48px;
  color: var(--text);
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

* {
  scrollbar-color: rgba(55, 214, 122, 0.36) rgba(5, 7, 6, 0.92);
  scrollbar-width: thin;
}

*::-webkit-scrollbar {
  width: 9px;
  height: 9px;
}

*::-webkit-scrollbar-track {
  background: rgba(5, 7, 6, 0.92);
}

*::-webkit-scrollbar-thumb {
  border: 2px solid rgba(5, 7, 6, 0.92);
  border-radius: 999px;
  background: rgba(55, 214, 122, 0.34);
}

*::-webkit-scrollbar-thumb:hover {
  background: rgba(55, 214, 122, 0.52);
}

button,
input,
textarea {
  font: inherit;
}

button {
  color: inherit;
}

a {
  color: inherit;
  text-decoration: none;
}

[hidden] {
  display: none !important;
}

/* Entry gate */
body:has(.entry-layer:not([hidden])) {
  overflow: hidden;
}

.entry-layer {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  overflow: hidden;
  isolation: isolate;
  width: 100vw;
  height: 100svh;
  min-height: 650px;
  padding: clamp(20px, 4vw, 52px);
  background:
    linear-gradient(180deg, rgba(7, 9, 8, 0) 0%, rgba(4, 6, 5, 0.84) 100%),
    linear-gradient(110deg, rgba(91, 184, 255, 0.08) 0%, transparent 28%, transparent 72%, rgba(240, 184, 74, 0.055) 100%),
    linear-gradient(135deg, #050605 0%, #0b100d 52%, #050606 100%);
}

.entry-layer::before {
  content: "";
  position: absolute;
  inset: -1px;
  z-index: 0;
  background:
    linear-gradient(rgba(237, 242, 234, 0.026) 1px, transparent 1px),
    linear-gradient(90deg, rgba(237, 242, 234, 0.026) 1px, transparent 1px);
  background-size: 64px 64px;
  -webkit-mask-image: linear-gradient(to bottom, #000 0%, #000 70%, transparent 100%);
  mask-image: linear-gradient(to bottom, #000 0%, #000 70%, transparent 100%);
  opacity: 0.42;
}

.entry-layer::after {
  content: "";
  position: absolute;
  left: 8vw;
  right: 8vw;
  top: 55%;
  z-index: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(91, 184, 255, 0.34), rgba(55, 214, 122, 0.44), transparent);
  opacity: 0.34;
}

.entry-layer.leaving {
  animation: entry-leave var(--motion-slow) var(--ease-out) forwards;
}

.skip-entry {
  position: absolute;
  top: 18px;
  right: 22px;
  z-index: 5;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(9, 11, 10, 0.72);
  color: var(--muted);
  padding: 8px 12px;
  cursor: pointer;
  backdrop-filter: blur(14px);
}

.entry-grid {
  position: absolute;
  inset: clamp(82px, 8vw, 124px) clamp(56px, 8vw, 116px);
  z-index: 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-template-rows: repeat(2, minmax(210px, 1fr));
  gap: 18px;
  opacity: 0.15;
  transform: perspective(1200px) rotateX(1.5deg);
  -webkit-mask-image: radial-gradient(ellipse at 50% 48%, transparent 0%, transparent 28%, #000 54%, transparent 86%);
  mask-image: radial-gradient(ellipse at 50% 48%, transparent 0%, transparent 28%, #000 54%, transparent 86%);
  pointer-events: none;
}

.entry-grid span {
  min-height: 0;
  border: 1px solid rgba(230, 235, 225, 0.06);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.01), transparent),
    rgba(255, 255, 255, 0.006);
  animation: grid-resolve var(--motion-proof) var(--ease-verify) both;
}

.entry-grid span:nth-child(n + 9) {
  display: none;
}

.entry-grid span:nth-child(2n) {
  animation-delay: 180ms;
}

.entry-grid span:nth-child(3n) {
  animation-delay: 320ms;
}

.entry-receipt {
  position: absolute;
  right: clamp(-180px, -8vw, -90px);
  top: 50%;
  z-index: 1;
  width: clamp(300px, 27vw, 430px);
  min-height: clamp(360px, 34vw, 500px);
  border: 1px solid rgba(230, 235, 225, 0.14);
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, rgba(237, 242, 234, 0.055), transparent 34%),
    rgba(9, 14, 12, 0.64);
  box-shadow: 0 24px 90px rgba(0, 0, 0, 0.42), 0 0 80px rgba(55, 214, 122, 0.08);
  transform: translateY(-46%) rotate(1.6deg);
  opacity: 0;
  animation: receipt-resolve var(--motion-proof) var(--ease-out) 1500ms forwards;
  backdrop-filter: blur(18px);
  pointer-events: none;
  padding: 24px;
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, transparent 10%, #000 34%, #000 100%);
  mask-image: linear-gradient(90deg, transparent 0%, transparent 10%, #000 34%, #000 100%);
}

.entry-receipt::before {
  content: "";
  position: absolute;
  inset: 14px;
  border: 1px solid rgba(55, 214, 122, 0.18);
  border-radius: 6px;
}

.entry-receipt::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent, rgba(55, 214, 122, 0.1), transparent);
  transform: translateY(-54%);
  animation: spotlight 3600ms var(--ease-verify) infinite;
  opacity: 0.48;
}

.receipt-kicker,
.entry-receipt small {
  display: block;
  position: relative;
  z-index: 1;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 800;
}

.entry-receipt strong {
  position: relative;
  z-index: 1;
  display: block;
  margin: 54px 0 30px;
  color: var(--green);
  font-family: var(--mono);
  font-size: clamp(40px, 4vw, 58px);
  line-height: 0.9;
}

.entry-receipt div {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: space-between;
  gap: 14px;
  margin: 0;
  border-top: 1px solid rgba(230, 235, 225, 0.1);
  border-radius: 0;
  background: transparent;
  padding: 14px 0;
}

.entry-receipt span {
  color: var(--dim);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 800;
}

.entry-receipt b {
  color: var(--text);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 800;
  text-align: right;
}

.entry-receipt small {
  margin-top: 24px;
  color: var(--green);
}

.entry-content {
  position: relative;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: min(1040px, 100%);
  text-align: center;
  transform: translateY(-1vh);
}

.entry-mark,
.entry-content h1,
.entry-content p,
.entry-identities,
.entry-pipeline,
.entry-status-strip,
.entry-actions {
  opacity: 0;
  animation: entry-rise var(--motion-slow) var(--ease-out) forwards;
}

.entry-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: auto;
  margin-bottom: 18px;
  border: 0;
  border-radius: 0;
  color: var(--muted);
  font-family: var(--mono);
  font-weight: 800;
  font-size: 12px;
  background: transparent;
  animation-delay: 0ms;
}

.entry-content h1 {
  margin: 0;
  max-width: 100%;
  font-size: clamp(78px, 10.6vw, 148px);
  line-height: 0.84;
  letter-spacing: 0;
  text-wrap: balance;
  animation-delay: 220ms;
  text-shadow: 0 22px 70px rgba(0, 0, 0, 0.44);
}

.entry-content p {
  margin: 28px auto 0;
  max-width: 680px;
  color: var(--muted);
  font-size: clamp(17px, 1.55vw, 21px);
  animation-delay: 420ms;
}

.entry-actions {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: 32px;
  animation-delay: 620ms;
}

.entry-actions .primary-button,
.entry-actions .secondary-button {
  min-height: 48px;
  padding: 11px 20px;
  font-size: 13px;
}

.entry-actions .primary-button {
  box-shadow: 0 12px 34px rgba(55, 214, 122, 0.22);
}

.entry-identities {
  position: static;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 18px;
  margin: 32px auto 0;
  width: auto;
  animation-delay: 780ms;
}

.entry-identities span,
.entry-status-strip span,
.entry-pipeline span {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(8, 12, 10, 0.72);
  padding: 9px 10px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  backdrop-filter: blur(12px);
}

.entry-identities span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  border: 0;
  background: transparent;
  padding: 0;
  color: rgba(237, 242, 234, 0.74);
  backdrop-filter: none;
}

.entry-identities span::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: var(--green);
  box-shadow: 0 0 18px rgba(55, 214, 122, 0.48);
}

.entry-pipeline {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  margin-top: 24px;
  animation-delay: 960ms;
}

.entry-pipeline i {
  width: 44px;
  height: 1px;
  background: rgba(55, 214, 122, 0.48);
}

.entry-pipeline span {
  border: 0;
  background: transparent;
  padding: 0;
  color: var(--dim);
  backdrop-filter: none;
}

.entry-status-strip {
  position: static;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
  max-width: min(720px, 100%);
  width: auto;
  margin: 20px auto 0;
  animation-delay: 1120ms;
}

.entry-status-strip span {
  border: 0;
  background: transparent;
  padding: 0;
  color: rgba(163, 174, 162, 0.78);
  font-family: var(--mono);
  font-size: 11px;
  backdrop-filter: none;
}

/* Shell */
.app-shell {
  min-height: 100vh;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 70px;
  padding: 12px 24px;
  border-bottom: 1px solid var(--line);
  background: rgba(10, 11, 10, 0.88);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 1px solid rgba(55, 214, 122, 0.46);
  border-radius: var(--radius);
  color: var(--green);
  font-family: var(--mono);
  font-weight: 800;
  background: rgba(55, 214, 122, 0.08);
}

.brand strong,
.brand small {
  display: block;
}

.brand strong {
  font-size: 16px;
}

.brand small {
  color: var(--muted);
  font-size: 12px;
}

.topbar-actions,
.receipt-actions,
.verify-actions,
.presenter-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.status-pill,
.icon-link,
.quiet-button,
.primary-button,
.secondary-button,
.danger-button,
.tab {
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.045);
  color: var(--muted);
  font-weight: 700;
  font-size: 12px;
  cursor: pointer;
  transition:
    background var(--motion-fast) var(--ease-out),
    border-color var(--motion-fast) var(--ease-out),
    color var(--motion-fast) var(--ease-out),
    transform var(--motion-fast) var(--ease-out);
}

.status-pill {
  cursor: default;
  color: var(--green);
  border-color: rgba(55, 214, 122, 0.28);
  background: rgba(55, 214, 122, 0.08);
}

.primary-button {
  border-color: transparent;
  background: var(--accent);
  color: #071008;
}

.secondary-button:hover,
.danger-button:hover,
.quiet-button:hover,
.icon-link:hover,
.tab:hover {
  border-color: var(--line-strong);
  color: var(--text);
  transform: translateY(-1px);
}

.quiet-button.strong {
  color: var(--green);
  border-color: rgba(55, 214, 122, 0.28);
}

.danger-button {
  color: #ff9a9a;
  border-color: rgba(255, 107, 107, 0.32);
  background: rgba(255, 107, 107, 0.08);
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.48;
  transform: none !important;
}

.block {
  display: flex;
  align-items: center;
  justify-content: center;
}

.console-grid {
  display: grid;
  grid-template-columns: 232px minmax(0, 1fr) 318px;
  min-height: calc(100vh - 70px);
}

.case-rail,
.receipt-rail {
  position: sticky;
  top: 70px;
  align-self: start;
  min-height: calc(100vh - 70px);
  overflow: visible;
  border-right: 1px solid var(--line);
  background: #0d100d;
}

.receipt-rail {
  border-right: 0;
  border-left: 1px solid var(--line);
}

.case-rail {
  padding: 14px;
}

.rail-heading,
.queue-heading,
.section-title,
.receipt-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.case-rail .rail-heading {
  display: none;
}

.case-rail .rail-heading small {
  display: none;
}

.rail-heading span,
.queue-heading span,
.section-title span,
.receipt-header span,
.presenter-panel span {
  color: var(--text);
  font-weight: 800;
}

.rail-heading small,
.queue-heading small,
.section-title small,
.presenter-panel small {
  color: var(--dim);
  font-size: 11px;
}

.case-rail .rail-note {
  display: none;
}

.case-card,
.queue-card,
.registry-card {
  width: 100%;
  margin: 0 0 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.035);
  color: var(--muted);
  text-align: left;
}

.case-card {
  display: block;
  padding: 12px;
  cursor: pointer;
}

.case-card.active,
.queue-card.active,
.registry-card.active {
  border-color: color-mix(in srgb, var(--accent) 58%, transparent);
  background: color-mix(in srgb, var(--accent) 10%, transparent);
}

.case-card strong,
.case-card small,
.queue-card strong,
.queue-card p,
.queue-card small {
  display: block;
}

.case-card strong {
  margin: 4px 0 3px;
  color: var(--text);
}

.case-card small,
.queue-card small {
  color: var(--dim);
}

.case-kicker {
  color: var(--accent);
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
}

.rail-note,
.trust-disclaimer {
  margin-top: 14px;
  padding: 13px;
  border: 1px solid rgba(240, 184, 74, 0.24);
  border-radius: var(--radius);
  background: rgba(240, 184, 74, 0.07);
  color: #e4c784;
  font-size: 12px;
}

.demo-queue {
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.queue-card {
  padding: 12px;
}

.queue-card p {
  margin: 6px 0;
  color: var(--muted);
  font-size: 12px;
}

.queue-card div {
  display: flex;
  gap: 8px;
  margin-top: 10px;
}

.workbench {
  min-width: 0;
  padding: clamp(16px, 2vw, 26px);
}

.surface-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 22px;
  overflow-x: auto;
  padding-bottom: 2px;
}

.tab.active {
  color: #071008;
  border-color: transparent;
  background: var(--accent);
}

.view-panel {
  display: none;
}

.view-panel.active {
  display: block;
  animation: panel-rise var(--motion-base) var(--ease-out);
}

.panel-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 250px;
  gap: 18px;
  align-items: stretch;
  margin-bottom: 14px;
}

.panel-header.compact {
  display: block;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--accent);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

h1,
h2 {
  margin: 0;
  letter-spacing: 0;
  line-height: 1.12;
}

h1 {
  max-width: 760px;
  font-size: clamp(30px, 3vw, 44px);
}

h2 {
  font-size: 24px;
}

.panel-header p:not(.eyebrow) {
  max-width: 780px;
  margin: 12px 0 0;
  color: var(--muted);
}

.settlement-gate,
.receipt-settlement {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-panel);
  padding: 16px;
}

.settlement-gate span,
.receipt-settlement span,
.receipt-facts dt,
.identity-strip span,
.diff-grid span {
  display: block;
  color: var(--dim);
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
}

.settlement-gate strong,
.receipt-settlement strong {
  display: block;
  margin: 8px 0 5px;
  color: var(--text);
  font-size: 20px;
}

.settlement-gate small,
.receipt-settlement small {
  color: var(--muted);
}

.settlement-gate.pass,
.receipt-settlement.pass {
  border-color: rgba(55, 214, 122, 0.38);
  background: rgba(55, 214, 122, 0.08);
}

.settlement-gate.revise,
.receipt-settlement.revise {
  border-color: rgba(240, 184, 74, 0.42);
  background: rgba(240, 184, 74, 0.08);
}

.settlement-gate.fail,
.receipt-settlement.fail {
  border-color: rgba(255, 107, 107, 0.42);
  background: rgba(255, 107, 107, 0.08);
}

.identity-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}

.identity-strip div {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.035);
  padding: 12px;
}

.identity-strip strong,
.identity-strip a {
  display: block;
  margin-top: 5px;
  overflow-wrap: anywhere;
  color: var(--text);
}

.identity-strip a {
  color: var(--accent);
}

.proof-stepper {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 10px 0 18px;
  overflow-x: auto;
}

.proof-step {
  display: flex;
  align-items: center;
  flex: 0 0 auto;
  min-height: 28px;
  gap: 8px;
  border: 0;
  border-radius: var(--radius);
  background: transparent;
  padding: 0;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.proof-step span {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--dim);
}

.proof-step.active {
  color: var(--text);
}

.proof-step.active span {
  background: var(--accent);
  box-shadow: 0 0 0 5px color-mix(in srgb, var(--accent) 16%, transparent);
}

.proof-step.done {
  color: var(--accent);
}

.proof-step.done span {
  background: var(--accent);
}

.workspace-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.95fr);
  gap: 18px;
  align-items: start;
}

.app-shell[data-receipt="pending"] .workspace-grid {
  grid-template-columns: minmax(0, 920px);
}

.app-shell[data-receipt="pending"] .evidence-panel,
.app-shell[data-receipt="pending"] .receipt-facts,
.app-shell[data-receipt="pending"] .receipt-actions {
  display: none;
}

.app-shell[data-receipt="pending"] .case-form {
  max-width: 920px;
}

.case-form,
.evidence-panel,
.reasoning-panel,
.verification-checklist,
.tamper-diff,
.presenter-panel,
.json-drawer,
.archive-table,
.architecture-diagram {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #101210;
}

.case-form,
.evidence-panel {
  padding: 16px;
}

.form-toolbar {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-bottom: 12px;
}

.field {
  display: block;
  margin-bottom: 14px;
}

.field span {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

textarea,
input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #0b0d0b;
  color: var(--text);
  padding: 11px 12px;
  resize: vertical;
  outline: none;
}

textarea {
  min-height: 110px;
}

#rubric {
  min-height: 164px;
}

#submittedArtifact {
  min-height: 218px;
}

textarea:focus,
input:focus,
.field.spotlight textarea,
.field.spotlight input {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 16%, transparent);
}

.field.spotlight {
  animation: spotlight var(--motion-proof) var(--ease-verify);
}

.primary-button {
  width: auto;
}

.case-form .primary-button {
  width: 100%;
  min-height: 44px;
}

.primary-button.loading {
  position: relative;
  overflow: hidden;
}

.primary-button.loading::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.34), transparent);
  transform: translateX(-100%);
  animation: shimmer 1000ms linear infinite;
}

.evidence-grid {
  display: grid;
  gap: 8px;
}

.evidence-row,
.verify-row {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.03);
  padding: 9px 10px;
  animation: row-in var(--motion-base) var(--ease-out) both;
  animation-delay: var(--row-delay, 0ms);
}

.evidence-row span,
.verify-row span {
  color: var(--accent);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 800;
}

.evidence-row strong,
.verify-row strong {
  min-width: 0;
  overflow-wrap: anywhere;
}

.evidence-row small,
.verify-row small {
  color: var(--dim);
}

.reasoning-panel {
  margin-top: 14px;
  padding: 14px;
}

.reasoning-list {
  margin: 0;
  padding-left: 20px;
  color: var(--muted);
}

.reasoning-list li + li {
  margin-top: 8px;
}

.empty-state {
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  padding: 18px;
  color: var(--dim);
  background: rgba(255, 255, 255, 0.025);
}

/* Receipt rail */
.receipt-rail {
  padding: 18px 16px;
}

.receipt-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #101210;
  box-shadow: none;
  padding: 16px;
}

.receipt-rail[data-state="pending"] .receipt-card {
  position: sticky;
  top: 88px;
}

.receipt-header strong {
  color: var(--dim);
  font-family: var(--mono);
  font-size: 12px;
  text-transform: uppercase;
}

.receipt-header strong.sealed {
  color: var(--green);
}

.receipt-facts {
  margin: 14px 0;
}

.receipt-facts div {
  display: grid;
  grid-template-columns: 86px minmax(0, 1fr);
  gap: 10px;
  padding: 9px 0;
  border-bottom: 1px solid var(--line);
}

.receipt-facts div:last-child {
  border-bottom: 0;
}

.receipt-facts dd {
  margin: 0;
  min-width: 0;
  overflow-wrap: anywhere;
  color: var(--text);
  font-family: var(--mono);
  font-size: 12px;
}

.decision-text.pass,
.table-decision.pass {
  color: var(--green);
}

.decision-text.revise,
.table-decision.revise {
  color: var(--amber);
}

.decision-text.fail,
.table-decision.fail {
  color: var(--red);
}

.receipt-actions {
  flex-direction: column;
  align-items: stretch;
}

.receipt-actions .secondary-button,
.receipt-actions .icon-link {
  width: 100%;
}

/* Verification */
.verify-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 220px;
  gap: 16px;
  align-items: end;
  margin-top: 18px;
}

.verify-actions {
  flex-direction: column;
  align-items: stretch;
  margin-bottom: 14px;
}

.verification-checklist,
.tamper-diff {
  margin-top: 16px;
  padding: 14px;
}

.verification-summary {
  display: grid;
  gap: 4px;
  margin-bottom: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px;
}

.verification-summary.ok {
  border-color: rgba(55, 214, 122, 0.36);
  background: rgba(55, 214, 122, 0.08);
}

.verification-summary.fail {
  border-color: rgba(255, 107, 107, 0.38);
  background: rgba(255, 107, 107, 0.08);
}

.verify-row.ok span {
  color: var(--green);
}

.verify-row.fail span,
.verify-row.fail strong {
  color: var(--red);
}

.diff-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.diff-grid div {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px;
  background: rgba(255, 255, 255, 0.03);
}

.diff-grid strong {
  display: block;
  margin-top: 7px;
  overflow-wrap: anywhere;
  color: var(--text);
  font-family: var(--mono);
  font-size: 12px;
}

/* Registry and demo */
.registry-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-top: 18px;
}

.registry-card {
  padding: 14px;
}

.registry-card span,
.registry-card strong,
.registry-card small,
.registry-card a {
  display: block;
}

.registry-card strong {
  margin: 8px 0;
  overflow-wrap: anywhere;
  color: var(--text);
  font-family: var(--mono);
}

.registry-card a {
  margin-top: 10px;
  color: var(--accent);
  font-weight: 800;
}

.architecture-diagram {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  align-items: center;
  margin-top: 18px;
  padding: 16px;
}

.diagram-node {
  min-height: 74px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 10px;
  text-align: center;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.035);
  font-weight: 800;
}

.diagram-node.strong {
  color: var(--text);
  border-color: rgba(55, 214, 122, 0.34);
  background: rgba(55, 214, 122, 0.08);
}

.diagram-arrow {
  color: var(--dim);
  font-family: var(--mono);
  text-align: center;
  text-transform: uppercase;
  font-size: 10px;
}

.presenter-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin: 18px 0;
  padding: 14px;
}

.presenter-panel strong {
  display: block;
  margin-top: 4px;
  color: var(--accent);
}

.demo-script {
  margin: 0;
  padding-left: 22px;
  color: var(--muted);
}

.demo-script li {
  margin-bottom: 12px;
}

/* Archive and JSON */
.archive-table {
  margin-top: 18px;
  overflow: auto;
}

.archive-table table {
  width: 100%;
  border-collapse: collapse;
  min-width: 720px;
}

.archive-table th,
.archive-table td {
  padding: 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: middle;
}

.archive-table th {
  color: var(--dim);
  font-size: 11px;
  text-transform: uppercase;
}

.archive-table td {
  color: var(--muted);
}

.table-decision {
  font-weight: 900;
  text-transform: uppercase;
}

.json-drawer {
  margin-top: 16px;
  overflow: hidden;
}

.json-drawer summary {
  cursor: pointer;
  padding: 12px 14px;
  color: var(--muted);
  font-weight: 800;
}

.json-drawer pre {
  max-height: 520px;
  margin: 0;
  overflow: auto;
  border-top: 1px solid var(--line);
  background: #080a08;
  padding: 14px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 11px;
  line-height: 1.7;
  white-space: pre-wrap;
  word-break: break-word;
}

.toast {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 120;
  max-width: 360px;
  border: 1px solid rgba(55, 214, 122, 0.3);
  border-radius: var(--radius);
  background: #101710;
  box-shadow: var(--shadow);
  color: var(--text);
  padding: 12px 14px;
}

.toast.error {
  border-color: rgba(255, 107, 107, 0.42);
  background: #1a1010;
}

@keyframes entry-rise {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes entry-leave {
  to {
    opacity: 0;
    transform: translateY(-16px);
  }
}

@keyframes receipt-resolve {
  to {
    opacity: 0.36;
    transform: translateY(-50%) rotate(1.6deg);
  }
}

@keyframes grid-resolve {
  from {
    opacity: 0;
    transform: scale(0.98);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes panel-rise {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes row-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes shimmer {
  to {
    transform: translateX(100%);
  }
}

@keyframes spotlight {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-3px);
  }
}

@media (max-width: 1280px) {
  .entry-receipt {
    display: none;
  }

  .entry-content {
    transform: none;
  }

  .console-grid {
    grid-template-columns: 260px minmax(0, 1fr);
  }

  .receipt-rail {
    position: static;
    grid-column: 1 / -1;
    min-height: 0;
    height: auto;
    border-left: 0;
    border-top: 1px solid var(--line);
  }

  .receipt-card {
    display: grid;
    grid-template-columns: 280px minmax(0, 1fr) 210px;
    gap: 14px;
    align-items: start;
  }

  .receipt-facts {
    margin: 0;
  }
}

@media (max-width: 900px) {
  .topbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .topbar-actions {
    width: 100%;
  }

  .console-grid {
    display: flex;
    flex-direction: column;
  }

  .workbench {
    order: 1;
  }

  .receipt-rail {
    order: 2;
  }

  .case-rail {
    order: 3;
  }

  .case-rail,
  .receipt-rail {
    position: static;
    height: auto;
    border: 0;
    border-bottom: 1px solid var(--line);
  }

  .case-rail {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .rail-heading,
  .rail-note,
  .demo-queue {
    grid-column: 1 / -1;
  }

  .workspace-grid,
  .verify-layout,
  .panel-header {
    grid-template-columns: 1fr;
  }

  .identity-strip,
  .proof-stepper,
  .registry-grid,
  .architecture-diagram {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .receipt-card {
    display: block;
  }

  .entry-content h1 {
    font-size: clamp(68px, 15vw, 128px);
  }

  .entry-identities,
  .entry-status-strip {
    position: static;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: min(560px, 100%);
    max-width: none;
    margin: 24px auto 0;
  }

  .entry-pipeline {
    flex-wrap: wrap;
  }
}

@media (max-width: 560px) {
  body {
    font-size: 13px;
  }

  .workbench,
  .case-rail,
  .receipt-rail {
    padding: 12px;
  }

  .case-rail,
  .identity-strip,
  .proof-stepper,
  .registry-grid,
  .architecture-diagram,
  .diff-grid {
    grid-template-columns: 1fr;
  }

  .case-rail {
    display: block;
  }

  .entry-content h1 {
    font-size: clamp(54px, 16vw, 68px);
  }

  .entry-layer {
    height: auto;
    min-height: 100svh;
    padding: 72px 16px 28px;
    overflow-y: auto;
    place-items: start center;
  }

  .entry-grid {
    inset: 72px 18px 24px;
    grid-template-columns: 1fr;
    grid-template-rows: repeat(4, minmax(120px, 1fr));
    opacity: 0.16;
  }

  .entry-grid span {
    display: block;
  }

  .entry-grid span:nth-child(n + 5) {
    display: none;
  }

  .entry-content p {
    font-size: 15px;
  }

  .entry-receipt {
    display: none;
  }

  .entry-identities,
  .entry-status-strip {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
  }

  .entry-actions,
  .presenter-panel,
  .topbar-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .entry-actions .primary-button,
  .entry-actions .secondary-button,
  .topbar-actions > *,
  .presenter-controls > * {
    width: 100%;
  }

  .topbar-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .topbar-actions > * {
    width: auto;
  }

  .entry-identities {
    gap: 10px 18px;
  }

  .entry-identities span {
    justify-content: center;
  }

  .entry-status-strip {
    flex-direction: column;
    gap: 8px;
  }

  .surface-tabs,
  .proof-stepper {
    flex-wrap: wrap;
    overflow: visible;
  }

  .tab {
    flex: 1 1 calc(50% - 6px);
  }

  .proof-step {
    flex: 1 1 calc(50% - 10px);
  }

  .evidence-row,
  .verify-row {
    grid-template-columns: 1fr;
  }

  .receipt-facts div {
    grid-template-columns: 1fr;
    gap: 4px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 1ms !important;
    animation-delay: 0ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 1ms !important;
    scroll-behavior: auto !important;
  }

  .entry-receipt {
    opacity: 0.48;
    transform: none;
  }
}
