/* ==========================================================================
   JAYU v19.2.0 · OBSIDIANA
   Capa final, aditiva y reversible, encima de Evolution 19.1.0. Solo presentación.
   Dirección visual (imágenes de referencia del propietario):
     · Obsidiana: negro volcánico, vidrio oscuro, filos de luz.
     · Globo de puntos con aurora violeta-magenta (Home, informes).
     · Figura neuronal (Agents Hub, Constelación).
     · Terminal cian/magenta (Market Terminal).
   Todas las reglas dependen de html.ox (lo añade jayu-obsidiana-1920.js).
   ?ox=off la desactiva en el dispositivo; quitar el <link> la elimina.
   ========================================================================== */

html.ox {
  --ox-void: #020206;
  --ox-obsidian: #07070d;
  --ox-glass: linear-gradient(180deg, rgba(16, 16, 28, .74), rgba(6, 6, 13, .82));
  --ox-glass-hi: linear-gradient(180deg, rgba(22, 22, 38, .82), rgba(8, 8, 16, .88));
  --ox-ink: #f2f1fa;
  --ox-ink-2: #c7c8da;
  --ox-muted: #8a8ca6;
  --ox-cyan: #2ee6e6;
  --ox-magenta: #ff2e88;
  --ox-violet: #7c5cff;
  --ox-blue: #3d6bff;
  --ox-up: #2ee6c0;
  --ox-down: #ff4d8d;
  --ox-edge: rgba(150, 220, 255, .10);
  --ox-edge-2: rgba(150, 220, 255, .24);
  --ox-spectrum: linear-gradient(100deg, #2ee6e6 0%, #7c5cff 48%, #ff2e88 100%);
  --ox-serif: "Instrument Serif", "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --ox-mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Consolas, monospace;
  --ox-ease: cubic-bezier(.16, 1, .3, 1);
  background-color: var(--ox-void);
}
html.ox body:not(#ox0) { background-color: transparent; }
html.ox ::selection { background: rgba(46, 230, 230, .35); color: #fff; }

/* --------------------------------------------------------------------------
   1. Fondo obsidiana: aura fija muy sutil (no tapa el cielo de estrellas)
   -------------------------------------------------------------------------- */
html.ox .ox-art { pointer-events: none; }
html.ox .ox-aura {
  position: fixed; inset: 0; z-index: -1;
  background:
    radial-gradient(60vw 50vh at 8% -10%, rgba(46, 230, 230, .07), transparent 60%),
    radial-gradient(55vw 55vh at 105% 8%, rgba(255, 46, 136, .06), transparent 62%),
    radial-gradient(80vw 60vh at 50% 120%, rgba(124, 92, 255, .10), transparent 65%),
    var(--ox-void);
}

/* --------------------------------------------------------------------------
   2. Tipografía editorial: serif de exhibición + mono para datos
   -------------------------------------------------------------------------- */
html.ox body:not(#ox0) h1,
html.ox body:not(#ox0) #jayu-universe :is(.jayu-universe-copy, .hero-copy) h1,
html.ox body:not(#ox0) main > .intro .intro-copy h1,
html.ox body:not(#ox0) .obsidian-stage-heading h2,
html.ox body:not(#ox0) .hub-home h2,
html.ox body:not(#ox0) .jr-chap h2 {
  font-family: var(--ox-serif) !important;
  font-weight: 400 !important;
  letter-spacing: -.012em !important;
  line-height: 1.02 !important;
  color: var(--ox-ink);
}
html.ox body:not(#ox0) h1 { font-size: clamp(2.4rem, 5vw, 4.4rem) !important; }
html.ox body:not(#ox0) :is(#jayu-universe .jayu-universe-copy h1, main > .intro .intro-copy h1) { font-size: clamp(2.6rem, 5.9vw, 5.2rem) !important; }
html.ox body:not(#ox0) h1 :is(em, span, strong, b),
html.ox body:not(#ox0) .jr-chap h2 em {
  font-style: italic !important;
  font-weight: 400 !important;
  background: var(--ox-spectrum) !important;
  -webkit-background-clip: text !important; background-clip: text !important;
  -webkit-text-fill-color: transparent !important; color: transparent !important;
  padding-right: .06em;
}
html.ox body:not(#ox0) :is(.eyebrow, .obsidian-universe-kicker, .jayu-hero-meta, .report-kicker, .jr-kicker, .badge, .mini-chip, .jr-num, .jr-kpi small) {
  font-family: var(--ox-mono) !important;
  letter-spacing: .14em;
}
html.ox body:not(#ox0) :is(.jr-num, .jr-kpi b) { letter-spacing: 0; font-variant-numeric: tabular-nums; }

/* --------------------------------------------------------------------------
   3. Barra superior y ticker
   -------------------------------------------------------------------------- */
html.ox body:not(#ox0) :is(header.topbar, .jr-nav) {
  background: rgba(3, 3, 8, .72) !important;
  border-bottom: 1px solid transparent !important;
  border-image: linear-gradient(90deg, transparent, rgba(46, 230, 230, .35), rgba(255, 46, 136, .35), transparent) 1 !important;
  -webkit-backdrop-filter: blur(18px) saturate(1.2); backdrop-filter: blur(18px) saturate(1.2);
}
html.ox body:not(#ox0) :is(.brand-mark, .jr-brand i) {
  background: #05050b !important;
  color: #fff !important;
  border: 1px solid transparent;
  background-image: linear-gradient(#05050b, #05050b), var(--ox-spectrum) !important;
  background-origin: border-box !important; background-clip: padding-box, border-box !important;
  box-shadow: 0 0 18px -4px rgba(46, 230, 230, .45), 0 0 22px -6px rgba(255, 46, 136, .4) !important;
  font-family: var(--ox-serif) !important; font-style: italic; font-weight: 400 !important; font-size: 20px !important;
}
html.ox body:not(#ox0) :is(.ticker-wrap, .jayu-pwa-market-strip) {
  background: rgba(2, 2, 6, .86) !important;
  border-bottom: 1px solid var(--ox-edge) !important;
  font-family: var(--ox-mono);
}

/* --------------------------------------------------------------------------
   4. Superficies: vidrio de obsidiana con filo de luz
   -------------------------------------------------------------------------- */
html.ox body:not(#ox0) :is(.panel, .obsidian-entry, .report-card, .card, .jr-kpi, .jr-fig, .jr-quote, .jr-scen > div, .jr-table, .jr-toc) {
  background: var(--ox-glass) !important;
  border: 1px solid var(--ox-edge) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .05), 0 30px 80px -50px rgba(0, 0, 0, .95) !important;
  transition: border-color .3s var(--ox-ease), box-shadow .3s var(--ox-ease), transform .3s var(--ox-ease);
}
html.ox body:not(#ox0) :is(.obsidian-entry, .report-card, .jr-fig):hover {
  border-color: var(--ox-edge-2) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .07), 0 0 0 1px rgba(46, 230, 230, .08), 0 24px 70px -36px rgba(46, 230, 230, .35), 0 24px 70px -40px rgba(255, 46, 136, .3) !important;
}
html.ox body:not(#ox0) .obsidian-entry strong { font-family: var(--ox-serif); font-weight: 400; font-size: 1.35em; letter-spacing: 0; }

/* Botones */
html.ox body:not(#ox0) :is(.btn.primary, .jr-btn.is-primary) {
  background: var(--ox-spectrum) !important;
  color: #fff !important;
  border: 0 !important;
  text-shadow: 0 1px 1px rgba(0, 0, 0, .25);
  box-shadow: 0 10px 34px -12px rgba(124, 92, 255, .7), 0 0 0 1px rgba(255, 255, 255, .08) inset !important;
}
html.ox body:not(#ox0) :is(.btn:not(.primary), .jr-btn:not(.is-primary)),
html.ox[data-ox-route="home"] body:not(#ox0) .hero-cta .btn.primary:not(.obsidian-explore) {
  background: rgba(6, 6, 13, .6) !important;
  border: 1px solid var(--ox-edge-2) !important;
  color: var(--ox-ink) !important;
}
html.ox body:not(#ox0) :is(.btn, .jr-btn):hover { transform: translateY(-1px); }
html.ox body:not(#ox0) :is(.btn, .jr-btn):active { transform: scale(.97); }

/* --------------------------------------------------------------------------
   5. Home · portada con globo de aurora
   -------------------------------------------------------------------------- */
html.ox[data-ox-route="home"] body:not(#ox0) #jayu-universe { position: relative; isolation: isolate; overflow: clip; }
html.ox .ox-globe {
  position: absolute; z-index: -1;
  left: 50%; bottom: -24%;
  width: min(1180px, 130vw); aspect-ratio: 820 / 618;
  transform: translateX(-50%);
  background: var(--ox-src) center bottom / contain no-repeat;
  mix-blend-mode: screen;
  opacity: .55;
  -webkit-mask: radial-gradient(closest-side, #000 72%, transparent 100%);
  mask: radial-gradient(closest-side, #000 72%, transparent 100%);
  animation: ox-breathe 9s ease-in-out infinite alternate;
}
html.ox[data-ox-route="home"] body:not(#ox0) #jayu-universe::after {
  content: ""; position: absolute; inset: auto 0 0 0; height: 30%; z-index: -1; pointer-events: none;
  background: linear-gradient(180deg, transparent, var(--ox-void));
}
html.ox[data-ox-route="home"] body:not(#ox0) .jayu-hero-lead { color: var(--ox-ink-2) !important; }
html.ox[data-ox-route="home"] body:not(#ox0) #jayu-universe :is(.obsidian-universe-kicker, .hero-copy > .eyebrow) { color: var(--ox-cyan) !important; font-family: var(--ox-mono) !important; font-weight: 400 !important; letter-spacing: .3em !important; }
html.ox[data-ox-route="home"] body:not(#ox0) #jayu-universe .hero-cta .btn.primary.obsidian-explore {
  background: var(--ox-spectrum) !important; border: 0 !important; color: #fff !important;
  box-shadow: 0 10px 34px -12px rgba(124, 92, 255, .7), 0 0 0 1px rgba(255, 255, 255, .08) inset !important;
}
@keyframes ox-breathe { from { opacity: .5; filter: saturate(1) } to { opacity: .72; filter: saturate(1.25) } }

/* Encabezados de escena: numeración tipo terminal + serif */
html.ox body:not(#ox0) .obsidian-stage-heading[data-ox-n]::before {
  content: attr(data-ox-n) " /";
  display: block; margin-bottom: 8px;
  font: 600 11px/1 var(--ox-mono); letter-spacing: .28em;
  color: var(--ox-cyan);
}
html.ox body:not(#ox0) .obsidian-stage-heading h2 { font-size: clamp(2rem, 4.4vw, 3.6rem) !important; text-transform: none !important; }

/* Constelación · figura neuronal */
html.ox[data-ox-route="home"] body:not(#ox0) #constellation .hub-home { position: relative; isolation: isolate; overflow: hidden; }
html.ox .ox-neural {
  position: absolute; z-index: -1; top: 0; right: 0; width: 72%; height: min(780px, 100%);
  background: var(--ox-src) 60% 25% / cover no-repeat;
  opacity: .44;
  -webkit-mask: linear-gradient(90deg, transparent 12%, #000 52%, #000 82%, transparent 100%), linear-gradient(0deg, transparent, #000 25%);
  -webkit-mask-composite: source-in;
  mask: linear-gradient(90deg, transparent 12%, #000 52%, #000 82%, transparent 100%), linear-gradient(0deg, transparent, #000 25%);
  mask-composite: intersect;
}
/* Agents Hub · portada */
html.ox[data-ox-route="agents"] body:not(#ox0) main > .intro { isolation: isolate; }
html.ox .ox-neural.is-hero {
  inset: 0; width: auto; height: auto; opacity: .32;
  background-position: center 14%;
  -webkit-mask: radial-gradient(48% 62% at 50% 46%, #000 25%, transparent 100%);
  mask: radial-gradient(48% 62% at 50% 46%, #000 25%, transparent 100%);
}

/* Market Terminal · tarjeta con pantalla de terminal */
html.ox body:not(#ox0) .ox-terminal-entry { position: relative; isolation: isolate; overflow: hidden; min-height: 190px; padding: 24px 28px !important; display: flex !important; flex-direction: column; justify-content: flex-end; }
html.ox .ox-dash {
  position: absolute; z-index: -1; inset: 0;
  background: var(--ox-src) center / cover no-repeat;
  opacity: .38;
  -webkit-mask: linear-gradient(0deg, transparent 0%, #000 70%);
  mask: linear-gradient(0deg, transparent 0%, #000 70%);
  transition: opacity .4s var(--ox-ease), transform 1.2s var(--ox-ease);
}
html.ox body:not(#ox0) .ox-terminal-entry:hover .ox-dash { opacity: .55; transform: scale(1.03); }
html.ox .ox-dash.is-page { position: fixed; z-index: -1; opacity: .07; -webkit-mask: none; mask: none; }

/* --------------------------------------------------------------------------
   6. Informes (plantilla jr) en Obsidiana
   -------------------------------------------------------------------------- */
html.ox body.jr:not(#ox0) { --r-cyan: #2ee6e6; --r-lav: #b9a5ff; }
html.ox body.jr:not(#ox0) .jr-cover { position: relative; isolation: isolate; overflow-x: clip; }
html.ox .ox-globe.is-report {
  left: auto; right: -12%; bottom: auto; top: -6%;
  width: min(900px, 110vw); transform: none; opacity: .34;
}
html.ox body.jr:not(#ox0) .jr-cover h1 { font-size: clamp(2.3rem, 4.3vw, 4rem) !important; }
html.ox body.jr:not(#ox0) .jr-chap h2 { font-size: clamp(1.9rem, 3.6vw, 2.9rem) !important; }
html.ox body.jr:not(#ox0) .jr-agent { font-family: var(--ox-mono); letter-spacing: .16em; text-transform: uppercase; font-size: 11.5px; color: var(--ox-cyan); }
html.ox body.jr:not(#ox0) .jr-kpi b { font-family: var(--ox-mono) !important; font-weight: 600; }
html.ox body.jr:not(#ox0) .jr-kpi.is-up b { color: var(--ox-up) !important; }
html.ox body.jr:not(#ox0) .jr-kpi.is-down b { color: var(--ox-down) !important; }
html.ox body.jr:not(#ox0) .jr-fig { position: relative; padding: 8px !important; }
html.ox body.jr:not(#ox0) .jr-fig::before,
html.ox body.jr:not(#ox0) .jr-fig::after {
  content: ""; position: absolute; width: 14px; height: 14px; pointer-events: none;
  border: 1px solid var(--ox-cyan); opacity: .7;
}
html.ox body.jr:not(#ox0) .jr-fig::before { top: -1px; left: -1px; border-right: 0; border-bottom: 0; }
html.ox body.jr:not(#ox0) .jr-fig::after { bottom: -1px; right: -1px; border-left: 0; border-top: 0; border-color: var(--ox-magenta); }
html.ox body.jr:not(#ox0) .jr-quote { border-left: 2px solid transparent !important; border-image: linear-gradient(180deg, var(--ox-cyan), var(--ox-magenta)) 1 !important; }
html.ox body.jr:not(#ox0) .jr-scen > .is-bull { border-top: 2px solid var(--ox-up) !important; }
html.ox body.jr:not(#ox0) .jr-scen > .is-bear { border-top: 2px solid var(--ox-down) !important; }
html.ox body.jr:not(#ox0) .jr-toc a:hover i { color: var(--ox-cyan); }
html.ox body.jr:not(#ox0) .jx-progress { background: var(--ox-spectrum) !important; }

/* --------------------------------------------------------------------------
   7. Accesibilidad y móvil
   -------------------------------------------------------------------------- */
@media (max-width: 760px) {
  html.ox .ox-globe { width: 150vw; bottom: -4%; opacity: .5; }
  html.ox .ox-globe.is-report { right: -40%; top: -2%; width: 130vw; opacity: .26; }
  html.ox .ox-neural { opacity: .26; background-position: 70% 20%; }
  html.ox .ox-neural.is-hero { inset: 0; opacity: .26; }
  html.ox body:not(#ox0) h1 { font-size: clamp(2.3rem, 11vw, 3.4rem) !important; }
}
@media (prefers-reduced-motion: reduce) {
  html.ox .ox-globe { animation: none; }
  html.ox .ox-dash { transition: none; }
}
@media (forced-colors: active) {
  html.ox .ox-art { display: none; }
}
