/* Mantle UI v2 — bundled (tokens + components). Import this single file. */

/**
 * Mantle UI — Design Tokens
 * Version 2.0 — aligned to Mantle Brand Identity & Guidelines v1.2 (May 2026)
 *
 * Single source of truth for color, type, space, radius, elevation and motion.
 * Brand principle: "Restraint is a discipline." The palette is compact; the
 * gradient is a signature, not a wallpaper (one major gradient surface per view).
 *
 * Light is the default. Dark mode via [data-theme="dark"] or OS preference.
 */

:root {
  /* ============================================================
     1. BRAND COLORS  (Guidelines §7)
     Two anchors (White, Mantle Black), two spectrum poles
     (Signal Violet, Orbit Cyan), and a small supporting set.
     ============================================================ */

  --mantle-white:        #FFFFFF;  /* Primary anchor — default surface */
  --mantle-black:        #0E0E14;  /* Primary anchor — warmed near-black ink */
  --mantle-violet:       #7F26FD;  /* Signal Violet — primary accent / brand voice */
  --mantle-cyan:         #00C8E0;  /* Orbit Cyan — secondary accent / gradient pole */
  --mantle-deep-orbit:   #0040E0;  /* Deep Orbit — depth, charts, secondary headings */
  --mantle-indigo:       #221551;  /* Mantle Indigo — warm dark surfaces */
  --mantle-soft-violet:  #C5B4E3;  /* Soft Violet — tints, subdued accents */
  --mantle-heritage-teal:#00B0B9;  /* Heritage Teal — sparingly, heritage moments */

  /* The brand gradient — two-stop Cyan → Violet (Guidelines §7.4). */
  --mantle-gradient:            linear-gradient(90deg, #00C8E0 0%, #7F26FD 100%);
  --mantle-gradient-vertical:   linear-gradient(180deg, #00C8E0 0%, #7F26FD 100%);
  --mantle-gradient-diagonal:   linear-gradient(135deg, #00C8E0 0%, #7F26FD 100%);
  /* Reverse — violet-dominant, for hero treatments. */
  --mantle-gradient-reverse:    linear-gradient(90deg, #7F26FD 0%, #00C8E0 100%);

  /* ============================================================
     2. SEMANTIC COLOR ROLES — LIGHT THEME (default)
     Fluent-style layered neutral ramp for real depth.
     ============================================================ */

  /* Surfaces (background layers, lightest → structural) */
  --surface-0:  #FFFFFF;   /* page background */
  --surface-1:  #FAFAFC;   /* subtle raised surface, alt rows */
  --surface-2:  #F2F3F7;   /* cards, inputs */
  --surface-3:  #E5E7EE;   /* hover fills, wells */
  --stroke-1:   #E2E4EC;   /* hairline dividers, card borders */
  --stroke-2:   #CDD1DC;   /* input borders, stronger separators */

  /* Foreground (text + icons) */
  --text-primary:    #0E0E14;  /* Mantle Black — headlines, body */
  --text-secondary:  #5A6478;  /* ink subtle — secondary text, metadata */
  --text-tertiary:   #8A93A6;  /* captions, placeholders (decorative) */
  --text-on-accent:  #FFFFFF;  /* text on Signal Violet / gradient */
  --text-on-dark:    #FFFFFF;

  /* Interactive (Guidelines §11.4: Signal Violet primary CTA, white text) */
  --accent:           var(--mantle-violet);   /* primary action */
  --accent-hover:     #6A1FD6;                /* violet, darkened for hover */
  --accent-pressed:   #5A19B8;
  --accent-subtle-bg: #F3ECFF;                /* tinted violet background fill */
  --accent-subtle-fg: #5A19B8;                /* readable violet on the tint */
  --link:             var(--mantle-violet);   /* 5.84:1 on white — AA for text */
  --link-hover:       #6A1FD6;
  --focus-ring:       rgba(127, 38, 253, 0.40);

  /* Functional (kept minimal; color never the sole signal — §7.5) */
  --success: #1F9D6B;
  --warning: #B7791F;
  --error:   #D03A4B;
  --info:    var(--mantle-deep-orbit);
  --success-bg: #E7F6EF;
  --warning-bg: #FBF1E0;
  --error-bg:   #FBE9EB;
  --info-bg:    #E8EEFD;

  /* ============================================================
     3. TYPOGRAPHY  (Guidelines §8)
     IBM Plex Sans (system) + IBM Plex Mono. Office/UI fallbacks.
     ============================================================ */

  --font-sans: "IBM Plex Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, "SF Mono", "Cascadia Code", Menlo, Consolas, monospace;

  /* Hierarchy (Guidelines §8.4) */
  --text-display: 4.5rem;   /* 72px — hero / cover (64–96 range) */
  --text-h1:      2.25rem;  /* 36px */
  --text-h2:      1.75rem;  /* 28px */
  --text-h3:      1.375rem; /* 22px */
  --text-body-lg: 1.125rem; /* 18px lead */
  --text-body:    1rem;     /* 16px default reading text */
  --text-sm:      0.875rem; /* 14px UI */
  --text-caption: 0.8125rem;/* 13px footnotes, labels */
  --text-micro:   0.75rem;  /* 12px */

  /* Leading: body 1.5×, headings 1.2× (Guidelines §8.5) */
  --leading-body:    1.5;
  --leading-heading: 1.2;

  /* Weights — Light, Regular, SemiBold, Bold (max 3 per surface) */
  --weight-light:    300;
  --weight-regular:  400;
  --weight-medium:   500;
  --weight-semibold: 600;
  --weight-bold:     700;

  --tracking-tight:  -0.02em;  /* large headings */
  --tracking-normal: 0;
  --tracking-wide:   0.06em;   /* small all-caps labels */

  /* ============================================================
     4. SPACING (4px base)
     ============================================================ */
  --space-1:  0.25rem;  /* 4 */
  --space-2:  0.5rem;   /* 8 */
  --space-3:  0.75rem;  /* 12 */
  --space-4:  1rem;     /* 16 */
  --space-5:  1.5rem;   /* 24 */
  --space-6:  2rem;     /* 32 */
  --space-7:  3rem;     /* 48 */
  --space-8:  4rem;     /* 64 */
  --space-9:  6rem;     /* 96 */

  /* ============================================================
     5. RADIUS  (Fluent-style small corners; CTA = 8px per §11.4)
     ============================================================ */
  --radius-sm:   4px;
  --radius-md:   6px;
  --radius-lg:   8px;    /* primary CTA, cards */
  --radius-xl:   12px;   /* modals, large panels */
  --radius-2xl:  16px;
  --radius-full: 9999px;

  /* ============================================================
     6. ELEVATION  (soft, neutral — Fluent-inspired depth)
     ============================================================ */
  --shadow-sm:  0 1px 2px rgba(14, 14, 20, 0.06);
  --shadow-md:  0 2px 4px rgba(14, 14, 20, 0.06), 0 4px 12px rgba(14, 14, 20, 0.08);
  --shadow-lg:  0 8px 16px rgba(14, 14, 20, 0.10), 0 2px 6px rgba(14, 14, 20, 0.06);
  --shadow-xl:  0 16px 48px rgba(14, 14, 20, 0.16);

  /* Container widths */
  --container-sm:  40rem;
  --container-md:  48rem;
  --container-lg:  64rem;
  --container-xl:  80rem;

  /* ============================================================
     7. MOTION  (Guidelines §10.4 — restraint, no bounce/overshoot)
     ============================================================ */
  --ease-standard: cubic-bezier(0.33, 0, 0.1, 1);   /* in slow, out graceful */
  --ease-emphasis: cubic-bezier(0.2, 0, 0, 1);
  --duration-fast:   150ms;   /* micro-interactions 150–250ms */
  --duration-base:   200ms;
  --duration-slow:   400ms;
  --duration-brand:  900ms;   /* brand moments 600–1200ms */
}

/* ============================================================
   DARK THEME  (Guidelines §11.4 — Mantle Black foundation)
   Wordmark renders Signal Violet on dark (§6.3).
   ============================================================ */

[data-theme="dark"] {
  --surface-0:  #0E0E14;   /* Mantle Black page */
  --surface-1:  #15151E;   /* raised */
  --surface-2:  #1C1C28;   /* cards, inputs */
  --surface-3:  #262633;   /* hover fills */
  --stroke-1:   #24242F;
  --stroke-2:   #34343F;

  --text-primary:    #FFFFFF;
  --text-secondary:  #A8B0C0;  /* 8.8:1 on Mantle Black */
  --text-tertiary:   #6E768A;
  --text-on-accent:  #FFFFFF;

  --accent:           var(--mantle-violet);
  --accent-hover:     #9244FF;   /* lighter violet for dark surfaces */
  --accent-pressed:   #A865FF;
  --accent-subtle-bg: #221551;   /* Mantle Indigo */
  --accent-subtle-fg: #C5B4E3;   /* Soft Violet — readable on indigo */
  --link:             #A877FF;   /* lightened violet — 6.2:1 on Mantle Black (AA) */
  --link-hover:       #BFA0FF;
  --focus-ring:       rgba(146, 68, 255, 0.50);

  --success: #34D399;
  --warning: #FBBF24;
  --error:   #F4707F;
  --info:    var(--mantle-cyan);
  --success-bg: #11271F;
  --warning-bg: #2A2113;
  --error-bg:   #2C1518;
  --info-bg:    #10203A;

  --shadow-sm:  0 1px 2px rgba(0, 0, 0, 0.5);
  --shadow-md:  0 2px 4px rgba(0,0,0,0.5), 0 4px 12px rgba(0,0,0,0.55);
  --shadow-lg:  0 8px 16px rgba(0,0,0,0.6), 0 2px 6px rgba(0,0,0,0.5);
  --shadow-xl:  0 16px 48px rgba(0,0,0,0.7);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --surface-0:  #0E0E14;
    --surface-1:  #15151E;
    --surface-2:  #1C1C28;
    --surface-3:  #262633;
    --stroke-1:   #24242F;
    --stroke-2:   #34343F;

    --text-primary:    #FFFFFF;
    --text-secondary:  #A8B0C0;
    --text-tertiary:   #6E768A;

    --accent-hover:     #9244FF;
    --accent-pressed:   #A865FF;
    --accent-subtle-bg: #221551;
    --accent-subtle-fg: #C5B4E3;
    --link:             #9244FF;
    --link-hover:       #A865FF;
    --focus-ring:       rgba(146, 68, 255, 0.50);

    --success: #34D399;
    --warning: #FBBF24;
    --error:   #F4707F;
    --info:    var(--mantle-cyan);
    --success-bg: #11271F;
    --warning-bg: #2A2113;
    --error-bg:   #2C1518;
    --info-bg:    #10203A;

    --shadow-sm:  0 1px 2px rgba(0, 0, 0, 0.5);
    --shadow-md:  0 2px 4px rgba(0,0,0,0.5), 0 4px 12px rgba(0,0,0,0.55);
    --shadow-lg:  0 8px 16px rgba(0,0,0,0.6), 0 2px 6px rgba(0,0,0,0.5);
    --shadow-xl:  0 16px 48px rgba(0,0,0,0.7);
  }
}

/**
 * Mantle UI — Component Stylesheet
 * Version 2.0 — aligned to Mantle Brand Identity & Guidelines v1.2
 *
 * Design language: IBM Plex typography, Signal Violet as the single primary
 * accent, a compact neutral ramp, soft Fluent-style elevation, small (8px) radii,
 * and the Cyan→Violet gradient used only as a signature on hero/decorative
 * surfaces — never as a wallpaper. Restraint is the brand.
 *
 * Requires tokens.css first. Convention: BEM with a `mui-` prefix.
 */

/* ============================================================
   0. BASE
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; }

/* The `hidden` attribute must always win, even over components that set an
   explicit display (e.g. .mui-overlay { display:flex }). Without this, a
   hidden modal/drawer stays painted and blocks the whole page. */
[hidden] { display: none !important; }

.mui-root,
body.mui-root {
  margin: 0;
  font-family: var(--font-sans);
  font-size: var(--text-body);
  line-height: var(--leading-body);
  color: var(--text-primary);
  background: var(--surface-0);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: "ss01";
}

.mui-visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}
.mui-stack { display: flex; flex-direction: column; }
.mui-row   { display: flex; flex-direction: row; align-items: center; }
.mui-gap-1 { gap: var(--space-1); } .mui-gap-2 { gap: var(--space-2); }
.mui-gap-3 { gap: var(--space-3); } .mui-gap-4 { gap: var(--space-4); }
.mui-gap-5 { gap: var(--space-5); }

/* ============================================================
   1. TYPOGRAPHY  (§8 — hierarchy through size/weight, not color)
   ============================================================ */
.mui-display {
  font-family: var(--font-sans); font-weight: var(--weight-bold);
  font-size: var(--text-display); line-height: var(--leading-heading);
  letter-spacing: var(--tracking-tight); color: var(--text-primary); margin: 0;
}
.mui-h1 { font-family: var(--font-sans); font-weight: var(--weight-semibold); font-size: var(--text-h1); line-height: var(--leading-heading); letter-spacing: var(--tracking-tight); color: var(--text-primary); margin: 0; }
.mui-h2 { font-family: var(--font-sans); font-weight: var(--weight-semibold); font-size: var(--text-h2); line-height: var(--leading-heading); color: var(--text-primary); margin: 0; }
.mui-h3 { font-family: var(--font-sans); font-weight: var(--weight-semibold); font-size: var(--text-h3); line-height: var(--leading-heading); color: var(--text-primary); margin: 0; }

.mui-text       { font-size: var(--text-body); line-height: var(--leading-body); color: var(--text-primary); margin: 0; }
.mui-text--lead { font-size: var(--text-body-lg); color: var(--text-secondary); }
.mui-text--sm   { font-size: var(--text-sm); }
.mui-text--caption { font-size: var(--text-caption); color: var(--text-secondary); }
.mui-text--secondary { color: var(--text-secondary); }
.mui-text--tertiary  { color: var(--text-tertiary); }

/* Small all-caps label */
.mui-label {
  font-size: var(--text-micro); font-weight: var(--weight-semibold);
  letter-spacing: var(--tracking-wide); text-transform: uppercase;
  color: var(--text-secondary);
}

/* Gradient text — signature only, large display per §7.4/§5.2 (never the motto) */
.mui-text-gradient {
  background: var(--mantle-gradient); -webkit-background-clip: text;
  background-clip: text; -webkit-text-fill-color: transparent; color: transparent;
}

/* The motto — Signal Violet italic, never gradient-filled, never animated (§5.2) */
.mui-motto {
  font-family: var(--font-sans); font-style: italic; font-weight: var(--weight-medium);
  color: var(--mantle-violet);
}
[data-theme="dark"] .mui-motto { color: var(--link); }

.mui-link { color: var(--link); text-decoration: none; font-weight: var(--weight-medium); transition: color var(--duration-fast) var(--ease-standard); }
.mui-link:hover { color: var(--link-hover); text-decoration: underline; text-underline-offset: 3px; }

/* Plex Mono for hex, URLs, code, data (§9.5, §8.3) */
.mui-mono { font-family: var(--font-mono); }
.mui-code { font-family: var(--font-mono); font-size: 0.9em; background: var(--surface-2); border: 1px solid var(--stroke-1); border-radius: var(--radius-sm); padding: 0.1em 0.4em; color: var(--text-primary); }
.mui-kbd  { font-family: var(--font-mono); font-size: var(--text-micro); background: var(--surface-2); border: 1px solid var(--stroke-2); border-bottom-width: 2px; border-radius: var(--radius-sm); padding: 2px 6px; color: var(--text-secondary); }
.mui-codeblock { font-family: var(--font-mono); font-size: var(--text-sm); background: var(--mantle-black); color: #E8E8F0; border-radius: var(--radius-lg); padding: var(--space-4) var(--space-5); overflow: auto; line-height: 1.6; }
.mui-codeblock .tok-ok { color: var(--mantle-cyan); }
.mui-codeblock .tok-accent { color: var(--mantle-soft-violet); }

/* ============================================================
   2. BUTTONS  (§11.4 — Violet primary, Black-outline secondary, 8px radius,
   sentence case enforced by copy not CSS)
   ============================================================ */
.mui-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2);
  padding: 0.625rem var(--space-4); min-height: 2.5rem;
  font-family: var(--font-sans); font-size: var(--text-sm); font-weight: var(--weight-medium);
  line-height: 1; white-space: nowrap; border: 1px solid transparent;
  border-radius: var(--radius-lg); cursor: pointer; user-select: none; text-decoration: none;
  transition: background-color var(--duration-fast) var(--ease-standard),
              border-color var(--duration-fast) var(--ease-standard),
              color var(--duration-fast) var(--ease-standard),
              box-shadow var(--duration-fast) var(--ease-standard);
}
.mui-btn:focus-visible { outline: none; box-shadow: 0 0 0 2px var(--surface-0), 0 0 0 4px var(--focus-ring); }
.mui-btn:disabled, .mui-btn[aria-disabled="true"] { opacity: 0.45; cursor: not-allowed; pointer-events: none; }
.mui-btn__icon { display: inline-flex; width: 1.15em; height: 1.15em; }

/* Primary — Signal Violet, white text */
.mui-btn--primary { background: var(--accent); color: var(--text-on-accent); }
.mui-btn--primary:hover { background: var(--accent-hover); }
.mui-btn--primary:active { background: var(--accent-pressed); }

/* Secondary — Mantle Black outline, transparent (§11.4) */
.mui-btn--secondary { background: transparent; color: var(--text-primary); border-color: var(--stroke-2); }
.mui-btn--secondary:hover { background: var(--surface-2); border-color: var(--text-primary); }
.mui-btn--secondary:active { background: var(--surface-3); }

/* Subtle — tinted violet, for in-context primary-ish actions */
.mui-btn--subtle { background: var(--accent-subtle-bg); color: var(--accent-subtle-fg); }
.mui-btn--subtle:hover { background: color-mix(in srgb, var(--accent-subtle-bg) 80%, var(--accent)); }

/* Transparent — text only, toolbars */
.mui-btn--transparent { background: transparent; color: var(--text-secondary); border-color: transparent; }
.mui-btn--transparent:hover { background: var(--surface-2); color: var(--text-primary); }

/* Gradient — reserved hero CTA accent (one per surface) */
.mui-btn--gradient { background: var(--mantle-gradient); color: #fff; border: none; }
.mui-btn--gradient:hover { filter: brightness(1.05); box-shadow: var(--shadow-md); }

/* Destructive */
.mui-btn--danger { background: var(--error); color: #fff; }
.mui-btn--danger:hover { filter: brightness(0.95); }

.mui-btn--sm { min-height: 2rem; padding: 0.375rem var(--space-3); font-size: var(--text-caption); }
.mui-btn--lg { min-height: 3rem; padding: 0.75rem var(--space-5); font-size: var(--text-body); }
.mui-btn--block { display: flex; width: 100%; }

.mui-icon-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 2.5rem; height: 2.5rem; padding: 0; background: transparent;
  color: var(--text-secondary); border: 1px solid transparent; border-radius: var(--radius-md); cursor: pointer;
  transition: background-color var(--duration-fast) var(--ease-standard), color var(--duration-fast) var(--ease-standard);
}
.mui-icon-btn:hover { background: var(--surface-2); color: var(--text-primary); }
.mui-icon-btn:focus-visible { outline: none; box-shadow: 0 0 0 2px var(--surface-0), 0 0 0 4px var(--focus-ring); }
.mui-icon-btn--sm { width: 2rem; height: 2rem; }
.mui-icon-btn--lg { width: 3rem; height: 3rem; }

.mui-btn-group { display: inline-flex; }
.mui-btn-group .mui-btn { border-radius: 0; }
.mui-btn-group .mui-btn:first-child { border-top-left-radius: var(--radius-lg); border-bottom-left-radius: var(--radius-lg); }
.mui-btn-group .mui-btn:last-child  { border-top-right-radius: var(--radius-lg); border-bottom-right-radius: var(--radius-lg); }
.mui-btn-group .mui-btn + .mui-btn  { margin-left: -1px; }

/* ============================================================
   3. FORM FIELDS
   ============================================================ */
.mui-field { display: flex; flex-direction: column; gap: var(--space-2); }
.mui-field__label { font-size: var(--text-sm); font-weight: var(--weight-medium); color: var(--text-primary); }
.mui-field__label .mui-field__required { color: var(--error); margin-left: 2px; }
.mui-field__hint  { font-size: var(--text-caption); color: var(--text-tertiary); }
.mui-field__error { font-size: var(--text-caption); color: var(--error); display: flex; align-items: center; gap: var(--space-1); }

.mui-input, .mui-textarea, .mui-select {
  width: 100%; padding: 0.5rem var(--space-3); min-height: 2.5rem;
  background: var(--surface-0); color: var(--text-primary);
  border: 1px solid var(--stroke-2); border-radius: var(--radius-md);
  font-family: var(--font-sans); font-size: var(--text-sm);
  transition: border-color var(--duration-fast) var(--ease-standard), box-shadow var(--duration-fast) var(--ease-standard);
}
[data-theme="dark"] .mui-input, [data-theme="dark"] .mui-textarea, [data-theme="dark"] .mui-select { background: var(--surface-2); }
.mui-input::placeholder, .mui-textarea::placeholder { color: var(--text-tertiary); }
.mui-input:focus, .mui-textarea:focus, .mui-select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--focus-ring); }
.mui-input:disabled, .mui-textarea:disabled, .mui-select:disabled { opacity: 0.55; cursor: not-allowed; }
.mui-input[aria-invalid="true"], .mui-textarea[aria-invalid="true"] { border-color: var(--error); }
.mui-input[aria-invalid="true"]:focus { box-shadow: 0 0 0 3px var(--error-bg); }
.mui-textarea { min-height: 6rem; resize: vertical; line-height: var(--leading-body); padding-top: var(--space-2); }
.mui-input--mono { font-family: var(--font-mono); }

.mui-select-wrap { position: relative; display: block; }
.mui-select { appearance: none; padding-right: var(--space-7); cursor: pointer; }
.mui-select-wrap::after {
  content: ""; position: absolute; right: var(--space-3); top: 50%;
  width: 0.5rem; height: 0.5rem; border-right: 1.5px solid var(--text-secondary);
  border-bottom: 1.5px solid var(--text-secondary); transform: translateY(-65%) rotate(45deg); pointer-events: none;
}

.mui-input-group { position: relative; display: flex; align-items: center; }
.mui-input-group__addon { position: absolute; display: inline-flex; align-items: center; color: var(--text-tertiary); pointer-events: none; }
.mui-input-group__addon--leading  { left: var(--space-3); }
.mui-input-group__addon--trailing { right: var(--space-3); }
.mui-input-group--leading  .mui-input { padding-left: var(--space-7); }
.mui-input-group--trailing .mui-input { padding-right: var(--space-7); }

/* Checkbox & radio */
.mui-check { display: inline-flex; align-items: flex-start; gap: var(--space-3); cursor: pointer; font-size: var(--text-sm); color: var(--text-primary); }
.mui-check__input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.mui-check__box {
  flex: 0 0 auto; width: 1.125rem; height: 1.125rem; margin-top: 1px;
  background: var(--surface-0); border: 1.5px solid var(--stroke-2); border-radius: var(--radius-sm);
  display: inline-flex; align-items: center; justify-content: center;
  transition: background var(--duration-fast) var(--ease-standard), border-color var(--duration-fast) var(--ease-standard);
}
[data-theme="dark"] .mui-check__box { background: var(--surface-2); }
.mui-check__box--radio { border-radius: var(--radius-full); }
.mui-check__input:checked + .mui-check__box { background: var(--accent); border-color: var(--accent); }
.mui-check__box::after { content: ""; opacity: 0; }
.mui-check__input:checked + .mui-check__box::after { opacity: 1; width: 0.3rem; height: 0.6rem; border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg) translate(-1px,-1px); }
.mui-check__box--radio::after { border: none !important; width: 0.45rem !important; height: 0.45rem !important; border-radius: var(--radius-full); background: #fff; transform: none !important; }
.mui-check__input:focus-visible + .mui-check__box { box-shadow: 0 0 0 3px var(--focus-ring); }
.mui-check__input:disabled + .mui-check__box { opacity: 0.5; }

/* Switch */
.mui-switch { display: inline-flex; align-items: center; gap: var(--space-3); cursor: pointer; font-size: var(--text-sm); }
.mui-switch__input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.mui-switch__track { position: relative; width: 2.5rem; height: 1.375rem; background: var(--stroke-2); border-radius: var(--radius-full); transition: background var(--duration-base) var(--ease-standard); flex: 0 0 auto; }
.mui-switch__thumb { position: absolute; top: 2px; left: 2px; width: 1.125rem; height: 1.125rem; background: #fff; border-radius: var(--radius-full); box-shadow: var(--shadow-sm); transition: transform var(--duration-base) var(--ease-standard); }
.mui-switch__input:checked + .mui-switch__track { background: var(--accent); }
.mui-switch__input:checked + .mui-switch__track .mui-switch__thumb { transform: translateX(1.125rem); }
.mui-switch__input:focus-visible + .mui-switch__track { box-shadow: 0 0 0 3px var(--focus-ring); }
.mui-switch__input:disabled + .mui-switch__track { opacity: 0.5; }

/* Slider */
.mui-slider { -webkit-appearance: none; appearance: none; width: 100%; height: 4px; border-radius: var(--radius-full); background: var(--stroke-2); outline: none; cursor: pointer; }
.mui-slider::-webkit-slider-thumb { -webkit-appearance: none; appearance: none; width: 1.125rem; height: 1.125rem; border-radius: var(--radius-full); background: var(--accent); border: 2px solid var(--surface-0); box-shadow: var(--shadow-sm); cursor: pointer; }
.mui-slider::-moz-range-thumb { width: 1.125rem; height: 1.125rem; border-radius: var(--radius-full); background: var(--accent); border: 2px solid var(--surface-0); box-shadow: var(--shadow-sm); cursor: pointer; }
.mui-slider:focus-visible { box-shadow: 0 0 0 3px var(--focus-ring); }

/* ============================================================
   4. CARDS
   ============================================================ */
.mui-card { background: var(--surface-0); border: 1px solid var(--stroke-1); border-radius: var(--radius-lg); padding: var(--space-5); box-shadow: var(--shadow-sm); transition: box-shadow var(--duration-base) var(--ease-standard), border-color var(--duration-base) var(--ease-standard); }
[data-theme="dark"] .mui-card { background: var(--surface-1); }
.mui-card__header { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--space-4); margin-bottom: var(--space-3); }
.mui-card__title { font-family: var(--font-sans); font-weight: var(--weight-semibold); font-size: var(--text-h3); line-height: var(--leading-heading); color: var(--text-primary); margin: 0; }
.mui-card__subtitle { font-size: var(--text-sm); color: var(--text-secondary); margin-top: 2px; }
.mui-card__body { color: var(--text-secondary); font-size: var(--text-sm); line-height: var(--leading-body); }
.mui-card__footer { display: flex; gap: var(--space-3); align-items: center; margin-top: var(--space-5); }
.mui-card--interactive { cursor: pointer; }
.mui-card--interactive:hover { box-shadow: var(--shadow-md); border-color: var(--stroke-2); }

/* Gradient accent: a single 3px top edge — the signature, used sparingly */
.mui-card--accent { position: relative; overflow: hidden; }
.mui-card--accent::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 3px; background: var(--mantle-gradient); }

/* Full gradient card — hero/CTA only, one per surface */
.mui-card--gradient { background: var(--mantle-gradient-diagonal); color: #fff; border: none; }
.mui-card--gradient .mui-card__title, .mui-card--gradient .mui-card__body { color: #fff; }

/* Dark indigo card — executive/cover feel (§7.2) */
.mui-card--indigo { background: var(--mantle-indigo); color: #fff; border: none; }
.mui-card--indigo .mui-card__title { color: #fff; }
.mui-card--indigo .mui-card__body { color: var(--mantle-soft-violet); }

/* ============================================================
   5. BADGES, TAGS, AVATARS
   ============================================================ */
.mui-badge { display: inline-flex; align-items: center; gap: var(--space-1); padding: 2px var(--space-2); font-size: var(--text-micro); font-weight: var(--weight-semibold); line-height: 1.5; border-radius: var(--radius-sm); background: var(--surface-3); color: var(--text-secondary); }
.mui-badge--accent  { background: var(--accent-subtle-bg); color: var(--accent-subtle-fg); }
.mui-badge--gradient{ background: var(--mantle-gradient); color: #fff; }
.mui-badge--success { background: var(--success-bg); color: var(--success); }
.mui-badge--warning { background: var(--warning-bg); color: var(--warning); }
.mui-badge--error   { background: var(--error-bg); color: var(--error); }
.mui-badge--info    { background: var(--info-bg); color: var(--info); }
.mui-badge--dot::before { content: ""; width: 6px; height: 6px; border-radius: var(--radius-full); background: currentColor; }

.mui-tag { display: inline-flex; align-items: center; gap: var(--space-2); padding: var(--space-1) var(--space-3); font-size: var(--text-sm); border-radius: var(--radius-full); background: var(--surface-2); color: var(--text-primary); border: 1px solid var(--stroke-1); }
.mui-tag__remove { display: inline-flex; cursor: pointer; color: var(--text-tertiary); border: none; background: none; padding: 0; line-height: 0; }
.mui-tag__remove:hover { color: var(--text-primary); }

.mui-avatar { display: inline-flex; align-items: center; justify-content: center; width: 2.5rem; height: 2.5rem; border-radius: var(--radius-full); background: var(--mantle-indigo); color: #fff; font-weight: var(--weight-semibold); font-size: var(--text-sm); overflow: hidden; flex: 0 0 auto; }
.mui-avatar img { width: 100%; height: 100%; object-fit: cover; }
.mui-avatar--gradient { background: var(--mantle-gradient-diagonal); }
.mui-avatar--sm { width: 2rem; height: 2rem; font-size: var(--text-micro); }
.mui-avatar--lg { width: 3.5rem; height: 3.5rem; font-size: var(--text-body-lg); }
.mui-avatar--xl { width: 5rem; height: 5rem; font-size: var(--text-h2); }
.mui-avatar-group { display: inline-flex; }
.mui-avatar-group .mui-avatar { border: 2px solid var(--surface-0); margin-left: -0.6rem; }
.mui-avatar-group .mui-avatar:first-child { margin-left: 0; }

/* ============================================================
   6. ALERTS & TOASTS
   ============================================================ */
.mui-alert { display: flex; gap: var(--space-3); padding: var(--space-4); border-radius: var(--radius-lg); border: 1px solid var(--stroke-1); background: var(--surface-1); color: var(--text-primary); }
.mui-alert__icon { flex: 0 0 auto; margin-top: 1px; }
.mui-alert__content { flex: 1 1 auto; }
.mui-alert__title { font-weight: var(--weight-semibold); font-size: var(--text-sm); margin: 0 0 2px; }
.mui-alert__body  { font-size: var(--text-sm); color: var(--text-secondary); margin: 0; }
.mui-alert__close { flex: 0 0 auto; background: none; border: none; color: var(--text-tertiary); cursor: pointer; line-height: 0; }
.mui-alert__close:hover { color: var(--text-primary); }
.mui-alert--info    { border-left: 3px solid var(--info);    background: var(--info-bg); }
.mui-alert--success { border-left: 3px solid var(--success); background: var(--success-bg); }
.mui-alert--warning { border-left: 3px solid var(--warning); background: var(--warning-bg); }
.mui-alert--error   { border-left: 3px solid var(--error);   background: var(--error-bg); }
.mui-alert--info    .mui-alert__icon { color: var(--info); }
.mui-alert--success .mui-alert__icon { color: var(--success); }
.mui-alert--warning .mui-alert__icon { color: var(--warning); }
.mui-alert--error   .mui-alert__icon { color: var(--error); }

.mui-toast-viewport { position: fixed; bottom: var(--space-5); right: var(--space-5); display: flex; flex-direction: column; gap: var(--space-3); z-index: 1000; max-width: 22rem; }
.mui-toast { display: flex; gap: var(--space-3); padding: var(--space-4); border-radius: var(--radius-lg); background: var(--surface-0); border: 1px solid var(--stroke-1); box-shadow: var(--shadow-lg); align-items: flex-start; }
[data-theme="dark"] .mui-toast { background: var(--surface-2); }
.mui-toast__icon { flex: 0 0 auto; }
.mui-toast__content { flex: 1 1 auto; }
.mui-toast__title { font-weight: var(--weight-semibold); font-size: var(--text-sm); margin: 0; }
.mui-toast__body  { font-size: var(--text-sm); color: var(--text-secondary); margin: 2px 0 0; }
@media (prefers-reduced-motion: no-preference) { .mui-toast { animation: mui-toast-in var(--duration-slow) var(--ease-standard); } }
@keyframes mui-toast-in { from { opacity: 0; transform: translateX(12px); } to { opacity: 1; transform: translateX(0); } }

/* ============================================================
   7. OVERLAYS — MODAL, DRAWER, POPOVER, TOOLTIP, MENU
   ============================================================ */
.mui-overlay { position: fixed; inset: 0; background: rgba(14,14,20,0.5); backdrop-filter: blur(2px); display: flex; align-items: center; justify-content: center; padding: var(--space-5); z-index: 900; }
@media (prefers-reduced-motion: no-preference) { .mui-overlay { animation: mui-fade var(--duration-base) var(--ease-standard); } }
@keyframes mui-fade { from { opacity: 0; } to { opacity: 1; } }

.mui-modal { background: var(--surface-0); border: 1px solid var(--stroke-1); border-radius: var(--radius-xl); box-shadow: var(--shadow-xl); width: 100%; max-width: var(--container-sm); max-height: 90vh; overflow: auto; padding: var(--space-6); }
[data-theme="dark"] .mui-modal { background: var(--surface-1); }
.mui-modal__header { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--space-4); margin-bottom: var(--space-3); }
.mui-modal__title { font-family: var(--font-sans); font-weight: var(--weight-semibold); font-size: var(--text-h2); line-height: var(--leading-heading); margin: 0; color: var(--text-primary); }
.mui-modal__body { color: var(--text-secondary); line-height: var(--leading-body); font-size: var(--text-sm); }
.mui-modal__footer { display: flex; justify-content: flex-end; gap: var(--space-3); margin-top: var(--space-6); }
@media (prefers-reduced-motion: no-preference) { .mui-modal { animation: mui-modal-in var(--duration-slow) var(--ease-standard); } }
@keyframes mui-modal-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

.mui-drawer-overlay { position: fixed; inset: 0; background: rgba(14,14,20,0.5); z-index: 900; }
.mui-drawer { position: fixed; top: 0; bottom: 0; right: 0; width: min(26rem, 92vw); background: var(--surface-0); border-left: 1px solid var(--stroke-1); box-shadow: var(--shadow-xl); z-index: 901; display: flex; flex-direction: column; padding: var(--space-6); }
[data-theme="dark"] .mui-drawer { background: var(--surface-1); }
.mui-drawer--left { right: auto; left: 0; border-left: none; border-right: 1px solid var(--stroke-1); }
@media (prefers-reduced-motion: no-preference) { .mui-drawer { animation: mui-drawer-in var(--duration-slow) var(--ease-standard); } }
@keyframes mui-drawer-in { from { transform: translateX(100%); } to { transform: translateX(0); } }

.mui-tooltip { position: absolute; z-index: 1100; background: var(--mantle-black); color: #fff; font-size: var(--text-micro); font-weight: var(--weight-medium); padding: var(--space-1) var(--space-2); border-radius: var(--radius-sm); box-shadow: var(--shadow-md); white-space: nowrap; pointer-events: none; }
[data-theme="dark"] .mui-tooltip { background: #2A2A38; }
.mui-tooltip-trigger { position: relative; display: inline-flex; }

.mui-popover { background: var(--surface-0); border: 1px solid var(--stroke-1); border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); padding: var(--space-4); min-width: 12rem; z-index: 1000; }
[data-theme="dark"] .mui-popover { background: var(--surface-2); }

.mui-menu { background: var(--surface-0); border: 1px solid var(--stroke-1); border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); padding: var(--space-1); min-width: 12rem; z-index: 1000; }
[data-theme="dark"] .mui-menu { background: var(--surface-2); }
.mui-menu__item { display: flex; align-items: center; gap: var(--space-3); width: 100%; padding: var(--space-2) var(--space-3); font-size: var(--text-sm); color: var(--text-primary); background: none; border: none; border-radius: var(--radius-md); cursor: pointer; text-align: left; text-decoration: none; }
.mui-menu__item:hover, .mui-menu__item[data-active="true"] { background: var(--surface-2); }
[data-theme="dark"] .mui-menu__item:hover { background: var(--surface-3); }
.mui-menu__item--danger { color: var(--error); }
.mui-menu__item:disabled { opacity: 0.5; cursor: not-allowed; }
.mui-menu__divider { height: 1px; background: var(--stroke-1); margin: var(--space-1) 0; border: none; }
.mui-menu__label { padding: var(--space-2) var(--space-3) var(--space-1); font-size: var(--text-micro); font-weight: var(--weight-semibold); letter-spacing: var(--tracking-wide); text-transform: uppercase; color: var(--text-tertiary); }

/* ============================================================
   8. TABS, ACCORDION, STEPPER
   ============================================================ */
.mui-tabs__list { display: flex; gap: var(--space-1); border-bottom: 1px solid var(--stroke-1); }
.mui-tabs__tab { position: relative; padding: var(--space-3) var(--space-4); font-size: var(--text-sm); font-weight: var(--weight-medium); color: var(--text-secondary); background: none; border: none; cursor: pointer; transition: color var(--duration-fast) var(--ease-standard); }
.mui-tabs__tab:hover { color: var(--text-primary); }
.mui-tabs__tab[aria-selected="true"] { color: var(--accent); }
.mui-tabs__tab[aria-selected="true"]::after { content: ""; position: absolute; left: var(--space-3); right: var(--space-3); bottom: -1px; height: 2px; background: var(--accent); border-radius: var(--radius-full); }
.mui-tabs__panel { padding: var(--space-5) 0; color: var(--text-secondary); font-size: var(--text-sm); }

.mui-accordion__item { border-bottom: 1px solid var(--stroke-1); }
.mui-accordion__trigger { display: flex; align-items: center; justify-content: space-between; width: 100%; padding: var(--space-4) 0; font-size: var(--text-sm); font-weight: var(--weight-medium); color: var(--text-primary); background: none; border: none; cursor: pointer; text-align: left; }
.mui-accordion__chevron { transition: transform var(--duration-base) var(--ease-standard); color: var(--text-tertiary); flex: 0 0 auto; }
.mui-accordion__trigger[aria-expanded="true"] .mui-accordion__chevron { transform: rotate(180deg); }
.mui-accordion__panel { padding: 0 0 var(--space-4); color: var(--text-secondary); font-size: var(--text-sm); line-height: var(--leading-body); }

.mui-stepper { display: flex; align-items: center; }
.mui-stepper__step { display: flex; align-items: center; gap: var(--space-2); }
.mui-stepper__dot { width: 1.625rem; height: 1.625rem; border-radius: var(--radius-full); display: inline-flex; align-items: center; justify-content: center; font-size: var(--text-caption); font-weight: var(--weight-semibold); background: var(--surface-2); color: var(--text-tertiary); border: 1.5px solid var(--stroke-2); flex: 0 0 auto; }
.mui-stepper__step[data-state="active"] .mui-stepper__dot { background: var(--accent); color: #fff; border-color: var(--accent); }
.mui-stepper__step[data-state="complete"] .mui-stepper__dot { background: var(--mantle-indigo); color: #fff; border-color: transparent; }
.mui-stepper__label { font-size: var(--text-sm); color: var(--text-secondary); }
.mui-stepper__step[data-state="active"] .mui-stepper__label { color: var(--text-primary); font-weight: var(--weight-medium); }
.mui-stepper__connector { flex: 1 1 auto; height: 1.5px; background: var(--stroke-2); margin: 0 var(--space-3); min-width: var(--space-5); }

/* ============================================================
   9. TABLE  (tabular numerals — §8.5)
   ============================================================ */
.mui-table-wrap { overflow-x: auto; border: 1px solid var(--stroke-1); border-radius: var(--radius-lg); }
.mui-table { width: 100%; border-collapse: collapse; font-size: var(--text-sm); }
.mui-table thead th { text-align: left; padding: var(--space-3) var(--space-4); font-size: var(--text-micro); font-weight: var(--weight-semibold); letter-spacing: var(--tracking-wide); text-transform: uppercase; color: var(--text-secondary); background: var(--surface-1); border-bottom: 1px solid var(--stroke-1); white-space: nowrap; }
[data-theme="dark"] .mui-table thead th { background: var(--surface-2); }
.mui-table tbody td { padding: var(--space-3) var(--space-4); color: var(--text-primary); border-bottom: 1px solid var(--stroke-1); font-variant-numeric: tabular-nums; }
.mui-table tbody tr:last-child td { border-bottom: none; }
.mui-table tbody tr:hover { background: var(--surface-1); }
[data-theme="dark"] .mui-table tbody tr:hover { background: var(--surface-2); }
.mui-table--striped tbody tr:nth-child(even) { background: var(--surface-1); }
[data-theme="dark"] .mui-table--striped tbody tr:nth-child(even) { background: var(--surface-2); }

/* ============================================================
   10. NAVIGATION
   ============================================================ */
.mui-navbar { display: flex; align-items: center; justify-content: space-between; gap: var(--space-5); padding: var(--space-3) var(--space-5); background: var(--surface-0); border-bottom: 1px solid var(--stroke-1); }
.mui-navbar__links { display: flex; align-items: center; gap: var(--space-1); list-style: none; margin: 0; padding: 0; }
.mui-navbar__link { padding: var(--space-2) var(--space-3); font-size: var(--text-sm); font-weight: var(--weight-medium); color: var(--text-secondary); text-decoration: none; border-radius: var(--radius-md); transition: color var(--duration-fast) var(--ease-standard), background var(--duration-fast) var(--ease-standard); }
.mui-navbar__link:hover { color: var(--text-primary); background: var(--surface-2); }
.mui-navbar__link[aria-current="page"] { color: var(--accent); }

.mui-sidebar { width: 15rem; background: var(--surface-1); border-right: 1px solid var(--stroke-1); padding: var(--space-4) var(--space-2); display: flex; flex-direction: column; gap: 2px; }
.mui-sidebar__section { font-size: var(--text-micro); font-weight: var(--weight-semibold); letter-spacing: var(--tracking-wide); text-transform: uppercase; color: var(--text-tertiary); padding: var(--space-3) var(--space-3) var(--space-1); }
.mui-sidebar__link { display: flex; align-items: center; gap: var(--space-3); padding: var(--space-2) var(--space-3); border-radius: var(--radius-md); font-size: var(--text-sm); font-weight: var(--weight-medium); color: var(--text-secondary); text-decoration: none; transition: color var(--duration-fast) var(--ease-standard), background var(--duration-fast) var(--ease-standard); }
.mui-sidebar__link:hover { background: var(--surface-2); color: var(--text-primary); }
.mui-sidebar__link[aria-current="page"] { background: var(--accent-subtle-bg); color: var(--accent-subtle-fg); }
.mui-sidebar__link[aria-current="page"] .mui-sidebar__icon { color: var(--accent-subtle-fg); }

.mui-breadcrumb { display: flex; align-items: center; gap: var(--space-2); font-size: var(--text-sm); list-style: none; margin: 0; padding: 0; flex-wrap: wrap; }
.mui-breadcrumb__item { display: flex; align-items: center; gap: var(--space-2); color: var(--text-tertiary); }
.mui-breadcrumb__link { color: var(--text-secondary); text-decoration: none; }
.mui-breadcrumb__link:hover { color: var(--link); }
.mui-breadcrumb__item[aria-current="page"] { color: var(--text-primary); font-weight: var(--weight-medium); }
.mui-breadcrumb__sep { color: var(--text-tertiary); }

.mui-pagination { display: inline-flex; align-items: center; gap: var(--space-1); }
.mui-pagination__item { min-width: 2.25rem; height: 2.25rem; padding: 0 var(--space-2); display: inline-flex; align-items: center; justify-content: center; font-size: var(--text-sm); color: var(--text-secondary); background: none; border: 1px solid transparent; border-radius: var(--radius-md); cursor: pointer; font-variant-numeric: tabular-nums; }
.mui-pagination__item:hover { background: var(--surface-2); color: var(--text-primary); }
.mui-pagination__item[aria-current="page"] { background: var(--accent); color: #fff; }
.mui-pagination__item:disabled { opacity: 0.4; cursor: not-allowed; }

/* ============================================================
   11. PROGRESS, SPINNER, SKELETON
   ============================================================ */
.mui-progress { width: 100%; height: 6px; background: var(--surface-3); border-radius: var(--radius-full); overflow: hidden; }
.mui-progress__bar { height: 100%; background: var(--accent); border-radius: var(--radius-full); transition: width var(--duration-slow) var(--ease-standard); }
.mui-progress--gradient .mui-progress__bar { background: var(--mantle-gradient); }
.mui-progress--indeterminate .mui-progress__bar { width: 40%; }
@media (prefers-reduced-motion: no-preference) { .mui-progress--indeterminate .mui-progress__bar { animation: mui-prog 1.4s var(--ease-emphasis) infinite; } }
@keyframes mui-prog { 0% { margin-left: -40%; } 100% { margin-left: 100%; } }

.mui-spinner { width: 1.25rem; height: 1.25rem; border-radius: var(--radius-full); border: 2px solid var(--surface-3); border-top-color: var(--accent); display: inline-block; }
@media (prefers-reduced-motion: no-preference) { .mui-spinner { animation: mui-spin 0.7s linear infinite; } }
.mui-spinner--sm { width: 1rem; height: 1rem; }
.mui-spinner--lg { width: 2rem; height: 2rem; border-width: 3px; }
@keyframes mui-spin { to { transform: rotate(360deg); } }

.mui-skeleton { background: var(--surface-2); border-radius: var(--radius-md); position: relative; overflow: hidden; }
@media (prefers-reduced-motion: no-preference) { .mui-skeleton::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, transparent, rgba(127,38,253,0.08), transparent); animation: mui-shimmer 1.4s infinite; } }
@keyframes mui-shimmer { 100% { transform: translateX(100%); } }
.mui-skeleton--text { height: 0.8rem; margin: var(--space-2) 0; }
.mui-skeleton--circle { border-radius: var(--radius-full); }

/* ============================================================
   12. DIVIDER, EMPTY STATE, HERO, MOTIF
   ============================================================ */
.mui-divider { height: 1px; background: var(--stroke-1); border: none; margin: var(--space-5) 0; }
.mui-divider--gradient { height: 2px; background: var(--mantle-gradient); }
.mui-divider--vertical { width: 1px; height: auto; align-self: stretch; margin: 0 var(--space-4); }

.mui-empty { text-align: center; padding: var(--space-8) var(--space-5); display: flex; flex-direction: column; align-items: center; gap: var(--space-3); }
.mui-empty__icon { width: 2.5rem; height: 2.5rem; color: var(--text-tertiary); }
.mui-empty__title { font-family: var(--font-sans); font-weight: var(--weight-semibold); font-size: var(--text-h3); color: var(--text-primary); margin: 0; }
.mui-empty__body { color: var(--text-secondary); max-width: 28rem; margin: 0; font-size: var(--text-sm); }

/* Hero band — Mantle Indigo or gradient, one signature surface per view */
.mui-hero { background: var(--mantle-indigo); color: #fff; padding: var(--space-8) var(--space-6); border-radius: var(--radius-2xl); position: relative; overflow: hidden; }
.mui-hero--gradient { background: var(--mantle-gradient-diagonal); }
.mui-hero__title { color: #fff; }
.mui-hero__subtitle { color: var(--mantle-soft-violet); }

/* The signature dotted halftone motif (from letterhead/deck) — decorative accent.
   Use as a corner ornament; pointer-events none so it never blocks UI. */
.mui-motif-dots {
  --dot: var(--mantle-violet);
  background-image: radial-gradient(circle, var(--dot) 1.4px, transparent 1.6px);
  background-size: 14px 14px;
  -webkit-mask-image: radial-gradient(ellipse at bottom right, #000 0%, transparent 70%);
  mask-image: radial-gradient(ellipse at bottom right, #000 0%, transparent 70%);
  opacity: 0.5; pointer-events: none;
}
.mui-motif-dots--cyan { --dot: var(--mantle-cyan); }
.mui-motif-corner { position: absolute; right: 0; bottom: 0; width: 220px; height: 180px; }

/* Banner — gradient, motto/CTA strip */
.mui-banner { display: flex; align-items: center; justify-content: center; gap: var(--space-3); padding: var(--space-3) var(--space-5); background: var(--mantle-gradient); color: #fff; font-size: var(--text-sm); font-weight: var(--weight-medium); }

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
}

/* ============================================================
   13. LOGO  (Brand Guidelines §6)
   The logo is the official artwork only — never recreated. The dark-wordmark
   artwork is used on light surfaces and the white-wordmark artwork on dark
   surfaces (§6.3). When using the theme-aware vanilla classes below, place BOTH
   images and let CSS show the correct one for the active theme.
   ============================================================ */
.mui-logo { display: inline-flex; align-items: center; height: auto; }
.mui-logo img { width: auto; }

/* Theme-aware swap: place BOTH images; CSS shows the right one for the theme.
   These rules deliberately match `.mui-logo img.<class>` specificity and use
   the cascade order so they win over the base `.mui-logo img` rule. Do NOT add
   an inline `display` to the images — it would override these. */
.mui-logo img.mui-logo__on-light { display: block; }
.mui-logo img.mui-logo__on-dark  { display: none; }
[data-theme="dark"] .mui-logo img.mui-logo__on-light { display: none; }
[data-theme="dark"] .mui-logo img.mui-logo__on-dark  { display: block; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .mui-logo img.mui-logo__on-light { display: none; }
  :root:not([data-theme="light"]) .mui-logo img.mui-logo__on-dark  { display: block; }
}
