/* ==========================================================================
   mc_workspace.css — Master Cares Enterprise Workspace Selector
   Blueprint v2.1 §22–33. Brand palette §31–32, design system §33.
   Self-contained: no framework dependency. Light + dark themes via
   [data-theme] on <html> (set before first paint by login_selector.php).
   ========================================================================== */

/* ── Design tokens ─────────────────────────────────────────────────────── */
:root {
  /* Brand */
  --mc-royal: #26258C;
  --mc-royal-600: #1f1e75;
  --mc-royal-700: #18175c;
  --mc-gold: #FEC247;
  --mc-crimson: #ED1C24;
  --mc-charcoal: #2D1F22;
  --mc-silver: #E2E2E3;
  --mc-white: #FFFFFF;
  --mc-success: #16A34A;
  --mc-info: #2563EB;
  --mc-warning: #EA580C;
  --mc-purple: #7C3AED;

  /* Surfaces & text (light) */
  --bg: #F4F5FA;
  --bg-accent: #EBEDF7;
  --surface: #FFFFFF;
  --surface-2: #F7F8FC;
  --surface-glass: rgba(255, 255, 255, 0.78);
  --border: #E2E2E3;
  --border-strong: #CFD0DA;
  --text: #2D1F22;
  --text-2: #4B4550;
  --muted: #6B6874;
  --focus: #2563EB;
  --nav-bg: rgba(255, 255, 255, 0.86);
  --skel-a: #ECEDF3;
  --skel-b: #F7F8FC;
  --shadow-sm: 0 1px 2px rgba(22, 20, 60, .06), 0 2px 6px rgba(22, 20, 60, .05);
  --shadow-md: 0 8px 24px rgba(22, 20, 60, .08), 0 2px 6px rgba(22, 20, 60, .05);
  --shadow-lg: 0 22px 48px rgba(22, 20, 60, .14), 0 6px 14px rgba(22, 20, 60, .07);

  /* Shape (§33) */
  --r-card: 20px;
  --r-btn: 14px;
  --r-input: 12px;

  /* Type (§33) */
  --font-head: 'Poppins', 'Nunito Sans', 'Segoe UI', system-ui, sans-serif;
  --font-body: 'Inter', 'Nunito Sans', 'Segoe UI', system-ui, -apple-system, sans-serif;

  --ease: cubic-bezier(.2, .8, .2, 1);
  --nav-h: 68px;
  --wrap: 1280px;
  --gutter: clamp(16px, 3vw, 32px);
}

:root[data-theme="dark"] {
  --bg: #0E0E1B;
  --bg-accent: #14142A;
  --surface: #171729;
  --surface-2: #1D1D33;
  --surface-glass: rgba(26, 26, 46, 0.78);
  --border: #2A2A45;
  --border-strong: #3A3A5C;
  --text: #EEEDF3;
  --text-2: #C9C7D6;
  --muted: #9C9AB0;
  --focus: #7EA6FF;
  --nav-bg: rgba(17, 17, 32, 0.86);
  --skel-a: #22223A;
  --skel-b: #2B2B46;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .4);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, .35);
  --shadow-lg: 0 22px 48px rgba(0, 0, 0, .5);
}

/* ── Base ──────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body.mc-ws {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  display: flex;
  flex-direction: column;
  transition: background-color .3s var(--ease), color .3s var(--ease);
}
main { flex: 1 0 auto; }
img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--font-head); margin: 0; }
p { margin: 0; }
button { font: inherit; color: inherit; }

:focus { outline: none; }
:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
  border-radius: 6px;
}

.mc-visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.mc-skip {
  position: absolute; left: 12px; top: -48px; z-index: 100;
  background: var(--mc-royal); color: #fff; padding: 10px 16px;
  border-radius: 10px; font-weight: 600; text-decoration: none;
  transition: top .2s var(--ease);
}
.mc-skip:focus { top: 12px; }

/* ── Buttons ───────────────────────────────────────────────────────────── */
.mc-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 1px solid transparent; border-radius: var(--r-btn);
  padding: 11px 18px; font-weight: 600; font-size: 14px;
  text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: transform .15s var(--ease), box-shadow .2s var(--ease), background-color .2s var(--ease);
}
.mc-btn--sm { padding: 8px 14px; font-size: 13.5px; }
.mc-btn--primary { background: var(--mc-royal); color: #fff; }
.mc-btn--primary:hover { background: var(--mc-royal-600); box-shadow: 0 6px 16px rgba(38, 37, 140, .3); }
.mc-btn:active { transform: translateY(1px); }

.mc-icon-btn {
  position: relative;
  display: inline-grid; place-items: center;
  width: 42px; height: 42px; border-radius: 12px;
  border: 1px solid var(--border); background: var(--surface);
  color: var(--text-2); cursor: pointer; font-size: 16px;
  transition: background-color .2s var(--ease), color .2s var(--ease), border-color .2s var(--ease), transform .15s var(--ease);
}
.mc-icon-btn:hover { color: var(--mc-royal); border-color: var(--border-strong); background: var(--surface-2); }
:root[data-theme="dark"] .mc-icon-btn:hover { color: var(--mc-gold); }
.mc-icon-btn[aria-expanded="true"] { color: var(--mc-royal); border-color: var(--mc-royal); }
:root[data-theme="dark"] .mc-icon-btn[aria-expanded="true"] { color: var(--mc-gold); border-color: var(--mc-gold); }
.mc-icon-btn--ai {
  color: #fff; border-color: transparent;
  background: linear-gradient(135deg, var(--mc-royal), var(--mc-purple));
  box-shadow: 0 4px 14px rgba(124, 58, 237, .32);
}
.mc-icon-btn--ai:hover { color: var(--mc-gold); background: linear-gradient(135deg, var(--mc-royal-600), var(--mc-purple)); border-color: transparent; }
.mc-icon-btn--ghost { border-color: transparent; background: transparent; }

.mc-badge {
  position: absolute; top: -5px; right: -5px;
  min-width: 20px; height: 20px; padding: 0 5px;
  border-radius: 999px; background: var(--mc-crimson); color: #fff;
  font-size: 11px; font-weight: 700; line-height: 20px; text-align: center;
  border: 2px solid var(--surface);
}

/* Theme icon swap */
.mc-theme-icon--light { display: none; }
:root[data-theme="dark"] .mc-theme-icon--light { display: inline-block; }
:root[data-theme="dark"] .mc-theme-icon--dark { display: none; }

/* ── Top navigation ────────────────────────────────────────────────────── */
.mc-nav {
  position: sticky; top: 0; z-index: 40;
  background: var(--nav-bg);
  backdrop-filter: saturate(1.4) blur(14px);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid var(--border);
}
.mc-nav__inner {
  max-width: var(--wrap); margin: 0 auto;
  height: var(--nav-h);
  padding: 0 var(--gutter);
  display: flex; align-items: center; gap: 18px;
}
.mc-brand { display: flex; align-items: center; gap: 11px; text-decoration: none; flex-shrink: 0; }
.mc-brand__crest { width: 40px; height: 40px; object-fit: contain; border-radius: 10px; }
.mc-brand__text { display: flex; flex-direction: column; line-height: 1.08; }
.mc-brand__title { font-family: var(--font-head); font-weight: 800; font-size: 15px; letter-spacing: .06em; color: var(--mc-royal); }
.mc-brand__sub { font-family: var(--font-head); font-weight: 600; font-size: 10.5px; letter-spacing: .16em; color: var(--muted); }
:root[data-theme="dark"] .mc-brand__title { color: #fff; }

.mc-nav__links { display: flex; gap: 4px; }
.mc-nav__link {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 9px 14px; border-radius: 10px;
  text-decoration: none; font-weight: 600; font-size: 14px; color: var(--text-2);
}
.mc-nav__link:hover { background: var(--surface-2); color: var(--text); }
.mc-nav__link.is-active { color: var(--mc-royal); background: rgba(38, 37, 140, .08); }
:root[data-theme="dark"] .mc-nav__link.is-active { color: var(--mc-gold); background: rgba(254, 194, 71, .1); }

.mc-nav__actions { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.mc-only-mobile { display: none; }

/* Search */
.mc-search { position: relative; flex: 1 1 320px; max-width: 440px; }
.mc-search__icon { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); font-size: 14px; pointer-events: none; }
.mc-search__input {
  width: 100%; height: 42px;
  padding: 0 40px 0 40px;
  border: 1px solid var(--border); border-radius: var(--r-input);
  background: var(--surface-2); color: var(--text);
  font: 500 14px var(--font-body);
  transition: border-color .2s var(--ease), box-shadow .2s var(--ease), background-color .2s var(--ease);
}
.mc-search__input::placeholder { color: var(--muted); }
.mc-search__input:focus { outline: none; border-color: var(--mc-royal); background: var(--surface); box-shadow: 0 0 0 4px rgba(38, 37, 140, .14); }
:root[data-theme="dark"] .mc-search__input:focus { border-color: var(--focus); box-shadow: 0 0 0 4px rgba(126, 166, 255, .18); }
.mc-search__input::-webkit-search-cancel-button { cursor: pointer; }
.mc-search__kbd {
  position: absolute; right: 10px; top: 50%; transform: translateY(-50%);
  font: 600 11px var(--font-body); color: var(--muted);
  border: 1px solid var(--border-strong); border-radius: 6px; padding: 1px 7px; background: var(--surface);
}
.mc-search__input:focus ~ .mc-search__kbd { display: none; }
.mc-search__list {
  position: absolute; left: 0; right: 0; top: calc(100% + 8px);
  margin: 0; padding: 6px; list-style: none;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 14px; box-shadow: var(--shadow-lg);
  max-height: min(420px, 70vh); overflow-y: auto; z-index: 50;
}
.mc-search__group { padding: 8px 10px 4px; font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.mc-search__opt {
  display: flex; align-items: center; gap: 11px;
  padding: 9px 10px; border-radius: 10px; cursor: pointer; font-weight: 500;
}
.mc-search__opt i { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 8px; background: var(--surface-2); color: var(--mc-royal); font-size: 13px; flex-shrink: 0; }
:root[data-theme="dark"] .mc-search__opt i { color: var(--mc-gold); }
.mc-search__opt small { margin-left: auto; color: var(--muted); font-size: 12px; }
.mc-search__opt[aria-selected="true"], .mc-search__opt:hover { background: rgba(38, 37, 140, .08); }
:root[data-theme="dark"] .mc-search__opt[aria-selected="true"], :root[data-theme="dark"] .mc-search__opt:hover { background: rgba(254, 194, 71, .1); }
.mc-search__opt[aria-disabled="true"] { opacity: .6; cursor: default; }
.mc-search__none { padding: 14px 12px; color: var(--muted); font-size: 13.5px; }

/* Popovers (bell, profile) */
.mc-pop { position: relative; }
.mc-pop__panel {
  position: absolute; right: 0; top: calc(100% + 10px);
  width: 280px; background: var(--surface);
  border: 1px solid var(--border); border-radius: 16px;
  box-shadow: var(--shadow-lg); z-index: 60; overflow: hidden;
  animation: mc-pop-in .18s var(--ease);
}
.mc-pop__panel--wide { width: 360px; }
.mc-pop__head { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px; border-bottom: 1px solid var(--border); font-family: var(--font-head); }
.mc-pop__meta { font-size: 12px; color: var(--muted); font-family: var(--font-body); }
.mc-pop__body { max-height: 360px; overflow-y: auto; }
.mc-pop__foot { display: block; text-align: center; padding: 12px; font-weight: 600; font-size: 13.5px; color: var(--mc-royal); text-decoration: none; border-top: 1px solid var(--border); }
:root[data-theme="dark"] .mc-pop__foot { color: var(--mc-gold); }
.mc-pop__foot:hover { background: var(--surface-2); }
.mc-pop__user { display: flex; gap: 12px; align-items: center; padding: 16px; border-bottom: 1px solid var(--border); }
.mc-pop__user strong { display: block; font-size: 14.5px; }
.mc-pop__user span { font-size: 12.5px; color: var(--muted); }

.mc-notif { display: flex; gap: 12px; padding: 12px 16px; text-decoration: none; border-bottom: 1px solid var(--border); }
.mc-notif:last-child { border-bottom: 0; }
.mc-notif:hover { background: var(--surface-2); }
.mc-notif.is-unread { background: rgba(37, 99, 235, .06); }
.mc-notif__icon { width: 34px; height: 34px; flex-shrink: 0; border-radius: 10px; display: grid; place-items: center; background: rgba(38, 37, 140, .1); color: var(--mc-royal); }
:root[data-theme="dark"] .mc-notif__icon { background: rgba(254, 194, 71, .12); color: var(--mc-gold); }
.mc-notif__title { font-weight: 600; font-size: 13.5px; display: block; }
.mc-notif__body { font-size: 12.5px; color: var(--text-2); display: block; margin-top: 2px; }
.mc-notif__when { font-size: 11.5px; color: var(--muted); display: block; margin-top: 4px; }

.mc-menu-item { display: flex; align-items: center; gap: 12px; padding: 11px 16px; text-decoration: none; font-size: 14px; font-weight: 500; }
.mc-menu-item i { width: 18px; color: var(--muted); text-align: center; }
.mc-menu-item:hover, .mc-menu-item:focus-visible { background: var(--surface-2); outline-offset: -3px; }
.mc-menu-item--danger { color: var(--mc-crimson); border-top: 1px solid var(--border); }
.mc-menu-item--danger i { color: var(--mc-crimson); }

.mc-profile-btn {
  display: flex; align-items: center; gap: 10px;
  padding: 4px 10px 4px 4px; border-radius: 14px;
  border: 1px solid var(--border); background: var(--surface); cursor: pointer;
  max-width: 250px;
}
.mc-profile-btn:hover { background: var(--surface-2); }
.mc-profile-btn__text { display: flex; flex-direction: column; text-align: left; line-height: 1.2; min-width: 0; }
.mc-profile-btn__name { font-weight: 600; font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mc-profile-btn__role { font-size: 11.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mc-profile-btn__chev { font-size: 11px; color: var(--muted); }
.mc-avatar {
  width: 34px; height: 34px; border-radius: 10px; flex-shrink: 0;
  display: grid; place-items: center;
  background: linear-gradient(135deg, var(--mc-royal), #4b49c9);
  color: #fff; font: 700 13px var(--font-head); letter-spacing: .02em;
}
.mc-avatar--lg { width: 44px; height: 44px; border-radius: 12px; font-size: 15px; }

/* ── Hero ──────────────────────────────────────────────────────────────── */
.mc-hero {
  position: relative; isolation: isolate; overflow: hidden;
  color: #fff;
  padding: clamp(40px, 7vw, 84px) 0 clamp(120px, 14vw, 170px);
  background:
    radial-gradient(1200px 500px at 85% -10%, rgba(254, 194, 71, .22), transparent 60%),
    radial-gradient(900px 480px at -10% 110%, rgba(237, 28, 36, .18), transparent 60%),
    linear-gradient(135deg, #1b1a6b 0%, #26258C 45%, #33329f 100%);
}
/* Subtle geometric texture when no campus photo is installed */
.mc-hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1; opacity: .09;
  background-image:
    linear-gradient(rgba(255,255,255,.6) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.6) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(ellipse at 70% 30%, #000 20%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse at 70% 30%, #000 20%, transparent 70%);
}
/* Campus photo slider + Royal Blue overlay (§25) */
.mc-hero.has-photo { background: #1b1a6b; }
.mc-hero.has-photo::before { display: none; }
.mc-hero__slides { position: absolute; inset: 0; z-index: -1; overflow: hidden; }
.mc-hero__slide {
  position: absolute; inset: 0;
  background-size: cover; background-position: center 30%; background-repeat: no-repeat;
  opacity: 0; transform: scale(1.06);
  transition: opacity 1.4s var(--ease), transform 7s linear;
}
.mc-hero__slide.is-active { opacity: 1; transform: scale(1); }
.mc-hero__slides::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(105deg, rgba(27, 26, 107, .92) 0%, rgba(38, 37, 140, .78) 45%, rgba(38, 37, 140, .45) 100%);
}

/* Slider caption + controls */
.mc-slider-ui { margin-top: 24px; display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; }
.mc-slider-ui__chip {
  --chip: var(--mc-gold);
  display: inline-flex; align-items: center; gap: 9px;
  padding: 7px 14px 7px 10px; border-radius: 999px;
  font-size: 13px; font-weight: 600; color: #fff;
  background: rgba(255, 255, 255, .12); border: 1px solid rgba(255, 255, 255, .22);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  transition: opacity .35s var(--ease);
}
.mc-slider-ui__chip.is-changing { opacity: 0; }
.mc-slider-ui__dot { width: 10px; height: 10px; border-radius: 50%; background: var(--chip); box-shadow: 0 0 0 3px rgba(255, 255, 255, .25); transition: background-color .35s var(--ease); }
.mc-slider-ui__nav { display: flex; align-items: center; gap: 8px; }
.mc-slider-ui__pip {
  --chip: var(--mc-gold);
  width: 10px; height: 10px; padding: 0; border-radius: 999px; cursor: pointer;
  border: 0; background: rgba(255, 255, 255, .4);
  transition: width .3s var(--ease), background-color .3s var(--ease);
}
.mc-slider-ui__pip:hover { background: rgba(255, 255, 255, .75); }
.mc-slider-ui__pip.is-active { width: 28px; background: var(--chip); }
.mc-slider-ui__pause {
  width: 30px; height: 30px; margin-left: 4px; border-radius: 50%; cursor: pointer;
  display: inline-grid; place-items: center; font-size: 11px;
  color: #fff; background: rgba(255, 255, 255, .12); border: 1px solid rgba(255, 255, 255, .25);
}
.mc-slider-ui__pause:hover { background: rgba(255, 255, 255, .22); }
.mc-slider-ui__pause .fa-play { display: none; }
.mc-slider-ui__pause[aria-pressed="true"] .fa-play { display: inline-block; }
.mc-slider-ui__pause[aria-pressed="true"] .fa-pause { display: none; }
.mc-hero__inner {
  max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter);
  display: grid; grid-template-columns: 1.4fr 1fr; gap: 40px; align-items: center;
}
.mc-hero__greet {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 14px; margin-bottom: 18px;
  border-radius: 999px; font-size: 13.5px; font-weight: 600;
  background: rgba(255, 255, 255, .12); border: 1px solid rgba(255, 255, 255, .22);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
}
.mc-hero__greet i { color: var(--mc-gold); }
.mc-hero__eyebrow {
  font: 700 clamp(13px, 1.4vw, 15px) var(--font-head);
  letter-spacing: .32em; color: var(--mc-gold);
}
.mc-hero__title {
  margin-top: 8px;
  font-size: clamp(34px, 5.4vw, 62px); font-weight: 800; line-height: 1.05; letter-spacing: -.02em;
}
.mc-hero__subtitle { margin-top: 14px; font-size: clamp(15px, 1.6vw, 18px); color: rgba(255, 255, 255, .84); }

.mc-hero__quote {
  margin: 0; justify-self: end; max-width: 380px;
  padding: 26px 28px; border-radius: var(--r-card);
  background: rgba(255, 255, 255, .1);
  border: 1px solid rgba(255, 255, 255, .22);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 20px 40px rgba(10, 10, 50, .25);
}
.mc-hero__quote-mark { font-size: 26px; color: var(--mc-gold); }
.mc-hero__quote blockquote {
  margin: 10px 0 0; font: italic 700 clamp(20px, 2.3vw, 27px)/1.3 var(--font-head);
}
.mc-hero__quote figcaption { margin-top: 12px; font-size: 13px; color: rgba(255, 255, 255, .75); letter-spacing: .04em; }

/* ── Workspace cards ───────────────────────────────────────────────────── */
.mc-workspaces {
  position: relative; z-index: 2;
  max-width: var(--wrap); margin: clamp(-120px, -10vw, -80px) auto 0;
  padding: 0 var(--gutter);
}
.mc-workspaces:focus { outline: none; }
.mc-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 22px; }

.mc-card {
  --ws: var(--mc-royal);
  --ws-ink: #fff;
  position: relative; display: flex; flex-direction: column;
  padding: 22px 22px 22px;
  border-radius: var(--r-card);
  background: var(--surface-glass);
  border: 1px solid rgba(255, 255, 255, .55);
  backdrop-filter: blur(18px) saturate(1.3); -webkit-backdrop-filter: blur(18px) saturate(1.3);
  box-shadow: var(--shadow-md);
  overflow: hidden;
  transition: transform .25s var(--ease), box-shadow .25s var(--ease), border-color .25s var(--ease);
  animation: mc-rise .55s var(--ease) both;
  animation-delay: calc(var(--d, 0) * 70ms);
}
:root[data-theme="dark"] .mc-card { border-color: var(--border); }
/* Accent bar in the workspace colour */
.mc-card::before {
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 5px;
  background: var(--ws);
}
/* Soft colour wash */
.mc-card::after {
  content: ""; position: absolute; right: -60px; top: -60px; width: 180px; height: 180px;
  border-radius: 50%; background: var(--ws); opacity: .09; pointer-events: none;
  transition: transform .4s var(--ease), opacity .3s var(--ease);
}
.mc-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }
.mc-card:hover::after { transform: scale(1.25); opacity: .14; }

.mc-card__top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.mc-card__icon {
  width: 52px; height: 52px; border-radius: 16px;
  display: grid; place-items: center; font-size: 22px;
  background: var(--ws); color: var(--ws-ink);
  box-shadow: 0 10px 22px color-mix(in srgb, var(--ws) 35%, transparent);
}
.mc-card__code {
  font: 700 12px var(--font-head); letter-spacing: .12em;
  padding: 5px 10px; border-radius: 999px;
  color: var(--text-2); background: var(--surface-2); border: 1px solid var(--border);
}
.mc-card__name { font-size: 17.5px; font-weight: 700; line-height: 1.3; color: var(--text); min-height: 2.6em; }
.mc-card__tagline { margin-top: 6px; font-size: 13.5px; font-weight: 600; color: var(--muted); letter-spacing: .01em; }

.mc-stats {
  margin: 18px 0 0; padding: 14px 0 0;
  border-top: 1px dashed var(--border-strong);
  display: grid; grid-template-columns: 1fr 1fr; gap: 12px 14px;
}
.mc-stat { min-width: 0; }
.mc-stat dt { font-size: 11.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.mc-stat dd {
  margin: 3px 0 0; min-height: 28px;
  display: flex; align-items: center; gap: 6px;
  font: 700 20px/1.2 var(--font-head); color: var(--text);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.mc-stat dd.is-text { font-size: 15.5px; }
.mc-stat__na { color: var(--muted); font-weight: 600; cursor: help; border-bottom: 1px dotted var(--border-strong); }
.mc-stat__locked { color: var(--muted); font-size: 14px; }
.mc-status-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--mc-success); box-shadow: 0 0 0 4px rgba(22, 163, 74, .18); animation: mc-pulse 2s infinite; flex-shrink: 0; }
.mc-status-dot.is-warn { background: var(--mc-warning); box-shadow: 0 0 0 4px rgba(234, 88, 12, .18); }

.mc-card__note { margin-top: 12px; font-size: 12.5px; color: var(--muted); min-height: 1.2em; }
.mc-card__note.is-error { color: var(--mc-crimson); }
.mc-card__note button {
  margin-left: 6px; border: 0; background: none; padding: 0; cursor: pointer;
  color: var(--mc-royal); font-weight: 700; text-decoration: underline;
}
:root[data-theme="dark"] .mc-card__note button { color: var(--mc-gold); }

.mc-card__btn {
  margin-top: auto;
  display: flex; align-items: center; justify-content: center; gap: 10px;
  width: 100%; padding: 13px 16px;
  border: 0; border-radius: var(--r-btn);
  background: var(--ws); color: var(--ws-ink);
  font: 600 14.5px var(--font-head); text-decoration: none; cursor: pointer;
  transition: transform .15s var(--ease), box-shadow .2s var(--ease), filter .2s var(--ease);
}
.mc-stats + .mc-card__note + .mc-card__btn { margin-top: 16px; }
.mc-card__btn i { transition: transform .2s var(--ease); }
.mc-card__btn:hover { box-shadow: 0 10px 22px color-mix(in srgb, var(--ws) 40%, transparent); filter: brightness(1.06); }
.mc-card__btn:hover i { transform: translateX(4px); }
/* CTA hover highlight in Golden Yellow (§31) for the dark-accent buttons */
.mc-card[data-ws="MCCPS"] .mc-card__btn:hover,
.mc-card[data-ws="MCCHS"] .mc-card__btn:hover,
.mc-card[data-ws="ERP"] .mc-card__btn:hover { box-shadow: 0 10px 22px color-mix(in srgb, var(--ws) 40%, transparent), inset 0 -3px 0 var(--mc-gold); }
.mc-card__btn:active { transform: translateY(1px); }
.mc-card__btn.is-disabled { cursor: not-allowed; opacity: .55; filter: saturate(.65); }
.mc-card__btn.is-disabled:hover { box-shadow: none; filter: saturate(.65); }
.mc-card__btn.is-disabled:hover i { transform: none; }
.mc-card__soon { margin-top: 8px; font-size: 12px; color: var(--muted); display: flex; gap: 6px; align-items: flex-start; }
.mc-card__soon i { margin-top: 3px; }
.mc-card.is-nudge { animation: mc-nudge .4s var(--ease); }

/* Skeleton loaders (§33, §68) */
.mc-skel {
  display: inline-block; width: 64%; height: 20px; border-radius: 6px;
  background: linear-gradient(90deg, var(--skel-a) 0%, var(--skel-b) 50%, var(--skel-a) 100%);
  background-size: 200% 100%;
  animation: mc-shimmer 1.3s infinite linear;
}
.mc-skel-list { padding: 14px 16px; display: grid; gap: 12px; }
.mc-skel-list span { height: 38px; border-radius: 10px; background: linear-gradient(90deg, var(--skel-a) 0%, var(--skel-b) 50%, var(--skel-a) 100%); background-size: 200% 100%; animation: mc-shimmer 1.3s infinite linear; }

.mc-empty { padding: 26px 18px; text-align: center; color: var(--muted); display: grid; justify-items: center; gap: 10px; font-size: 13.5px; }
.mc-empty i { font-size: 24px; }

/* ── Feature strip ─────────────────────────────────────────────────────── */
.mc-features { max-width: var(--wrap); margin: 40px auto 0; padding: 0 var(--gutter); }
.mc-features__list {
  list-style: none; margin: 0; padding: 22px;
  display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 18px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-card); box-shadow: var(--shadow-sm);
}
.mc-feature { display: flex; gap: 13px; align-items: flex-start; }
.mc-feature + .mc-feature { border-left: 1px solid var(--border); padding-left: 18px; }
.mc-feature__icon {
  width: 42px; height: 42px; border-radius: 12px; flex-shrink: 0;
  display: grid; place-items: center; font-size: 17px;
  background: rgba(38, 37, 140, .09); color: var(--mc-royal);
}
:root[data-theme="dark"] .mc-feature__icon { background: rgba(254, 194, 71, .12); color: var(--mc-gold); }
.mc-feature:nth-child(2) .mc-feature__icon { background: rgba(37, 99, 235, .1); color: var(--mc-info); }
.mc-feature:nth-child(3) .mc-feature__icon { background: rgba(124, 58, 237, .1); color: var(--mc-purple); }
.mc-feature:nth-child(4) .mc-feature__icon { background: rgba(22, 163, 74, .1); color: var(--mc-success); }
.mc-feature:nth-child(5) .mc-feature__icon { background: rgba(237, 28, 36, .09); color: var(--mc-crimson); }
.mc-feature__title { font-size: 14.5px; font-weight: 700; }
.mc-feature__desc { margin-top: 3px; font-size: 12.8px; color: var(--muted); line-height: 1.45; }

/* ── Footer ────────────────────────────────────────────────────────────── */
.mc-footer {
  max-width: var(--wrap); width: 100%; margin: 36px auto 0;
  padding: 22px var(--gutter) 28px;
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px;
  font-size: 12.8px; color: var(--muted); border-top: 1px solid var(--border);
}

/* ── AI panel ──────────────────────────────────────────────────────────── */
.mc-ai {
  position: fixed; right: 20px; bottom: 20px; z-index: 70;
  width: min(380px, calc(100vw - 32px));
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-card); box-shadow: var(--shadow-lg);
  overflow: hidden; animation: mc-pop-in .22s var(--ease);
}
.mc-ai__head {
  display: flex; align-items: center; gap: 12px; padding: 16px 14px 16px 18px;
  background: linear-gradient(135deg, var(--mc-royal), var(--mc-purple)); color: #fff;
}
.mc-ai__head h2 { font-size: 15.5px; }
.mc-ai__head p { font-size: 12.5px; opacity: .85; }
.mc-ai__head .mc-icon-btn { margin-left: auto; color: #fff; }
.mc-ai__head .mc-icon-btn:hover { background: rgba(255, 255, 255, .15); color: var(--mc-gold); }
.mc-ai__badge { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; background: rgba(255, 255, 255, .16); color: var(--mc-gold); }
.mc-ai__body { padding: 16px 18px 18px; font-size: 13.8px; color: var(--text-2); display: grid; gap: 12px; }
.mc-ai__body ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.mc-ai__body li { display: flex; gap: 10px; align-items: center; }
.mc-ai__body li i { width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; font-size: 12px; background: rgba(124, 58, 237, .1); color: var(--mc-purple); }
.mc-ai__foot { font-size: 12.5px; color: var(--muted); padding-top: 10px; border-top: 1px solid var(--border); }

/* ── Toasts (§9) ───────────────────────────────────────────────────────── */
.mc-toasts { position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); z-index: 90; display: grid; gap: 10px; width: min(440px, calc(100vw - 32px)); }
.mc-toast {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 13px 14px 13px 16px; border-radius: 14px;
  background: var(--surface); color: var(--text); border: 1px solid var(--border);
  border-left: 5px solid var(--mc-info);
  box-shadow: var(--shadow-lg); font-size: 13.8px;
  animation: mc-pop-in .22s var(--ease);
}
.mc-toast--error { border-left-color: var(--mc-crimson); }
.mc-toast--warn { border-left-color: var(--mc-warning); }
.mc-toast--ok { border-left-color: var(--mc-success); }
.mc-toast i.lead { margin-top: 2px; }
.mc-toast--error i.lead { color: var(--mc-crimson); }
.mc-toast--warn i.lead { color: var(--mc-warning); }
.mc-toast--ok i.lead { color: var(--mc-success); }
.mc-toast > span { flex: 1; }
.mc-toast button { border: 0; background: none; cursor: pointer; color: var(--muted); padding: 2px 4px; border-radius: 6px; }
.mc-toast button:hover { color: var(--text); }

.mc-noscript { position: fixed; bottom: 0; left: 0; right: 0; padding: 12px 16px; background: var(--mc-charcoal); color: #fff; text-align: center; font-size: 14px; z-index: 99; }
.mc-noscript a { color: var(--mc-gold); }

/* ── Animations ────────────────────────────────────────────────────────── */
@keyframes mc-rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@keyframes mc-pop-in { from { opacity: 0; transform: translateY(-6px) scale(.98); } to { opacity: 1; transform: none; } }
@keyframes mc-shimmer { to { background-position: -200% 0; } }
@keyframes mc-pulse { 0%, 100% { box-shadow: 0 0 0 3px rgba(22, 163, 74, .2); } 50% { box-shadow: 0 0 0 7px rgba(22, 163, 74, .05); } }
@keyframes mc-nudge { 0%, 100% { transform: translateX(0); } 25% { transform: translateX(-5px); } 75% { transform: translateX(5px); } }

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

/* ── Responsive (§69) ──────────────────────────────────────────────────── */
@media (max-width: 1200px) {
  .mc-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mc-card__name { min-height: 0; }
  .mc-features__list { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .mc-feature + .mc-feature { border-left: 0; padding-left: 0; }
}
@media (max-width: 1024px) {
  .mc-profile-btn__text, .mc-profile-btn__chev { display: none; }
  .mc-profile-btn { padding: 4px; }
  .mc-nav__links { display: none; }
}
@media (max-width: 860px) {
  .mc-hero__inner { grid-template-columns: 1fr; gap: 26px; }
  .mc-hero__quote { justify-self: start; max-width: 100%; }
  .mc-features__list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  :root { --nav-h: 62px; }
  .mc-nav__inner { gap: 10px; }
  .mc-brand__sub { display: none; }
  .mc-brand__title { font-size: 14px; }
  .mc-only-mobile { display: inline-grid; }
  /* Search collapses into its own row, opened from the icon */
  .mc-search {
    display: none;
    position: absolute; left: 0; right: 0; top: 100%;
    max-width: none; padding: 10px var(--gutter);
    background: var(--nav-bg); border-bottom: 1px solid var(--border);
    backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  }
  .mc-search.is-open { display: block; }
  .mc-search__icon { left: calc(var(--gutter) + 14px); }
  .mc-search__kbd { display: none; }
  .mc-search__list { left: var(--gutter); right: var(--gutter); }
  .mc-icon-btn { width: 40px; height: 40px; }
  .mc-signin span { display: none; }
  .mc-signin { padding: 10px 12px; }
  .mc-pop__panel, .mc-pop__panel--wide { position: fixed; left: 12px; right: 12px; top: calc(var(--nav-h) + 8px); width: auto; }
}
@media (max-width: 640px) {
  .mc-grid { grid-template-columns: 1fr; gap: 16px; }
  .mc-features__list { grid-template-columns: 1fr; padding: 18px; }
  .mc-hero { padding-bottom: 110px; }
  .mc-workspaces { margin-top: -80px; }
  .mc-footer { flex-direction: column; text-align: center; align-items: center; }
}
@media (max-width: 400px) {
  .mc-brand__text { display: none; }
  .mc-nav__actions { gap: 6px; }
}

/* ── Print ─────────────────────────────────────────────────────────────── */
@media print {
  .mc-nav, .mc-ai, .mc-toasts, .mc-card__btn { display: none !important; }
  .mc-hero { color: #000; background: none !important; padding: 20px 0; }
  .mc-card { box-shadow: none; border: 1px solid #ccc; backdrop-filter: none; }
}

/* ══ Parents & learners — the portal's own door (14b, 14 Nov 2026) ════════════════════════════════ */
.mc-nav__link--portal i { color: var(--mc-crimson); }
:root[data-theme="dark"] .mc-nav__link--portal i { color: var(--mc-gold); }

/* compact "Parents" button: shown when the top-bar links fold away (≤1024px), i.e. on tablets and phones */
.mc-portal-btn {
  display: none; align-items: center; gap: 7px; height: 40px; padding: 0 13px;
  border-radius: 12px; text-decoration: none; font-weight: 600; font-size: 13.5px; white-space: nowrap;
  color: var(--mc-royal); background: rgba(38, 37, 140, .07); border: 1px solid rgba(38, 37, 140, .18);
  transition: background-color .2s var(--ease), transform .15s var(--ease);
}
.mc-portal-btn:hover { background: rgba(38, 37, 140, .12); }
.mc-portal-btn:active { transform: translateY(1px); }
:root[data-theme="dark"] .mc-portal-btn { color: var(--mc-gold); background: rgba(254, 194, 71, .1); border-color: rgba(254, 194, 71, .28); }

.mc-family { max-width: var(--wrap); margin: 34px auto 0; padding: 0 var(--gutter); }
.mc-family__card {
  position: relative; overflow: hidden; isolation: isolate;
  display: grid; grid-template-columns: auto minmax(0, 1fr) minmax(250px, 300px); align-items: center; gap: 30px;
  padding: 30px 34px; border-radius: 24px; color: #fff;
  background:
    radial-gradient(120% 140% at 0% 0%, rgba(124, 58, 237, .55) 0%, transparent 55%),
    linear-gradient(115deg, var(--mc-royal-700) 0%, var(--mc-royal) 48%, #3a2fb3 100%);
  box-shadow: var(--shadow-lg);
  animation: mc-rise .6s var(--ease) both; animation-delay: .3s;
}
/* soft decorative rings in the brand gold */
.mc-family__card::before, .mc-family__card::after {
  content: ""; position: absolute; z-index: -1; border-radius: 50%; pointer-events: none;
  border: 1px solid rgba(254, 194, 71, .22);
}
.mc-family__card::before { width: 420px; height: 420px; right: -120px; top: -210px; }
.mc-family__card::after  { width: 260px; height: 260px; right: 40px; bottom: -190px; border-color: rgba(255, 255, 255, .12); }

.mc-family__art { position: relative; width: 132px; height: 132px; flex: none; }
.mc-family__orb {
  position: absolute; inset: 14px; border-radius: 50%;
  display: grid; place-items: center; font-size: 40px; color: var(--mc-royal);
  background: radial-gradient(circle at 30% 25%, #fff3cf 0%, var(--mc-gold) 62%, #f2a91d 100%);
  box-shadow: 0 14px 30px rgba(10, 8, 60, .45), inset 0 -4px 10px rgba(180, 110, 0, .25);
}
.mc-family__float {
  position: absolute; width: 38px; height: 38px; border-radius: 12px;
  display: grid; place-items: center; font-size: 15px; color: #fff;
  background: rgba(255, 255, 255, .14); border: 1px solid rgba(255, 255, 255, .28);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  box-shadow: 0 6px 16px rgba(10, 8, 60, .3);
  animation: mc-family-bob 5s ease-in-out infinite;
}
.mc-family__float--a { left: -6px; top: 6px; }
.mc-family__float--b { right: -8px; top: 30px; animation-delay: -1.6s; color: var(--mc-gold); }
.mc-family__float--c { left: 18px; bottom: -6px; animation-delay: -3.2s; }
@keyframes mc-family-bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }

.mc-family__eyebrow {
  margin: 0 0 6px; display: inline-flex; align-items: center; gap: 7px;
  font-size: 12px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--mc-gold);
}
.mc-family__title { margin: 0; font: 700 clamp(22px, 2.4vw, 28px)/1.2 var(--font-head); color: #fff; }
.mc-family__lead { margin: 8px 0 0; max-width: 56ch; font-size: 15px; line-height: 1.55; color: rgba(255, 255, 255, .86); }
.mc-family__chips { list-style: none; margin: 16px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.mc-family__chips li {
  display: inline-flex; align-items: center; gap: 7px; padding: 6px 12px; border-radius: 999px;
  font-size: 12.5px; font-weight: 600; color: #fff;
  background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .2);
}
.mc-family__chips i { color: var(--mc-gold); font-size: 12px; }

.mc-family__actions { display: grid; gap: 12px; }
.mc-family__go {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  padding: 15px 20px; border-radius: 16px; text-decoration: none;
  font: 700 15.5px var(--font-head); color: var(--mc-royal-700);
  background: linear-gradient(180deg, #ffd56e 0%, var(--mc-gold) 100%);
  box-shadow: 0 10px 24px rgba(254, 194, 71, .32), inset 0 -2px 0 rgba(170, 100, 0, .25);
  transition: transform .15s var(--ease), box-shadow .2s var(--ease), filter .2s var(--ease);
}
.mc-family__go i { transition: transform .2s var(--ease); }
.mc-family__go:hover { filter: brightness(1.04); box-shadow: 0 14px 30px rgba(254, 194, 71, .42), inset 0 -2px 0 rgba(170, 100, 0, .25); }
.mc-family__go:hover i { transform: translateX(4px); }
.mc-family__go:active { transform: translateY(1px); }
.mc-family__go:focus-visible, .mc-family__alt:focus-visible { outline: 3px solid #fff; outline-offset: 3px; }
.mc-family__alt {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 14px; border-radius: 14px; text-decoration: none;
  font-size: 13.5px; font-weight: 600; color: #fff;
  background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .3);
  transition: background-color .2s var(--ease);
}
.mc-family__alt:hover { background: rgba(255, 255, 255, .16); }
.mc-family__alt i { color: var(--mc-gold); }
.mc-family__note { margin: 2px 0 0; display: flex; gap: 8px; font-size: 12px; line-height: 1.45; color: rgba(255, 255, 255, .72); }
.mc-family__note i { margin-top: 3px; font-size: 11px; }

@media (max-width: 1024px) {
  .mc-portal-btn { display: inline-flex; }
  .mc-family__card { grid-template-columns: auto minmax(0, 1fr); }
  .mc-family__actions { grid-column: 1 / -1; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: center; }
  .mc-family__note { grid-column: 1 / -1; justify-content: center; }
}
@media (max-width: 640px) {
  .mc-portal-btn { padding: 0 11px; }
  .mc-family { margin-top: 24px; }
  .mc-family__card { grid-template-columns: 1fr; justify-items: center; text-align: center; gap: 20px; padding: 26px 20px; }
  .mc-family__art { width: 112px; height: 112px; }
  .mc-family__orb { font-size: 34px; }
  .mc-family__lead { margin-inline: auto; }
  .mc-family__chips { justify-content: center; }
  .mc-family__actions { width: 100%; grid-template-columns: 1fr; }
  .mc-family__note { justify-content: center; text-align: left; }
}
@media (max-width: 400px) {
  .mc-portal-btn span { display: none; }
  .mc-portal-btn { width: 40px; padding: 0; justify-content: center; }
}
@media (prefers-reduced-motion: reduce) {
  .mc-family__card, .mc-family__float { animation: none; }
}
/* hero shortcut for parents and learners (most come on a phone) */
.mc-hero__portal {
  margin-top: 16px; display: inline-flex; align-items: center; gap: 10px; max-width: 100%;
  padding: 10px 16px; border-radius: 999px; text-decoration: none;
  font-size: 14px; color: #fff; background: rgba(255, 255, 255, .12); border: 1px solid rgba(255, 255, 255, .3);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  transition: background-color .2s var(--ease);
}
.mc-hero__portal b { color: var(--mc-gold); font-weight: 700; }
.mc-hero__portal > i:first-child { color: var(--mc-gold); }
.mc-hero__portal > i:last-child { font-size: 12px; transition: transform .2s var(--ease); }
.mc-hero__portal:hover { background: rgba(255, 255, 255, .2); }
.mc-hero__portal:hover > i:last-child { transform: translateX(3px); }
.mc-hero__portal:focus-visible { outline: 3px solid #fff; outline-offset: 3px; }
.mc-hero__portal + .mc-slider-ui { margin-top: 14px; }
/* tablets: the search box keeps its room; the hero link and the panel name the portal in full */
@media (min-width: 761px) and (max-width: 1024px) {
  .mc-portal-btn span { display: none; }
  .mc-portal-btn { width: 40px; padding: 0; justify-content: center; }
}
