/* Allies is the shared outer frame for every signed-in navigation surface. */
:root {
  --workspace-gutter:12px;
  --workspace-radius:17px;
  --workspace-shadow:0 2px 7px rgba(30,38,34,.035);
}

/* Sidebars stay in the shell; the content surface meets the navigation. */
#app > :is(.work-workspace,.dashboards-workspace),
alliance-allies > .al-workspace {
  height:calc(100dvh - var(--topbar-height));
  padding:0 var(--workspace-gutter) var(--workspace-gutter) 0;
  margin:0;
  background:var(--shell-surface);
}
#app > :is(.work-workspace,.dashboards-workspace) > section,
alliance-allies .al-surface {
  border:1px solid var(--line-strong);
  border-radius:var(--workspace-radius);
  background:var(--paper);
  box-shadow:var(--workspace-shadow);
}

/* Pages without a sidebar use the same frame with an equal side gutter. */
#app > :is(.company-home,.getting-started,.composed-workspace,.allies-page,.agent-studio) {
  width:calc(100% - 2 * var(--workspace-gutter));
  height:calc(100dvh - var(--topbar-height) - var(--workspace-gutter));
  min-height:0;
  margin:0 var(--workspace-gutter) var(--workspace-gutter);
  border:1px solid var(--line-strong);
  border-radius:var(--workspace-radius);
  background:var(--paper);
  box-shadow:var(--workspace-shadow);
}

/* Older list/detail routes keep their panel structure and share the alignment. */
#app > .workspace {
  width:calc(100% - 2 * var(--workspace-gutter));
  height:calc(100dvh - var(--topbar-height) - var(--workspace-gutter));
  margin:0 var(--workspace-gutter) var(--workspace-gutter);
  gap:var(--workspace-gutter);
}
#app > .workspace > :is(.feed-panel,.rail-panel) {
  border:1px solid var(--line-strong);
  border-radius:var(--workspace-radius);
  background:var(--paper);
  box-shadow:var(--workspace-shadow);
}

/* First-visit Home has a saved-Views strip above the orientation content. */
#app:has(> .home-pins-onboarding) { display:flex; flex-direction:column; }
#app:has(> .home-pins-onboarding) > .topbar { flex-shrink:0; }
#app > .home-pins-onboarding { max-height:30dvh; flex-shrink:0; overflow:auto; }
#app:has(> .home-pins-onboarding) > .getting-started { flex:1; height:auto; }

@media(max-width:700px) { :root { --workspace-gutter:6px; } }
