/*
 * MolyEye 静态页（/help/ 使用文档、/help/status.html 服务状态）共用外观。
 * 色值与主站 newapi-web/src/styles/theme.css 同一套（见 newapi-web/docs/design.md）。
 * 各页面原有的变量名（--bg/--fg/--brand…）在这里重新赋值，页面结构不用改。
 */
@font-face {
  font-family: 'Sora Variable';
  font-style: normal;
  font-display: swap;
  font-weight: 100 800;
  src: url('/help/sora-latin-wght-normal.woff2') format('woff2-variations');
  unicode-range: U+0000-00FF, U+2000-206F, U+20AC, U+2122, U+2212;
}

:root {
  --bg: #fafafd;
  --fg: #17192b;
  --muted: #5f6275;
  --card: #ffffff;
  --line: #e2e3ec;
  --brand: #4f46e5;
  --brand-2: #0ea5e9;
  --brand-bg: #eeedfd;
  --warn-bg: #fff6e8;
  --warn: #b45309;
  --code: #efeff8;
  --pre: #191838;
  --pre-fg: #e4e3f5;
  --me: #4f46e5;
  --bot: #f0f0f8;
  --ok: #059669;
  --ok-bg: #e2f6ee;
  --deg: #b45309;
  --deg-bg: #fdf1dc;
  --down: #dc2626;
  --down-bg: #fde8e8;
  --mt: #6b6b85;
  --mt-bg: #efeff6;
  --empty: #e6e6f0;
  --glass-bg: rgba(255, 255, 255, 0.7);
  --glass-line: rgba(255, 255, 255, 0.85);
  --shadow: 0 1px 2px rgba(40, 36, 110, 0.05), 0 4px 16px -4px rgba(40, 36, 110, 0.08);
  --aura-1: rgba(129, 120, 236, 0.32);
  --aura-2: rgba(125, 200, 245, 0.4);
  --aura-3: rgba(196, 165, 245, 0.25);
  --gradient: linear-gradient(135deg, #4f46e5 0%, #2f78e7 55%, #0ea5e9 100%);
  --bead-lemon: #f7d94c;
  --bead-peach: #f6a27e;
  --bead-ink: #2a2650;
  --bead-hole: rgba(255, 255, 255, 0.75);
}
:root.dark {
  --bg: #0e0f1d;
  --fg: #eff0f6;
  --muted: #a7a9bb;
  --card: #1a1a35;
  --line: rgba(199, 203, 239, 0.12);
  --brand: #8b8bff;
  --brand-2: #5ec4f2;
  --brand-bg: #24234d;
  --warn-bg: #3a2610;
  --warn: #fbbf6b;
  --code: #26264a;
  --pre: #0d0d22;
  --pre-fg: #e4e3f5;
  --me: #4f46e5;
  --bot: #26264a;
  --ok: #4ade9a;
  --ok-bg: #12382b;
  --deg: #fbbf24;
  --deg-bg: #3d2a08;
  --down: #f87171;
  --down-bg: #3f1218;
  --mt: #a9a9c4;
  --mt-bg: #26264a;
  --empty: #2a2a4c;
  --glass-bg: rgba(26, 26, 53, 0.66);
  --glass-line: rgba(200, 200, 255, 0.1);
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 6px 20px -6px rgba(0, 0, 0, 0.45);
  --aura-1: rgba(79, 70, 229, 0.3);
  --aura-2: rgba(14, 165, 233, 0.16);
  --aura-3: rgba(139, 92, 246, 0.16);
  --gradient: linear-gradient(135deg, #5149e0 0%, #3b6fdc 55%, #1789c4 100%);
  --bead-lemon: #ead35a;
  --bead-peach: #e89b7c;
  --bead-ink: #1c1a3a;
  --bead-hole: rgba(18, 18, 42, 0.55);
}

html {
  background: var(--bg);
}
/* 固定页头 56px + 距顶 12px，锚点跳转时留出位置，别盖住小节第一行 */
[id] {
  scroll-margin-top: 84px;
}
body {
  background: transparent !important;
  font-family: 'Public Sans Variable', -apple-system, 'Segoe UI', 'PingFang SC',
    'HarmonyOS Sans SC', 'Microsoft YaHei UI', 'Microsoft YaHei', 'Noto Sans SC',
    sans-serif !important;
}
/* 背景光斑，与主站公开页一致 */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(60vmax 45vmax at 12% -8%, var(--aura-1), transparent 62%),
    radial-gradient(50vmax 40vmax at 100% 6%, var(--aura-2), transparent 60%),
    radial-gradient(48vmax 38vmax at 70% 108%, var(--aura-3), transparent 60%);
}

/* 顶栏：照主站 public-header.tsx（毛玻璃胶囊、滚动收窄、<1024px 折叠成全屏菜单），结构见 molyeye-header.js。
 * 色值从线上 molyeye.com 取的计算值（2026-10-06）。 */
:root {
  --mh-fg: #17192b;
  --mh-muted: #5f6275;
  --mh-bg: #fafafd;
  --mh-glass: rgba(255, 255, 255, 0.68);
  --mh-glass-line: rgba(255, 255, 255, 0.8);
  --mh-shadow: 0 1px 2px rgba(37, 40, 85, 0.05), 0 4px 16px -4px rgba(37, 40, 85, 0.08);
  --mh-shadow-float: 0 2px 4px rgba(37, 40, 85, 0.05), 0 24px 48px -16px rgba(46, 43, 129, 0.22);
  --mh-active: rgba(23, 25, 43, 0.06);
  --mh-sep: rgba(226, 227, 236, 0.4);
  --mh-arcade: #ffc744;
  --mh-arcade-fg: #1e1b4e;
  --mh-arcade-edge: rgb(113, 87, 25);
  --mh-pop: #ffffff;
  --mh-pop-line: #e2e3ec;
}
:root.dark {
  --mh-fg: #eff0f6;
  --mh-muted: #a7a9bb;
  --mh-bg: #0e0f1d;
  --mh-glass: rgba(23, 25, 43, 0.62);
  --mh-glass-line: rgba(215, 219, 255, 0.1);
  --mh-shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 6px 20px -6px rgba(0, 0, 0, 0.45);
  --mh-shadow-float: 0 2px 6px rgba(0, 0, 0, 0.35), 0 30px 60px -20px rgba(3, 0, 26, 0.8);
  --mh-active: rgba(239, 240, 246, 0.06);
  --mh-sep: rgba(199, 203, 239, 0.05);
  --mh-arcade: #ffcf2e;
  --mh-arcade-fg: #16143a;
  --mh-arcade-edge: rgb(117, 91, 14);
  --mh-pop: #17192b;
  --mh-pop-line: rgba(199, 203, 239, 0.12);
}
body {
  padding-top: 76px;
}
.mh,
.mh-overlay,
.mh-menu,
.mh-pop {
  font-family: 'Public Sans Variable', 'Public Sans', 'PingFang SC', 'HarmonyOS Sans SC', MiSans, 'Microsoft YaHei UI',
    'Microsoft YaHei', 'Noto Sans SC', 'Source Han Sans SC', sans-serif;
}
.mh {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  pointer-events: none;
}
.mh-wrap {
  pointer-events: auto;
  max-width: 1152px;
  margin: 0 auto;
  padding: 12px 16px 0;
  transition: max-width 0.7s cubic-bezier(0.16, 1, 0.3, 1), padding 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}
.mh-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  height: 56px;
  padding: 0 8px 0 16px;
  border-radius: 25.2px;
  background: var(--mh-glass);
  border: 1px solid var(--mh-glass-line);
  box-shadow: var(--mh-shadow);
  -webkit-backdrop-filter: blur(18px) saturate(1.6);
  backdrop-filter: blur(18px) saturate(1.6);
  transition: height 0.7s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}
.mh.scrolled .mh-wrap {
  max-width: 1024px;
  padding: 10px 12px 0;
}
.mh.scrolled .mh-bar {
  height: 52px;
  box-shadow: var(--mh-shadow-float);
}
.mh-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  color: var(--mh-fg);
  text-decoration: none;
}
.mh-mark {
  width: 28px;
  height: 28px;
  flex: none;
  transition: transform 0.3s;
}
.mh-brand:hover .mh-mark {
  transform: scale(1.05);
}
.mh-name {
  font: 600 15px/1 'Sora Variable', 'PingFang SC', 'HarmonyOS Sans SC', MiSans, 'Microsoft YaHei UI', 'Microsoft YaHei', 'Noto Sans SC', sans-serif;
  letter-spacing: -0.025em;
  white-space: nowrap;
}
.mh-name span {
  margin-left: 4px;
  font-weight: 500;
  color: var(--mh-muted);
}
.mh-desk,
.mh-mob {
  display: flex;
  align-items: center;
}
.mh-desk {
  gap: 2px;
}
.mh-mob {
  display: none;
  gap: 8px;
}
.mh-link {
  position: relative;
  padding: 6px 12px;
  border-radius: 14px;
  font-size: 14px;
  font-weight: 500;
  line-height: 20px;
  color: var(--mh-muted);
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.2s;
}
.mh-link:hover {
  color: var(--mh-fg);
}
.mh-link.on {
  color: var(--mh-fg);
  background: var(--mh-active);
}
.mh-link.on::after {
  content: '';
  position: absolute;
  bottom: 2px;
  left: 50%;
  width: 4px;
  height: 4px;
  transform: translateX(-50%);
  border-radius: 1px;
  background: var(--mh-arcade);
}
.mh-sep {
  width: 1px;
  height: 16px;
  margin: 0 8px;
  background: var(--mh-sep);
}
.mh-sep-sm {
  margin: 0 4px;
}
.mh-icon {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 14px;
  background: transparent;
  color: var(--mh-fg);
  cursor: pointer;
}
.mh-icon:hover {
  background: var(--mh-active);
}
.mh-icon svg {
  width: 19.2px;
  height: 19.2px;
}
.mh-theme span {
  position: absolute;
  display: inline-flex;
  transition: transform 0.3s, opacity 0.3s;
}
.mh-theme .moon {
  transform: rotate(90deg) scale(0);
  opacity: 0;
}
:root.dark .mh-theme .sun {
  transform: rotate(-90deg) scale(0);
  opacity: 0;
}
:root.dark .mh-theme .moon {
  transform: none;
  opacity: 1;
}
.mh-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 20px;
  height: 20px;
  padding: 0 4px;
  border-radius: 999px;
  background: rgba(224, 41, 41, 0.1);
  color: #dc2626;
  font-size: 10px;
  font-weight: 600;
  line-height: 20px;
  text-align: center;
}
:root.dark .mh-badge {
  background: rgba(250, 95, 100, 0.2);
  color: #fb5f64;
}
.mh-badge[hidden] {
  display: none;
}
.mh-signin {
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 500;
  color: var(--mh-muted);
  text-decoration: none;
  white-space: nowrap;
}
.mh-signin:hover {
  color: var(--mh-fg);
}
.mh-arcade {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 36px;
  padding: 0 16px;
  margin-left: 6px;
  border-radius: 999px;
  background: var(--mh-arcade);
  color: var(--mh-arcade-fg);
  box-shadow: 0 3px 0 var(--mh-arcade-edge);
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
  transition: transform 0.12s, box-shadow 0.12s;
}
.mh-arcade:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 0 var(--mh-arcade-edge);
}
.mh-arcade:active {
  transform: translateY(2px);
  box-shadow: 0 1px 0 var(--mh-arcade-edge);
}
.mh-arcade-sm {
  height: 32px;
  padding: 0 14px;
  margin: 0;
  font-size: 13px;
}
.mh-arcade-lg {
  height: 48px;
  margin: 0;
  font-size: 15px;
}
.mh-burger span {
  position: absolute;
  left: 10px;
  right: 10px;
  height: 1.5px;
  border-radius: 999px;
  background: currentColor;
  transition: all 0.3s;
}
.mh-burger span:nth-child(1) {
  top: 13px;
}
.mh-burger span:nth-child(2) {
  top: 17px;
}
.mh-burger span:nth-child(3) {
  top: 21px;
}
.mh.menu-open .mh-burger span:nth-child(1) {
  top: 17px;
  transform: rotate(45deg);
}
.mh.menu-open .mh-burger span:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}
.mh.menu-open .mh-burger span:nth-child(3) {
  top: 17px;
  transform: rotate(-45deg);
}
.mh-overlay {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: none;
  flex-direction: column;
  justify-content: space-between;
  padding: 80px 32px 40px;
  background: color-mix(in srgb, var(--mh-bg) 98%, transparent);
  -webkit-backdrop-filter: blur(40px);
  backdrop-filter: blur(40px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}
.mh-overlay.open {
  opacity: 1;
  pointer-events: auto;
}
.mh-olinks {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.mh-olink {
  display: block;
  padding: 12px 0;
  line-height: 24px;
  font-size: 16px;
  font-weight: 500;
  letter-spacing: -0.025em;
  color: var(--mh-muted);
  text-decoration: none;
  transform: translateY(16px);
  opacity: 0;
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}
.mh-olink.on {
  color: var(--mh-fg);
}
.mh-overlay.open .mh-olink {
  transform: none;
  opacity: 1;
}
.mh-overlay.open .mh-olink:nth-child(2) { transition-delay: 0.05s; }
.mh-overlay.open .mh-olink:nth-child(3) { transition-delay: 0.1s; }
.mh-overlay.open .mh-olink:nth-child(4) { transition-delay: 0.15s; }
.mh-overlay.open .mh-olink:nth-child(5) { transition-delay: 0.2s; }
.mh-menu,
.mh-pop {
  position: fixed;
  z-index: 60;
  padding: 4px;
  border: 1px solid var(--mh-pop-line);
  border-radius: 14px;
  background: var(--mh-pop);
  color: var(--mh-fg);
  box-shadow: var(--mh-shadow-float);
}
.mh-menu[hidden],
.mh-pop[hidden] {
  display: none;
}
.mh-menu {
  min-width: 128px;
}
.mh-menu button {
  display: flex;
  align-items: center;
  width: 100%;
  gap: 8px;
  padding: 6px 8px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: inherit;
  font: inherit;
  font-size: 14px;
  text-align: left;
  cursor: pointer;
}
.mh-menu button:hover {
  background: var(--mh-active);
}
.mh-check {
  margin-left: auto;
  display: inline-flex;
  visibility: hidden;
}
.mh-check svg {
  width: 14px;
  height: 14px;
}
.mh-menu button.sel .mh-check {
  visibility: visible;
}
.mh-pop {
  width: min(360px, calc(100vw - 16px));
  padding: 8px;
}
.mh-tabs {
  display: flex;
  gap: 4px;
  padding: 3px;
  margin-bottom: 8px;
  border-radius: 12px;
  background: var(--mh-active);
}
.mh-tabs button {
  flex: 1;
  padding: 5px 0;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--mh-muted);
  font: inherit;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
}
.mh-tabs button.on {
  background: var(--mh-pop);
  color: var(--mh-fg);
  box-shadow: var(--mh-shadow);
}
.mh-pop-body {
  max-height: 320px;
  overflow: auto;
  padding: 4px 6px;
  font-size: 13.5px;
  line-height: 1.7;
}
.mh-pop-body p {
  margin: 0;
  font-weight: 400;
  white-space: pre-wrap;
}
.mh-ann + .mh-ann {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--mh-pop-line);
}
.mh-ann time,
.mh-empty {
  font-size: 12px;
  color: var(--mh-muted);
}
@media (max-width: 1023.98px) {
  .mh-desk {
    display: none;
  }
  .mh-mob {
    display: flex;
  }
  .mh-overlay {
    display: flex;
  }
}
@media (max-width: 639.98px) {
  .mh-wrap,
  .mh.scrolled .mh-wrap {
    padding-left: 12px;
    padding-right: 12px;
  }
}

/* 版式：标题用展示字，正文卡片化 */
.wrap {
  max-width: 880px !important;
  padding-top: 12px !important;
}
h1 {
  font-family: 'Sora Variable', 'PingFang SC', 'Microsoft YaHei UI', sans-serif;
  font-size: 32px !important;
  letter-spacing: -0.02em;
  margin: 36px 0 6px !important;
}
h2 {
  font-family: 'Sora Variable', 'PingFang SC', 'Microsoft YaHei UI', sans-serif;
  letter-spacing: -0.01em;
}
.box,
.card,
#chat,
.pane {
  background: var(--card);
  border-color: var(--line) !important;
  box-shadow: var(--shadow);
}
.box,
#chat {
  border-radius: 16px !important;
}
.card {
  border-radius: 16px !important;
}
.tip {
  background: var(--brand-bg) !important;
  box-shadow: none;
}
.warn {
  background: var(--warn-bg) !important;
  box-shadow: none;
}
.tabs button.on,
#send {
  background: var(--gradient) !important;
  border-color: transparent !important;
}
.steps > li::before {
  background: var(--gradient) !important;
}
.banner {
  border-radius: 16px !important;
}
pre,
.pre pre {
  border-radius: 12px !important;
}
.me-foot {
  margin-top: 56px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px;
  font-size: 12.5px;
  color: var(--muted);
}
.me-foot a {
  color: var(--muted);
  text-decoration: none;
  margin-left: 14px;
}
.me-foot a:hover {
  color: var(--fg);
}

/* 状态页「全部正常」：拼豆开心脸（见 newapi-web-public/docs/design.md「像素与拼豆」） */
.me-ok {
  display: flex;
  align-items: center;
  gap: 12px;
}
.me-happy {
  flex: none;
  image-rendering: pixelated;
}
