/* ─────────────────────────────────────────────────────────────
 * GIXO PER-BRAND THEME OVERRIDES
 * Same shell, different skin. Activated by adding
 * `class="product-scope product-scope--{slug}"` to a layout wrapper.
 * Brand slugs: quill, lumen, folio, arc, business, lex, prism.
 * ───────────────────────────────────────────────────────────── */

.product-scope {
  --product-primary:         var(--gixo-primary);
  --product-primary-darken:  #00a8cc;
  --product-primary-lighten: #66e9ff;
  --product-accent:          var(--gixo-secondary);
  --product-surface:         var(--gixo-surface);
  --product-surface-light:   var(--gixo-surface-light);
  --product-border:          var(--gixo-border);
  --product-hero-gradient:   linear-gradient(135deg, #00d9ff 0%, #a855f7 100%);
  --product-headline-font:   'Inter', 'Manrope', system-ui, sans-serif;
}

/* Headline override (used by per-brand dashboards via .product-headline) */
.product-scope .product-headline,
.product-scope h1.product-headline,
.product-scope .mud-typography-h3.product-headline,
.product-scope .mud-typography-h4.product-headline {
  font-family: var(--product-headline-font) !important;
  letter-spacing: -0.01em;
}

/* Hero gradient utility */
.product-scope .product-hero {
  background: var(--product-hero-gradient);
}

/* Re-tint the existing Gixo-branded chrome to brand accent */
.product-scope .gixo-appbar {
  border-bottom-color: var(--product-border) !important;
}

.product-scope .nav-menu-button:hover {
  background: color-mix(in srgb, var(--product-primary) 8%, transparent) !important;
}

.product-scope .nav-dropdown-menu {
  border-color: var(--product-border) !important;
}

.product-scope .gixo-search {
  border-color: var(--product-border) !important;
}
.product-scope .gixo-search .mud-input-root-filled.mud-input-root-focused {
  border-color: var(--product-primary) !important;
  box-shadow: 0 0 24px color-mix(in srgb, var(--product-primary) 18%, transparent);
}
.product-scope .gixo-search .mud-input-root-filled.mud-input-root-focused:before {
  border-bottom-color: var(--product-primary) !important;
}

.product-scope .gixo-drawer .mud-nav-link-active {
  background: color-mix(in srgb, var(--product-primary) 12%, transparent) !important;
  border-left-color: var(--product-primary) !important;
}

/* Brand switcher chip in the header */
.product-switcher-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--product-primary) 14%, transparent);
  border: 1px solid var(--product-border);
  color: var(--mud-palette-text-primary);
  transition: background-color .2s ease, border-color .2s ease;
}
.product-switcher-chip:hover {
  background: color-mix(in srgb, var(--product-primary) 22%, transparent);
}
.product-switcher-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--product-primary);
  box-shadow: 0 0 8px color-mix(in srgb, var(--product-primary) 60%, transparent);
}

/* ─────────────── Per-brand CSS variable maps ─────────────── */

.product-scope--quill {
  --product-primary:         #f59e0b;
  --product-primary-darken:  #b45309;
  --product-primary-lighten: #fbbf24;
  --product-accent:          #c2410c;
  --product-surface:         rgba(45, 35, 28, 0.95);
  --product-surface-light:   rgba(60, 45, 35, 0.85);
  --product-border:          rgba(245, 158, 11, 0.18);
  --product-hero-gradient:   linear-gradient(135deg, #f59e0b 0%, #c2410c 100%);
  --product-headline-font:   'Fraunces', 'Source Serif Pro', Georgia, serif;
}

.product-scope--lumen {
  --product-primary:         #00d9ff;
  --product-primary-darken:  #00a8cc;
  --product-primary-lighten: #66e9ff;
  --product-accent:          #ff6b6b;
  --product-surface:         rgba(36, 43, 71, 0.95);
  --product-surface-light:   rgba(45, 54, 84, 0.85);
  --product-border:          rgba(0, 217, 255, 0.18);
  --product-hero-gradient:   linear-gradient(135deg, #00d9ff 0%, #ff6b6b 100%);
  --product-headline-font:   'Inter', 'Manrope', system-ui, sans-serif;
}

.product-scope--folio {
  --product-primary:         #6366f1;
  --product-primary-darken:  #4338ca;
  --product-primary-lighten: #818cf8;
  --product-accent:          #d4a574;
  --product-surface:         rgba(30, 28, 55, 0.95);
  --product-surface-light:   rgba(40, 38, 70, 0.85);
  --product-border:          rgba(99, 102, 241, 0.18);
  --product-hero-gradient:   linear-gradient(135deg, #6366f1 0%, #d4a574 100%);
  --product-headline-font:   'Fraunces', 'Source Serif Pro', Georgia, serif;
}

.product-scope--arc {
  --product-primary:         #0ea5e9;
  --product-primary-darken:  #0369a1;
  --product-primary-lighten: #38bdf8;
  --product-accent:          #14b8a6;
  --product-surface:         rgba(15, 32, 50, 0.95);
  --product-surface-light:   rgba(22, 44, 68, 0.85);
  --product-border:          rgba(14, 165, 233, 0.18);
  --product-hero-gradient:   linear-gradient(135deg, #0ea5e9 0%, #14b8a6 100%);
  --product-headline-font:   'Inter', 'Manrope', system-ui, sans-serif;
}

.product-scope--business {
  --product-primary:         #10b981;
  --product-primary-darken:  #047857;
  --product-primary-lighten: #34d399;
  --product-accent:          #64748b;
  --product-surface:         rgba(20, 35, 35, 0.95);
  --product-surface-light:   rgba(28, 46, 46, 0.85);
  --product-border:          rgba(16, 185, 129, 0.18);
  --product-hero-gradient:   linear-gradient(135deg, #10b981 0%, #475569 100%);
  --product-headline-font:   'Inter', 'Manrope', system-ui, sans-serif;
}

/* Lex covers both Legal and Compliance (merged 2026-05-17). */
.product-scope--lex {
  --product-primary:         #dc2626;
  --product-primary-darken:  #7f1d1d;
  --product-primary-lighten: #f87171;
  --product-accent:          #a78bfa;
  --product-surface:         rgba(35, 20, 24, 0.95);
  --product-surface-light:   rgba(48, 28, 32, 0.85);
  --product-border:          rgba(220, 38, 38, 0.18);
  --product-hero-gradient:   linear-gradient(135deg, #dc2626 0%, #7f1d1d 100%);
  --product-headline-font:   'Fraunces', 'Source Serif Pro', Georgia, serif;

  --lex-heading: #f8fafc;
  --lex-gradient-start: #ffffff;
  --lex-heading-soft: #f1f5f9;
  --lex-body-bright: #e2e8f0;
  --lex-body: #cbd5e1;
  --lex-muted: #94a3b8;
  --lex-subtle: #64748b;
  --lex-page-bg: #05070d;
  --lex-workspace-bg: #121623;
  --lex-header-bg: rgba(18, 22, 35, .96);
  --lex-panel-solid: #0c1018;
  --lex-panel-bg: rgba(15, 23, 42, .55);
  --lex-panel-bg-mid: rgba(15, 23, 42, 0.62);
  --lex-panel-bg-soft: rgba(15, 23, 42, .58);
  --lex-panel-bg-strong: rgba(15, 23, 42, .68);
  --lex-surface-bg: rgba(30, 41, 59, .62);
  --lex-surface-bg-soft: rgba(30, 41, 59, .5);
  --lex-border: rgba(148, 163, 184, .16);
  --lex-border-soft: rgba(148, 163, 184, .12);
  --lex-border-strong: rgba(148, 163, 184, .22);
  --lex-white-border: rgba(255, 255, 255, .05);
  --lex-legal-primary: #6366f1;
  --lex-legal-primary-mid: #4f46e5;
  --lex-legal-primary-dark: #4338ca;
  --lex-legal-primary-light: #818cf8;
  --lex-legal-violet: #8b5cf6;
  --lex-legal-accent: #a855f7;
  --lex-legal-info: #06b6d4;
  --lex-legal-info-light: #67e8f9;
  --lex-legal-info-bright: #38bdf8;
  --lex-legal-success: #10b981;
  --lex-legal-success-light: #34d399;
  --lex-legal-warning: #f59e0b;
  --lex-legal-warning-light: #fbbf24;
  --lex-legal-error: #f87171;
  --lex-legal-error-strong: #ef4444;
  --lex-legal-error-pale: #fca5a5;
  --lex-legal-accent-pale: #c4b5fd;
  --lex-compliance-primary: #4CAF50;
  --lex-compliance-primary-dark: #2E7D32;
  --lex-compliance-primary-bright: #4ade80;
  --lex-compliance-primary-soft: #86efac;
  --lex-compliance-primary-pale: #bbf7d0;
  --lex-compliance-warning: #FF9800;
  --lex-compliance-warning-dark: #f59e0b;
  --lex-compliance-warning-light: #fbbf24;
  --lex-compliance-card-bg: rgba(42, 42, 62, 0.6);
  --lex-compliance-period-bg: rgba(15, 20, 30, 0.6);
  --lex-check-link: #00d9ff;
  --lex-check-link-soft: #67e8f9;
  --lex-clause-tool-bg: rgba(8, 47, 73, .28);
  --lex-clause-tool-border: rgba(34, 211, 238, .24);
  --lex-card-bg-dense: rgba(12, 16, 24, 0.8);
  --lex-card-bg: rgba(12, 16, 24, 0.6);
  --lex-card-bg-soft: rgba(12, 16, 24, 0.4);
  --lex-final-cta-bg: linear-gradient(135deg, rgba(12, 16, 24, 0.98), rgba(5, 7, 13, 0.98));
}

.product-scope--prism {
  --product-primary:         #E8A33D;
  --product-primary-darken:  #C0822B;
  --product-primary-lighten: #F1BD69;
  --product-accent:          #3C3A3E;
  --product-surface:         rgba(31, 28, 24, 0.95);
  --product-surface-light:   rgba(48, 44, 38, 0.85);
  --product-border:          rgba(232, 163, 61, 0.22);
  --product-hero-gradient:   linear-gradient(135deg, #E8A33D 0%, #3C3A3E 100%);
  --product-headline-font:   'Inter', 'Manrope', system-ui, sans-serif;
}

/* ─────────────── RGB triplets + readable CTA text per brand (2026-05-31) ───────────────
 * Lets per-page inline styles express brand glows/borders as
 * rgba(var(--product-primary-rgb), α), and pick legible filled-CTA text. */
.product-scope           { --product-primary-rgb: 0, 217, 255;  --product-accent-rgb: 168, 85, 247;  --product-on-primary: #06222b; }
.product-scope--quill    { --product-primary-rgb: 245, 158, 11; --product-accent-rgb: 194, 65, 12;   --product-on-primary: #1a1206; }
.product-scope--lumen    { --product-primary-rgb: 0, 217, 255;  --product-accent-rgb: 255, 107, 107; --product-on-primary: #06222b; }
.product-scope--folio    { --product-primary-rgb: 99, 102, 241; --product-accent-rgb: 212, 165, 116; --product-on-primary: #ffffff; }
.product-scope--arc      { --product-primary-rgb: 14, 165, 233; --product-accent-rgb: 20, 184, 166;  --product-on-primary: #04202e; }
.product-scope--business { --product-primary-rgb: 16, 185, 129; --product-accent-rgb: 100, 116, 139; --product-on-primary: #04140e; }
.product-scope--lex      { --product-primary-rgb: 220, 38, 38;  --product-accent-rgb: 167, 139, 250; --product-on-primary: #ffffff; }
.product-scope--prism    { --product-primary-rgb: 232, 163, 61; --product-accent-rgb: 60, 58, 62;    --product-on-primary: #15171C; }

/* ─────────────── Re-point the global theme primary → brand within each scope ───────────────
 * app.css buttons/outlines read var(--gixo-primary); MudBlazor reads var(--mud-palette-primary);
 * app.css forces filled-CTA text to var(--gixo-background). Redefining those variables on the
 * branded wrapper recolors all of it through normal inheritance — no !important, no property
 * overrides. Declared on the brand scopes only (where --product-primary is a concrete hex) so it
 * never cycles with the base `.product-scope { --product-primary: var(--gixo-primary) }`. */
.product-scope--quill,
.product-scope--lumen,
.product-scope--folio,
.product-scope--arc,
.product-scope--business,
.product-scope--lex,
.product-scope--prism {
  --gixo-primary:                var(--product-primary);
  --gixo-primary-dark:           var(--product-primary-darken);
  --gixo-primary-light:          var(--product-primary-lighten);
  --gixo-on-primary:             var(--product-on-primary);
  --mud-palette-primary:         var(--product-primary);
  --mud-palette-primary-darken:  var(--product-primary-darken);
  --mud-palette-primary-lighten: var(--product-primary-lighten);
  --mud-palette-primary-text:    var(--product-on-primary);
  --gixo-glow-sm:      0 0 10px rgba(var(--product-primary-rgb), 0.3);
  --gixo-glow-md:      0 0 20px rgba(var(--product-primary-rgb), 0.4);
  --gixo-glow-lg:      0 0 30px rgba(var(--product-primary-rgb), 0.5);
  --gixo-shadow-color: 0 4px 16px rgba(var(--product-primary-rgb), 0.2);
}

/* ─────────────── Light mode: AA-safe primary TEXT (Quill reference) ───────────────
 * The brand accents above are tuned for dark and fail WCAG AA as text on white
 * (e.g. Quill amber #f59e0b = 2.05:1). In light, redirect primary-COLOURED TEXT
 * (links / breadcrumbs / nav / text+outlined button labels) to the darker brand
 * shade. MudBlazor icons are SVG (no text node) and fills carry their own contrast,
 * so both keep the bright accent. This is the Quill reference; the light-audit
 * harness flags any missed text selector, and other scopes follow the same pattern
 * with their own AA-safe dark (lumen/prism need a darker value than -darken). */
html[data-theme="light"] .product-scope--quill :is(
  a.mud-link, .mud-link,
  .mud-breadcrumbs a, .mud-breadcrumbs .mud-breadcrumb-item a,
  .mud-nav-link.mud-nav-link-active,
  .mud-typography-colorPrimary,
  .mud-button-text .mud-button-label,
  .mud-button-outlined .mud-button-label
) {
  color: #b45309 !important; /* amber-700 — 5.0:1 on white */
}

html[data-theme="light"] .product-scope--arc :is(
  a.mud-link, .mud-link,
  .mud-breadcrumbs a, .mud-breadcrumbs .mud-breadcrumb-item a,
  .mud-nav-link.mud-nav-link-active,
  .mud-typography-colorPrimary,
  .mud-button-text .mud-button-label,
  .mud-button-outlined .mud-button-label
) {
  color: #0369a1 !important; /* sky-700 — 5.8:1 on white */
}

html[data-theme="light"] .product-scope--lumen :is(
  a.mud-link, .mud-link,
  .mud-breadcrumbs a, .mud-breadcrumbs .mud-breadcrumb-item a,
  .mud-nav-link.mud-nav-link-active,
  .mud-typography-colorPrimary,
  .mud-button-text .mud-button-label,
  .mud-button-outlined .mud-button-label
) {
  color: #0e7490 !important; /* cyan-700 — 5.36:1 on white; Lumen -darken fails AA */
}

/* Lumen create/outline wizard bridge. Dark values match the legacy page-local colours;
   light values are only active after the audited routes are un-gated. */
.lumen-flow-page {
  --lumen-flow-heading: #f8fafc;
  --lumen-flow-text: #e2e8f0;
  --lumen-flow-body: #cbd5e1;
  --lumen-flow-muted: #94a3b8;
  --lumen-flow-subtle: #64748b;
  --lumen-flow-primary: #00d9ff;
  --lumen-flow-primary-soft: #67e8f9;
  --lumen-flow-primary-text: #0f1419;
  --lumen-flow-team: #a78bfa;
  --lumen-flow-panel: rgba(15, 23, 42, 0.45);
  --lumen-flow-panel-solid: #242b47;
  --lumen-flow-panel-strong: #1a1f3a;
  --lumen-flow-panel-raised: rgba(26, 31, 58, 0.8);
  --lumen-flow-panel-soft: rgba(0, 217, 255, 0.05);
  --lumen-flow-panel-selected: rgba(0, 217, 255, 0.08);
  --lumen-flow-panel-selected-strong: rgba(0, 217, 255, 0.12);
  --lumen-flow-editable-panel: rgba(255, 255, 255, 0.02);
  --lumen-flow-border: rgba(148, 163, 184, 0.2);
  --lumen-flow-border-subtle: rgba(148, 163, 184, 0.18);
  --lumen-flow-border-strong: rgba(148, 163, 184, 0.25);
  --lumen-flow-primary-border: rgba(0, 217, 255, 0.2);
  --lumen-flow-primary-border-muted: rgba(0, 217, 255, 0.15);
  --lumen-flow-primary-border-strong: rgba(0, 217, 255, 0.5);
  --lumen-flow-primary-focus: rgba(0, 217, 255, 0.1);
  --lumen-flow-primary-shadow: rgba(0, 217, 255, 0.15);
  --lumen-flow-primary-shadow-strong: rgba(0, 217, 255, 0.18);
  --lumen-flow-disabled-bg-soft: rgba(148, 163, 184, 0.06);
  --lumen-flow-disabled-bg: rgba(148, 163, 184, 0.16);
  --lumen-flow-disabled-border: rgba(148, 163, 184, 0.22);
  --lumen-flow-success: #10b981;
  --lumen-flow-error: #ef4444;
}

html[data-theme="light"] .lumen-flow-page {
  --lumen-flow-heading: #0f172a;
  --lumen-flow-text: #334155;
  --lumen-flow-body: #334155;
  --lumen-flow-muted: #475569;
  --lumen-flow-subtle: #64748b;
  --lumen-flow-primary: #0e7490;
  --lumen-flow-primary-soft: #0e7490;
  --lumen-flow-primary-text: #ffffff;
  --lumen-flow-team: #7e22ce;
  --lumen-flow-panel: #ffffff;
  --lumen-flow-panel-solid: #ffffff;
  --lumen-flow-panel-strong: #f8fafc;
  --lumen-flow-panel-raised: #ffffff;
  --lumen-flow-panel-soft: #ecfeff;
  --lumen-flow-panel-selected: #e0f2fe;
  --lumen-flow-panel-selected-strong: #cffafe;
  --lumen-flow-editable-panel: #ffffff;
  --lumen-flow-border: #cbd5e1;
  --lumen-flow-border-subtle: #e2e8f0;
  --lumen-flow-border-strong: #94a3b8;
  --lumen-flow-primary-border: rgba(14, 116, 144, 0.22);
  --lumen-flow-primary-border-muted: rgba(14, 116, 144, 0.18);
  --lumen-flow-primary-border-strong: rgba(14, 116, 144, 0.5);
  --lumen-flow-primary-focus: rgba(14, 116, 144, 0.12);
  --lumen-flow-primary-shadow: rgba(14, 116, 144, 0.12);
  --lumen-flow-primary-shadow-strong: rgba(14, 116, 144, 0.16);
  --lumen-flow-disabled-bg-soft: #f1f5f9;
  --lumen-flow-disabled-bg: #e2e8f0;
  --lumen-flow-disabled-border: #cbd5e1;
  --lumen-flow-success: #15803d;
  --lumen-flow-error: #dc2626;
}

html[data-theme="light"] .product-scope--lex {
  --lex-heading: #0f172a;
  --lex-gradient-start: #0f172a;
  --lex-heading-soft: #1e293b;
  --lex-body-bright: #334155;
  --lex-body: #334155;
  --lex-muted: #475569;
  --lex-subtle: #64748b;
  --lex-page-bg: #f8fafc;
  --lex-workspace-bg: #f8fafc;
  --lex-header-bg: rgba(255, 255, 255, .94);
  --lex-panel-solid: #ffffff;
  --lex-panel-bg: rgba(255, 255, 255, .94);
  --lex-panel-bg-mid: rgba(255, 255, 255, .92);
  --lex-panel-bg-soft: rgba(255, 255, 255, .9);
  --lex-panel-bg-strong: #ffffff;
  --lex-surface-bg: rgba(255, 255, 255, .92);
  --lex-surface-bg-soft: rgba(248, 250, 252, .92);
  --lex-border: rgba(148, 163, 184, .28);
  --lex-border-soft: rgba(148, 163, 184, .2);
  --lex-border-strong: rgba(148, 163, 184, .34);
  --lex-white-border: rgba(148, 163, 184, .22);
  --lex-legal-primary: #b91c1c;
  --lex-legal-primary-mid: #991b1b;
  --lex-legal-primary-dark: #7f1d1d;
  --lex-legal-primary-light: #dc2626;
  --lex-legal-violet: #6d28d9;
  --lex-legal-accent: #6d28d9;
  --lex-legal-info: #0e7490;
  --lex-legal-info-light: #0e7490;
  --lex-legal-info-bright: #0e7490;
  --lex-legal-success: #047857;
  --lex-legal-success-light: #15803d;
  --lex-legal-warning: #b45309;
  --lex-legal-warning-light: #b45309;
  --lex-legal-error: #b91c1c;
  --lex-legal-error-strong: #b91c1c;
  --lex-legal-error-pale: #b91c1c;
  --lex-legal-accent-pale: #6d28d9;
  --lex-compliance-primary: #15803d;
  --lex-compliance-primary-dark: #166534;
  --lex-compliance-primary-bright: #16a34a;
  --lex-compliance-primary-soft: #15803d;
  --lex-compliance-primary-pale: #166534;
  --lex-compliance-warning: #b45309;
  --lex-compliance-warning-dark: #b45309;
  --lex-compliance-warning-light: #b45309;
  --lex-compliance-card-bg: rgba(255, 255, 255, .94);
  --lex-compliance-period-bg: rgba(248, 250, 252, .92);
  --lex-check-link: #b91c1c;
  --lex-check-link-soft: #b91c1c;
  --lex-clause-tool-bg: rgba(254, 242, 242, .92);
  --lex-clause-tool-border: rgba(185, 28, 28, .22);
  --lex-card-bg-dense: rgba(255, 255, 255, .92);
  --lex-card-bg: rgba(255, 255, 255, .9);
  --lex-card-bg-soft: rgba(255, 255, 255, .86);
  --lex-final-cta-bg: linear-gradient(135deg, #ffffff, #fef2f2);
}

html[data-theme="light"] .product-scope--lex :is(
  a.mud-link, .mud-link,
  .mud-breadcrumbs a, .mud-breadcrumbs .mud-breadcrumb-item a,
  .mud-nav-link.mud-nav-link-active,
  .mud-typography-colorPrimary,
  .mud-button-text .mud-button-label,
  .mud-button-outlined .mud-button-label
) {
  color: #b91c1c !important; /* red-700 — 5.9:1 on white */
}

html[data-theme="light"] .product-scope--business :is(
  a.mud-link, .mud-link,
  .mud-breadcrumbs a, .mud-breadcrumbs .mud-breadcrumb-item a,
  .mud-nav-link.mud-nav-link-active,
  .mud-typography-colorPrimary,
  .mud-button-text .mud-button-label,
  .mud-button-outlined .mud-button-label
) {
  color: #047857 !important; /* emerald-700 — 5.48:1 on white */
}

/* Folio light: the indigo-500 accent fails AA for filled-button labels (white on
   #6366f1 = 4.47:1). Remap the scope primary to indigo-700/800 in light so fills,
   links and Mud primary all pass; dark keeps #6366f1. */
html[data-theme="light"] .product-scope--folio {
  --product-primary: #4338ca;
  --product-primary-darken: #3730a3;
  --product-primary-lighten: #4f46e5;
  --product-primary-rgb: 67, 56, 202;
}

html[data-theme="light"] .product-scope--folio :is(
  a.mud-link, .mud-link,
  .mud-breadcrumbs a, .mud-breadcrumbs .mud-breadcrumb-item a,
  .mud-nav-link.mud-nav-link-active,
  .mud-typography-colorPrimary,
  .mud-button-text .mud-button-label,
  .mud-button-outlined .mud-button-label
) {
  color: #4338ca !important; /* indigo-700 — 7.9:1 on white */
}

html[data-theme="light"] .product-scope--prism :is(
  a.mud-link, .mud-link,
  .mud-breadcrumbs a, .mud-breadcrumbs .mud-breadcrumb-item a,
  .mud-nav-link.mud-nav-link-active,
  .mud-typography-colorPrimary,
  .mud-button-text .mud-button-label,
  .mud-button-outlined .mud-button-label
) {
  color: #b45309 !important; /* amber-700 — 5.02:1 on white; Prism -darken fails AA */
}

/* app.css hardcodes the filled-CTA glow as cyan rgba (no !important on box-shadow) — a single
 * higher-specificity scope rule wins on its own, no !important needed. */
.product-scope .mud-button-filled-primary {
  box-shadow: 0 4px 12px rgba(var(--product-primary-rgb), 0.3);
}
.product-scope .mud-button-filled-primary:hover {
  box-shadow: 0 8px 24px rgba(var(--product-primary-rgb), 0.4);
}

/* ─────────────── Brand display font on landing-page headings within scope ─────────────── */
.product-scope h1,
.product-scope h2,
.product-scope h3,
.product-scope [class*="hero-title"],
.product-scope [class*="section-title"] {
  font-family: var(--product-headline-font);
}

/* ─────────────── Brand dashboard shell (BrandDashboardShell.razor) ───────────────
 * The shell's class contract was previously unstyled — cards rendered as bare
 * links. Everything below is brand-agnostic and driven by the --product-* vars,
 * so every shell consumer (Business, Folio, …) inherits the same chrome. */

.brand-dashboard__hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1.25rem;
  margin: 1rem 1rem 0;
  padding: 2.2rem 2.4rem;
  border-radius: 18px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 18px 48px rgba(var(--product-primary-rgb), 0.22);
}

/* Soften the raw gradient so the wordmark and tagline stay legible. */
.brand-dashboard__hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, rgba(5, 7, 13, 0.55) 0%, rgba(5, 7, 13, 0.15) 55%, transparent 100%);
  pointer-events: none;
}

.brand-dashboard__hero-text,
.brand-dashboard__hero-cta {
  position: relative;
  z-index: 1;
}

.brand-dashboard__tagline {
  margin: 0.5rem 0 0;
  color: #f8fafc;
  font-size: 1.05rem;
  font-weight: 600;
  text-shadow: 0 1px 8px rgba(5, 7, 13, 0.45);
  max-width: 560px;
}

.brand-dashboard__body {
  max-width: 1280px;
  margin: 0 auto;
  padding: 1.75rem 1rem 4rem;
}

.brand-dashboard__section {
  margin-bottom: 2.75rem;
}

.brand-dashboard__journey {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(320px, 1.35fr) auto;
  align-items: center;
  gap: 1rem;
  margin-bottom: 2rem;
  padding: 1.15rem 1.25rem;
  border-radius: 14px;
  background: var(--product-surface-light, rgba(20, 27, 45, 0.85));
  border: 1px solid var(--product-border, rgba(148, 163, 184, 0.15));
}

.brand-dashboard__journey-copy h2 {
  margin: 0.55rem 0 0.35rem;
  color: var(--mud-palette-text-primary, #f8fafc);
  font-size: 1.2rem;
  line-height: 1.3;
}

.brand-dashboard__journey-copy p,
.brand-dashboard__journey-card p {
  margin: 0;
  color: var(--mud-palette-text-secondary, #94a3b8);
  font-size: 0.88rem;
  line-height: 1.55;
}

.brand-dashboard__journey-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}

.brand-dashboard__journey-card {
  min-height: 100%;
  padding: 0.85rem 0.95rem;
  border-radius: 12px;
  background: rgba(2, 6, 23, 0.22);
  border: 1px solid rgba(var(--product-primary-rgb), 0.14);
}

.brand-dashboard__journey-card span {
  display: block;
  color: var(--product-primary-lighten);
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 0.35rem;
}

.brand-dashboard__journey-actions {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  justify-self: end;
}

.brand-dashboard__journey-actions .mud-button-root {
  min-width: 148px;
}

html[data-theme="light"] .brand-dashboard__journey {
  background: #ffffff;
  border-color: #e2e8f0;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.06);
}

html[data-theme="light"] .brand-dashboard__journey-card {
  background: #f8fafc;
  border-color: rgba(14, 116, 144, 0.18);
}

html[data-theme="light"] .brand-dashboard__journey-copy h2 {
  color: #0f172a;
}

html[data-theme="light"] .brand-dashboard__journey-copy p,
html[data-theme="light"] .brand-dashboard__journey-card p {
  color: #475569;
}

html[data-theme="light"] .brand-dashboard__journey-card span,
html[data-theme="light"] .brand-dashboard__section-badge {
  color: #0e7490;
}

html[data-theme="light"] .brand-dashboard__section-badge {
  background: #ecfeff;
  border-color: rgba(14, 116, 144, 0.24);
}

.brand-dashboard__section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1.1rem;
}

.brand-dashboard__section-header h2 {
  margin: 0;
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--mud-palette-text-primary, #f1f5f9);
}

.brand-dashboard__section-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 12px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--product-primary-lighten);
  background: rgba(var(--product-primary-rgb), 0.10);
  border: 1px solid rgba(var(--product-primary-rgb), 0.30);
  white-space: nowrap;
}

.brand-dashboard__grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}

.brand-card {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  padding: 1.15rem 1.25rem;
  border-radius: 14px;
  background: var(--product-surface-light, rgba(20, 27, 45, 0.85));
  border: 1px solid var(--product-border, rgba(148, 163, 184, 0.15));
  text-decoration: none;
  color: inherit;
  transition: border-color 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
}

a.brand-card:hover {
  border-color: rgba(var(--product-primary-rgb), 0.55);
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(var(--product-primary-rgb), 0.16);
}

.brand-card .mud-icon-root {
  color: var(--product-primary);
  font-size: 1.5rem;
}

.brand-card__title {
  font-weight: 700;
  font-size: 1.02rem;
  color: var(--mud-palette-text-primary, #f1f5f9);
  line-height: 1.35;
}

.brand-card__desc {
  color: var(--mud-palette-text-secondary, #94a3b8);
  font-size: 0.88rem;
  line-height: 1.55;
  flex-grow: 1;
}

.brand-card__meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.4rem;
  color: var(--mud-palette-text-secondary, #64748b);
  font-size: 0.82rem;
}

html[data-theme="light"] .product-scope--business :is(.brand-dashboard__journey, .brand-card) {
  background: #ffffff;
  border-color: rgba(var(--product-primary-rgb), 0.18);
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.06);
}

html[data-theme="light"] .product-scope--business .brand-dashboard__journey-card {
  background: #f8fafc;
  border-color: rgba(148, 163, 184, 0.28);
}

html[data-theme="light"] .product-scope--business :is(
  .brand-dashboard__journey-copy h2,
  .brand-dashboard__section-header h2,
  .brand-card__title
) {
  color: #0f172a;
}

html[data-theme="light"] .product-scope--business :is(
  .brand-dashboard__journey-copy p,
  .brand-dashboard__journey-card p,
  .brand-card__desc,
  .brand-card__meta
) {
  color: #334155;
}

html[data-theme="light"] .product-scope--business :is(
  .brand-dashboard__journey-card span,
  .brand-dashboard__section-badge
) {
  color: #047857;
}

.brand-dashboard__loading {
  display: grid;
  place-items: center;
  padding: 2.5rem 0;
}

.brand-dashboard__empty {
  display: grid;
  justify-items: center;
  gap: 0.75rem;
  padding: 2.5rem 1rem;
  border: 1px dashed var(--product-border, rgba(148, 163, 184, 0.25));
  border-radius: 14px;
  color: var(--mud-palette-text-secondary, #94a3b8);
  text-align: center;
}

@media (max-width: 640px) {
  .brand-dashboard__hero {
    margin: 0.5rem 0.5rem 0;
    padding: 1.5rem 1.25rem;
  }

  .brand-dashboard__journey {
    grid-template-columns: 1fr;
  }

  .brand-dashboard__journey-grid {
    grid-template-columns: 1fr;
  }

  .brand-dashboard__journey-actions {
    justify-self: stretch;
  }

  .brand-dashboard__journey-actions .mud-button-root {
    width: 100%;
  }

  .brand-dashboard__body {
    padding: 1.25rem 0.75rem 3rem;
  }
}
