@charset "UTF-8";
/* ============================================================================
   DshShell — 官网样式表
   ----------------------------------------------------------------------------
   设计语言：Apple 官网的版式纪律 + DeepSeek 品牌蓝。
   令牌来源：
     · Apple 官网公开样式（#1d1d1f / #f5f5f7 / #0066cc / tile 18px / pill 按钮）
     · DshShell 自身开屏页 wwwroot/splash.html（--accent #4d6bfe）
     · DESIGN.md 记录了每一处取舍的理由与来源
   动效原则（来自 apple-design 技能 / WWDC《Designing Fluid Interfaces》）：
     响应在按下瞬间、只动 transform 与 opacity、为 iOS 式"当前值起步"留出余量、
     尊重 prefers-reduced-motion / -transparency / -contrast。
   ========================================================================== */

/* ------------------------------------------------------------------ tokens */
:root {
  /* 画布与墨色 —— Apple 的白色 / 软铝灰 / 近黑 */
  --canvas: #ffffff;
  --stage: #f5f5f7;          /* 产品舞台灰（Apple 首页 tile-alt） */
  --stage-soft: #fbfbfd;
  --ink: #1d1d1f;
  --ink-muted: #6e6e73;      /* 正文与所有小字：白底 5.1:1，过 AA */
  /* 苹果的次灰 #86868b 在白底上只有 3.6:1，达不到 AA 正文要求，
     所以只留给非文本的装饰（对照表里的 ✕ 线、列表圆点），文字一律用 --ink-muted。 */
  --ink-soft: #86868b;
  --hairline: #d2d2d7;
  --hairline-soft: rgba(0, 0, 0, 0.08);

  /* 深色舞台 */
  --dark: #000000;
  --on-dark: #f5f5f7;
  --on-dark-muted: #a1a1a6;
  --on-dark-hairline: rgba(255, 255, 255, 0.16);

  /* 品牌蓝 —— 取自 DeepSeek / dsh 壳开屏页 */
  --accent: #4d6bfe;         /* 品牌色：只用于填充、描边、光晕等非文本处 */
  --accent-text: #3a57e8;    /* 白底上的强调文字：5.7:1 */
  --accent-solid: #3a57e8;   /* 实心按钮底色：白字 5.7:1 */
  --accent-solid-hover: #2f49cc;
  --accent-on-dark: #8fa3ff; /* 深色底上的强调文字：8.9:1 */
  --accent-wash: rgba(77, 107, 254, 0.08);

  /* 状态色 */
  --ok: #1f7a43;             /* 白底 5.4:1 */
  --warn: #c2506a;           /* 白底 4.5:1 */

  /* 字体 —— 优先平台原生字，其次中文系统字 */
  --font-ui: "SF Pro Display", "SF Pro Text", -apple-system, BlinkMacSystemFont,
             "Segoe UI Variable Display", "Segoe UI Variable Text", "Segoe UI",
             "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei UI", "Microsoft YaHei",
             system-ui, sans-serif;
  --font-mono: "SF Mono", ui-monospace, "Cascadia Mono", "JetBrains Mono", Menlo,
               Consolas, monospace;

  /* 圆角阶梯 —— Apple：卡片 12 / 瓦片 18 / 器件 30–46 / 按钮 pill */
  --r-xs: 6px;
  --r-card: 12px;
  --r-tile: 18px;
  --r-window: 12px;
  --r-pill: 999px;

  /* 低戏剧性阴影 —— Apple 靠对比与底色分区，不靠重投影 */
  --shadow-card: 0 12px 32px rgba(0, 0, 0, 0.08);
  --shadow-window:
    0 0 0 1px rgba(0, 0, 0, 0.07),
    0 2px 6px rgba(16, 24, 48, 0.05),
    0 36px 80px -28px rgba(16, 24, 48, 0.30),
    0 12px 28px -18px rgba(16, 24, 48, 0.18);

  /* 缓动 —— 0.28/0.11/0.32/1 是 Apple 官网自身的过渡曲线 */
  --ease-apple: cubic-bezier(0.28, 0.11, 0.32, 1);
  --ease-out-quart: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.4, 0, 0.6, 1);

  /* 版心 */
  --content: 1024px;
  --content-wide: 1440px;

  --subnav-h: 52px;
}

/* ------------------------------------------------------------------- reset */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--subnav-h) + 8px); }
body {
  margin: 0;
  background: var(--canvas);
  color: var(--ink);
  font-family: var(--font-ui);
  font-size: 17px;
  line-height: 1.47059;
  letter-spacing: -0.012em;
  font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
h1, h2, h3, h4, p, figure, blockquote, dl, dd { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
code, kbd, samp, pre { font-family: var(--font-mono); font-size: 0.92em; }
::selection { background: rgba(77, 107, 254, 0.22); }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}
.band-dark :focus-visible { outline-color: var(--accent-on-dark); }

/* 屏幕阅读器专用 */
.skip {
  position: fixed; top: -60px; left: 16px; z-index: 200;
  padding: 10px 18px; border-radius: var(--r-pill);
  background: var(--ink); color: #fff; font-size: 14px;
  transition: top 0.3s var(--ease-apple);
}
.skip:focus { top: 10px; }

/* --------------------------------------------------------------- typography */
.eyebrow {
  font-size: 14px; font-weight: 600; letter-spacing: 0.012em;
  color: var(--accent-text);
}
.band-dark .eyebrow { color: var(--accent-on-dark); }

.display {
  font-size: clamp(40px, 7.2vw, 80px);
  font-weight: 600;
  line-height: 1.04;
  letter-spacing: -0.032em;
}
.title-1 {
  font-size: clamp(32px, 4.6vw, 56px);
  font-weight: 600;
  line-height: 1.06;
  letter-spacing: -0.028em;
}
.title-2 {
  font-size: clamp(28px, 3.6vw, 44px);
  font-weight: 600;
  line-height: 1.08;
  letter-spacing: -0.026em;
}
.title-3 {
  font-size: clamp(22px, 2.4vw, 28px);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.02em;
}
.lede {
  font-size: clamp(19px, 2.1vw, 25px);
  font-weight: 400;
  line-height: 1.36;
  letter-spacing: -0.016em;
  color: var(--ink-muted);
}
.body { font-size: 17px; line-height: 1.47; color: var(--ink-muted); }
.small { font-size: 14px; line-height: 1.45; letter-spacing: -0.006em; color: var(--ink-muted); }
.band-dark .lede,
.band-dark .body,
.band-dark .small { color: var(--on-dark-muted); }

.mono { font-family: var(--font-mono); font-size: 0.9em; letter-spacing: 0; }

/* 行内代码 */
kbd, .k {
  display: inline-block;
  padding: 1px 6px;
  border-radius: var(--r-xs);
  background: var(--stage);
  border: 1px solid var(--hairline-soft);
  font-family: var(--font-mono); font-size: 0.86em; color: var(--ink);
  white-space: nowrap;
}
.band-dark .k { background: rgba(255, 255, 255, 0.08); border-color: rgba(255, 255, 255, 0.12); color: var(--on-dark); }

/* ------------------------------------------------------------------ layout */
.container { width: 100%; max-width: var(--content); margin: 0 auto; padding: 0 22px; }
.container-wide { width: 100%; max-width: var(--content-wide); margin: 0 auto; padding: 0 22px; }
.band { padding: clamp(72px, 9.5vw, 148px) 0; }
.band-tight { padding: clamp(56px, 6.5vw, 96px) 0; }
.band-gray { background: var(--stage); }
.band-dark { background: var(--dark); color: var(--on-dark); }
.band-dark h2, .band-dark h3 { color: var(--on-dark); }
.band-soft { background: var(--stage-soft); }

.section-head { max-width: 760px; margin: 0 auto clamp(40px, 5vw, 72px); text-align: center; }
.section-head .eyebrow { display: block; margin-bottom: 14px; }
.section-head .lede { margin-top: 18px; }

/* ------------------------------------------------------------------ buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 0 22px;
  border-radius: var(--r-pill);
  font-size: 17px; font-weight: 500; letter-spacing: -0.016em;
  transition: background-color 0.25s var(--ease-apple),
              color 0.25s var(--ease-apple),
              border-color 0.25s var(--ease-apple),
              transform 0.12s ease-out;
}
.btn:active { transform: scale(0.97); }   /* 反馈发生在按下瞬间，不在抬起之后 */
.btn-primary { background: var(--accent-solid); color: #fff; }
.btn-primary:hover { background: var(--accent-solid-hover); }
.btn-ghost { border: 1px solid var(--accent); color: var(--accent-text); background: transparent; }
.btn-ghost:hover { background: var(--accent-wash); }
.btn-sm { min-height: 32px; padding: 0 16px; font-size: 14px; }
.band-dark .btn-ghost { border-color: var(--accent-on-dark); color: var(--accent-on-dark); }
.band-dark .btn-ghost:hover { background: rgba(143, 163, 255, 0.14); }

/* Apple 招牌的一对蓝链接 */
.link-row { display: flex; flex-wrap: wrap; gap: 32px; align-items: center; }
.link-row.center { justify-content: center; }
.link-blue {
  display: inline-flex; align-items: center; gap: 4px;
  color: var(--accent-text); font-size: 17px; letter-spacing: -0.016em;
}
.link-blue:hover { text-decoration: underline; text-underline-offset: 3px; }
.link-blue .chev { font-size: 18px; transition: transform 0.25s var(--ease-apple); }
.link-blue:hover .chev { transform: translateX(3px); }
.band-dark .link-blue { color: var(--accent-on-dark); }

/* ---------------------------------------------------------------------- nav */
/* 一条产品栏。单页站点没有"全站"这一层，两层导航只会变成同一组链接放两遍。 */
.subnav {
  position: sticky; top: 0; z-index: 90;
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s var(--ease-apple), background-color 0.3s var(--ease-apple);
}
.subnav.stuck { border-bottom-color: var(--hairline-soft); background: rgba(255, 255, 255, 0.86); }
.subnav-inner {
  max-width: var(--content); margin: 0 auto; height: var(--subnav-h); padding: 0 22px;
  display: flex; align-items: center; gap: 22px;
}
.subnav-brand {
  display: flex; align-items: center; gap: 8px; flex: none;
  white-space: nowrap; transition: opacity 0.2s var(--ease-apple);
}
.subnav-brand img { width: 18px; height: 18px; }
.subnav-brand span { font-size: 19px; font-weight: 600; letter-spacing: -0.012em; }
.subnav-brand:hover { opacity: 0.72; }
.subnav-anchors { display: flex; gap: 22px; margin-left: auto; }
.subnav-anchors a {
  font-size: 12px; color: var(--ink); opacity: 0.86;
  padding: 6px 0; transition: color 0.2s var(--ease-apple), opacity 0.2s var(--ease-apple);
}
.subnav-anchors a:hover { opacity: 1; color: var(--accent-text); }
.subnav-anchors a[aria-current="true"] { color: var(--accent-text); opacity: 1; font-weight: 600; }
.subnav-right { display: flex; align-items: center; gap: 18px; flex: none; }
.subnav-gh {
  font-size: 12px; color: var(--ink); opacity: 0.86; white-space: nowrap;
  padding: 6px 0; transition: color 0.2s var(--ease-apple), opacity 0.2s var(--ease-apple);
}
.subnav-gh:hover { opacity: 1; color: var(--accent-text); }
.subnav .btn-sm { flex: none; }
.subnav-progress {
  height: 2px; width: 0%;
  background: var(--accent);
  transition: width 0.1s linear;
}

/* --------------------------------------------------------------------- hero */
.hero { padding: clamp(56px, 7vw, 104px) 0 0; text-align: center; overflow: hidden; }
.hero .eyebrow { display: block; margin-bottom: 16px; }
.hero h1 { max-width: 15em; margin: 0 auto; }
.hero .lede { max-width: 34em; margin: 22px auto 0; }
.hero-cta { margin-top: 34px; }
.hero-facts {
  display: flex; flex-wrap: wrap; justify-content: center; align-items: center;
  gap: 10px 0; margin-top: 30px;
  font-size: 13px; color: var(--ink-muted);
}
.hero-facts li { display: flex; align-items: center; }
.hero-facts li + li::before {
  content: ""; width: 3px; height: 3px; border-radius: 50%;
  background: var(--hairline); margin: 0 14px;
}
.hero-stage { margin-top: clamp(44px, 6vw, 76px); position: relative; }
.hero-stage::before {
  content: ""; position: absolute; left: 50%; top: 12%; width: 74%; aspect-ratio: 1;
  transform: translate(-50%, 0);
  background: radial-gradient(ellipse at center, rgba(77, 107, 254, 0.16), transparent 62%);
  filter: blur(30px); pointer-events: none; z-index: 0;
}
.hero-stage > * { position: relative; z-index: 1; }

/* WebGL 层（放在深色的安装区）。加载完成前完全透明，避免出现一块空画布。
   注意：这层必须在深色底上——白底上玻璃会退化成灰色方块，试过并否决了。 */
.band-dark { position: relative; overflow: hidden; }
.band-dark > .gl3d {
  position: absolute; inset: 0; z-index: 0; pointer-events: none;
  opacity: 0; transition: opacity 1.4s var(--ease-apple);
}
.band-dark > .gl3d.ready { opacity: 1; }
.gl3d canvas { display: block; width: 100%; height: 100%; }
.band-dark > .container { position: relative; z-index: 1; }
.hero-caption {
  margin: 20px auto 0; font-size: 12px; color: var(--ink-muted);
  display: flex; align-items: center; justify-content: center; gap: 14px;
}
.replay {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12px; color: var(--accent-text);
}
.replay:hover { text-decoration: underline; text-underline-offset: 3px; }
.replay .dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.replay[hidden] { display: none; }

/* -------------------------------------------------------- window（器件外观） */
.win {
  position: relative;
  width: 100%; max-width: 880px; margin: 0 auto;
  border-radius: var(--r-window);
  background: #fff;
  box-shadow: var(--shadow-window);
  overflow: hidden;
  text-align: left;
  transform-origin: 50% 0%;
}
.win-bar {
  height: 38px; display: flex; align-items: center;
  padding-left: 14px; gap: 8px;
  background: #f6f6f6;
  border-bottom: 1px solid rgba(0, 0, 0, 0.07);
  user-select: none;
}
.win-bar img { width: 15px; height: 15px; flex: none; }
.win-title { font-size: 11.5px; color: #5f5f62; letter-spacing: 0.01em; }
.win-ctl { margin-left: auto; display: flex; height: 100%; }
.win-ctl span {
  width: 46px; height: 100%; display: grid; place-items: center;
  transition: background-color 0.15s var(--ease-apple);
}
.win-ctl svg { width: 10px; height: 10px; stroke: #3d3d3f; stroke-width: 1; fill: none; }
.win-ctl span:hover { background: rgba(0, 0, 0, 0.06); }
.win-ctl .close:hover { background: #e81123; }
.win-ctl .close:hover svg { stroke: #fff; }
.win-body { position: relative; height: 496px; overflow: hidden; background: #fff; }

/* 开屏页 */
.splash {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  background:
    radial-gradient(ellipse 55% 42% at 50% 40%, rgba(77, 107, 254, 0.07), transparent 70%),
    radial-gradient(ellipse 90% 65% at 50% 115%, rgba(77, 107, 254, 0.05), transparent 60%),
    #fff;
  transition: opacity 0.55s var(--ease-apple),
              transform 0.7s var(--ease-apple),
              filter 0.55s var(--ease-apple);
}
.win[data-view="app"] .splash { opacity: 0; transform: scale(1.02); filter: blur(6px); pointer-events: none; }
.splash-mark {
  width: 68px; height: 68px; border-radius: 18px;
  border: 1px solid var(--hairline-soft); background: #fff;
  display: grid; place-items: center;
  box-shadow: 0 2px 6px rgba(20, 30, 60, 0.05), 0 20px 48px -18px rgba(77, 107, 254, 0.38);
}
.splash-mark img { width: 38px; height: 38px; }
.splash-word {
  margin-top: 26px; font-size: 24px; font-weight: 600; letter-spacing: 0.14em;
  background: linear-gradient(180deg, #20242e 30%, #555c6b 100%);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}
.splash-tag {
  margin-top: 9px; font-size: 11px; letter-spacing: 0.34em;
  text-transform: uppercase; color: var(--ink-muted);
}
/* 开屏中央元素随状态依次入场：由 JS 写入 data-step */
.win[data-step="0"] .splash-mark,
.win[data-step="0"] .splash-word,
.win[data-step="0"] .splash-tag { opacity: 0; transform: translateY(12px); }
.splash-mark, .splash-word, .splash-tag {
  transition: opacity 0.7s var(--ease-out-quart), transform 0.7s var(--ease-out-quart);
}
.win[data-step="1"] .splash-word { transition-delay: 0.1s; }
.win[data-step="1"] .splash-tag { transition-delay: 0.2s; }

.splash-foot {
  position: absolute; left: 0; right: 0; bottom: 46px;
  display: flex; flex-direction: column; align-items: center; gap: 15px;
  transition: opacity 0.4s var(--ease-apple);
}
.win[data-step="0"] .splash-foot,
.win[data-step="1"] .splash-foot { opacity: 0; }
.loader { display: flex; align-items: center; gap: 4px; height: 24px; }
.loader i {
  width: 3px; height: 24px; border-radius: 2px; background: var(--accent);
  transform: scaleY(0.4); opacity: 0.45;
  animation: line-scale 1s var(--ease-in-out) infinite;
}
.loader i:nth-child(2) { animation-delay: 0.1s; }
.loader i:nth-child(3) { animation-delay: 0.2s; }
.loader i:nth-child(4) { animation-delay: 0.3s; }
.loader i:nth-child(5) { animation-delay: 0.4s; }
@keyframes line-scale {
  0%, 40%, 100% { transform: scaleY(0.4); opacity: 0.45; }
  20%           { transform: scaleY(1);   opacity: 1; }
}
.loader.done i { animation: none; opacity: 0; transform: scaleY(0.4); transition: opacity 0.35s var(--ease-apple); }
.splash-status {
  font-size: 12.5px; letter-spacing: 0.06em; color: var(--ink-muted);
  min-height: 18px; transition: opacity 0.25s var(--ease-apple);
}
.splash-status.swap { opacity: 0; }
.splash-bar {
  width: 260px; height: 3px; border-radius: 2px;
  background: rgba(77, 107, 254, 0.14); overflow: hidden;
  opacity: 0; transition: opacity 0.3s var(--ease-apple);
}
.splash-bar.on { opacity: 1; }
.splash-bar > i {
  display: block; height: 100%; width: 0%; border-radius: 2px;
  background: var(--accent); transition: width 0.25s linear;
}
.splash-bar.sweep > i {
  width: 34%; transition: none;
  animation: sweep 1.3s var(--ease-in-out) infinite;
}
@keyframes sweep {
  0%   { transform: translateX(-110%); }
  100% { transform: translateX(320%); }
}
.splash-env {
  position: absolute; left: 0; right: 0; bottom: 18px;
  display: flex; justify-content: center; flex-wrap: wrap; gap: 0.9em;
  font-size: 11px; letter-spacing: 0.05em; color: var(--ink-muted);
  opacity: 0; transition: opacity 0.45s var(--ease-apple);
}
.splash-env.on { opacity: 1; }
.splash-env .missing { color: var(--warn); }
.splash-env .sep { opacity: 0.5; }

/* 就绪后进入的界面（示意） */
.appmock {
  position: absolute; inset: 0; display: flex;
  background: #fff;
  opacity: 0; transform: scale(1.015);
  transition: opacity 0.6s var(--ease-apple), transform 0.8s var(--ease-apple);
  pointer-events: none;
}
.win[data-view="app"] .appmock { opacity: 1; transform: none; }
.appmock-rail {
  width: 208px; flex: none; background: #fafafa;
  border-right: 1px solid var(--hairline-soft);
  padding: 14px 12px; display: flex; flex-direction: column; gap: 14px;
}
.appmock-rail .brand { display: flex; align-items: center; gap: 8px; font-size: 12.5px; font-weight: 600; }
.appmock-rail .brand img { width: 16px; height: 16px; }
.appmock-new {
  display: flex; align-items: center; gap: 7px;
  font-size: 12px; color: var(--accent-text);
  border: 1px solid rgba(77, 107, 254, 0.4); border-radius: var(--r-pill);
  padding: 6px 12px; background: var(--accent-wash);
}
.appmock-nav { display: flex; flex-direction: column; gap: 2px; margin-top: 2px; }
.appmock-nav i {
  height: 26px; border-radius: var(--r-xs); display: flex; align-items: center;
  padding: 0 10px; font-size: 12px; font-style: normal; color: var(--ink-muted);
}
.appmock-nav i.on { background: rgba(0, 0, 0, 0.05); color: var(--ink); font-weight: 500; }
.appmock-rail .foot { margin-top: auto; font-size: 10.5px; color: var(--ink-muted); }
.appmock-main { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.appmock-head {
  height: 44px; flex: none; display: flex; align-items: center; gap: 10px;
  padding: 0 18px; border-bottom: 1px solid var(--hairline-soft);
}
.appmock-head .t { font-size: 12.5px; font-weight: 600; }
.appmock-head .chip {
  margin-left: auto; font-family: var(--font-mono); font-size: 10.5px;
  padding: 2px 8px; border-radius: var(--r-xs);
  background: var(--accent-wash); color: var(--accent-text);
}
.appmock-thread { flex: 1; padding: 20px 22px; display: flex; flex-direction: column; gap: 16px; overflow: hidden; }
.bubble-user {
  align-self: flex-end; max-width: 74%;
  background: var(--stage); border-radius: 14px 14px 4px 14px;
  padding: 10px 14px; font-size: 12.5px; color: var(--ink);
}
.reply { display: flex; gap: 10px; max-width: 92%; }
.reply .avatar {
  width: 22px; height: 22px; flex: none; border-radius: 50%;
  background: var(--accent-wash); display: grid; place-items: center;
}
.reply .avatar img { width: 13px; height: 13px; }
.reply .txt { font-size: 12.5px; line-height: 1.55; color: var(--ink); }
.reply .txt .dim { color: var(--ink-muted); }
.codeblock {
  margin-top: 10px; background: #0d1117; border-radius: var(--r-xs);
  padding: 10px 12px; font-family: var(--font-mono); font-size: 11px;
  line-height: 1.55; color: #e6edf3; overflow: hidden;
}
.codeblock .c { color: #7d8590; }
.codeblock .b { color: #a5b4ff; }
.codeblock .g { color: #7ee787; }
.appmock-input {
  flex: none; margin: 0 22px 18px; display: flex; align-items: center; gap: 10px;
  border: 1px solid var(--hairline); border-radius: 14px; padding: 10px 12px;
  font-size: 12px; color: var(--ink-muted);
}
.appmock-input .send {
  margin-left: auto; width: 22px; height: 22px; border-radius: 50%;
  background: var(--accent); display: grid; place-items: center;
}
.appmock-input .send::after {
  content: ""; width: 7px; height: 7px; border-radius: 1px;
  background: #fff; transform: rotate(45deg) translate(-1px, -1px);
}
.appmock-input .caret {
  width: 1px; height: 13px; background: var(--accent);
  animation: caret 1.1s steps(2, start) infinite;
}
@keyframes caret { 0%, 50% { opacity: 1; } 50.01%, 100% { opacity: 0; } }

/* --------------------------------------------------------- 对比（为什么） */
.compare {
  display: grid; grid-template-columns: 1fr 1fr;
  border-radius: var(--r-tile); overflow: hidden;
  border: 1px solid var(--hairline-soft);
  background: #fff;
}
.compare > div { padding: 26px 28px; }
.compare .head { border-bottom: 1px solid var(--hairline-soft); }
.compare .col-b { background: var(--stage-soft); border-left: 1px solid var(--hairline-soft); }
.compare .col-head { display: flex; align-items: center; gap: 10px; }
.compare .col-head img { width: 18px; height: 18px; }
.compare .col-head .name { font-size: 17px; font-weight: 600; letter-spacing: -0.014em; }
.compare .col-head .tag {
  margin-left: auto; font-size: 11px; font-weight: 600; letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--ink-muted);
}
.compare .col-b .col-head .tag { color: var(--accent-text); }
.compare .cell { border-top: 1px solid var(--hairline-soft); }
.compare .col-b .cell { border-top-color: rgba(0, 0, 0, 0.06); }
.compare .item { display: flex; gap: 10px; align-items: flex-start; font-size: 15px; line-height: 1.45; }
.compare .col-a .item { color: var(--ink-muted); }
.compare .col-b .item { color: var(--ink); }
.compare .mk { flex: none; width: 16px; height: 16px; margin-top: 3px; }
.compare .mk-x { stroke: var(--ink-soft); }
.compare .mk-v { stroke: var(--accent); }
.compare-mobile { display: none; }
.cm-item { padding: 18px 0; border-top: 1px solid var(--hairline); }
.cm-item:first-child { border-top: 0; }
.cm-item .before,
.cm-item .after { display: flex; gap: 10px; align-items: flex-start; }
.cm-item .before { font-size: 14px; color: var(--ink-muted); }
.cm-item .before::before { content: "✕"; font-size: 11px; line-height: 1.7; flex: none; }
.cm-item .after { font-size: 15px; color: var(--ink); margin-top: 9px; }
.cm-item .after::before { content: "✓"; font-size: 12px; line-height: 1.5; flex: none; color: var(--accent-text); }

/* ------------------------------------------------------------------- tiles */
.tile-matrix {
  padding: 12px; display: grid; gap: 12px;
  max-width: 2320px; margin: 0 auto;
}
.tile {
  position: relative; overflow: hidden;
  border-radius: var(--r-tile);
  padding: clamp(34px, 4vw, 60px) clamp(24px, 3vw, 48px) 0;
  display: flex; flex-direction: column; align-items: center; text-align: center;
  min-height: 520px;
}
.tile-light { background: var(--canvas); border: 1px solid var(--hairline-soft); }
.tile-gray { background: var(--stage); }
.tile-dark { background: var(--dark); color: var(--on-dark); }
.tile .eyebrow { display: block; margin-bottom: 12px; }
.tile .title-2 { max-width: 15em; }
.tile .lede { margin-top: 12px; max-width: 26em; font-size: clamp(17px, 1.7vw, 21px); }
.tile .link-row { margin-top: 20px; }
.tile-visual { margin-top: auto; padding-top: clamp(28px, 4vw, 48px); width: 100%; }
.tile-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.tile-grid .tile { min-height: 560px; }

/* 瓦片内的小示意 */
.mini { width: 100%; max-width: 600px; margin: 0 auto; }
.card-flat {
  background: #fff; border: 1px solid var(--hairline-soft);
  border-radius: var(--r-card); padding: 16px 18px;
}
.tile-dark .card-flat { background: rgba(255, 255, 255, 0.06); border-color: rgba(255, 255, 255, 0.1); }
.row-item {
  display: flex; align-items: center; gap: 10px;
  font-size: 13px; padding: 9px 0; border-top: 1px solid var(--hairline-soft);
}
.tile-dark .row-item { border-top-color: rgba(255, 255, 255, 0.1); }
.row-item:first-child { border-top: 0; }
.row-item .n { font-family: var(--font-mono); font-size: 11px; color: var(--ink-muted); }
.row-item .v { margin-left: auto; font-family: var(--font-mono); font-size: 11.5px; color: var(--ink-muted); }
.tile-dark .row-item .v { color: var(--on-dark-muted); }
.dot { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.dot-ok { background: var(--ok); }
.dot-bad { background: var(--warn); }
.dot-idle { background: var(--hairline); }

/* 三级解析梯子 */
.ladder { display: flex; flex-direction: column; gap: 8px; }
.rung {
  display: flex; align-items: center; gap: 12px;
  background: #fff; border: 1px solid var(--hairline-soft); border-radius: var(--r-card);
  padding: 13px 16px; font-size: 13px;
  opacity: 0.55;
}
.rung.hit { opacity: 1; border-color: rgba(77, 107, 254, 0.42); box-shadow: 0 6px 20px -10px rgba(77, 107, 254, 0.4); }
.rung .idx {
  width: 20px; height: 20px; flex: none; border-radius: 50%;
  display: grid; place-items: center; font-size: 10px; font-weight: 700;
  background: var(--stage); color: var(--ink-muted);
}
.rung.hit .idx { background: var(--accent-solid); color: #fff; }
.rung .p { font-family: var(--font-mono); font-size: 11px; color: var(--ink-muted); margin-left: auto; }

/* -------------------------------------------------- 滚动叙事（双击之后） */
.story { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 5vw, 80px); align-items: start; }
.story-steps { position: relative; }
.story-step {
  min-height: 78vh; display: flex; flex-direction: column; justify-content: center;
  padding: 8vh 0;
  opacity: 0.30; transition: opacity 0.5s var(--ease-apple);
}
.story-step .idx {
  font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.08em;
  color: var(--ink-muted); margin-bottom: 16px;
}
.story-step.on { opacity: 1; }
.story-step h3 { margin-bottom: 14px; }
.story-step .body { max-width: 30em; }
.story-step .note {
  margin-top: 16px; padding-left: 14px; border-left: 2px solid var(--hairline);
  font-size: 13px; color: var(--ink-muted);
}
.story-stage { position: sticky; top: calc(var(--subnav-h) + 40px); }
.story-panel {
  border-radius: var(--r-tile); background: var(--stage);
  padding: clamp(24px, 3vw, 42px);
  display: grid; place-items: center; min-height: 440px;
}
/* 叙事舞台里的器件比首屏小一号，阴影也收一档 */
.story-panel .win { box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.07), 0 18px 44px -22px rgba(16, 24, 48, 0.3); }
.story-panel .win-body { height: 384px; }
.story-rail { display: flex; gap: 6px; justify-content: center; margin-top: 18px; }
.story-rail i {
  width: 22px; height: 3px; border-radius: 2px; background: var(--hairline);
  transition: background-color 0.35s var(--ease-apple), width 0.35s var(--ease-apple);
}
.story-rail i.on { background: var(--accent); width: 34px; }

/* 「双击」这一步：指针 + 一圈涟漪。反馈发生在按下瞬间，不在抬起之后。 */
.win-tap {
  position: absolute; left: 76%; top: 74%; width: 0; height: 0; z-index: 5;
  opacity: 0; transition: opacity 0.35s var(--ease-apple); pointer-events: none;
}
.story-panel[data-stage="1"] .win-tap { opacity: 1; }
.tap-ring {
  position: absolute; left: -16px; top: -16px; width: 32px; height: 32px;
  border-radius: 50%; border: 2px solid var(--accent);
  animation: ripple 1.9s var(--ease-out-quart) infinite;
}
.tap-cursor { position: absolute; left: -3px; top: -2px; }
.tap-cursor svg { width: 22px; height: 22px; filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3)); }
@keyframes ripple {
  0%   { transform: scale(0.2); opacity: 0.9; }
  70%  { transform: scale(1.6); opacity: 0; }
  100% { transform: scale(1.6); opacity: 0; }
}

/* ------------------------------------------------------- 进度条（深色舞台） */
.progress-demo {
  max-width: 720px; margin: 0 auto;
  background: #fff; border-radius: var(--r-tile); overflow: hidden;
  box-shadow: var(--shadow-card);
}
.progress-demo .bar-head {
  height: 34px; background: #f6f6f6; border-bottom: 1px solid rgba(0, 0, 0, 0.07);
  display: flex; align-items: center; padding-left: 12px; gap: 7px;
}
.progress-demo .bar-head img { width: 14px; height: 14px; }
.progress-demo .bar-head .t { font-size: 11px; color: #5f5f62; }
.progress-demo .bar-body {
  padding: 42px 24px 34px; display: flex; flex-direction: column; align-items: center; gap: 17px;
  background: radial-gradient(ellipse 62% 60% at 50% 34%, rgba(77, 107, 254, 0.07), transparent 70%), #fff;
}
.progress-demo .loader { height: 20px; }
.progress-demo .loader i { height: 20px; }
.progress-demo .status { font-size: 12.5px; color: var(--ink-muted); letter-spacing: 0.05em; }
.progress-demo .bar { width: 320px; max-width: 100%; height: 3px; border-radius: 2px; background: rgba(77, 107, 254, 0.14); overflow: hidden; }
.progress-demo .bar > i { display: block; height: 100%; width: 0; border-radius: 2px; background: var(--accent); transition: width 0.3s linear; }
.progress-demo .bar.sweep > i { width: 34%; transition: none; animation: sweep 1.3s var(--ease-in-out) infinite; }
.progress-demo .foot {
  display: flex; justify-content: center; flex-wrap: wrap; gap: 0.9em;
  font-size: 11px; color: var(--ink-muted); margin-top: 4px;
}
.progress-demo .foot .sep { opacity: 0.5; }
.progress-facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; margin-top: 56px; }
.fact .n {
  font-size: clamp(30px, 4vw, 44px); font-weight: 600; letter-spacing: -0.03em;
  color: var(--on-dark); font-variant-numeric: tabular-nums;
}
.fact .n small { font-size: 0.45em; font-weight: 500; letter-spacing: 0; margin-left: 4px; color: var(--on-dark-muted); }
.fact .d { margin-top: 8px; font-size: 14px; color: var(--on-dark-muted); line-height: 1.5; }
.honest {
  margin-top: 52px; padding: 22px 26px;
  border: 1px solid var(--on-dark-hairline); border-radius: var(--r-tile);
  background: rgba(255, 255, 255, 0.04);
}
.honest h4 { font-size: 15px; font-weight: 600; color: var(--on-dark); margin-bottom: 10px; }
.honest ol { counter-reset: h; display: grid; gap: 10px; }
.honest li {
  counter-increment: h; position: relative; padding-left: 30px;
  font-size: 14px; line-height: 1.55; color: var(--on-dark-muted);
}
.honest li::before {
  content: counter(h); position: absolute; left: 0; top: 0;
  width: 20px; height: 20px; border-radius: 50%;
  display: grid; place-items: center;
  background: rgba(255, 255, 255, 0.1); color: var(--on-dark);
  font-family: var(--font-mono); font-size: 11px;
}

/* --------------------------------------------------------------- 安全边界 */
.gate-grid { display: grid; grid-template-columns: 1.05fr 1fr; gap: clamp(28px, 4vw, 64px); align-items: start; }
.gate-cards { display: grid; gap: 12px; }
.gate-card {
  background: #fff; border: 1px solid var(--hairline-soft); border-radius: var(--r-tile);
  padding: 22px 24px;
}
.gate-card h4 { font-size: 17px; font-weight: 600; margin-bottom: 8px; }
.reject-list { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 18px; margin-top: 4px; }
.reject-list li {
  display: flex; align-items: center; gap: 8px;
  font-size: 13.5px; color: var(--ink-muted); padding: 5px 0;
}
.reject-list li::before { content: "✕"; color: var(--warn); font-size: 11px; flex: none; }
.accept-list { display: grid; gap: 6px; margin-top: 4px; }
.accept-list li {
  display: flex; align-items: center; gap: 8px;
  font-size: 13.5px; color: var(--ink); padding: 5px 0;
}
.accept-list li::before { content: "✓"; color: var(--ok); font-size: 12px; flex: none; }
.log-redact {
  font-family: var(--font-mono); font-size: 11.5px; line-height: 1.9;
  background: var(--stage); border-radius: var(--r-card); padding: 14px 16px;
  overflow-x: auto; white-space: nowrap;
}
.log-redact .key { color: var(--ink-muted); }
.log-redact .mask { color: var(--accent-text); background: var(--accent-wash); border-radius: 3px; padding: 0 3px; }
.log-redact .ln { color: var(--ink-muted); user-select: none; margin-right: 12px; }

/* ----------------------------------------------------------------- 下载区 */
.download-card {
  border-radius: var(--r-tile); background: var(--stage);
  padding: clamp(40px, 5vw, 76px) clamp(24px, 4vw, 64px);
  text-align: center;
}
.download-card .ver {
  display: inline-flex; align-items: center; gap: 8px; margin-bottom: 20px;
  font-size: 12px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--ink-muted);
}
.download-card .ver .pill {
  font-size: 11px; padding: 2px 9px; border-radius: var(--r-pill);
  background: var(--accent-wash); color: var(--accent-text); letter-spacing: 0.04em;
}
.download-actions { display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; margin-top: 30px; }
.hash {
  margin: 32px auto 0; max-width: 640px;
  display: flex; align-items: center; gap: 12px;
  background: #fff; border: 1px solid var(--hairline-soft); border-radius: var(--r-pill);
  padding: 10px 12px 10px 20px; text-align: left;
}
.hash .lbl { font-size: 11px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-muted); flex: none; }
.hash code {
  flex: 1; min-width: 0; font-size: 11.5px; color: var(--ink-muted);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; letter-spacing: 0.01em;
}
.hash button {
  flex: none; font-size: 12px; color: var(--accent-text); padding: 7px 14px;
  border-radius: var(--r-pill); transition: background-color 0.2s var(--ease-apple);
}
.hash button:hover { background: var(--accent-wash); }
.req-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; margin-top: 56px; text-align: left; }
.req h4 { font-size: 15px; font-weight: 600; margin-bottom: 6px; display: flex; align-items: center; gap: 8px; }
.req h4 img { width: 15px; height: 15px; }
.req p { font-size: 14px; line-height: 1.5; color: var(--ink-muted); }
.notice {
  margin-top: 36px; padding: 18px 22px; border-radius: var(--r-card);
  background: rgba(194, 80, 106, 0.05); border: 1px solid rgba(194, 80, 106, 0.22);
  font-size: 14px; line-height: 1.55; color: var(--ink-muted); text-align: left;
}
.notice b { color: var(--warn); font-weight: 600; }

/* ------------------------------------------------------------- 代码与表格 */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(20px, 3vw, 40px); align-items: start; }
.code-card {
  border-radius: var(--r-tile); overflow: hidden;
  border: 1px solid var(--hairline-soft); background: #0d1117;
}
.code-card .cap {
  display: flex; align-items: center; gap: 8px;
  padding: 12px 16px; border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 12px; color: #8b949e;
}
.code-card .cap .dots { display: flex; gap: 5px; margin-right: 4px; }
.code-card .cap .dots i { width: 9px; height: 9px; border-radius: 50%; background: #30363d; }
.code-card pre {
  margin: 0; padding: 18px; overflow-x: auto;
  font-size: 12.5px; line-height: 1.75; color: #e6edf3;
}
.code-card .c { color: #7d8590; }
.code-card .p { color: #a5b4ff; }
.code-card .s { color: #7ee787; }
.code-card .k { background: none; border: 0; padding: 0; color: #ffa657; display: inline; }

.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table.spec {
  width: 100%; border-collapse: collapse;
  font-size: 14px; min-width: 520px;
}
table.spec th {
  text-align: left; font-size: 11px; font-weight: 600; letter-spacing: 0.07em;
  text-transform: uppercase; color: var(--ink-muted);
  padding: 0 16px 12px 0; border-bottom: 1px solid var(--hairline);
}
table.spec td {
  padding: 14px 16px 14px 0; border-bottom: 1px solid var(--hairline-soft);
  vertical-align: top; color: var(--ink-muted); line-height: 1.5;
}
table.spec td:first-child { color: var(--ink); font-weight: 500; white-space: nowrap; }
table.spec tr:last-child td { border-bottom: 0; }
table.spec td .k { font-size: 12px; }

.plain-list { display: grid; gap: 14px; }
.plain-list li {
  display: flex; gap: 12px; align-items: flex-start;
  font-size: 15px; line-height: 1.5; color: var(--ink-muted);
}
.plain-list li::before {
  content: ""; flex: none; width: 5px; height: 5px; border-radius: 50%;
  background: var(--ink-soft); margin-top: 9px;
}
.plain-list li b { color: var(--ink); font-weight: 600; }

/* ---------------------------------------------------------------- 页脚 */
/* 注意：类名必须是 .site-foot。器件示意里也有 .foot（进度条演示的环境行、
   应用示意左边的版本行），用裸 .foot 会让它们吃到页脚的底色与内边距。 */
.site-foot { background: var(--stage); padding: 48px 0 40px; font-size: 12px; color: var(--ink-muted); }
.site-foot-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 28px; padding-bottom: 28px; }
.site-foot h5 { font-size: 12px; font-weight: 600; color: var(--ink); margin-bottom: 12px; }
.site-foot ul { display: grid; gap: 9px; }
.site-foot a { color: var(--ink-muted); transition: color 0.2s var(--ease-apple); }
.site-foot a:hover { color: var(--accent-text); text-decoration: underline; text-underline-offset: 2px; }
.site-foot-note { padding-top: 22px; border-top: 1px solid var(--hairline); display: grid; gap: 12px; }
.site-foot-note .brandline { display: flex; align-items: center; gap: 8px; color: var(--ink); }
.site-foot-note .brandline img { width: 15px; height: 15px; }
.site-foot-bottom { display: flex; flex-wrap: wrap; gap: 8px 20px; align-items: center; }
.site-foot-bottom .sep { color: var(--hairline); }

/* ------------------------------------------------------------ 404 页面 */
.notfound {
  min-height: 72vh; display: flex; flex-direction: column; justify-content: center;
  text-align: center;
}
.nf-mark { width: 56px; height: 56px; margin: 0 auto 28px; }
.nf-code {
  display: block; margin-bottom: 16px;
  font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.2em;
  color: var(--ink-muted);
}
.notfound h1 { margin-bottom: 18px; }
.notfound .lede { max-width: 30em; margin: 0 auto; }
.notfound .link-row { margin-top: 34px; }

/* ------------------------------------------------------------ 入场动画 */
/* 由 <head> 里的内联脚本加上 .js 才生效；没有脚本时内容直接可见 */
.js .reveal {
  opacity: 0; transform: translateY(22px);
  transition: opacity 0.8s var(--ease-apple), transform 0.8s var(--ease-apple);
  transition-delay: calc(var(--i, 0) * 80ms);
}
.js .reveal.in { opacity: 1; transform: none; }

/* ------------------------------------------------------------- 响应式 */
@media (max-width: 1068px) {
  .story { grid-template-columns: 1fr; }
  .story-stage { position: sticky; top: calc(var(--subnav-h) + 4px); order: -1; padding-bottom: 8px; background: var(--canvas); z-index: 10; }
  .story-panel { min-height: 300px; padding: 20px; }
  .story-step { min-height: auto; padding: 26px 0 34px; opacity: 0.42; }
  .story-step.on { opacity: 1; }
  .gate-grid { grid-template-columns: 1fr; }
  .req-grid { grid-template-columns: 1fr; gap: 20px; }
  .progress-facts { grid-template-columns: 1fr; gap: 26px; text-align: center; }
  .site-foot-grid { grid-template-columns: repeat(2, 1fr); gap: 24px; }
}
@media (max-width: 833px) {
  .tile-grid { grid-template-columns: 1fr; }
  .tile { min-height: auto; padding-top: 44px; }
  .tile-grid .tile { min-height: auto; }
  .split { grid-template-columns: 1fr; }
  .compare { display: none; }
  .compare-mobile { display: block; }
  /* 锚点收起来后，右侧这组要自己顶到边上 */
  .subnav-anchors { display: none; }
  .subnav-right { margin-left: auto; }
  .win-body { height: 420px; }
  .appmock-rail { display: none; }
  .reject-list { grid-template-columns: 1fr; }
  .story-stage { position: static; }
  .story-panel { min-height: 240px; }
}
@media (max-width: 560px) {
  body { font-size: 16px; }
  .container, .container-wide { padding: 0 18px; }
  .hero-facts { font-size: 12px; }
  .hero-facts li + li::before { margin: 0 9px; }
  .hash { flex-wrap: wrap; border-radius: var(--r-card); padding: 14px; }
  /* 校验值必须完整可读——宁可换行，也不要省略号 */
  .hash code { flex-basis: 100%; order: 3; white-space: normal; word-break: break-all; overflow: visible; }
  .win-body { height: 360px; }
  .appmock-input { margin: 0 14px 14px; }
  .appmock-thread { padding: 14px; }
  .site-foot-grid { grid-template-columns: 1fr; }
}

/* ------------------------------------------------- 可访问性偏好 */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  .reveal { opacity: 1 !important; transform: none !important; }
  .story-step { opacity: 1 !important; }
  /* 降级为静态切换，而不是位移与弹性 */
  .tap-ring { display: none; }
}
@media (prefers-reduced-transparency: reduce) {
  .subnav { background: #fff; backdrop-filter: none; -webkit-backdrop-filter: none; border-bottom-color: var(--hairline); }
  /* 3D 层本身就是一层半透明材质。偏好变化时用 CSS 兜底，不必等脚本重跑 */
  .gl3d { display: none; }
}
@media (prefers-contrast: more) {
  :root { --hairline: #000; --hairline-soft: rgba(0, 0, 0, 0.4); --ink-muted: #3a3a3c; --ink-soft: #3a3a3c; }
  .subnav { background: #fff; backdrop-filter: none; -webkit-backdrop-filter: none; border-bottom-color: #000; }
  .compare, .gate-card, .card-flat, .rung { border-color: rgba(0, 0, 0, 0.4); }
  .band-dark { --on-dark-muted: #d6d6d9; --on-dark-hairline: rgba(255, 255, 255, 0.5); }
}

/* 打印 —— 官网也要能读 */
@media print {
  .subnav, .hero-stage, .story-stage, .story-rail, .replay, .skip { display: none !important; }
  body { font-size: 11pt; color: #000; }
  .band, .band-tight { padding: 18pt 0; }
  .band-dark { background: #fff; color: #000; }
  .reveal, .story-step { opacity: 1 !important; transform: none !important; }
  a[href^="http"]::after { content: " (" attr(href) ")"; font-size: 9pt; color: #444; }
}
