/* ==========================================================================
   网页字体（自托管）
   Switzer：Fontshare / ITF 免费字体许可；IBM Plex Mono：SIL OFL 1.1。
   文件在 assets/fonts/。Plex Mono 按字符区间拆分，页面只用到哪段就只下载哪段。
   font-display: swap：字体没到之前先用系统字体显示，不空白。
   ========================================================================== */
@font-face {
  font-family: "Switzer";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/switzer-400.woff2") format("woff2");
}

@font-face {
  font-family: "Switzer";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("fonts/switzer-500.woff2") format("woff2");
}

@font-face {
  font-family: "Switzer";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("fonts/switzer-600.woff2") format("woff2");
}

@font-face {
  font-family: "IBM Plex Mono";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/ibm-plex-mono-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: "IBM Plex Mono";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/ibm-plex-mono-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: "IBM Plex Mono";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/ibm-plex-mono-400-cyrillic.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

@font-face {
  font-family: "IBM Plex Mono";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/ibm-plex-mono-400-cyrillic-ext.woff2") format("woff2");
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}

@font-face {
  font-family: "IBM Plex Mono";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("fonts/ibm-plex-mono-500-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: "IBM Plex Mono";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("fonts/ibm-plex-mono-500-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: "IBM Plex Mono";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("fonts/ibm-plex-mono-500-cyrillic.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

@font-face {
  font-family: "IBM Plex Mono";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("fonts/ibm-plex-mono-500-cyrillic-ext.woff2") format("woff2");
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}

/* ==========================================================================
   设计变量
   ========================================================================== */
/* 默认（浅色）：乳白底 + 深海军蓝文字 + 浅蓝强调色 */
:root {
  --canvas: #fbf7ee;
  --surface: #fffdf8;
  --surface-2: #f6f1e5;
  --surface-3: #ebe4d4;
  --ink: #12263a;
  --muted: #556474;
  --subtle: #77838f;
  --border-subtle: rgb(18 38 58 / 0.09);
  --border: rgb(18 38 58 / 0.22);
  --border-strong: rgb(18 38 58 / 0.45);
  --header: rgb(251 247 238 / 0.9);
  --soft: rgb(18 38 58 / 0.055);
  --softer: rgb(18 38 58 / 0.025);
  --shadow: rgb(18 38 58 / 0.14);
  --scroll-hint: rgb(18 38 58 / 0.14);

  --accent: #9cd0ff;
  --accent-hover: #b8ddff;
  --accent-fg: #0e2236;
  --accent-ink: #2667a8;
  --accent-strong: #4d97df;
  --accent-soft: rgb(156 208 255 / 0.3);

  --btn-bg: #12263a;
  --btn-fg: #fbf7ee;

  /* 代码块、终端、GPU 卡片等深色面板 */
  --panel: #0f2236;
  --panel-ink: #e6edf4;
  --panel-muted: #9aa9b8;
  --panel-faint: #708399;
  --panel-line: rgb(230 237 244 / 0.12);
  --panel-accent: #9cd0ff;
  --panel-warm: #f1dcae;

  /* 首屏背景：白天照片。--hero-backdrop 取自照片顶部白墙的颜色，用来把墙面向上延展成标题区 */
  --hero-backdrop: #efece7;
  --hero-mist: linear-gradient(180deg, transparent 60%, rgb(251 247 238 / 0.45) 76%, rgb(251 247 238 / 0.86) 90%, #fbf7ee 100%);
  --hero-shade: linear-gradient(180deg, rgb(239 236 231 / 0.4), transparent 18%);
  --hero-text-shadow: 0 1px 24px rgb(239 236 231 / 0.9);

  --radius: 4px;
  --content: 75rem;
  --gutter: clamp(20px, 5vw, 80px);

  --font-ui: "Switzer", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC",
    -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  /* 等宽栈末尾补上中文无衬线字体：等宽字体不含汉字时，汉字不会退化成宋体 */
  --font-mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", monospace;

  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  color-scheme: light;
}

/* 深色：深海军蓝底 + 乳白文字 + 浅蓝强调色 */
[data-theme="dark"] {
  --canvas: #0b1724;
  --surface: #0f1f31;
  --surface-2: #132539;
  --surface-3: #1b3049;
  --ink: #f6f1e6;
  --muted: #a9b4c0;
  --subtle: #8a97a5;
  --border-subtle: rgb(246 241 230 / 0.1);
  --border: rgb(246 241 230 / 0.24);
  --border-strong: rgb(246 241 230 / 0.48);
  --header: rgb(11 23 36 / 0.92);
  --soft: rgb(246 241 230 / 0.07);
  --softer: rgb(246 241 230 / 0.035);
  --shadow: rgb(0 0 0 / 0.42);
  --scroll-hint: rgb(0 0 0 / 0.55);
  --accent-ink: #9cd0ff;
  --accent-strong: #9cd0ff;
  --accent-soft: rgb(156 208 255 / 0.14);
  --btn-bg: #f6f1e6;
  --btn-fg: #0e2236;
  --panel: #08121e;

  /* 首屏背景：舞台夜景照片，--hero-backdrop 取自照片左上角的黑色，用于照片下移时补齐上方 */
  --hero-backdrop: #050308;
  --hero-mist: linear-gradient(180deg, transparent 52%, rgb(11 23 36 / 0.4) 72%, rgb(11 23 36 / 0.85) 89%, #0b1724 100%);
  --hero-shade: linear-gradient(180deg, rgb(7 17 28 / 0.45), transparent 28%);
  --hero-text-shadow: 0 2px 32px rgb(0 0 0 / 0.55);
  color-scheme: dark;
}

/* ==========================================================================
   基础
   ========================================================================== */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--canvas);
  color: var(--ink);
  font-family: var(--font-ui);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
}

img,
svg {
  display: block;
}

h1,
h2,
h3,
h4,
p {
  margin: 0;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

::selection {
  background: var(--accent);
  color: var(--accent-fg);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.skip-link {
  position: fixed;
  z-index: 100;
  top: 10px;
  left: 10px;
  padding: 8px 14px;
  border-radius: var(--radius);
  background: var(--accent);
  color: var(--accent-fg);
  transform: translateY(-200%);
  transition: transform 0.2s;
}

.skip-link:focus {
  transform: none;
}

/* ==========================================================================
   页面加载过渡：三叶草 logo 依次"长"出来，进度线走完后整层淡出
   ========================================================================== */
.preloader {
  --pl-disc: var(--surface);
  --pl-glow: rgb(156 208 255 / 0.5);
  --pl-track: rgb(77 151 223 / 0.16);
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  overflow: hidden;
  background:
    radial-gradient(60% 50% at 50% 38%, var(--accent-soft), transparent 72%),
    var(--canvas);
  color: var(--ink);
  /* 兜底：即便脚本没跑起来，6 秒后也会自动消失 */
  animation: pl-failsafe 0.5s 6s forwards;
}

[data-theme="dark"] .preloader {
  --pl-glow: rgb(156 208 255 / 0.2);
  --pl-track: rgb(156 208 255 / 0.14);
}

html:not(.js) .preloader {
  display: none;
}

html.is-loading {
  overflow: hidden;
  scrollbar-gutter: stable;
}

/* 加载层还在时，首屏入场动画先暂停，等它退场时再接着播放 */
html.is-loading .hero-intro h1 > span,
html.is-loading .hero-intro h1 em,
html.is-loading .hero-support {
  animation-play-state: paused;
}

.pl-stage {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 24px;
  text-align: center;
  transition: transform 0.7s var(--ease-out), opacity 0.45s ease;
}

.pl-emblem {
  position: relative;
  display: grid;
  place-items: center;
  width: clamp(156px, 18vw, 196px);
  aspect-ratio: 1;
  margin-bottom: 32px;
}

.pl-glow {
  position: absolute;
  inset: -36%;
  border-radius: 50%;
  background: radial-gradient(closest-side, var(--pl-glow), transparent);
  opacity: 0;
  animation: pl-fade 1.2s 0.1s ease forwards;
}

.pl-rings {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
}

/* 内圈是实心底盘：logo 叶片之间的白缝用同一个颜色描出来 */
.pl-ring-inner {
  fill: var(--pl-disc);
  stroke: var(--accent-strong);
  stroke-opacity: 0.18;
  stroke-width: 1;
  opacity: 0;
  transform: scale(0.86);
  transform-origin: 100px 100px;
  animation: pl-rise 0.6s var(--ease-out) forwards;
}

.pl-ring-outer {
  fill: none;
  stroke: var(--accent-strong);
  stroke-opacity: 0.55;
  stroke-width: 1;
  stroke-linecap: round;
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  transform: rotate(-90deg);
  transform-origin: 100px 100px;
  animation: pl-draw 0.9s 0.05s var(--ease-out) forwards;
}

.pl-orbit {
  position: absolute;
  inset: 0;
  opacity: 0;
  animation: pl-fade 0.5s 0.7s ease forwards, pl-spin 7s 0.7s linear infinite;
}

.pl-orbit i {
  position: absolute;
  top: 1%;
  left: 50%;
  width: 6px;
  height: 6px;
  margin: -3px 0 0 -3px;
  border-radius: 50%;
  background: var(--accent-strong);
  box-shadow: 0 0 0 3px var(--accent-soft), 0 0 12px var(--accent);
}

/* 第二颗小点沿内圈反向转，用 logo 的绿色呼应 */
.pl-orbit-b {
  inset: 10%;
  animation-duration: 0.6s, 11s;
  animation-direction: normal, reverse;
}

.pl-orbit-b i {
  top: auto;
  bottom: 0;
  width: 5px;
  height: 5px;
  margin: 0 0 -2.5px -2.5px;
  background: #34b07e;
  box-shadow: 0 0 0 3px rgb(52 176 126 / 0.18), 0 0 10px rgb(52 176 126 / 0.6);
}

.pl-logo {
  position: relative;
  width: 58%;
  height: auto;
  margin-top: -3%;
  overflow: visible;
  transform-origin: 50% 60%;
  animation: pl-breathe 2.8s 1.5s ease-in-out infinite;
}

.pl-logo g {
  transform-box: view-box;
}

.pl-sil {
  fill: var(--pl-disc);
  stroke: var(--pl-disc);
  stroke-width: 1.5;
  stroke-linejoin: round;
}

/* 中间叶片从底部向上"长"出来 */
.pl-centre {
  opacity: 0;
  transform: scaleY(0);
  transform-origin: 78px 100px;
  animation: pl-grow 0.6s 0.1s cubic-bezier(0.34, 1.4, 0.64, 1) forwards;
}

/* 两侧叶片从中间叶片背后向两边展开 */
.pl-left,
.pl-right {
  opacity: 0;
  transform-origin: 78px 112px;
  animation: pl-unfold 0.7s 0.35s var(--ease-out) forwards;
}

.pl-left {
  transform: rotate(30deg) scale(0.6);
}

.pl-right {
  transform: rotate(-30deg) scale(0.6);
}

.pl-tagline,
.pl-progress {
  opacity: 0;
  transform: translateY(10px);
}

/* 文案等脚本切换好语言后再出现，避免先闪一下中文 */
.preloader.is-ready .pl-tagline,
.preloader.is-ready .pl-progress {
  animation: pl-rise 0.8s var(--ease-out) forwards;
}

.preloader.is-ready .pl-tagline {
  animation-delay: 0.25s;
}

.preloader.is-ready .pl-progress {
  animation-delay: 0.4s;
}

.pl-tagline {
  max-width: 18em;
  margin: 0 0 28px;
  font-size: clamp(24px, 3.2vw, 36px);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.2;
  text-wrap: balance;
}

.pl-name {
  display: inline-block;
  margin-right: 0.08em;
  font-size: 1.4em;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1;
  color: #1a9a68;
}
[data-theme="dark"] .pl-name {
  color: #5fd3a0;
}

.pl-progress {
  width: min(240px, 62vw);
  height: 2px;
  overflow: hidden;
  border-radius: 2px;
  background: var(--pl-track);
}

.pl-progress span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, #9cd0ff, #4d97df 60%, #34b07e);
  transform: scaleX(0);
  transform-origin: left;
}

.preloader.is-ready .pl-progress span {
  animation: pl-load 1.2s 0.3s cubic-bezier(0.3, 0.6, 0.35, 1) forwards;
}

.preloader.is-leaving {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  animation: none;
  transition: opacity 0.6s 0.15s ease, visibility 0s 0.75s;
}

.preloader.is-leaving .pl-stage {
  opacity: 0;
  transform: translateY(-14px) scale(0.985);
}

@keyframes pl-fade {
  to { opacity: 1; }
}

@keyframes pl-rise {
  to { opacity: 1; transform: none; }
}

@keyframes pl-draw {
  to { stroke-dashoffset: 0; }
}

@keyframes pl-spin {
  to { transform: rotate(1turn); }
}

@keyframes pl-grow {
  35% { opacity: 1; }
  to { opacity: 1; transform: none; }
}

@keyframes pl-unfold {
  35% { opacity: 1; }
  to { opacity: 1; transform: none; }
}

@keyframes pl-breathe {
  50% { transform: scale(1.035); }
}

@keyframes pl-load {
  to { transform: scaleX(0.88); }
}

@keyframes pl-failsafe {
  to { opacity: 0; visibility: hidden; }
}

.container {
  width: min(calc(100% - var(--gutter) * 2), var(--content));
  margin-inline: auto;
}

.accent-ink {
  color: var(--accent-ink);
}

/* 横向滚动容器：内容超出时在边缘显示阴影提示，滚到尽头自动消失（纯 CSS） */
.scroll-x {
  background:
    linear-gradient(90deg, var(--surface) 40%, transparent) 0 0 / 56px 100% no-repeat local,
    linear-gradient(270deg, var(--surface) 40%, transparent) 100% 0 / 56px 100% no-repeat local,
    linear-gradient(90deg, var(--scroll-hint), transparent) 0 0 / 18px 100% no-repeat scroll,
    linear-gradient(270deg, var(--scroll-hint), transparent) 100% 0 / 18px 100% no-repeat scroll;
}

/* ==========================================================================
   按钮
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 36px;
  padding: 0 16px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.01em;
  white-space: nowrap;
  transition: background 0.2s, color 0.2s, border-color 0.2s, transform 0.12s;
}

.btn:active {
  transform: translateY(1px);
}

.btn-primary {
  background: var(--btn-bg);
  color: var(--btn-fg);
}

.btn-primary:hover {
  background: var(--accent);
  color: var(--accent-fg);
}

.btn-ghost {
  border-color: var(--border);
  background: transparent;
}

.btn-ghost:hover {
  background: var(--soft);
  border-color: var(--border-strong);
}

.btn-accent {
  background: var(--accent);
  color: var(--accent-fg);
  min-height: 46px;
}

.btn-accent:hover {
  background: var(--accent-hover);
}

.btn-block {
  width: 100%;
}

.icon-btn {
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius);
  background: transparent;
  transition: background 0.2s, border-color 0.2s;
}

.icon-btn:hover {
  background: var(--soft);
  border-color: var(--border);
}

.text-link {
  display: inline-flex;
  gap: 8px;
  margin-top: 40px;
  font-size: 14px;
  font-weight: 500;
  border-bottom: 1px solid var(--border);
  padding-bottom: 4px;
  transition: border-color 0.2s, color 0.2s;
}

.text-link:hover {
  color: var(--accent-ink);
  border-color: var(--accent-ink);
}

/* ==========================================================================
   顶部导航
   ========================================================================== */
.site-header {
  position: fixed;
  z-index: 50;
  top: 0;
  left: 0;
  right: 0;
  border-bottom: 1px solid transparent;
  transition: background 0.3s, border-color 0.3s, backdrop-filter 0.3s;
  color: var(--ink);
}

.site-header.is-solid {
  background: var(--header);
  border-bottom-color: var(--border-subtle);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.header-inner {
  display: flex;
  min-height: 60px;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.logo-mark {
  display: block;
  width: 26px;
  height: 20px;
  flex: none;
  overflow: visible;
}

.svg-sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.nav {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-right: auto;
  margin-left: 24px;
}

.nav > a,
.more-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 34px;
  padding: 0 12px;
  border: 0;
  border-radius: var(--radius);
  background: transparent;
  font-size: 13px;
  font-weight: 500;
  opacity: 0.86;
  transition: background 0.2s, opacity 0.2s;
}

.nav > a:hover,
.more-toggle:hover,
.more-toggle[aria-expanded="true"] {
  background: var(--soft);
  opacity: 1;
}

/* 当前所在区块的导航项 */
.nav > a {
  position: relative;
}

.nav > a.is-active {
  opacity: 1;
}

.nav > a.is-active::after {
  content: "";
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 4px;
  height: 2px;
  border-radius: 1px;
  background: var(--accent-strong);
}

.more {
  position: relative;
}

.more-toggle svg {
  transition: transform 0.2s;
}

.more-toggle[aria-expanded="true"] svg {
  transform: rotate(180deg);
}

.more-menu {
  position: absolute;
  top: calc(100% + 10px);
  left: -8px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 2px;
  width: 460px;
  padding: 8px;
  border: 1px solid var(--border-subtle);
  border-radius: 6px;
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 24px 48px var(--shadow);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: opacity 0.18s, transform 0.18s var(--ease-out), visibility 0.18s;
}

.more-menu.is-open {
  opacity: 1;
  visibility: visible;
  transform: none;
}

.more-menu a {
  display: grid;
  gap: 2px;
  padding: 10px 12px;
  border-radius: var(--radius);
  transition: background 0.15s;
}

.more-menu a:hover {
  background: var(--soft);
}

.more-menu strong {
  font-size: 13px;
  font-weight: 500;
}

.more-menu span {
  color: var(--muted);
  font-size: 12px;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.no-night .theme-toggle {
  display: none;
}

.theme-toggle .icon-sun,
[data-theme="dark"] .theme-toggle .icon-moon {
  display: none;
}

[data-theme="dark"] .theme-toggle .icon-sun {
  display: block;
}

.menu-toggle {
  display: none;
  gap: 5px;
  align-content: center;
}

.menu-toggle span {
  display: block;
  width: 16px;
  height: 1.5px;
  background: currentColor;
  transition: transform 0.2s;
}

.menu-toggle[aria-expanded="true"] span:first-child {
  transform: translateY(3.25px) rotate(45deg);
}

.menu-toggle[aria-expanded="true"] span:last-child {
  transform: translateY(-3.25px) rotate(-45deg);
}

.mobile-menu {
  display: grid;
  padding: 8px var(--gutter) 20px;
  border-top: 1px solid var(--border-subtle);
  background: var(--header);
  backdrop-filter: blur(18px);
}

.mobile-menu[hidden] {
  display: none;
}

.mobile-menu a {
  padding: 14px 0;
  border-bottom: 1px solid var(--border-subtle);
  font-size: 15px;
}

/* ==========================================================================
   首屏
   ========================================================================== */
.hero {
  --hero-progress: 0;
  --hero-lead-size: clamp(30px, 3.8vw, 54px);
  --hero-title-size: clamp(46px, 5.6vw, 82px);
  /* 标题放在照片上方的留白处（白墙 / 夜空），不压住人物 */
  --hero-copy-top: clamp(104px, 15svh, 150px);
  position: relative;
  min-height: calc(max(100svh, 680px) + min(55svh, 520px));
  background: var(--canvas);
  color: var(--ink);
}

.hero-stage {
  position: sticky;
  top: 0;
  display: flex;
  flex-direction: column;
  height: 100svh;
  min-height: 680px;
  overflow: hidden;
  isolation: isolate;
}

.hero-art {
  position: absolute;
  z-index: -3;
  inset: 0;
  background: var(--hero-backdrop);
  transform: scale(calc(1.04 + var(--hero-progress) * 0.08));
  transform-origin: 50% 70%;
  will-change: transform;
}

.hero-art > * {
  position: absolute;
  inset: 0;
}

.art-photo {
  background-repeat: no-repeat;
  background-size: cover;
}

/* 白天：照片整体下移，顶部渐隐进同色墙面，人物在下半屏，上方留出标题区 */
.art-photo--day {
  top: 18%;
  bottom: -10%;
  /* 先写 jpg 作兜底，再用 image-set 让支持 WebP 的浏览器拿体积小 40% 的版本 */
  background-image: url("hero-day.jpg");
  background-image: image-set(url("hero-day.webp") type("image/webp"), url("hero-day.jpg") type("image/jpeg"));
  background-position: 50% 0;
  -webkit-mask-image: linear-gradient(180deg, transparent, #000 14%);
  mask-image: linear-gradient(180deg, transparent, #000 14%);
}

/* 夜晚：照片铺满并略向左溢出，人物靠左、给居中的标题让出位置 */
.art-photo--night {
  display: none;
  left: -6%;
  background-image: url("hero-night.jpg");
  background-image: image-set(url("hero-night.webp") type("image/webp"), url("hero-night.jpg") type("image/jpeg"));
  background-position: 0 30%;
}

/* 偏窄的屏幕放不下人物 + 标题并排，照片同样下移，标题落在上方的黑色里 */
@media (max-aspect-ratio: 7/5) {
  .art-photo--night {
    top: 20%;
    bottom: -8%;
    left: 0;
    background-position: 18% 0;
    -webkit-mask-image: linear-gradient(180deg, transparent, #000 14%);
    mask-image: linear-gradient(180deg, transparent, #000 14%);
  }
}

/* display: none 的那张不会被下载 */
[data-theme="dark"] .art-photo--day {
  display: none;
}

[data-theme="dark"] .art-photo--night {
  display: block;
}

.art-mist {
  background: var(--hero-mist);
}

.hero-shade {
  position: absolute;
  z-index: -2;
  inset: 0;
  pointer-events: none;
  background: var(--hero-shade);
}

.hero-intro,
.hero-arrival {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  will-change: transform, opacity;
}

.hero-intro {
  position: relative;
  z-index: 1;
  flex: 1;
  justify-content: flex-start;
  padding: var(--hero-copy-top) var(--gutter) 12px;
  transform: translateY(calc(var(--hero-progress) * -70px)) scale(calc(1 - var(--hero-progress) * 0.08));
  opacity: clamp(0, calc(1 - var(--hero-progress) * 2.3), 1);
}

.hero-arrival {
  position: absolute;
  z-index: 1;
  inset: var(--hero-copy-top) 24px auto;
  pointer-events: none;
  opacity: clamp(0, calc((var(--hero-progress) - 0.38) * 2.2), 1);
  transform: translateY(calc(50px - var(--hero-progress) * 50px));
}

.hero-intro h1,
.hero-arrival {
  font-weight: 400;
  letter-spacing: -0.03em;
  text-shadow: var(--hero-text-shadow);
}

.hero-intro h1 > span,
.hero-arrival > span {
  display: block;
  font-size: var(--hero-lead-size);
  line-height: 1.15;
}

.hero-intro h1 em,
.hero-arrival em {
  display: block;
  margin-top: 8px;
  font-size: var(--hero-title-size);
  font-style: normal;
  font-weight: 500;
  line-height: 1.1;
}

.hero-intro h1 > span,
.hero-intro h1 em {
  opacity: 0;
  transform: translateY(18px);
  animation: hero-in 1.1s var(--ease-out) forwards;
}

.hero-intro h1 em {
  animation-delay: 0.15s;
}

@keyframes hero-in {
  to { opacity: 1; transform: none; }
}

.hero-support {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 40px;
  width: min(calc(100% - var(--gutter) * 2), 1280px);
  margin: 0 auto;
  padding: 28px 0 48px;
  opacity: 0;
  animation: hero-in 1s 0.45s var(--ease-out) forwards;
}

.hero-desc {
  max-width: 460px;
  color: color-mix(in srgb, var(--ink) 84%, transparent);
  font-size: 15px;
  line-height: 1.7;
  text-wrap: pretty;
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.hero-btn {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  min-height: 46px;
  padding: 0 20px;
  border: 1px solid var(--border);
  border-radius: 2px;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.01em;
  white-space: nowrap;
  transition: background 0.25s, color 0.25s, border-color 0.25s, transform 0.12s;
}

.hero-btn svg {
  transition: transform 0.25s;
}

.hero-btn:hover svg {
  transform: translate(2px, -2px);
}

.hero-btn:active {
  transform: translateY(1px);
}

.hero-btn--primary {
  background: var(--btn-bg);
  border-color: var(--btn-bg);
  color: var(--btn-fg);
}

.hero-btn--primary:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-fg);
}

.hero-btn--secondary {
  background: color-mix(in srgb, var(--canvas) 30%, transparent);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: var(--ink);
}

.hero-btn--secondary:hover {
  background: color-mix(in srgb, var(--canvas) 60%, transparent);
}

/* ==========================================================================
   Token 计数器
   ========================================================================== */
.counter {
  --counter-size: clamp(40px, 5vw, 76px);
  position: relative;
  border-bottom: 1px solid var(--border-subtle);
  background: var(--canvas);
}

.counter-frame {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) auto;
  align-items: center;
  gap: 48px;
  padding: 48px 0;
}

.counter-eyebrow {
  font-size: clamp(20px, 1.8vw, 26px);
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.15;
}

.counter-label {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
}

.live-dot,
.badge-live i,
.status-pill i {
  position: relative;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent-strong);
  flex: none;
}

.live-dot::after,
.badge-live i::after,
.status-pill i::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: inherit;
  animation: pulse 2s ease-out infinite;
}

@keyframes pulse {
  from { transform: scale(1); opacity: 0.7; }
  to { transform: scale(3); opacity: 0; }
}

.counter-metric {
  font-family: var(--font-mono);
  font-size: var(--counter-size);
  font-weight: 400;
  letter-spacing: -0.04em;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.counter-metric .sep {
  color: var(--muted);
  opacity: 0.6;
}

.counter-metric .tail {
  color: var(--accent-ink);
}

/* ==========================================================================
   通用区块
   ========================================================================== */
.section {
  padding: 104px 0;
  border-bottom: 1px solid var(--border-subtle);
  scroll-margin-top: 60px;
}

.section-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 430px);
  align-items: end;
  gap: 24px 64px;
  margin-bottom: 56px;
}

.section-head .eyebrow {
  grid-column: 1 / -1;
}

.eyebrow {
  margin-bottom: 22px;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.section-head .eyebrow {
  margin-bottom: 0;
}

h2 {
  font-size: clamp(36px, 4.4vw, 52px);
  font-weight: 500;
  letter-spacing: -0.025em;
  line-height: 1.1;
}

.section-copy {
  max-width: 560px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.7;
  text-wrap: pretty;
}

.section-head .section-copy {
  max-width: 430px;
}

.section-copy strong {
  color: var(--ink);
  font-weight: 500;
}

/* 滚动出现动画（仅在 JS 可用时隐藏，脚本失败也不会丢内容） */
.js .reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.8s var(--ease-out), transform 0.8s var(--ease-out);
}

.js .reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* ==========================================================================
   降价原理：三张 SVG 图示，每张讲一个"因 → 果"的小故事
   连线先画出来，进入视口后才开始循环播放（见 main.js 的 initMechanisms）
   ========================================================================== */
.mechanisms {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 1px solid var(--border);
}

.mechanism {
  display: flex;
  flex-direction: column;
  padding: 24px 28px 8px;
}

.mechanism:first-child { padding-left: 0; }
.mechanism:last-child { padding-right: 0; }

.mechanism + .mechanism {
  border-left: 1px solid var(--border-subtle);
}

.mechanism:nth-child(2) { transition-delay: 0.08s; }
.mechanism:nth-child(3) { transition-delay: 0.16s; }

.mechanism-top {
  display: flex;
  align-items: baseline;
  gap: 12px;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 12px;
}

.mechanism-num {
  color: var(--accent-ink);
}

.mechanism-art {
  position: relative;
  height: clamp(190px, 17vw, 250px);
  margin: 16px 0 30px;
}

/* 图示背后的一团淡蓝光晕，悬停时更亮 */
.mechanism-art::before {
  content: "";
  position: absolute;
  inset: 2% 4%;
  background: radial-gradient(closest-side, color-mix(in srgb, var(--accent) 34%, transparent), transparent);
  opacity: 0.5;
  transition: opacity 0.5s var(--ease-out);
  pointer-events: none;
}

.mechanism:hover .mechanism-art::before {
  opacity: 1;
}

.mechanism h3 {
  font-size: clamp(21px, 1.9vw, 26px);
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.25;
}

.mechanism p {
  margin-top: 12px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.75;
}

/* ---------- 图示通用 ---------- */
.m-svg {
  --d-accent: var(--accent-strong);
  --d-line: var(--border);
  --d-panel: var(--canvas);
  --d-tint: color-mix(in srgb, var(--d-accent) 10%, var(--canvas));
  --d-on: color-mix(in srgb, var(--d-accent) 55%, var(--canvas));
  --d-ease: cubic-bezier(0.45, 0, 0.55, 1);
  --d-pop: cubic-bezier(0.34, 1.56, 0.64, 1);
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
}

.m-panel { fill: var(--d-panel); stroke: var(--d-line); }
.m-back-panel { fill: var(--d-panel); stroke: var(--d-line); opacity: 0.55; }
.m-accent-panel { fill: var(--d-tint); stroke: color-mix(in srgb, var(--d-accent) 65%, transparent); }
.m-rack { fill: color-mix(in srgb, var(--ink) 4%, var(--canvas)); stroke: var(--d-line); }
.m-detail { stroke: var(--d-line); stroke-linecap: round; }
.m-wire { stroke: var(--d-line); }

.m-label {
  fill: var(--muted);
  font: 500 11px var(--font-ui);
  letter-spacing: 0.02em;
}

/* 沿线不断流动的细虚线 */
.m-flow {
  stroke: var(--d-accent);
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-dasharray: 3 16;
  opacity: 0.5;
  animation: m-flow 5s linear infinite;
}

/* 带光晕的"数据包"：pathLength=1，用一小段虚线从起点跑到终点 */
.m-packet {
  stroke: var(--d-accent);
  stroke-width: 3;
  stroke-linecap: round;
  opacity: 0;
}

/* 首次出现时连线从起点画到终点，之后流动线再淡入 */
.js .m-wire {
  stroke-dasharray: 1 2;
  stroke-dashoffset: 1;
  transition: stroke-dashoffset 1.2s var(--ease-out) 0.25s;
}

.js .is-visible .m-wire { stroke-dashoffset: 0; }

.js .m-flow {
  opacity: 0;
  transition: opacity 0.8s ease 1.1s;
}

.js .is-visible .m-flow { opacity: 0.5; }

/* 不在视口内就暂停 */
.js .mechanism-art:not(.is-playing) .m-svg * {
  animation-play-state: paused;
}

@keyframes m-flow {
  to { stroke-dashoffset: -76; }
}

/* 注：下面各元素的默认样式就是"故事讲完"的最后一帧，减少动态效果时直接停在这一帧 */

/* ---------- 01 合并采购：6s 一轮 ---------- */
.pool-tile .m-panel {
  animation: pool-tile 6s ease var(--delay, 0s) infinite both;
}

@keyframes pool-tile {
  0%, 3%, 24%, 100% { stroke: var(--d-line); fill: var(--d-panel); }
  7%, 16% { stroke: var(--d-accent); fill: var(--d-tint); }
}

.pool-in {
  stroke-dasharray: 0.16 2;
  animation: pool-in 6s var(--d-ease) var(--delay, 0s) infinite both;
}

@keyframes pool-in {
  0%, 3% { stroke-dashoffset: 0.16; opacity: 0; }
  5%, 20% { opacity: 1; }
  22%, 100% { stroke-dashoffset: -1; opacity: 0; }
}

.pool-ring {
  stroke: var(--d-accent);
  opacity: 0;
  transform-box: fill-box;
  transform-origin: center;
  animation: pool-ring 6s var(--ease-out) infinite both;
}

@keyframes pool-ring {
  0%, 22% { opacity: 0; transform: scale(1); }
  24% { opacity: 0.7; }
  40%, 100% { opacity: 0; transform: scale(1.4); }
}

.pool-core {
  transform-box: fill-box;
  transform-origin: center;
  animation: pool-core 6s var(--ease-out) infinite both;
}

@keyframes pool-core {
  0%, 21% { transform: scale(1); }
  25% { transform: scale(1.06); }
  34%, 100% { transform: scale(1); }
}

.pool-cell {
  fill: var(--d-on);
  animation: pool-cell 6s ease var(--delay, 0s) infinite both;
}

@keyframes pool-cell {
  0%, 21% { opacity: 0.22; }
  27%, 86% { opacity: 1; }
  95%, 100% { opacity: 0.22; }
}

.pool-out {
  stroke-dasharray: 0.4 2;
  animation: pool-out 6s var(--d-ease) infinite both;
}

@keyframes pool-out {
  0%, 32% { stroke-dashoffset: 0.4; opacity: 0; }
  34%, 44% { opacity: 1; }
  46%, 100% { stroke-dashoffset: -1; opacity: 0; }
}

.pool-contract {
  stroke: var(--d-accent);
  fill: var(--d-tint);
  animation: pool-contract 6s ease infinite both;
}

@keyframes pool-contract {
  0%, 44%, 95%, 100% { stroke: var(--d-line); fill: var(--d-panel); }
  48%, 88% { stroke: var(--d-accent); fill: var(--d-tint); }
}

.pool-check {
  stroke: var(--accent-ink);
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 1 2;
  animation: pool-check 6s var(--ease-out) infinite both;
}

@keyframes pool-check {
  0%, 47% { stroke-dashoffset: 1.01; opacity: 1; }
  56%, 88% { stroke-dashoffset: 0; opacity: 1; }
  94%, 100% { stroke-dashoffset: 0; opacity: 0; }
}

.pool-tag {
  transform-box: fill-box;
  transform-origin: 50% 100%;
  animation: pool-tag 6s ease infinite both;
}

.pool-tag rect { fill: var(--accent); }

.pool-tag text {
  fill: var(--accent-fg);
  font: 600 10px var(--font-ui);
  letter-spacing: 0.06em;
}

@keyframes pool-tag {
  0%, 52% { opacity: 0; transform: translateY(6px) scale(0.85); animation-timing-function: var(--d-pop); }
  58%, 88% { opacity: 1; transform: none; }
  94%, 100% { opacity: 0; transform: none; }
}

/* ---------- 02 数据中心竞价：8s 一轮，左 → 右 → 中依次报价 ---------- */
.bid-panel {
  animation: bid-panel 8s ease var(--delay, 0s) infinite both;
}

@keyframes bid-panel {
  0%, 4%, 24%, 100% { stroke: var(--d-line); fill: var(--d-panel); }
  8%, 16% { stroke: var(--d-accent); fill: var(--d-tint); }
}

.bid-dc--win .bid-panel {
  stroke: var(--d-accent);
  fill: var(--d-tint);
  animation-name: bid-panel-win;
}

@keyframes bid-panel-win {
  0%, 44%, 96%, 100% { stroke: var(--d-line); fill: var(--d-panel); }
  48%, 88% { stroke: var(--d-accent); fill: var(--d-tint); }
}

.bid-led {
  fill: var(--d-accent);
  opacity: 0.35;
  animation: bid-led 8s linear var(--delay, 0s) infinite both;
}

@keyframes bid-led {
  0%, 5%, 18%, 100% { opacity: 0.35; }
  6%, 9%, 12%, 15% { opacity: 1; }
  7.5%, 10.5%, 13.5% { opacity: 0.3; }
}

.bid-packet {
  stroke-dasharray: 0.16 2;
  animation: bid-packet 8s var(--d-ease) var(--delay, 0s) infinite both;
}

/* 中间那条线短，数据包相应放长一些，看起来大小一致 */
.bid-packet--mid {
  stroke-dasharray: 0.4 2;
  animation-name: bid-packet-mid;
}

@keyframes bid-packet {
  0%, 8% { stroke-dashoffset: 0.16; opacity: 0; }
  9.5%, 18.5% { opacity: 1; }
  20%, 100% { stroke-dashoffset: -1; opacity: 0; }
}

@keyframes bid-packet-mid {
  0%, 8% { stroke-dashoffset: 0.4; opacity: 0; }
  9.5%, 18.5% { opacity: 1; }
  20%, 100% { stroke-dashoffset: -1; opacity: 0; }
}

.bid-tags {
  animation: bid-fade 8s ease infinite both;
}

@keyframes bid-fade {
  0%, 90% { opacity: 1; }
  96%, 100% { opacity: 0; }
}

.bid-tag {
  transform-box: fill-box;
  transform-origin: center;
}

.bid-tag rect { fill: var(--d-panel); stroke: var(--d-line); }

.bid-tag text {
  fill: var(--ink);
  font: 500 10px var(--font-mono);
}

.bid-strike {
  stroke: var(--ink);
  stroke-width: 1.2;
  stroke-linecap: round;
  stroke-dasharray: 1 2;
}

/* 被压价的报价：变淡并划掉 */
.bid-tag--a,
.bid-tag--c { opacity: 0.45; }

.bid-tag--a { animation: bid-tag-a 8s ease infinite both; }
.bid-tag--c { animation: bid-tag-c 8s ease infinite both; }
.bid-tag--a .bid-strike { animation: bid-strike-a 8s var(--ease-out) infinite both; }
.bid-tag--c .bid-strike { animation: bid-strike-c 8s var(--ease-out) infinite both; }

@keyframes bid-tag-a {
  0%, 6% { opacity: 0; transform: scale(0.7); animation-timing-function: var(--d-pop); }
  10%, 40% { opacity: 1; transform: none; }
  44%, 100% { opacity: 0.45; transform: none; }
}

@keyframes bid-tag-c {
  0%, 26% { opacity: 0; transform: scale(0.7); animation-timing-function: var(--d-pop); }
  30%, 60% { opacity: 1; transform: none; }
  64%, 100% { opacity: 0.45; transform: none; }
}

@keyframes bid-strike-a {
  0%, 40% { stroke-dashoffset: 1.01; }
  44%, 100% { stroke-dashoffset: 0; }
}

@keyframes bid-strike-c {
  0%, 60% { stroke-dashoffset: 1.01; }
  64%, 100% { stroke-dashoffset: 0; }
}

/* 最低价中标：标签填满主色 */
.bid-tag--win { animation: bid-tag-win 8s ease infinite both; }

.bid-tag--win rect {
  fill: var(--accent);
  stroke: var(--accent);
  animation: bid-win-rect 8s ease infinite both;
}

.bid-tag--win text {
  fill: var(--accent-fg);
  font-weight: 600;
  animation: bid-win-text 8s ease infinite both;
}

@keyframes bid-tag-win {
  0%, 46% { opacity: 0; transform: scale(0.7); animation-timing-function: var(--d-pop); }
  50%, 100% { opacity: 1; transform: none; }
}

@keyframes bid-win-rect {
  0%, 62% { fill: var(--d-panel); stroke: var(--d-line); }
  66%, 100% { fill: var(--accent); stroke: var(--accent); }
}

@keyframes bid-win-text {
  0%, 62% { fill: var(--ink); }
  66%, 100% { fill: var(--accent-fg); }
}

/* 报价到达时合并需求框亮一下，最终中标时最亮 */
.bid-box-hi {
  stroke: var(--d-accent);
  stroke-width: 1.5;
  animation: bid-box 8s ease infinite both;
}

@keyframes bid-box {
  0%, 19%, 27%, 39%, 47%, 59%, 95%, 100% { opacity: 0; }
  21%, 41% { opacity: 0.55; }
  62%, 88% { opacity: 1; }
}

.bid-demand {
  fill: var(--ink);
  font: 500 12px var(--font-ui);
}

.bid-best {
  fill: var(--muted);
  font: 500 9px var(--font-ui);
  letter-spacing: 0.04em;
}

/* 价格滚动：旧价向上滑走，新价从下面滑进来 */
.bid-price {
  fill: var(--accent-ink);
  font: 600 13px var(--font-mono);
  opacity: 0;
}

.bid-price--3 { opacity: 1; }

.bid-price--0 { animation: bid-p0 8s ease infinite both; }
.bid-price--1 { animation: bid-p1 8s ease infinite both; }
.bid-price--2 { animation: bid-p2 8s ease infinite both; }
.bid-price--3 { animation: bid-p3 8s ease infinite both; }

@keyframes bid-p0 {
  0%, 20% { opacity: 1; transform: none; }
  23%, 93.9% { opacity: 0; transform: translateY(-9px); }
  94% { opacity: 0; transform: translateY(9px); }
  98%, 100% { opacity: 1; transform: none; }
}

@keyframes bid-p1 {
  0%, 20% { opacity: 0; transform: translateY(9px); }
  23%, 40% { opacity: 1; transform: none; }
  43%, 100% { opacity: 0; transform: translateY(-9px); }
}

@keyframes bid-p2 {
  0%, 40% { opacity: 0; transform: translateY(9px); }
  43%, 60% { opacity: 1; transform: none; }
  63%, 100% { opacity: 0; transform: translateY(-9px); }
}

@keyframes bid-p3 {
  0%, 60% { opacity: 0; transform: translateY(9px); }
  63%, 90% { opacity: 1; transform: none; }
  94%, 100% { opacity: 0; transform: translateY(-9px); }
}

/* ---------- 03 闲置容量：7s 一轮，闲置格子沿对角线点亮 ---------- */
.cap-title {
  fill: var(--ink);
  font: 500 12px var(--font-ui);
}

.cap-meter-label,
.cap-legend {
  fill: var(--muted);
  font: 500 10px var(--font-ui);
}

.cap-meter { fill: color-mix(in srgb, var(--ink) 9%, var(--canvas)); }

.cap-meter-fill {
  fill: var(--d-accent);
  transform-box: fill-box;
  transform-origin: 0 50%;
  animation: cap-meter 7s ease-in-out infinite both;
}

/* 与格子点亮的节奏同步：12/30 → 30/30 */
@keyframes cap-meter {
  0%, 14% { transform: scaleX(0.4); }
  31%, 72% { transform: scaleX(1); }
  86%, 100% { transform: scaleX(0.4); }
}

.cap-used { fill: color-mix(in srgb, var(--muted) 22%, var(--canvas)); }

.cap-slot {
  stroke: var(--d-line);
  stroke-dasharray: 2.5 2.5;
}

.cap-fill,
.cap-key {
  fill: var(--d-on);
  stroke: var(--d-accent);
}

.cap-fill {
  transform-box: fill-box;
  transform-origin: center;
  animation: cap-fill 7s ease var(--delay, 0s) infinite both;
}

@keyframes cap-fill {
  0%, 4% { opacity: 0; transform: scale(0.6); }
  8% { opacity: 1; transform: scale(1.08); }
  11%, 62% { opacity: 1; transform: none; }
  70%, 100% { opacity: 0; transform: scale(0.85); }
}

.cap-packet {
  stroke-dasharray: 0.45 2;
  animation: cap-packet 7s var(--d-ease) var(--delay, 0s) infinite both;
}

@keyframes cap-packet {
  0%, 26% { stroke-dashoffset: 0.45; opacity: 0; }
  28%, 36% { opacity: 1; }
  38%, 100% { stroke-dashoffset: -1; opacity: 0; }
}

.cap-payoff {
  fill: var(--accent-ink);
  animation: cap-payoff 7s ease infinite both;
}

@keyframes cap-payoff {
  0%, 30%, 80%, 100% { fill: var(--muted); }
  38%, 72% { fill: var(--accent-ink); }
}

/* ==========================================================================
   01 模型市场
   ========================================================================== */
.price-callout {
  padding: 20px 22px;
  border: 1px solid var(--border-subtle);
  border-left: 2px solid var(--accent);
  border-radius: var(--radius);
  background: var(--surface);
}

/* 汇率 1:1：价格承诺卡片顶部的醒目区块 */
.fx-rate {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 20px;
  margin: -6px -8px 18px;
  padding: 16px 18px;
  border: 1px solid rgb(77 151 223 / 0.28);
  border-radius: var(--radius);
  background: linear-gradient(135deg, var(--accent-soft), transparent 80%);
  overflow: hidden;
}

/* 每隔几秒掠过一道高光，吸引视线但不打扰阅读 */
.fx-rate::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg, transparent 35%, rgb(255 255 255 / 0.55) 50%, transparent 65%);
  transform: translateX(-100%);
  animation: fx-sheen 5.5s var(--ease-out) 1.2s infinite;
  pointer-events: none;
}

[data-theme="dark"] .fx-rate::after {
  background: linear-gradient(100deg, transparent 35%, rgb(156 208 255 / 0.16) 50%, transparent 65%);
}

@keyframes fx-sheen {
  0% { transform: translateX(-100%); }
  28%, 100% { transform: translateX(100%); }
}

.fx-eq {
  display: flex;
  flex: none;
  align-items: baseline;
  gap: 10px;
  color: var(--accent-ink);
  font-size: 44px;
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.fx-cur {
  margin-right: 2px;
  font-size: 0.55em;
  font-weight: 500;
  vertical-align: 0.5em;
}

.fx-sign {
  color: var(--muted);
  font-size: 0.6em;
  font-weight: 400;
}

.fx-text {
  flex: 1 1 180px;
  min-width: 0;
}

.fx-badge {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 999px;
  background: var(--accent-strong);
  color: #fff;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
}

[data-theme="dark"] .fx-badge {
  color: var(--accent-fg);
}

.fx-text p {
  margin-top: 6px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.fx-text b {
  color: var(--ink);
  font-weight: 600;
}

.price-callout-eyebrow {
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.price-callout strong {
  display: block;
  margin-top: 8px;
  font-size: 20px;
  font-weight: 500;
  letter-spacing: -0.01em;
}

.price-callout > p:last-child {
  margin-top: 6px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.pricing-panel {
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius);
  background: var(--surface);
  overflow: hidden;
}

.catalog-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 16px 0 8px;
  border-bottom: 1px solid var(--border-subtle);
}

.catalog-tabs {
  display: flex;
  gap: 2px;
  overflow-x: auto;
  scrollbar-width: none;
}

.catalog-tabs::-webkit-scrollbar {
  display: none;
}

.catalog-tab {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 52px;
  padding: 0 14px;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  transition: color 0.2s;
}

.catalog-tab sup {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--subtle);
}

.catalog-tab::after {
  content: "";
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: -1px;
  height: 2px;
  background: var(--accent-strong);
  transform: scaleX(0);
  transition: transform 0.25s var(--ease-out);
}

.catalog-tab:hover,
.catalog-tab[aria-selected="true"] {
  color: var(--ink);
}

.catalog-tab[aria-selected="true"]::after {
  transform: scaleX(1);
}

.search {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 34px;
  min-width: 220px;
  padding: 0 12px;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius);
  background: var(--canvas);
  color: var(--muted);
  transition: border-color 0.2s;
}

.search:focus-within {
  border-color: var(--border-strong);
}

.search input {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
  font-size: 13px;
}

.search input::placeholder {
  color: var(--subtle);
}

.table-wrap {
  position: relative;
  overflow-x: auto;
}

.catalog {
  width: 100%;
  min-width: 960px;
  border-collapse: collapse;
}

.catalog th,
.catalog td {
  padding: 0 18px;
  border-bottom: 1px solid var(--border-subtle);
  text-align: left;
}

.catalog th {
  height: 40px;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
}

.catalog th:first-child,
.catalog td:first-child {
  padding-left: 24px;
}

.catalog th:last-child,
.catalog td:last-child {
  width: 50px;
  padding-left: 0;
}

.row-toggle {
  all: unset;
  display: inline;
  cursor: pointer;
  color: inherit;
  font: inherit;
}

.row-toggle:focus-visible {
  outline: 2px solid var(--accent-strong);
  outline-offset: 3px;
  border-radius: 3px;
}

.catalog tbody tr.row {
  cursor: pointer;
  transition: background 0.15s;
}

.catalog tbody tr.row:hover,
.catalog tbody tr.row.is-open {
  background: var(--softer);
}

.catalog td {
  height: 76px;
  vertical-align: middle;
  font-size: 13px;
}

.model-identity {
  display: flex;
  align-items: center;
  gap: 14px;
}

.provider-mark {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 6px;
  background: var(--mark, var(--surface-3));
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  flex: none;
}

.model-name {
  display: block;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 500;
}

.model-provider {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

.price-cell {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 90px;
  font-variant-numeric: tabular-nums;
}

.price-cell s {
  color: var(--muted);
  font-size: 11px;
  text-decoration-thickness: 1px;
}

.price-cell strong {
  font-size: 14px;
  font-weight: 500;
}

.price-cell small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 400;
}

.price-none {
  color: var(--subtle);
}

.discount {
  display: inline-flex;
  min-width: 64px;
  min-height: 28px;
  align-items: center;
  justify-content: center;
  padding: 0 12px;
  border-radius: 999px;
  background: var(--accent);
  color: var(--accent-fg);
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

.caps {
  display: flex;
  gap: 6px;
}

.cap {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius);
  color: var(--muted);
}

.row-chevron {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  color: var(--muted);
  transition: transform 0.2s;
}

.row.is-open .row-chevron {
  transform: rotate(180deg);
}

.details-row td {
  height: auto;
  padding-top: 0;
  padding-bottom: 0;
  background: var(--softer);
}

.details {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr)) auto;
  align-items: center;
  gap: 24px;
  padding: 18px 0 22px 46px;
}

.details dt {
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.details-action {
  justify-self: end;
}

.details dd {
  margin: 4px 0 0;
  font-size: 13px;
}

.details code {
  font-family: var(--font-mono);
  font-size: 12px;
}

.catalog-empty {
  padding: 48px 24px;
  color: var(--muted);
  text-align: center;
}

.table-expand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  height: 52px;
  border: 0;
  border-bottom: 1px solid var(--border-subtle);
  background: transparent;
  color: var(--ink);
  font-size: 13px;
  font-weight: 500;
  transition: background 0.2s;
}

.table-expand:hover {
  background: var(--softer);
}

.table-expand[hidden] {
  display: none;
}

.panel-note {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 32px;
  padding: 18px 24px;
  color: var(--muted);
  font-size: 13px;
}

.panel-note p {
  color: var(--ink);
}

.panel-note ul,
.facts,
.steps {
  margin: 0;
  padding: 0;
  list-style: none;
}

.panel-note ul {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
}

.panel-note li,
.facts li {
  display: flex;
  align-items: center;
  gap: 8px;
}

.panel-note li::before,
.facts li::before {
  content: "";
  width: 12px;
  height: 7px;
  margin-top: -3px;
  border-left: 1.5px solid var(--accent-ink);
  border-bottom: 1.5px solid var(--accent-ink);
  transform: rotate(-45deg);
  flex: none;
}

/* ==========================================================================
   02 接入
   ========================================================================== */
.integration-frame {
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface);
  box-shadow: 0 24px 58px var(--shadow);
}

.integration-main {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.08fr);
}

.integration-copy {
  padding: 56px 48px;
}

.integration-copy h2 {
  margin-top: 0;
}

.integration-copy .section-copy {
  margin-top: 24px;
}

.endpoint {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 32px;
  padding: 6px 6px 6px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--canvas);
}

.endpoint-label {
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.endpoint code {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-family: var(--font-mono);
  font-size: 13px;
}

.copy-btn {
  height: 30px;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: 3px;
  background: var(--surface);
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
}

.copy-btn:hover {
  border-color: var(--border-strong);
}

.copy-btn.is-copied {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-fg);
}

.copy-btn--dark {
  height: 26px;
  border-color: var(--panel-line);
  background: transparent;
  color: var(--panel-ink);
}

.facts {
  display: grid;
  gap: 10px;
  margin-top: 28px;
  color: var(--muted);
  font-size: 13px;
}

.integration-visual {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 16px;
  padding: 40px;
  border-left: 1px solid var(--border-subtle);
  background:
    radial-gradient(ellipse 70% 60% at 70% 30%, var(--accent-soft), transparent 70%),
    linear-gradient(var(--border-subtle) 1px, transparent 1px) 0 0 / 32px 32px,
    linear-gradient(90deg, var(--border-subtle) 1px, transparent 1px) 0 0 / 32px 32px,
    var(--surface-2);
}

.code-card,
.rate-card,
.terminal {
  border: 1px solid var(--panel-line);
  border-radius: 6px;
  background: var(--panel);
  color: var(--panel-ink);
  box-shadow: 0 18px 40px rgb(8 20 34 / 0.3);
}

.code-header,
.terminal-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 44px;
  padding: 0 12px 0 16px;
  border-bottom: 1px solid var(--panel-line);
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--panel-muted);
}

.code-file {
  margin-right: auto;
}

.code-dots {
  display: inline-flex;
  gap: 6px;
}

.code-dots i {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--panel-line);
}

.code-block {
  margin: 0;
  padding: 18px 22px 20px;
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.75;
}

.c-muted { color: var(--panel-faint); }
.c-key { color: var(--panel-warm); }
.c-str { color: var(--panel-accent); }
.c-placeholder { color: var(--panel-faint); font-style: italic; }

.c-edit {
  border-right: 2px solid transparent;
}

.c-edit.is-typing,
.c-placeholder.is-typing {
  border-right: 2px solid var(--panel-accent);
  animation: caret 0.8s steps(1) infinite;
}

.c-placeholder.is-set {
  color: var(--panel-warm);
  font-style: normal;
}

@keyframes caret {
  50% { border-right-color: transparent; }
}

.rate-card {
  padding: 16px 18px 18px;
}

.rate-header {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 6px 16px;
  margin-bottom: 14px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--panel-muted);
}

.rate-header strong {
  color: var(--panel-ink);
  font-weight: 500;
}

.rate-row {
  display: grid;
  grid-template-columns: 96px minmax(70px, 1fr) 70px;
  align-items: center;
  gap: 12px;
  font-family: var(--font-mono);
  font-size: 11px;
}

.rate-row + .rate-row {
  margin-top: 8px;
}

.rate-row strong {
  font-weight: 400;
  text-align: right;
}

.rate-bar {
  height: 9px;
  background: rgb(230 237 244 / 0.08);
  overflow: hidden;
}

.rate-bar i {
  display: block;
  height: 100%;
  background: rgb(230 237 244 / 0.4);
  transition: width 0.9s var(--ease-out);
}

.rate-row--ours .rate-bar i {
  background: var(--panel-accent);
}

.rate-row--ours span {
  color: var(--panel-accent);
}

.provider-marquee {
  position: relative;
  overflow: hidden;
  border-top: 1px solid var(--border-subtle);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
}

.marquee-track {
  display: flex;
  width: max-content;
  animation: marquee 48s linear infinite;
}

.provider-marquee:hover .marquee-track {
  animation-play-state: paused;
}

.marquee-group {
  display: flex;
}

.marquee-item {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  height: 72px;
  padding: 0 32px;
  color: var(--muted);
  font-size: 15px;
  font-weight: 500;
  letter-spacing: -0.01em;
  white-space: nowrap;
  transition: color 0.2s;
}

.marquee-item:hover {
  color: var(--ink);
}

.marquee-item .provider-mark {
  width: 22px;
  height: 22px;
  border-radius: 4px;
  font-size: 11px;
}

@keyframes marquee {
  to { transform: translateX(-50%); }
}

/* ==========================================================================
   03 GPU
   ========================================================================== */
.gpu-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  align-items: center;
  gap: 64px;
}

.gpu-copy .section-copy {
  margin-top: 24px;
}

.gpu-actions,
.os-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-top: 32px;
}

.gpu-actions .btn,
.os-actions .btn {
  min-height: 42px;
  padding: 0 18px;
}

.gpu-card {
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--panel);
  color: var(--panel-ink);
  transition-delay: 0.1s;
}

.gpu-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 22px;
  border-bottom: 1px solid var(--panel-line);
}

.gpu-card-brand {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.badge-live {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 10px;
  border: 1px solid rgb(156 208 255 / 0.3);
  border-radius: 999px;
  background: rgb(156 208 255 / 0.08);
  color: var(--panel-accent);
  font-size: 12px;
}

.badge-live i {
  background: var(--panel-accent);
}

.gpu-stage {
  display: grid;
  place-items: center;
  padding: 28px 20px;
  background:
    radial-gradient(ellipse 55% 60% at 50% 48%, rgb(156 208 255 / 0.12), transparent 70%),
    radial-gradient(ellipse 40% 30% at 50% 82%, rgb(241 220 174 / 0.06), transparent 70%);
}

/* Photo is on pure black: screen blending drops the black into the panel. */
/* <picture> 只是格式选择的包装，不参与布局，让 img 直接做网格项 */
.gpu-stage picture {
  display: contents;
}

.gpu-photo {
  display: block;
  width: 100%;
  max-width: 560px;
  height: auto;
  mix-blend-mode: screen;
  -webkit-mask-image: radial-gradient(ellipse 72% 78% at 50% 48%, #000 62%, transparent 100%);
  mask-image: radial-gradient(ellipse 72% 78% at 50% 48%, #000 62%, transparent 100%);
  animation: float 6s ease-in-out infinite;
}

@keyframes float {
  50% { transform: translateY(-8px); }
}

.gpu-details {
  display: grid;
  grid-template-columns: 1fr 1fr;
  margin: 0;
  border-top: 1px solid var(--panel-line);
}

.gpu-details div {
  padding: 18px 22px;
}

.gpu-details div + div {
  border-left: 1px solid var(--panel-line);
}

.gpu-details dt {
  color: var(--panel-muted);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.gpu-details dd {
  margin: 6px 0 0;
  font-size: 16px;
  font-weight: 500;
}

/* ==========================================================================
   04 安全可信
   ========================================================================== */
.trust-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.trust-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--border-subtle);
  border-radius: 6px;
  background: var(--surface);
  transition: border-color 0.25s, transform 0.25s var(--ease-out), opacity 0.8s var(--ease-out);
}

a.trust-card:hover {
  border-color: var(--border);
}

.trust-card:nth-child(2n) {
  transition-delay: 0.08s;
}

.trust-visual {
  position: relative;
  display: grid;
  place-items: center;
  height: 272px;
  padding: 24px 28px 52px;
  border-bottom: 1px solid var(--border-subtle);
  background:
    radial-gradient(circle at 1px 1px, var(--border-subtle) 1px, transparent 0) 0 0 / 16px 16px,
    var(--surface-2);
}

/* 图示下方的一句话说明，跟着动画步骤切换 */
.trust-caption {
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 20px;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 12px;
  text-align: center;
  transition: opacity 0.18s, transform 0.18s;
}

.trust-caption::before {
  content: "";
  flex: none;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent-strong);
}

.trust-caption:empty,
.trust-caption.is-swapping {
  opacity: 0;
  transform: translateY(3px);
}

.trust-copy {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 24px 26px 26px;
}

.trust-copy h3 {
  font-size: 20px;
  font-weight: 500;
  letter-spacing: -0.015em;
}

.trust-copy p {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.65;
}

.trust-action {
  margin-top: 8px;
  font-size: 13px;
  font-weight: 500;
  transition: color 0.2s;
}

.trust-card:hover .trust-action,
.trust-action:hover {
  color: var(--accent-ink);
}

/* 场景 1：应用记录，只留元数据 */
.terminal {
  width: min(100%, 400px);
}

.log-zdr {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 9px;
  border: 1px solid var(--panel-line);
  border-radius: 999px;
  color: var(--panel-faint);
  font-size: 11px;
  transition: color 0.3s, border-color 0.3s, background 0.3s;
}

.log-zdr i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--panel-faint);
  transition: background 0.3s, box-shadow 0.3s;
}

[data-step="2"] .log-zdr,
[data-step="3"] .log-zdr {
  border-color: rgb(156 208 255 / 0.45);
  background: rgb(156 208 255 / 0.08);
  color: var(--panel-accent);
}

[data-step="2"] .log-zdr i,
[data-step="3"] .log-zdr i {
  background: var(--panel-accent);
  box-shadow: 0 0 0 3px rgb(156 208 255 / 0.2);
}

.terminal-body {
  padding: 12px 18px 14px;
  font-family: var(--font-mono);
  font-size: 12.5px;
  line-height: 1.9;
}

.log-row {
  display: grid;
  grid-template-columns: 3.4em minmax(0, 1fr) auto;
  align-items: baseline;
  gap: 12px;
  opacity: 0;
  transform: translateX(-6px);
  transition: opacity 0.35s, transform 0.35s var(--ease-out);
}

[data-step]:not([data-step="0"]) .log-row {
  opacity: 1;
  transform: none;
}

[data-step="1"] .log-row {
  transition-delay: calc(var(--i) * 0.22s);
}

.log-k {
  color: var(--panel-faint);
}

.log-v {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  transition: filter 0.5s, opacity 0.5s;
}

.log-tag {
  font-size: 11px;
  font-style: normal;
  opacity: 0;
  transform: translateX(4px);
  transition: opacity 0.35s, transform 0.35s var(--ease-out);
}

.is-meta .log-tag {
  color: var(--panel-accent);
}

.is-content .log-tag {
  color: var(--panel-warm);
}

[data-step="3"] .log-tag {
  opacity: 1;
  transform: none;
}

[data-step="3"] .is-content .log-v {
  filter: blur(3px);
  opacity: 0.45;
}

[data-step="3"] .is-content .log-v,
[data-step="3"] .is-content .log-tag {
  transition-delay: 0.5s;
}

/* 场景 2：按留存政策筛路由 */
/* 场景容器是单列网格：不限制列宽时，列会被俄文长标题撑过容器，面板跟着溢出 */
[data-scene="zdr"] {
  grid-auto-columns: minmax(0, 1fr);
}

.zdr-panel {
  width: min(100%, 380px);
  max-width: 100%;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface);
  box-shadow: 0 18px 40px var(--shadow);
  transition: opacity 0.4s, transform 0.4s var(--ease-out);
}

[data-step="0"] .zdr-panel {
  opacity: 0;
  transform: translateY(6px);
}

.zdr-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border-subtle);
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 11.5px;
  white-space: nowrap;
}

/* 标题过长时省略，不把面板撑宽 */
.zdr-head > span:first-child {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.zdr-filter {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: color 0.3s;
}

.mini-switch {
  position: relative;
  width: 28px;
  height: 16px;
  border-radius: 999px;
  background: var(--border);
  transition: background 0.3s;
}

.mini-switch::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 2px rgb(0 0 0 / 0.25);
  transition: transform 0.3s var(--ease-out), background 0.3s;
}

[data-step="2"] .zdr-filter,
[data-step="3"] .zdr-filter,
[data-step="4"] .zdr-filter {
  color: var(--accent-ink);
}

[data-step="2"] .mini-switch,
[data-step="3"] .mini-switch,
[data-step="4"] .mini-switch {
  background: var(--accent);
}

[data-step="2"] .mini-switch::after,
[data-step="3"] .mini-switch::after,
[data-step="4"] .mini-switch::after {
  transform: translateX(12px);
  background: var(--accent-fg);
}

.zdr-list {
  display: grid;
  gap: 4px;
  margin: 0;
  padding: 6px;
  list-style: none;
}

.zdr-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 12px;
  height: 36px;
  padding: 0 10px;
  border-radius: 4px;
  font-size: 13px;
  box-shadow: inset 2px 0 0 transparent;
  transition: opacity 0.4s, background 0.4s, box-shadow 0.4s;
}

.zdr-policy {
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 11.5px;
  transition: color 0.4s;
}

.zdr-tag {
  display: grid;
  min-width: 4.4em;
  font-size: 11.5px;
  font-style: normal;
  text-align: right;
}

.zdr-tag > span {
  grid-area: 1 / 1;
  opacity: 0;
  transition: opacity 0.3s;
}

[data-step="3"] .zdr-row.is-out,
[data-step="4"] .zdr-row.is-out {
  opacity: 0.45;
}

[data-step="3"] .is-out .zdr-name,
[data-step="3"] .is-out .zdr-policy,
[data-step="4"] .is-out .zdr-name,
[data-step="4"] .is-out .zdr-policy {
  text-decoration: line-through;
}

[data-step="3"] .is-out .t-ok,
[data-step="4"] .is-out .t-ok {
  opacity: 1;
  color: var(--subtle);
}

[data-step="3"] .zdr-row.is-zdr,
[data-step="4"] .zdr-row.is-zdr {
  box-shadow: inset 2px 0 0 var(--accent-strong);
}

[data-step="3"] .is-zdr .zdr-policy,
[data-step="4"] .is-zdr .zdr-policy {
  color: var(--accent-ink);
}

[data-step="3"] .is-zdr .t-ok,
[data-step="4"] .is-zdr:not(.is-pick) .t-ok,
[data-step="4"] .is-pick .t-pick {
  opacity: 1;
  color: var(--accent-ink);
}

[data-step="4"] .zdr-row.is-pick {
  background: var(--accent-soft);
}

/* 场景 3：每个请求只发往一家供应商 */
.route-flow {
  display: grid;
  grid-template-columns: auto minmax(20px, 1fr) auto 44px auto;
  align-items: center;
  width: 100%;
  max-width: 480px;
  font-family: var(--font-mono);
  font-size: 12px;
}

.route-req {
  padding: 8px 12px;
  border-radius: 3px;
  background: var(--accent);
  color: var(--accent-fg);
  font-weight: 500;
  white-space: nowrap;
  transition: opacity 0.3s, transform 0.3s var(--ease-out);
}

.route-req b {
  font-weight: 500;
}

[data-step="0"] .route-req {
  opacity: 0;
  transform: translateX(-6px);
}

.route-line {
  position: relative;
  height: 1px;
  margin: 0 8px;
  background: var(--border);
}

.route-dot {
  position: absolute;
  top: -3px;
  left: 0;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent-strong);
  opacity: 0;
}

[data-step="1"] .route-dot {
  left: calc(100% - 7px);
  opacity: 1;
  transition: left 0.9s cubic-bezier(0.45, 0, 0.25, 1) 0.2s;
}

[data-step="2"] .route-dot,
[data-step="3"] .route-dot {
  left: calc(100% - 7px);
  transition: opacity 0.2s;
}

.route-core {
  position: relative;
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  transition: border-color 0.3s;
}

.route-core::after {
  content: "TTapi";
  position: absolute;
  top: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%);
  color: var(--subtle);
  font-size: 10.5px;
}

.route-core {
  --leaf-gap: var(--surface);
}

.route-core .logo-mark {
  width: 30px;
  height: 23px;
}

[data-step="2"] .route-core {
  border-color: var(--accent-ink);
  animation: route-pulse 0.8s var(--ease-out);
}

@keyframes route-pulse {
  from { box-shadow: 0 0 0 0 rgb(77 151 223 / 0.45); }
  to { box-shadow: 0 0 0 12px rgb(77 151 223 / 0); }
}

.route-fan {
  display: block;
  width: 44px;
  height: 118px;
  overflow: visible;
}

.route-branch {
  fill: none;
  stroke: var(--border);
  stroke-dasharray: 3 3;
}

.route-lit {
  fill: none;
  stroke: var(--accent-strong);
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  opacity: 0;
  transition: opacity 0.3s, stroke-dashoffset 0s 0.3s;
}

[data-step="3"] .route-lit.is-target {
  stroke-dashoffset: 0;
  opacity: 1;
  transition: stroke-dashoffset 0.5s var(--ease-out);
}

.route-stack {
  display: grid;
  gap: 8px;
}

.route-prov {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  height: 34px;
  padding: 0 12px;
  border: 1px solid var(--border-subtle);
  border-radius: 3px;
  background: var(--surface);
  color: var(--subtle);
  white-space: nowrap;
  transition: border-color 0.35s, color 0.35s, box-shadow 0.35s, opacity 0.35s;
}

.route-prov em {
  min-width: 4.6em;
  font-size: 11px;
  font-style: normal;
  text-align: right;
  opacity: 0;
  transition: opacity 0.3s;
}

.route-prov em::after {
  content: "未收到";
}

.route-prov.is-target em::after {
  content: "✓ 已发送";
}

[data-step="3"] .route-prov em {
  opacity: 1;
  transition-delay: 0.4s;
}

[data-step="3"] .route-prov:not(.is-target) {
  opacity: 0.55;
}

[data-step="3"] .route-prov.is-target {
  border-color: var(--accent-ink);
  color: var(--ink);
  box-shadow: inset 2px 0 0 var(--accent-strong);
  transition-delay: 0.4s;
}

[data-step="3"] .route-prov.is-target em {
  color: var(--accent-ink);
}

/* 场景 4：缓存参数原样透传 */
.cache-demo {
  display: grid;
  gap: 14px;
  width: min(100%, 380px);
}

.cache-track {
  font-family: var(--font-mono);
  font-size: 11.5px;
}

.cache-rail {
  position: relative;
  height: 36px;
  margin: 0 4px;
}

.cache-rail::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 4px;
  height: 1px;
  background: var(--border);
}

.cache-rail > i {
  position: absolute;
  bottom: 1px;
  width: 7px;
  height: 7px;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: var(--surface);
  transform: translateX(-50%);
  transition: background 0.3s, border-color 0.3s;
}

.cache-rail > i:nth-of-type(1) { left: 0; }
.cache-rail > i:nth-of-type(2) { left: 50%; }
.cache-rail > i:nth-of-type(3) { left: 100%; }

[data-step="1"] .cache-rail > i:nth-of-type(1),
[data-step="2"] .cache-rail > i:nth-of-type(2),
[data-step="3"] .cache-rail > i:nth-of-type(3) {
  border-color: var(--accent-ink);
  background: var(--accent-strong);
}

.cache-chip {
  position: absolute;
  bottom: 14px;
  left: 0;
  display: grid;
  justify-items: center;
  padding: 3px 10px;
  border: 1px solid var(--accent-ink);
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-ink);
  white-space: nowrap;
  opacity: 0;
  transition: opacity 0.2s, left 0s 0.2s, transform 0s 0.2s;
}

.cache-chip > span {
  grid-area: 1 / 1;
  transition: opacity 0.25s;
}

.chip-off,
[data-cache="off"] .chip-on {
  opacity: 0;
}

[data-cache="off"] .chip-off {
  opacity: 1;
}

[data-cache="off"] .cache-chip {
  border-style: dashed;
  border-color: var(--border);
  background: var(--surface);
  color: var(--subtle);
}

[data-step="1"] .cache-chip,
[data-step="2"] .cache-chip,
[data-step="3"] .cache-chip {
  opacity: 1;
  transition:
    opacity 0.3s,
    left 0.8s cubic-bezier(0.45, 0, 0.25, 1),
    transform 0.8s cubic-bezier(0.45, 0, 0.25, 1);
}

[data-step="2"] .cache-chip {
  left: 50%;
  transform: translateX(-50%);
}

[data-step="3"] .cache-chip {
  left: 100%;
  transform: translateX(-100%);
}

.cache-stops {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 8px 0 0;
  padding: 0;
  color: var(--muted);
  list-style: none;
}

.cache-stops li {
  display: grid;
  gap: 3px;
  white-space: nowrap;
}

.cache-stops li:nth-child(2) {
  justify-items: center;
}

.cache-stops li:nth-child(3) {
  justify-items: end;
}

.cache-note {
  display: grid;
  justify-items: inherit;
}

.cache-note em {
  grid-area: 1 / 1;
  font-size: 11px;
  font-style: normal;
  color: var(--accent-ink);
  opacity: 0;
  transition: opacity 0.3s;
}

.cache-note .is-off {
  color: var(--subtle);
}

[data-step="2"] li:nth-child(2) .cache-note em,
[data-step="3"] li:nth-child(2) .cache-note em,
[data-step="3"] .cache-note .is-on,
[data-cache="off"][data-step="3"] .cache-note .is-off {
  opacity: 1;
  transition-delay: 0.6s;
}

[data-cache="off"][data-step="3"] .cache-note .is-on {
  opacity: 0;
  transition-delay: 0s;
}

.cache-focus {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface);
  box-shadow: 0 18px 40px var(--shadow);
}

.cache-icon {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 6px;
  background: var(--accent-soft);
  color: var(--accent-ink);
}

.cache-title {
  display: grid;
  margin-right: auto;
}

.cache-title strong {
  font-size: 14px;
  font-weight: 500;
}

.cache-title small {
  color: var(--muted);
  font-size: 12px;
}

.switch {
  position: relative;
  width: 44px;
  height: 24px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: var(--border);
  transition: background 0.25s;
}

.switch i {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgb(0 0 0 / 0.3);
  transition: transform 0.25s var(--ease-out);
}

.switch[aria-checked="true"] {
  background: var(--accent);
}

.switch[aria-checked="true"] i {
  transform: translateX(20px);
  background: var(--accent-fg);
}

/* ==========================================================================
   开源项目
   ========================================================================== */
.opensource {
  background:
    radial-gradient(ellipse 50% 60% at 85% 40%, var(--accent-soft), transparent 70%),
    var(--canvas);
}

.opensource[hidden] {
  display: none;
}

.os-spread {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  align-items: end;
  gap: 64px;
}

.os-story .section-copy {
  margin-top: 24px;
}

.os-license {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
}

.studio-features {
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--border);
}

.studio-features li {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  gap: 16px;
  padding: 20px 0;
  border-bottom: 1px solid var(--border-subtle);
}

.studio-index {
  padding-top: 4px;
  color: var(--accent-ink);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.06em;
}

.studio-features strong {
  display: block;
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.3;
}

.studio-features p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
}

.os-provenance {
  margin-top: 20px;
  color: var(--subtle);
  font-family: var(--font-mono);
  font-size: 11px;
}

/* ==========================================================================
   05 出售算力
   ========================================================================== */
.seller-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  align-items: center;
  gap: 64px;
}

.seller-copy .section-copy {
  margin-top: 24px;
}

.steps {
  display: grid;
  gap: 0;
  margin-top: 32px;
  border-top: 1px solid var(--border-subtle);
  counter-reset: step;
}

.steps li {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 0;
  border-bottom: 1px solid var(--border-subtle);
  font-size: 15px;
  counter-increment: step;
}

.steps li::before {
  content: "0" counter(step);
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 12px;
}

.seller-form {
  display: grid;
  gap: 16px;
  padding: 32px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface);
  box-shadow: 0 24px 58px var(--shadow);
}

.form-label {
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.segmented {
  display: grid;
  grid-template-columns: 1fr 1fr;
  padding: 4px;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius);
  background: var(--canvas);
}

.segmented label {
  position: relative;
  cursor: pointer;
}

.segmented input {
  position: absolute;
  opacity: 0;
}

.segmented span {
  display: grid;
  place-items: center;
  min-height: 40px;
  padding: 6px 8px;
  border-radius: 3px;
  line-height: 1.2;
  text-align: center;
  color: var(--muted);
  font-size: 14px;
  font-weight: 500;
  transition: background 0.2s, color 0.2s;
}

.segmented input:checked + span {
  background: var(--surface-3);
  color: var(--ink);
  box-shadow: inset 0 0 0 1px var(--border);
}

.segmented input:focus-visible + span {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.seller-hint {
  min-height: 44px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
}

.form-note {
  color: var(--muted);
  font-size: 13px;
  text-align: center;
}

.form-note a {
  color: var(--ink);
  border-bottom: 1px solid var(--border);
}

.form-note a:hover {
  border-color: var(--ink);
}

/* ==========================================================================
   页脚
   ========================================================================== */
.site-footer {
  padding: 72px 0 0;
  overflow: hidden;
}

.footer-top {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
  gap: 48px;
}

.footer-brand p {
  margin-top: 14px;
  max-width: 260px;
  color: var(--muted);
  font-size: 14px;
}

.footer-cols {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 32px;
}

.footer-cols div {
  display: grid;
  align-content: start;
  gap: 10px;
}

.footer-cols h3 {
  margin-bottom: 6px;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.footer-cols a {
  width: fit-content;
  font-size: 14px;
  transition: color 0.2s;
}

.footer-cols a:hover {
  color: var(--accent-ink);
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 64px;
  padding: 20px 0;
  border-top: 1px solid var(--border-subtle);
  color: var(--muted);
  font-size: 13px;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: color 0.2s;
}

a.status-pill:hover {
  color: var(--ink);
}

.footer-wordmark {
  margin-bottom: -0.2em;
  font-size: clamp(80px, 19vw, 280px);
  font-weight: 600;
  letter-spacing: -0.06em;
  line-height: 1;
  text-align: center;
  color: transparent;
  background: linear-gradient(180deg, var(--soft), transparent 85%);
  -webkit-background-clip: text;
  background-clip: text;
  user-select: none;
}

/* ==========================================================================
   响应式
   ========================================================================== */
@media (max-width: 1080px) {
  .nav,
  .desktop-only {
    display: none;
  }

  .menu-toggle {
    display: inline-grid;
  }

  .integration-main,
  .gpu-layout,
  .os-spread,
  .seller-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .integration-visual {
    border-left: 0;
    border-top: 1px solid var(--border-subtle);
  }

  .mechanisms {
    grid-template-columns: minmax(0, 1fr);
  }

  .mechanism,
  .mechanism:first-child,
  .mechanism:last-child {
    padding: 28px 0 20px;
  }

  .mechanism + .mechanism {
    border-left: 0;
    border-top: 1px solid var(--border-subtle);
  }

  .mechanism-art {
    height: auto;
    aspect-ratio: 3 / 2;
  }

  .footer-top {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* 平板：三条路径改为「图示在左、文案在右」，避免图示被拉得过宽 */
@media (max-width: 1080px) and (min-width: 761px) {
  .mechanism {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    column-gap: 40px;
    align-items: center;
  }

  .mechanism-top {
    grid-column: 1 / -1;
  }

  .mechanism-art {
    margin-bottom: 0;
  }

  .mechanism-copy {
    margin-top: 16px;
  }
}

/* 手机：图示单独一行，限制最大宽度并居中 */
@media (max-width: 760px) {
  .mechanism-art {
    width: 100%;
    max-width: 440px;
    margin: 18px auto 26px;
  }
}

@media (max-width: 760px) {
  body {
    font-size: 14px;
  }

  .section {
    padding: 72px 0;
  }

  .section-head {
    grid-template-columns: minmax(0, 1fr);
    margin-bottom: 36px;
  }

  .hero-support {
    flex-direction: column;
    align-items: flex-start;
    gap: 24px;
  }

  .hero-actions {
    width: 100%;
    flex-wrap: wrap;
  }

  .hero-btn {
    flex: 1;
    gap: 12px;
  }

  .counter {
    --counter-size: clamp(27px, 8.15vw, 64px);
  }

  .counter-frame {
    grid-template-columns: minmax(0, 1fr);
    gap: 20px;
    padding: 36px 0;
  }

  .counter-metric {
    text-align: left;
  }

  .catalog-toolbar {
    flex-direction: column;
    align-items: stretch;
    padding: 0 0 12px;
  }

  .catalog-tabs {
    border-bottom: 1px solid var(--border-subtle);
    padding: 0 8px;
  }

  .search {
    margin: 0 12px;
    min-width: 0;
  }

  .details {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding-left: 0;
  }

  /* 手机只需要 960px 宽的首屏照片（41 KB），不下载 2000px 的大图（206 KB） */
  .art-photo--day {
    background-image: url("hero-day.jpg");
    background-image: image-set(url("hero-day-960.webp") type("image/webp"), url("hero-day.jpg") type("image/jpeg"));
  }

  .integration-copy {
    padding: 36px 24px;
  }

  /* 窄屏下 Base URL 换行完整显示，不再省略 */
  .endpoint {
    flex-wrap: wrap;
    padding: 10px 10px 12px 14px;
  }

  .endpoint .copy-btn {
    margin-left: auto;
  }

  .endpoint code {
    flex: 1 1 100%;
    order: 3;
    white-space: normal;
    word-break: break-all;
  }

  .integration-visual {
    padding: 24px 16px;
  }

  .code-block {
    font-size: 12px;
    padding: 16px;
  }

  .trust-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .trust-visual {
    height: 256px;
    padding: 18px 16px 48px;
  }

  .route-flow {
    font-size: 11px;
  }

  .route-req {
    padding: 7px 9px;
  }

  .route-core {
    width: 44px;
    height: 44px;
  }

  /* 窄屏只留 ✓ / ✕，文字交给下方说明 */
  .route-prov em {
    min-width: 1em;
  }

  .route-prov em::after {
    content: "✕";
  }

  .route-prov.is-target em::after {
    content: "✓";
  }

  .seller-form {
    padding: 24px;
  }

  .footer-cols {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .more-menu {
    display: none;
  }
}

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

  /* 加载层内部元素的延时也归零，否则在它退场前 logo 和文案都还没来得及出现，只剩一个空圆盘。
     注意不能作用于 .preloader 本身：它那条 6 秒后自动淡出的兜底动画要保留延时 */
  .preloader * {
    animation-delay: 0s !important;
    transition-delay: 0s !important;
  }

  .js .reveal {
    opacity: 1;
    transform: none;
  }

  .fx-rate::after {
    display: none;
  }

  /* 降价原理图示：不播放，直接停在"故事讲完"的那一帧 */
  .m-svg * {
    animation: none !important;
  }

  .js .m-wire {
    stroke-dashoffset: 0;
  }

  .js .m-flow {
    opacity: 0.5;
  }
}

/* ==========================================================================
   多语言：语言切换控件 + 各语言的字体与首屏字号
   ========================================================================== */
/* 英文 / 俄文：系统无衬线字体排在中文字体之前，网页字体加载失败时不会退化成中文字体的拉丁字形 */
html:lang(en),
html:lang(ru) {
  --font-ui: "Switzer", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial,
    "PingFang SC", "Microsoft YaHei", sans-serif;
}

/* 拉丁 / 西里尔字母比汉字"瘦"，首屏标题略微收小并允许换行，避免一行塞不下 */
html:not(:lang(zh)) .hero {
  --hero-lead-size: clamp(26px, 3.3vw, 46px);
  --hero-title-size: clamp(40px, 5.2vw, 76px);
}

html:not(:lang(zh)) .hero-intro h1 > span,
html:not(:lang(zh)) .hero-arrival > span {
  text-wrap: balance;
}

html:not(:lang(zh)) .hero-intro h1 em,
html:not(:lang(zh)) .hero-arrival em {
  letter-spacing: -0.035em;
  text-wrap: balance;
}

html:not(:lang(zh)) h2 {
  text-wrap: balance;
}

/* 顶栏语言切换：和主题按钮同高同风格 */
.lang-switch {
  position: relative;
  display: inline-flex;
  align-items: center;
  height: 36px;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius);
  color: var(--ink);
  transition: background 0.2s, border-color 0.2s;
}

.lang-switch:hover {
  background: var(--soft);
  border-color: var(--border);
}

.lang-switch:focus-within {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.lang-icon,
.lang-chevron {
  position: absolute;
  pointer-events: none;
}

.lang-icon {
  left: 10px;
}

.lang-chevron {
  right: 8px;
  opacity: 0.7;
}

.lang-switch select {
  height: 100%;
  padding: 0 24px 0 32px;
  border: 0;
  border-radius: inherit;
  background: transparent;
  color: inherit;
  font-size: 13px;
  font-weight: 500;
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
  outline: 0;
}

.lang-switch select option {
  color: var(--ink);
  background: var(--surface);
}

/* 手机菜单里的语言行 */
.mobile-lang {
  display: flex;
  gap: 8px;
  padding: 16px 0 4px;
}

.mobile-lang button {
  flex: 1;
  height: 40px;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius);
  background: transparent;
  font-size: 14px;
  font-weight: 500;
  transition: background 0.2s, border-color 0.2s;
}

.mobile-lang button[aria-pressed="true"] {
  background: var(--soft);
  border-color: var(--border-strong);
}

@media (max-width: 760px) {
  .lang-switch {
    display: none;
  }
}

/* ==========================================================================
   联系客服弹窗（微信二维码）
   ========================================================================== */
html.is-modal-open {
  overflow: hidden;
  scrollbar-gutter: stable;
}

.contact-modal {
  width: min(380px, calc(100vw - 32px));
  max-width: none;
  max-height: calc(100dvh - 32px);
  margin: auto;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) * 2);
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 32px 80px var(--shadow);
  overflow: auto;
  overscroll-behavior: contain;
}

.contact-modal::backdrop {
  background: rgb(11 23 36 / 0.42);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}

.contact-modal[open] {
  animation: contact-in 0.36s var(--ease-out);
}

.contact-modal[open]::backdrop {
  animation: contact-fade 0.3s ease-out;
}

@keyframes contact-in {
  from {
    opacity: 0;
    transform: translateY(14px) scale(0.97);
  }
}

@keyframes contact-fade {
  from {
    opacity: 0;
  }
}

.contact-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 30px 28px 26px;
  text-align: center;
}

/* 顶部一道浅蓝色细条，和站内强调色呼应 */
.contact-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), var(--accent-strong));
}

.contact-close {
  position: absolute;
  top: 12px;
  right: 12px;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 0;
  border-radius: var(--radius);
  background: transparent;
  color: var(--muted);
  transition: background 0.2s, color 0.2s;
}

.contact-close:hover {
  background: var(--soft);
  color: var(--ink);
}

.contact-head {
  display: flex;
  align-items: center;
  gap: 8px;
}

.contact-eyebrow {
  color: var(--accent-ink);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.04em;
}

.contact-title {
  margin-top: 14px;
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.3;
}

.contact-desc {
  max-width: 300px;
  margin-top: 8px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
  text-wrap: pretty;
}

/* 二维码底色在深色主题下也保持白色，保证能扫出来 */
.contact-qr {
  margin-top: 22px;
  padding: 12px;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: 0 0 0 6px var(--accent-soft);
}

.contact-qr img {
  width: 216px;
  height: 216px;
}

.contact-hint {
  margin-top: 16px;
  color: var(--subtle);
  font-size: 12px;
}

.contact-save {
  margin-top: 16px;
}

/* 电脑上用不到「长按识别」，只在触屏设备上提示 */
@media (hover: hover) and (pointer: fine) {
  .contact-hint {
    display: none;
  }

  .contact-save {
    margin-top: 22px;
  }
}
