:root {
  --p4-bg: #f7f8fc;
  --p4-bg-soft: #eef2f8;
  --p4-ink: #0b1730;
  --p4-ink-soft: #4d5d79;
  --p4-line: rgba(11, 23, 48, 0.14);
  --p4-blue: #2563eb;
  --p4-green: #10b981;
}

body.pms4-theme {
  font-family: 'DM Sans', sans-serif;
  background: radial-gradient(900px 460px at -5% -10%, rgba(37, 99, 235, 0.1), transparent 60%), radial-gradient(780px 440px at 105% -10%, rgba(16, 185, 129, 0.09), transparent 58%), linear-gradient(180deg, #f7f8fc 0%, #f2f5fa 55%, #eef2f8 100%);
  color: var(--p4-ink);
}

body.pms4-theme h1,
body.pms4-theme h2,
body.pms4-theme h3,
body.pms4-theme h4,
body.pms4-theme .brand-title,
body.pms4-theme .mc-lockup__wordmark {
  font-family: 'Playfair Display', serif;
  color: var(--p4-ink);
}

body.pms4-theme .site-header {
  background: rgba(247, 248, 252, 0.88) !important;
  border-bottom: 1px solid var(--p4-line) !important;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

body.pms4-theme .nav-shell { min-height: 80px; }

body.pms4-theme .brand img,
body.pms4-theme .mc-lockup__mark {
  width: 34px;
  height: 34px;
  border: 0 !important;
  background: transparent !important;
  filter: none !important;
}

body.pms4-theme .brand-sub,
body.pms4-theme .mc-lockup__tag {
  color: #6b7a93 !important;
  border: 0 !important;
  background: transparent !important;
  font-family: 'DM Mono', monospace;
  font-size: 0.62rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

body.pms4-theme .main-nav a {
  color: rgba(11, 23, 48, 0.68) !important;
  background: transparent !important;
  border-color: transparent !important;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-size: 0.72rem;
  font-weight: 700;
}

body.pms4-theme .main-nav a:hover,
body.pms4-theme .main-nav a[aria-current='page'] {
  color: var(--p4-blue) !important;
  background: rgba(37, 99, 235, 0.09) !important;
  border-color: rgba(37, 99, 235, 0.22) !important;
}

body.pms4-theme .main-nav a.nav-utility {
  color: var(--p4-blue) !important;
  border: 1px solid rgba(37, 99, 235, 0.28) !important;
  background: rgba(255, 255, 255, 0.82) !important;
}

body.pms4-theme.mc-mode .site-header.mc-nav .nav-utility,
body.pms4-theme.home-page .site-header.mc-nav .nav-utility {
  color: var(--p4-blue) !important;
  border: 1px solid rgba(37, 99, 235, 0.28) !important;
  background: rgba(255, 255, 255, 0.9) !important;
  box-shadow: 0 8px 20px rgba(37, 99, 235, 0.12) !important;
}

body.pms4-theme.mc-mode .site-header.mc-nav .nav-utility:hover,
body.pms4-theme.home-page .site-header.mc-nav .nav-utility:hover,
body.pms4-theme.mc-mode .site-header.mc-nav .nav-utility[aria-current='page'],
body.pms4-theme.home-page .site-header.mc-nav .nav-utility[aria-current='page'] {
  color: #1d4ed8 !important;
  background: #eff6ff !important;
  border-color: rgba(37, 99, 235, 0.34) !important;
}

body.pms4-theme .nav-cta.btn,
body.pms4-theme .btn.btn-primary {
  background: var(--p4-blue) !important;
  border-color: var(--p4-blue) !important;
  color: #fff !important;
  box-shadow: 0 12px 28px rgba(37, 99, 235, 0.2);
}

body.pms4-theme .nav-cta.btn:hover,
body.pms4-theme .btn.btn-primary:hover {
  background: #1d4ed8 !important;
  border-color: #1d4ed8 !important;
}

body.pms4-theme .btn.btn-secondary {
  background: #fff !important;
  color: var(--p4-ink) !important;
  border: 1px solid rgba(11, 23, 48, 0.22) !important;
}

body.pms4-theme .btn.btn-secondary:hover {
  border-color: rgba(37, 99, 235, 0.35) !important;
  color: var(--p4-blue) !important;
}

body.pms4-theme main { padding-top: 86px; }

body.pms4-theme .hero-mini {
  background: linear-gradient(180deg, #f7f8fc 0%, #eef2f8 100%) !important;
  border-bottom: 1px solid var(--p4-line) !important;
  padding: 9.8rem 0 4.5rem !important;
}

body.pms4-theme .hero-mini h1,
body.pms4-theme .hero-mini h2,
body.pms4-theme .hero-mini h3,
body.pms4-theme .hero-mini h4,
body.pms4-theme .hero-mini .section-header h2 {
  color: var(--p4-ink) !important;
}

body.pms4-theme .hero-mini p,
body.pms4-theme .hero-mini li,
body.pms4-theme .hero-mini .section-header p,
body.pms4-theme .hero-mini .section-intro {
  color: var(--p4-ink-soft) !important;
}

body.pms4-theme .hero-mini .section-label,
body.pms4-theme .section-label {
  color: var(--p4-blue) !important;
  font-family: 'DM Mono', monospace;
  letter-spacing: 0.12em;
}

body.pms4-theme p,
body.pms4-theme li,
body.pms4-theme .section-header p,
body.pms4-theme .section-intro {
  color: var(--p4-ink-soft);
}

body.pms4-theme .section {
  background: transparent;
}

body.pms4-theme .section-muted,
body.pms4-theme .stats-bar,
body.pms4-theme .ticker-strip {
  background: var(--p4-bg-soft) !important;
  border-color: rgba(11, 23, 48, 0.12) !important;
}

body.pms4-theme .glass-card,
body.pms4-theme .glass-card-static,
body.pms4-theme .feature-card,
body.pms4-theme .pricing-card,
body.pms4-theme .faq-item,
body.pms4-theme .cohort-panel,
body.pms4-theme .auth-shell .glass-card-static {
  background: rgba(255, 255, 255, 0.9) !important;
  border: 1px solid rgba(11, 23, 48, 0.13) !important;
  box-shadow: 0 16px 38px rgba(11, 23, 48, 0.08);
}

body.pms4-theme .section.section-dark,
body.pms4-theme .section-dark,
body.pms4-theme .grid-bg {
  background: linear-gradient(180deg, #0b1730 0%, #132547 100%) !important;
  border-color: rgba(191, 219, 254, 0.22) !important;
}

body.pms4-theme .section.section-dark h1,
body.pms4-theme .section.section-dark h2,
body.pms4-theme .section.section-dark h3,
body.pms4-theme .section.section-dark h4 {
  color: #fff !important;
}

body.pms4-theme .section.section-dark p,
body.pms4-theme .section.section-dark li,
body.pms4-theme .section.section-dark .section-intro,
body.pms4-theme .section.section-dark .section-header p {
  color: rgba(235, 243, 255, 0.82) !important;
}

body.pms4-theme .section.section-dark .section-label {
  color: #86efac !important;
}

body.pms4-theme .badge,
body.pms4-theme .course-meta .badge,
body.pms4-theme .chip,
body.pms4-theme .status-chip {
  background: rgba(37, 99, 235, 0.09) !important;
  border-color: rgba(37, 99, 235, 0.24) !important;
  color: #1e40af !important;
}

body.pms4-theme input,
body.pms4-theme select,
body.pms4-theme textarea {
  background: rgba(255, 255, 255, 0.96) !important;
  border-color: rgba(11, 23, 48, 0.2) !important;
  color: var(--p4-ink) !important;
}

body.pms4-theme .footer {
  background: #0b1730 !important;
  border-top: 1px solid rgba(191, 219, 254, 0.2) !important;
}

body.pms4-theme .footer p,
body.pms4-theme .footer a,
body.pms4-theme .footer-bottom,
body.pms4-theme .footer-col h4,
body.pms4-theme .footer-brand span {
  color: #d9e5fb !important;
}

@media (max-width: 1080px) {
  body.pms4-theme .main-nav {
    background: rgba(248, 250, 253, 0.98) !important;
    border: 1px solid rgba(11, 23, 48, 0.16) !important;
  }
}

/* Keep legacy inline dark text readable if rendered in dark sections */
body.pms4-theme .section.section-dark [style*="color:#0f172a"],
body.pms4-theme .section.section-dark [style*="color: #0f172a"] {
  color: #eef4ff !important;
}
