@charset "UTF-8";
button, .btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #1e1e1e;
  border: 1px solid #2a2a2a;
  color: #e8e8e8;
  padding: 6px 14px;
  border-radius: 6px;
  font-family: "Inter", system-ui, -apple-system, sans-serif;
  font-size: 12px;
  line-height: 1;
  height: 30px;
  cursor: pointer;
  text-decoration: none;
  transition: border-color 0.15s, background 0.15s, color 0.15s;
}

button:hover, .btn:hover {
  border-color: var(--accent);
  background: var(--accent-dim);
}

button:active, .btn:active {
  transform: translateY(1px);
}

button:disabled, .btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.btn-accent {
  background: var(--accent-dim);
  border-color: var(--accent-border);
  color: var(--accent);
}

.btn-accent:hover {
  background: var(--accent);
  color: #0d0d0d;
  border-color: var(--accent);
}

.btn-ghost {
  background: transparent;
  border-color: transparent;
  color: #888;
}

.btn-ghost:hover {
  color: #e8e8e8;
  background: #1e1e1e;
}

select, input[type=text], input[type=search] {
  background: #111;
  border: 1px solid #2a2a2a;
  color: #e8e8e8;
  padding: 6px 10px;
  border-radius: 6px;
  font-family: "Inter", system-ui, -apple-system, sans-serif;
  font-size: 12px;
  height: 30px;
  outline: none;
  transition: border-color 0.15s;
}

select:focus, input[type=text]:focus, input[type=search]:focus {
  border-color: var(--accent);
}

select {
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, #888 50%), linear-gradient(135deg, #888 50%, transparent 50%);
  background-position: calc(100% - 14px) 50%, calc(100% - 9px) 50%;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  padding-right: 26px;
  min-width: 220px;
}

select option, select optgroup {
  background: #161616;
  color: #e8e8e8;
}

select optgroup {
  color: var(--accent);
  font-weight: 600;
}

.kbd-label {
  font-size: 9px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: #555;
}

.status-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
}

.status-dot.is-experimental {
  background: #ffb454;
}

.status-dot.is-error {
  background: #ff4d6d;
}

.empty-hint {
  color: #555;
  font-family: "JetBrains Mono", "Fira Code", ui-monospace, monospace;
  font-size: 11px;
  padding: 12px 14px;
}

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 200;
  font-display: swap;
  src: url("/assets/fonts/inter/inter-v20-latin-200.woff2") format("woff2");
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/assets/fonts/inter/inter-v20-latin-regular.woff2") format("woff2");
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/assets/fonts/inter/inter-v20-latin-600.woff2") format("woff2");
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("/assets/fonts/inter/inter-v20-latin-700.woff2") format("woff2");
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url("/assets/fonts/inter/inter-v20-latin-800.woff2") format("woff2");
}
/* ============ THEME VARIABLES ============ */
:root {
  --accent: #00e5a0;
  --accent-dim: #1a2a22;
  --accent-border: #0a3d28;
  --accent-a03: rgba(0, 229, 160, 0.03);
  --accent-a04: rgba(0, 229, 160, 0.04);
  --accent-a06: rgba(0, 229, 160, 0.06);
  --accent-a08: rgba(0, 229, 160, 0.08);
  --accent-a20: rgba(0, 229, 160, 0.2);
}

html[data-theme=orange] {
  --accent: #ffb454;
  --accent-dim: #2a1f0a;
  --accent-border: #3d2a00;
  --accent-a03: rgba(255, 180, 84, 0.03);
  --accent-a04: rgba(255, 180, 84, 0.04);
  --accent-a06: rgba(255, 180, 84, 0.06);
  --accent-a08: rgba(255, 180, 84, 0.08);
  --accent-a20: rgba(255, 180, 84, 0.2);
}

html[data-theme=green2] {
  --accent: #36bc7a;
  --accent-dim: #0e2218;
  --accent-border: #1a4030;
  --accent-a03: rgba(54, 188, 122, 0.03);
  --accent-a04: rgba(54, 188, 122, 0.04);
  --accent-a06: rgba(54, 188, 122, 0.06);
  --accent-a08: rgba(54, 188, 122, 0.08);
  --accent-a20: rgba(54, 188, 122, 0.2);
}

html[data-theme=lime] {
  --accent: #97d900;
  --accent-dim: #1a2200;
  --accent-border: #2d3d00;
  --accent-a03: rgba(151, 217, 0, 0.03);
  --accent-a04: rgba(151, 217, 0, 0.04);
  --accent-a06: rgba(151, 217, 0, 0.06);
  --accent-a08: rgba(151, 217, 0, 0.08);
  --accent-a20: rgba(151, 217, 0, 0.2);
}

html[data-theme=blue-sky] {
  --accent: #00a5fe;
  --accent-dim: #001e2e;
  --accent-border: #003a5a;
  --accent-a03: rgba(0, 165, 254, 0.03);
  --accent-a04: rgba(0, 165, 254, 0.04);
  --accent-a06: rgba(0, 165, 254, 0.06);
  --accent-a08: rgba(0, 165, 254, 0.08);
  --accent-a20: rgba(0, 165, 254, 0.2);
}

html[data-theme=emerald] {
  --accent: #1eac75;
  --accent-dim: #0a2018;
  --accent-border: #143d2a;
  --accent-a03: rgba(30, 172, 117, 0.03);
  --accent-a04: rgba(30, 172, 117, 0.04);
  --accent-a06: rgba(30, 172, 117, 0.06);
  --accent-a08: rgba(30, 172, 117, 0.08);
  --accent-a20: rgba(30, 172, 117, 0.2);
}

html[data-theme=violet] {
  --accent: #b47aff;
  --accent-dim: #1e1a2a;
  --accent-border: #2d1e4a;
  --accent-a03: rgba(180, 122, 255, 0.03);
  --accent-a04: rgba(180, 122, 255, 0.04);
  --accent-a06: rgba(180, 122, 255, 0.06);
  --accent-a08: rgba(180, 122, 255, 0.08);
  --accent-a20: rgba(180, 122, 255, 0.2);
}

html[data-theme=cyan] {
  --accent: #00d4e5;
  --accent-dim: #0a2228;
  --accent-border: #003d44;
  --accent-a03: rgba(0, 212, 229, 0.03);
  --accent-a04: rgba(0, 212, 229, 0.04);
  --accent-a06: rgba(0, 212, 229, 0.06);
  --accent-a08: rgba(0, 212, 229, 0.08);
  --accent-a20: rgba(0, 212, 229, 0.2);
}

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

html, body {
  height: 100%;
}

body {
  background: #0d0d0d;
  color: #e8e8e8;
  font-family: "Inter", system-ui, -apple-system, sans-serif;
  font-size: 13px;
  overflow: hidden;
}

.pg-app {
  display: grid;
  grid-template-rows: 52px 1fr 4px var(--pg-row-split, 220px) 44px;
  height: 100vh;
}

.pg-main {
  display: grid;
  grid-template-columns: var(--pg-col-split, 1fr) 1fr;
  min-height: 0;
  border-top: 1px solid #2a2a2a;
}

body.pg-resizing {
  user-select: none;
  cursor: var(--pg-resize-cursor, default);
}

body.pg-resizing iframe {
  pointer-events: none;
}

.pg-pane {
  display: flex;
  flex-direction: column;
  min-height: 0;
  min-width: 0;
  background: #161616;
}

.pg-pane + .pg-pane {
  border-left: 1px solid #2a2a2a;
}

.pg-pane-head {
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 12px;
  background: #080808;
  border-bottom: 1px solid #2a2a2a;
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #555;
  flex: 0 0 auto;
}

.pg-pane-head > span:first-child {
  color: var(--accent);
  letter-spacing: 0.22em;
}

.pg-pane-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  background: #0a0a0a;
}

.pg-pane-body > .pg-console-body,
.pg-pane-body > .pg-nglog-body {
  min-height: 100%;
}

.pg-footer {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  border-top: 1px solid #2a2a2a;
  min-height: 0;
}

.pg-resize {
  position: relative;
  background: transparent;
  z-index: 5;
  flex: 0 0 auto;
}

.pg-resize::after {
  content: "";
  position: absolute;
  background: transparent;
  transition: background 0.15s;
}

.pg-resize:hover::after, .pg-resize.is-active::after {
  background: var(--accent);
}

.pg-resize-h {
  width: 4px;
  cursor: col-resize;
  margin: 0 -2px;
}

.pg-resize-h::after {
  top: 0;
  bottom: 0;
  left: 1px;
  width: 2px;
}

.pg-resize-v {
  height: 4px;
  cursor: row-resize;
  margin: -2px 0;
}

.pg-resize-v::after {
  left: 0;
  right: 0;
  top: 1px;
  height: 2px;
}

.pg-main {
  grid-template-columns: var(--pg-col-split, 1fr) 4px 1fr;
}

/* Footer: console | maniglia | log (stesso pattern 3-col di pg-main) */
.pg-footer {
  grid-template-columns: var(--pg-footer-split, 1.4fr) 4px 1fr;
}

.pg-topbar {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 0 16px;
  background: #080808;
  border-bottom: 1px solid #2a2a2a;
  height: 52px;
}

.pg-topbar button, .pg-topbar .btn {
  font-size: 14px;
}

.pg-topbar .pg-icon-only {
  padding: 6px 9px;
}

.pg-brand {
  display: flex;
  flex-direction: column;
  line-height: 1;
  gap: 3px;
  margin-right: 4px;
}

.pg-brand .pg-eyebrow {
  font-size: 9px;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--accent);
}

.pg-brand .pg-name {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.pg-divider {
  width: 1px;
  height: 22px;
  background: #2a2a2a;
}

.pg-topbar-spacer {
  flex: 1;
}

.pg-topbar-info {
  font-family: "JetBrains Mono", "Fira Code", ui-monospace, monospace;
  font-size: 10px;
  color: #555;
  display: flex;
  align-items: center;
  gap: 8px;
}

.pg-editor {
  background: #161616;
}

.pg-tabs {
  display: flex;
  background: #080808;
  border-bottom: 1px solid #2a2a2a;
  height: 34px;
  flex: 0 0 auto;
}

.pg-tab {
  background: transparent;
  border: 0;
  border-right: 1px solid #2a2a2a;
  color: #888;
  font-family: "JetBrains Mono", "Fira Code", ui-monospace, monospace;
  font-size: 11px;
  padding: 0 18px;
  height: 100%;
  border-radius: 0;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  position: relative;
  transition: color 0.15s, background 0.15s;
}

.pg-tab:hover {
  color: #e8e8e8;
  background: #1e1e1e;
  border-color: #2a2a2a;
}

.pg-tab.is-active {
  color: var(--accent);
  background: #161616;
}

.pg-tab.is-active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 2px;
  background: var(--accent);
}

.pg-tab-copy {
  margin-left: auto;
  background: transparent;
  border: 0;
  border-left: 1px solid #2a2a2a;
  color: #444;
  padding: 0 12px;
  height: 100%;
  border-radius: 0;
  cursor: pointer;
  font-size: 14px;
  display: flex;
  align-items: center;
  transition: color 0.15s;
}

.pg-tab-copy:hover {
  color: var(--accent);
  background: transparent;
  border-color: #2a2a2a;
}

.pg-editor-body {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
  background: #0a0a0a;
}

.pg-textarea {
  display: none;
  width: 100%;
  height: 100%;
  background: #0a0a0a;
  color: #e8e8e8;
  border: 0;
  outline: none;
  resize: none;
  font-family: "JetBrains Mono", "Fira Code", ui-monospace, monospace;
  font-size: 12px;
  line-height: 1.6;
  padding: 14px 16px;
  tab-size: 2;
  caret-color: var(--accent);
}

.pg-textarea.is-active {
  display: block;
}

.pg-textarea::selection {
  background: var(--accent-border);
  color: var(--accent);
}

.pg-textarea .cm-editor {
  height: 100%;
  background: #0a0a0a;
  font-family: "JetBrains Mono", "Fira Code", ui-monospace, monospace;
  font-size: 12px;
  outline: none;
}

.pg-textarea .cm-editor.cm-focused {
  outline: none;
}

.pg-textarea .cm-scroller {
  font-family: "JetBrains Mono", "Fira Code", ui-monospace, monospace;
}

.pg-textarea .cm-gutters {
  background: #080808;
  border-right: 1px solid #2a2a2a;
  color: #555;
}

.pg-textarea .cm-activeLine, .pg-textarea .cm-activeLineGutter {
  background: var(--accent-a04);
}

.pg-textarea .cm-cursor {
  border-left-color: var(--accent);
}

.pg-textarea .cm-selectionBackground,
.pg-textarea .cm-selectionLayer ::selection {
  background: var(--accent-border) !important;
}

.pg-textarea[data-cm="1"] {
  padding: 0;
}

.pg-preview {
  background: #161616;
}

.pg-preview-frame-wrap {
  flex: 1 1 auto;
  min-height: 0;
  background: linear-gradient(45deg, #0e0e0e 25%, transparent 25%) 0 0/14px 14px, linear-gradient(-45deg, #0e0e0e 25%, transparent 25%) 0 0/14px 14px, linear-gradient(45deg, transparent 75%, #0e0e0e 75%) 0 0/14px 14px, linear-gradient(-45deg, transparent 75%, #0e0e0e 75%) 0 0/14px 14px, #0a0a0a;
  position: relative;
}

.pg-preview-frame {
  width: 100%;
  height: 100%;
  border: 0;
  background: #fff;
  display: block;
}

.pg-preview-status {
  font-family: "JetBrains Mono", "Fira Code", ui-monospace, monospace;
  font-size: 10px;
  color: #555;
}

.pg-preview-status.is-ready {
  color: var(--accent);
}

.pg-preview-status.is-error {
  color: #ff4d6d;
}

.pg-console {
  background: #161616;
}

.pg-console-body {
  background: #1a1a1a;
  font-family: "JetBrains Mono", "Fira Code", ui-monospace, monospace;
  font-size: 11px;
  padding: 8px 0;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.pg-console-line {
  display: grid;
  grid-template-columns: 18px 56px 1fr;
  gap: 8px;
  padding: 2px 12px;
  border-left: 2px solid transparent;
  color: #c9d1d9;
  white-space: pre-wrap;
  word-break: break-word;
}

.pg-console-line.lvl-info {
  border-left-color: #6cb6ff;
}

.pg-console-line.lvl-warn {
  border-left-color: #ffb454;
  background: rgba(255, 180, 84, 0.04);
}

.pg-console-line.lvl-error {
  border-left-color: #ff4d6d;
  background: rgba(255, 77, 109, 0.05);
  color: #ffd7df;
}

.pg-console-line.lvl-input {
  color: var(--accent);
}

.pg-console-line.lvl-result {
  color: #e8e8e8;
}

.pg-console-line .pg-c-marker {
  color: #555;
}

.pg-console-line .pg-c-time {
  color: #555;
}

.pg-console-line .pg-c-msg {
  white-space: pre-wrap;
}

.pg-console-input-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-top: 1px solid #2a2a2a;
  background: #080808;
  flex: 0 0 auto;
}

.pg-console-prompt {
  color: var(--accent);
  font-family: "JetBrains Mono", "Fira Code", ui-monospace, monospace;
  font-size: 11px;
}

.pg-console-input-host {
  position: relative;
  flex: 1;
}

.pg-console-input {
  width: 100%;
  background: transparent;
  border: 0;
  color: #e8e8e8;
  font-family: "JetBrains Mono", "Fira Code", ui-monospace, monospace;
  font-size: 12px;
  outline: none;
  height: 22px;
  caret-color: var(--accent);
}

.pg-acomp {
  position: absolute;
  bottom: 100%;
  left: 0;
  margin-bottom: 4px;
  min-width: 240px;
  max-width: 380px;
  max-height: 240px;
  overflow-y: auto;
  background: #161616;
  border: 1px solid #2a2a2a;
  border-radius: 6px;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.6);
  font-family: "JetBrains Mono", "Fira Code", ui-monospace, monospace;
  font-size: 11px;
  z-index: 50;
  display: none;
}

.pg-acomp.is-open {
  display: block;
}

.pg-acomp-item {
  display: grid;
  grid-template-columns: 18px 1fr auto;
  gap: 8px;
  padding: 4px 10px;
  color: #c9d1d9;
  cursor: pointer;
  border-left: 2px solid transparent;
}

.pg-acomp-item:hover, .pg-acomp-item.is-selected {
  background: var(--accent-dim);
  border-left-color: var(--accent);
  color: #e8e8e8;
}

.pg-acomp-item .pg-ac-icon {
  text-align: center;
  color: #555;
  font-weight: 600;
}

.pg-acomp-item .pg-ac-name {
  color: #e8e8e8;
}

.pg-acomp-item .pg-ac-type {
  color: #555;
  font-size: 10px;
  align-self: center;
}

.pg-acomp-item.t-function .pg-ac-icon {
  color: var(--accent);
}

.pg-acomp-item.t-object .pg-ac-icon {
  color: #6cb6ff;
}

.pg-acomp-item.t-string .pg-ac-icon {
  color: #ffb454;
}

.pg-acomp-item.t-number .pg-ac-icon {
  color: #ffb454;
}

.pg-acomp-empty {
  padding: 8px 10px;
  color: #555;
  font-style: italic;
}

.pg-sigbar {
  display: none;
  background: #080808;
  border-top: 1px solid #2a2a2a;
  color: #888;
  font-family: "JetBrains Mono", "Fira Code", ui-monospace, monospace;
  font-size: 11px;
  padding: 5px 14px;
  white-space: nowrap;
  overflow-x: auto;
  flex: 0 0 auto;
}

.pg-sigbar.is-active {
  display: block;
}

.pg-sigbar .pg-sig-fn {
  color: var(--accent);
  font-weight: 600;
}

.pg-sigbar .pg-sig-name {
  color: #c9d1d9;
}

.pg-sigbar .pg-sig-name.is-active {
  color: var(--accent);
  text-decoration: underline;
  font-weight: 600;
}

.pg-sigbar .pg-sig-type {
  color: #6cb6ff;
}

.pg-sigbar .pg-sig-return {
  color: #ffb454;
}

.pg-sigbar .pg-sig-native {
  color: #555;
  margin-left: 8px;
  font-style: italic;
}

.pg-nglog {
  background: #161616;
}

.pg-nglog-body {
  background: #1a1a1a;
  font-family: "JetBrains Mono", "Fira Code", ui-monospace, monospace;
  font-size: 11px;
  padding: 6px 0;
  display: flex;
  flex-direction: column;
}

.pg-nglog-filters {
  display: flex;
  align-items: center;
  gap: 10px;
}

.pg-nglog-filters label {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-family: "JetBrains Mono", "Fira Code", ui-monospace, monospace;
  font-size: 11px;
  color: #888;
  cursor: pointer;
  user-select: none;
}

.pg-nglog-filters label .ph {
  font-size: 14px;
}

.pg-nglog-filters input[type=checkbox] {
  width: 12px;
  height: 12px;
  accent-color: var(--accent);
}

.pg-nglog-filters button {
  margin-left: 6px;
}

.pg-nglog-entry {
  display: grid;
  grid-template-columns: 52px auto 1fr;
  gap: 8px;
  padding: 2px 12px;
  border-left: 2px solid transparent;
  align-items: baseline;
}

.pg-nglog-entry.is-hidden {
  display: none;
}

.pg-nglog-entry .pg-l-time {
  color: #555;
  font-variant-numeric: tabular-nums;
}

.pg-nglog-entry .pg-l-time.is-dim {
  color: transparent;
}

.pg-nglog-entry .pg-l-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--accent);
  font-size: 10px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.pg-nglog-entry .pg-l-tag .ph {
  font-size: 13px;
}

.pg-nglog-entry .pg-l-tag .pg-l-count {
  font-size: 10px;
  color: #888;
}

.pg-nglog-entry .pg-l-msg {
  color: #c9d1d9;
  white-space: pre-wrap;
  word-break: break-word;
}

/* Per-type colors — each kind must read distinct at a glance. */
.pg-nglog-entry.lvl-warn {
  border-left-color: #ffd23f;
}

.pg-nglog-entry.lvl-warn .pg-l-tag {
  color: #ffd23f;
}

.pg-nglog-entry.lvl-error {
  border-left-color: #ff5470;
}

.pg-nglog-entry.lvl-error .pg-l-tag {
  color: #ff5470;
}

.pg-nglog-entry.lvl-info,
.pg-nglog-entry.lvl-log {
  border-left-color: #6cb6ff;
}

.pg-nglog-entry.lvl-info .pg-l-tag,
.pg-nglog-entry.lvl-log .pg-l-tag {
  color: #6cb6ff;
}

/* Event = fixed emerald (NOT the theme accent, so it never collides with log). */
.pg-nglog-entry.lvl-event {
  border-left-color: #2dd4a7;
}

.pg-nglog-entry.lvl-event .pg-l-tag {
  color: #2dd4a7;
}

.pg-nglog-entry.lvl-event .pg-l-evname {
  color: #e8e8e8;
  font-weight: 600;
}

.pg-nglog-entry.lvl-event .pg-l-evtarget {
  color: #6cb6ff;
}

.pg-nglog-entry.lvl-event .pg-l-evdetail {
  color: #555;
}

/* Mutations get their own hue (violet) so they read distinct from info/event. */
.pg-nglog-entry.lvl-mut {
  border-left-color: #b392f0;
}

.pg-nglog-entry.lvl-mut .pg-l-tag {
  color: #b392f0;
}

.pg-nglog-entry.lvl-mut .pg-l-evtarget {
  color: #b392f0;
}

.pg-nglog-entry.lvl-mut .pg-l-mut-add {
  color: var(--accent);
}

.pg-nglog-entry.lvl-mut .pg-l-mut-rem {
  color: #ff4d6d;
}

/* Coalesced burst: one block, one line per target. */
.pg-nglog-entry.lvl-mut .pg-l-mut-line {
  display: block;
}

.pg-nglog-entry.lvl-mut.is-group {
  background: rgba(179, 146, 240, 0.05);
  border-left-color: #b392f0;
}

.pg-nglog-entry.lvl-mut.is-group .pg-l-mut-line + .pg-l-mut-line {
  margin-top: 1px;
}

/* Context dividers — structural separators, never filtered out. */
.pg-nglog-divider {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 6px 12px 3px;
  font-family: "JetBrains Mono", "Fira Code", ui-monospace, monospace;
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #888;
}

.pg-nglog-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: #2a2a2a;
}

.pg-nglog-divider .pg-div-label {
  white-space: nowrap;
}

.pg-nglog-divider.div-run .pg-div-label {
  color: var(--accent);
}

.pg-nglog-divider.div-component .pg-div-label {
  color: #6cb6ff;
}

.pg-nglog-divider.div-workspace .pg-div-label {
  color: #ffb454;
}

.pg-drawer {
  position: fixed;
  top: 52px;
  bottom: 0;
  width: 420px;
  max-width: 90vw;
  background: #161616;
  z-index: 100;
  display: flex;
  flex-direction: column;
  transition: transform 0.2s ease-out;
}

.pg-drawer-right {
  right: 0;
  border-left: 1px solid #2a2a2a;
  transform: translateX(100%);
}

.pg-drawer-right.is-open {
  transform: translateX(0);
  box-shadow: -10px 0 30px rgba(0, 0, 0, 0.6);
}

.pg-drawer-left {
  left: 0;
  border-right: 1px solid #2a2a2a;
  box-shadow: 10px 0 30px rgba(0, 0, 0, 0.6);
  transform: translateX(-100%);
}

.pg-drawer-left.is-open {
  transform: translateX(0);
}

.pg-drawer-head {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 36px;
  padding: 0 12px;
  background: #080808;
  border-bottom: 1px solid #2a2a2a;
  flex: 0 0 auto;
}

.pg-drawer-title {
  font-size: 11px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--accent);
  flex: 1;
}

.pg-drawer-body {
  flex: 1 1 auto;
  overflow: auto;
  background: #0a0a0a;
}

.pg-diag-table {
  width: 100%;
  border-collapse: collapse;
  font-family: "JetBrains Mono", "Fira Code", ui-monospace, monospace;
  font-size: 11px;
}

.pg-diag-table thead th {
  position: sticky;
  top: 0;
  background: #080808;
  color: #888;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 9px;
  padding: 6px 10px;
  text-align: left;
  border-bottom: 1px solid #2a2a2a;
}

.pg-diag-table tbody td {
  padding: 5px 10px;
  border-bottom: 1px solid #222;
  color: #c9d1d9;
}

.pg-diag-table tbody tr:hover td {
  background: var(--accent-a03);
}

.pg-diag-table .num {
  text-align: right;
}

.pg-diag-name {
  color: #e8e8e8;
  font-weight: 600;
}

.pg-diag-exp {
  margin-left: 6px;
  font-size: 9px;
  color: #ffb454;
  border: 1px solid #ffb454;
  border-radius: 3px;
  padding: 0 4px;
}

.pg-diag-ver {
  color: #555;
}

.pg-diag-age {
  color: #555;
}

.pg-diag-status {
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 3px;
  letter-spacing: 0.05em;
}

.pg-diag-status.is-ready {
  color: var(--accent);
  background: var(--accent-a08);
}

.pg-diag-status.is-pending {
  color: #555;
  background: rgba(255, 255, 255, 0.04);
}

.pg-diag-foot {
  padding: 8px 12px;
  color: #555;
  font-family: "JetBrains Mono", "Fira Code", ui-monospace, monospace;
  font-size: 10px;
  border-top: 1px solid #2a2a2a;
}

.pg-diag-empty {
  padding: 24px;
  color: #555;
  font-family: "JetBrains Mono", "Fira Code", ui-monospace, monospace;
  font-size: 11px;
  text-align: center;
}

.pg-settings-tabs {
  display: flex;
  background: #080808;
  border-bottom: 1px solid #2a2a2a;
  flex: 0 0 auto;
}

.pg-settings-tab {
  background: transparent;
  border: 0;
  border-right: 1px solid #2a2a2a;
  color: #888;
  font-family: "JetBrains Mono", "Fira Code", ui-monospace, monospace;
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0 18px;
  height: 32px;
  border-radius: 0;
  cursor: pointer;
  position: relative;
}

.pg-settings-tab:hover {
  color: #e8e8e8;
  background: #1e1e1e;
}

.pg-settings-tab.is-active {
  color: var(--accent);
  background: #161616;
}

.pg-settings-tab.is-active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 2px;
  background: var(--accent);
}

.pg-settings-section {
  display: none;
  padding: 18px;
}

.pg-settings-section.is-active {
  display: block;
}

.pg-settings-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 14px;
}

.pg-settings-row label {
  font-size: 12px;
  color: #888;
}

.pg-settings-row select, .pg-settings-row input[type=text], .pg-settings-row input[type=number] {
  width: 100%;
  min-width: 0;
}

.pg-settings-row label:has(input[type=checkbox]) {
  flex-direction: row;
  align-items: center;
  gap: 8px;
  color: #e8e8e8;
}

.pg-settings-hint {
  margin-top: 10px;
  font-size: 11px;
  color: #555;
  line-height: 1.6;
}

.pg-settings-hint code {
  background: #0a0a0a;
  border: 1px solid #2a2a2a;
  border-radius: 3px;
  padding: 1px 5px;
  font-family: "JetBrains Mono", "Fira Code", ui-monospace, monospace;
  font-size: 10px;
  color: var(--accent);
}

.pg-ai-body {
  background: #0a0a0a;
  font-family: "Inter", system-ui, -apple-system, sans-serif;
  font-size: 13px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 14px;
}

.pg-ai-empty {
  color: #555;
  font-size: 12px;
  line-height: 1.6;
  text-align: center;
  padding: 24px 12px;
  border: 1px dashed #2a2a2a;
  border-radius: 6px;
}

.pg-ai-empty em {
  color: #888;
}

.pg-ai-msg {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 10px 12px;
  border-radius: 6px;
  border-left: 2px solid transparent;
  max-width: 100%;
  word-break: break-word;
}

.pg-ai-msg.is-user {
  background: var(--accent-a04);
  border-left-color: var(--accent);
}

.pg-ai-msg.is-user .pg-ai-role {
  color: var(--accent);
}

.pg-ai-msg.is-assistant {
  background: #161616;
  border: 1px solid #2a2a2a;
}

.pg-ai-msg.is-assistant .pg-ai-role {
  color: #6cb6ff;
}

.pg-ai-msg.is-error {
  background: rgba(255, 77, 109, 0.05);
  border-left-color: #ff4d6d;
}

.pg-ai-msg.is-error .pg-ai-role {
  color: #ff4d6d;
}

.pg-ai-msg .pg-ai-role {
  font-family: "JetBrains Mono", "Fira Code", ui-monospace, monospace;
  font-size: 10px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.pg-ai-msg .pg-ai-text {
  white-space: pre-wrap;
  font-size: 12px;
  line-height: 1.5;
  color: #e8e8e8;
}

.pg-ai-msg pre {
  background: #0a0a0a;
  border: 1px solid #2a2a2a;
  border-radius: 6px;
  padding: 8px 10px;
  font-family: "JetBrains Mono", "Fira Code", ui-monospace, monospace;
  font-size: 11px;
  color: #c9d1d9;
  overflow-x: auto;
  max-width: 100%;
}

.pg-ai-msg .pg-ai-actions {
  display: flex;
  gap: 6px;
  margin-top: 6px;
}

.pg-ai-input-wrap {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 10px 12px;
  background: #080808;
  border-top: 1px solid #2a2a2a;
  flex: 0 0 auto;
}

.pg-ai-input-wrap textarea {
  width: 100%;
  background: #0a0a0a;
  color: #e8e8e8;
  border: 1px solid #2a2a2a;
  border-radius: 6px;
  font-family: "JetBrains Mono", "Fira Code", ui-monospace, monospace;
  font-size: 12px;
  padding: 8px 10px;
  resize: vertical;
  outline: none;
  transition: border-color 0.15s;
}

.pg-ai-input-wrap textarea:focus {
  border-color: var(--accent);
}

.pg-ai-input-wrap #pg-ai-send {
  align-self: flex-end;
}

::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track {
  background: #0a0a0a;
}

::-webkit-scrollbar-thumb {
  background: #2a2a2a;
  border-radius: 6px;
}

::-webkit-scrollbar-thumb:hover {
  background: #555;
}

/* ============ COMMAND PALETTE ============ */
.pg-pal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 9000;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 12vh;
}

.pg-pal-backdrop[aria-hidden=true] {
  display: none;
}

.pg-pal-dialog {
  width: 100%;
  max-width: 560px;
  background: #161616;
  border: 1px solid #2a2a2a;
  border-radius: 10px;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.7);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  animation: pg-pal-in 0.1s ease;
}

@keyframes pg-pal-in {
  from {
    opacity: 0;
    transform: scale(0.97) translateY(-6px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}
.pg-pal-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 14px;
  border-bottom: 1px solid #2a2a2a;
  height: 46px;
  flex: 0 0 auto;
}

.pg-pal-search-icon {
  color: #555;
  font-size: 16px;
  flex: 0 0 auto;
}

.pg-pal-input {
  flex: 1;
  background: transparent;
  border: 0;
  color: #e8e8e8;
  font-family: "Inter", system-ui, -apple-system, sans-serif;
  font-size: 14px;
  height: 100%;
  outline: none;
  padding: 0;
}

.pg-pal-input::placeholder {
  color: #444;
}

.pg-pal-esc {
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #444;
  border: 1px solid #2a2a2a;
  border-radius: 4px;
  padding: 2px 6px;
  flex: 0 0 auto;
}

.pg-pal-list {
  max-height: 360px;
  overflow-y: auto;
  padding: 6px 0;
}

.pg-pal-group {
  font-size: 9px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #555;
  padding: 10px 14px 4px;
  font-family: "JetBrains Mono", "Fira Code", ui-monospace, monospace;
}

.pg-pal-group:first-child {
  padding-top: 4px;
}

.pg-pal-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 14px;
  cursor: pointer;
  border-radius: 0;
  transition: background 0.08s;
}

.pg-pal-item i {
  font-size: 15px;
  color: #555;
  flex: 0 0 auto;
  width: 18px;
  text-align: center;
}

.pg-pal-item.is-active,
.pg-pal-item:hover {
  background: #1e1e1e;
}

.pg-pal-item.is-active i,
.pg-pal-item:hover i {
  color: var(--accent);
}

.pg-pal-label {
  font-size: 13px;
  color: #e8e8e8;
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pg-pal-desc {
  font-size: 11px;
  color: #555;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 200px;
  font-family: "JetBrains Mono", "Fira Code", ui-monospace, monospace;
}

.pg-pal-kbd {
  font-size: 10px;
  color: #444;
  border: 1px solid #2a2a2a;
  border-radius: 4px;
  padding: 1px 5px;
  font-family: "JetBrains Mono", "Fira Code", ui-monospace, monospace;
  flex: 0 0 auto;
}

.pg-pal-empty {
  padding: 24px;
  color: #555;
  font-size: 12px;
  text-align: center;
  font-family: "JetBrains Mono", "Fira Code", ui-monospace, monospace;
}

/* Topbar hint button */
.pg-pal-hint-btn {
  display: flex;
  align-items: center;
  gap: 6px;
}

.pg-pal-hint-btn .pg-pal-kbd-badge {
  font-size: 9px;
  letter-spacing: 0.1em;
  color: #444;
  border: 1px solid #2a2a2a;
  border-radius: 4px;
  padding: 1px 5px;
  font-family: "JetBrains Mono", "Fira Code", ui-monospace, monospace;
}

/* ============ STATUS BAR ============ */
.pg-statusbar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 14px;
  background: #0d0d0d;
  border-top: 1px solid #1e1e1e;
  font-family: "JetBrains Mono", "Fira Code", ui-monospace, monospace;
  font-size: 12px;
  color: #444;
  white-space: nowrap;
  overflow: hidden;
  user-select: none;
}

.pg-sb-item {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.pg-sb-item i {
  font-size: 16px;
  color: #828282;
}

.pg-sb-val {
  color: var(--accent);
}

.pg-sb-sep {
  color: #222;
}

/* ============ INSPECT MODE ============ */
.pg-preview-frame-wrap {
  position: relative;
}

.pg-inspect-tip {
  position: absolute;
  display: none;
  flex-wrap: wrap;
  gap: 4px;
  align-items: center;
  background: #0d0d0d;
  border: 1px solid var(--accent);
  border-radius: 5px;
  padding: 5px 8px;
  font-family: "JetBrains Mono", "Fira Code", ui-monospace, monospace;
  font-size: 11px;
  pointer-events: none;
  z-index: 9999;
  max-width: 320px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.6);
}

.pg-inspect-tip.is-visible {
  display: flex;
}

.pg-it-tag {
  color: #888;
}

.pg-it-class {
  color: var(--accent);
  background: var(--accent-a08);
  border-radius: 3px;
  padding: 1px 4px;
}

.pg-it-attr {
  color: #ffb454;
  background: rgba(255, 180, 84, 0.08);
  border-radius: 3px;
  padding: 1px 4px;
}

.btn-ghost.is-active {
  color: var(--accent);
  background: var(--accent-a08);
  border-color: var(--accent-a20);
}

/* ============ KEYBOARD CHEATSHEET ============ */
.pg-cheatsheet-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  z-index: 9000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.pg-cheatsheet-backdrop[aria-hidden=true] {
  display: none;
}

.pg-cheatsheet-dialog {
  background: #111;
  border: 1px solid #2a2a2a;
  border-radius: 10px;
  padding: 24px 28px;
  min-width: 360px;
  max-width: 480px;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.7);
}

.pg-cheatsheet-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.pg-cheatsheet-title {
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
}

.pg-cheatsheet-close {
  background: transparent;
  border: 0;
  color: #555;
  cursor: pointer;
  font-size: 16px;
  padding: 2px 4px;
  line-height: 1;
  transition: color 0.15s;
  height: auto;
}

.pg-cheatsheet-close:hover {
  color: #e8e8e8;
  background: transparent;
  border-color: transparent;
}

.pg-cs-group {
  margin-bottom: 16px;
}

.pg-cs-group-label {
  font-size: 9px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #444;
  margin-bottom: 8px;
}

.pg-cs-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 5px 0;
  border-bottom: 1px solid #1a1a1a;
  font-size: 12px;
}

.pg-cs-row:last-child {
  border-bottom: 0;
}

.pg-cs-label {
  color: #888;
}

.pg-cs-keys {
  display: flex;
  gap: 4px;
}

.pg-cs-key {
  background: #1e1e1e;
  border: 1px solid #2a2a2a;
  border-radius: 4px;
  padding: 2px 7px;
  font-family: "JetBrains Mono", "Fira Code", ui-monospace, monospace;
  font-size: 11px;
  color: var(--accent);
  height: auto;
  cursor: default;
}

/* ============ THEME SWITCHER ============ */
.pg-theme-swatches {
  display: flex;
  gap: 8px;
  margin-top: 4px;
}

.pg-theme-swatch {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid #333;
  cursor: pointer;
  padding: 0;
  transition: border-color 0.15s, transform 0.15s;
}

.pg-theme-swatch:hover {
  transform: scale(1.15);
  border-color: #888;
  background: inherit;
}

.pg-theme-swatch.is-active {
  border-color: #e8e8e8;
}

.pg-theme-swatch[data-theme=green] {
  background: #00e5a0 !important;
}

.pg-theme-swatch[data-theme=orange] {
  background: #ffb454 !important;
}

.pg-theme-swatch[data-theme=green2] {
  background: #36bc7a !important;
}

.pg-theme-swatch[data-theme=lime] {
  background: #97d900 !important;
}

.pg-theme-swatch[data-theme=blue-sky] {
  background: #00a5fe !important;
}

.pg-theme-swatch[data-theme=emerald] {
  background: #1eac75 !important;
}

.pg-theme-swatch[data-theme=violet] {
  background: #b47aff !important;
}

.pg-theme-swatch[data-theme=cyan] {
  background: #00d4e5 !important;
}

/* ============ SPLASH BOOT ============ */
.pg-splash {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #0d0d0d;
  opacity: 1;
  transition: opacity 380ms ease;
}

.pg-splash.is-leaving {
  opacity: 0;
  pointer-events: none;
}

.pg-splash-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 22px;
  user-select: none;
}

.pg-splash-wordmark {
  font-family: "Inter", system-ui, sans-serif;
  font-size: 32px;
  font-weight: 600;
  letter-spacing: 0.42em;
  color: var(--accent);
  padding-left: 0.42em; /* offset for trailing letter-spacing */
  animation: pg-splash-pulse 2.2s ease-in-out infinite;
}

.pg-splash-subtitle {
  font-family: "Inter", system-ui, sans-serif;
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.5em;
  text-transform: uppercase;
  color: #555;
  padding-left: 0.5em;
  margin-top: -8px;
}

.pg-splash-stages {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 18px;
  margin-top: 14px;
}

.pg-splash-stage {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: "Inter", system-ui, sans-serif;
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #3a3a3a;
  transition: color 200ms ease;
}

.pg-splash-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #2a2a2a;
  transition: background 200ms ease, box-shadow 200ms ease;
}

.pg-splash-stage.is-done {
  color: var(--accent);
}

.pg-splash-stage.is-done .pg-splash-dot {
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent-a20);
}

@keyframes pg-splash-pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.55;
  }
}
/* ============ VIEWPORT BAR ============ */
.pg-viewport-bar {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  background: #131313;
  border-bottom: 1px solid #222;
  flex-shrink: 0;
}

.pg-vp-btn {
  font-family: "JetBrains Mono", "Fira Code", ui-monospace, monospace;
  font-size: 10px;
  letter-spacing: 0.08em;
  height: 22px;
  padding: 0 8px;
  background: transparent;
  color: #777;
  border: 1px solid transparent;
  border-radius: 3px;
  cursor: pointer;
  transition: color 120ms ease, background 120ms ease, border-color 120ms ease;
}

.pg-vp-btn:hover {
  color: #ccc;
  background: var(--accent-a04);
}

.pg-vp-btn.is-active {
  color: var(--accent);
  background: var(--accent-dim);
  border-color: var(--accent-border);
}

.pg-vp-spacer {
  flex: 1 1 auto;
}

.pg-vp-theme {
  width: 26px;
  height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  color: #777;
  border: 1px solid transparent;
  border-radius: 3px;
  cursor: pointer;
  padding: 0;
  font-size: 13px;
  transition: color 120ms ease, background 120ms ease, border-color 120ms ease;
}

.pg-vp-theme:hover {
  color: #ccc;
  background: var(--accent-a04);
}

.pg-vp-theme.is-active {
  color: var(--accent);
  background: var(--accent-dim);
  border-color: var(--accent-border);
}

/* When the wrap has an explicit width set, center the iframe and let the
   checkered backdrop show around it. min(N, 100%) keeps it clamped to the
   pane width on narrow layouts so it never overflows. */
.pg-preview-frame-wrap.is-constrained .pg-preview-frame {
  max-width: min(var(--vp-width, 100%), 100%);
  margin: 0 auto;
}

/* ============ DEPENDENCY GRAPH ============ */
.pg-graph-overlay {
  position: fixed;
  inset: 5vh 5vw;
  z-index: 8500;
  background: #0e0e0e;
  border: 1px solid #2a2a2a;
  border-radius: 6px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.55);
  display: none;
  flex-direction: column;
  overflow: hidden;
}

.pg-graph-overlay.is-open {
  display: flex;
}

.pg-graph-head {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 40px;
  padding: 0 10px 0 14px;
  background: #161616;
  border-bottom: 1px solid #222;
}

.pg-graph-title {
  font-family: "Inter", system-ui, sans-serif;
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent);
}

.pg-graph-stats {
  font-family: "JetBrains Mono", "Fira Code", ui-monospace, monospace;
  font-size: 10px;
  color: #888;
}

.pg-graph-hint {
  font-size: 10px;
  color: #555;
  margin-left: auto;
  margin-right: 4px;
  letter-spacing: 0.05em;
}

.pg-graph-canvas {
  flex: 1 1 auto;
  min-height: 0;
  background: radial-gradient(circle at 1px 1px, #1a1a1a 1px, transparent 1px) 0 0/22px 22px, #0d0d0d;
  position: relative;
}

.pg-graph-canvas svg {
  width: 100%;
  height: 100%;
  display: block;
  cursor: grab;
}

.pg-graph-canvas svg.is-grabbing {
  cursor: grabbing;
}

/* Edges */
.pg-graph-edge {
  fill: none;
  stroke: #2c2c2c;
  stroke-width: 1.2;
  transition: stroke 160ms ease, stroke-width 160ms ease;
}

.pg-graph-edge.is-active {
  stroke: var(--accent);
  stroke-width: 1.8;
}

.pg-graph-edge.is-dim {
  stroke: #1a1a1a;
}

/* Nodes */
.pg-graph-node {
  cursor: pointer;
  transition: opacity 160ms ease;
}

.pg-graph-node.is-dim {
  opacity: 0.28;
}

.pg-graph-node-rect {
  fill: #161616;
  stroke: #2a2a2a;
  stroke-width: 1;
  transition: fill 160ms ease, stroke 160ms ease;
}

.pg-graph-node-label {
  font-family: "JetBrains Mono", "Fira Code", ui-monospace, monospace;
  font-size: 11px;
  fill: #c9d1d9;
  pointer-events: none;
  user-select: none;
}

.pg-graph-node.is-ready .pg-graph-node-rect {
  stroke: var(--accent-border);
}

.pg-graph-node.is-ready .pg-graph-node-label {
  fill: #d8e1e9;
}

.pg-graph-node.is-pending .pg-graph-node-rect {
  stroke: #333;
  fill: #131313;
}

.pg-graph-node.is-pending .pg-graph-node-label {
  fill: #777;
}

.pg-graph-node.is-focus .pg-graph-node-rect {
  fill: var(--accent-dim);
  stroke: var(--accent);
  stroke-width: 1.5;
}

.pg-graph-node.is-focus .pg-graph-node-label {
  fill: var(--accent);
}

.pg-graph-node:hover .pg-graph-node-rect {
  stroke: var(--accent);
}

.pg-graph-exp-dot {
  fill: #ffb454;
}

/* ============ VARIANTS STUDIO (props drawer) ============ */
/* width override removed — all drawers unified via .pg-drawer base */
#pg-props-body {
  padding: 16px 18px;
}

.pg-props-component-select {
  height: 24px;
  margin-left: auto;
  margin-right: 4px;
  background: #1a1a1a;
  color: #c9d1d9;
  border: 1px solid #2a2a2a;
  border-radius: 3px;
  font-size: 11px;
  padding: 0 6px;
}

.pg-props-desc {
  font-size: 11px;
  color: #777;
  margin-bottom: 12px;
  line-height: 1.5;
}

.pg-props-controls {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.pg-props-row {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.pg-props-label {
  font-family: "Inter", system-ui, sans-serif;
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #666;
}

.pg-props-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.pg-props-chip {
  height: 24px;
  padding: 0 9px;
  background: #1a1a1a;
  color: #888;
  border: 1px solid #2a2a2a;
  border-radius: 3px;
  font-family: "JetBrains Mono", "Fira Code", ui-monospace, monospace;
  font-size: 10px;
  letter-spacing: 0.05em;
  cursor: pointer;
  transition: color 120ms ease, background 120ms ease, border-color 120ms ease;
}

.pg-props-chip:hover {
  color: #ccc;
  background: var(--accent-a04);
}

.pg-props-chip.is-active {
  color: var(--accent);
  background: var(--accent-dim);
  border-color: var(--accent-border);
}

.pg-props-select,
.pg-props-input {
  height: 28px;
  padding: 0 8px;
  background: #1a1a1a;
  color: #c9d1d9;
  border: 1px solid #2a2a2a;
  border-radius: 3px;
  font-family: "JetBrains Mono", "Fira Code", ui-monospace, monospace;
  font-size: 11px;
  outline: none;
}

.pg-props-select:focus,
.pg-props-input:focus {
  border-color: var(--accent);
}

.pg-props-footer {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid #222;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.pg-props-snippet-label {
  font-family: "Inter", system-ui, sans-serif;
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #666;
}

.pg-props-snippet pre {
  margin: 5px 0 0;
  padding: 8px 10px;
  background: #0d0d0d;
  border: 1px solid #1f1f1f;
  border-radius: 3px;
  font-family: "JetBrains Mono", "Fira Code", ui-monospace, monospace;
  font-size: 10.5px;
  color: #b5d8c2;
  white-space: pre-wrap;
  word-break: break-all;
}

.pg-props-empty {
  font-size: 11px;
  color: #666;
  padding: 30px 0;
  text-align: center;
}

/* ============ DEPENDENCY GRAPH — EXPAND BOXES ============ */
.pg-graph-box-rect {
  fill: #0d0d0d;
  stroke: #2a2a2a;
  stroke-width: 1;
}

.pg-graph-box-head {
  fill: #1a1a1a;
  stroke: none;
}

.pg-graph-box-title {
  font-family: "Inter", system-ui, sans-serif;
  font-size: 9.5px;
  letter-spacing: 0.22em;
  fill: var(--accent);
  text-transform: uppercase;
  pointer-events: none;
  user-select: none;
}

.pg-graph-box-body {
  font-family: "Inter", system-ui, sans-serif;
  font-size: 11px;
  fill: #c9d1d9;
  pointer-events: none;
  user-select: none;
}

.pg-graph-box-body.is-mono {
  font-family: "JetBrains Mono", "Fira Code", ui-monospace, monospace;
  font-size: 10.5px;
  fill: #b5d8c2;
  white-space: pre;
}

.pg-graph-box-conn {
  stroke: var(--accent);
  stroke-width: 1.2;
  stroke-dasharray: 3 3;
  opacity: 0.55;
}

/* ============ SNAPSHOTS DRAWER ============ */
/* width override removed — all drawers unified via .pg-drawer base */
#pg-snapshots-body {
  padding: 0;
  display: flex;
  flex-direction: column;
}

.pg-snap-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 14px;
  border-bottom: 1px solid #1f1f1f;
  background: #131313;
}

.pg-snap-count {
  font-family: "JetBrains Mono", "Fira Code", ui-monospace, monospace;
  font-size: 10px;
  color: #777;
  letter-spacing: 0.06em;
}

.pg-snap-list {
  display: flex;
  flex-direction: column;
}

.pg-snap-row {
  display: flex;
  flex-direction: column;
  gap: 4px;
  border-bottom: 1px solid #1a1a1a;
  padding: 10px 14px;
  transition: background 100ms ease;
  min-width: 0;
}

.pg-snap-row:hover {
  background: var(--accent-a04);
}

.pg-snap-row.is-pinned {
  background: var(--accent-a03);
}

.pg-snap-line1 {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: "Inter", system-ui, sans-serif;
  font-size: 12px;
  color: #d8e1e9;
}

.pg-snap-label {
  flex: 1 1 auto;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  cursor: text;
}

.pg-snap-label-input {
  width: 100%;
  height: 20px;
  padding: 0 4px;
  background: #0a0a0a;
  color: var(--accent);
  border: 1px solid var(--accent-border);
  border-radius: 3px;
  font-family: inherit;
  font-size: 12px;
  outline: none;
}

.pg-snap-when {
  font-family: "JetBrains Mono", "Fira Code", ui-monospace, monospace;
  color: var(--accent);
}

.pg-snap-star {
  color: #ffb454;
  font-size: 12px;
}

.pg-snap-line2,
.pg-snap-line3 {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: "JetBrains Mono", "Fira Code", ui-monospace, monospace;
  font-size: 10px;
  color: #9a9a9a;
}

.pg-snap-line2 {
  justify-content: flex-start;
  flex-wrap: nowrap;
}

.pg-snap-comp {
  color: #b0b0b0;
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pg-snap-sizes {
  color: #888;
  letter-spacing: 0.04em;
}

.pg-snap-actions {
  display: flex;
  align-items: center;
  gap: 2px;
  margin-left: auto;
  opacity: 0;
  transition: opacity 100ms ease;
}

.pg-snap-row:hover .pg-snap-actions,
.pg-snap-row.is-pinned .pg-snap-actions {
  opacity: 1;
}

.pg-snap-act {
  background: transparent;
  border: 1px solid transparent;
  color: #777;
  width: 24px;
  height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border-radius: 3px;
  cursor: pointer;
  transition: color 100ms ease, background 100ms ease, border-color 100ms ease;
}

.pg-snap-act:hover {
  color: var(--accent);
  background: var(--accent-dim);
  border-color: var(--accent-border);
}

.pg-snap-empty {
  font-size: 11px;
  color: #666;
  padding: 40px 20px;
  text-align: center;
}

/* ============ FOOTER COLLAPSE TOGGLE ============ */
.pg-sb-toggle {
  width: 22px;
  height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  color: #777;
  border: 1px solid transparent;
  border-radius: 3px;
  cursor: pointer;
  padding: 0;
  font-size: 12px;
  margin-right: 6px;
  transition: color 120ms ease, background 120ms ease, transform 200ms ease;
}

.pg-sb-toggle:hover {
  color: var(--accent);
  background: var(--accent-dim);
}

/* When the footer is collapsed, rotate the caret 180° so it points up. */
body.pg-footer-collapsed .pg-sb-toggle i {
  transform: rotate(180deg);
  display: inline-block;
}

/* Collapsed layout: zero out the resize handle + footer rows, hide them. */
body.pg-footer-collapsed .pg-app {
  grid-template-rows: 52px 1fr 0 0 44px;
}

/* visibility:hidden + zeroed row heights → footer disappears visually but
   keeps its grid slot, so .pg-statusbar (auto-placed) stays in row 5
   instead of sliding up into a 0-height row. */
body.pg-footer-collapsed .pg-resize-v,
body.pg-footer-collapsed .pg-footer {
  visibility: hidden;
  overflow: hidden;
}

/* ============ STUDIO PREVIEW PANE (top of drawer) ============ */
#pg-props-drawer {
  display: flex;
  flex-direction: column;
}

.pg-props-preview {
  flex-shrink: 0;
  height: 200px;
  background: radial-gradient(circle at 1px 1px, #1a1a1a 1px, transparent 1px) 0 0/14px 14px, #0d0d0d;
  border-bottom: 1px solid #222;
  position: relative;
}

.pg-props-preview-frame {
  width: 100%;
  height: 100%;
  border: 0;
  background: transparent;
  display: block;
}

#pg-props-body {
  padding: 16px 18px;
  flex: 1 1 auto;
  overflow: auto;
}

/* ============ TOPBAR — STACKED BUTTONS + MORE MENU ============ */
.pg-btn-stack {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  height: 44px;
  padding: 0 12px;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 4px;
  color: #888;
  cursor: pointer;
  transition: color 120ms ease, background 120ms ease, border-color 120ms ease;
}

.pg-btn-stack i {
  font-size: 17px;
  line-height: 1;
}

.pg-btn-stack span {
  font-family: "Inter", system-ui, sans-serif;
  font-size: 9.5px;
  letter-spacing: 0.06em;
  line-height: 1;
  text-transform: uppercase;
}

.pg-btn-stack:hover {
  color: var(--accent);
  background: var(--accent-dim);
  border-color: var(--accent-border);
}

/* More-actions dropdown */
.pg-menu {
  position: relative;
}

.pg-menu-trigger {
  height: 30px;
}

.pg-menu-panel {
  position: absolute;
  top: calc(100% + 4px);
  right: 0;
  min-width: 180px;
  background: #161616;
  border: 1px solid #2a2a2a;
  border-radius: 4px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.55);
  padding: 4px;
  display: none;
  z-index: 9000;
}

.pg-menu.is-open .pg-menu-panel {
  display: block;
}

.pg-menu-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  height: 32px;
  padding: 0 10px;
  background: transparent;
  border: 0;
  border-radius: 3px;
  color: #c9d1d9;
  font-family: "Inter", system-ui, sans-serif;
  font-size: 13px;
  text-align: left;
  cursor: pointer;
  transition: background 100ms ease, color 100ms ease;
}

.pg-menu-item i {
  font-size: 15px;
  color: #888;
  transition: color 100ms ease;
}

.pg-menu-item:hover {
  background: var(--accent-dim);
  color: var(--accent);
}

.pg-menu-item:hover i {
  color: var(--accent);
}

/* ============ DRAWER TABS (right-side, stacked at different tops) ============ */
.pg-drawer-tab {
  position: absolute;
  left: -28px;
  width: 28px;
  height: 48px;
  display: none;
  align-items: center;
  justify-content: center;
  background: #161616;
  border: 1px solid #2a2a2a;
  border-right: 0;
  border-radius: 6px 0 0 6px;
  color: #888;
  font-size: 16px;
  cursor: pointer;
  padding: 0;
  box-shadow: -4px 0 12px rgba(0, 0, 0, 0.35);
  transition: color 120ms ease, background 120ms ease;
}

/* Tab only visible when its drawer is open — so it doesn't peek when closed. */
.pg-drawer.is-open .pg-drawer-tab {
  display: flex;
}

.pg-drawer-tab:hover {
  color: var(--accent);
  background: var(--accent-dim);
}

/* ============ WORKSPACE MULTIPANE ============ */
.pg-workspace-bar {
  display: flex;
  align-items: stretch;
  height: 32px;
  flex: 0 0 auto;
  background: #080808;
  border-bottom: 1px solid #2a2a2a;
  overflow: hidden;
}

.pg-ws-tabs {
  display: flex;
  align-items: stretch;
  flex: 1 1 auto;
  min-width: 0;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
}

.pg-ws-tabs::-webkit-scrollbar {
  height: 0;
}

.pg-ws-tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 180px;
  padding: 0 8px 0 12px;
  border: 0;
  border-right: 1px solid #2a2a2a;
  background: transparent;
  color: #888;
  font-family: "Inter", system-ui, -apple-system, sans-serif;
  font-size: 12px;
  white-space: nowrap;
  cursor: pointer;
  position: relative;
  transition: color 0.15s, background 0.15s;
}

.pg-ws-tab:hover {
  color: #e8e8e8;
  background: #1e1e1e;
}

.pg-ws-tab.is-active {
  color: var(--accent);
  background: #161616;
}

.pg-ws-tab.is-active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 2px;
  background: var(--accent);
}

.pg-ws-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pg-ws-name-input {
  width: 110px;
  padding: 1px 4px;
  background: #0a0a0a;
  border: 1px solid var(--accent-border);
  border-radius: 6px;
  color: #e8e8e8;
  font-family: "Inter", system-ui, -apple-system, sans-serif;
  font-size: 12px;
  outline: none;
}

.pg-ws-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #555;
  font-size: 11px;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.15s, color 0.15s, background 0.15s;
}

.pg-ws-tab:hover .pg-ws-close,
.pg-ws-tab.is-active .pg-ws-close {
  opacity: 1;
}

.pg-ws-close:hover {
  color: #ff4d6d;
  background: #3d0a16;
}

.pg-ws-add {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  flex: 0 0 auto;
  border: 0;
  border-left: 1px solid #2a2a2a;
  background: transparent;
  color: #888;
  font-size: 13px;
  cursor: pointer;
  transition: color 0.15s, background 0.15s;
}

.pg-ws-add:hover {
  color: var(--accent);
  background: #1e1e1e;
}

/* ============ UPDATES / WHAT'S NEW ============ */
/* Badge on the ⋮ trigger (alert) */
.pg-menu-trigger {
  position: relative;
}

.pg-menu-badge {
  position: absolute;
  top: 1px;
  right: 1px;
  min-width: 14px;
  height: 14px;
  padding: 0 4px;
  border-radius: 7px;
  background: var(--accent);
  color: #0a0a0a;
  font-family: "Inter", system-ui, -apple-system, sans-serif;
  font-size: 9px;
  font-weight: 700;
  line-height: 1;
  display: none;
  align-items: center;
  justify-content: center;
}

.pg-menu-badge.is-on {
  display: inline-flex;
}

/* Count badge next to the "What's new" menu item */
.pg-menu-item-badge {
  margin-left: auto;
  min-width: 16px;
  height: 16px;
  padding: 0 5px;
  border-radius: 8px;
  background: var(--accent);
  color: #0a0a0a;
  font-family: "Inter", system-ui, -apple-system, sans-serif;
  font-size: 10px;
  font-weight: 700;
  line-height: 1;
  display: none;
  align-items: center;
  justify-content: center;
}

.pg-menu-item-badge.is-on {
  display: inline-flex;
}

/* Panel rows */
.pg-upd-empty {
  padding: 20px 16px;
  color: #555;
  font-family: "Inter", system-ui, -apple-system, sans-serif;
  font-size: 13px;
}

.pg-upd-row {
  padding: 12px 16px;
  border-bottom: 1px solid #1e1e1e;
  font-family: "Inter", system-ui, -apple-system, sans-serif;
}

.pg-upd-row.is-new {
  background: var(--accent-a06);
  border-left: 2px solid var(--accent);
  padding-left: 14px;
}

.pg-upd-line1 {
  display: flex;
  align-items: center;
  gap: 8px;
}

.pg-upd-tag {
  flex: 0 0 auto;
  padding: 2px 6px;
  border-radius: 4px;
  background: #1e1e1e;
  color: #888;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.pg-upd-tag-component {
  color: var(--accent);
  background: var(--accent-a08);
}

.pg-upd-tag-feature {
  color: #6cb6ff;
  background: rgba(108, 182, 255, 0.12);
}

.pg-upd-tag-tooling {
  color: #b392f0;
  background: rgba(179, 146, 240, 0.12);
}

.pg-upd-title {
  color: #e8e8e8;
  font-size: 13px;
  font-weight: 600;
}

.pg-upd-new {
  flex: 0 0 auto;
  padding: 1px 5px;
  border-radius: 4px;
  background: var(--accent);
  color: #0a0a0a;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.pg-upd-date {
  margin-left: auto;
  flex: 0 0 auto;
  color: #555;
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}

.pg-upd-text {
  margin-top: 4px;
  color: #b0b0b0;
  font-size: 12px;
  line-height: 1.5;
}
