/* ============================================================
   dregg playground — unified interactive experience
   Dark theme, no frameworks, responsive, single-page.
   ============================================================ */
@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;500;600&family=Inter:wght@400;500;600&display=swap');

:root {
  --bg:          #080c0a;
  --surface:     #0a1610;
  --surface-2:   #0f1f17;
  --surface-3:   #152420;
  --surface-4:   #1a2d25;
  --border:      rgba(232, 224, 208, 0.08);
  --border-2:    rgba(232, 224, 208, 0.14);
  --border-3:    rgba(232, 224, 208, 0.22);
  --text:        #e8e0d0;
  --text-dim:    #a89e8e;
  --text-muted:  #6a6358;
  --text-faint:  #4a453e;
  --accent:      #5b8a5a;
  --accent-bright: #9bb87a;
  --accent-soft: rgba(91, 138, 90, 0.12);
  --lantern:     #d99a3f;
  --lantern-soft: rgba(217, 154, 63, 0.12);
  --danger:      #d4685c;
  --danger-soft: rgba(212, 104, 92, 0.10);
  --info:        #6ba3c7;
  --info-soft:   rgba(107, 163, 199, 0.10);
  --success:     #5b8a5a;
  --mono: 'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, monospace;
  --sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --display: 'Iowan Old Style', 'Palatino Linotype', Palatino, Georgia, serif;
  --radius: 6px;
  --radius-lg: 10px;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; overflow: hidden; }
body {
  font-family: var(--sans);
  background: var(--bg);
  color: var(--text);
  font-size: 13px;
  line-height: 1.5;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent-bright); text-decoration: none; }
a:hover { color: var(--lantern); }
button { font-family: inherit; cursor: pointer; }

/* ============================================================
   HEADER
   ============================================================ */
.pg-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 20px;
  background: var(--surface);
  border-bottom: 1px solid var(--border-2);
  flex-shrink: 0;
  z-index: 10;
}
.pg-header__left {
  display: flex;
  align-items: center;
  gap: 10px;
}
.pg-header__logo {
  width: 26px; height: 26px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--bg);
  display: grid; place-items: center;
  font-family: var(--mono);
  font-size: 10px; font-weight: 600;
}
.pg-header__title {
  font-family: var(--mono);
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}
.pg-header__title .accent { color: var(--accent-bright); }
.pg-header__right {
  display: flex;
  align-items: center;
  gap: 16px;
}
.pg-header__link {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-dim);
  padding: 4px 8px;
  border-radius: 4px;
  transition: all 0.15s;
}
.pg-header__link:hover {
  color: var(--text);
  background: rgba(255,255,255,0.05);
}
.pg-header__status {
  font-family: var(--mono);
  font-size: 10px;
  padding: 3px 10px;
  border-radius: 10px;
  background: rgba(255,255,255,0.04);
  color: var(--text-muted);
  transition: all 0.3s;
}
.pg-header__status.ready { color: var(--success); background: var(--accent-soft); }
.pg-header__status.error { color: var(--danger); background: var(--danger-soft); }

/* ============================================================
   LAYOUT
   ============================================================ */
.pg-layout {
  flex: 1;
  display: grid;
  grid-template-columns: 200px 1fr 240px;
  overflow: hidden;
}

/* ============================================================
   LEFT NAVIGATION
   ============================================================ */
.pg-nav {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border-right: 1px solid var(--border);
  overflow-y: auto;
  padding: 12px 0;
}
.pg-scenarios {
  padding: 0 10px 12px;
  margin-bottom: 4px;
  border-bottom: 1px solid var(--border);
}
.pg-scenarios__eyebrow {
  margin: 0 2px 8px;
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.pg-scenarios__tabs {
  display: grid;
  grid-template-columns: 1fr;
  gap: 4px;
}
.pg-scenarios__tab {
  width: 100%;
  padding: 7px 9px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  background: rgba(255,255,255,0.03);
  color: var(--text-dim);
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 600;
  text-align: left;
  transition: all 0.15s;
}
.pg-scenarios__tab:hover {
  color: var(--text);
  background: rgba(255,255,255,0.06);
}
.pg-scenarios__tab.active {
  border-color: var(--border-2);
  background: var(--surface-3);
  color: var(--lantern);
}
.pg-scenarios__summary {
  margin-top: 10px;
  padding: 9px 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(255,255,255,0.025);
}
.pg-scenarios__summary p {
  color: var(--text-muted);
  font-size: 11px;
  line-height: 1.45;
}
.pg-scenarios__summary a {
  display: inline-block;
  margin-top: 7px;
  font-family: var(--mono);
  font-size: 10px;
}
.pg-nav__section {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 0 8px;
  flex: 1;
}
.pg-nav__item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border: none;
  background: transparent;
  color: var(--text-dim);
  font-size: 12px;
  font-weight: 500;
  border-radius: var(--radius);
  transition: all 0.15s;
  text-align: left;
  position: relative;
}
.pg-nav__item[hidden] {
  display: none;
}
.pg-nav__item:hover {
  color: var(--text);
  background: rgba(255,255,255,0.04);
}
.pg-nav__item.active {
  color: var(--accent-bright);
  background: var(--accent-soft);
}
.pg-nav__item.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 6px;
  bottom: 6px;
  width: 3px;
  border-radius: 2px;
  background: var(--accent);
}
.pg-nav__icon {
  font-size: 11px;
  width: 16px;
  text-align: center;
  flex-shrink: 0;
}
.pg-nav__label { flex: 1; }
.pg-nav__badge {
  font-family: var(--mono);
  font-size: 9px;
  min-width: 16px;
  height: 16px;
  display: none;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: var(--accent-soft);
  color: var(--accent-bright);
  padding: 0 4px;
}
.pg-nav__badge.visible {
  display: flex;
}
.pg-nav__footer {
  padding: 12px 16px;
  border-top: 1px solid var(--border);
}
.pg-nav__hint {
  font-size: 10px;
  color: var(--text-muted);
  line-height: 1.4;
}

/* ============================================================
   MAIN CONTENT
   ============================================================ */
.pg-main {
  overflow-y: auto;
  padding: 0;
  background: var(--bg);
}
.pg-section {
  display: none;
  padding: 32px 40px;
  min-height: 100%;
  animation: fadeIn 0.2s ease;
}
.pg-section.active {
  display: block;
}
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Section common styles */
.section-header {
  margin-bottom: 28px;
}
.section-header h2 {
  font-family: var(--display);
  font-size: 1.6rem;
  font-weight: 400;
  color: var(--text);
  margin-bottom: 8px;
  letter-spacing: -0.01em;
}
.section-header p {
  font-size: 14px;
  color: var(--text-dim);
  max-width: 60ch;
  line-height: 1.6;
}
.section-header .next-hint {
  display: inline-block;
  margin-top: 12px;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-muted);
  padding: 4px 10px;
  background: var(--accent-soft);
  border-radius: 4px;
}
.section-header .next-hint:hover {
  color: var(--accent-bright);
  cursor: pointer;
}

/* Controls area */
.controls-row {
  display: flex;
  gap: 12px;
  align-items: flex-end;
  flex-wrap: wrap;
  margin-bottom: 20px;
}
.control-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.control-group label {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.control-group input,
.control-group select,
.control-group textarea {
  font-family: var(--mono);
  font-size: 12px;
  padding: 7px 10px;
  background: var(--surface-2);
  border: 1px solid var(--border-2);
  border-radius: var(--radius);
  color: var(--text);
  outline: none;
  transition: border-color 0.15s;
}
.control-group input:focus,
.control-group select:focus,
.control-group textarea:focus {
  border-color: var(--accent);
}
.control-group input::placeholder,
.control-group textarea::placeholder {
  color: var(--text-muted);
}
.control-group textarea {
  resize: vertical;
  min-height: 80px;
  line-height: 1.5;
}

/* Buttons */
.btn {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
  padding: 8px 16px;
  border: none;
  border-radius: var(--radius);
  transition: all 0.15s;
  white-space: nowrap;
}
.btn-primary {
  background: var(--accent);
  color: var(--bg);
}
.btn-primary:hover:not(:disabled) {
  background: var(--accent-bright);
}
.btn-primary:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}
.btn-secondary {
  background: rgba(255,255,255,0.06);
  color: var(--text-dim);
  border: 1px solid var(--border-2);
}
.btn-secondary:hover {
  color: var(--text);
  background: rgba(255,255,255,0.1);
  border-color: var(--border-3);
}
.btn-danger {
  background: var(--danger-soft);
  color: var(--danger);
  border: 1px solid rgba(212, 104, 92, 0.25);
}
.btn-danger:hover {
  background: rgba(212, 104, 92, 0.2);
}
.btn-sm {
  font-size: 10px;
  padding: 5px 10px;
}

/* Result panels */
.result-panel {
  margin-top: 20px;
  border: 1px solid var(--border-2);
  border-radius: var(--radius-lg);
  background: var(--surface);
  overflow: hidden;
}
.result-panel__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  background: var(--surface-2);
  border-bottom: 1px solid var(--border);
}
.result-panel__title {
  font-family: var(--mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
}
.result-panel__timing {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--lantern);
}
.result-panel__body {
  padding: 16px;
  font-family: var(--mono);
  font-size: 12px;
  line-height: 1.7;
  max-height: 400px;
  overflow-y: auto;
}

/* "What just happened" explainer */
.explainer {
  margin-top: 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.explainer__title {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  background: var(--surface-2);
  border-bottom: 1px solid var(--border);
  font-family: var(--mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--lantern);
}
.explainer__grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 1px;
  background: var(--border);
}
.explainer__cell {
  padding: 12px 16px;
  background: var(--surface);
}
.explainer__cell-label {
  font-family: var(--mono);
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin-bottom: 6px;
}
.explainer__cell--prover .explainer__cell-label { color: var(--info); }
.explainer__cell--verifier .explainer__cell-label { color: var(--accent-bright); }
.explainer__cell--delta .explainer__cell-label { color: var(--lantern); }
.explainer__cell-content {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-dim);
  line-height: 1.6;
  word-break: break-all;
}
.explainer__timing {
  padding: 8px 16px;
  background: var(--surface);
  border-top: 1px solid var(--border);
  font-family: var(--mono);
  font-size: 10px;
  color: var(--text-muted);
  display: flex;
  gap: 20px;
}
.explainer__timing span { color: var(--lantern); }

/* Output entries */
.output-entry {
  padding: 8px 12px;
  border-radius: var(--radius);
  margin-bottom: 4px;
  font-family: var(--mono);
  font-size: 11px;
  line-height: 1.5;
}
.output-entry.success { background: var(--accent-soft); color: var(--accent-bright); }
.output-entry.error { background: var(--danger-soft); color: var(--danger); }
.output-entry.info { background: var(--info-soft); color: var(--info); }
.output-entry.warning { background: var(--lantern-soft); color: var(--lantern); }

/* ============================================================
   RIGHT SIDEBAR: STATE
   ============================================================ */
.pg-state {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border-left: 1px solid var(--border);
  overflow-y: auto;
  font-size: 12px;
}
.pg-state__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border-2);
}
.pg-state__title {
  font-family: var(--mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  font-weight: 600;
}
.pg-state__reset {
  font-family: var(--mono);
  font-size: 9px;
  padding: 3px 8px;
  border-radius: 3px;
  border: 1px solid var(--border-2);
  background: transparent;
  color: var(--text-muted);
  transition: all 0.15s;
}
.pg-state__reset:hover {
  color: var(--danger);
  border-color: var(--danger);
  background: var(--danger-soft);
}
.pg-state__section {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
}
.pg-state__label {
  font-family: var(--mono);
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin-bottom: 4px;
}
.pg-state__value {
  font-family: var(--mono);
  font-size: 18px;
  font-weight: 600;
  color: var(--accent-bright);
}
.pg-state__mono {
  font-size: 10px;
  font-weight: 400;
  word-break: break-all;
  color: var(--text-dim);
}
.pg-state__detail {
  margin-top: 6px;
}
.pg-state__fed-row {
  display: flex;
  justify-content: space-between;
  padding: 3px 0;
  font-family: var(--mono);
  font-size: 10px;
  color: var(--text-dim);
}
.pg-state__fed-row span:last-child {
  color: var(--accent-bright);
}
.pg-state__list-item {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--text-dim);
  padding: 2px 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ============================================================
   OVERVIEW SECTION SPECIFICS
   ============================================================ */
.overview-arch {
  margin: 24px 0;
  background: var(--surface);
  border: 1px solid var(--border-2);
  border-radius: var(--radius-lg);
  padding: 24px;
  overflow-x: auto;
}
.overview-arch pre {
  font-family: var(--mono);
  font-size: 11px;
  line-height: 1.5;
  color: var(--text-dim);
  margin: 0;
}
.overview-capabilities {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
  margin-top: 20px;
}
.overview-cap {
  padding: 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: border-color 0.15s;
}
.overview-cap:hover {
  border-color: var(--border-2);
}
.overview-cap__title {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 600;
  color: var(--accent-bright);
  margin-bottom: 4px;
}
.overview-cap__desc {
  font-size: 11px;
  color: var(--text-muted);
  line-height: 1.4;
}

/* ============================================================
   SANDBOX SECTION
   ============================================================ */
.sandbox-editor {
  width: 100%;
  min-height: 300px;
  resize: vertical;
  font-family: var(--mono);
  font-size: 12px;
  line-height: 1.7;
  padding: 16px;
  background: var(--surface);
  border: 1px solid var(--border-2);
  border-radius: var(--radius-lg);
  color: var(--text);
  outline: none;
  tab-size: 2;
}
.sandbox-editor:focus {
  border-color: var(--accent);
}
.sandbox-editor::placeholder {
  color: var(--text-muted);
}
.sandbox-output {
  margin-top: 12px;
  max-height: 300px;
  overflow-y: auto;
  padding: 12px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  font-family: var(--mono);
  font-size: 11px;
}
.sandbox-api-ref {
  margin-top: 20px;
  padding: 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}
.sandbox-api-ref__title {
  font-family: var(--mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin-bottom: 8px;
}
.sandbox-api-ref__list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 4px;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-dim);
}
.sandbox-api-ref__list span {
  color: var(--accent-bright);
}

/* ============================================================
   CROSS-FED ANIMATION
   ============================================================ */
.crossfed-diagram {
  margin: 24px 0;
  padding: 32px;
  background: var(--surface);
  border: 1px solid var(--border-2);
  border-radius: var(--radius-lg);
  text-align: center;
  position: relative;
  overflow: hidden;
}
.crossfed-nodes {
  display: flex;
  justify-content: space-around;
  align-items: center;
  gap: 20px;
  margin-bottom: 20px;
}
.crossfed-node {
  padding: 16px 24px;
  background: var(--surface-2);
  border: 1px solid var(--border-2);
  border-radius: var(--radius-lg);
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-dim);
  text-align: center;
  transition: all 0.3s;
}
.crossfed-node.active {
  border-color: var(--accent);
  color: var(--accent-bright);
  box-shadow: 0 0 20px var(--accent-soft);
}
.crossfed-arrow {
  font-size: 20px;
  color: var(--text-muted);
  transition: color 0.3s;
}
.crossfed-arrow.active {
  color: var(--lantern);
}
.crossfed-status {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 12px;
}

/* ============================================================
   CAPABILITIES SECTION
   ============================================================ */
.cap-chain {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 16px 0;
}
.cap-chain__item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-family: var(--mono);
  font-size: 11px;
  transition: all 0.2s;
}
.cap-chain__item.revoked {
  opacity: 0.5;
  border-color: var(--danger);
  text-decoration: line-through;
}
.cap-chain__item .cap-level {
  font-size: 9px;
  padding: 2px 6px;
  border-radius: 3px;
  background: var(--accent-soft);
  color: var(--accent-bright);
  font-weight: 600;
}
.cap-chain__item .cap-perms {
  color: var(--text-dim);
  flex: 1;
}
.cap-chain__item .cap-expiry {
  font-size: 10px;
  color: var(--text-muted);
}

/* ============================================================
   NOTES TIMELINE
   ============================================================ */
.note-timeline-item {
  display: flex;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}
.note-timeline-item:last-child { border-bottom: none; }
.note-tl-type {
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 2px 8px;
  border-radius: 3px;
  align-self: flex-start;
  flex-shrink: 0;
}
.note-tl-type.mint { background: var(--accent-soft); color: var(--accent-bright); }
.note-tl-type.transfer { background: var(--info-soft); color: var(--info); }
.note-tl-type.rejected { background: var(--danger-soft); color: var(--danger); }
.note-tl-body {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-dim);
  line-height: 1.6;
}
.note-tl-hash {
  color: var(--text-muted);
  font-size: 10px;
}

/* ============================================================
   MERKLE TREE SVG
   ============================================================ */
.merkle-viz {
  margin: 20px 0;
  padding: 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow-x: auto;
}
.merkle-viz svg {
  display: block;
  margin: 0 auto;
}
.merkle-viz .node circle {
  fill: var(--surface-3);
  stroke: var(--border-3);
  stroke-width: 1.5;
}
.merkle-viz .node text {
  font-family: var(--mono);
  font-size: 9px;
  fill: var(--text-dim);
}
.merkle-viz .node.highlighted circle {
  fill: var(--accent-soft);
  stroke: var(--accent);
  stroke-width: 2;
}
.merkle-viz .node.highlighted text {
  fill: var(--accent-bright);
}
.merkle-viz .link {
  stroke: var(--border-2);
  stroke-width: 1;
}
.merkle-viz .link.highlighted {
  stroke: var(--accent);
  stroke-width: 2;
}

/* ============================================================
   GALLERY TABS
   ============================================================ */
.gallery-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 8px;
}
.gallery-tab {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
  padding: 8px 16px;
  border: none;
  background: transparent;
  color: var(--text-dim);
  border-radius: var(--radius) var(--radius) 0 0;
  transition: all 0.15s;
  cursor: pointer;
}
.gallery-tab:hover {
  color: var(--text);
  background: rgba(255,255,255,0.04);
}
.gallery-tab.active {
  color: var(--accent-bright);
  background: var(--accent-soft);
  border-bottom: 2px solid var(--accent);
}
.gallery-panel {
  display: none;
}
.gallery-panel.active {
  display: block;
}

/* ============================================================
   SOVEREIGN CELL DISPLAY
   ============================================================ */
.sov-cell-display {
  margin-top: 16px;
}

/* ============================================================
   MARKETPLACE PARTICIPANTS (extended)
   ============================================================ */
.mkt-participants {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 20px;
}
.mkt-participant {
  padding: 12px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-align: center;
  min-width: 90px;
  transition: all 0.3s;
}
.mkt-participant.active {
  border-color: var(--accent);
  box-shadow: 0 0 12px var(--accent-soft);
}
.mkt-participant.winner {
  border-color: var(--lantern);
  box-shadow: 0 0 12px var(--lantern-soft);
}
.mkt-participant.dispute {
  border-color: var(--danger);
  box-shadow: 0 0 12px var(--danger-soft);
}
.mkt-participant__icon {
  font-family: var(--mono);
  font-size: 14px;
  font-weight: 600;
  color: var(--accent-bright);
  margin-bottom: 4px;
}
.mkt-participant__name {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--text-dim);
  margin-bottom: 2px;
}
.mkt-participant__detail {
  font-family: var(--mono);
  font-size: 9px;
  color: var(--text-muted);
}

/* Marketplace state panel */
.mkt-state-panel {
  margin-bottom: 20px;
  padding: 12px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.mkt-state-panel__row {
  display: flex;
  justify-content: space-between;
  padding: 4px 0;
  font-family: var(--mono);
  font-size: 11px;
}
.mkt-state-panel__label {
  color: var(--text-dim);
}
.mkt-state-panel__value {
  color: var(--accent-bright);
  font-weight: 500;
}

/* ============================================================
   FEDERATION SIMULATOR
   ============================================================ */
.fed-sim-container {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 20px;
}
.fed-sim-group {
  padding: 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}
.fed-sim-group.hidden {
  display: none;
}
.fed-sim-group__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}
.fed-sim-group__title {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 600;
  color: var(--accent-bright);
}
.fed-sim-group__height {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--text-muted);
}
.fed-sim-nodes {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 8px;
}
.fed-node-circle {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: var(--surface-2);
  border: 2px solid var(--border-2);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transition: all 0.3s;
}
.fed-node-circle.leader {
  border-color: var(--accent);
}
.fed-node-circle.offline {
  opacity: 0.4;
  border-style: dashed;
}
.fed-node-circle.finalized {
  border-color: var(--lantern);
  box-shadow: 0 0 12px var(--lantern-soft);
}
.fed-node-circle__role {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 600;
  color: var(--accent-bright);
}
.fed-node-circle__name {
  font-family: var(--mono);
  font-size: 8px;
  color: var(--text-dim);
}
.fed-node-circle__status {
  font-family: var(--mono);
  font-size: 7px;
  color: var(--text-muted);
}
.fed-sim-consensus {
  min-height: 20px;
}
.fed-consensus-msg {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--lantern);
  padding: 4px 8px;
  background: var(--lantern-soft);
  border-radius: 3px;
  display: inline-block;
}
.fed-sim-state {
  margin-top: 16px;
  padding: 12px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.fed-sim-state__title {
  font-family: var(--mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin-bottom: 8px;
}
.fed-sim-state__empty {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-muted);
}
.fed-state-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 4px 0;
  font-family: var(--mono);
  font-size: 10px;
}
.fed-state-row__name {
  color: var(--text);
  font-weight: 500;
  min-width: 60px;
}
.fed-state-row__role {
  padding: 1px 6px;
  border-radius: 3px;
  font-size: 9px;
  font-weight: 600;
}
.fed-state-row__role.leader {
  background: var(--accent-soft);
  color: var(--accent-bright);
}
.fed-state-row__role.follower {
  background: var(--info-soft);
  color: var(--info);
}
.fed-state-row__detail {
  color: var(--text-dim);
}
.fed-state-row__status {
  margin-left: auto;
}
.fed-state-row__status.online {
  color: var(--success);
}
.fed-state-row__status.offline {
  color: var(--danger);
}

/* ============================================================
   SCROLLBAR
   ============================================================ */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.08); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.14); }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1100px) {
  .pg-layout {
    grid-template-columns: 180px 1fr 200px;
  }
}
@media (max-width: 900px) {
  .pg-layout {
    grid-template-columns: 1fr;
    grid-template-rows: auto 1fr auto;
  }
  .pg-nav {
    flex-direction: row;
    overflow-x: auto;
    overflow-y: hidden;
    border-right: none;
    border-bottom: 1px solid var(--border);
    padding: 8px;
  }
  .pg-scenarios {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    gap: 8px;
    min-width: max-content;
    margin: 0;
    padding: 0 10px 0 0;
    border-bottom: none;
    border-right: 1px solid var(--border);
  }
  .pg-scenarios__eyebrow,
  .pg-scenarios__summary {
    display: none;
  }
  .pg-scenarios__tabs {
    display: flex;
    gap: 4px;
  }
  .pg-scenarios__tab {
    width: auto;
    padding: 6px 10px;
    white-space: nowrap;
  }
  .pg-nav__section {
    flex-direction: row;
    gap: 4px;
    padding: 0;
  }
  .pg-nav__item {
    padding: 6px 10px;
    white-space: nowrap;
  }
  .pg-nav__footer { display: none; }
  .pg-state {
    border-left: none;
    border-top: 1px solid var(--border);
    max-height: 200px;
    overflow-y: auto;
  }
  .pg-section {
    padding: 24px 20px;
  }
  .explainer__grid {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 600px) {
  .pg-header__link { display: none; }
  .pg-nav__label { display: none; }
  .pg-nav__icon { font-size: 14px; }
  .pg-scenarios__tab {
    font-size: 9px;
    padding: 6px 8px;
  }
  .controls-row { flex-direction: column; }
}

/* ============================================================
   EFFECT VM SECTION
   ============================================================ */
.effect-vm-layout {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.effect-vm-builder {
  padding: 14px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}
.effect-vm-builder__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 12px;
}
.effect-vm-builder__title {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 600;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.effect-vm-builder__controls {
  display: flex;
  align-items: center;
  gap: 8px;
}
.effect-vm-sequence {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.effect-vm-step {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 10px;
  background: var(--surface-2);
  border-radius: var(--radius);
  font-family: var(--mono);
  font-size: 10px;
}
.effect-vm-step__num {
  color: var(--text-muted);
  min-width: 20px;
}
.effect-vm-step__type {
  color: var(--info);
  font-weight: 500;
  min-width: 80px;
}
.effect-vm-step__cols {
  color: var(--text-dim);
  flex: 1;
}
.effect-vm-step__remove {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 12px;
  padding: 2px 6px;
  border-radius: 3px;
}
.effect-vm-step__remove:hover { color: var(--danger); background: var(--danger-soft); }
.effect-vm-trace {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  overflow: hidden;
}
.effect-vm-trace__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  background: var(--surface-2);
  border-bottom: 1px solid var(--border);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 600;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.effect-vm-trace__meta {
  font-weight: 400;
  color: var(--text-muted);
  font-size: 10px;
}
.effect-vm-trace__body { overflow-x: auto; }
.evm-table {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--mono);
  font-size: 10px;
}
.evm-table th {
  padding: 6px 10px;
  text-align: left;
  font-size: 9px;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--text-muted);
  background: var(--surface-3);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.evm-table td {
  padding: 6px 10px;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.evm-table__step { color: var(--text-muted); }
.evm-table__type { color: var(--info); }
.evm-table__val { color: var(--text-dim); }
.evm-table__val--up { color: var(--accent-bright); background: rgba(91,138,90,0.08); }
.evm-table__val--down { color: var(--danger); background: rgba(212,104,92,0.06); }
.effect-vm-constraints {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  overflow: hidden;
}
.effect-vm-constraints__header {
  padding: 10px 16px;
  background: var(--surface-2);
  border-bottom: 1px solid var(--border);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 600;
  color: var(--text-dim);
  text-transform: uppercase;
}
.effect-vm-constraints__body { padding: 8px 16px; }
.evm-constraint-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 5px 0;
  border-bottom: 1px solid var(--border);
  font-family: var(--mono);
  font-size: 10px;
  color: var(--text-dim);
}
.evm-constraint-row:last-child { border-bottom: none; }
.evm-constraint-badge {
  font-size: 9px;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 3px;
  text-transform: uppercase;
}
.evm-constraint-badge--pass { background: var(--accent-soft); color: var(--accent-bright); }
.evm-constraint-badge--fail { background: var(--danger-soft); color: var(--danger); }
.effect-vm-proof {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.evm-proof-success {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--mono);
  font-size: 10px;
  color: var(--text-dim);
}
.evm-proof-success__badge {
  background: var(--accent-soft);
  color: var(--accent-bright);
  padding: 3px 8px;
  border-radius: 4px;
  font-weight: 600;
  font-size: 9px;
}

/* ============================================================
   BLOCKLACE SIMULATION
   ============================================================ */
.bsim-controls {
  padding: 14px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  margin-bottom: 16px;
}
.bsim-controls__row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}
.bsim-controls__actions {
  display: flex;
  gap: 8px;
}
.bsim-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--mono);
  font-size: 10px;
  color: var(--text-dim);
}
.bsim-input {
  font-family: var(--mono);
  font-size: 11px;
  padding: 4px 8px;
  background: var(--surface-2);
  border: 1px solid var(--border-2);
  border-radius: var(--radius);
  color: var(--text);
  outline: none;
}
.bsim-input--small { width: 60px; }
.bsim-input:focus { border-color: var(--accent); }
.bsim-stats {
  display: flex;
  gap: 16px;
  margin-bottom: 12px;
}
.bsim-stat {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 8px 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.bsim-stat__label {
  font-family: var(--mono);
  font-size: 9px;
  text-transform: uppercase;
  color: var(--text-muted);
}
.bsim-stat__value {
  font-family: var(--mono);
  font-size: 16px;
  font-weight: 600;
  color: var(--accent-bright);
}
.bsim-dag {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  min-height: 300px;
  overflow: auto;
  margin-bottom: 12px;
}
.bsim-log {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  overflow: hidden;
}
.bsim-log__header {
  padding: 8px 14px;
  background: var(--surface-2);
  border-bottom: 1px solid var(--border);
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--text-muted);
}
.bsim-log__body {
  padding: 8px 14px;
  max-height: 200px;
  overflow-y: auto;
}
.bsim-log__entry {
  font-family: var(--mono);
  font-size: 10px;
  padding: 3px 0;
  border-bottom: 1px solid var(--border);
}
.bsim-log__entry:last-child { border-bottom: none; }

/* ============================================================
   FULL TURN PROOF
   ============================================================ */
.ftp-layout {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.ftp-selector__title, .ftp-composition__title {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 600;
  color: var(--text-dim);
  text-transform: uppercase;
  margin-bottom: 10px;
}
.ftp-selector__list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.ftp-proof-card {
  padding: 12px 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: border-color 0.15s;
}
.ftp-proof-card:hover { border-color: var(--border-2); }
.ftp-proof-card__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}
.ftp-proof-card__check {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}
.ftp-proof-card__check input { accent-color: var(--accent); }
.ftp-proof-card__dot {
  width: 8px; height: 8px;
  border-radius: 50%;
}
.ftp-proof-card__label {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
  color: var(--text);
}
.ftp-proof-card__size {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--text-muted);
}
.ftp-proof-card__body {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--text-dim);
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.ftp-proof-card__air { color: var(--info); }
.ftp-proof-card__pis { color: var(--text-muted); }
.ftp-composition {
  padding: 14px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}
.ftp-diagram-flow {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}
.ftp-diagram-node {
  padding: 8px 12px;
  border: 1px solid var(--border-2);
  border-radius: var(--radius);
  text-align: center;
}
.ftp-diagram-node--binding {
  border-color: var(--accent);
  background: var(--accent-soft);
}
.ftp-diagram-node__label {
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 500;
}
.ftp-diagram-node__pis {
  font-family: var(--mono);
  font-size: 9px;
  color: var(--text-muted);
}
.ftp-diagram-arrow {
  font-family: var(--mono);
  font-size: 14px;
  color: var(--text-muted);
}
.ftp-binding__header {
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 600;
  color: var(--lantern);
  margin-bottom: 6px;
}
.ftp-binding__formula {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--text-dim);
}
.ftp-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.ftp-result__card {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--mono);
  font-size: 10px;
  color: var(--text-dim);
}
.ftp-result__badge {
  background: var(--info-soft);
  color: var(--info);
  padding: 3px 8px;
  border-radius: 4px;
  font-weight: 600;
  font-size: 9px;
}
.ftp-result__binding {
  font-family: var(--mono);
  font-size: 9px;
  color: var(--text-muted);
  margin-top: 4px;
}

/* ============================================================
   TIERED REVOCATION
   ============================================================ */
.trev-layout {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.trev-controls {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 14px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}
.trev-controls__row {
  display: flex;
  gap: 8px;
  align-items: center;
}
.trev-tiers {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.trev-tier {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  overflow: hidden;
}
.trev-tier__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background: var(--surface-2);
  border-bottom: 1px solid var(--border);
}
.trev-tier__title {
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--text-dim);
}
.trev-tier__badge {
  font-family: var(--mono);
  font-size: 10px;
  padding: 2px 8px;
  border-radius: 8px;
  background: var(--accent-soft);
  color: var(--accent-bright);
}
.trev-tier__body {
  padding: 8px 14px;
  max-height: 200px;
  overflow-y: auto;
}
.trev-tier__root {
  padding: 8px 14px;
  border-top: 1px solid var(--border);
  font-family: var(--mono);
  font-size: 10px;
  display: flex;
  gap: 8px;
}
.trev-tier__root-label { color: var(--text-muted); }
.trev-tier__root-value { color: var(--info); }
.trev-entry {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 0;
  border-bottom: 1px solid var(--border);
  font-family: var(--mono);
  font-size: 10px;
}
.trev-entry:last-child { border-bottom: none; }
.trev-entry__id { color: var(--info); }
.trev-entry__meta { color: var(--text-muted); }
.trev-entry--hot .trev-entry__id { color: var(--danger); }
.trev-proofs {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  overflow: hidden;
}
.trev-proofs__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background: var(--surface-2);
  border-bottom: 1px solid var(--border);
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--text-dim);
}
.trev-proofs__count {
  font-weight: 400;
  padding: 2px 6px;
  border-radius: 8px;
  background: var(--accent-soft);
  color: var(--accent-bright);
}
.trev-proofs__body { padding: 8px 14px; }
.trev-proof-entry {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 5px 0;
  border-bottom: 1px solid var(--border);
  font-family: var(--mono);
  font-size: 10px;
}
.trev-proof-entry:last-child { border-bottom: none; }
.trev-proof-entry__id { color: var(--info); min-width: 80px; }
.trev-proof-entry__badge {
  padding: 2px 6px;
  border-radius: 3px;
  font-size: 9px;
  font-weight: 600;
}
.trev-proof-entry--valid .trev-proof-entry__badge { background: var(--accent-soft); color: var(--accent-bright); }
.trev-proof-entry--revoked .trev-proof-entry__badge { background: var(--danger-soft); color: var(--danger); }
.trev-proof-entry__meta { color: var(--text-muted); }

/* ============================================================
   CIRCUIT PLAYGROUND
   ============================================================ */
.cpg-layout {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.cpg-descriptor {
  padding: 14px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}
.cpg-descriptor__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}
.cpg-descriptor__header h4 {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 600;
  color: var(--text-dim);
  text-transform: uppercase;
}
.cpg-columns, .cpg-constraints {
  margin-bottom: 12px;
}
.cpg-columns__header, .cpg-constraints__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
  font-family: var(--mono);
  font-size: 10px;
  color: var(--text-muted);
  text-transform: uppercase;
}
.cpg-columns__list, .cpg-constraints__list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.cpg-col-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 5px 10px;
  background: var(--surface-2);
  border-radius: var(--radius);
  font-family: var(--mono);
  font-size: 10px;
}
.cpg-col-item__idx { color: var(--text-muted); min-width: 20px; }
.cpg-col-item__name { color: var(--info); flex: 1; }
.cpg-col-item__type { color: var(--text-muted); }
.cpg-col-item__remove {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 12px;
  padding: 2px 6px;
}
.cpg-col-item__remove:hover { color: var(--danger); }
.cpg-constraint-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 5px 10px;
  background: var(--surface-2);
  border-radius: var(--radius);
  font-family: var(--mono);
  font-size: 10px;
}
.cpg-constraint-item__type {
  color: var(--lantern);
  min-width: 70px;
  font-size: 9px;
  font-weight: 600;
}
.cpg-constraint-item__expr { color: var(--text-dim); flex: 1; }
.cpg-constraint-item__remove {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 12px;
}
.cpg-constraint-item__remove:hover { color: var(--danger); }
.cpg-trace {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  overflow: hidden;
}
.cpg-trace__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background: var(--surface-2);
  border-bottom: 1px solid var(--border);
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 600;
  color: var(--text-dim);
  text-transform: uppercase;
}
.cpg-trace__controls { display: flex; gap: 6px; }
.cpg-trace__body { overflow-x: auto; }
.cpg-trace-table {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--mono);
  font-size: 10px;
}
.cpg-trace-table th {
  padding: 5px 10px;
  font-size: 9px;
  text-transform: uppercase;
  color: var(--text-muted);
  background: var(--surface-3);
  border-bottom: 1px solid var(--border);
  text-align: left;
}
.cpg-trace-table td {
  padding: 5px 10px;
  border-bottom: 1px solid var(--border);
  color: var(--text-dim);
}
.cpg-output {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  overflow: hidden;
}
.cpg-output__header {
  padding: 8px 14px;
  background: var(--surface-2);
  border-bottom: 1px solid var(--border);
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--text-muted);
}
.cpg-output__code {
  padding: 12px 14px;
  font-family: var(--mono);
  font-size: 10px;
  color: var(--text-dim);
  white-space: pre-wrap;
  line-height: 1.6;
  overflow-x: auto;
}
.cpg-check-results {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  overflow: hidden;
}
.cpg-check-results__header {
  padding: 8px 14px;
  background: var(--surface-2);
  border-bottom: 1px solid var(--border);
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--text-dim);
}
.cpg-check-results__body { padding: 8px 14px; }
.cpg-check-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 5px 0;
  border-bottom: 1px solid var(--border);
  font-family: var(--mono);
  font-size: 10px;
}
.cpg-check-row:last-child { border-bottom: none; }
.cpg-check-row__badge {
  font-size: 9px;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 3px;
  min-width: 35px;
  text-align: center;
}
.cpg-check-row--pass .cpg-check-row__badge { background: var(--accent-soft); color: var(--accent-bright); }
.cpg-check-row--fail .cpg-check-row__badge { background: var(--danger-soft); color: var(--danger); }
.cpg-check-row__expr { color: var(--text-dim); }
.cpg-check-row__violations { color: var(--danger); font-size: 9px; }

/* ============================================================
   SHARED: PLAYGROUND UI COMPONENTS
   ============================================================ */
.pg-select {
  font-family: var(--mono);
  font-size: 11px;
  padding: 5px 10px;
  background: var(--surface-2);
  border: 1px solid var(--border-2);
  border-radius: var(--radius);
  color: var(--text);
  outline: none;
}
.pg-select:focus { border-color: var(--accent); }
.pg-input {
  font-family: var(--mono);
  font-size: 11px;
  padding: 6px 10px;
  background: var(--surface-2);
  border: 1px solid var(--border-2);
  border-radius: var(--radius);
  color: var(--text);
  outline: none;
}
.pg-input:focus { border-color: var(--accent); }
.pg-input--inline { width: 150px; }
.pg-btn {
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 500;
  padding: 6px 12px;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
}
.pg-btn--primary { background: var(--accent); color: var(--bg); }
.pg-btn--primary:hover { background: var(--accent-bright); }
.pg-btn--primary:disabled { opacity: 0.4; cursor: not-allowed; }
.pg-btn--accent { background: var(--lantern); color: var(--bg); }
.pg-btn--accent:hover { background: #e5a84a; }
.pg-btn--accent:disabled { opacity: 0.4; cursor: not-allowed; }
.pg-btn--ghost {
  background: rgba(255,255,255,0.06);
  color: var(--text-dim);
  border: 1px solid var(--border-2);
}
.pg-btn--ghost:hover { color: var(--text); background: rgba(255,255,255,0.1); }
.pg-btn--ghost:disabled { opacity: 0.4; cursor: not-allowed; }
.pg-btn--sm { font-size: 9px; padding: 4px 8px; }
.pg-empty {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-muted);
  padding: 16px;
  text-align: center;
}
