/* ============================================================
 * MLGround theme v2 — white, neat, editorial AI studio
 * Applied via body class .theme-v2
 * Accent: #6E40FF (violet) + #00B86B (live-only)
 * ============================================================ */

/* Editorial fonts: Inter Tight for display, JetBrains Mono for numbers */
@import url('https://fonts.googleapis.com/css2?family=Inter+Tight:wght@400;500;600;700;800&family=JetBrains+Mono:wght@500;600&display=swap');

/* -------- Base ------------------------------------------------ */
body.theme-v2 {
  background-color: #FFFFFF !important;
  color: #0A0A0A !important;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  -webkit-font-smoothing: antialiased;
}

/* -------- Background overrides ------------------------------- */
body.theme-v2 .bg-black { background-color: #FFFFFF !important; color: #0A0A0A !important; }
body.theme-v2 .bg-dark  { background-color: #F7F6F2 !important; color: #0A0A0A !important; }

/* Cards inside .bg-dark sections become white */
body.theme-v2 .bg-dark .bg-dark,
body.theme-v2 .bg-dark .bg-black {
  background-color: #FFFFFF !important;
  border: 1px solid #ECECEC;
}
/* Cards inside .bg-black sections become subtle off-white */
body.theme-v2 .bg-black .bg-dark,
body.theme-v2 .bg-black .bg-black {
  background-color: #F7F6F2 !important;
  border: 1px solid #ECECEC;
}

/* -------- Text colors ---------------------------------------- */
body.theme-v2 .text-white     { color: #0A0A0A !important; }
body.theme-v2 .text-secondary { color: #5B5B5B !important; }

/* -------- Borders -------------------------------------------- */
body.theme-v2 .border-dark      { border-color: #ECECEC !important; }
body.theme-v2 .border-secondary { border-color: #ECECEC !important; }
body.theme-v2 .border-light     { border-color: #D4D4D4 !important; }
body.theme-v2 .border-opacity-25 { --bs-border-opacity: 0.4; }

/* -------- Navbar --------------------------------------------- */
body.theme-v2 nav.navbar.bg-black {
  background-color: rgba(255,255,255,0.92) !important;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid #ECECEC;
}
body.theme-v2 .navbar-dark .navbar-brand,
body.theme-v2 .navbar-dark .nav-link {
  color: #0A0A0A !important;
}
body.theme-v2 .navbar-dark .nav-link.active { color: #6E40FF !important; }
body.theme-v2 .navbar-dark .navbar-toggler-icon { filter: invert(1); }

/* -------- Buttons -------------------------------------------- */
body.theme-v2 .btn-light {
  background-color: #6E40FF !important;
  color: #FFFFFF !important;
  border-color: #6E40FF !important;
}
body.theme-v2 .btn-light:hover,
body.theme-v2 .btn-light:focus {
  background-color: #5A2DE0 !important;
  color: #FFFFFF !important;
  border-color: #5A2DE0 !important;
}
body.theme-v2 .btn-outline-light {
  background-color: transparent !important;
  color: #0A0A0A !important;
  border: 1px solid #0A0A0A !important;
}
body.theme-v2 .btn-outline-light:hover {
  background-color: #0A0A0A !important;
  color: #FFFFFF !important;
}

/* -------- Shadows & radius ----------------------------------- */
body.theme-v2 .shadow {
  box-shadow: 0 1px 2px rgba(10,10,10,.04), 0 8px 24px rgba(10,10,10,.04) !important;
}
body.theme-v2 .rounded-5 { border-radius: 18px !important; }
body.theme-v2 .rounded-4 { border-radius: 14px !important; }

/* -------- Pills ---------------------------------------------- */
body.theme-v2 .pill {
  border: 1px solid #ECECEC !important;
  background: #FFFFFF !important;
  color: #5B5B5B !important;
}

/* -------- Typography ----------------------------------------- */
body.theme-v2 h1, body.theme-v2 h2, body.theme-v2 h3, body.theme-v2 h4,
body.theme-v2 .display-huge,
body.theme-v2 .display-1, body.theme-v2 .display-2,
body.theme-v2 .display-3, body.theme-v2 .display-4, body.theme-v2 .display-5 {
  font-family: 'Inter Tight', 'Inter', sans-serif;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #0A0A0A;
}
body.theme-v2 .fw-bolder { font-weight: 700 !important; }
body.theme-v2 .fw-lighter { font-weight: 400 !important; color: #5B5B5B; }
body.theme-v2 .lead { color: #2A2A2A; }

/* Numbers in JetBrains Mono */
body.theme-v2 .display-3.fw-bolder,
body.theme-v2 .display-4.fw-bolder,
body.theme-v2 .display-5.fw-bolder {
  font-family: 'JetBrains Mono', 'Inter Tight', monospace;
  font-feature-settings: 'tnum' 1;
  letter-spacing: -0.01em;
}

/* -------- Links ---------------------------------------------- */
body.theme-v2 a.link-fancy.link-fancy-light,
body.theme-v2 .link-fancy.link-fancy-light {
  color: #6E40FF !important;
}
body.theme-v2 a.link-fancy.link-fancy-light:hover { color: #5A2DE0 !important; }

/* -------- Footer (stays dark for contrast) ------------------- */
body.theme-v2 footer.bg-black {
  background-color: #0A0A0A !important;
  color: #B5B5B5 !important;
}
body.theme-v2 footer.bg-black .text-secondary,
body.theme-v2 footer.bg-black .small,
body.theme-v2 footer.bg-black p,
body.theme-v2 footer.bg-black span,
body.theme-v2 footer.bg-black .nav-item span {
  color: #B5B5B5 !important;
}
body.theme-v2 footer.bg-black a.link-fancy.link-fancy-light,
body.theme-v2 footer.bg-black a {
  color: #FFFFFF !important;
}
body.theme-v2 footer.bg-black .border-top.border-dark,
body.theme-v2 footer.bg-black .border-end.border-dark {
  border-color: #2A2A2A !important;
}
body.theme-v2 footer.bg-black .navbar-brand svg { color: #FFFFFF !important; }

/* -------- Custom inline classes ------------------------------ */
body.theme-v2 .svc {
  background: #FFFFFF !important;
  border: 1px solid #ECECEC !important;
  color: #0A0A0A !important;
}
body.theme-v2 .chan-card,
body.theme-v2 .role-card {
  background: #FFFFFF !important;
  border: 1px solid #ECECEC !important;
  color: #0A0A0A !important;
  padding: 24px;
  border-radius: 14px;
}
body.theme-v2 .stage-num,
body.theme-v2 .step-num,
body.theme-v2 .form-label-sm {
  font-family: 'JetBrains Mono', monospace;
  color: #6E40FF !important;
}

/* -------- Image polish --------------------------------------- */
body.theme-v2 img.rounded-5,
body.theme-v2 img.rounded-4 {
  border: 1px solid #ECECEC;
}

/* -------- Live system widget --------------------------------- */
@keyframes pulse-live {
  0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(0,184,107,0.35); }
  70%      { opacity: 1; box-shadow: 0 0 0 10px rgba(0,184,107,0); }
}
.live-dot {
  display: inline-block;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #00B86B;
  vertical-align: middle;
  animation: pulse-live 2s ease-in-out infinite;
}
.live-strip {
  background: #FFFFFF;
  border: 1px solid #ECECEC;
  border-radius: 14px;
  padding: 22px 28px;
  box-shadow: 0 1px 2px rgba(10,10,10,.04), 0 8px 24px rgba(10,10,10,.04);
}
.live-strip .stat-label {
  color: #5B5B5B;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-family: 'Inter', sans-serif;
  font-weight: 500;
}
.live-strip .stat-value {
  color: #0A0A0A;
  font-family: 'JetBrains Mono', monospace;
  font-weight: 600;
  font-size: 1.35rem;
  display: block;
  margin-top: 4px;
  letter-spacing: -0.01em;
  font-variant-numeric: tabular-nums;
}
.live-strip .stat-tag {
  color: #5B5B5B;
  font-size: 0.7rem;
  margin-left: 6px;
  font-family: 'Inter', sans-serif;
  font-weight: 400;
}

/* -------- Legal pages (privacy_policy, Terms of use) --------- */
body.theme-v2 .legal h2 { color: #0A0A0A !important; }
body.theme-v2 .legal p,
body.theme-v2 .legal ul,
body.theme-v2 .legal li { color: #2A2A2A !important; }
body.theme-v2 .legal a { color: #6E40FF !important; text-decoration: underline; }
body.theme-v2 .legal code {
  background: #F4F1FF !important;
  color: #4521B8 !important;
  border: 1px solid #E0D6FF;
}

/* Stack-pipeline arrow connectors — only at xl+ where cards are in a single row */
@media (min-width: 1200px) {
  body.theme-v2 .stack-pipeline > [class*="col-xl-"]:not(:last-child) {
    position: relative;
  }
  body.theme-v2 .stack-pipeline > [class*="col-xl-"]:not(:last-child)::after {
    content: "→";
    position: absolute;
    right: -12px;
    top: 50%;
    transform: translateY(-50%);
    color: #6E40FF;
    font-size: 1.3rem;
    font-weight: 600;
    z-index: 2;
  }
}

/* AI stack card body text — tighten leading and slightly smaller on cramped widths */
body.theme-v2 .stack-pipeline .bg-dark p {
  font-size: 0.92rem;
  line-height: 1.55;
}
body.theme-v2 .stack-pipeline .bg-dark h3 {
  font-size: 1.15rem;
  line-height: 1.25;
}
