.haon-ecosystem {
  --he-accent: #61d8d1;
  --he-accent-2: #7b7cff;
  --he-ink: #eaf2f8;
  --he-muted: #94a6b4;
  --he-panel: rgba(8, 17, 27, 0.96);
  --he-panel-2: rgba(14, 27, 39, 0.96);
  --he-line: rgba(164, 198, 218, 0.18);
  --he-shadow: 0 24px 70px rgba(0, 0, 0, 0.28);
  position: fixed;
  right: max(16px, env(safe-area-inset-right));
  bottom: max(16px, env(safe-area-inset-bottom));
  z-index: 180;
  width: min(390px, calc(100vw - 32px));
  color: var(--he-ink);
  font-family: Inter, "Segoe UI", Arial, sans-serif;
  font-size: 14px;
  line-height: 1.35;
  isolation: isolate;
}

.haon-ecosystem[data-theme="light"] {
  --he-ink: #102337;
  --he-muted: #5c7082;
  --he-panel: rgba(255, 255, 255, 0.97);
  --he-panel-2: rgba(245, 249, 252, 0.98);
  --he-line: rgba(22, 63, 92, 0.14);
  --he-shadow: 0 24px 70px rgba(21, 45, 63, 0.18);
}

.haon-ecosystem *,
.haon-ecosystem *::before,
.haon-ecosystem *::after {
  box-sizing: border-box;
}

.he-trigger {
  width: max-content;
  max-width: 100%;
  min-height: 58px;
  margin-left: auto;
  padding: 8px 12px 8px 9px;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  color: var(--he-ink);
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--he-panel) 92%, var(--he-accent) 8%),
    var(--he-panel));
  border: 1px solid var(--he-line);
  border-radius: 18px;
  box-shadow: var(--he-shadow), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(18px) saturate(1.12);
  -webkit-backdrop-filter: blur(18px) saturate(1.12);
  cursor: pointer;
  text-align: left;
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.he-trigger:hover,
.he-trigger:focus-visible,
.haon-ecosystem[data-open="true"] .he-trigger {
  transform: translateY(-2px);
  border-color: color-mix(in srgb, var(--he-accent) 52%, var(--he-line));
  box-shadow: 0 20px 54px rgba(0, 0, 0, 0.24), 0 0 0 1px rgba(97, 216, 209, 0.1);
}

.he-trigger:focus-visible,
.he-product:focus-visible,
.he-close:focus-visible,
.he-detail-close:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--he-accent) 48%, transparent);
  outline-offset: 3px;
}

.he-brand-mark {
  width: 42px;
  height: 42px;
  display: block;
  object-fit: contain;
  border-radius: 13px;
  background: #071018;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.1);
}

.he-trigger-copy {
  min-width: 0;
  display: grid;
  gap: 1px;
}

.he-trigger-copy small {
  color: var(--he-muted);
  font-size: 9px;
  font-weight: 760;
  letter-spacing: 0.16em;
}

.he-trigger-copy strong {
  overflow: hidden;
  color: var(--he-ink);
  font-size: 13px;
  font-weight: 760;
  letter-spacing: 0.04em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.he-trigger-state {
  padding: 5px 7px;
  color: var(--he-accent);
  background: color-mix(in srgb, var(--he-accent) 10%, transparent);
  border: 1px solid color-mix(in srgb, var(--he-accent) 26%, transparent);
  border-radius: 8px;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.08em;
  white-space: nowrap;
}

.he-panel {
  position: absolute;
  right: 0;
  bottom: 68px;
  width: 100%;
  max-height: min(640px, calc(100vh - 100px));
  overflow: auto;
  padding: 13px;
  background:
    radial-gradient(circle at 88% 8%, rgba(97, 216, 209, 0.11), transparent 30%),
    linear-gradient(155deg, var(--he-panel), var(--he-panel-2));
  border: 1px solid var(--he-line);
  border-radius: 22px;
  box-shadow: var(--he-shadow), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(22px) saturate(1.12);
  -webkit-backdrop-filter: blur(22px) saturate(1.12);
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px) scale(0.975);
  transform-origin: 90% 100%;
  transition: opacity 180ms ease, transform 220ms cubic-bezier(.2, .7, .2, 1);
}

.haon-ecosystem[data-open="true"] .he-panel {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}

.he-panel-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: start;
  padding: 5px 5px 12px;
}

.he-panel-head small {
  display: block;
  margin-bottom: 4px;
  color: var(--he-accent);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.16em;
}

.he-panel-head strong {
  display: block;
  color: var(--he-ink);
  font-size: 17px;
  letter-spacing: -0.02em;
}

.he-panel-head p {
  margin: 5px 0 0;
  color: var(--he-muted);
  font-size: 12px;
}

.he-close,
.he-detail-close {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  color: var(--he-muted);
  background: transparent;
  border: 1px solid var(--he-line);
  border-radius: 11px;
  cursor: pointer;
  font: 700 17px/1 inherit;
}

.he-products {
  display: grid;
  gap: 8px;
}

.he-product {
  position: relative;
  min-height: 72px;
  padding: 12px 12px 12px 64px;
  display: grid;
  align-content: center;
  gap: 3px;
  overflow: hidden;
  color: var(--he-ink);
  background: color-mix(in srgb, var(--he-panel-2) 88%, transparent);
  border: 1px solid var(--he-line);
  border-radius: 15px;
  text-decoration: none;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

.he-product-icon {
  position: absolute;
  left: 11px;
  top: 50%;
  z-index: 2;
  width: 42px;
  height: 42px;
  overflow: hidden;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.1), transparent 42%),
    #091622;
  border: 1px solid rgba(164, 211, 230, 0.2);
  border-radius: 13px;
  transform: translateY(-50%);
  box-shadow:
    0 8px 22px rgba(0, 0, 0, 0.25),
    inset 0 1px 0 rgba(255, 255, 255, 0.09);
}

.he-icon-part {
  position: absolute;
  display: block;
}

.he-product-icon--chain {
  background:
    radial-gradient(circle at 50% 50%, rgba(90, 143, 255, 0.2), transparent 54%),
    #071018;
}

.he-chain-a,
.he-chain-b,
.he-chain-c,
.he-chain-d {
  width: 16px;
  height: 16px;
  border-radius: 7px;
  box-shadow: 0 0 11px currentColor;
}

.he-chain-a { left: 7px; top: 7px; color: #73e470; background: #4ac866; }
.he-chain-b { right: 7px; top: 7px; color: #52c8ff; background: #35a8ee; }
.he-chain-c { left: 7px; bottom: 7px; color: #a26cff; background: #794eea; }
.he-chain-d { right: 7px; bottom: 7px; color: #ffbd54; background: #ef8b32; }

.he-chain-core {
  left: 13px;
  top: 13px;
  width: 16px;
  height: 16px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.68), rgba(93, 136, 255, 0.46));
  border: 1px solid rgba(255, 255, 255, 0.62);
  border-radius: 6px;
  box-shadow: 0 0 13px rgba(104, 162, 255, 0.55);
  backdrop-filter: blur(2px);
}

.he-product-icon--leads {
  background:
    radial-gradient(circle at 50% 50%, rgba(89, 225, 203, 0.18), transparent 58%),
    #071a25;
}

.he-leads-ring {
  border: 1px solid rgba(106, 224, 216, 0.68);
  border-radius: 50%;
}

.he-leads-ring-a { inset: 7px; }
.he-leads-ring-b { inset: 13px; border-color: rgba(121, 153, 255, 0.82); }

.he-leads-axis {
  left: 50%;
  top: 50%;
  background: rgba(120, 229, 217, 0.62);
  transform: translate(-50%, -50%);
}

.he-leads-axis-x { width: 30px; height: 1px; }
.he-leads-axis-y { width: 1px; height: 30px; }

.he-leads-pulse {
  left: 18px;
  top: 18px;
  width: 6px;
  height: 6px;
  background: #78efac;
  border: 1px solid rgba(255, 255, 255, 0.75);
  border-radius: 50%;
  box-shadow: 0 0 10px #61d8d1;
}

.he-product-icon--agency {
  background:
    radial-gradient(circle at 72% 24%, rgba(255, 180, 88, 0.2), transparent 42%),
    linear-gradient(145deg, #17142c, #0b1424);
}

.he-agency-rail {
  left: 8px;
  right: 8px;
  bottom: 8px;
  height: 1px;
  background: rgba(217, 222, 255, 0.32);
}

.he-agency-bar {
  bottom: 9px;
  width: 6px;
  border-radius: 3px 3px 1px 1px;
}

.he-agency-bar-a {
  left: 10px;
  height: 12px;
  background: linear-gradient(#69e0ce, #2a9da2);
}

.he-agency-bar-b {
  left: 19px;
  height: 21px;
  background: linear-gradient(#8b91ff, #6455df);
}

.he-agency-bar-c {
  right: 10px;
  height: 16px;
  background: linear-gradient(#ffbd70, #ed7651);
}

.he-agency-orbit {
  right: 7px;
  top: 7px;
  width: 8px;
  height: 8px;
  border: 1px solid rgba(255, 196, 116, 0.82);
  border-radius: 50%;
  box-shadow: 0 0 8px rgba(255, 159, 79, 0.56);
}

.he-product-icon--hub {
  background:
    radial-gradient(circle at 50% 50%, rgba(95, 218, 203, 0.18), transparent 52%),
    #071923;
}

.he-hub-line {
  left: 9px;
  top: 20px;
  width: 24px;
  height: 1px;
  background: linear-gradient(90deg, #62d9cf, #7b7cff);
  transform-origin: center;
  opacity: 0.72;
}

.he-hub-line-a { transform: rotate(34deg); }
.he-hub-line-b { transform: rotate(-34deg); }

.he-hub-node {
  width: 6px;
  height: 6px;
  background: #77dbcb;
  border: 1px solid rgba(255, 255, 255, 0.66);
  border-radius: 50%;
  box-shadow: 0 0 7px rgba(97, 216, 209, 0.58);
}

.he-hub-node-a { left: 7px; top: 10px; }
.he-hub-node-b { right: 7px; top: 10px; background: #8183ff; }
.he-hub-node-c { left: 7px; bottom: 10px; background: #75dfa0; }
.he-hub-node-d { right: 7px; bottom: 10px; background: #a37dff; }
.he-hub-node-core {
  left: 17px;
  top: 17px;
  width: 8px;
  height: 8px;
  background: #e4fbff;
  box-shadow: 0 0 10px rgba(119, 222, 219, 0.82);
}

.he-product::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(95deg, transparent 55%, rgba(97, 216, 209, 0.09));
  opacity: 0;
  pointer-events: none;
  transition: opacity 160ms ease;
}

.he-product:hover,
.he-product:focus-visible {
  transform: translateX(-3px);
  border-color: color-mix(in srgb, var(--he-accent) 48%, var(--he-line));
}

.he-product:hover::after,
.he-product:focus-visible::after {
  opacity: 1;
}

.he-product[aria-current="page"] {
  border-color: color-mix(in srgb, var(--he-accent) 55%, var(--he-line));
  background: color-mix(in srgb, var(--he-accent) 8%, var(--he-panel-2));
}

.he-product > strong,
.he-product > .he-product-line {
  position: relative;
  z-index: 1;
}

.he-product > strong {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 13px;
}

.he-product > .he-product-line {
  color: var(--he-muted);
  font-size: 11px;
}

.he-current {
  padding: 3px 5px;
  color: var(--he-accent);
  border: 1px solid color-mix(in srgb, var(--he-accent) 30%, transparent);
  border-radius: 6px;
  font-size: 7px;
  letter-spacing: 0.08em;
}

.he-panel-foot {
  margin: 10px 4px 2px;
  color: var(--he-muted);
  font-size: 10px;
  line-height: 1.45;
}

.he-detail {
  position: absolute;
  inset: 13px;
  z-index: 2;
  padding: 18px;
  display: none;
  align-content: start;
  gap: 12px;
  color: var(--he-ink);
  background:
    radial-gradient(circle at 80% 4%, rgba(123, 124, 255, 0.16), transparent 35%),
    var(--he-panel);
  border: 1px solid color-mix(in srgb, var(--he-accent) 34%, var(--he-line));
  border-radius: 17px;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.28);
}

.he-detail[data-visible="true"] {
  display: grid;
}

.he-detail-top {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
}

.he-detail-identity {
  min-width: 0;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
}

.he-detail-identity .he-product-icon {
  position: relative;
  left: auto;
  top: auto;
  transform: none;
}

.he-detail-top small {
  color: var(--he-accent);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.14em;
}

.he-detail-top h3 {
  margin: 4px 0 0;
  color: var(--he-ink);
  font-size: 20px;
  letter-spacing: -0.025em;
}

.he-detail-grid {
  display: grid;
  gap: 8px;
}

.he-detail-row {
  padding: 10px 11px;
  background: color-mix(in srgb, var(--he-panel-2) 90%, transparent);
  border: 1px solid var(--he-line);
  border-radius: 12px;
}

.he-detail-row b {
  display: block;
  margin-bottom: 3px;
  color: var(--he-accent);
  font-size: 9px;
  letter-spacing: 0.12em;
}

.he-detail-row span {
  color: var(--he-muted);
  font-size: 12px;
}

.he-detail-link {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #071018;
  background: linear-gradient(135deg, var(--he-accent), #9ce7bf);
  border-radius: 12px;
  font-size: 12px;
  font-weight: 800;
  text-decoration: none;
}

.he-noscript {
  position: fixed;
  left: 12px;
  bottom: 12px;
  z-index: 20;
  padding: 8px 10px;
  background: #0b1722;
  border-radius: 8px;
  color: #eaf2f8;
  font: 12px/1.4 Arial, sans-serif;
}

.he-noscript a {
  color: #8ee3d7;
}

@media (max-width: 620px) {
  .haon-ecosystem {
    right: max(10px, env(safe-area-inset-right));
    bottom: max(10px, env(safe-area-inset-bottom));
    width: calc(100vw - 20px);
  }

  .he-trigger {
    min-height: 54px;
    border-radius: 16px;
  }

  .he-trigger-state {
    display: none;
  }

  .he-panel {
    bottom: 64px;
    max-height: min(72vh, 620px);
    border-radius: 20px;
  }

  .he-panel-head strong {
    font-size: 16px;
  }

  .he-product {
    min-height: 68px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .haon-ecosystem *,
  .haon-ecosystem *::before,
  .haon-ecosystem *::after {
    scroll-behavior: auto !important;
    animation: none !important;
    transition-duration: 0.01ms !important;
  }
}
