/* The title bar: one row, fixed height, every slot a fixed or shared track so nothing in it moves when the host name or the agent's state changes length. */ * { box-sizing: border-box; } html, body { margin: 0; height: var(--titlebar-h); overflow: hidden; background: var(--bg); color: var(--ink); user-select: none; -webkit-user-select: none; cursor: default; } .bar { display: grid; /* leaf · name · host (takes the rest, and is the drag area) · agent · menu · sep · 3 controls */ grid-template-columns: var(--titlebar-h) auto minmax(0, 1fr) auto var(--titlebar-h) 1px repeat(3, 2.875rem); align-items: center; height: var(--titlebar-h); border-bottom: 1px solid var(--border); font: 600 var(--text-sm) / 1 var(--font-ui); } .bar__leaf { justify-self: center; width: 18px; height: 18px; image-rendering: pixelated; } .bar__name b { color: var(--leaf); font-weight: 700; } .bar__host { padding: 0 var(--sp-3); color: var(--ink-muted); font-weight: 400; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; align-self: stretch; display: flex; align-items: center; } button { height: var(--titlebar-h); margin: 0; padding: 0; font: inherit; color: var(--ink-muted); background: transparent; border: 0; border-radius: 0; cursor: pointer; } button:hover { color: var(--ink); background: var(--surface-hover); } button:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; } .bar__agent { display: grid; grid-template-columns: 0.5rem auto; gap: var(--sp-2); align-items: center; padding: 0 var(--sp-3); font-weight: 400; } .dot { width: 0.5rem; height: 0.5rem; background: var(--ink-muted); } .bar__agent[data-state="running"] .dot, .bar__agent[data-state="elsewhere"] .dot { background: var(--leaf); } .bar__agent[data-state="starting"] .dot { background: var(--accent); } .bar__agent[data-state="failed"] .dot, .bar__agent[data-state="not_linked"] .dot { background: var(--warning); } .bar__sep { width: 1px; height: 1.25rem; background: var(--border); } .bar__btn { display: grid; place-items: center; } .bar__btn svg { width: 16px; height: 16px; } .bar__btn--close:hover { color: #fff; background: var(--danger); } #maximize .i-restore { display: none; } #maximize[data-maximized] .i-max { display: none; } #maximize[data-maximized] .i-restore { display: block; } /* Narrow windows: the host goes first, then the agent's words (its dot stays). */ @media (max-width: 34rem) { .bar__host { visibility: hidden; } #agent-text { display: none; } }