/* =====================================================================
   EduMarkets — lockup system
   Drop-in CSS for the masterbrand and module-led lockups.
   Pairs with Inter Tight (loaded separately — see README).

   Two components:
     .ms-mark       — masterbrand lockup (wordmark only, no module label)
     .lockup-led    — module-led lockup (used on dashboard, switcher,
                      in-module top bar)

   Both are size-driven: change `--ms-wm-size` / `--led-name-size` and
   everything else scales. Bar colour is set via `--bar-color` on the
   element (use the per-module palette variables below).
   ===================================================================== */


/* ---------------------------------------------------------------------
   Per-module palette — single colour per module, works on white and #0B0B0C
   --------------------------------------------------------------------- */
:root{
  --mod-intro-to-markets:      #C44C00;
  --mod-macro:                 #0074D4;
  --mod-money-markets:         #668800;
  --mod-foreign-exchange:      #008796;
  --mod-fixed-income:          #9D6400;
  --mod-credit:                #C6054F;
  --mod-equities:              #298646;
  --mod-futures:               #3665E4;
  --mod-trs-cfds:              #B55D00;
  --mod-cross-currency-swaps:  #008672;
  --mod-eq-fx-options:         #C42671;
  --mod-ir-options:            #8E7500;
  --mod-securitised-products:  #0081B2;
  --mod-risk:                  #7156D8;
  --mod-trade-lifecycle:       #B53199;
  --mod-hedge-funds:           #9531C5;

  --brand-core-red:            #CB0606;
}


/* ---------------------------------------------------------------------
   MASTERBRAND LOCKUP — .ms-mark
     .ms-mark.tall    landing / marketing  (signature, taller-than-text bar)
     .ms-mark.equal   in-app topbar        (bar matches cap-height)
   Sizes: .xl / .lg / .md / .sm
   --------------------------------------------------------------------- */
.ms-mark{
  display: inline-flex;
  align-items: flex-start;
  gap: calc(var(--ms-wm-size, 22px) * 0.10);
  font-family: 'Inter Tight', 'Helvetica Neue', 'Arial', sans-serif;
  line-height: 1;
  color: var(--ms-ink, #111);
}
.ms-mark .bar{
  flex: none;
  width: max(2px, calc(var(--ms-wm-size, 22px) * 0.111));
  background: var(--bar-color, #CB0606);
}
.ms-mark .wm{
  font-weight: 400;
  font-size: var(--ms-wm-size, 22px);
  letter-spacing: -0.018em;
  white-space: nowrap;
  color: inherit;
  line-height: 1;
}
.ms-mark .wm b{ font-weight: 700;}

/* sizes */
.ms-mark.xl{ --ms-wm-size: 44px;}
.ms-mark.lg{ --ms-wm-size: 32px;}
.ms-mark.md{ --ms-wm-size: 22px;}
.ms-mark.sm{ --ms-wm-size: 16px;}

/* TALL — signature bar, extends below text more than above */
.ms-mark.tall .bar{
  height: calc(var(--ms-wm-size, 22px) * 1.445);
  margin-top: calc(var(--ms-wm-size, 22px) * -0.04);
}

/* EQUAL — bar matches wordmark cap height exactly */
.ms-mark.equal{ align-items: stretch;}
.ms-mark.equal .wm{ text-box: trim-both cap alphabetic;}
.ms-mark.equal .bar{
  height: auto;
  align-self: stretch;
  margin: 0;
}


/* ---------------------------------------------------------------------
   MODULE-LED LOCKUP — .lockup-led
   Module name dominant; EduMarkets sits above as a supra-label.
   Bar height exactly matches the rendered text (uses text-box-trim).
   Module name clamps to 2 lines max.

   Sizes: .xl / .lg / .md (dashboard tiles) / .sm (switcher cells / in-module header) / .xs
   --------------------------------------------------------------------- */
.lockup-led{
  display: inline-flex;
  align-items: stretch;
  gap: calc(var(--led-wm-size, 12px) * 0.3);
  font-family: 'Inter Tight', 'Helvetica Neue', 'Arial', sans-serif;
  line-height: 1;
  color: var(--led-ink, #111);
}
.lockup-led .bar{
  flex: none;
  align-self: stretch;
  width: max(2px, calc(var(--led-wm-size, 12px) * 0.25));
  background: var(--bar-color, #CB0606);
}
.lockup-led .group{
  display: flex; flex-direction: column;
  gap: var(--led-gap-v, 2px);
  min-width: 0;
}
.lockup-led .wm{
  font-weight: 400;
  font-size: var(--led-wm-size, 12px);
  letter-spacing: -0.018em;
  line-height: 1;
  white-space: nowrap;
  color: inherit;
  text-box: trim-both cap alphabetic;
}
.lockup-led .wm b{ font-weight: 700;}
.lockup-led .name{
  font-weight: 400;
  font-size: var(--led-name-size, 21px);
  letter-spacing: 0;
  text-transform: uppercase;
  line-height: 1.1;
  color: inherit;
  text-wrap: balance;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-box: trim-both cap alphabetic;
}

/* sizes */
.lockup-led.xl{ --led-name-size: 34px; --led-wm-size: 15px; --led-gap-v: 2px;}
.lockup-led.lg{ --led-name-size: 26px; --led-wm-size: 14px; --led-gap-v: 2px;}
.lockup-led.md{ --led-name-size: 21px; --led-wm-size: 12px; --led-gap-v: 2px;}
.lockup-led.sm{ --led-name-size: 16px; --led-wm-size: 10px; --led-gap-v: 1px;}
.lockup-led.xs{ --led-name-size: 13px; --led-wm-size: 9px;  --led-gap-v: 1px;}


/* ---------------------------------------------------------------------
   Dark-mode ink override
     Apply [data-theme="dark"] (or the equivalent class your platform uses)
     to a root element. The lockup wordmark/module-name flips white; bar
     colour stays the same in both modes.
   --------------------------------------------------------------------- */
[data-theme="dark"] .ms-mark,
[data-theme="dark"] .lockup-led{
  --ms-ink: #F0EFE9;
  --led-ink: #F0EFE9;
}
