/*
 * NeuroAttention — Redesign overlay
 * Loaded AFTER styles.css. Softens the look:
 *   - lighter, more transparent glass
 *   - no loud cyan→blue gradient text on every headline
 *   - all buttons glass (no solid gradient button)
 *   - FlipLink navbar, custom cursor, video containers
 * Everything here is additive/overrides — existing markup keeps working.
 */

/* ══════════════════════════════════════════
   TOKENS — softer palette
   ══════════════════════════════════════════ */
:root {
  --accent-soft: rgba(200, 225, 220, 0.9);       /* cool near-white accent */
  --accent-soft-dim: rgba(200, 225, 220, 0.55);
  --line-soft: rgba(255, 255, 255, 0.07);
  --line-softer: rgba(255, 255, 255, 0.04);
  --glass-ultra: rgba(255, 255, 255, 0.025);
  --glass-ultra-hover: rgba(255, 255, 255, 0.045);
  --dot-attention: 255, 255, 255;                 /* cursor dot color (rgba tuple) */
  --hero-font: 'Unbounded', 'Space Grotesk', sans-serif;
  --body-font: 'Inter', 'DM Sans', system-ui, sans-serif;
  --mono-font: 'JetBrains Mono', ui-monospace, monospace;
}

/* Use Inter as body font (metrics are cleaner than DM Sans, excellent RU/EN/ES) */
body {
  font-family: var(--body-font);
  letter-spacing: -0.005em;
  cursor: auto;  /* native fallback until movement tracking is active */
}

/* keep native cursor on touch devices */
@media (hover: none), (pointer: coarse) {
  body { cursor: auto; }
  .cursor-stylus, .cursor-dot { display: none !important; }
}

.heading-space {
  font-family: var(--hero-font);
  font-weight: 500;
  letter-spacing: -0.03em;
}

/* Kill the global cyan→blue gradient text.
   Keep gradient only on logo wordmark "Attention". */
.text-gradient-cyan {
  background: none;
  -webkit-text-fill-color: currentColor;
  color: var(--text-primary);
}
.nav-logo .text-gradient-cyan {
  background: linear-gradient(135deg, rgba(220,245,240,0.95) 0%, rgba(180,210,230,0.85) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

/* Softer eyebrow — white at low opacity instead of cyan */
.eyebrow, .tag, .mono-label {
  color: rgba(255, 255, 255, 0.5) !important;
}

/* ══════════════════════════════════════════
   ATMOSPHERE — calmer background (less color spots)
   ══════════════════════════════════════════ */
.deep-atmosphere {
  background:
    radial-gradient(ellipse 90% 60% at 50% 0%, rgba(255,255,255,0.025), transparent 70%),
    radial-gradient(ellipse 70% 50% at 20% 100%, rgba(255,255,255,0.015), transparent 70%),
    linear-gradient(180deg, #04060A 0%, #05070C 50%, #04060A 100%);
}
.noise-overlay {
  opacity: 0.25;
}

/* ══════════════════════════════════════════
   GLASS — lighter, thinner borders, more transparent
   ══════════════════════════════════════════ */
.glass-card,
.glass-card-elevated,
.glass-card-bright {
  background: var(--glass-ultra);
  backdrop-filter: blur(18px) saturate(1.1);
  -webkit-backdrop-filter: blur(18px) saturate(1.1);
  border: 1px solid var(--line-soft);
  box-shadow:
    0 0 0 0.5px rgba(255,255,255,0.03) inset,
    0 10px 40px rgba(0,0,0,0.35);
  transition: background 0.4s, border-color 0.4s, transform 0.4s cubic-bezier(0.16,1,0.3,1);
}

.glass-card-bright {
  background: linear-gradient(135deg, rgba(255,255,255,0.04) 0%, rgba(255,255,255,0.015) 100%);
  border-color: rgba(255,255,255,0.09);
}

.card-hover:hover {
  background: var(--glass-ultra-hover);
  border-color: rgba(255,255,255,0.14);
  transform: translateY(-3px);
  box-shadow:
    0 0 0 0.5px rgba(255,255,255,0.06) inset,
    0 20px 60px rgba(0,0,0,0.45);
}

.glass-icon {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  box-shadow: 0 0 0 0.5px rgba(255,255,255,0.03) inset;
}

.glass-image-frame {
  border: 1px solid var(--line-soft);
  box-shadow:
    0 0 0 0.5px rgba(255,255,255,0.03) inset,
    0 20px 50px rgba(0,0,0,0.45);
}

.glow-cyan {
  box-shadow:
    0 0 0 0.5px rgba(255,255,255,0.08) inset,
    0 12px 40px rgba(0,0,0,0.45),
    0 0 80px rgba(255,255,255,0.04);
}

/* ══════════════════════════════════════════
   BUTTONS — all glass (no solid gradient)
   ══════════════════════════════════════════ */
.btn-solid {
  background: rgba(255,255,255,0.06);
  color: var(--text-primary);
  font-weight: 500;
  border: 1px solid rgba(255,255,255,0.14);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow:
    0 0 0 0.5px rgba(255,255,255,0.05) inset,
    0 4px 18px rgba(0,0,0,0.35);
}
.btn-solid:hover {
  background: rgba(255,255,255,0.1);
  border-color: rgba(255,255,255,0.22);
  transform: translateY(-2px);
  box-shadow:
    0 0 0 0.5px rgba(255,255,255,0.08) inset,
    0 8px 28px rgba(0,0,0,0.45);
}

.btn-primary {
  background: rgba(255,255,255,0.025);
  color: var(--text-primary);
  border: 1px solid rgba(255,255,255,0.1);
}
.btn-primary:hover {
  background: rgba(255,255,255,0.06);
  border-color: rgba(255,255,255,0.18);
  transform: translateY(-2px);
}

/* ══════════════════════════════════════════
   NAVBAR — FlipLink hover + glass bar
   ══════════════════════════════════════════ */
.navbar {
  backdrop-filter: blur(10px) saturate(1.1);
  -webkit-backdrop-filter: blur(10px) saturate(1.1);
  background: rgba(4,6,10,0.35);
  border-bottom: 1px solid transparent;
}
.navbar.scrolled {
  background: rgba(4,6,10,0.6);
  border-bottom: 1px solid rgba(255,255,255,0.04);
  box-shadow: none;
}

.nav-link {
  position: relative;
  overflow: hidden;
  padding: 0.5rem 0.9rem;
  height: 2rem;
  line-height: 1rem;
  display: inline-flex;
  align-items: center;
  color: rgba(255,255,255,0.55);
  font-weight: 500;
  border: 0;
  letter-spacing: -0.01em;
}

/* FlipLink: fast vertical flip effect on hover */
.nav-link .flip-inner {
  position: relative;
  display: inline-block;
  line-height: 1rem;
  perspective: 120px;
}
.nav-link .flip-inner::before {
  content: attr(data-label);
  position: absolute;
  top: 0;
  left: 0;
  color: var(--text-primary);
  transform: rotateX(-90deg);
  transform-origin: bottom center;
  backface-visibility: hidden;
  transition: transform 0.28s cubic-bezier(0.4, 0, 0.2, 1);
}
.nav-link .flip-inner > span {
  display: inline-block;
  transform-origin: top center;
  backface-visibility: hidden;
  transition: transform 0.28s cubic-bezier(0.4, 0, 0.2, 1);
}
.nav-link:hover .flip-inner > span,
.nav-link.active .flip-inner > span {
  transform: rotateX(90deg);
}
.nav-link:hover .flip-inner::before,
.nav-link.active .flip-inner::before {
  transform: rotateX(0deg);
}
.nav-link:hover { color: rgba(255,255,255,0.55); }
.nav-link.active { color: rgba(255,255,255,0.55); }

/* wrap the span so FlipLink clips */
.nav-link::after { display: none; }  /* remove underline if any */

/* Lang switch — thinner */
.lang-switch {
  border: 1px solid rgba(255,255,255,0.06);
  background: transparent;
  backdrop-filter: none;
}
.lang-btn {
  color: rgba(255,255,255,0.4);
}
.lang-btn.active {
  color: var(--text-primary);
  background: rgba(255,255,255,0.05);
}

/* Login pill */
.nav-login {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem 0.9rem;
  border-radius: 999px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.1);
  color: rgba(255,255,255,0.85);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.01em;
  transition: background 0.3s, border-color 0.3s, color 0.3s;
}
.nav-login:hover {
  background: rgba(255,255,255,0.08);
  border-color: rgba(255,255,255,0.2);
  color: var(--text-primary);
}
.nav-login .login-dot {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: rgba(255,255,255,0.85);
  box-shadow: 0 0 8px rgba(255,255,255,0.5);
}

/* ══════════════════════════════════════════
   CUSTOM CURSOR — stylus + trailing attention dot
   ══════════════════════════════════════════ */
.cursor-stylus,
.cursor-dot {
  opacity: 0;
  position: fixed;
  top: 0;
  left: 0;
  pointer-events: none;
  z-index: 2147483647;
  will-change: transform;
  mix-blend-mode: screen;
}

.cursor-stylus {
  width: 14px;
  height: 14px;
  margin: -1px 0 0 -1px;
  transform: translate(-50%, -50%);
}
.cursor-stylus svg { width: 100%; height: 100%; display: block; }

.cursor-dot {
  width: 14px;
  height: 14px;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(var(--dot-attention),0.95) 0%, rgba(var(--dot-attention),0.45) 40%, rgba(var(--dot-attention),0) 70%);
  transform: translate(-50%, -50%);
  transition: width 0.3s, height 0.3s, opacity 0.3s;
}
.cursor-dot.hover {
  width: 44px;
  height: 44px;
}
.cursor-dot.down {
  width: 9px;
  height: 9px;
}

/* ══════════════════════════════════════════
   VIDEO MEDIA — animated GIFs as UI components
   ══════════════════════════════════════════ */
.media-box {
  position: relative;
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid var(--line-soft);
  background: #020306;
  box-shadow:
    0 0 0 0.5px rgba(255,255,255,0.03) inset,
    0 20px 60px rgba(0,0,0,0.5);
}
.media-box video,
.media-box img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  image-rendering: -webkit-optimize-contrast;
  image-rendering: crisp-edges;
}
.media-box.aspect-hero { aspect-ratio: 4 / 3; }
.media-box.aspect-sq   { aspect-ratio: 1 / 1; }
.media-box.aspect-tall { aspect-ratio: 3 / 4; }
.media-box.aspect-wide { aspect-ratio: 16 / 9; }

.media-inline {
  width: 56px; height: 56px;
  border-radius: 14px;
  overflow: hidden;
  flex-shrink: 0;
  border: 1px solid var(--line-soft);
}
.media-inline video { width: 100%; height: 100%; object-fit: cover; display: block; }

.media-round {
  border-radius: 999px;
  overflow: hidden;
  background: #020306;
  border: 1px solid var(--line-soft);
}
.media-round video { width: 100%; height: 100%; object-fit: cover; display: block; }

/* Small attention-token chip with GIF inside (decoration) */
.chip-media {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.4rem 0.9rem 0.4rem 0.4rem;
  border-radius: 999px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.08);
  font-size: 12px;
  color: rgba(255,255,255,0.7);
  backdrop-filter: blur(10px);
}
.chip-media .chip-video {
  width: 24px; height: 24px; border-radius: 999px; overflow: hidden;
  background: #020306;
}
.chip-media video { width: 100%; height: 100%; object-fit: cover; display: block; }

/* ══════════════════════════════════════════
   SCROLL-DROP — hero→facts→solution ripple transition
   ══════════════════════════════════════════ */
.scroll-drop-stage {
  position: relative;
  min-height: 100vh;
}
.scroll-drop-fixed {
  position: sticky;
  top: 0;
  height: 100vh;
  width: 100%;
  pointer-events: none;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.scroll-drop-video {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%) scale(var(--drop-scale, 1));
  width: min(520px, 80vw);
  aspect-ratio: 1 / 1;
  opacity: var(--drop-opacity, 0);
  transition: opacity 0.4s;
  mix-blend-mode: screen;
}
.scroll-drop-video video {
  width: 100%; height: 100%; object-fit: contain; display: block;
}

/* ══════════════════════════════════════════
   GENERIC — small polish
   ══════════════════════════════════════════ */
.section-divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.08), transparent);
}

.btn {
  font-family: var(--body-font);
}

.h2-block.large {
  font-family: var(--hero-font);
  font-weight: 500;
}

/* fade-up starting state stronger so motion is more felt */
.fade-up, .fade-left, .fade-right, .fade-scale {
  transition-duration: 0.9s;
  transition-timing-function: cubic-bezier(0.16, 1, 0.3, 1);
}

/* Magnetic hover class (added by JS) */
.magnetic {
  transition: transform 0.2s cubic-bezier(0.2, 0.9, 0.3, 1.4);
  will-change: transform;
}

/* ══════════════════════════════════════════
   LAYOUT — wider container, tighter spacing
   ══════════════════════════════════════════ */

/* Widen the main container from 1200px to 1440px */
.container {
  max-width: 1440px !important;
  padding: 0 2.5rem !important;
}
@media (min-width: 1600px) {
  .container { max-width: 1520px !important; }
}

/* Widen max-width helpers so content fills the container */
.max-w-2xl { max-width: 100% !important; }
.max-w-3xl { max-width: 100% !important; }
.max-w-4xl { max-width: 100% !important; }
.max-w-5xl { max-width: 100% !important; }

/* Keep chat interface narrower — it's a chat, not a page block */
.test-wrap .max-w-3xl { max-width: 52rem !important; }

/* Reduce vertical section spacing — less whitespace between blocks */
.section {
  padding: 3.5rem 0 !important;
}
@media (min-width: 1024px) {
  .section {
    padding: 4.5rem 0 !important;
  }
}

/* Standardize grid layouts — wider image columns */
.grid.grid-2 {
  gap: 3rem;
}
@media (min-width: 768px) {
  .grid.grid-2 {
    gap: 4rem;
  }
}

/* ══════════════════════════════════════════
   HERO — tighter spacing
   ══════════════════════════════════════════ */
.hero {
  padding-top: 5.5rem !important;
  padding-bottom: 2rem !important;
}

/* ══════════════════════════════════════════
   UNIFIED TYPOGRAPHY — match main page sizes
   ══════════════════════════════════════════ */

/* Hero h1 — all pages match main: clamp(2.25rem, 5vw+1rem, 4.25rem) */
section:first-of-type h1.heading-space,
.method-hero h1.heading-space {
  font-size: clamp(2.25rem, 5vw + 1rem, 4.25rem) !important;
}

/* Hero subtitle / first description paragraph — match main page .hero-sub */
section:first-of-type > .container > .grid > div:first-child > p[style*="1.0625rem"],
section:first-of-type > .container > .fade-up > p[style*="1.0625rem"],
.method-hero p[style*="1.0625rem"] {
  font-size: clamp(1rem, 1.2vw + 0.5rem, 1.25rem) !important;
  line-height: 1.75 !important;
}

/* Card body text — standardise to 15px across all pages */
.glass-card-elevated p,
.glass-card-bright p,
.glass-card p,
.skill-row p:not(.brain) {
  font-size: 15px !important;
  line-height: 1.7;
}
/* Keep brain/meta labels small */
.skill-row .brain {
  font-size: 11px !important;
}

/* Sub-muted — consistent 1rem baseline */
.sub-muted {
  font-size: 1rem;
}

/* Larger body text for wider layouts */
@media (min-width: 1024px) {
  .hero-desc, .sub-muted {
    font-size: 1.1rem;
  }
  .h2-block {
    font-size: clamp(1.75rem, 2.4vw, 2.5rem);
  }
  .hero .heading-space {
    font-size: clamp(2.5rem, 3.5vw, 3.5rem);
  }
}

/* Fix font sizing inside cards for wider view */
@media (min-width: 1200px) {
  .card-base p, .list-bullet li {
    font-size: 1rem;
    line-height: 1.75;
  }
}

/* Responsive fallback for inline grids on narrow screens */
@media (max-width: 768px) {
  [style*="grid-template-columns"] {
    display: flex !important;
    flex-direction: column !important;
  }
}

/* ══════════════════════════════════════════
   FACT CARDS — slide in from sides on scroll
   ══════════════════════════════════════════ */
/* Fact cards: visible by default; JS adds .slide-ready when observer is active */
.slide-ready .fact-slide-left {
  opacity: 0;
  transform: translateX(-80px);
  transition: transform 0.7s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.5s ease;
}
.slide-ready .fact-slide-right {
  opacity: 0;
  transform: translateX(80px);
  transition: transform 0.7s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.5s ease;
}
.slide-ready .fact-slide-left.in-view,
.slide-ready .fact-slide-right.in-view {
  opacity: 1;
  transform: translateX(0);
}

/* ══════════════════════════════════════════
   IMAGE STACK — fan on hover
   ══════════════════════════════════════════ */
.img-stack {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  cursor: pointer;
}
.img-stack .stack-layer {
  position: absolute;
  inset: 0;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--line-soft);
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.5s;
  box-shadow: 0 4px 20px rgba(0,0,0,0.4);
}
.img-stack .stack-layer img {
  width: 100%; height: 100%; object-fit: cover; display: block;
  filter: brightness(0.85);
  opacity: 0.85;
}
/* stacked: already fanned slightly so edges are visible */
.img-stack .stack-layer:nth-child(1) { z-index: 3; transform: rotate(-4deg) translate(-12px, 4px); }
.img-stack .stack-layer:nth-child(2) { z-index: 2; transform: rotate(0deg) translate(0, -4px); }
.img-stack .stack-layer:nth-child(3) { z-index: 1; transform: rotate(4deg) translate(12px, 4px); }
/* fan opens wider on hover */
.img-stack:hover .stack-layer:nth-child(1) { transform: rotate(-10deg) translate(-40px, 10px); z-index: 3; }
.img-stack:hover .stack-layer:nth-child(2) { transform: rotate(0deg) translate(0, -14px) scale(1.03); z-index: 4; }
.img-stack:hover .stack-layer:nth-child(3) { transform: rotate(10deg) translate(40px, 10px); z-index: 3; }
/* click-to-front: .front class brings layer to top */
.img-stack .stack-layer.front { z-index: 10 !important; transform: rotate(0deg) translate(0, 0) scale(1.02) !important; box-shadow: 0 12px 50px rgba(0,0,0,0.6); }

/* ══════════════════════════════════════════
   CTA — video background with glass overlay
   ══════════════════════════════════════════ */
.cta-video-wrap {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
}
.cta-video-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  opacity: 0.25;
}
.cta-video-bg video {
  width: 100%; height: 100%; object-fit: cover; display: block;
}
.cta-video-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0.5) 0%, rgba(0,0,0,0.7) 100%);
  z-index: 1;
}
.cta-video-wrap .cta-content {
  position: relative;
  z-index: 2;
  padding: 2.5rem;
  text-shadow: 0 1px 8px rgba(0,0,0,0.6);
}

/* ══════════════════════════════════════════
   COMMUNITY — small inline planet gif
   ══════════════════════════════════════════ */
.planet-inline {
  width: 120px;
  height: 120px;
  border-radius: 999px;
  overflow: hidden;
  flex-shrink: 0;
  float: right;
  margin: 0 0 1rem 1.5rem;
  opacity: 0.7;
}
.planet-inline video {
  width: 100%; height: 100%; object-fit: cover; display: block;
}

/* ══════════════════════════════════════════
   ECOSYSTEM — clickable pillar cards
   ══════════════════════════════════════════ */
a.pillar {
  text-decoration: none;
  color: inherit;
  display: flex;
}
a.pillar:hover {
  border-color: rgba(255,255,255,0.18);
  background: var(--glass-ultra-hover);
  transform: translateY(-4px);
}

/* ══════════════════════════════════════════
   METHOD PAGE — flashlight cursor effect
   ══════════════════════════════════════════ */
body.method-flashlight {
  cursor: default;
}
.method-flashlight .cursor-flashlight {
  position: fixed;
  pointer-events: none;
  z-index: 9998;
  width: 420px;
  height: 420px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255,255,255,0.055) 0%, rgba(255,255,255,0.02) 35%, transparent 70%);
  transform: translate(-50%, -50%);
  transition: opacity 0.3s;
  will-change: transform;
  mix-blend-mode: screen;
}

/* ── Pulsating method headline ── */
.method-pulse-line {
  font-size: 1.125rem;
  line-height: 1.75;
  color: var(--text-primary);
  padding: 1.25rem 1.5rem;
  border-left: 2px solid var(--accent-cyan);
  border-radius: 0 12px 12px 0;
  background: rgba(78, 205, 196, 0.04);
  animation: method-pulse 3.5s ease-in-out infinite;
  margin: 0;
}
@keyframes method-pulse {
  0%, 100% { box-shadow: 0 0 0 rgba(255,255,255,0); border-left-color: var(--accent-cyan); }
  50% { box-shadow: 0 0 25px rgba(255,255,255,0.06), inset 0 0 20px rgba(255,255,255,0.02); border-left-color: rgba(255,255,255,0.5); }
}

/* ── Soft velvet glow on "внимание" and method name ── */
.na-glow {
  text-shadow: 0 0 12px rgba(255,255,255,0.25), 0 0 30px rgba(255,255,255,0.08);
  color: inherit;
}

/* ══════════════════════════════════════════
   MOBILE BURGER — enhanced visibility
   ══════════════════════════════════════════ */
@media (max-width: 1023px) {
  .mobile-menu-btn {
    display: flex !important;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.1);
    color: var(--text-primary);
    transition: background 0.2s, border-color 0.2s;
  }
  .mobile-menu-btn:active {
    background: rgba(78, 205, 196, 0.15);
    border-color: var(--accent-cyan);
  }
  .mobile-menu.open {
    max-height: 80vh;
  }
  .mobile-link {
    padding: 0.85rem 1.25rem;
    font-size: 15px;
  }
  .mobile-link.active {
    color: var(--accent-cyan);
    border-left-color: var(--accent-cyan);
  }
}

/* ══════════════════════════════════════════
   MOBILE RESPONSIVE — comprehensive
   ══════════════════════════════════════════ */
@media (max-width: 768px) {

  /* ─── Global spacing ─── */
  .section {
    padding: 2.5rem 0 !important;
  }
  .container {
    padding: 0 1.25rem !important;
  }
  .mb-12, .mb-14 {
    margin-bottom: 2rem !important;
  }

  /* ─── Typography ─── */
  .heading-space.h2-block,
  .heading-space.h2-block.large {
    font-size: clamp(1.4rem, 5vw, 1.75rem) !important;
    line-height: 1.3;
  }
  /* Match the specificity of the desktop hero-h1 rule (section:first-of-type
     h1.heading-space, no media query) so this actually wins on mobile, and let
     long single words wrap instead of being clipped off-screen. */
  .hero .heading-space,
  .hero h1.heading-space,
  section:first-of-type .heading-space,
  section:first-of-type h1.heading-space,
  .method-hero h1.heading-space {
    font-size: clamp(1.6rem, 6vw, 2rem) !important;
  }
  h1, h2, h3, .heading-space {
    overflow-wrap: break-word;
  }
  .sub-muted {
    font-size: 0.95rem !important;
  }
  .eyebrow {
    font-size: 11px !important;
  }
  .quote {
    font-size: 1rem !important;
    padding: 1rem 1.25rem !important;
  }

  /* ─── Hero section top padding ─── */
  section[style*="padding:8rem"] {
    padding: 5.5rem 0 2rem !important;
  }

  /* ─── Grids → single column ─── */
  .grid.grid-2,
  .grid.grid-3 {
    grid-template-columns: 1fr !important;
    gap: 1rem !important;
  }

  /* ─── Cards ─── */
  .glass-card,
  .glass-card-elevated,
  .glass-card-bright {
    padding: 1.25rem !important;
  }
  .card-base p {
    font-size: 13px !important;
  }

  /* ─── Skill rows (method page) ─── */
  .skill-row {
    flex-direction: column !important;
    gap: 0.75rem !important;
  }
  .skill-row .num {
    font-size: 1.5rem !important;
  }
  .skill-row .header {
    gap: 0.5rem !important;
  }
  .skill-row .header h3 {
    font-size: 1rem !important;
  }
  .skill-row p {
    font-size: 13px !important;
  }
  .skill-row .brain {
    font-size: 11px !important;
  }

  /* ─── Step rows (xr page) ─── */
  .step-row {
    flex-direction: column !important;
    gap: 0.75rem !important;
    align-items: flex-start !important;
  }
  .step-num {
    font-size: 1.25rem !important;
  }

  /* ─── Fact cards ─── */
  .fact-card {
    flex-direction: column !important;
    gap: 1rem !important;
  }
  .fact-card.reverse {
    flex-direction: column !important;
  }
  .fact-card .text {
    order: 2;
  }
  .fact-card .img-wrap {
    order: 1;
    width: 100% !important;
    height: 180px !important;
    flex-shrink: 0;
  }
  .slide-ready .fact-slide-left,
  .slide-ready .fact-slide-right {
    transform: translateX(0) !important;
    opacity: 0;
  }
  .slide-ready .fact-slide-left.in-view,
  .slide-ready .fact-slide-right.in-view {
    opacity: 1;
  }

  /* ─── Media boxes ─── */
  .media-box {
    border-radius: 12px !important;
  }
  .media-box.aspect-sq {
    width: 16rem !important;
  }

  /* ─── Hero video / images ─── */
  .hero .media-box,
  .fade-right .media-box {
    max-width: 100% !important;
  }

  /* ─── Buttons ─── */
  .btn {
    font-size: 14px !important;
    padding: 0.65rem 1.25rem !important;
  }
  .flex.flex-wrap.justify-center.gap-4 {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 0.75rem !important;
  }
  .flex.flex-wrap.justify-center.gap-4 .btn {
    width: 100%;
    text-align: center;
    justify-content: center;
  }

  /* ─── Footer ─── */
  .footer-grid {
    grid-template-columns: 1fr !important;
    gap: 2rem !important;
  }
  .footer-bottom {
    flex-direction: column !important;
    text-align: center;
    gap: 0.5rem;
  }

  /* ─── Navbar mobile tweaks ─── */
  /* Fix: on mobile the logo's "Lab" suffix overlapped the language switcher and
     the "Dashboard" login text overflowed the viewport. Tighten the row: logo
     shrinks but never wraps/overlaps, the account login collapses into the burger
     menu, and the right cluster stays compact. */
  .navbar-inner {
    padding: 0.5rem 0 !important;
    gap: 0.5rem;
  }
  .nav-logo {
    font-size: 1.05rem !important;
    white-space: nowrap;
    min-width: 0;
    flex-shrink: 1;
    overflow: hidden;
  }
  /* drop the decorative "Lab" suffix on mobile so it never clips/overlaps the
     language switcher — "NeuroAttention" alone reads cleanly */
  .nav-logo .lab {
    display: none !important;
  }
  .nav-right {
    gap: 0.4rem !important;
    flex-shrink: 0;
  }
  /* the "Dashboard"/account pill is reachable from the burger menu on mobile */
  .nav-login {
    display: none !important;
  }
  .lang-switch {
    gap: 2px !important;
    flex-shrink: 0;
  }
  .lang-btn {
    font-size: 11px !important;
    padding: 0.25rem 0.5rem !important;
  }

  /* ─── Test page chat ─── */
  .test-header {
    padding-top: 4.5rem !important;
  }
  .test-input-row {
    gap: 0.5rem !important;
  }
  .chat-bubble-bot,
  .chat-bubble-user {
    max-width: 90% !important;
    font-size: 14px !important;
  }
  .chat-options {
    flex-wrap: wrap !important;
    gap: 0.5rem !important;
  }
  .option-btn {
    font-size: 13px !important;
    padding: 0.5rem 0.75rem !important;
  }

  /* ─── List bullets ─── */
  .list-bullet li {
    font-size: 14px !important;
    padding-left: 1rem !important;
  }

  /* ─── Icon boxes ─── */
  .icon-box.lg {
    width: 40px !important;
    height: 40px !important;
  }

  /* ─── Ecosystem pillars (#9) ───
     The grid has an inline grid-template-columns:repeat(5,1fr) that squeezed five
     pillars into a row on mobile. Stack them into a single left-aligned list so
     every icon shares one vertical axis with even icon→title spacing. */
  .grid-5 {
    grid-template-columns: 1fr !important;
    gap: 0.6rem !important;
  }
  .pillar {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    text-align: left !important;
    gap: 1rem !important;
    padding: 1rem 1.25rem !important;
  }
  .pillar .icon-box {
    margin: 0 !important;
    flex: 0 0 auto !important;
  }
  .pillar p {
    margin: 0 !important;
  }
}

/* CTA video section mobile padding */
@media (max-width: 480px) {
  .cta-video-wrap .cta-content {
    padding: 1.5rem 1rem !important;
  }
  .cta-video-wrap .cta-content h3 {
    font-size: 1.1rem !important;
  }
}

/* Extra small screens (< 400px) */
@media (max-width: 400px) {
  .container {
    padding: 0 1rem !important;
  }
  .heading-space.h2-block,
  .heading-space.h2-block.large {
    font-size: 1.25rem !important;
  }
  section[style*="padding:8rem"] {
    padding: 5rem 0 1.5rem !important;
  }
  .glass-card,
  .glass-card-elevated,
  .glass-card-bright {
    padding: 1rem !important;
  }
}

/* ── Team photo crop fix ──────────────────────────────────────────────────
   Takhir Kennedy's portrait sits high in the frame, so the default centred
   object-fit:cover crop clipped the top of his head. Nudge the focal point up
   so his head fits the circle and matches the other two team photos. Applies at
   every width (the crop was off on desktop too). */
.team-photo img[src*="takhir"] { object-position: center 18%; }


/* BUG-18: custom cursor alone — hide OS arrow/hand on clickable UI */
@media (hover: hover) and (pointer: fine) {
  html.na-custom-cursor-active body,
  html.na-custom-cursor-active body :is(a, button, label, input, select, textarea, summary,
  .dash-tab, .dash-subtab, .btn, [role="button"], [onclick]) {
    cursor: none !important;
  }
}

/* ── Monad LK tab (superadmin/founder) ── */
.monad-lk { max-width: none; width: 100%; }
.monad-lk-header { display:flex; align-items:flex-start; justify-content:space-between; gap:1rem; margin-bottom:1rem; flex-wrap:wrap; }
.monad-lk-title { margin:0; font-family:'Unbounded',sans-serif; font-size:1.25rem; }
.monad-status-bar { margin:0.35rem 0 0; font-size:12px; color:var(--text-muted); line-height:1.5; }
.monad-status-bar a { color:var(--accent-cyan,#0ef); }
.monad-ok { color:#0e9; }
.monad-warn { color:#f6a; }
.monad-muted { color:var(--text-dim,#888); font-size:12px; }
.monad-panel { display:none; }
.monad-panel.active { display:block; }
.monad-arch-view { display:none; }
.monad-arch-view.active { display:block; }
.monad-arch-subtabs { margin-top:-0.25rem; }
.monad-vert-layout { grid-template-columns:minmax(140px,0.45fr) minmax(0,1.55fr) minmax(280px,0.85fr) !important; }
.monad-spine-col {
  display:flex; flex-direction:column; gap:5px; padding:0.55rem;
  border:1px solid rgba(0,224,255,0.18); border-radius:14px;
  background:linear-gradient(180deg,rgba(0,224,255,0.05),rgba(0,0,0,0.25));
  max-height:min(78vh,920px); overflow:auto;
}
.monad-spine-title {
  font-size:10px; letter-spacing:0.14em; text-transform:uppercase;
  color:var(--accent-cyan,#0ef); margin-bottom:0.25rem;
}
.monad-spine-node {
  display:flex; flex-direction:column; align-items:flex-start; gap:1px;
  text-align:left; border:1px solid rgba(255,255,255,0.08);
  background:rgba(0,0,0,0.28); color:inherit; border-radius:8px;
  padding:0.4rem 0.45rem; font:inherit; cursor:pointer; width:100%;
}
.monad-spine-node.on, .monad-spine-node:hover {
  border-color:rgba(0,224,255,0.45); background:rgba(0,224,255,0.08);
}
.monad-spine-l { font-family:'Unbounded',sans-serif; font-size:11px; color:var(--accent-cyan,#A8F7FF); }
.monad-spine-code { font-family:ui-monospace,monospace; font-size:10px; opacity:0.75; }
.monad-spine-nm { font-size:10px; color:var(--text-secondary); line-height:1.25; }
.monad-cross-host {
  position:relative; min-height:min(72vh,640px); border-radius:14px;
  border:1px solid rgba(255,255,255,0.08); overflow:hidden;
  background:radial-gradient(circle at 50% 35%, rgba(0,224,255,0.06), rgba(0,0,0,0.55));
}
.monad-cross-host canvas { display:block; width:100% !important; height:100% !important; }
.monad-cross-legend {
  position:absolute; left:0; right:0; bottom:0; padding:0.65rem 0.85rem;
  background:linear-gradient(180deg,transparent,rgba(0,0,0,0.82));
  pointer-events:none;
}
.monad-cross-legend p { margin:0.15rem 0; font-size:11px; line-height:1.4; }
@media (max-width:1100px){ .monad-vert-layout { grid-template-columns:1fr !important; } .monad-spine-col { max-height:none; flex-direction:row; flex-wrap:wrap; } .monad-spine-node { width:auto; min-width:120px; } }
.monad-chat-log {
  min-height: 42vh; max-height: calc(100vh - 280px); overflow:auto;
  padding:1rem; border-radius:14px; border:1px solid rgba(255,255,255,0.08);
  background:rgba(0,0,0,0.25); margin-bottom:0.75rem;
}
.monad-chat-layout { display:grid; grid-template-columns:260px minmax(0,1fr); gap:0.85rem; }
@media (max-width:820px){ .monad-chat-layout { grid-template-columns:1fr; } }
.monad-chat-sidebar {
  border:1px solid rgba(255,255,255,0.08); border-radius:14px; background:rgba(0,0,0,0.2);
  padding:0.55rem; max-height:calc(100vh - 220px); overflow:auto;
}
.monad-inbox-block { margin-bottom:0.65rem; padding-bottom:0.55rem; border-bottom:1px solid rgba(255,255,255,0.08); }
.monad-inbox-head { display:flex; align-items:center; justify-content:space-between; gap:0.35rem; margin-bottom:0.35rem; }
.monad-inbox-head span { font-size:11px; letter-spacing:0.12em; text-transform:uppercase; color:var(--accent-cyan,#0ef); font-weight:600; }
.monad-inbox-list { display:flex; flex-direction:column; gap:0.25rem; max-height:180px; overflow:auto; }
.monad-inbox-row.unread .monad-inbox-title { color:var(--text-primary,#fff); }
.monad-inbox-item {
  width:100%; text-align:left; border:1px solid transparent; background:rgba(255,255,255,0.02);
  color:inherit; border-radius:8px; padding:0.4rem 0.45rem; cursor:pointer; font:inherit;
}
.monad-inbox-item:hover, .monad-inbox-row.open .monad-inbox-item { border-color:rgba(0,224,255,0.28); background:rgba(0,224,255,0.06); }
.monad-inbox-title { font-size:11.5px; font-weight:600; line-height:1.3; color:var(--text-secondary); }
.monad-inbox-prev { font-size:10.5px; color:var(--text-dim); margin-top:0.15rem; line-height:1.35; }
.monad-inbox-meta { font-size:10px; color:var(--text-dim); margin-top:0.2rem; opacity:0.85; }
.monad-inbox-view { flex:1; min-height:280px; }
.monad-inbox-detail {
  border:1px solid rgba(255,255,255,0.08); border-radius:14px; background:rgba(0,0,0,0.22);
  padding:1rem 1.1rem; max-height:calc(100vh - 280px); overflow:auto;
}
.monad-inbox-detail-title { margin:0 0 0.35rem; font-size:16px; line-height:1.35; }
.monad-inbox-detail-meta { margin:0 0 0.85rem; font-size:12px; }
.monad-inbox-detail-body {
  white-space:pre-wrap; font-size:14px; line-height:1.55; color:var(--text-primary,#eee);
  padding:0.85rem; border-radius:10px; background:rgba(255,255,255,0.04); border:1px solid rgba(255,255,255,0.06);
}
.domunity-tab-badge {
  display:none; align-items:center; justify-content:center; min-width:18px; height:18px;
  margin-left:6px; padding:0 5px; border-radius:999px; background:var(--accent-rose,#f0788a);
  color:#fff; font-size:10px; font-weight:700; line-height:1; vertical-align:middle;
}
.monad-vert-branches { display:flex; flex-direction:column; gap:0.45rem; padding:0.35rem 0; }
.monad-vert-branch {
  display:flex; flex-wrap:wrap; align-items:center; gap:0.35rem 0.65rem; width:100%; text-align:left;
  border:1px solid rgba(255,255,255,0.08); border-radius:12px; background:rgba(255,255,255,0.02);
  color:inherit; padding:0.55rem 0.65rem; cursor:pointer; font:inherit; transition:border-color .15s, background .15s;
}
.monad-vert-branch:hover, .monad-vert-branch.on { border-color:rgba(0,224,255,0.35); background:rgba(0,224,255,0.06); }
.monad-vert-branch.filled { border-left:3px solid rgba(0,224,255,0.45); }
.monad-vert-branch-code { font-family:ui-monospace,monospace; font-size:12px; color:var(--accent-cyan,#0ef); }
.monad-vert-branch-nm { font-size:12.5px; font-weight:600; flex:1; min-width:120px; }
.monad-vert-branch-count { font-size:11px; color:var(--text-dim); }
.monad-vert-branch-chips { display:flex; flex-wrap:wrap; gap:0.25rem; width:100%; }
.monad-chat-side-actions { margin-bottom:0.5rem; }
.monad-chat-list { display:flex; flex-direction:column; gap:0.3rem; }
.monad-chat-row { display:flex; align-items:stretch; gap:0.2rem; }
.monad-chat-row.active .monad-chat-item { border-color:rgba(0,224,255,0.35); background:rgba(0,224,255,0.08); color:var(--text-primary,#fff); }
.monad-chat-item {
  text-align:left; flex:1; min-width:0; border:1px solid transparent; background:transparent;
  color:var(--text-secondary,#ccc); border-radius:10px; padding:0.5rem 0.6rem; cursor:pointer;
}
.monad-chat-item:hover { background:rgba(255,255,255,0.04); }
.monad-chat-item.active { border-color:rgba(0,224,255,0.35); background:rgba(0,224,255,0.08); color:var(--text-primary,#fff); }
.monad-chat-item-actions { display:flex; flex-direction:column; gap:2px; }
.monad-chat-ico {
  border:0; background:transparent; color:var(--text-dim,#888); width:22px; height:22px;
  border-radius:6px; cursor:pointer; font-size:12px; line-height:1;
}
.monad-chat-ico:hover { background:rgba(255,255,255,0.08); color:#eee; }
.monad-chat-ico.danger:hover { color:#f6a; background:rgba(255,80,120,0.12); }
.monad-chat-item-title { font-size:12.5px; font-weight:600; }
.monad-chat-item-prev { font-size:11px; color:var(--text-dim,#888); margin-top:0.15rem; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.monad-chat-toolbar { display:flex; justify-content:space-between; gap:0.5rem; align-items:flex-start; margin-bottom:0.45rem; flex-wrap:wrap; }
.monad-pinned { display:flex; flex-wrap:wrap; gap:0.35rem; flex:1; min-height:1.4rem; }
.monad-pin-chip, .monad-attach-chip {
  display:inline-flex; align-items:center; gap:0.3rem; font-size:11px;
  padding:0.2rem 0.45rem; border-radius:999px; background:rgba(255,255,255,0.06);
  border:1px solid rgba(255,255,255,0.1);
}
.monad-pin-chip button, .monad-attach-chip button {
  border:none; background:transparent; color:var(--text-dim); cursor:pointer; font-size:12px; line-height:1;
}
.monad-attach-bar { display:flex; flex-wrap:wrap; gap:0.35rem; margin:0 0 0.45rem; }
.monad-msg-atts { margin-top:0.4rem; display:flex; flex-wrap:wrap; gap:0.4rem; }
.monad-msg-img { max-width:180px; max-height:120px; border-radius:8px; border:1px solid rgba(255,255,255,0.1); }
.monad-msg { margin-bottom:0.75rem; padding:0.65rem 0.85rem; border-radius:12px; max-width:92%; }
.monad-msg-you { margin-left:auto; background:rgba(0,224,255,0.12); border:1px solid rgba(0,224,255,0.25); }
.monad-msg-monad { background:rgba(255,255,255,0.04); border:1px solid rgba(255,255,255,0.08); }
.monad-msg-err { background:rgba(255,80,120,0.12); border:1px solid rgba(255,80,120,0.3); }
.monad-msg-body { white-space:pre-wrap; font-size:14px; line-height:1.45; }
.monad-tech-bar { margin:0.5rem 0; }
.monad-msg-meta { margin-top:0.35rem; font-size:11px; color:var(--text-dim,#888); word-break:break-all; }
.monad-msg-system, .monad-msg-tech {
  max-width: 85%; margin-left:0; margin-right:auto;
  background:transparent; border:1px dashed rgba(255,255,255,0.12);
  opacity:0.75; font-size:12px;
}
.monad-tech { margin-top:0.35rem; font-size:11px; color:var(--text-dim,#888); }
.monad-tech summary { cursor:pointer; user-select:none; list-style:none; }
.monad-tech summary::-webkit-details-marker { display:none; }
.monad-tech summary::before { content:'▸ '; opacity:0.7; }
.monad-tech[open] summary::before { content:'▾ '; }
.monad-chat-compose { display:flex; gap:0.75rem; align-items:flex-end; flex-wrap:wrap; }
.monad-chat-compose textarea {
  flex:1; min-width:220px; resize:vertical; border-radius:12px; padding:0.75rem;
  background:rgba(255,255,255,0.04); border:1px solid rgba(255,255,255,0.1);
  color:var(--text-primary,#eee); font:inherit;
}
.monad-viz-legend { color:var(--text-secondary,#c5ccd4); font-size:13px; line-height:1.5; margin:0 0 1rem; max-width:72ch; }
.monad-viz-split { display:grid; grid-template-columns:minmax(0,1.4fr) minmax(280px,0.9fr); gap:1.2rem; align-items:start; }
.monad-viz-split-wide { grid-template-columns:minmax(0,1.7fr) minmax(280px,0.85fr); }
.monad-viz-h { font-size:14px; margin:0.85rem 0 0.35rem; }
.monad-matrix-scroll { overflow:auto; max-height:min(78vh,920px); border:1px solid rgba(255,255,255,0.08); border-radius:14px; padding:0.5rem; background:rgba(0,0,0,0.2); }
.monad-matrix {
  display:grid; grid-template-columns:108px repeat(7,minmax(118px,1fr));
  gap:4px; min-width:980px;
}
.monad-matrix-corner { }
.monad-matrix-colh {
  text-align:center; font-size:11px; letter-spacing:0.08em; color:var(--text-dim);
  padding:0.35rem 0; font-family:'Unbounded',sans-serif;
}
.monad-matrix-rowh {
  display:flex; flex-direction:column; justify-content:center; gap:2px;
  padding:0.4rem 0.45rem; border-radius:8px; background:rgba(255,255,255,0.03);
  cursor:pointer; font-size:11px;
}
.monad-matrix-rowh.on { background:rgba(168,247,255,0.08); }
.monad-matrix-rowh b { font-size:11px; }
.monad-matrix-rowh em { font-style:normal; color:var(--text-dim); font-size:10px; }
.monad-matrix-cell {
  display:flex; flex-direction:column; align-items:stretch; gap:3px; text-align:left;
  border:1px solid rgba(255,255,255,0.08); background:rgba(0,0,0,0.28); color:inherit;
  border-radius:8px; padding:0.35rem 0.35rem 0.4rem; font:inherit; min-height:92px; cursor:pointer;
}
.monad-matrix-cell.filled { border-color:rgba(168,247,255,0.28); }
.monad-matrix-cell.spine { box-shadow:inset 0 0 0 1px rgba(0,224,255,0.25); }
.monad-matrix-cell.on { border-color:rgba(0,224,255,0.55); background:rgba(0,224,255,0.1); }
.monad-matrix-cell .code { font-family:ui-monospace,monospace; font-size:10px; opacity:0.7; }
.monad-matrix-cell .nm { font-size:10px; line-height:1.25; color:var(--text-secondary); }
.monad-matrix-cell .chips { display:flex; flex-wrap:wrap; gap:3px; max-height:72px; overflow:auto; }
.monad-agent-chip.tiny { font-size:10px; padding:0.1rem 0.35rem; border-radius:6px; }
.monad-agent-chip.kind-human_persona { border-color:rgba(0,224,255,0.45); }
.monad-agent-chip.kind-contour_persona { border-color:rgba(232,196,104,0.55); }
.monad-agent-chip.kind-project_persona { border-color:rgba(255,255,255,0.35); }
.monad-agent-chip.kind-skill { border-color:rgba(255,255,255,0.12); }
.monad-person.empty.pressed {
  opacity:0.55; pointer-events:none; width:64px; height:38px;
  background:rgba(0,0,0,0.55); box-shadow:inset 0 4px 8px rgba(0,0,0,0.55);
  border-color:rgba(255,255,255,0.06);
}
button.monad-dom-center { cursor:pointer; color:inherit; font:inherit; }
button.monad-dom-center.on { box-shadow:0 0 18px rgba(0,224,255,0.45); }
.monad-branch { margin:0.35rem 0 0.7rem; padding:0.45rem 0.55rem; border-radius:10px; border:1px solid rgba(232,196,104,0.22); }
.monad-branch.project { border-color:rgba(255,255,255,0.14); }
.monad-branch-name { font-size:12px; font-weight:600; margin-bottom:0.3rem; }
.monad-unplaced-g { margin:0.35rem 0; }
.monad-unplaced-g summary { cursor:pointer; color:var(--text-secondary); font-size:12px; }
@media (max-width:900px){ .monad-viz-split { grid-template-columns:1fr; } }
.monad-viz-panel {
  border:1px solid rgba(255,255,255,0.08); border-radius:14px; padding:1rem;
  background:rgba(255,255,255,0.025); min-height:280px;
}
.monad-viz-kicker { font-size:11px; letter-spacing:0.12em; text-transform:uppercase; color:var(--text-dim); margin-bottom:0.4rem; }
.monad-vert-strip { display:flex; flex-direction:column-reverse; gap:6px; }
.monad-vert-layer {
  border:1px solid rgba(255,255,255,0.08); border-radius:12px; background:rgba(255,255,255,0.02);
  padding:0.15rem; transition:border-color .2s, background .2s;
}
.monad-vert-layer.on, .monad-vert-layer:hover {
  border-color:rgba(168,247,255,0.28); background:rgba(168,247,255,0.04);
}
.monad-vert-band {
  width:100%; display:flex; align-items:center; gap:0.75rem; text-align:left;
  background:transparent; border:0; color:inherit; padding:0.7rem 0.85rem; cursor:pointer; font:inherit;
}
.monad-vert-l { font-family:'Unbounded',sans-serif; font-size:12px; letter-spacing:0.08em; color:var(--accent-cyan,#A8F7FF); width:2.4rem; }
.monad-vert-name { font-weight:600; flex:1; }
.monad-vert-count { font-size:11px; color:var(--text-dim); }
.monad-vert-inners {
  display:grid; grid-template-columns:repeat(7,minmax(0,1fr)); gap:4px; padding:0 0.7rem 0.55rem;
  max-height:0; opacity:0; overflow:hidden; transition:max-height .22s ease, opacity .22s ease;
}
.monad-vert-layer:hover .monad-vert-inners, .monad-vert-layer.on .monad-vert-inners {
  max-height:110px; opacity:1;
}
.monad-vert-cell {
  border:1px solid rgba(255,255,255,0.08); background:rgba(0,0,0,0.25); color:var(--text-secondary);
  border-radius:8px; padding:0.35rem 0.2rem; font-size:10px; cursor:pointer; min-height:44px;
}
.monad-vert-cell.filled { border-color:rgba(168,247,255,0.28); color:#e8edf2; }
.monad-vert-cell.on { border-color:rgba(0,224,255,0.55); background:rgba(0,224,255,0.1); }
.monad-vert-cell .code { display:block; font-family:ui-monospace,monospace; opacity:0.7; }
.monad-vert-cell .nm { display:block; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.monad-vert-sense { font-size:11px; color:var(--text-dim); padding:0 0.85rem 0.55rem; display:none; }
.monad-vert-layer:hover .monad-vert-sense, .monad-vert-layer.on .monad-vert-sense { display:block; }
.monad-agent-list { display:flex; flex-wrap:wrap; gap:0.4rem; margin:0.6rem 0; }
.monad-agent-chip {
  display:inline-flex; align-items:center; gap:0.35rem; border:1px solid rgba(255,255,255,0.12);
  background:rgba(255,255,255,0.03); color:inherit; border-radius:999px; padding:0.25rem 0.6rem;
  font-size:12px; cursor:pointer;
}
.monad-agent-chip:hover { border-color:rgba(168,247,255,0.4); }
.monad-agent-chip .dot { width:7px; height:7px; border-radius:50%; background:#555; }
.monad-agent-chip .dot.active { background:#0e9; box-shadow:0 0 6px rgba(0,238,153,0.5); }
.monad-dl { display:grid; grid-template-columns:110px 1fr; gap:0.35rem 0.7rem; font-size:13px; }
.monad-dl dt { color:var(--text-dim); }
.monad-unplaced { margin-top:1.1rem; padding-top:0.9rem; border-top:1px solid rgba(255,255,255,0.08); }
.monad-horiz-col { min-width:0; }
.monad-horiz-wrap { display:flex; justify-content:center; }
.monad-horiz-ring {
  position:relative; width:min(720px,100%); aspect-ratio:1; border-radius:50%;
  border:1px dashed rgba(0,224,255,0.25); margin:0.5rem auto 1rem;
  background:radial-gradient(circle at 50% 50%, rgba(168,247,255,0.05), transparent 62%);
}
.monad-dom-center {
  position:absolute; left:50%; top:50%; transform:translate(-50%,-50%);
  width:96px; height:96px; border-radius:50%; display:flex; flex-direction:column;
  align-items:center; justify-content:center;
  background:radial-gradient(circle at 30% 30%,rgba(0,224,255,0.35),rgba(0,0,0,0.6));
  border:1px solid rgba(0,224,255,0.45); text-align:center; z-index:2;
}
.monad-dom-label { font-family:'Unbounded',sans-serif; font-size:14px; letter-spacing:0.08em; }
.monad-hour-mark {
  position:absolute; transform:translate(-50%,-50%); font-size:10px; color:var(--text-dim);
  pointer-events:none; z-index:1;
}
.monad-person {
  position:absolute; transform:translate(-50%,-50%); width:108px; text-align:center;
  padding:0.4rem 0.45rem; border-radius:12px; background:rgba(0,0,0,0.62);
  border:1px solid rgba(255,255,255,0.12); font-size:11px; z-index:3; color:inherit;
  cursor:pointer; font:inherit;
}
.monad-person.empty { opacity:0.35; pointer-events:none; width:72px; }
.monad-person.me { border-color:rgba(0,224,255,0.55); box-shadow:0 0 12px rgba(0,224,255,0.25); }
.monad-person.on { border-color:rgba(168,247,255,0.7); background:rgba(12,22,28,0.9); }
.monad-person-name { font-weight:600; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.monad-person-pop {
  display:none; position:absolute; left:50%; bottom:calc(100% + 8px); transform:translateX(-50%);
  width:220px; padding:0.65rem; border-radius:12px; text-align:left;
  background:rgba(8,14,18,0.96); border:1px solid rgba(168,247,255,0.22); z-index:8;
  box-shadow:0 12px 32px rgba(0,0,0,0.45);
}
.monad-person:hover .monad-person-pop, .monad-person.on .monad-person-pop { display:block; }
.monad-agent-mini { display:flex; flex-direction:column; gap:2px; margin-top:0.35rem; font-size:11px; color:var(--text-secondary); }
.monad-eq { display:flex; flex-direction:column; gap:0.55rem; }
.monad-eq-row { display:grid; grid-template-columns:110px 1fr 44px; gap:0.6rem; align-items:center; }
.monad-eq-label { font-size:12px; }
.monad-eq-bar { height:10px; border-radius:999px; background:rgba(255,255,255,0.06); overflow:hidden; }
.monad-eq-fill {
  height:100%; border-radius:999px;
  background:linear-gradient(90deg,#0ef,#0e9);
  transition:width 0.4s ease;
}
.monad-eq-val { font-size:11px; color:var(--text-muted); text-align:right; }
.monad-rhythm-head { display:flex; justify-content:space-between; gap:1rem; align-items:flex-start; margin-bottom:1.1rem; flex-wrap:wrap; }
.monad-eq-live {
  display:grid; grid-template-columns:repeat(7,minmax(0,1fr)); gap:0.6rem;
  min-height:280px; padding:1rem 0.5rem 0.4rem;
  border-radius:16px; border:1px solid rgba(255,255,255,0.08);
  background:linear-gradient(180deg,rgba(168,247,255,0.04),rgba(0,0,0,0.25));
}
.monad-eq-col { display:flex; flex-direction:column; align-items:center; gap:0.45rem; min-width:0; }
.monad-eq-col-bar {
  flex:1; width:100%; max-width:42px; min-height:220px; border-radius:999px;
  background:rgba(255,255,255,0.05); display:flex; align-items:flex-end; overflow:hidden;
}
.monad-eq-col-bar i {
  display:block; width:100%; border-radius:999px;
  background:linear-gradient(180deg,#A8F7FF,#5c8f96);
  transition:height .12s linear;
}
.monad-eq-col-label { font-size:11px; text-align:center; color:var(--text-secondary); }
.monad-eq-col-val { font-size:11px; color:var(--text-dim); }
.monad-eq-col.unavailable { opacity:0.4; }
.monad-eq-col.unavailable i { background:rgba(255,255,255,0.15); }
@media (max-width:560px) {
  .monad-eq-row { grid-template-columns:1fr; gap:0.2rem; }
  .monad-horiz-ring { width:min(92vw,520px); }
  .monad-person { width:78px; font-size:10px; }
  .monad-eq-live { grid-template-columns:repeat(4,minmax(0,1fr)); }
}

/* ── Sketch tool ── */
.sketch-wrap, .sketch-wrap-full { max-width: none; width: 100%; }
.sketch-head { display:flex; justify-content:space-between; gap:1rem; align-items:flex-start; flex-wrap:wrap; margin-bottom:0.75rem; }
.sketch-toolbar { display:flex; flex-wrap:wrap; gap:0.45rem; align-items:center; margin-bottom:0.75rem; }
.sketch-toolbar-sep { width:1px; height:22px; background:rgba(255,255,255,0.12); margin:0 0.15rem; }
.sketch-tool-btn.active { border-color: rgba(0,224,255,0.55) !important; color: var(--accent-cyan,#0ef) !important; }
.sketch-colors { display:flex; gap:0.3rem; align-items:center; }
.sketch-color { width:22px; height:22px; border-radius:50%; border:2px solid rgba(255,255,255,0.15); cursor:pointer; padding:0; }
.sketch-color.active { outline:2px solid var(--accent-cyan,#0ef); outline-offset:1px; }
.sketch-size-label { display:flex; align-items:center; gap:0.4rem; font-size:12px; color:var(--text-muted); }
.sketch-workspace { display:grid; grid-template-columns:minmax(0,1fr) 230px; gap:0.85rem; align-items:start; }
@media (max-width:900px){ .sketch-workspace { grid-template-columns:1fr; } }
.sketch-stage { position:relative; border-radius:14px; border:1px solid rgba(255,255,255,0.1); overflow:hidden; background:#0b1016; touch-action:none; min-height:520px; }
.sketch-bg, .sketch-3d-host, .sketch-media-wrap, .sketch-draw-cv {
  position:absolute; inset:0; width:100%; height:100%;
}
.sketch-bg { z-index:0; pointer-events:none; }
.sketch-3d-host { z-index:1; pointer-events:none; }
.sketch-3d-host.sketch-orbit-active { pointer-events:auto; }
.sketch-3d-host canvas { display:block; width:100% !important; height:100% !important; pointer-events:none; }
.sketch-3d-host.sketch-orbit-active canvas { pointer-events:auto; }
.sketch-media-wrap { z-index:2; display:flex; align-items:center; justify-content:center; pointer-events:none; }
.sketch-media-wrap img { max-width:100%; max-height:100%; object-fit:contain; display:block; }
.sketch-draw-cv { z-index:5; cursor:crosshair; touch-action:none; background:transparent; pointer-events:none; }
.sketch-draw-cv.sketch-draw-active { pointer-events:auto; z-index:8; }
.sketch-side-panel {
  border-radius:12px; border:1px solid rgba(255,255,255,0.08); padding:0.7rem;
  background:rgba(255,255,255,0.02); max-height:70vh; overflow:auto;
}
.sketch-layer-card {
  border:1px solid rgba(255,255,255,0.08); border-radius:10px; padding:0.45rem 0.5rem; margin:0.35rem 0;
  background:rgba(0,0,0,0.18);
}
.sketch-layer-card.active { border-color:rgba(0,224,255,0.4); }
.sketch-layer-top { display:flex; justify-content:space-between; gap:0.35rem; align-items:center; font-size:12px; }
.sketch-layer-move button {
  border:1px solid rgba(255,255,255,0.12); background:rgba(255,255,255,0.04); color:var(--text-muted);
  border-radius:6px; width:22px; height:22px; cursor:pointer; line-height:1;
}
.sketch-layer-select { width:100%; margin-top:0.35rem; font-size:11px !important; padding:0.25rem 0.4rem !important; }
.sketch-canvas-wrap { border-radius:14px; border:1px solid rgba(255,255,255,0.1); overflow:hidden; background:#0b1016; touch-action:none; }
#sketch-canvas { display:block; width:100%; cursor:crosshair; touch-action:none; }
.sketch-list-item { display:flex; flex-direction:column; align-items:flex-start; width:100%; text-align:left; gap:0.15rem; margin:0.3rem 0; padding:0.55rem 0.7rem; border-radius:10px; border:1px solid rgba(255,255,255,0.08); background:rgba(255,255,255,0.03); color:var(--text-primary); cursor:pointer; font:inherit; }
.sketch-list-item:hover { border-color:rgba(0,224,255,0.35); }
.sketch-list-title { font-size:13px; font-weight:600; }
.sketch-list-meta { font-size:11px; color:var(--text-dim); }
.sketch-layer-row { display:flex; align-items:center; gap:0.4rem; font-size:12px; color:var(--text-secondary); margin:0.25rem 0; }
.lib-fig { position:relative; }
.lib-fig-copy {
  position:absolute; top:8px; right:8px; z-index:2; opacity:0; pointer-events:none;
  border:1px solid rgba(168,247,255,0.35); background:rgba(0,0,0,0.65); color:#e8edf2;
  border-radius:999px; padding:0.35rem 0.7rem; font-size:11px; cursor:pointer; backdrop-filter:blur(8px);
  transition:opacity .15s;
}
.lib-fig:hover .lib-fig-copy { opacity:1; pointer-events:auto; }
.sketch-fab{
  position:fixed; bottom:22px; left:22px; z-index:901; display:inline-flex; align-items:center; gap:6px;
  padding:10px 16px; border-radius:24px; border:1px solid rgba(168,247,255,0.3);
  background:linear-gradient(135deg,rgba(0,229,255,0.18),rgba(120,110,255,0.18));
  color:var(--text-primary,#e8edf2); font-size:13px; font-weight:600; font-family:inherit; cursor:pointer;
  backdrop-filter:blur(10px); -webkit-backdrop-filter:blur(10px); box-shadow:0 8px 26px rgba(0,0,0,0.45);
  opacity:0; visibility:hidden; pointer-events:none; transform:translateY(10px);
  transition:opacity .2s,transform .2s,visibility .2s,border-color .15s;
}
.sketch-fab.sketch-fab-on{ opacity:1; visibility:visible; pointer-events:auto; transform:translateY(0); }
.sketch-fab:hover{ border-color:rgba(0,229,255,0.65); }
@media(max-width:760px){ .sketch-fab{ bottom:76px; left:14px; padding:9px 13px; font-size:12px; } }
.monad-sys-status { margin-bottom:0.85rem; padding:0.65rem 0.85rem; border-radius:12px; border:1px solid rgba(255,255,255,0.08); background:rgba(255,255,255,0.03); }
.monad-badge { display:inline-block; padding:0.1rem 0.5rem; border-radius:999px; font-size:11px; text-transform:uppercase; letter-spacing:0.04em; }
.monad-badge.status-harmonic { background:rgba(14,238,153,0.15); color:#0e9; }
.monad-badge.status-drifting { background:rgba(252,200,0,0.15); color:#fc0; }
.monad-badge.status-dissonant { background:rgba(250,146,64,0.15); color:#fa9240; }
.monad-badge.status-silence { background:rgba(239,68,68,0.15); color:#f66; }
.monad-eq-row.unavailable { opacity:0.45; }
.monad-mini-table { width:100%; border-collapse:collapse; font-size:11px; }
.monad-mini-table th, .monad-mini-table td { text-align:left; padding:0.25rem 0.4rem; border-bottom:1px solid rgba(255,255,255,0.06); }
.monad-mini-table code { font-size:10px; }

/* ── Monad online / office / animated branches ── */
.monad-online-search-row { display:flex; gap:0.5rem; margin-bottom:0.85rem; flex-wrap:wrap; }
.monad-agent-search {
  flex:1; min-width:220px; border-radius:10px; padding:0.55rem 0.75rem; font:inherit; font-size:13px;
  background:rgba(0,0,0,0.25); border:1px solid rgba(255,255,255,0.1); color:var(--text-primary,#eee);
}
.monad-online-grid {
  display:grid; grid-template-columns:minmax(240px,0.85fr) minmax(0,1.6fr) minmax(260px,0.75fr);
  gap:0.85rem; align-items:start;
}
@media (max-width:1100px){ .monad-online-grid { grid-template-columns:1fr; } }
.monad-online-rhythm-wrap, .monad-online-office-wrap, .monad-online-side {
  border:1px solid rgba(255,255,255,0.08); border-radius:14px; background:rgba(0,0,0,0.18); padding:0.65rem;
}
.monad-office-stats { display:flex; flex-wrap:wrap; gap:0.65rem 1rem; font-size:12px; margin-bottom:0.55rem; }
.monad-live-n { color:#0e9; }
.monad-office-floor { display:flex; flex-direction:column; gap:0.45rem; max-height:min(68vh,720px); overflow:auto; }
.monad-office-row {
  border:1px solid rgba(255,255,255,0.06); border-radius:12px; padding:0.45rem 0.55rem;
  background:rgba(255,255,255,0.02);
}
.monad-office-row.unplaced { border-style:dashed; opacity:0.92; }
.monad-office-row-label { font-size:11px; color:var(--accent-cyan,#0ef); margin-bottom:0.35rem; }
.monad-office-row-label em { font-style:normal; color:var(--text-dim); margin-left:0.35rem; }
.monad-office-desks { display:flex; flex-wrap:wrap; gap:0.35rem; }
.monad-desk {
  display:flex; flex-direction:column; align-items:flex-start; gap:0.1rem; min-width:88px; max-width:130px;
  padding:0.35rem 0.45rem; border-radius:9px; border:1px solid rgba(255,255,255,0.08);
  background:rgba(0,0,0,0.22); color:inherit; cursor:pointer; font:inherit; text-align:left;
  transition:border-color .15s, box-shadow .15s, transform .15s;
}
.monad-desk:hover, .monad-desk.on { border-color:rgba(0,224,255,0.4); transform:translateY(-1px); }
.monad-desk.live { box-shadow:0 0 0 1px rgba(14,238,153,0.25); }
.monad-desk.live .monad-desk-dot { background:#0e9; box-shadow:0 0 8px rgba(14,238,153,0.75); animation:monad-pulse 1.6s ease-in-out infinite; }
.monad-desk-dot { width:8px; height:8px; border-radius:50%; background:#666; flex:0 0 auto; }
.monad-desk-name { font-size:10.5px; line-height:1.25; font-weight:600; }
.monad-desk-act { font-size:9px; color:var(--text-dim); font-family:ui-monospace,monospace; }
@keyframes monad-pulse { 0%,100%{ opacity:1; transform:scale(1);} 50%{ opacity:0.65; transform:scale(1.15);} }

.monad-vert-viz { position:relative; min-height:120px; }
.monad-branch-svg, .monad-horiz-branch-svg { display:none; }
.monad-vert-tree { padding:0.25rem 0 0.5rem; }
.monad-vert-tree-root {
  display:inline-block; padding:0.35rem 0.7rem; border-radius:999px;
  background:rgba(0,224,255,0.12); border:1px solid rgba(0,224,255,0.35);
  font-size:12px; font-weight:600; margin-bottom:0.55rem;
}
.monad-vert-tree-branches { display:flex; flex-direction:column; gap:0.35rem; border-left:2px solid rgba(0,224,255,0.28); margin-left:0.85rem; padding-left:0.75rem; }
.monad-vert-tree-item { position:relative; animation:monad-branch-in 0.35s ease both; animation-delay:calc(var(--i,0) * 0.05s); }
.monad-tree-elbow {
  position:absolute; left:-0.75rem; top:1.1rem; width:0.7rem; height:2px;
  background:rgba(0,224,255,0.4);
}
.monad-vert-branch { margin:0; }
.monad-horiz-tree { padding:0.15rem 0; }
.monad-horiz-tree-root {
  display:inline-block; padding:0.4rem 0.75rem; border-radius:999px;
  background:rgba(232,196,104,0.14); border:1px solid rgba(232,196,104,0.4);
  font-size:13px; font-weight:600;
}
.monad-tree-section {
  margin:0.75rem 0 0.35rem; font-size:11px; letter-spacing:0.08em; text-transform:uppercase; color:var(--text-dim);
}
.monad-tree-node {
  position:relative; margin:0.35rem 0 0.35rem 0.85rem; padding-left:0.75rem;
  border-left:2px solid rgba(232,196,104,0.35);
  animation:monad-branch-in 0.35s ease both; animation-delay:calc(var(--i,0) * 0.06s);
}
.monad-tree-node .monad-tree-elbow {
  left:-0.75rem; top:1rem; background:rgba(232,196,104,0.45);
}
.monad-tree-card {
  border:1px solid rgba(255,255,255,0.08); border-radius:12px; padding:0.55rem 0.65rem;
  background:rgba(255,255,255,0.03);
}
.monad-tree-card.project { border-color:rgba(141,255,200,0.25); }
.monad-tree-card-title { font-size:12.5px; font-weight:600; margin-bottom:0.35rem; }
.monad-tree-fn { font-size:12px; color:var(--text-secondary); line-height:1.45; margin:0.35rem 0 0; }

.monad-agent-type { font-size:12px; color:var(--accent-cyan,#0ef); margin:0 0 0.55rem; }
.monad-agent-fn {
  margin:0 0 0.75rem; padding:0.65rem 0.75rem; border-radius:12px;
  background:rgba(0,224,255,0.06); border:1px solid rgba(0,224,255,0.18);
}
.monad-agent-fn-label {
  font-size:10px; letter-spacing:0.1em; text-transform:uppercase; color:var(--accent-cyan,#0ef); margin-bottom:0.3rem;
}
.monad-agent-fn p { margin:0; font-size:13.5px; line-height:1.5; color:var(--text-primary,#eee); }
.monad-cell-sense { font-size:12px; color:var(--text-secondary); margin-top:0.25rem; }
.monad-dl-human dt { color:var(--text-dim); }
.monad-cross-detail {
  position:absolute; left:12px; bottom:12px; right:12px; max-width:420px;
  padding:0.7rem 0.85rem; border-radius:12px; z-index:5;
  background:rgba(6,12,18,0.92); border:1px solid rgba(255,255,255,0.1);
  backdrop-filter:blur(8px); font-size:12.5px; line-height:1.45;
}
.monad-cross-host { position:relative; }
.monad-cross-agent-list { list-style:none; margin:0.4rem 0 0; padding:0; }
.monad-cross-agent-list li { margin:0.2rem 0; }
.monad-cross-agent {
  border:0; background:rgba(0,224,255,0.08); color:inherit; border-radius:8px;
  padding:0.3rem 0.5rem; cursor:pointer; font:inherit; font-size:12px;
}
.monad-cross-agent:hover { background:rgba(0,224,255,0.18); }

.monad-vert-branches { display:flex; flex-direction:column; gap:0.45rem; padding:0.35rem 0; }
.monad-vert-branch {
  display:flex; flex-wrap:wrap; align-items:center; gap:0.35rem 0.65rem; width:100%; text-align:left;
  border:1px solid rgba(255,255,255,0.08); border-radius:12px; background:rgba(255,255,255,0.02);
  color:inherit; padding:0.55rem 0.65rem; cursor:pointer; font:inherit; transition:border-color .15s, background .15s;
}
.monad-vert-branch:hover, .monad-vert-branch.on { border-color:rgba(0,224,255,0.35); background:rgba(0,224,255,0.06); }
.monad-vert-branch.filled { border-left:3px solid rgba(0,224,255,0.45); }
.monad-vert-branch-code { font-family:ui-monospace,monospace; font-size:12px; color:var(--accent-cyan,#0ef); }
.monad-vert-branch-nm { font-size:12.5px; font-weight:600; flex:1; min-width:120px; }
.monad-vert-branch-count { font-size:11px; color:var(--text-dim); }
.monad-vert-branch-chips { display:flex; flex-wrap:wrap; gap:0.25rem; width:100%; }

@keyframes monad-branch-in {
  from { opacity:0; transform:translateX(-8px); }
  to { opacity:1; transform:none; }
}