/**
 * Moderaterna brand theme.
 *
 * Pure :root token overrides for real Stella tokens defined in
 * client/src/styles/tokens.css and consumed via var(--token, fallback)
 * in client/src/styles/shell.css and client/src/utils/brandPalette.ts.
 *
 * NO component selectors. NO !important. Colours and font families only.
 * Loaded at runtime via /branding/theme.css (Express static mount).
 *
 * Palette source: /tmp/moderaterna-ui-ref/01-colors.md,
 *                 /tmp/moderaterna-ui-ref/assets/moderaterna-theme.css
 * Typography source: /tmp/moderaterna-ui-ref/02-typography.md
 */
:root {
  /* ── Brand palette ── */
  /* tokens.css:30-35 — canonical brand tokens used on all actionable surfaces */
  --brand-primary:         #213A8F;   /* Moderaterna Navy — headings, buttons, focus rings  */
  --brand-primary-hover:   #18306F;   /* Navy hover — deeper navy for button hover state    */
  --brand-primary-muted:   rgba(33, 58, 143, 0.10); /* Navy tint — chip/hover surfaces     */
  --brand-accent:          #93D5F6;   /* Sky-blue — dot indicators, active-on-dark, pills  */
  --brand-destructive:     #982533;   /* Unchanged — coral-red, not a brand colour         */
  --brand-destructive-hover: #7a1d29; /* Unchanged                                         */

  /* ── Loading bar and PWA theme-color ── */
  /* tokens.css:37-39 — overridable per customer via branding/theme.css */
  --loading-bar-color:       #93D5F6; /* Sky-blue loading bar matches brand accent          */
  --brand-meta-theme-color:  #213A8F; /* Navy PWA theme-color for mobile chrome             */

  /* ── Font families ── */
  /* tokens.css:41-44 — overridable per customer via branding/theme.css.
     shell.css consumes these via var(--font-family-display/body/mono, fallback)
     at lines 342, 362, 453, 497, 570, 656, 695, 712, 733, 744, 917, 941 etc.
     Inter is the single type family for Moderaterna (02-typography.md). */
  --font-sans:    'Inter', system-ui, -apple-system, sans-serif;
  --font-heading: 'Inter', system-ui, -apple-system, sans-serif;
  --font-mono:    ui-monospace, 'SFMono-Regular', Menlo, Consolas, monospace;

  /* shell.css also reads --font-family-display/body/mono via var(--font-family-*,
     fallback), where the in-file fallback is the Cocogoose Pro stack. Override
     them here so every var(--font-family-*) call in shell.css picks up Inter. */
  --font-family-display: 'Inter', system-ui, -apple-system, sans-serif;
  --font-family-body:    'Inter', system-ui, -apple-system, sans-serif;
  --font-family-mono:    ui-monospace, 'SFMono-Regular', Menlo, Consolas, monospace;

  /* ── Discrete avatar/chip palette slots ── */
  /* tokens.css:51-55 — used by brandPalette.ts for avatar/header chip colours.
     Mapped to Moderaterna palette; order and array lengths are preserved
     (6 avatar slots, 5 header slots) to keep hash-based assignment stable. */
  --brand-palette-grey:      #767878;   /* Neutral grey — unchanged                         */
  --brand-palette-gold:      #93D5F6;   /* Header slot 5 — sky-blue replaces Demoskop gold  */
  --brand-palette-gold-dark: #702283;   /* Avatar slot 4 — purple replaces Demoskop gold    */
  --brand-palette-slate:     #213A8F;   /* Navy                                              */
  --brand-palette-plum:      #702283;   /* Purple (secondary accent)                         */

  /* ── Shell layout surface tokens ── */
  /* tokens.css:373 and 380-393 — used by shell.css lines 23, 121, 122 etc. */
  --rail-bg:     #213A8F;  /* Dark rail background — Moderaterna navy (tokens.css:373) */
  --convs-bg:    #F8F8F8;  /* Conversations panel background — Moderaterna off-white   */
  --convs-border: #D8E0EC; /* Conversations panel border — cool-grey with navy hint    */
  --frame-bg:    #F8F8F8;  /* Main canvas background — same off-white                  */

  /* ── Demoskop-named primary tokens used directly in shell.css ── */
  /* tokens.css:16-18 — shell.css uses --demoskop-blue/red/grey directly
     at lines 174, 189, 197, 367, 384, 429, 442, 600, 630, 634 etc.
     Remap to Moderaterna equivalents. */
  --demoskop-blue: #213A8F;  /* Navy primary                                             */
  --demoskop-red:  #702283;  /* Purple secondary (replaces Stella red for brand actions) */
  --demoskop-grey: #767878;  /* Unchanged neutral grey                                   */

  /* Turquoise/accent tokens used in selection highlight and chip accents */
  /* tokens.css:19-20 */
  --complement-turquoise: #93D5F6;  /* Sky-blue replaces Demoskop turquoise               */
  --complement-grey:      #E4F4FD;  /* Sky-blue tint replaces Demoskop warm off-white     */

  /* ── Accent foreground token ── */
  /* tokens.css:392 — light-mode accent text (default is var(--demoskop-blue)) */
  --accent-fg: #213A8F;  /* Navy on light surfaces                                       */

  /* ── Warm dividers ── */
  /* tokens.css:387-390 */
  --divider-warm:        #D8E0EC;  /* Cool-grey with navy hint (replaces cream warm tone)  */
  --divider-warm-subtle: #E8EEF6;  /* Softer inner separator                               */
}
