/* Galaxis · Agent 接入文档
   One shared presentation layer for the catalog and both tutorials. */
:root {
  color-scheme: light;
  --ink: #252633;
  --muted: #767582;
  --body-ink: #4d4f5f;
  --accent: #6355a4;
  --line: rgba(67, 55, 95, .10);
  --surface: rgba(255, 255, 255, .84);
  --shadow: 0 18px 60px rgba(57, 41, 86, .035), 0 2px 6px rgba(57, 41, 86, .025);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  font-synthesis: none;
}

* { box-sizing: border-box; }
html { min-height: 100%; scroll-behavior: smooth; scroll-padding-top: 28px; }
body {
  isolation: isolate;
  margin: 0;
  min-width: 280px;
  min-height: 100vh;
  color: var(--ink);
  background: #fcfbf9;
  font-size: 16px;
  line-height: 1.85;
  -webkit-font-smoothing: antialiased;
  overflow-wrap: break-word;
}
::selection { color: #33265c; background: #e7e1f6; }
a { color: var(--accent); text-underline-offset: 4px; }
a:focus-visible { outline: 3px solid #8e7bc2; outline-offset: 6px; border-radius: 4px; }
button, a { -webkit-tap-highlight-color: transparent; }
img { max-width: 100%; }

.ambient {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
  background: linear-gradient(165deg, #faf9fd 0%, #fcfbf9 56%, #fbfaf6 100%);
}
.glow {
  position: absolute;
  display: block;
  width: min(74vw, 960px);
  aspect-ratio: 1;
  border-radius: 50%;
  will-change: transform, opacity;
  animation: ambient-breathe 16s ease-in-out infinite alternate;
}
.glow-one {
  top: -52%;
  right: -16%;
  background: radial-gradient(circle, rgba(194, 179, 241, .26) 0%, rgba(205, 193, 242, .12) 42%, transparent 72%);
}
.glow-two {
  width: min(70vw, 880px);
  top: 16%;
  left: -32%;
  background: radial-gradient(circle, rgba(248, 214, 193, .26) 0%, rgba(250, 225, 202, .10) 43%, transparent 72%);
  animation-duration: 18s;
  animation-delay: -7s;
}
.glow-three {
  width: min(76vw, 980px);
  bottom: -64%;
  right: 2%;
  background: radial-gradient(circle, rgba(183, 220, 216, .23) 0%, rgba(218, 235, 222, .10) 43%, transparent 72%);
  animation-duration: 14s;
  animation-delay: -5s;
}
@keyframes ambient-breathe {
  from { transform: translate3d(0, 0, 0) scale(.96); opacity: .70; }
  to { transform: translate3d(18px, 20px, 0) scale(1.08); opacity: 1; }
}

.site-shell { width: min(1120px, calc(100% - 96px)); margin: 0 auto; }
.site-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 100px;
  border-bottom: 1px solid var(--line);
}
.brand-link {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  color: var(--ink);
  font-size: 16px;
  font-weight: 650;
  letter-spacing: .15em;
  text-decoration: none;
}
.brand-dot {
  flex: none;
  display: inline-block;
  width: 12px;
  height: 12px;
  border: 3px solid #8170b3;
  border-radius: 50%;
  box-shadow: 0 0 0 4px rgba(143, 120, 187, .08);
}
.topbar-link {
  color: #656471;
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  transition: color .2s ease;
}
.topbar-link:hover { color: var(--accent); }

.catalog { padding: 77px 0 54px; }
.eyebrow, .document-eyebrow {
  margin: 0 0 16px;
  color: #898195;
  font-size: 11px;
  font-weight: 650;
  letter-spacing: .2em;
  line-height: 1.5;
  text-transform: uppercase;
}
.hero { max-width: 720px; }
.hero h1 {
  margin: 0;
  color: #272331;
  font-size: clamp(34px, 4.5vw, 48px);
  font-weight: 660;
  letter-spacing: -.055em;
  line-height: 1.32;
}
.hero-lead {
  max-width: 570px;
  margin: 22px 0 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.95;
}
.catalog-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
  margin-top: 47px;
}
.tutorial-card {
  position: relative;
  display: flex;
  min-width: 0;
  flex-direction: column;
  padding: 32px 34px 29px;
  overflow: hidden;
  border: 1px solid rgba(87, 71, 115, .11);
  border-radius: 24px;
  color: inherit;
  background: var(--surface);
  box-shadow: var(--shadow);
  text-decoration: none;
  transition: transform .25s ease, border-color .25s ease, box-shadow .25s ease;
}
.tutorial-card.codex { background: linear-gradient(145deg, rgba(250, 249, 255, .9), rgba(255, 255, 255, .93) 50%); }
.tutorial-card.claude { background: linear-gradient(145deg, rgba(255, 248, 243, .9), rgba(255, 255, 255, .93) 50%); }
.tutorial-card:hover {
  transform: translateY(-4px);
  border-color: rgba(120, 96, 162, .25);
  box-shadow: 0 24px 60px rgba(57, 41, 86, .07), 0 2px 8px rgba(57, 41, 86, .03);
}
.card-top { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 25px; }
.platform-icon {
  display: block;
  flex: none;
  width: 80px;
  height: 80px;
  object-fit: contain;
  border-radius: 19px;
}
.card-kicker { color: #8b8594; font-size: 10px; font-weight: 600; letter-spacing: .15em; text-transform: uppercase; }
.tutorial-card h2 { margin: 0 0 13px; font-size: 24px; font-weight: 630; line-height: 1.45; letter-spacing: -.035em; }
.tutorial-card p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.95; }
.card-tags { display: flex; flex-wrap: wrap; gap: 7px; margin: 23px 0 28px; }
.card-tags span {
  padding: 3px 10px;
  border: 1px solid rgba(108, 95, 137, .08);
  border-radius: 7px;
  color: #7b738b;
  background: rgba(239, 235, 245, .40);
  font-size: 11px;
  line-height: 1.8;
}
.claude .card-tags span { color: #957568; border-color: rgba(165, 122, 98, .08); background: rgba(249, 238, 229, .52); }
.card-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: auto;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  color: #665489;
  font-size: 13px;
  font-weight: 600;
}
.claude .card-link { color: #9e735f; }
.catalog-note { margin: 29px 0 0; color: #97919d; font-size: 12px; text-align: center; }
.catalog-note a { color: inherit; }

.document { max-width: 922px; margin: 0 auto; padding: 36px 0 52px; }
.breadcrumb { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 34px; color: #938b9c; font-size: 12px; line-height: 1.6; }
.breadcrumb a { color: #78717f; text-decoration: none; }
.breadcrumb a:hover { color: var(--accent); }
.document-header { position: relative; padding: 3px 0 35px; }
.document-icon { display: block; width: 80px; height: 80px; margin: 0 0 23px; border-radius: 19px; object-fit: contain; }
.document-eyebrow { margin-bottom: 12px; }
.document-header h1 { margin: 0; font-size: clamp(29px, 3.6vw, 39px); font-weight: 660; line-height: 1.4; letter-spacing: -.045em; }
.document-header > p:last-child:not(.document-eyebrow) { max-width: 680px; margin: 16px 0 0; color: var(--muted); font-size: 15px; line-height: 1.95; }
.article-content {
  padding: 46px 60px 52px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(255, 255, 255, .91);
  box-shadow: var(--shadow);
  color: var(--body-ink);
  line-height: 1.95;
}
.article-content > :first-child { margin-top: 0; }
.article-content > :last-child { margin-bottom: 0; }
.article-content h1, .article-content h2, .article-content h3, .article-content h4 { color: #2e2939; line-height: 1.6; }
.article-content h1 { margin: 0 0 24px; font-size: 31px; letter-spacing: -.04em; }
.article-content h2 { margin: 54px 0 22px; padding-top: 32px; border-top: 1px solid var(--line); font-size: 24px; font-weight: 630; letter-spacing: -.035em; }
.article-content > h2:first-child { padding-top: 0; border-top: 0; }
.article-content h3 { margin: 34px 0 15px; font-size: 19px; font-weight: 620; letter-spacing: -.025em; }
.article-content h4 { margin: 26px 0 12px; font-size: 16px; }
.article-content p { margin: 16px 0; }
.article-content strong { color: #3d354d; font-weight: 630; }
.article-content a { text-decoration-thickness: 1px; }
.article-content a:hover { color: #47316f; }
.article-content ul, .article-content ol { margin: 16px 0 22px; padding-left: 25px; }
.article-content li { margin: 7px 0; padding-left: 3px; }
.article-content li::marker { color: #8c79a8; }
.article-content li > p { margin: 7px 0; }
.article-content blockquote {
  margin: 24px 0;
  padding: 16px 22px;
  border-left: 3px solid #baa8d2;
  border-radius: 0 10px 10px 0;
  background: #f8f5fb;
  color: #6b5f7d;
  font-size: 14px;
}
.article-content blockquote > :first-child { margin-top: 0; }
.article-content blockquote > :last-child { margin-bottom: 0; }
.article-content code { font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace; font-size: .86em; }
.article-content :not(pre) > code { padding: 3px 6px; border: 1px solid #ede8f2; border-radius: 5px; background: #f7f4fa; color: #69557c; overflow-wrap: anywhere; }
.article-content pre {
  max-width: 100%;
  margin: 22px 0 27px;
  padding: 22px 24px;
  overflow: auto;
  border: 1px solid #302c3d;
  border-radius: 14px;
  background: #282532;
  color: #ece8f2;
  font-size: 14px;
  line-height: 1.8;
  tab-size: 2;
  scrollbar-width: thin;
  scrollbar-color: #71627f #282532;
}
.article-content pre code { padding: 0; border: 0; border-radius: 0; background: none; color: inherit; font-size: .91em; overflow-wrap: normal; }
.article-content table { display: block; width: 100%; margin: 24px 0; overflow-x: auto; border-collapse: collapse; border-spacing: 0; font-size: 14px; }
.article-content th, .article-content td { padding: 12px 15px; border-bottom: 1px solid #ece9ef; text-align: left; vertical-align: top; }
.article-content th { background: #f8f6fa; color: #5b4d6b; font-size: 13px; font-weight: 600; white-space: nowrap; }
.article-content table code { white-space: normal; }
.article-content figure { margin: 26px 0 36px; }
.article-content figure a { display: block; }
.article-content figure img, .article-content > p > img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid #e7e2eb;
  border-radius: 13px;
  background: #faf9fc;
  box-shadow: 0 8px 25px rgba(43, 26, 68, .04);
}
.article-content figcaption { margin: 12px 5px 0; color: #938999; font-size: 12px; line-height: 1.8; text-align: center; }
.article-content hr { height: 1px; margin: 35px 0; border: 0; background: var(--line); }
.page-nav { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px; margin-top: 24px; padding: 16px 3px 0; color: #7f7589; font-size: 13px; }
.page-nav a { color: #7c6b91; text-decoration: none; }
.page-nav a:hover { color: #4e386d; }

@media (min-width: 1500px) {
  .catalog { padding-top: 98px; }
  .catalog-grid { margin-top: 54px; }
}
@media (max-width: 900px) {
  .site-shell { width: calc(100% - 56px); }
  .catalog { padding-top: 58px; }
  .tutorial-card { padding: 27px 26px 25px; }
  .card-top { gap: 10px; }
  .card-kicker { font-size: 9px; letter-spacing: .08em; }
  .article-content { padding: 34px 36px 42px; }
}
@media (max-width: 640px) {
  body { font-size: 15px; }
  .site-shell { width: calc(100% - 40px); }
  .site-topbar { min-height: 78px; gap: 14px; }
  .brand-link { gap: 9px; font-size: 14px; }
  .topbar-link { font-size: 12px; }
  .catalog { padding: 45px 0 34px; }
  .eyebrow { margin-bottom: 14px; font-size: 10px; }
  .hero h1 { font-size: 34px; }
  .hero-lead { margin-top: 18px; font-size: 14px; }
  .catalog-grid { grid-template-columns: minmax(0, 1fr); gap: 18px; margin-top: 31px; }
  .tutorial-card { padding: 26px; border-radius: 21px; }
  .card-top { margin-bottom: 20px; }
  .platform-icon { width: 72px; height: 72px; border-radius: 17px; }
  .card-kicker { font-size: 10px; letter-spacing: .13em; }
  .tutorial-card h2 { font-size: 23px; }
  .card-tags { margin: 20px 0 24px; }
  .catalog-note { margin-top: 23px; font-size: 11px; }
  .document { padding: 25px 0 32px; }
  .breadcrumb { gap: 7px; margin-bottom: 29px; font-size: 11px; }
  .document-header { padding-bottom: 28px; }
  .document-icon { width: 72px; height: 72px; margin-bottom: 20px; border-radius: 17px; }
  .document-header h1 { font-size: 29px; }
  .document-header > p:last-child:not(.document-eyebrow) { font-size: 14px; }
  .article-content { padding: 28px 22px 32px; border-radius: 18px; font-size: 14px; }
  .article-content h2 { margin-top: 40px; padding-top: 26px; font-size: 21px; }
  .article-content h3 { margin-top: 29px; font-size: 17px; }
  .article-content h4 { font-size: 15px; }
  .article-content pre { margin: 19px 0 23px; padding: 17px; border-radius: 11px; font-size: 13px; }
  .article-content blockquote { padding: 13px 15px; font-size: 13px; }
  .article-content ul, .article-content ol { padding-left: 21px; }
  .article-content figure { margin: 23px 0 29px; }
  .article-content figure img { border-radius: 9px; }
  .article-content figcaption { margin-top: 10px; font-size: 11px; }
  .article-content th, .article-content td { padding: 10px 12px; font-size: 12px; }
  .page-nav { gap: 12px; margin-top: 18px; font-size: 12px; }
  .glow { width: 120vw; }
  .glow-one { top: -13%; right: -52%; }
  .glow-two { top: 22%; left: -80%; }
  .glow-three { bottom: -23%; right: -46%; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .glow { animation: none; will-change: auto; opacity: .8; }
  .tutorial-card, .topbar-link { transition: none; }
  .tutorial-card:hover { transform: none; }
}
@media print {
  body { color: #000; background: #fff; }
  .ambient, .site-topbar, .page-nav { display: none; }
  .site-shell { width: 100%; }
  .document { max-width: none; padding: 0; }
  .article-content { padding: 0; border: 0; border-radius: 0; background: #fff; box-shadow: none; }
  .article-content pre { white-space: pre-wrap; overflow-wrap: anywhere; color: #222; background: #f3f3f3; border-color: #ddd; }
  .article-content figure { break-inside: avoid; }
  .article-content h2, .article-content h3 { break-after: avoid; }
}

/* Shared header refinements. */
.brand-caption { color: #7e7788; font-size: 12px; font-weight: 500; letter-spacing: .03em; }
.hero h1 > span { color: #736397; }
.eyebrow > span { display: inline-block; width: 6px; height: 6px; margin-right: 10px; border-radius: 50%; background: #a59ac1; vertical-align: 1px; }
.site-footer { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; margin: 0 0 28px; padding-top: 20px; border-top: 1px solid var(--line); color: #8e8598; font-size: 10px; letter-spacing: .13em; }
.site-footer span { font-size: 11px; letter-spacing: .04em; }
.table-scroll { max-width: 100%; overflow: auto; }
.document-header { display: flex; align-items: center; gap: 25px; }
.document-icon { flex: none; margin: 0; }
.document-header > div { min-width: 0; }
.document-header h1 { font-size: clamp(26px, 3.2vw, 35px); }
.glow-one { background: radial-gradient(circle, rgba(194, 179, 241, .36) 0%, rgba(205, 193, 242, .15) 42%, transparent 72%); }
.glow-two { background: radial-gradient(circle, rgba(248, 214, 193, .34) 0%, rgba(250, 225, 202, .14) 43%, transparent 72%); }
@media (max-width: 640px) {
  .brand-caption { font-size: 10px; }
  .document-header { align-items: flex-start; gap: 16px; }
  .document-header h1 { font-size: 25px; }
  .document-eyebrow { margin: 0 0 9px; font-size: 9px; }
  .document-icon { width: 64px; height: 64px; border-radius: 15px; }
}
@media (max-width: 360px) { .brand-caption { display: none; } }
@media print { .site-footer { display: none; } }
.document-header h1 { text-wrap: balance; }
