/* ==========================================================================
   Brand configuration — the Customer brand colour and logo (Requirement 6
   criterion 7).

   This is NOT part of the Token_Manifest and it is not source. It is the
   portal's brand configuration, and it lives under `public/` because Vite
   copies that directory verbatim: no bundling, no hashing, no rewriting. So
   onboarding a Customer is an edit to this file and to `brand/logo.svg`
   beside it, applied to a deployed bundle, rather than a rebuild.

   That is also why criterion 7 is met by a stylesheet rather than by a
   configuration document fetched at runtime: Requirement 1 criterion 8 fixes
   the build-time environment variables at four, and Requirement 18 criterion 11
   permits no `connect-src` target beyond the Admin_Backend_API and
   Identity_Provider origins. A stylesheet is governed by `style-src 'self'` and
   ships from the portal's own origin, so this route costs nothing in policy.

   It declares exactly two names and MUST declare nothing else. Every other
   colour, radius, spacing, typographic and layout value belongs in
   `src/styles/tokens.css`, which Requirement 6 criteria 1 and 3 make the single
   place such a value is written. A third declaration appearing here is a value
   that has escaped the manifest.

   ------------------------------------------------------------------------
   WHY THE SELECTOR IS `:root:root` AND NOT `:root` — do not "tidy" this
   ------------------------------------------------------------------------

   The override has to beat the same two names declared in the manifest. It
   cannot do that on document order, and the reason is a fact about the build
   rather than a preference:

     Vite folds every SOURCE stylesheet into the entry chunk's CSS asset and
     injects that asset's `<link>` at the head close tag — after every
     hand-written element in `index.html`. It does this whether the manifest
     arrives as a `src/main.tsx` import or as a hand-written
     `<link href="/src/styles/tokens.css">`, and in the second case it deletes
     the hand-written link and emits the bundle link at the injection point
     instead. Verified against `dist/index.html`, not assumed.

     So a `public/` stylesheet linked from `index.html` is always cascaded
     BEFORE the manifest, whatever order it is written in. Ordering the two
     links "manifest, then brand" reads correctly in the source document and
     produces the exact opposite in the built one, where a browser would have
     the manifest overriding the configuration meant to override it.

   Specificity is settled before order of appearance, so raising it takes the
   question away from the build entirely. `:root:root` matches the same single
   element as `:root` — it is one compound selector, not a descendant
   combinator — and scores (0,2,0) against the manifest's (0,1,0). It therefore
   wins from anywhere in the document, and keeps winning if the manifest moves
   back into the JS graph, if Vite changes where it injects, or if a stylesheet
   is added ahead of this one at the edge.

   `!important` would also win and is the wrong tool: it beats a future
   `!important` in neither direction predictably, and it would defeat any
   legitimate later override rather than merely outranking the fallback.

   `src/__tests__/unit/brandOverride.test.ts` fails if this selector is reduced
   to a bare `:root`, so the mechanism is pinned rather than left to this
   comment being read.

   ------------------------------------------------------------------------

   Both names still carry a real value in the manifest, which is what makes this
   file OPTIONAL rather than required. Absent, empty, or declaring only one of
   the two, the manifest's fallback stands for whatever this file does not say —
   there is no name here that only this file supplies.

   The values below are the placeholder brand, identical to the manifest's
   fallbacks. That is deliberate: shipping a different colour here would make
   the default appearance depend on a file a deployment is expected to replace.
   ========================================================================== */

:root:root {
  /* The Portal_Sidebar background under both values of Portal_Theme, which is
     what holds the sidebar's appearance constant across a theme change
     (Requirement 6 criterion 7). Applied in
     `src/shared/components/PortalSidebar.css`. */
  --brand-colour: #004b8d;

  /* An absolute, root-relative URL, and it must stay one. This file is not
     processed by Vite, so nothing rewrites the path: it is resolved by the
     browser against the document, and the asset is served from `public/brand/`
     at exactly this path. A relative `url('brand/logo.svg')` would resolve
     against this stylesheet's own URL and happen to work from the portal root
     while breaking anywhere the bundle is served from a sub-path. */
  --brand-logo: url('/pacific-national.png');
}
