/* ==========================================================
   AIMA GLOBAL BRAND MARK V1
   Canonical geometry copied from aima.surf.
   One visual identity across Login / Hub / Crypto / Stocks /
   Research / legacy dashboard.
   ========================================================== */

.aima-brand-mark{
  --aima-mark-stroke:#edfaff;
  --aima-mark-ring:rgba(127,230,255,.24);
  --aima-mark-border:rgba(180,225,255,.16);
  --aima-mark-bg-a:rgba(127,230,255,.07);
  --aima-mark-bg-b:rgba(109,140,255,.045);

  width:40px;
  height:40px;
  display:grid;
  place-items:center;
  position:relative;
  overflow:hidden;
  flex:0 0 auto;
  border:1px solid var(--aima-mark-border);
  border-radius:12px;
  background:
    linear-gradient(
      145deg,
      var(--aima-mark-bg-a),
      var(--aima-mark-bg-b)
    );
  box-shadow:
    inset 0 0 28px rgba(127,230,255,.025),
    0 10px 34px rgba(0,0,0,.20);
}

.aima-brand-mark::after{
  content:"";
  position:absolute;
  inset:-42%;
  background:
    conic-gradient(
      from 0deg,
      transparent,
      rgba(127,230,255,.24),
      transparent 28%,
      transparent 72%,
      rgba(155,130,255,.20),
      transparent
    );
  animation:aima-brand-spin 9s linear infinite;
  pointer-events:none;
}

.aima-brand-mark svg{
  width:65%;
  height:65%;
  fill:none;
  position:relative;
  z-index:1;
  overflow:visible;
}

.aima-brand-mark path{
  stroke:var(--aima-mark-stroke);
  stroke-width:1.35;
  stroke-linecap:round;
  stroke-linejoin:round;
  vector-effect:non-scaling-stroke;
}

.aima-brand-mark circle{
  stroke:var(--aima-mark-ring);
  stroke-width:.8;
  vector-effect:non-scaling-stroke;
}

@keyframes aima-brand-spin{
  to{transform:rotate(360deg)}
}

/* Sidebar-sized product marks */
.sidebar .aima-brand-mark,
.brand .aima-brand-mark{
  width:36px;
  height:36px;
  border-radius:11px;
}

/* Hub gets the full AIMA scale. */
.page .topbar .aima-brand-mark{
  width:42px;
  height:42px;
  border-radius:13px;
}

/* Login hero mark. */
.aima-login-mark{
  width:48px !important;
  height:48px !important;
  border-radius:14px !important;
  margin-bottom:22px;
}

/* Research header. */
.top .aima-brand-mark{
  width:40px;
  height:40px;
  border-radius:12px;
}

/* Stocks Light theme parity with aima.surf white mode. */
html[data-stocks-theme="light"] .aima-brand-mark{
  --aima-mark-stroke:#121722;
  --aima-mark-ring:rgba(79,112,255,.22);
  --aima-mark-border:rgba(15,20,32,.12);
  --aima-mark-bg-a:rgba(255,255,255,.92);
  --aima-mark-bg-b:rgba(247,249,253,.92);
  box-shadow:
    inset 0 0 24px rgba(79,112,255,.025),
    0 8px 24px rgba(16,24,40,.07);
}

html[data-stocks-theme="light"] .aima-brand-mark::after{
  background:
    conic-gradient(
      from 0deg,
      transparent,
      rgba(79,112,255,.12),
      transparent 30%,
      transparent 72%,
      rgba(114,216,245,.14),
      transparent
    );
}

/* Optional generic light theme compatibility. */
html[data-theme="light"] .aima-brand-mark{
  --aima-mark-stroke:#121722;
  --aima-mark-ring:rgba(79,112,255,.22);
  --aima-mark-border:rgba(15,20,32,.12);
  --aima-mark-bg-a:rgba(255,255,255,.92);
  --aima-mark-bg-b:rgba(247,249,253,.92);
}

/* Respect reduced motion. */
@media(prefers-reduced-motion:reduce){
  .aima-brand-mark::after{animation:none}
}

/* Defeat legacy brand-span rules on older pages. */
.brand > .aima-brand-mark,
.top .brand > .aima-brand-mark{
  display:grid !important;
  margin-top:0 !important;
  color:inherit !important;
  font-size:inherit !important;
}
