/* Cascade order is declared, not implied by import position.

   This file used to be a hand-ordered list of 25 imports that interleaved the
   ui-kit, core and proxy, with a comment warning nobody to reorder it: two
   rules of equal specificity resolved by which file happened to be imported
   first, so mobile.css had to stay last for its overrides to win. That made
   every stylesheet's position load-bearing and undocumented.

   @layer replaces that with an explicit precedence. Later layers beat earlier
   ones regardless of specificity or position, so `product` always beats
   `components`, and `overrides` always wins. Files inside a layer can now be
   ordered for readability instead of for the cascade.

   One rule this imposes: an unlayered style beats every layered one. Keep new
   CSS inside a layer, or it silently outranks the whole system. */
@layer tokens, base, components, app, product, overrides;

/* The kit: tokens, base and every class a cb-* element emits. */
@import "/ui-kit/styles/index.css";

/* This application's own chrome. */
@import "components/layout.css" layer(app);
@import "components/workspace.css" layer(app);
@import "components/settings.css" layer(app);
@import "components/system-info.css" layer(app);
@import "components/users.css" layer(app);
@import "components/developer.css" layer(app);
@import "components/vpn-pilot.css" layer(app);
@import "components/misc.css" layer(app);

/* Proxy's workspaces. These ship to every product today — splitting them per
   surface is the next step, and the layer boundary is what makes it safe. */
@import "/proxy-web/styles/providers.css" layer(product);
@import "/proxy-web/styles/geo-analytics.css" layer(product);
@import "/proxy-web/styles/heatmaps.css" layer(product);
@import "/proxy-web/styles/workers-cards.css" layer(product);
@import "/proxy-web/styles/locations.css" layer(product);
@import "/proxy-web/styles/portal.css" layer(product);
@import "/proxy-web/styles/subscriptions.css" layer(product);

/* Small-screen adjustments across everything above. This had to be the last
   import in the old file for its overrides to win; now it says so. */
@import "components/mobile.css" layer(overrides);
