@font-face {
  font-family: "HarmonyOS Sans SC";
  src: url("/assets/fonts/HarmonyOS-Sans-SC-Regular.ttf") format("truetype");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "HarmonyOS Sans SC";
  src: url("/assets/fonts/HarmonyOS-Sans-SC-Bold.ttf") format("truetype");
  font-style: normal;
  font-weight: 700;
  font-display: swap;
}

:root {
  --agent-blue: #214d9f;
  --agent-blue-deep: #123b73;
  --agent-cyan: #20a5da;
  --agent-cyan-soft: #dff4fb;
  --agent-ink: #17324d;
  --agent-muted: #60768b;
  --agent-line: #cddde9;
  --agent-page: #f4f9fc;
  --agent-surface: #ffffff;
  --agent-success: #087568;
  --agent-font: "HarmonyOS Sans SC", "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  --agent-header-height: 74px;
  --agent-content: 1440px;
}

* {
  box-sizing: border-box;
  letter-spacing: 0;
}

html {
  min-width: 320px;
  color-scheme: light;
  background: #fff;
}

body.agent-platform-page {
  min-width: 320px;
  min-height: 100dvh;
  margin: 0;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  color: var(--agent-ink);
  background: #fff;
  font-family: var(--agent-font);
}

button,
a {
  -webkit-tap-highlight-color: rgba(32, 165, 218, 0.14);
  touch-action: manipulation;
}

button,
input,
textarea {
  font: inherit;
}

button:focus-visible,
a:focus-visible {
  outline: 3px solid rgba(32, 165, 218, 0.42);
  outline-offset: 3px;
}

.skip-link {
  position: fixed;
  left: 16px;
  top: 10px;
  z-index: 100;
  padding: 9px 12px;
  color: #fff;
  background: var(--agent-blue-deep);
  transform: translateY(-160%);
  transition: transform 160ms ease;
}

.skip-link:focus {
  transform: translateY(0);
}

.agent-platform-header {
  position: relative;
  z-index: 20;
  flex: 0 0 auto;
  min-height: var(--agent-header-height);
  border-bottom: 1px solid rgba(205, 221, 233, 0.9);
  background: #fff;
}

.agent-header-inner {
  width: min(var(--agent-content), calc(100% - 48px));
  min-height: var(--agent-header-height);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.agent-brand {
  min-width: 0;
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  gap: 16px;
  color: var(--agent-blue-deep);
  text-decoration: none;
}

.agent-brand img {
  display: block;
  width: 148px;
  height: auto;
}

.agent-brand-divider {
  width: 1px;
  height: 28px;
  background: var(--agent-line);
}

.agent-platform-name {
  font-size: 16px;
  font-weight: 700;
  white-space: nowrap;
}

.agent-header-actions,
.language-switch {
  display: flex;
  align-items: center;
}

.agent-header-actions {
  gap: 18px;
}

.official-site-link {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--agent-blue-deep);
  font-size: 14px;
  text-decoration: none;
}

.official-site-link span:last-child {
  color: var(--agent-cyan);
  transition: transform 160ms ease;
}

.official-site-link:hover span:last-child {
  transform: translate(2px, -2px);
}

.language-switch {
  min-height: 38px;
  padding: 3px;
  border: 1px solid var(--agent-line);
  border-radius: 6px;
  background: #fff;
}

.language-switch button {
  min-width: 42px;
  min-height: 32px;
  border: 0;
  border-radius: 4px;
  color: var(--agent-muted);
  background: transparent;
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
}

.language-switch button[aria-pressed="true"] {
  color: #fff;
  background: var(--agent-blue);
}

.agent-platform-main {
  position: relative;
  min-height: max(680px, calc(100dvh - var(--agent-header-height) - 42px));
  flex: 1 0 auto;
  overflow: clip;
  background: var(--agent-page);
}

.agent-stage {
  position: relative;
  width: 100%;
  min-height: max(680px, calc(100dvh - var(--agent-header-height) - 42px));
  overflow: hidden;
  background: var(--agent-page);
}

.agent-stage::before {
  position: absolute;
  left: 0;
  top: 34px;
  z-index: 8;
  width: 104px;
  height: 2px;
  background: var(--agent-cyan);
  content: "";
}

.agent-stage-copy {
  position: absolute;
  left: clamp(48px, 5vw, 78px);
  top: 15%;
  z-index: 8;
  width: 440px;
  pointer-events: none;
}

.agent-eyebrow {
  margin: 0 0 22px;
  color: var(--agent-cyan);
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
}

.agent-stage h1 {
  max-width: 500px;
  margin: 0;
  color: var(--agent-blue-deep);
  font-size: 72px;
  font-weight: 700;
  line-height: 0.96;
}

.agent-stage-subtitle {
  margin: 24px 0 0;
  color: var(--agent-blue);
  font-size: 25px;
  font-weight: 700;
}

.agent-stage-description {
  max-width: 390px;
  margin: 18px 0 0;
  color: var(--agent-muted);
  font-size: 15px;
  line-height: 1.8;
}

.agent-atlas-shell {
  position: absolute;
  inset: 0;
  overflow: hidden;
  isolation: isolate;
}

#agent-atlas-canvas,
.agent-atlas-fallback,
.agent-pool-map {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

#agent-atlas-canvas {
  z-index: 1;
  display: block;
  pointer-events: none;
}

.agent-atlas-fallback {
  z-index: 0;
  overflow: hidden;
  background: var(--agent-page);
}

.agent-atlas-shell[data-render-state="ready"] .agent-atlas-fallback {
  display: none;
}

.fallback-track {
  position: absolute;
  height: 1px;
  background: var(--agent-line);
  transform-origin: left center;
}

.fallback-track-a {
  left: 54%;
  top: 53%;
  width: 28%;
  transform: rotate(-22deg);
}

.fallback-track-b {
  left: 54%;
  top: 59%;
  width: 30%;
  transform: rotate(24deg);
}

.fallback-pool {
  position: absolute;
  border: 1px solid var(--agent-line);
  border-radius: 50%;
}

.fallback-pool::after {
  position: absolute;
  inset: 16%;
  border: 1px solid #dbe8ef;
  border-radius: inherit;
  content: "";
}

.fallback-pool-a {
  left: 20%;
  top: 35%;
  width: 46%;
  height: 48%;
  border-width: 3px;
  border-color: var(--agent-blue);
}

.fallback-pool-b {
  right: 9%;
  top: 20%;
  width: 30%;
  height: 30%;
}

.fallback-pool-c {
  right: 5%;
  bottom: 8%;
  width: 34%;
  height: 32%;
}

.agent-pool-map {
  z-index: 4;
  pointer-events: none;
}

.agent-pool {
  position: absolute;
  pointer-events: none;
}

.agent-pool-label {
  position: absolute;
  min-width: 170px;
  padding-left: 50px;
}

.agent-pool-label::before {
  position: absolute;
  left: 0;
  top: 12px;
  width: 38px;
  height: 1px;
  background: var(--agent-blue);
  content: "";
}

.pool-index {
  position: absolute;
  color: var(--agent-cyan);
  font-size: 11px;
  font-weight: 700;
}

.agent-pool-label h2,
.agent-pool-label p {
  margin: 0;
}

.agent-pool-label h2 {
  color: var(--agent-blue-deep);
  font-size: 16px;
  line-height: 1.35;
}

.agent-pool-label p {
  margin-top: 4px;
  color: var(--agent-muted);
  font-size: 9px;
  line-height: 1.4;
  text-transform: uppercase;
}

.agent-pool-consulting {
  left: 32%;
  top: 44%;
  width: 38%;
  height: 49%;
  pointer-events: auto;
}

.agent-pool-consulting .agent-pool-label {
  transition: transform 220ms cubic-bezier(0.22, 1, 0.36, 1), color 180ms ease;
}

.agent-atlas-shell[data-consulting-active="true"] .agent-pool-consulting .agent-pool-label {
  transform: translateX(7px);
}

.agent-atlas-shell[data-consulting-active="true"] .agent-pool-consulting .agent-pool-label::before {
  background: var(--agent-cyan);
}

.agent-pool-consulting .pool-index {
  left: 1%;
  top: 1%;
}

.agent-pool-consulting .agent-pool-label {
  left: 1%;
  top: 5%;
}

.agent-pool-research {
  right: 2%;
  top: 24%;
  width: 27%;
  height: 27%;
}

.agent-pool-research .pool-index {
  left: 4%;
  top: 0;
}

.agent-pool-research .agent-pool-label {
  left: 4%;
  top: 8%;
}

.agent-pool-custom {
  right: 1%;
  bottom: 6%;
  width: 29%;
  height: 29%;
}

.agent-pool-custom .pool-index {
  left: 24%;
  bottom: 8%;
}

.agent-pool-custom .agent-pool-label {
  left: 24%;
  bottom: 0;
}

.kiki-agent-node {
  position: absolute;
  left: 22%;
  top: 30%;
  width: 210px;
  height: 186px;
  border: 0;
  padding: 0;
  color: var(--agent-ink);
  background: transparent;
  cursor: pointer;
  pointer-events: auto;
}

.agent-icon-disc {
  position: absolute;
  left: 51px;
  top: 0;
  width: 108px;
  height: 108px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid rgba(33, 77, 159, 0.32);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 0 0 8px rgba(32, 165, 218, 0.06);
  transform-origin: 50% 70%;
  animation: rnAgentIconSurface 4.8s ease-in-out infinite;
  transition: transform 260ms cubic-bezier(0.22, 1, 0.36, 1);
}

.kiki-node-portrait::after {
  display: none;
}

.kiki-node-portrait img {
  position: relative;
  z-index: 1;
  width: 70px;
  height: 70px;
  display: block;
  object-fit: contain;
}

.kiki-node-copy {
  position: absolute;
  left: 5px;
  top: 113px;
  width: 200px;
  padding: 8px 36px 7px 12px;
  display: grid;
  gap: 1px;
  border-block: 1px solid rgba(33, 77, 159, 0.32);
  text-align: left;
  background: rgba(244, 249, 252, 0.92);
}

.kiki-node-copy strong {
  color: var(--agent-blue-deep);
  font-size: 19px;
  line-height: 1;
}

.kiki-node-copy span {
  color: var(--agent-muted);
  font-size: 11px;
}

.kiki-node-arrow {
  position: absolute;
  right: 2px;
  top: 122px;
  color: var(--agent-cyan);
  font-size: 18px;
  transition: transform 180ms ease;
}

.kiki-agent-node:hover .kiki-node-portrait,
.kiki-agent-node:focus-visible .kiki-node-portrait {
  animation: none;
  opacity: 1;
  transform: translateY(-5px) scale(1.07);
}

.kiki-agent-node:hover .kiki-node-arrow,
.kiki-agent-node:focus-visible .kiki-node-arrow {
  transform: translate(3px, -3px);
}

.kiki-agent-node:active .kiki-node-portrait {
  transform: translateY(-2px) scale(0.985);
}

@keyframes rnAgentIconSurface {
  0%,
  100% {
    opacity: 0.72;
    transform: translateY(5px) scale(0.96);
  }
  45%,
  60% {
    opacity: 1;
    transform: translateY(-3px) scale(1);
  }
}

.agent-platform-footer {
  width: min(var(--agent-content), calc(100% - 48px));
  min-height: 42px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  color: var(--agent-muted);
  background: #fff;
  font-size: 12px;
  flex: 0 0 auto;
}

.kiki-chat-dialog {
  position: fixed;
  inset: auto 20px 20px auto;
  z-index: 80;
  width: clamp(420px, 38vw, 560px);
  height: clamp(580px, 78dvh, 780px);
  max-width: none;
  max-height: none;
  margin: 0;
  border: 0;
  border-radius: 8px;
  padding: 0;
  overflow: hidden;
  color: var(--agent-ink);
  background: #fff;
  box-shadow: 0 30px 90px rgba(7, 35, 70, 0.3);
  opacity: 0;
  transform: translateX(28px);
  transition: opacity 220ms ease, transform 220ms cubic-bezier(0.22, 1, 0.36, 1);
}

.kiki-chat-dialog[open] {
  opacity: 1;
  transform: translateX(0);
}

.kiki-dialog-shell {
  position: relative;
  height: 100%;
  min-height: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
}

.kiki-dialog-header {
  min-height: 54px;
  padding: 8px 10px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  border-bottom: 1px solid var(--agent-line);
  background: #fff;
}

.kiki-dialog-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.kiki-dialog-actions > a {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  color: var(--agent-blue);
  font-size: 12px;
  text-decoration: none;
}

#close-kiki-chat {
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 50%;
  color: var(--agent-blue-deep);
  background: #edf5f9;
  cursor: pointer;
  font-size: 24px;
  line-height: 1;
}

.dialog-language-switch {
  min-height: 34px;
}

.dialog-language-switch button {
  min-width: 35px;
  min-height: 28px;
  font-size: 11px;
}

.kiki-inline-chat {
  min-height: 0;
  overflow: hidden;
}

.kiki-inline-chat ribonext-chat-widget {
  width: 100%;
  height: 100%;
  display: block;
}

.kiki-dialog-resizer {
  position: absolute;
  left: 0;
  top: 0;
  z-index: 4;
  width: 32px;
  height: 32px;
  border: 0;
  padding: 0;
  background: transparent;
  cursor: nwse-resize;
  touch-action: none;
}

.kiki-dialog-resizer span {
  position: absolute;
  left: 7px;
  top: 7px;
  width: 11px;
  height: 11px;
  border-left: 2px solid rgba(33, 77, 159, 0.42);
  border-top: 2px solid rgba(33, 77, 159, 0.42);
  transition: border-color 160ms ease;
}

.kiki-dialog-resizer:hover span,
.kiki-dialog-resizer:focus-visible span {
  border-color: var(--agent-cyan);
}

.kiki-chat-dialog.is-resizing {
  transition: none;
  user-select: none;
}

.noscript-notice {
  position: fixed;
  left: 16px;
  right: 16px;
  bottom: 16px;
  z-index: 90;
  padding: 12px 16px;
  color: var(--agent-ink);
  background: #fff;
  border: 1px solid var(--agent-line);
}

@media (max-width: 980px) {
  .agent-stage {
    min-height: max(900px, calc(100dvh - var(--agent-header-height) - 42px));
  }

  .agent-stage-copy {
    top: 10%;
    width: 380px;
  }

  .agent-stage h1 {
    font-size: 56px;
  }

  .agent-pool-consulting {
    left: 27%;
    top: 42%;
    width: 43%;
  }

  .agent-pool-research {
    right: 0;
    top: 30%;
  }

  .agent-pool-custom {
    right: 0;
    bottom: 9%;
  }
}

@media (max-width: 680px) {
  :root {
    --agent-header-height: 64px;
  }

  .agent-header-inner {
    width: calc(100% - 28px);
  }

  .agent-brand {
    gap: 10px;
  }

  .agent-brand img {
    width: 116px;
  }

  .agent-brand-divider,
  .official-site-link,
  .agent-platform-name {
    display: none;
  }

  .agent-header-actions {
    gap: 8px;
  }

  .agent-stage {
    min-height: 1040px;
    border-inline: 0;
  }

  .agent-stage::before {
    left: 20px;
    top: 24px;
    width: 48px;
  }

  .agent-stage-copy {
    left: 20px;
    top: 58px;
    width: calc(100% - 40px);
  }

  .agent-eyebrow {
    margin-bottom: 18px;
  }

  .agent-stage h1 {
    font-size: 42px;
    line-height: 1.02;
  }

  .agent-stage-subtitle {
    margin-top: 14px;
    font-size: 20px;
  }

  .agent-stage-description {
    max-width: 340px;
    margin-top: 10px;
    font-size: 14px;
    line-height: 1.65;
  }

  .agent-atlas-shell {
    inset: 286px 0 0;
  }

  .agent-pool-consulting {
    left: 3%;
    top: 17%;
    width: 74%;
    height: 38%;
  }

  .agent-pool-research {
    right: 2%;
    top: 65%;
    width: 50%;
    height: 18%;
  }

  .agent-pool-custom {
    left: 12%;
    right: auto;
    bottom: 8%;
    width: 62%;
    height: 20%;
  }

  .agent-pool-label {
    min-width: 150px;
    padding-left: 40px;
  }

  .agent-pool-label::before {
    width: 30px;
  }

  .agent-pool-label h2 {
    font-size: 14px;
  }

  .agent-pool-label p {
    font-size: 9px;
  }

  .agent-pool-consulting .pool-index {
    left: 2%;
    top: 0;
  }

  .agent-pool-consulting .agent-pool-label {
    left: 2%;
    top: 6%;
  }

  .agent-pool-research .pool-index {
    left: 25%;
    top: 1%;
  }

  .agent-pool-research .agent-pool-label {
    left: 25%;
    top: 14%;
  }

  .agent-pool-custom .pool-index {
    left: 2%;
    bottom: 20%;
  }

  .agent-pool-custom .agent-pool-label {
    left: 2%;
    bottom: 0;
  }

  .kiki-agent-node {
    left: 10%;
    top: 30%;
    width: 190px;
    height: 174px;
  }

  .kiki-node-portrait {
    left: 51px;
    width: 88px;
    height: 88px;
  }

  .kiki-node-portrait img {
    width: 58px;
    height: 58px;
  }

  .kiki-node-copy {
    left: 3px;
    top: 93px;
    width: 184px;
    min-width: 0;
    padding-right: 66px;
  }

  .kiki-node-copy strong {
    font-size: 18px;
  }

  .kiki-node-arrow {
    right: 2px;
    top: 102px;
  }

  .agent-platform-footer {
    width: calc(100% - 28px);
    min-height: 54px;
    align-items: flex-start;
    flex-direction: column;
    justify-content: center;
    gap: 2px;
  }

  .kiki-chat-dialog {
    inset: 0;
    width: 100vw;
    height: 100dvh;
    margin: 0;
    border-radius: 0;
  }

  .kiki-dialog-header {
    min-height: 62px;
    padding-left: 14px;
  }

  .kiki-dialog-actions {
    gap: 6px;
  }

  .kiki-dialog-actions > a {
    min-height: 36px;
  }

  .kiki-dialog-resizer {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
