/* Prism Desk Surface Theme — Matte Neutral Charcoal/Gray Studio
 * Keeps ALL UI chrome, borders, pills, chat panes, and card shells calm neutral gray,
 * letting the colored geometric visuals inside the 6 right-hand canvases shine cleanly.
 */

body.prism-desk-surface {
  --bg: #171717;
  --bg-card: #202020;
  --bg-inset: #1b1b1b;
  --chrome-bg: #1e1e1e;
  --surface-elevated: #242424;
  --surface-subtle: #1b1b1b;
  --border: rgba(255, 255, 255, 0.085);
  --border-strong: rgba(255, 255, 255, 0.14);
  --white: #ededed;
  --muted: #9a9a9a;
  --dim: #6f6f6f;
  --cyan: #d4d4d4;
  --gold: #cfcfcf;
  --coral: #c8c8c8;
  --violet: #c8c8c8;
  --emerald: #d4d4d4;

  background: #171717 !important;
  background-image: none !important;
  color: #ededed;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter", system-ui, sans-serif;
}

.prism-desk-surface .compare-shell {
  padding: 10px 14px 12px;
  gap: 10px;
}

/* ==================== CALM SINGLE-ROW PRISM DESK TOP BAR ==================== */

.prism-desk-surface .pd-topbar {
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 14px;
  background: #1f1f1f;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  backdrop-filter: none;
}

.pd-bar-left,
.pd-bar-center,
.pd-bar-right {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.pd-brand-mark {
  color: #9e9e9e;
  font-size: 16px;
  line-height: 1;
}

.prism-desk-surface .chrome-title {
  font-size: 13.5px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: #e8e8e8;
  text-transform: none;
  white-space: nowrap;
}

.pd-sep {
  color: #555555;
}

.pd-status-inline {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: #9a9a9a;
  white-space: nowrap;
}

.pd-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #7c7c7c;
  display: inline-block;
}

.pd-dot.is-ready {
  background: #5cb87a;
}

.pd-meta-text {
  font-size: 12px;
  color: #8f8f8f;
  white-space: nowrap;
}

.pd-btn {
  appearance: none;
  background: #2a2a2a;
  border: 1px solid rgba(255, 255, 255, 0.09);
  color: #dcdcdc;
  font: inherit;
  font-size: 12px;
  font-weight: 500;
  padding: 5px 10px;
  border-radius: 7px;
  cursor: pointer;
  white-space: nowrap;
  transition: background 140ms ease, border-color 140ms ease, color 140ms ease;
}

.pd-btn:hover:not(:disabled) {
  background: #343434;
  border-color: rgba(255, 255, 255, 0.16);
  color: #ffffff;
}

.pd-btn:disabled {
  opacity: 0.42;
  cursor: not-allowed;
}

.pd-btn-primary {
  background: #363636;
  border-color: rgba(255, 255, 255, 0.16);
  color: #f3f3f3;
}

.pd-btn-primary:hover:not(:disabled) {
  background: #424242;
}

.upload-label-btn {
  display: inline-flex;
  align-items: center;
}

.pd-chip {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 500;
  color: #b4b4b4;
  background: #292929;
  border: 1px solid rgba(255, 255, 255, 0.075);
  white-space: nowrap;
}

.pd-progress-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: 4px;
}

.pd-progress-label {
  font-size: 12px;
  font-weight: 500;
  color: #b8b8b8;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.prism-desk-surface .pd-progress-track {
  width: 84px;
  height: 5px;
  border-radius: 999px;
  background: #2c2c2c;
  overflow: hidden;
}

.prism-desk-surface .progress-fill {
  background: #8c8c8c;
}

.prism-desk-surface .pd-seg {
  background: #252525;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 7px;
  padding: 2px;
}

.prism-desk-surface .pd-seg .seg-btn {
  background: transparent;
  border: none;
  color: #9a9a9a;
  font-size: 11.5px;
  font-weight: 500;
  padding: 3px 8px;
  border-radius: 5px;
}

.prism-desk-surface .pd-seg .seg-btn.is-active {
  background: #3a3a3a;
  color: #f2f2f2;
  box-shadow: none;
}

/* Quiet notice strip */
.prism-desk-surface .pd-notice {
  background: #222222;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  padding: 6px 12px;
  font-size: 12.5px;
  color: #d4d4d4;
}

/* ==================== MAIN 3-COLUMN STAGE ==================== */

.prism-desk-surface .compare-stage {
  grid-template-columns: minmax(0, 58%) minmax(540px, 42%) !important;
  gap: 12px;
}

.prism-desk-surface .pd-surface {
  background: #1f1f1f;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
}

.prism-desk-surface .pd-col-headers {
  background: #232323;
  border-bottom: 1px solid rgba(255, 255, 255, 0.075);
}

.prism-desk-surface .col-head {
  padding: 9px 16px;
}

.prism-desk-surface .col-head-raw {
  border-right: 1px solid rgba(255, 255, 255, 0.075);
}

.prism-desk-surface .col-title {
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: #e4e4e4;
}

.prism-desk-surface .col-sub {
  font-size: 11.5px;
  color: #888888;
}

.prism-desk-surface .pd-turn-rows {
  padding: 14px 16px;
  gap: 14px;
}

/* Empty landing card — calm Prism Desk studio card */
.prism-desk-surface .empty-stage-card {
  background: #242424;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 26px 28px;
  max-width: 680px;
}

.prism-desk-surface .empty-stage-card h2 {
  font-size: 18px;
  font-weight: 600;
  color: #ececec;
}

.prism-desk-surface .empty-stage-card p {
  font-size: 13.5px;
  line-height: 1.55;
  color: #9e9e9e;
}

.quick-prompts-row {
  display: flex;
  flex-direction: column;
  width: 100%;
  gap: 8px;
  margin-top: 8px;
}

.quick-prompt-chip {
  appearance: none;
  text-align: left;
  border: 1px solid rgba(255, 255, 255, 0.09);
  background: #1d1d1d;
  color: #d6d6d6;
  border-radius: 9px;
  padding: 10px 14px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: background 140ms ease, border-color 140ms ease, color 140ms ease;
}

.quick-prompt-chip:hover {
  background: #2b2b2b;
  border-color: rgba(255, 255, 255, 0.18);
  color: #ffffff;
}

/* Turn cards — pure calm neutral gray */
.prism-desk-surface .turn-row {
  background: #242424;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 11px;
}

.prism-desk-surface .turn-row.is-selected {
  border-color: rgba(255, 255, 255, 0.22);
  box-shadow: none;
}

.prism-desk-surface .turn-prompt-bar {
  display: flex !important;
  background: #282828;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  padding: 10px 14px;
}

.prism-desk-surface .turn-num-label {
  color: #969696;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.03em;
}

.prism-desk-surface .turn-prompt-text {
  color: #efefef;
  font-size: 15px;
  font-weight: 500;
}

.prism-desk-surface .arm-raw {
  border-right: 1px solid rgba(255, 255, 255, 0.07);
}

.prism-desk-surface .arm-reply-body {
  font-size: 14.5px;
  line-height: 1.58;
  color: #e2e2e2;
}

/* Desaturate all chat-side pills & metrics into refined monochrome gray */
.prism-desk-surface .chat-pane .pill,
.prism-desk-surface .metric-chip {
  background: #2c2c2c !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  color: #b8b8b8 !important;
  box-shadow: none !important;
  font-weight: 500;
}

.prism-desk-surface .metric-chip strong {
  color: #e4e4e4;
}

.prism-desk-surface .arm-gate-callout {
  background: #1e1e1e;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-left: 3px solid #9a9a9a;
  color: #d6d6d6;
  border-radius: 8px;
}

.prism-desk-surface .arm-gate-title {
  color: #ededed;
  font-size: 12px;
  font-weight: 600;
}

/* Turn Difference Explainer Banner — calm gray strip */
.prism-desk-surface .pd-diff-banner {
  background: #232323;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: 10px 14px;
  gap: 7px;
}

.prism-desk-surface .diff-cell {
  background: #1c1c1c;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-left: 2px solid #555555;
  border-radius: 8px;
  padding: 6px 10px;
}

.prism-desk-surface .diff-cell-k {
  color: #8a8a8a;
  font-size: 10.5px;
  font-weight: 600;
}

.prism-desk-surface .diff-cell-v {
  color: #dadada;
  font-size: 12px;
}

.prism-desk-surface .diff-banner-takeaway {
  background: #1c1c1c;
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #dcdcdc;
  font-size: 12.5px;
  font-weight: 500;
  padding: 7px 11px;
  border-radius: 8px;
}

/* ==================== PRISM DESK BOTTOM COMPOSER ==================== */

.prism-desk-surface .pd-composer {
  background: #232323;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  border-bottom: none;
  padding: 10px 14px 10px;
  gap: 7px;
}

.prism-desk-surface .pd-signal-bar {
  gap: 14px;
  padding-top: 0;
}

.prism-desk-surface .signal-rail {
  height: 3px;
  background: #2e2e2e;
}

.prism-desk-surface .signal-packet-raw,
.prism-desk-surface .signal-packet-prism {
  background: linear-gradient(90deg, transparent, #a8a8a8, #ffffff);
  box-shadow: 0 0 8px rgba(255, 255, 255, 0.35);
}

.preview-input,
.pd-composer-input {
  width: 100%;
  box-sizing: border-box;
  background: #191919;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 9px;
  color: #efefef;
  font: inherit;
  font-size: 14.5px;
  font-weight: 400;
  padding: 10px 14px;
  outline: none;
}

.preview-input::placeholder,
.pd-composer-input::placeholder {
  color: #6e6e6e;
}

.preview-input:focus,
.pd-composer-input:focus {
  border-color: rgba(255, 255, 255, 0.28);
  box-shadow: none;
}

.pd-send-btn {
  flex: 0 0 auto;
  padding: 0 18px;
  border-radius: 9px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: #363636;
  color: #f2f2f2;
  font: inherit;
  font-size: 13.5px;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition: background 140ms ease, border-color 140ms ease;
}

.pd-send-btn:hover:not(:disabled) {
  background: #444444;
  border-color: rgba(255, 255, 255, 0.24);
}

.pd-send-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.pd-composer-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

/* ==================== FAR RIGHT COLUMN: FIXED-SIZE GRAY CARDS + COLORED VISUAL SHAPES ==================== */

.prism-desk-surface .pd-side-col {
  background: #1f1f1f;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 10px;
  gap: 8px;
}

.pd-side-head {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 2px 4px 6px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.pd-side-head-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.pd-side-title {
  margin: 0;
  font-size: 13px;
  font-weight: 600;
  color: #e4e4e4;
}

.pd-side-sub {
  margin: 0;
  font-size: 11.5px;
  color: #8c8c8c;
  line-height: 1.35;
}

/* 3-Row Unified C-DISS Vessel Dashboard Grid */
.prism-desk-surface .pd-cards-grid {
  flex: 1 1 auto;
  min-height: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-template-rows: minmax(340px, 2.2fr) minmax(156px, 0.98fr) minmax(110px, 0.72fr);
  gap: 8px;
  overflow-y: auto;
  overflow-x: hidden;
}

.prism-desk-surface .pd-card {
  background: #252525;
  border: 1px solid rgba(255, 255, 255, 0.075);
  border-radius: 10px;
  padding: 9px 10px;
  display: flex;
  flex-direction: column;
  gap: 7px;
  min-height: 0;
  min-width: 0;
  overflow: hidden;
}

.prism-desk-surface .pd-card-hero {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(250px, 56%) minmax(185px, 44%);
  gap: 10px;
  padding: 9px 10px;
}

.prism-desk-surface .pd-card-timeline {
  grid-column: 1 / -1;
}

.prism-desk-surface .pd-card .widget-head h2 {
  font-size: 11.5px;
  font-weight: 600;
  color: #e0e0e0;
}

/* Unified 3-in-1 C-DISS Vessel Hero Card — Deep Navy-Slate Grid Well */
.pd-vessel-shell {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 5px;
  padding: 8px 9px 7px;
  min-width: 0;
  min-height: 0;
  border-radius: 12px;
  background-color: #0b1322;
  background-image:
    radial-gradient(circle at 50% 42%, rgba(63, 224, 197, 0.14), transparent 68%),
    linear-gradient(rgba(32, 52, 86, 0.22) 1px, transparent 1px),
    linear-gradient(90deg, rgba(32, 52, 86, 0.22) 1px, transparent 1px);
  background-size: 100% 100%, 24px 24px, 24px 24px;
  border: 1px solid rgba(48, 72, 112, 0.78);
  border-top: 2px solid #3fe0c5;
  box-shadow: inset 0 0 22px rgba(4, 10, 20, 0.55);
  transition: border-top-color 220ms ease, border-color 220ms ease;
}

.pd-vessel-shell[data-vessel-state="fiber"] {
  border-top-color: #b084fc;
}

.pd-vessel-shell[data-vessel-state="gate"] {
  border-top-color: #f4c456;
}

.pd-vessel-shell[data-vessel-state="osc"] {
  border-top-color: #f26464;
  border-color: rgba(242, 100, 100, 0.62);
}

.pd-vessel-head,
.pd-vessel-foot {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

.pd-vessel-title {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.09em;
  color: #3fe0c5;
  white-space: nowrap;
}

.pd-vessel-wall {
  font-size: 10px;
  font-weight: 700;
  color: #f4c456;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pd-vessel-canvas-wrap {
  flex: 1 1 auto;
  min-height: 176px;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.pd-vessel-canvas {
  width: 100%;
  height: 100%;
  display: block;
  cursor: grab;
  touch-action: none;
}

.pd-vessel-canvas:active {
  cursor: grabbing;
}

.pd-vessel-eq-strip {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  align-items: center;
  gap: 2px;
  padding: 3px;
  border-radius: 7px;
  background: rgba(9, 15, 28, 0.94);
  border: 1px solid rgba(48, 72, 112, 0.72);
}

.vessel-term-btn {
  appearance: none;
  padding: 4px 4px;
  border-radius: 5px;
  border: 1px solid transparent;
  background: transparent;
  color: #8ea3c4;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 10.5px;
  font-weight: 700;
  text-align: center;
  white-space: nowrap;
  cursor: pointer;
  transition: color 120ms ease, background 120ms ease, border-color 120ms ease;
}

.vessel-term-btn:hover {
  color: #f2f6fc;
}

.vessel-term-btn[data-active="true"] {
  background: rgba(63, 224, 197, 0.16);
  border-color: rgba(63, 224, 197, 0.56);
  color: #3fe0c5;
}

.pd-vessel-foot {
  font-size: 9.5px;
  color: #8ea3c4;
  border-top: 1px solid rgba(48, 72, 112, 0.45);
  padding-top: 4px;
}

.pd-vessel-drag {
  color: rgba(63, 224, 197, 0.85);
  letter-spacing: 0.03em;
  white-space: nowrap;
}

/* Right half of Hero Card: stacked Mood/Goal & 7 Safety Gauges */
.pd-vessel-gauges {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 5px;
  min-width: 0;
  min-height: 0;
  overflow-y: auto;
  padding-right: 2px;
}

.pd-gauge-group {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.pd-gauge-group + .pd-gauge-group {
  padding-top: 4px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.pd-metrics-col {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 2px;
  min-width: 0;
  overflow: hidden;
}

.prism-desk-surface .pd-vessel-gauges .bar-row {
  gap: 1px;
}

.prism-desk-surface .pd-vessel-gauges .bar-head {
  font-size: 10px;
}

.prism-desk-surface .pd-vessel-gauges .bar-track {
  height: 4px;
}

.prism-desk-surface .pd-vessel-gauges .guard-box {
  font-size: 9.5px;
  line-height: 1.25;
  padding: 3px 6px;
}

/* Full Canvas wells (Row 2 Radars, Row 3 Timeline) */
.pd-full-canvas-well {
  flex: 1 1 auto;
  min-height: 0;
  width: 100%;
  background: #1a1a1a;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 4px;
}

.pd-canvas-fill {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

/* Card 5 (Safety Brake): compact top well + crisp gray status list */
.pd-osc-canvas-well {
  flex: 0 0 76px;
  width: 100%;
  background: #1a1a1a;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 8px;
  overflow: hidden;
  padding: 2px;
}

.pd-canvas-osc {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.pd-gates-box {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 5px;
  overflow-y: auto;
}

/* Keep right-hand card chrome neutral gray while preserving colored gauge fills & canvas shapes! */
.prism-desk-surface .bar-label {
  color: #c2c2c2;
  font-size: 10.5px;
}

.prism-desk-surface .bar-val {
  font-size: 10.5px;
}

.prism-desk-surface .bar-track {
  background: #1a1a1a;
  border: 1px solid rgba(255, 255, 255, 0.05);
  height: 5px;
}

.prism-desk-surface .guard-box {
  background: #1c1c1c;
  border: 1px solid rgba(255, 255, 255, 0.07);
  color: #a8a8a8;
  font-size: 10px;
  line-height: 1.3;
  padding: 4px 7px;
  border-radius: 6px;
}

.prism-desk-surface .pd-gates-box .pill {
  background: #1c1c1c;
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #c4c4c4;
  font-size: 10px;
  padding: 2px 6px;
}

.prism-desk-surface .gate-item {
  background: #1c1c1c;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 7px;
  padding: 4px 7px;
}

.prism-desk-surface .gate-id {
  color: #dcdcdc;
  font-size: 10.5px;
}

.prism-desk-surface .gate-rationale {
  color: #8c8c8c;
  font-size: 10px;
}

.prism-desk-surface .eq-pill {
  background: #1a1a1a;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.prism-desk-surface .eq-term {
  color: #cccccc;
}

.prism-desk-surface .eq-term.is-active {
  background: #333333;
  color: #ffffff;
}

/* Modal */
.prism-desk-surface .pd-modal {
  background: #222222;
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.72);
}

.preview-settings-modal {
  width: min(540px, 94vw);
}

.settings-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.settings-field {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.settings-label {
  font-size: 12px;
  font-weight: 500;
  color: #d4d4d4;
}

@media (max-width: 1380px) {
  .prism-desk-surface .pd-topbar {
    gap: 8px;
    padding: 7px 10px;
  }
  .pd-bar-left,
  .pd-bar-center,
  .pd-bar-right {
    gap: 5px;
  }
  .pd-btn {
    padding: 4px 8px;
    font-size: 11.5px;
  }
  .prism-desk-surface .pd-progress-track {
    width: 48px;
  }
  .pd-progress-label,
  .pd-meta-text,
  .pd-status-inline {
    font-size: 11px;
  }
}

@media (max-width: 1280px) {
  .prism-desk-surface .compare-stage {
    grid-template-columns: minmax(0, 52%) minmax(460px, 48%) !important;
  }
  .prism-desk-surface .pd-cards-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-rows: minmax(280px, 1.85fr) minmax(155px, 1.05fr) minmax(115px, 0.8fr);
  }
  .prism-desk-surface .pd-card-hero {
    grid-template-columns: minmax(220px, 55%) minmax(165px, 45%);
  }
}

@media (max-width: 960px) {
  .prism-desk-surface .pd-cards-grid {
    grid-template-columns: 1fr;
    grid-template-rows: auto;
  }
  .prism-desk-surface .pd-card-hero {
    grid-template-columns: 1fr;
  }
}

/* ==================== STACKED 3D DODECAHEDRON + C-DISS VESSEL & RESEARCH LAB ==================== */

.prism-desk-surface .pd-topbar {
  flex-wrap: wrap;
  row-gap: 6px;
}

.is-hidden {
  display: none !important;
}

/* Right Column: 50% Dodecahedron + 50% C-DISS Vessel Stack */
.prism-desk-surface .pd-dual-stack {
  display: grid;
  grid-template-rows: minmax(200px, 1fr) minmax(200px, 1fr);
  gap: 8px;
  min-height: 0;
}

.prism-desk-surface .pd-dodeca-card,
.prism-desk-surface .pd-vessel-card {
  display: flex;
  flex-direction: column;
  min-height: 0;
  gap: 5px;
}

.pd-dodeca-toggles {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 11px;
  color: #9ca3af;
}

.pd-dodeca-toggles label {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  cursor: pointer;
}

.pd-dodeca-canvas-wrap {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
  border-radius: 10px;
  background: radial-gradient(circle at 50% 45%, #191d26 0%, #101218 100%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

#dodeca-canvas {
  width: 100%;
  height: 100%;
  display: block;
}

.pd-dodeca-legend {
  position: absolute;
  left: 7px;
  bottom: 6px;
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  padding: 2px 7px;
  border-radius: 5px;
  background: rgba(16, 18, 23, 0.86);
  border: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 10px;
  color: #cbd5e1;
  pointer-events: none;
}

.pd-leg-item {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.leg-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  display: inline-block;
}
.leg-orient { background: #38bdf8; }
.leg-const { background: #f59e0b; }
.leg-auth { background: #fb7185; }
.leg-over { background: #34d399; }
.leg-gold { background: #facc15; }

.pd-vessel-card .pd-vessel-shell {
  flex: 1 1 auto;
  min-height: 0;
}

.pd-vessel-card .pd-vessel-canvas-wrap {
  flex: 1 1 auto;
  min-height: 0;
}

/* 50-Q Group Jump Bar & Compact Bottom Governance Log */
.pd-group-bar,
.pd-gov-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 12px;
  background: #1b1b1b;
  border-top: 1px solid rgba(255, 255, 255, 0.075);
  flex-shrink: 0;
}

.pd-gov-label {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: #8f8f8f;
  flex-shrink: 0;
}

.pd-group-chips,
.pd-gov-chips {
  display: flex;
  align-items: center;
  gap: 5px;
  overflow-x: auto;
  white-space: nowrap;
  flex: 1 1 auto;
  min-width: 0;
}

.pd-group-chip {
  appearance: none;
  background: #242424;
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #b4b4b4;
  border-radius: 5px;
  padding: 2px 7px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 10px;
  cursor: pointer;
  flex-shrink: 0;
}

.pd-group-chip:hover {
  background: #2e2e2e;
  color: #ffffff;
}

.pd-group-chip.is-active {
  background: #333b4d;
  border-color: rgba(125, 211, 252, 0.55);
  color: #e0f2fe;
}

.gov-chip {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 10px;
  padding: 2px 7px;
  border-radius: 4px;
  background: rgba(52, 211, 153, 0.12);
  border: 1px solid rgba(52, 211, 153, 0.36);
  color: #6ee7b7;
  flex-shrink: 0;
}

.gov-chip.is-warn {
  background: rgba(244, 63, 94, 0.14);
  border-color: rgba(244, 63, 94, 0.42);
  color: #fda4af;
}

.gov-empty-hint {
  font-size: 11px;
  color: #7c7c7c;
}

/* Inline Full Governed Actions on Prism Cards */
.arm-sov-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 4px;
}

.pd-ratify-btn {
  background: rgba(52, 211, 153, 0.14);
  border-color: rgba(52, 211, 153, 0.4);
  color: #6ee7b7;
  font-size: 11px;
  padding: 4px 8px;
}
.pd-ratify-btn:hover:not(:disabled) {
  background: rgba(52, 211, 153, 0.24);
}

.pd-revoke-btn {
  background: rgba(244, 63, 94, 0.14);
  border-color: rgba(244, 63, 94, 0.4);
  color: #fda4af;
  font-size: 11px;
  padding: 4px 8px;
}
.pd-revoke-btn:hover:not(:disabled) {
  background: rgba(244, 63, 94, 0.24);
}

/* Secondary Research & Genesis Lab View */
.pd-research-stage {
  display: grid;
  grid-template-columns: minmax(310px, 1.05fr) minmax(330px, 1.05fr) minmax(380px, 1.25fr);
  gap: 10px;
  flex: 1 1 auto;
  min-height: 0;
}

@media (max-width: 1160px) {
  .pd-research-stage {
    grid-template-columns: 1fr;
  }
}

.pd-research-col {
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
  background: #1f1f1f;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
}

.pd-research-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 6px 8px;
  padding: 9px 12px;
  background: #242424;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  flex-shrink: 0;
}

.pd-research-head .widget-head-pills {
  flex-wrap: wrap;
}

.pd-research-head h2 {
  margin: 0;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #e4e4e4;
}

.pd-research-scroll {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.sod-section {
  background: #252525;
  border: 1px solid rgba(255, 255, 255, 0.075);
  border-radius: 8px;
  padding: 8px 10px;
}

.sod-section summary {
  cursor: pointer;
  font-weight: 600;
  font-size: 12px;
  color: #f3f4f6;
}

.zone-grounding-caption {
  font-size: 11.5px;
  font-weight: 600;
  color: #fde047;
  margin: 6px 0;
}

.edges-stack {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.edge-card {
  background: #1a1a1a;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 6px;
  padding: 6px 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.edge-ratified { border-left: 3px solid #facc15; }
.edge-draft { border-left: 3px solid #38bdf8; }
.edge-missing { border-left: 3px solid #6b7280; }

.edge-card-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 6px;
}

.edge-title {
  font-size: 11.5px;
  font-weight: 600;
  color: #f3f4f6;
}

.edge-controls {
  display: flex;
  align-items: center;
  gap: 5px;
}

.edge-status-pill {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 9.5px;
  color: #9ca3af;
}

.edge-question {
  font-size: 10.5px;
  color: #9ca3af;
}

.edge-text-input {
  width: 100%;
  background: #141414;
  color: #e5e7eb;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 5px;
  padding: 4px 7px;
  font-size: 11px;
}

.mini-btn {
  background: #2c2c2c;
  color: #e5e7eb;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  padding: 2px 7px;
  font-size: 10.5px;
  cursor: pointer;
}
.mini-btn:hover { background: #383838; }

.sod-form {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 8px;
}
.sod-form label {
  display: flex;
  flex-direction: column;
  gap: 3px;
  font-size: 11px;
  color: #9ca3af;
}

.missing-list {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 6px;
}
.missing-chip {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 4px;
  background: #1a1a1a;
  border: 1px solid rgba(255, 255, 255, 0.09);
  color: #fca5a5;
}
.muted-note {
  font-size: 11px;
  color: #9ca3af;
}

.zone-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 5px;
}

.zone-pill {
  background: #252525;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 6px;
  padding: 5px 7px;
  text-align: left;
  color: #e5e7eb;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.zone-pill:hover { background: #2d2d2d; }
.zone-pill.is-selected {
  border-color: #facc15;
  background: #2d323e;
}
.zone-pill.is-revoked { border-color: #f43f5e; }

.zone-pill-top {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 10.5px;
}
.zone-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #9ca3af;
}
.triad-orientation .zone-dot { background: #38bdf8; }
.triad-constraint .zone-dot { background: #f59e0b; }
.triad-authority .zone-dot { background: #fb7185; }
.triad-oversight .zone-dot { background: #34d399; }

.zone-pill-name {
  font-size: 10.5px;
  color: #9ca3af;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pd-eq-box {
  padding: 6px 8px;
  background: #252525;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 7px;
}

.ledger-feed {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin-top: 6px;
}

.ledger-row {
  background: #1a1a1a;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 5px;
  padding: 5px 7px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 10.5px;
}
.ledger-seq {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  color: #94a3b8;
  font-size: 10px;
}
.ledger-kind { font-weight: 600; color: #e2e8f0; }
.ledger-summary { color: #cbd5e1; }
.ledger-hash {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  color: #64748b;
  font-size: 9.5px;
  word-break: break-all;
}

.pd-telemetry-stack .pd-card {
  flex-shrink: 0;
}
