/* 20261023HK2 */
/* cu-campus-critical-v1.css 20261016L4L6 - L4 merged critical path */
/* ==== cu-flash-v1.css ==== */
/* ---- cu-theme-v1.css ---- */
/* Clarity University — theme tokens (day / night / system)
 * Shariah-minded palette: dignified greens & gold; no harsh neon; readable contrast.
 * Educational UI only.
 */

/* Night (default campus) */
html, html[data-theme="dark"] {
  color-scheme: dark;
  --cu-bg: #0c1410;
  --cu-bg-elev: #152019;
  --cu-card: rgba(21, 32, 25, 0.96);
  --cu-text: #e8f0ea;
  --cu-muted: rgba(232, 240, 234, 0.78);
  --cu-gold: #d4b45a;
  --cu-gold-soft: #f0e6c8;
  --cu-teal: #1fa67a;
  --cu-ok: #8fd4a8;
  --cu-line: rgba(212, 180, 90, 0.28);
  --cu-link: #e0c56a;
  --cu-link-hover: #f3e6c0;
  --cu-link-visited: #c5a94a;
  --cu-danger: #f0a8a8;
  --cu-banner-bg: linear-gradient(90deg, #0a2a40, #0d4f3c);
}

/* Day — parchment / soft green, never pure white glare */
html[data-theme="light"] {
  color-scheme: light;
  --cu-bg: #f3efe4;
  --cu-bg-elev: #fffdf8;
  --cu-card: rgba(255, 253, 248, 0.96);
  --cu-text: #1c2a22;
  --cu-muted: #4a5c52;
  --cu-gold: #8a6b1f;
  --cu-gold-soft: #5c4a18;
  --cu-teal: #0d4f3c;
  --cu-ok: #1a6b52;
  --cu-line: rgba(13, 79, 60, 0.22);
  --cu-link: #0d4f3c;
  --cu-link-hover: #0a3d30;
  --cu-link-visited: #1a5c45;
  --cu-danger: #8b2e2e;
  --cu-banner-bg: linear-gradient(90deg, #0d4f3c, #1a6b52);
}

/* System follows prefers-color-scheme when data-theme="system" */
html[data-theme="system"] {
  color-scheme: light dark;
}
@media (prefers-color-scheme: light) {
  html[data-theme="system"] {
    --cu-bg: #f3efe4;
    --cu-bg-elev: #fffdf8;
    --cu-card: rgba(255, 253, 248, 0.96);
    --cu-text: #1c2a22;
    --cu-muted: #4a5c52;
    --cu-gold: #8a6b1f;
    --cu-gold-soft: #5c4a18;
    --cu-teal: #0d4f3c;
    --cu-ok: #1a6b52;
    --cu-line: rgba(13, 79, 60, 0.22);
    --cu-link: #0d4f3c;
    --cu-link-hover: #0a3d30;
    --cu-link-visited: #1a5c45;
    --cu-danger: #8b2e2e;
    --cu-banner-bg: linear-gradient(90deg, #0d4f3c, #1a6b52);
  }
}
@media (prefers-color-scheme: dark) {
  html[data-theme="system"] {
    --cu-bg: #0c1410;
    --cu-bg-elev: #152019;
    --cu-card: rgba(21, 32, 25, 0.96);
    --cu-text: #e8f0ea;
    --cu-muted: rgba(232, 240, 234, 0.78);
    --cu-gold: #d4b45a;
    --cu-gold-soft: #f0e6c8;
    --cu-teal: #1fa67a;
    --cu-ok: #8fd4a8;
    --cu-line: rgba(212, 180, 90, 0.28);
    --cu-link: #e0c56a;
    --cu-link-hover: #f3e6c0;
    --cu-link-visited: #c5a94a;
    --cu-danger: #f0a8a8;
    --cu-banner-bg: linear-gradient(90deg, #0a2a40, #0d4f3c);
  }
}

html, body {
  background: var(--cu-bg) !important;
  color: var(--cu-text) !important;
}

/* Kill browser-default blue links project-wide on university shells */
a, a:link {
  color: var(--cu-link);
}
a:visited {
  color: var(--cu-link-visited);
}
a:hover, a:focus {
  color: var(--cu-link-hover);
}
/* Curriculum / junior injected content */
#junior-curriculum-card a,
#campus-stage-body a,
.curriculum-phase-card a,
.junior-body-text a,
.card a {
  color: var(--cu-link) !important;
  text-decoration: underline;
  text-underline-offset: 2px;
}
#junior-curriculum-card a:hover,
#campus-stage-body a:hover {
  color: var(--cu-link-hover) !important;
}

body.cu-page {
  background: radial-gradient(1200px 600px at 50% -10%, color-mix(in srgb, var(--cu-teal) 35%, var(--cu-bg)), var(--cu-bg) 55%) !important;
  color: var(--cu-text) !important;
}

.cu-banner {
  background: var(--cu-banner-bg) !important;
}
.cu-banner, .cu-banner a {
  color: #f0e6c8;
}
.cu-main-link {
  color: #f0e6c8 !important;
  border-color: rgba(240, 230, 200, 0.35);
}

#junior-curriculum-card,
.curriculum-phase-card,
.card,
.lab-policy,
.lab-card {
  background: var(--cu-card) !important;
  color: var(--cu-text) !important;
  border-color: var(--cu-line) !important;
}
#junior-curriculum-card p,
#junior-curriculum-card li,
.junior-body-text p {
  color: var(--cu-text) !important;
  opacity: 1 !important;
}

/* How-phases float — match theme */
#clarity-how-phases, .cu-how-float, [class*="how-phases"] {
  background: var(--cu-card) !important;
  color: var(--cu-text) !important;
  border: 1px solid var(--cu-line) !important;
}

/* Theme control in banner */
.cu-theme-ctl {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  margin-left: 0.35rem;
}
.cu-theme-ctl button {
  min-height: 36px;
  min-width: 36px;
  padding: 0.25rem 0.45rem;
  border-radius: 999px;
  border: 1px solid rgba(240, 230, 200, 0.35);
  background: rgba(0, 0, 0, 0.2);
  color: #f0e6c8;
  font-size: 0.65rem;
  font-weight: 700;
  cursor: pointer;
}
.cu-theme-ctl button[aria-pressed="true"] {
  background: rgba(212, 180, 90, 0.35);
  border-color: rgba(212, 180, 90, 0.7);
}
html[data-theme="light"] .cu-theme-ctl button {
  background: rgba(255, 255, 255, 0.25);
  color: #f7f3eb;
}

/* ---- cu-layout-top-v1.css ---- */
/* Project-wide layout: banner pinned top, clean stage */
header.cu-banner {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.45rem;
  padding: 0.45rem 0.75rem;
  padding-top: calc(0.45rem + env(safe-area-inset-top, 0px));
  border-bottom: 1px solid rgba(212, 180, 90, 0.28);
  backdrop-filter: blur(8px);
}
.cu-banner .cu-brand {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  text-decoration: none;
  color: #f0e6c8;
}
.cu-banner .cu-brand img {
  width: 2rem;
  height: 2rem;
}
.cu-banner-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
  margin-left: auto;
}
main.cu-wrap {
  max-width: 42rem;
  margin: 0 auto;
  padding: 0.65rem 0.75rem 5rem;
}
/* Lab LMR controls readable */
.tj-lmr-mode, .tj-lmr-toolbar button, .tj-lmr-toolbar select,
[class*="tj-lmr"] button {
  color: var(--cu-text, #e8f0ea) !important;
  background: rgba(15, 76, 58, 0.45) !important;
  border: 1px solid rgba(212, 180, 90, 0.35) !important;
  border-radius: 10px;
  min-height: 40px;
}
.tj-lmr-mode.active {
  background: rgba(212, 180, 90, 0.28) !important;
  border-color: rgba(212, 180, 90, 0.6) !important;
  color: var(--cu-gold-soft, #f0e6c8) !important;
}
.tj-practice-loop, .studio-stage {
  max-width: 100%;
  overflow-x: hidden;
}
/* Arabic text */
.tj-lmr-ar, [id*="lmr-ar"] {
  font-family: "Scheherazade New", "Amiri", "Noto Naskh Arabic", serif;
  font-size: 1.45rem;
  line-height: 2;
  direction: rtl;
  text-align: right;
}
/* Mahtaab progressive reveal helpers */
[data-mahtaab="seed"] { opacity: 0.92; }
[data-mahtaab="crescent"] { transition: opacity 0.35s ease; }
[data-mahtaab="full"] { opacity: 1; }

/* ---- cu-nuclear-chrome-v1.css ---- */
/* NUC2 — Banner always first paint chrome; pills on solid plaque; no floats above banner */

/* 1) Banner: true top, highest chrome z-index */
header.cu-banner {
  position: sticky !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  width: 100% !important;
  z-index: 10000 !important;
  order: -100 !important;
  margin: 0 !important;
  display: flex !important;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem clamp(0.65rem, 2.5vw, 1.25rem) !important;
  padding-top: calc(0.5rem + env(safe-area-inset-top, 0px)) !important;
  border-bottom: 1px solid rgba(212, 180, 90, 0.35) !important;
  background: var(--cu-banner-bg, linear-gradient(90deg, #0a4334, #0d4f3c)) !important;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.18);
}

/* 2) Anything that used to sit above the banner — force below */
body.cu-page {
  display: flex !important;
  flex-direction: column !important;
  min-height: 100vh;
  margin: 0 !important;
  padding: 0 !important;
}
body.cu-page > header.cu-banner {
  order: 0 !important;
  flex: 0 0 auto;
}
body.cu-page > main,
body.cu-page > .cu-wrap,
body.cu-page > footer {
  order: 2;
  flex: 1 1 auto;
}

/* Phase / how-phases fighters: never fixed/absolute over top */
#clarity-how-phases,
.cu-how-float,
[class*="how-phases"],
#clarity-phase-plaque-host,
#clarity-phase-plaque-rail,
#clarity-name-plaque-rail,
.cnp-inner {
  position: relative !important;
  top: auto !important;
  left: auto !important;
  right: auto !important;
  bottom: auto !important;
  z-index: 1 !important;
  width: 100% !important;
  max-width: min(52rem, 100%) !important;
  margin: 0.55rem auto !important;
  order: 1 !important;
}

/* If how-phases is a direct child of body, keep it after banner via order */
body.cu-page > #clarity-how-phases,
body.cu-page > [class*="how-phases"],
body.cu-page > #clarity-phase-plaque-host,
body.cu-page > #clarity-name-plaque-rail {
  order: 1 !important;
}

/* 3) Pills — solid plaque */
.cu-pills {
  display: flex !important;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.4rem;
  max-width: min(40rem, 100%);
  margin: 0.65rem auto 0.85rem !important;
  padding: 0.45rem 0.55rem !important;
  border-radius: 999px !important;
  border: 1px solid rgba(212, 180, 90, 0.35) !important;
  background: rgba(12, 20, 16, 0.92) !important;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.2);
}
html[data-theme="light"] .cu-pills {
  background: #fffef9 !important;
  border: 1px solid rgba(10, 67, 52, 0.22) !important;
  box-shadow: 0 4px 16px rgba(20, 35, 28, 0.08);
}
.cu-pills a {
  font-size: 0.78rem !important;
  font-weight: 700 !important;
  padding: 0.4rem 0.85rem !important;
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  border-radius: 999px !important;
  border: 1px solid transparent !important;
  text-decoration: none !important;
  color: #f0e6c8 !important;
  background: rgba(255, 255, 255, 0.06) !important;
}
html[data-theme="light"] .cu-pills a {
  color: #0a4334 !important;
  background: rgba(10, 67, 52, 0.06) !important;
}
.cu-pills a.here {
  background: rgba(212, 180, 90, 0.28) !important;
  border-color: rgba(212, 180, 90, 0.55) !important;
  color: #f3e6c0 !important;
}
html[data-theme="light"] .cu-pills a.here {
  background: rgba(10, 67, 52, 0.14) !important;
  border-color: rgba(122, 92, 20, 0.4) !important;
  color: #5c4510 !important;
}

/* Hide duplicate map nav if any script re-injects */
.cu-map-nav,
nav.cu-tabs {
  display: none !important;
}

/* How-phases day readability */
html[data-theme="light"] #clarity-how-phases,
html[data-theme="light"] [class*="how-phases"] {
  background: #fffef9 !important;
  color: #14231c !important;
  border: 1px solid rgba(10, 67, 52, 0.18) !important;
}

/* ---- cu-bi-shell-v1.css ---- */
/* BI-0 → BI-6 — Begin-inspired shell (Clarity identity retained)
 * Educational UI only — not affiliated with beginislam.org
 */

html, body.cu-page {
  font-family: "Plus Jakarta Sans", Inter, system-ui, -apple-system, sans-serif !important;
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

/* BI-0 — Rich pills on solid plaque */
.cu-pills {
  display: flex !important;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 0.35rem;
  max-width: min(42rem, calc(100% - 1rem));
  margin: 0.55rem auto 0.75rem !important;
  padding: 0.4rem 0.5rem !important;
  border-radius: 999px !important;
  border: 1px solid rgba(184, 166, 135, 0.45) !important;
  background: #2a3228 !important;
  box-shadow: 0 6px 22px rgba(0, 0, 0, 0.22);
}
html[data-theme="light"] .cu-pills,
html[data-theme="system"] .cu-pills {
  background: #fffef8 !important;
  border-color: rgba(184, 166, 135, 0.55) !important;
  box-shadow: 0 6px 20px rgba(42, 35, 25, 0.08);
}
@media (prefers-color-scheme: dark) {
  html[data-theme="system"] .cu-pills {
    background: #2a3228 !important;
    border-color: rgba(184, 166, 135, 0.35) !important;
  }
}
.cu-pills a {
  font-family: inherit !important;
  font-size: 0.92rem !important;
  font-weight: 700 !important;
  letter-spacing: 0.01em;
  padding: 0.48rem 1rem !important;
  min-height: 44px !important;
  display: inline-flex !important;
  align-items: center;
  border-radius: 999px !important;
  border: 1px solid transparent !important;
  text-decoration: none !important;
  color: #f3efe4 !important;
  background: rgba(255, 255, 255, 0.08) !important;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
html[data-theme="light"] .cu-pills a {
  color: #2a2319 !important;
  background: rgba(30, 125, 94, 0.08) !important;
}
.cu-pills a.here {
  background: #1e7d5e !important;
  border-color: #1e7d5e !important;
  color: #fffef8 !important;
  box-shadow: 0 2px 10px rgba(30, 125, 94, 0.35);
}
html[data-theme="light"] .cu-pills a.here {
  background: #1e7d5e !important;
  color: #fff !important;
}
.cu-pills a:hover {
  border-color: rgba(201, 163, 82, 0.55);
}

/* BI-1 — Day reading tokens (Begin-adjacent paper/ink) */
html[data-theme="light"] {
  --cu-bg: #f4ede0;
  --cu-bg-elev: #ebe0cb;
  --cu-card: #fffef8;
  --cu-text: #2a2319;
  --cu-muted: #5a4f3f;
  --cu-gold: #8b6f3f;
  --cu-gold-soft: #5c4623;
  --cu-teal: #1e7d5e;
  --cu-ok: #1e7d5e;
  --cu-line: #b8a687;
  --cu-link: #1e7d5e;
  --cu-link-hover: #145c45;
  --cu-link-visited: #2d7d4e;
  --cu-banner-bg: linear-gradient(90deg, #145c45, #1e7d5e 55%, #2d7d4e);
}
html[data-theme="light"] body.cu-page {
  background:
    radial-gradient(ellipse 90% 50% at 50% -10%, rgba(30, 125, 94, 0.1), transparent 50%),
    linear-gradient(180deg, #f7f1e6 0%, #f4ede0 45%, #ebe0cb 100%) !important;
  color: var(--cu-text) !important;
}
html[data-theme="light"] #junior-curriculum-card,
html[data-theme="light"] .card,
html[data-theme="light"] .lab-policy,
html[data-theme="light"] .lab-card,
html[data-theme="light"] .curriculum-phase-card {
  background: #fffef8 !important;
  color: #2a2319 !important;
  border: 1px solid #b8a687 !important;
  box-shadow: 0 4px 18px rgba(42, 35, 25, 0.06);
}
html[data-theme="light"] #junior-curriculum-card p,
html[data-theme="light"] #junior-curriculum-card li {
  color: #2a2319 !important;
  font-size: 0.98rem !important;
  line-height: 1.65 !important;
}

/* BI-2 — Chrome order locked */
header.cu-banner {
  position: sticky !important;
  top: 0 !important;
  z-index: 10000 !important;
  order: 0 !important;
}
body.cu-page {
  display: flex !important;
  flex-direction: column !important;
}
body.cu-page > header.cu-banner { order: 0; }
body.cu-page > main { order: 2; flex: 1; }
#clarity-how-phases,
[class*="how-phases"],
#clarity-phase-plaque-host,
#clarity-name-plaque-rail {
  position: relative !important;
  top: auto !important;
  z-index: 1 !important;
  max-width: min(52rem, 100%);
  margin: 0.5rem auto !important;
}
/* Collapsible how-phases on small screens */
@media (max-width: 640px) {
  #clarity-how-phases details,
  [class*="how-phases"] details { display: block; }
}

/* BI-3 — Soft section tints */
.lab-card[href*="tajweed"] { border-left: 4px solid #1e7d5e; }
.lab-card[href*="arabic"] { border-left: 4px solid #2d7d76; }
.lab-card[href*="recite"] { border-left: 4px solid #2c5282; }
.lab-card[href*="media"] { border-left: 4px solid #b8851c; }
.lab-card[href*="callig"] { border-left: 4px solid #7a5d3f; }
.lab-card[href*="hifz"] { border-left: 4px solid #6d4b93; }
#junior-curriculum-card h2,
.curriculum-phase-card h2 {
  color: #8b6f3f;
}
html[data-theme="dark"] #junior-curriculum-card h2 { color: #d4b45a; }

/* BI-4 — Lab / practice chips look intentional */
#campus-stage-body a,
#junior-curriculum-card a {
  color: var(--cu-link) !important;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
}
/* Practice callout */
#junior-curriculum-card [class*="practice"],
#junior-curriculum-card p:has(+ *) {
  /* soft callout handled by existing mint box */
}

/* BI-5 — Motion respect */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
.cu-pills a,
.lab-card {
  transition: border-color 0.15s ease, background 0.15s ease, transform 0.15s ease;
}
@media (prefers-reduced-motion: reduce) {
  .lab-card:hover { transform: none; }
}

/* BI-6 — Clarity exceed markers (subtle) */
.cu-foot::after {
  content: " · University path · on-device vault · lab practice";
  opacity: 0.75;
}

/* ---- cu-nav-rich-v1.css ---- */
/* Rich campus nav — section colors + icons (Begin-inspired, Clarity identity)
 * Educational UI only — not affiliated with beginislam.org
 */

.cu-pills {
  display: flex !important;
  flex-wrap: wrap !important;
  justify-content: center !important;
  align-items: center !important;
  gap: 0.4rem !important;
  max-width: min(48rem, calc(100% - 0.75rem)) !important;
  margin: 0.55rem auto 0.85rem !important;
  padding: 0.45rem 0.55rem !important;
  border-radius: 1.25rem !important;
  background: linear-gradient(180deg, #f7f1e6 0%, #ebe4d4 100%) !important;
  border: 1px solid rgba(184, 166, 135, 0.55) !important;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.7) inset,
    0 8px 24px rgba(42, 35, 25, 0.08) !important;
}
html[data-theme="dark"] .cu-pills {
  background: linear-gradient(180deg, #1a2420 0%, #121a16 100%) !important;
  border-color: rgba(212, 180, 90, 0.28) !important;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35) !important;
}

.cu-pills a {
  --pill: #5a4f3f;
  --pill-bg: rgba(90, 79, 63, 0.1);
  --pill-bd: rgba(90, 79, 63, 0.22);
  display: inline-flex !important;
  align-items: center !important;
  gap: 0.35rem !important;
  font-family: "Plus Jakarta Sans", system-ui, sans-serif !important;
  font-size: 0.88rem !important;
  font-weight: 700 !important;
  letter-spacing: 0.02em !important;
  min-height: 46px !important;
  padding: 0.45rem 0.95rem !important;
  border-radius: 999px !important;
  border: 1.5px solid var(--pill-bd) !important;
  background: var(--pill-bg) !important;
  color: var(--pill) !important;
  text-decoration: none !important;
  transition:
    transform 0.15s ease,
    background 0.18s ease,
    border-color 0.18s ease,
    box-shadow 0.18s ease,
    color 0.15s ease !important;
}
html[data-theme="dark"] .cu-pills a {
  color: #e8f0ea !important;
  background: rgba(255, 255, 255, 0.06) !important;
  border-color: rgba(255, 255, 255, 0.12) !important;
}

/* Per-destination color (Begin section energy) */
.cu-pills a[href="/campus/"],
.cu-pills a[href="/campus/index.html"] {
  --pill: #1e7d5e;
  --pill-bg: rgba(30, 125, 94, 0.12);
  --pill-bd: rgba(30, 125, 94, 0.28);
}
.cu-pills a[href*="/campus/desk"] {
  --pill: #2c5282;
  --pill-bg: rgba(44, 82, 130, 0.12);
  --pill-bd: rgba(44, 82, 130, 0.28);
}
.cu-pills a[href="/lab/"],
.cu-pills a[href*="/lab"] {
  --pill: #b8851c;
  --pill-bg: rgba(184, 133, 28, 0.14);
  --pill-bd: rgba(184, 133, 28, 0.32);
}
.cu-pills a[href="/vault/"],
.cu-pills a[href*="/vault"] {
  --pill: #6d4b93;
  --pill-bg: rgba(109, 75, 147, 0.12);
  --pill-bd: rgba(109, 75, 147, 0.28);
}
.cu-pills a[href="/journey/"],
.cu-pills a[href*="/journey"] {
  --pill: #2d7d76;
  --pill-bg: rgba(45, 125, 118, 0.12);
  --pill-bd: rgba(45, 125, 118, 0.28);
}
.cu-pills a[href="/charter/"],
.cu-pills a[href*="/charter"] {
  --pill: #a23b4e;
  --pill-bg: rgba(162, 59, 78, 0.1);
  --pill-bd: rgba(162, 59, 78, 0.26);
}

html[data-theme="dark"] .cu-pills a[href="/campus/"] { color: #7dcea0 !important; }
html[data-theme="dark"] .cu-pills a[href*="/desk"] { color: #9db7d9 !important; }
html[data-theme="dark"] .cu-pills a[href*="/lab"] { color: #e0c56a !important; }
html[data-theme="dark"] .cu-pills a[href*="/vault"] { color: #c4a8e0 !important; }
html[data-theme="dark"] .cu-pills a[href*="/journey"] { color: #8fd4c8 !important; }
html[data-theme="dark"] .cu-pills a[href*="/charter"] { color: #e0a8b4 !important; }

/* Active / here — filled solid, captivating */
.cu-pills a.here,
.cu-pills a[aria-current="page"] {
  background: var(--pill) !important;
  border-color: var(--pill) !important;
  color: #fffef8 !important;
  box-shadow: 0 4px 14px color-mix(in srgb, var(--pill) 45%, transparent) !important;
  transform: translateY(-1px);
}
html[data-theme="dark"] .cu-pills a.here,
html[data-theme="dark"] .cu-pills a[aria-current="page"] {
  color: #0c1410 !important;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4) !important;
}

.cu-pills a:hover:not(.here) {
  background: color-mix(in srgb, var(--pill) 18%, transparent) !important;
  border-color: var(--pill) !important;
  transform: translateY(-1px);
}
.cu-pills a:active {
  transform: translateY(0) scale(0.98);
}

/* Icons via attr on data-nav */
.cu-pills a .cu-nav-ico {
  font-size: 1.05rem;
  line-height: 1;
  opacity: 0.95;
}

/* Hall rail (Uṣūl / ʿIbādah…) — richer chips if present */
.cu-hall-rail,
[class*="hall-rail"],
.phase-hall-pills {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.35rem;
  margin: 0.35rem auto 0.5rem;
  max-width: min(48rem, 100%);
}
.cu-hall-rail a,
.cu-hall-rail button {
  min-height: 40px;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border: 1px solid rgba(184, 166, 135, 0.4);
  background: rgba(255, 254, 248, 0.85);
  color: #5a4f3f;
}
.cu-hall-rail a.here,
.cu-hall-rail button[aria-pressed="true"] {
  background: #1e7d5e;
  color: #fff;
  border-color: #1e7d5e;
}

@media (prefers-reduced-motion: reduce) {
  .cu-pills a {
    transition: none !important;
  }
  .cu-pills a.here,
  .cu-pills a:hover {
    transform: none !important;
  }
}


/* FD flash extras */
body.cu-page{margin:0}
main.cu-wrap{max-width:min(72rem,100%);margin:0 auto;padding:0.65rem clamp(0.75rem,3vw,1.5rem) 5rem}


/* ==== cu-uni-shell-v1.css ==== */
/* University UI shell — harmonized campus chrome (educational only) */
:root {
  --cu-bg: #0c1210;
  --cu-card: #15201c;
  --cu-line: rgba(184,166,135,0.28);
  --cu-gold: #d4b45a;
  --cu-text: #e8f0ea;
  --cu-muted: #9aab9f;
  --cu-green: #1e7d5e;
  --cu-pill: #1a2822;
}
html[data-theme="light"] {
  --cu-bg: #f4efe4;
  --cu-card: #fffef8;
  --cu-line: rgba(42,35,25,0.14);
  --cu-gold: #8b6f3f;
  --cu-text: #2a2319;
  --cu-muted: #5a4f3f;
  --cu-pill: #ebe0cb;
}
body.cu-page { background: var(--cu-bg); color: var(--cu-text); font-family: "Plus Jakarta Sans", system-ui, sans-serif; margin: 0; }
.cu-banner {
  display: flex; align-items: center; justify-content: space-between; gap: 0.75rem;
  padding: 0.55rem 0.85rem; border-bottom: 1px solid var(--cu-line);
  background: linear-gradient(180deg, #0f1a16, #0c1210);
  position: sticky; top: 0; z-index: 10000;
}
html[data-theme="light"] .cu-banner { background: linear-gradient(180deg, #fffef8, #f0e8d8); }
.cu-brand { text-decoration: none; color: inherit; }
.cu-brand small { display: block; font-size: 0.65rem; letter-spacing: 0.08em; text-transform: uppercase; opacity: 0.75; }
.cu-brand strong { font-size: 1rem; color: var(--cu-gold); }
.cu-main-link { color: var(--cu-gold); text-decoration: none; font-weight: 700; font-size: 0.85rem; }
.cu-wrap { max-width: min(56rem, 100%); margin: 0 auto; padding: 0.5rem 0.75rem 2rem; }
.cu-pills {
  display: flex; flex-wrap: wrap; gap: 0.35rem; justify-content: center;
  padding: 0.45rem; margin: 0.5rem auto; border-radius: 999px;
  background: var(--cu-pill); border: 1px solid var(--cu-line);
}
.cu-pills a {
  text-decoration: none; color: inherit; font-weight: 700; font-size: 0.78rem;
  padding: 0.4rem 0.75rem; border-radius: 999px;
}
.cu-pills a.here { background: var(--cu-green); color: #fff; }
.cu-hall-row {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.4rem;
  margin: 0.5rem 0;
}
@media (max-width: 520px) { .cu-hall-row { grid-template-columns: repeat(2, 1fr); } }
.cu-hall {
  text-align: center; text-decoration: none; color: inherit;
  padding: 0.55rem 0.35rem; border-radius: 14px;
  border: 1px solid var(--cu-line); background: var(--cu-card);
  font-size: 0.78rem;
}
.cu-hall.here { border-color: var(--cu-green); box-shadow: 0 0 0 2px rgba(30,125,94,0.25); }
.cu-hall strong { display: block; font-size: 0.85rem; }
.cu-shaykh {
  margin: 0.65rem 0; padding: 0.85rem 1rem; border-radius: 16px;
  border: 1px solid var(--cu-line); background: var(--cu-card);
}
.cu-shaykh .kicker { font-size: 0.65rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--cu-muted); }
.cu-shaykh h2 { margin: 0.25rem 0; font-size: 1.05rem; color: var(--cu-gold); }
.cu-shaykh p { margin: 0.25rem 0; font-size: 0.86rem; line-height: 1.45; }
.cu-shaykh .disc { font-size: 0.72rem; color: var(--cu-muted); }
.cu-role-row { display: flex; flex-wrap: wrap; gap: 0.35rem; justify-content: center; margin: 0.5rem 0; }
.cu-role-row a, .cu-role-row span {
  font-size: 0.72rem; font-weight: 700; padding: 0.35rem 0.65rem; border-radius: 999px;
  border: 1px solid var(--cu-line); background: var(--cu-card); text-decoration: none; color: inherit;
}
.cu-stage {
  margin: 0.75rem 0 1rem; padding: 1rem; border-radius: 16px;
  border: 1px solid var(--cu-line); background: var(--cu-card);
}
.cu-stage h1 { color: var(--cu-gold); font-size: 1.15rem; margin: 0 0 0.35rem; }
.cu-foot { text-align: center; font-size: 0.75rem; color: var(--cu-muted); padding: 1rem; }
/* compact phase plaque on desk/rooms */
.cpp-how-compact summary { cursor: pointer; font-weight: 700; }
details.cpp-how { font-size: 0.8rem; }

/* Map cards insurance H1 */
.cu-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(15rem,1fr));gap:.65rem;margin:.5rem 0 1rem}
.cu-card{display:flex;flex-direction:column;gap:.3rem;padding:.85rem 1rem;border-radius:14px;border:1px solid rgba(184,166,135,.35);background:rgba(21,32,28,.95);text-decoration:none;color:inherit;font-size:.86rem;line-height:1.4}
html[data-theme=light] .cu-card{background:#fffef8}
.cu-card strong{font-size:.98rem;color:#d4b45a}
.cu-card .tag{font-size:.7rem;letter-spacing:.06em;text-transform:uppercase;opacity:.8}
.cu-card .desc{opacity:.9;font-size:.82rem}
.cu-badge{display:inline-block;font-size:.65rem;font-weight:800;padding:.15rem .45rem;border-radius:999px;width:max-content}
.cu-badge.open{background:#1e7d5e;color:#fff}
.cu-badge.locked{background:rgba(255,255,255,.08);opacity:.75}
.cu-section-kicker{display:block;text-align:center;font-size:.7rem;letter-spacing:.08em;text-transform:uppercase;opacity:.75;margin-top:.5rem}
.cu-continue{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:.5rem;padding:.75rem 1rem;margin:.5rem auto;border-radius:14px;border:1px solid rgba(184,166,135,.35);background:rgba(21,32,28,.9);max-width:min(52rem,100%)}
.cu-continue a{font-weight:800;color:#d4b45a}


/* ==== cu-page-enrich-v1.css ==== */
/* Page enrich + Map wake — cards must display as cards (not inline links) */

.cu-page-hero { text-align: center; margin: 0.5rem 0 1rem; }
.cu-page-hero h1 {
  font-size: clamp(1.35rem, 3vw, 1.75rem);
  color: var(--cu-gold, #d4b45a);
  margin: 0 0 0.4rem;
  font-weight: 800;
}
html[data-theme="light"] .cu-page-hero h1 { color: #8b6f3f; }

/* Generic rich grid */
.cu-rich-grid,
.cu-grid,
.lab-grid {
  display: grid !important;
  grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr)) !important;
  gap: 0.75rem !important;
  max-width: min(56rem, 100%);
  margin: 0.75rem auto 1.25rem !important;
}

.cu-rich-card,
.cu-card,
.lab-card {
  display: flex !important;
  flex-direction: column !important;
  gap: 0.3rem !important;
  padding: 1rem 1.05rem !important;
  border-radius: 16px !important;
  border: 1px solid rgba(184, 166, 135, 0.45) !important;
  background: #1a2420 !important;
  color: #e8f0ea !important;
  text-decoration: none !important;
  min-height: 8.25rem !important;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.18) !important;
  transition: transform 0.15s ease, border-color 0.15s ease;
}
html[data-theme="light"] .cu-rich-card,
html[data-theme="light"] .cu-card,
html[data-theme="light"] .lab-card {
  background: #fffef8 !important;
  color: #2a2319 !important;
  border-color: #b8a687 !important;
  box-shadow: 0 6px 18px rgba(42, 35, 25, 0.07) !important;
}
.cu-card:hover,
.cu-rich-card:hover {
  transform: translateY(-2px);
  border-color: rgba(30, 125, 94, 0.55) !important;
}
.cu-card .tag,
.cu-rich-card .tag {
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: #7dcea0;
}
html[data-theme="light"] .cu-card .tag { color: #1e7d5e; }
.cu-card strong,
.cu-rich-card strong {
  font-size: 1.05rem;
  font-weight: 800;
  color: inherit !important;
}
.cu-card .desc,
.cu-rich-card span {
  font-size: 0.82rem;
  line-height: 1.4;
  opacity: 0.9;
}
.cu-badge {
  align-self: flex-start;
  font-size: 0.65rem;
  font-weight: 800;
  padding: 0.2rem 0.5rem;
  border-radius: 999px;
}
.cu-badge.open { background: #1e7d5e; color: #fff; }
.cu-badge.locked { background: rgba(255,255,255,0.12); color: #c5cfc8; }
html[data-theme="light"] .cu-badge.locked { background: #e8e0d0; color: #5a4f3f; }

/* Phase chips row */
.cu-phase-row {
  display: grid !important;
  grid-template-columns: repeat(4, 1fr) !important;
  gap: 0.45rem !important;
  margin: 0 0 1rem !important;
}
@media (max-width: 520px) {
  .cu-phase-row { grid-template-columns: repeat(2, 1fr) !important; }
}
.cu-phase-chip {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  min-height: 3.5rem !important;
  padding: 0.5rem !important;
  border-radius: 12px !important;
  text-decoration: none !important;
  border: 1px solid rgba(184,166,135,0.35) !important;
  background: #24302a !important;
  color: #e8f0ea !important;
  font-size: 0.78rem !important;
}
html[data-theme="light"] .cu-phase-chip {
  background: #fffef8 !important;
  color: #2a2319 !important;
}
.cu-phase-chip.on {
  border-color: #1e7d5e !important;
  box-shadow: 0 0 0 2px rgba(30,125,94,0.35);
}
.cu-phase-chip.locked { opacity: 0.75; }
.cu-phase-chip strong { display: block; font-size: 0.85rem; }

/* Medallions — not grey dead */
.cu-medallion-row {
  display: grid !important;
  grid-template-columns: repeat(4, 1fr) !important;
  gap: 0.5rem !important;
  margin: 0.75rem 0 !important;
}
@media (max-width: 520px) {
  .cu-medallion-row { grid-template-columns: repeat(2, 1fr) !important; }
}
.cu-medallion {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  gap: 0.2rem;
  padding: 0.65rem 0.4rem !important;
  border-radius: 16px !important;
  text-decoration: none !important;
  border: 1.5px solid rgba(30,125,94,0.3) !important;
  background: linear-gradient(180deg, #24382f, #1a2822) !important;
  color: #e8f0ea !important;
  text-align: center;
}
html[data-theme="light"] .cu-medallion {
  background: linear-gradient(180deg, #fffef8, #ebe0cb) !important;
  color: #2a2319 !important;
  border-color: rgba(30,125,94,0.35) !important;
}
.cu-medallion .ring { font-size: 1.4rem; }
.cu-medallion strong { font-size: 0.85rem; }
.cu-medallion small { font-size: 0.68rem; opacity: 0.85; }
.cu-medallion.on {
  border-color: #1e7d5e !important;
  box-shadow: 0 4px 16px rgba(30,125,94,0.35);
}
.cu-medallion.locked { opacity: 0.7; }

/* Continue band */
.cu-continue {
  display: flex !important;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  max-width: min(56rem, 100%);
  margin: 0.5rem auto 0.85rem !important;
  padding: 0.85rem 1rem !important;
  border-radius: 14px !important;
  border: 1px solid rgba(30,125,94,0.35) !important;
  background: rgba(30,125,94,0.12) !important;
}
.cu-continue a {
  display: inline-flex !important;
  padding: 0.45rem 0.9rem !important;
  border-radius: 999px !important;
  background: #1e7d5e !important;
  color: #fff !important;
  font-weight: 700 !important;
  text-decoration: none !important;
}

/* How phases */
.cu-how {
  margin: 0 auto 1rem !important;
  max-width: min(56rem, 100%);
  padding: 0.85rem 1rem !important;
  border-radius: 14px !important;
  border: 1px solid rgba(184,166,135,0.35) !important;
  background: rgba(0,0,0,0.22) !important;
  font-size: 0.8rem !important;
  line-height: 1.45 !important;
  color: #c5cfc8 !important;
}
html[data-theme="light"] .cu-how {
  background: rgba(42,35,25,0.06) !important;
  color: #5a4f3f !important;
}
.cu-how strong { color: #f3e6c0; }
html[data-theme="light"] .cu-how strong { color: #5c4623; }

.cu-section-kicker {
  display: block;
  text-align: center;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.75;
  margin-top: 0.5rem;
}

/* Kill black bar overlays fighting continue */
.cu-continue + * { position: relative; z-index: 1; }


/* ==== cu-layout-wide-v1.css ==== */
/* Wide, enriched layout — university shells
 * Day reading palette deepened; stages use more of the viewport.
 */

/* ---- Wider chrome ---- */
main.cu-wrap {
  max-width: min(72rem, 100%) !important;
  width: 100%;
  margin: 0 auto;
  padding: 0.75rem clamp(0.75rem, 3vw, 1.75rem) 5.5rem !important;
  box-sizing: border-box;
}

header.cu-banner {
  width: 100%;
  max-width: none;
  padding-left: clamp(0.65rem, 2.5vw, 1.5rem);
  padding-right: clamp(0.65rem, 2.5vw, 1.5rem);
}

.cu-pills {
  max-width: min(72rem, 100%);
  margin-left: auto;
  margin-right: auto;
}

/* Desk / curriculum stage */
#clarity-campus-stage,
#campus-stage-body,
#junior-curriculum-card,
#junior-high-curriculum-card,
#daily-hs-curriculum-card,
#dai-university-curriculum-card,
.curriculum-phase-card {
  max-width: min(52rem, 100%) !important;
  width: 100%;
  margin-left: auto !important;
  margin-right: auto !important;
}

/* Lab grid — more columns on wide screens */
.lab-grid {
  grid-template-columns: repeat(auto-fill, minmax(11rem, 1fr)) !important;
  max-width: min(64rem, 100%);
  margin-left: auto;
  margin-right: auto;
}

.lab-policy,
.lab-av-demo,
.media-studio,
.lab-lead,
.lab-h1 {
  max-width: min(52rem, 100%);
  margin-left: auto;
  margin-right: auto;
}

.studio-stage,
.lab-studio,
.tj-practice-loop {
  max-width: min(48rem, 100%);
  margin-left: auto;
  margin-right: auto;
}

/* Vault */
.vault-panel,
.vault-lead,
.vault-title {
  max-width: min(48rem, 100%) !important;
}

/* Two-column enhancement on large screens for lab hub */
@media (min-width: 900px) {
  .lab-hub-spread {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 1.25rem;
    align-items: start;
    max-width: min(72rem, 100%);
    margin: 0 auto 1rem;
  }
  .lab-hub-spread .lab-policy { margin: 0; max-width: none; }
  .lab-hub-spread .lab-av-demo { margin: 0; max-width: none; }
}

/* Reading comfort */
#junior-curriculum-card,
.curriculum-phase-card,
.card {
  padding: 1.15rem 1.25rem !important;
  line-height: 1.65;
}
#junior-curriculum-card p,
.junior-body-text p {
  font-size: 0.95rem !important;
  line-height: 1.65 !important;
}

/* ---- Enriched DAY reading palette ---- */
html[data-theme="light"] {
  --cu-bg: #ebe4d4;
  --cu-bg-elev: #faf6ec;
  --cu-card: #fffef9;
  --cu-text: #14231c;
  --cu-muted: #3d4f46;
  --cu-gold: #7a5c14;
  --cu-gold-soft: #5c4510;
  --cu-teal: #0a4334;
  --cu-ok: #145a45;
  --cu-line: rgba(10, 67, 52, 0.2);
  --cu-link: #0a4334;
  --cu-link-hover: #063328;
  --cu-link-visited: #1a5c48;
  --cu-banner-bg: linear-gradient(90deg, #0a4334 0%, #0d4f3c 45%, #1a6b52 100%);
}

html[data-theme="light"] body.cu-page {
  background:
    radial-gradient(ellipse 100% 60% at 50% -15%, rgba(26, 107, 82, 0.14), transparent 55%),
    radial-gradient(ellipse 50% 40% at 100% 20%, rgba(184, 146, 42, 0.08), transparent 45%),
    linear-gradient(180deg, #f0ebe0 0%, #ebe4d4 40%, #e5dcc8 100%) !important;
  color: var(--cu-text) !important;
}

html[data-theme="light"] #junior-curriculum-card,
html[data-theme="light"] .curriculum-phase-card,
html[data-theme="light"] .card,
html[data-theme="light"] .lab-policy,
html[data-theme="light"] .lab-card,
html[data-theme="light"] .lab-av-demo,
html[data-theme="light"] .media-studio {
  background: #fffef9 !important;
  color: #14231c !important;
  border: 1px solid rgba(10, 67, 52, 0.16) !important;
  box-shadow: 0 4px 20px rgba(20, 35, 28, 0.06);
}

html[data-theme="light"] #junior-curriculum-card p,
html[data-theme="light"] #junior-curriculum-card li,
html[data-theme="light"] .junior-body-text p {
  color: #1a2e24 !important;
}

html[data-theme="light"] .lab-h1,
html[data-theme="light"] h1 {
  color: #7a5c14 !important;
}

html[data-theme="light"] .lab-card strong {
  color: #0a4334 !important;
}

html[data-theme="light"] .lab-card span {
  color: #3d4f46 !important;
}

html[data-theme="light"] .cu-pills a {
  background: rgba(255, 254, 249, 0.85);
  color: #0a4334;
  border-color: rgba(10, 67, 52, 0.2);
}

html[data-theme="light"] .cu-pills a.here {
  background: rgba(10, 67, 52, 0.12);
  border-color: rgba(122, 92, 20, 0.45);
  color: #5c4510;
}

/* System light branch same richness */
@media (prefers-color-scheme: light) {
  html[data-theme="system"] {
    --cu-bg: #ebe4d4;
    --cu-bg-elev: #faf6ec;
    --cu-card: #fffef9;
    --cu-text: #14231c;
    --cu-muted: #3d4f46;
    --cu-gold: #7a5c14;
    --cu-gold-soft: #5c4510;
    --cu-teal: #0a4334;
    --cu-link: #0a4334;
    --cu-banner-bg: linear-gradient(90deg, #0a4334 0%, #0d4f3c 45%, #1a6b52 100%);
  }
  html[data-theme="system"] body.cu-page {
    background:
      radial-gradient(ellipse 100% 60% at 50% -15%, rgba(26, 107, 82, 0.14), transparent 55%),
      linear-gradient(180deg, #f0ebe0 0%, #ebe4d4 40%, #e5dcc8 100%) !important;
  }
}


/* ==== cu-enrich-hide-v1.css ==== */
/* Hide companion enrichment everywhere except Map */
body:not([data-campus-page="map"]) #cu-companion-enrich,
body:not([data-campus-page="map"]) .cu-companion-enrich,
body:not([data-campus-page="map"]) .cu-enrich-title,
body:not([data-campus-page="map"]) .cu-enrich-lead,
body:not([data-campus-page="map"]) .cu-enrich-grid {
  display: none !important;
}
/* Library / desk / lab / vault pages never show enrich */
body[data-campus-page="library"] #cu-companion-enrich,
body[data-campus-page="desk"] #cu-companion-enrich,
body[data-campus-page="lab"] #cu-companion-enrich,
body[data-campus-page="vault"] #cu-companion-enrich {
  display: none !important;
}


/* ==== cu-compass-hide-v1.css ==== */
/* Force-hide unopened compass panel — stops grey link soup under banner */
#cu-compass-panel:not(.open) {
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
  position: fixed !important;
  left: -9999px !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
}


/* ==== cu-campus-roles-v1.css ==== */
.cu-campus-roles{max-width:min(96rem,100%);margin:1rem auto 1.25rem;padding:0 clamp(.65rem,2vw,1.25rem);box-sizing:border-box}
.cu-roles-title{font-size:1.05rem;font-weight:800;color:#f3ead0;margin:0 0 .3rem}
.cu-roles-lead{font-size:.8rem;opacity:.88;margin:0 0 .55rem;line-height:1.4}
.cu-roles-row{display:flex;flex-wrap:wrap;gap:.4rem}
.cu-roles-btn{font-size:.78rem;padding:.4rem .75rem;border-radius:999px;border:1px solid rgba(212,180,90,.4);background:rgba(13,79,60,.35);color:#f3ead0;cursor:pointer}
.cu-roles-btn:hover{border-color:rgba(232,196,122,.7)}
.cu-roles-status{font-size:.75rem;min-height:1.1em;margin:.45rem 0 0;opacity:.9}
.cu-roles-faculty-panel{margin-top:.65rem;padding:.75rem .9rem;border-radius:14px;border:1px solid rgba(212,180,90,.35);background:rgba(0,0,0,.25);font-size:.82rem;line-height:1.45}
.cu-roles-faculty-panel strong{color:#e8c47a;display:block;margin-bottom:.35rem}
.cu-roles-faculty-panel p{margin:.35rem 0}
.cu-roles-link{color:#9fd4b8;text-decoration:underline}
.cu-roles-note{font-size:.72rem;opacity:.8}
