/* ==========================================================================
   FurryBox — 设计系统
   --------------------------------------------------------------------------
   参考 yunamo.com 的设计语言（不是照抄配色，而是同一套做法）：
     · 深黑实色底 + 实色卡片分层，不用半透明玻璃
     · 1px 极细描边，靠 line 色区分层次
     · 单一强调色（薄荷绿），不用渐变
     · 等宽字体用于域名与数值
     · 圆角分层：10 / 16 / 20

   三个站点（www / id / my）共用。
   ========================================================================== */

/* 字体：Geist / Geist Mono 本地自托管（latin 子集，可变字体）
   Space Grotesk 只用于品牌字 FurryBox
   中文回落到系统字体，不加载中文字体文件 */
/* Geist / Geist Mono — latin 子集，本地自托管（可变字体，单文件覆盖全部字重） */

@font-face {
  font-family: 'Geist';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url(fonts/Geist-400-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'Geist';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url(fonts/Geist-400-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: 'Geist Mono';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url(fonts/GeistMono-400-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'Geist Mono';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url(fonts/GeistMono-400-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* Space Grotesk — 品牌字，latin 子集，本地自托管（可变字体） */

@font-face {
  font-family: 'Space Grotesk';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url(fonts/SpaceGrotesk-400-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'Space Grotesk';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url(fonts/SpaceGrotesk-400-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}


:root {
  /* ---- 底色与面 ---- */
  --bg: #0a0b0d;
  --surface: #111316;
  --surface-2: #1a1d21;
  --surface-3: #22262b;

  /* ---- 线 ---- */
  --line: #22262b;
  --line-strong: #2a2e35;

  /* ---- 文字 ---- */
  --text: #ededed;
  --muted: #9aa0a8;
  --faint: #6b7179;

  /* ---- 强调色 ---- */
  --mint: #3ee6b4;
  --mint-deep: #0b8f6a;
  --mint-text: #3ee6b4;
  --on-mint: #04110c;

  /* ---- 状态 ---- */
  --ok: #3ee6b4;
  --warn: #f2c14e;
  --danger: #ff5a52;
  --danger-text: #ff8a84;
  --info: #7ab8ff;

  /* ---- 圆角 ---- */
  --r-sm: 10px;
  --r: 16px;
  --r-lg: 20px;
  --r-pill: 9999px;
  --dot-rgb: 255 255 255;

  /* ---- 字体 ---- */
  --font-sans: "Geist", -apple-system, BlinkMacSystemFont, "Segoe UI",
    "PingFang SC", "Microsoft YaHei UI", "Microsoft YaHei", "Noto Sans SC",
    system-ui, sans-serif;
  --font-mono: "Geist Mono", ui-monospace, "SF Mono", SFMono-Regular, Menlo,
    Consolas, "PingFang SC", "Microsoft YaHei", monospace;
  /* 品牌字：几何感强，用于 FurryBox 字样 */
  --font-brand: "Space Grotesk", "Geist", system-ui, sans-serif;
}

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

* {
  margin: 0;
  padding: 0;
}

html {
  height: 100%;
  color-scheme: dark;
}

body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: "tnum" 1;
}

/* ---------------------------------------------------------------- 背景 */

/* yunamo 控制台几乎纯黑。这里用极淡的径向渐变，不抢内容。 */
.fbx-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(
      ellipse 80% 50% at 50% -10%,
      rgba(62, 230, 180, 0.05),
      transparent 60%
    ),
    radial-gradient(
      ellipse 60% 40% at 90% 100%,
      rgba(122, 184, 255, 0.025),
      transparent 60%
    );
}

/* 噪点极轻，只让纯黑不发死 */
.fbx-noise {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: 0.018;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 220 220' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------------------------------------------------------------- 外壳 */

.fbx-shell {
  position: relative;
  z-index: 2;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 0 clamp(16px, 4vw, 40px) 40px;
}

/* ---------------------------------------------------------------- 顶栏 */

.fbx-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex: none;
  height: 62px;
  border-bottom: 1px solid var(--line);
}

.fbx-brand {
  display: flex;
  align-items: center;
  text-decoration: none;
  color: inherit;
  flex: none;
  font-family: var(--font-brand);
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.038em;
  line-height: 1;
}

.fbx-brand b {
  font-weight: 700;
  color: var(--mint);
}

/* 右侧动作区：扁平，不用浮岛 */
.fbx-island {
  display: flex;
  align-items: center;
  gap: 2px;
}

.fbx-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 11px;
  border-radius: var(--r-sm);
  font-family: inherit;
  font-size: 13px;
  color: var(--muted);
  background: transparent;
  border: 1px solid transparent;
  cursor: pointer;
  white-space: nowrap;
  text-decoration: none;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.fbx-pill:hover {
  background: var(--surface-2);
  color: var(--text);
  border-color: var(--line);
}

.fbx-pill svg {
  width: 15px;
  height: 15px;
  flex: none;
}

.fbx-pill b {
  color: var(--mint-text);
  font-weight: 600;
  font-family: var(--font-mono);
  font-size: 13px;
}

.fbx-island .fbx-sep {
  width: 1px;
  height: 18px;
  background: var(--line);
  margin: 0 6px;
  flex: none;
}

/* ==========================================================================
   语言切换器
   --------------------------------------------------------------------------
   放在顶栏钱包胶囊左边。视觉上与 .fbx-pill 同一套（透明底 + hover 变面）。
   ========================================================================== */

.fbx-lang {
  position: relative;
  display: inline-flex;
  flex: none;
}

/* 各站给切换器预留的挂载点：本身不占空间，只作为定位容器 */
.nav-lang-slot,
.auth-lang-slot {
  display: inline-flex;
  align-items: center;
  flex: none;
}

.fbx-lang-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 10px;
  border-radius: var(--r-sm);
  border: 1px solid transparent;
  background: transparent;
  color: var(--muted);
  font-family: inherit;
  font-size: 13px;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.fbx-lang-btn:hover {
  background: var(--surface-2);
  color: var(--text);
  border-color: var(--line);
}

.fbx-lang-btn svg {
  width: 15px;
  height: 15px;
  flex: none;
}

/* 下拉箭头比地球小一号 */
.fbx-lang-btn svg:last-of-type {
  width: 12px;
  height: 12px;
  opacity: 0.6;
  transition: transform 0.18s var(--ease-out, ease);
}

.fbx-lang-btn[aria-expanded="true"] svg:last-of-type {
  transform: rotate(180deg);
}

.fbx-lang-cur {
  font-size: 12.5px;
  font-weight: 500;
}

/* ---- 菜单 ---- */
.fbx-lang-menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  z-index: 60;
  min-width: 148px;
  padding: 5px;
  border-radius: var(--r-sm);
  border: 1px solid var(--line-strong);
  background: var(--surface-2);
  box-shadow: 0 12px 32px rgb(0 0 0 / 0.5);
  animation: fbx-lang-in 0.14s ease both;
}

@keyframes fbx-lang-in {
  from {
    opacity: 0;
    transform: translateY(-4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fbx-lang-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  padding: 8px 10px;
  border: none;
  border-radius: 7px;
  background: transparent;
  color: var(--muted);
  font-family: inherit;
  font-size: 13px;
  text-align: left;
  cursor: pointer;
  transition: background 0.12s, color 0.12s;
}

.fbx-lang-item:hover {
  background: var(--surface-3);
  color: var(--text);
}

.fbx-lang-item.on {
  color: var(--mint-text);
}

.li-tick {
  font-size: 12px;
  color: var(--mint-text);
}

/* 窄屏只留图标，省空间 */
@media (max-width: 560px) {
  .fbx-lang-cur,
  .fbx-lang-btn svg:last-of-type {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .fbx-lang-menu {
    animation: none;
  }
  .fbx-lang-btn svg:last-of-type {
    transition: none;
  }
}

.fbx-avatar {
  width: 26px;
  height: 26px;
  border-radius: 7px;
  background: var(--surface-3);
  display: grid;
  place-items: center;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--mint-text);
  border: 1px solid var(--line);
  flex: none;
}

/* ---------------------------------------------------------------- 按钮 */

.fbx-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 9px 16px;
  border-radius: var(--r-sm);
  border: 1px solid transparent;
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
  white-space: nowrap;
  text-decoration: none;
  color: var(--text);
}

.fbx-btn svg {
  width: 15px;
  height: 15px;
  flex: none;
}

.fbx-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

/* 主按钮 = yunamo 的 .y-btn-ink-block：反色白胶囊，不是薄荷绿实心 */
.fbx-btn-primary {
  background: var(--text);
  color: var(--bg);
  border-color: transparent;
  border-radius: 9999px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.fbx-btn-primary:hover:not(:disabled) {
  background: #fff;
  border-color: transparent;
}

.fbx-btn-ghost {
  background: var(--surface);
  border-color: var(--line);
  color: var(--text);
}

.fbx-btn-ghost:hover:not(:disabled) {
  background: var(--surface-2);
  border-color: var(--line-strong);
}

.fbx-btn-quiet {
  background: transparent;
  color: var(--muted);
  padding: 9px 11px;
}

.fbx-btn-quiet:hover:not(:disabled) {
  color: var(--text);
  background: var(--surface-2);
}

.fbx-btn-danger {
  background: transparent;
  color: var(--faint);
}

.fbx-btn-danger:hover:not(:disabled) {
  color: var(--danger-text);
  background: rgba(255, 90, 82, 0.08);
}

/* ---------------------------------------------------------------- 表单 */

.fbx-field {
  display: flex;
  flex-direction: column;
  gap: 7px;
  min-width: 0;
}

.fbx-label {
  font-family: var(--font-mono);
  font-size: 11px;
  line-height: 1;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--faint);
}

.fbx-input,
.fbx-select {
  width: 100%;
  padding: 11px 13px;
  border-radius: var(--r-sm);
  background: var(--bg);
  border: 1px solid var(--line);
  color: var(--text);
  font-family: inherit;
  font-size: 14px;
  outline: none;
  transition: border-color 0.15s, background 0.15s;
}

.fbx-input::placeholder {
  color: var(--faint);
}

.fbx-input:focus,
.fbx-select:focus {
  border-color: var(--mint-deep);
  background: var(--surface);
}

.fbx-input.mono {
  font-family: var(--font-mono);
  font-size: 13px;
}

.fbx-select {
  appearance: none;
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='11' height='11' viewBox='0 0 24 24' fill='none' stroke='%236b7179' stroke-width='2.6' stroke-linecap='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 32px;
}

.fbx-select option {
  background: var(--surface-2);
  color: var(--text);
}

.fbx-hint {
  font-size: 12px;
  color: var(--faint);
  line-height: 1.55;
}

.fbx-hint.error {
  color: var(--danger-text);
}

.fbx-hint.ok {
  color: var(--mint-text);
}

/* ---------------------------------------------------------------- 状态 */

.fbx-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  white-space: nowrap;
}

.fbx-status .fbx-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex: none;
}

.fbx-status.ok {
  color: var(--mint-text);
}
.fbx-status.ok .fbx-dot {
  background: var(--mint);
  box-shadow: 0 0 10px rgba(62, 230, 180, 0.7);
}

.fbx-status.warn {
  color: var(--warn);
}
.fbx-status.warn .fbx-dot {
  background: var(--warn);
  box-shadow: 0 0 10px rgba(242, 193, 78, 0.6);
}

.fbx-status.bad {
  color: var(--danger-text);
}
.fbx-status.bad .fbx-dot {
  background: var(--danger);
  box-shadow: 0 0 10px rgba(255, 90, 82, 0.6);
}

/* ---------------------------------------------------------------- 面板 */

.fbx-panel {
  border-radius: var(--r);
  background: var(--surface);
  border: 1px solid var(--line);
  overflow: hidden;
}

.fbx-tile {
  border-radius: var(--r-lg);
  background: var(--surface);
  border: 1px solid var(--line);
}

/* ---------------------------------------------------------------- 表格 */

.fbx-table {
  width: 100%;
  border-collapse: collapse;
}

.fbx-table thead th {
  text-align: left;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--faint);
  padding: 12px 18px;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}

.fbx-table thead th.r {
  text-align: right;
}

.fbx-table tbody td {
  padding: 13px 18px;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
  font-size: 13.5px;
}

.fbx-table tbody tr:last-child td {
  border-bottom: none;
}

.fbx-table tbody tr {
  transition: background 0.12s;
}

.fbx-table tbody tr:hover {
  background: var(--surface-2);
}

.fbx-table td.r {
  text-align: right;
}

/* ---------------------------------------------------------------- 提示条 */

.fbx-alert {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 15px;
  border-radius: var(--r-sm);
  font-size: 13px;
  line-height: 1.6;
  border: 1px solid;
}

.fbx-alert svg {
  width: 15px;
  height: 15px;
  flex: none;
  margin-top: 2px;
}

.fbx-alert.error {
  background: rgba(255, 90, 82, 0.07);
  border-color: rgba(255, 90, 82, 0.28);
  color: var(--danger-text);
}

.fbx-alert.ok {
  background: rgba(62, 230, 180, 0.06);
  border-color: rgba(62, 230, 180, 0.25);
  color: var(--mint-text);
}

.fbx-alert.info {
  background: var(--surface);
  border-color: var(--line);
  color: var(--muted);
}

.fbx-alert.warn {
  background: rgba(242, 193, 78, 0.06);
  border-color: rgba(242, 193, 78, 0.25);
  color: var(--warn);
}

/* ---------------------------------------------------------------- 加载 */

.fbx-spinner {
  width: 15px;
  height: 15px;
  border-radius: 50%;
  border: 2px solid var(--line-strong);
  border-top-color: var(--mint);
  animation: fbx-spin 0.7s linear infinite;
  flex: none;
}

@keyframes fbx-spin {
  to {
    transform: rotate(360deg);
  }
}

.fbx-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 60px 20px;
  color: var(--faint);
  font-size: 13.5px;
}

/* ---------------------------------------------------------------- 工具 */

.fbx-mono {
  font-family: var(--font-mono);
}

.fbx-sr {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* hidden 属性必须压过组件自身的 display */
[hidden] {
  display: none !important;
}

@media (prefers-reduced-motion: reduce) {
  .fbx-spinner {
    animation: none;
  }
  * {
    transition-duration: 0.01ms !important;
  }
}

/* ==========================================================================
   以下工具类逐项对齐 yunamo.com 的实现
   证据：_rebuild/mirror/assets/index-C8OdA-Aj.css
   ========================================================================== */

/* ---- 点阵背景（登录/控制台用） ---- */
.y-dot-grid {
  position: absolute;
  inset: 0;
  z-index: -20;
  background-image: radial-gradient(rgb(var(--dot-rgb) / 0.07) 1px, transparent 1px);
  background-size: 24px 24px;
  -webkit-mask-image: radial-gradient(ellipse at center, #000 35%, transparent 78%);
  mask-image: radial-gradient(ellipse at center, #000 35%, transparent 78%);
}

/* ---- 中心光晕 ---- */
.y-glow {
  position: absolute;
  z-index: -10;
  background: radial-gradient(closest-side, rgb(62 230 180 / 0.16), transparent);
}

/* ---- 标题 ---- */
.y-headline {
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: -0.045em;
  line-height: 0.92;
  color: var(--text);
}

.y-eyebrow {
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 16px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--mint-text);
}

.y-container {
  margin-inline: auto;
  width: 100%;
  max-width: 1160px;
  padding-inline: 20px;
}

/* ---- 反色胶囊按钮（yunamo 的主 CTA 样式） ---- */
.y-btn-ink-block {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 40px;
  padding-inline: 20px;
  border: none;
  border-radius: 9999px;
  background: var(--text);
  color: var(--bg);
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  transition: box-shadow 0.15s cubic-bezier(0.4, 0, 0.2, 1);
}

.y-btn-ink-block:hover:not(:disabled) {
  box-shadow: 0 0 0 3px rgb(62 230 180 / 0.25);
}

/* ---- 链接瓦片 ---- */
.y-link-tile {
  display: block;
  border-radius: var(--r);
  border: 1px solid var(--line);
  background: var(--surface);
  text-decoration: none;
  color: inherit;
  transition: color 0.15s, background-color 0.15s, border-color 0.15s;
}

/* ---- 小标签 ---- */
.y-label {
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 16px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--faint);
}

/* ---- 活点 ---- */
.y-dot-live {
  display: inline-block;
  width: 8px;
  height: 8px;
  flex-shrink: 0;
  border-radius: 9999px;
  background: var(--mint);
  box-shadow: 0 0 10px rgb(62 230 180 / 0.7);
}

/* ============================================================================
   docs.starryid.com — 文档站样式
   ----------------------------------------------------------------------------
   两栏：左侧目录（固定），右侧正文。
   和 app 站同一套设计变量，保证视觉一致。
   ========================================================================== */

:root {
  --bg: #05060b;
  --surface: #0c0f18;
  --surface-2: #141824;
  --surface-3: #1c2130;

  --line: #1c2130;
  --line-strong: #2a3145;

  --text: #f0f2f7;
  --muted: #a0a8bd;
  --faint: #6e7689;

  --accent: #9db4ff;
  --accent-deep: #4a5fd0;
  --accent-text: #b8c9ff;

  --ok: #4ade80;
  --warn: #f2c14e;
  --danger: #ff5a52;

  --font: "Geist", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  --mono: "Geist Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --font-brand: "Space Grotesk", var(--font);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background-color: var(--bg);
  background-image:
    radial-gradient(900px 560px at 12% -8%, rgba(120, 150, 255, 0.07), transparent 62%);
  background-attachment: fixed;
  color: var(--text);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent-text); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ---------------------------------------------------------------------------
   顶栏
   ------------------------------------------------------------------------- */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 13px 24px;
  border-bottom: 1px solid var(--line);
  background: rgba(5, 6, 11, 0.86);
  backdrop-filter: blur(12px);
  position: sticky;
  top: 0;
  z-index: 40;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--text);
  font-family: var(--font-brand);
  font-size: 15px;
  font-weight: 500;
}
.brand:hover { text-decoration: none; }
.brand svg { color: var(--accent); }
.brand-sub {
  font-family: var(--font);
  font-size: 12px;
  color: var(--faint);
  padding-left: 10px;
  border-left: 1px solid var(--line-strong);
}

.topbar-right { display: flex; align-items: center; gap: 16px; font-size: 13px; }
.topbar-right a { color: var(--muted); }
.topbar-right a:hover { color: var(--text); text-decoration: none; }

/* ---------------------------------------------------------------------------
   布局
   ------------------------------------------------------------------------- */
.layout {
  display: grid;
  grid-template-columns: 232px minmax(0, 1fr);
  gap: 48px;
  max-width: 1180px;
  margin: 0 auto;
  padding: 36px 24px 120px;
}

/* 左侧目录 */
.toc {
  position: sticky;
  top: 76px;
  align-self: start;
  max-height: calc(100vh - 100px);
  overflow-y: auto;
  font-size: 13.5px;
}
.toc::-webkit-scrollbar { width: 5px; }
.toc::-webkit-scrollbar-thumb { background: var(--line-strong); border-radius: 3px; }

.toc-group + .toc-group { margin-top: 22px; }
.toc-head {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--faint);
  margin-bottom: 8px;
}
.toc a {
  display: block;
  padding: 5px 10px;
  border-radius: 6px;
  color: var(--muted);
  border-left: 2px solid transparent;
  margin-left: -2px;
}
.toc a:hover { color: var(--text); background: var(--surface-2); text-decoration: none; }
.toc a.active {
  color: var(--accent-text);
  border-left-color: var(--accent);
  background: rgba(157, 180, 255, 0.07);
}

/* 正文 */
.doc { min-width: 0; max-width: 70ch; }
.doc section { margin-bottom: 52px; scroll-margin-top: 84px; }

.doc h1 {
  font-size: 30px;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin: 0 0 10px;
  line-height: 1.3;
}
.doc > p.lead {
  color: var(--muted);
  font-size: 15px;
  margin: 0 0 44px;
  max-width: 62ch;
}

.doc h2 {
  font-size: 21px;
  font-weight: 600;
  letter-spacing: -0.012em;
  margin: 0 0 14px;
  padding-top: 4px;
}
.doc h3 {
  font-size: 16px;
  font-weight: 600;
  margin: 28px 0 10px;
}
.doc p { margin: 0 0 14px; color: #d3d9e6; }
.doc ul, .doc ol { margin: 0 0 16px; padding-left: 22px; }
.doc li { margin-bottom: 6px; color: #d3d9e6; }

.doc code {
  font-family: var(--mono);
  font-size: 13px;
  background: var(--surface-3);
  padding: 1.5px 6px;
  border-radius: 4px;
  color: var(--accent-text);
  word-break: break-word;
}

.doc pre {
  position: relative;
  background: #080a11;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 16px 18px;
  overflow-x: auto;
  margin: 0 0 18px;
  font-size: 13px;
  line-height: 1.65;
}
.doc pre code {
  background: none;
  padding: 0;
  color: #cdd6e8;
  font-size: 13px;
  word-break: normal;
}

/* 代码块标签页 */
.tabs { margin-bottom: 18px; }
.tab-bar {
  display: flex;
  gap: 2px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 0;
}
.tab-bar button {
  font: inherit;
  font-size: 12.5px;
  padding: 8px 14px;
  background: transparent;
  border: 0;
  border-bottom: 2px solid transparent;
  color: var(--faint);
  cursor: pointer;
  margin-bottom: -1px;
}
.tab-bar button:hover { color: var(--text); }
.tab-bar button.active { color: var(--accent-text); border-bottom-color: var(--accent); }
.tab-panel pre { margin-top: 0; border-top-left-radius: 0; border-top-right-radius: 0; border-top: 0; }
.tab-panel[hidden] { display: none; }

/* 提示框 */
.note {
  display: flex;
  gap: 11px;
  padding: 13px 16px;
  border-radius: 9px;
  border: 1px solid;
  margin: 0 0 18px;
  font-size: 13.5px;
  line-height: 1.65;
}
.note svg { flex: none; margin-top: 2px; }
.note.info { background: #0b1220; border-color: #1d2c45; color: var(--accent-text); }
.note.warn { background: #1a150c; border-color: #4d3d1a; color: #f5d591; }
.note.danger { background: #1a0f11; border-color: #3a2226; color: #ffa9a4; }

/* 表格 */
.doc table {
  width: 100%;
  border-collapse: collapse;
  margin: 0 0 18px;
  font-size: 13.5px;
}
.doc th, .doc td {
  text-align: left;
  padding: 9px 12px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
.doc th {
  color: var(--faint);
  font-weight: 500;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.doc td code { font-size: 12.5px; }

/* 流程步骤 */
.steps { counter-reset: step; margin: 0 0 20px; padding: 0; list-style: none; }
.steps li {
  counter-increment: step;
  position: relative;
  padding-left: 38px;
  margin-bottom: 18px;
  color: #d3d9e6;
}
.steps li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 1px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 12px;
  font-weight: 600;
  background: var(--surface-3);
  border: 1px solid var(--line-strong);
  color: var(--accent-text);
}

/* 语言切换 */
.lang-switch {
  display: inline-flex;
  border: 1px solid var(--line-strong);
  border-radius: 9999px;
  overflow: hidden;
}
.lang-switch button {
  font: inherit;
  font-size: 12px;
  padding: 4px 10px;
  background: transparent;
  border: 0;
  color: var(--faint);
  cursor: pointer;
}
.lang-switch button:hover { color: var(--text); }
.lang-switch button.active { background: var(--surface-3); color: var(--text); }

/* 移动端：目录折叠到顶部 */
@media (max-width: 920px) {
  .layout { grid-template-columns: 1fr; gap: 28px; padding: 24px 18px 90px; }
  .toc {
    position: static;
    max-height: none;
    border-bottom: 1px solid var(--line);
    padding-bottom: 20px;
  }
  .doc h1 { font-size: 25px; }
  .brand-sub { display: none; }
}
