/* ============================================================================
   SLM.Layers.css -- single cascade-layer entry point (CssArchitectureDesign.md #651)
   ----------------------------------------------------------------------------
   PHASE 1 (introduce layers, MOVE NO RULES):
   - Declares the TARGET layer order once. Later layers beat earlier layers
     regardless of specificity -- this is what removes the need for !important
     and makes the cascade intentional instead of dependent on <link> order.
   - Imports EVERY global sheet (vendor + app) in the EXACT order they were
     linked in App.razor, and -- for now -- places them ALL in ONE layer
     (`components`). One populated layer in source order == byte-for-byte the
     same cascade as today, so Phase 1 is provably zero-diff against the
     visual-regression baselines.
   - Because there is no Blazor scoped-style bundle linked (SLM.App.styles.css
     is absent from App.razor), nothing remains unlayered to out-rank these
     layers -- so the equivalence holds.

   PHASE 2 (DONE, S232): SLM.Mobile.css now imports into layer(overrides) -- it
   wins over every components-layer rule by LAYER ORDER, not source order, so the
   redundant !important (those that only fought earlier-layer/global desktop rules)
   were deleted. The !important that REMAIN in SLM.Mobile.css are justified: they
   beat INLINE style="" attributes (home panel flex, calendar month-label flex-wrap,
   legacy/V3 dialog position+width, FormSet field widths) -- @layer does NOT out-rank
   inline styles, so only !important can. See SLM.Mobile.css header for the policy.

   LATER PHASES redistribute the remaining imports into their semantic layers and
   verify each move against the baselines:
   - Phase 3 (DONE, S232): SLM.ThemeV2.css -> theme layer so its --slm-*->--v2-*
     mapping beats SLM.css's hardcoded theme blocks (token convergence onto the V2
     palette). SLM.css's overlapping --slm-* theme tokens are now dead/overridden.
   - Phase 4: per-component skin/structure split + de-globalization; later, split
     ThemeV2 so --v2-* primitives live in the `tokens` layer and only the skin
     overrides stay in `theme` (after SLM.css's theme blocks are retired).

   NOTE: inner @import paths are root-absolute (not @Assets-fingerprinted). The
   master file itself is fingerprinted via @Assets in App.razor; per-file
   cache-busting is reduced -- revisit if it becomes a problem.
   ============================================================================ */

@layer reset, tokens, base, layout, components, utilities, theme, overrides;

/* --- Order preserved exactly as previously linked in App.razor (lines 39-67) --- */
@import url("/Axialis/ltSLMicons-stylesheet.css") layer(components);
@import url("/css/app.css") layer(components);
@import url("/css/SLM.css") layer(components);
@import url("/css/SLMDForm.css") layer(components);
@import url("/css/SLMDialogShared.css") layer(components);
@import url("/css/SLMDiagram.css") layer(components);
@import url("/css/SLMCalendar.css") layer(components);
@import url("/lib/quill/quill.snow.css") layer(components);
@import url("/css/SLMFieldV3.css") layer(components);
/* #651 Phase 3 (S232): ThemeV2 is the CANONICAL semantic skin -> theme layer.
   Because theme beats components, ThemeV2's `--slm-* : var(--v2-*)` mapping now
   out-ranks SLM.css's hardcoded body.slm-theme-light/dark blocks, so the legacy
   --slm-* tokens converge onto the V2 palette AND stay theme-aware via --v2-*.
   (Intentional color refresh -- baselines re-captured. --v2-* itself is defined
   only here, so the layer it lives in does not change its own resolution.) */
@import url("/css/v2/SLM.ThemeV2.css") layer(theme);
@import url("/css/v2/SLM.FieldsMenuV2.css") layer(components);
@import url("/css/v2/SLM.MenuV2.css") layer(components);
@import url("/css/v2/SLM.ColSetEditV3.css") layer(components);
@import url("/css/v2/SLMDFormV3.css") layer(components);
@import url("/css/v2/SLMDGridV3.css") layer(components);
@import url("/css/v2/SLM.FormSetEditV3.css") layer(components);
@import url("/css/SLMMessages.css") layer(components);
@import url("/css/SLMDialog.css") layer(components);
@import url("/css/SLMToolbar.css") layer(components);
/* sam.css kept global -- styles shared across 4 Sam pages
   (SamHomePage/SamResumePage/SamContactPage/SamE64Page).
   Migrate when a SamLayout component is introduced. */
@import url("/css/sam.css") layer(components);
/* SLMEmailViewer.css -> EmailViewerPage.razor.css (#651 P4, S233) */
/* SLMDocumentViewer.css -> DocumentViewerPage.razor.css (#651 P4, S233) */
@import url("/css/SLM.Mobile.css") layer(overrides);
@import url("/css/guide.css") layer(components);
/* recipe.css -> RecipeBrowserPage.razor.css + RecipeEditorPage.razor.css (#651 P4, S233) */
/* SLMIdeas.css -> IdeasPage.razor.css (#651 P4, S233) */
/* SLMDocsReader.css -> DocsReaderPage.razor.css (#651 P4, S233) */
@import url("/css/SLMDiagBorders.css") layer(components);
@import url("/css/SLMWizard.css") layer(components);
