/* PVG Signature: shared by the page illustrations and application shadow roots. */
:root, :host {
  --pvg-window-paper: #101612;
  --pvg-window-bar: #1c2920;
  --pvg-window-border: #4a5d50;
  --pvg-window-line: #2e3c33;
  --pvg-window-ink: #e8f5ec;
  --pvg-window-muted: #a3bdb0;
  --pvg-window-accent: #4ade80;
  --pvg-window-control: #3b463f;
  --pvg-window-shadow: 0 14px 28px #0008, 0 2px 5px #0006;
  --pvg-window-bar-height: 40px;
  --pvg-window-status-height: 28px;
}

:root[data-theme="light"], :host([data-theme="light"]) {
  --pvg-window-paper: #ffffff;
  --pvg-window-bar: #eef5f0;
  --pvg-window-border: #aebeb3;
  --pvg-window-line: #dbe5df;
  --pvg-window-ink: #17251c;
  --pvg-window-muted: #53685b;
  --pvg-window-accent: #197343;
  --pvg-window-control: #dce3de;
  --pvg-window-shadow: 0 12px 24px #163a2426, 0 2px 5px #163a2417;
}

.pvg-window {
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
  overflow: hidden;
  border: 1px solid var(--pvg-window-border);
  border-radius: 7px;
  background: var(--pvg-window-paper);
  color: var(--pvg-window-ink);
  box-shadow: var(--pvg-window-shadow);
  text-shadow: none;
}

.pvg-window-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex: 0 0 var(--pvg-window-bar-height);
  min-width: 0;
  gap: 8px;
  padding: 0 10px;
  border-bottom: 1px solid var(--pvg-window-line);
  background: var(--pvg-window-bar);
}

.pvg-window-title {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: 8px;
  font: 400 12px/1.3 var(--font-mono, 'Courier New', monospace);
}

.pvg-window-title b, .pvg-window-title strong {
  overflow: hidden;
  font: inherit;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.pvg-window-icon {
  display: flex;
  align-items: center;
  flex: 0 0 auto;
  padding-left: 7px;
  border-left: 2px solid var(--pvg-window-accent);
}

.pvg-window-icon > img { width: 19px; height: 23px; object-fit: contain; }

/* Window controls are decorative: these are presentation illustrations. */
.pvg-window-controls { display: flex; align-items: center; gap: 3px; flex: 0 0 auto; }
.pvg-window-controls span {
  display: grid;
  place-items: center;
  width: 23px;
  height: 23px;
  font: 17px/1 system-ui, sans-serif;
  color: var(--pvg-window-ink);
}
.pvg-window-controls span:nth-child(2) { font-size: 15px; }
.pvg-window-controls span:last-child { border-radius: 3px; background: var(--pvg-window-control); }

.pvg-window-status {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex: 0 0 var(--pvg-window-status-height);
  min-width: 0;
  gap: 10px;
  padding: 0 12px;
  border-top: 1px solid var(--pvg-window-line);
  color: var(--pvg-window-muted);
  font: 400 10px/1.3 var(--font-mono, 'Courier New', monospace);
}
.pvg-window-status > span { display: flex; align-items: center; gap: 6px; min-width: 0; }
.pvg-window-status i { display: block; width: 5px; height: 5px; flex: 0 0 auto; border-radius: 50%; background: var(--pvg-window-accent); }
.pvg-window-status small { font: inherit; text-align: right; }

@media (max-width: 420px) {
  .pvg-window-bar { padding: 0 8px; }
  .pvg-window-title { font-size: 11px; gap: 6px; }
  .pvg-window-status { padding: 0 9px; font-size: 9px; }
}
