/* The frame around the dashboard: a browser window on a white page, the app's collapsed sidebar
   down its left edge and the artifact toolbar floating at its foot. The frame is drawn only
   while <body> has class="framed"; without it the page is the bare dashboard. (Its own pieces,
   .window-*, .rail-*, .toolbar and .frame-icon, are named so they cannot meet the dashboard's.) */

/* Bare: the frame's wrappers vanish and its furniture is hidden. */
.stage, .window, .window-body, .window-view { display: contents; }
.window-bar, .rail, .toolbar { display: none; }

/* ---------- Framed ---------- */
.framed {
	background: #fff;
	/* The window is drawn at full size (so the dashboard keeps its exact layout) and scaled down
	   to sit on the page. 0.82 puts a 1604px window at about 1315px. */
	--window-width: 1604px;
	--window-height: 1008px;
	--window-zoom: 0.82;
	--rail-width: 80px;
}
.framed .stage { display: flex; justify-content: center; padding: 120px 48px 200px; }
.framed .window {
	display: flex; flex-direction: column; flex: none;
	width: var(--window-width); height: var(--window-height); zoom: var(--window-zoom);
	overflow: hidden; border-radius: 14px; background: var(--background);
	/* the site's hero window: a hairline ring, then a stack of soft shadows that read as depth */
	box-shadow:
		0 0 0 1px color-mix(in oklab, var(--foreground) 14%, transparent),
		0 1px 4px rgb(0 0 0 / 0.02),
		0 3px 8px rgb(0 0 0 / 0.03),
		0 7px 15px rgb(0 0 0 / 0.04),
		0 14px 28px rgb(0 0 0 / 0.05),
		0 24px 52px rgb(0 0 0 / 0.06),
		0 36px 90px rgb(0 0 0 / 0.08);
}

/* Top bar: three quiet dots and the workspace / artifact name, as on the site's hero windows. */
.framed .window-bar { display: flex; flex: none; align-items: center; gap: 14px; height: 44px; padding: 0 18px; border-bottom: 1px solid var(--border); background: color-mix(in oklab, var(--muted) 45%, var(--background)); }
.framed .window.no-bar .window-bar { display: none; }
.window-dots { display: flex; gap: 7px; }
.window-dots i { width: 11px; height: 11px; border-radius: 9999px; background: color-mix(in oklab, var(--foreground) 15%, transparent); }
.window-title { display: flex; align-items: center; gap: 7px; font-size: 13px; line-height: 1; color: var(--muted-foreground); }
.window-title img { width: 15px; height: 15px; }
.window-title .slash { opacity: 0.5; }
.window-title strong { font-weight: 500; color: var(--foreground); }

.framed .window-body { display: flex; position: relative; flex: 1; min-height: 0; }
/* The dashboard scrolls inside the window (no scrollbar drawn), so any part of it can be framed. */
.framed .window-view { display: block; flex: 1; min-width: 0; height: 100%; overflow-y: auto; scrollbar-width: none; }
.framed .window-view::-webkit-scrollbar { display: none; }

/* Collapsed sidebar: the logo, New chat, Infolake, Artifacts, AI Connect. It shares the
   dashboard's background, with no divider, so it reads as part of the same surface. */
.framed .rail { display: flex; flex-direction: column; align-items: center; gap: 46px; flex: none; width: var(--rail-width); padding: 28px 0 0 18px; color: var(--muted-foreground); }
.rail-logo { width: 42px; height: 42px; margin-bottom: -6px; }
.rail-item { display: flex; align-items: center; justify-content: center; width: 32px; height: 32px; }
.frame-icon { width: 28px; height: 28px; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
.rail-new { border-radius: 9999px; background: var(--foreground); color: var(--background); }
.rail-new .frame-icon { width: 20px; height: 20px; stroke-width: 3; }

/* Artifact toolbar: theme, edit, print, refresh. */
.framed .toolbar { display: flex; gap: 6px; position: absolute; left: calc(var(--rail-width) + (100% - var(--rail-width)) / 2); bottom: 16px; z-index: 1; translate: -50% 0; padding: 7px; border-radius: 16px; background: var(--card); color: var(--foreground); box-shadow: 0 0 0 1px color-mix(in oklab, var(--foreground) 6%, transparent), 0 4px 16px rgb(0 0 0 / 0.1), 0 1px 3px rgb(0 0 0 / 0.08); }
.toolbar span { display: flex; align-items: center; justify-content: center; width: 38px; height: 38px; border-radius: 10px; }
.toolbar .frame-icon { width: 20px; height: 20px; }

/* ---------- Embedded: the page is shown inside another page (the website's hero) ----------
   Set class="embed" on <html>. The window fills the frame it is given, edge to edge, with no
   top bar, shadow or corners: the page that embeds it draws those, at whatever size it likes,
   and scales the whole frame. Give the frame the window's own size (--window-width by
   --window-height) so the dashboard lays out exactly as it does here. That page also puts
   `inert` on this one's <body> and owns playback (kit/motion.js, start). */
.embed .framed { background: var(--background); }
.embed .framed .stage { display: block; padding: 0; }
.embed .framed .window { width: 100vw; height: 100vh; zoom: 1; border-radius: 0; box-shadow: none; }
.embed .framed .window-bar { display: none; }
