/* Terminal window frame shared by every Terabyte Development page.
   Draws a fixed "zsh window" around the viewport; each page keeps its own design inside it. */
:root {
  --tf-gut: 16px;
  --tf-bar: 36px;
  --tf-desk: #0d0d0d; --tf-bar-bg: #2a2a2a; --tf-border: #3a3a3a; --tf-muted: #949494; --tf-accent: #00d4ff;
}
html[data-theme="light"], html[data-term="light"] {
  --tf-desk: #dcdcd6; --tf-bar-bg: #e8e8e3; --tf-border: #cfcfc8; --tf-muted: #58585a; --tf-accent: #006f94;
}
html { scroll-padding-top: calc(var(--tf-gut) + var(--tf-bar) + 12px); }
html body {
  margin: calc(var(--tf-gut) + var(--tf-bar) + 1px) calc(var(--tf-gut) + 1px) calc(var(--tf-gut) + 1px);
  min-height: calc(100vh - 2 * var(--tf-gut) - var(--tf-bar) - 3px);
}
/* fixed/sticky navs sit just under the title bar, inside the window */
html body > nav:not(.nav) { top: calc(var(--tf-gut) + var(--tf-bar) + 1px); left: calc(var(--tf-gut) + 1px); right: calc(var(--tf-gut) + 1px); }
html body > nav.nav { top: calc(var(--tf-gut) + var(--tf-bar) + 1px); }

.tframe-edge {
  position: fixed; inset: var(--tf-gut); z-index: 1000; pointer-events: none;
  border: 1px solid var(--tf-border); border-radius: 12px;
  box-shadow: 0 0 0 100vmax var(--tf-desk);
}
.tframe-bar {
  position: fixed; top: var(--tf-gut); left: var(--tf-gut); right: var(--tf-gut); height: calc(var(--tf-bar) + 1px);
  z-index: 1001; box-sizing: border-box; pointer-events: none;
  display: flex; align-items: center; gap: 16px; padding: 0 16px;
  background: var(--tf-bar-bg); border: 1px solid var(--tf-border); border-radius: 12px 12px 0 0;
  font: 400 12px/1 'Space Mono', ui-monospace, Menlo, Consolas, monospace; color: var(--tf-muted);
}
.tframe-dots { display: flex; gap: 8px; flex: none; }
.tframe-dots i { width: 12px; height: 12px; border-radius: 50%; display: block; }
.tframe-dots i:nth-child(1) { background: #ff5f57; }
.tframe-dots i:nth-child(2) { background: #febc2e; }
.tframe-dots i:nth-child(3) { background: #28c840; }
.tframe-title { flex: 1; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tframe-spacer { width: 52px; flex: none; }

@media (max-width: 640px) {
  :root { --tf-gut: 0px; }
  html body { margin-left: 0; margin-right: 0; margin-bottom: 0; }
  .tframe-edge { border-radius: 0; border-width: 0; }
  .tframe-bar { border-radius: 0; border-width: 0 0 1px; }
  html body > nav:not(.nav) { left: 0; right: 0; }
  .tframe-spacer { display: none; }
}
