/* The loading surface has the saved theme before the authenticated shell mounts. */
html[data-portal-theme=dark] { background:#090f22;color-scheme:dark; }
html[data-portal-theme=dark] body:not(.portal-workspace) { background:#090f22;color:#ecf0ff; }
html[data-portal-theme=dark] body:not(.portal-workspace)>.header { background:#0c1429;border-color:#293754; }
html[data-portal-theme=dark] body:not(.portal-workspace)>.header .brand>svg { filter:brightness(0) invert(1); }
html[data-portal-theme=dark] body:not(.portal-workspace) :is(.header nav a,footer a) { color:#c5a5ff; }
html[data-portal-theme=dark] body:not(.portal-workspace) :is(#main,.panel,footer) { background:#090f22;color:#ecf0ff;border-color:#293754; }

/* Private pages keep the public menu out of the authentication/loading frame. */
html[data-portal-theme] body:not(.portal-workspace)>.header nav { visibility:hidden; }

/* Apply the authenticated frame at once; an initial margin animation reveals the old layout. */
body.portal-workspace>#main,body.portal-workspace>footer,body.portal-workspace>#message{transition:none}
