/* ===== V6 base reset + header 壳层 (REQ-V6 §6 V4式回收 / UX-V6 §7) =====
   桌面 ≥1024: 单行 ≤64 (品牌 + 3屏文字链 + README/GitHub + 主题 + 语言)
   <1024: 单行 ≤56 (品牌 ellipsis + 汉堡 44×44, 焦点圈闭在 12c) */
*,*::before,*::after{box-sizing:border-box;margin:0;padding:0;}
/* V13 门34 (R-V13-7): 横向 overflow:clip (clip 不创建滚动容器, 不破坏后代 sticky);
   纵向保持 hidden 锁死 —— AC-V6-01 主文档物理锁死口径不变 (index 轮播纵向本就不滚) */
html{height:100%;overflow-x:clip;overflow-y:hidden;}   /* 主文档物理锁死 (AC-V6-01) */
body{height:100vh;height:100dvh;overflow-x:clip;overflow-y:hidden;  /* dvh 处理移动端地址栏, vh 兜底 */
  font-family:var(--font-sans);font-size:15px;line-height:1.7;color:var(--text-primary);
  background:var(--bg-page);-webkit-font-smoothing:antialiased;}
h1,h2,h3,h4{font-family:var(--font-display);font-weight:700;line-height:1.25;text-wrap:balance;}   /* V13 F3 (issue #18 / R-V13-19): 标题换行体面, text-wrap 继承覆盖三页全部标题规则 */
a{color:var(--accent);text-decoration:none;}
a:hover{color:var(--accent-hover);}
code,.mono{font-family:var(--font-mono);}
:focus-visible{outline:2px solid var(--accent);outline-offset:2px;border-radius:2px;}
.skip-link{position:absolute;left:-9999px;top:0;display:inline-flex;align-items:center;min-height:44px;
  background:var(--accent);color:var(--on-accent);padding:var(--space-2) var(--space-4);z-index:100;border-radius:0 0 var(--radius-sm) 0;}
.skip-link:focus{left:0;color:var(--on-accent);}
.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap;border:0;}
/* 微标签 (V13 门67/64 R-V13-5: 回正文字体+降一档, 原 等宽 10px/0.12em 大写; UX-V5 §10 字阶) */
.mtag{font-size:9px;letter-spacing:0;color:var(--text-tertiary);}
.mtag--powered{font-size:8px;letter-spacing:0;}

/* ===== 星空层 (z0, 单实例, 装饰) ===== */
#starfield{position:fixed;inset:0;z-index:0;pointer-events:none;display:block;}
/* P3-NOTE 修复: ID 特异性压过 html:not(.js) canvas 兜底, 显式补无JS隐藏规则 */
html:not(.js) #starfield{display:none;}
/* ===== V5.1 vignette 暗角层 (z1, 纯 CSS, 装饰): 只压屏1透出的星空, 屏体 z10 在上不受压 ===== */
.vignette{position:fixed;inset:0;z-index:1;pointer-events:none;background:var(--vignette);}

/* ===== V6 header (z40, 固定, V4式简单结构; C1 START 大按钮/C6 移动胶囊行已删) ===== */
.site-header{position:fixed;top:0;left:0;right:0;z-index:40;height:var(--shell-h);
  background:var(--shell-glass);
  -webkit-backdrop-filter:blur(12px);backdrop-filter:blur(12px);
  border-bottom:1px solid var(--border);
  display:flex;align-items:center;gap:var(--space-4);padding-inline:var(--space-6);}
@supports not ((backdrop-filter:blur(1px)) or (-webkit-backdrop-filter:blur(1px))){
  .site-header{background:var(--bg-page);}          /* 毛玻璃不支持 → 不透明兜底 */
}
.shell-brand{display:flex;align-items:center;gap:var(--space-2);color:var(--text-primary);flex:none;}
.shell-brand .logo-word{font-size:15px;font-weight:600;letter-spacing:-.01em;white-space:nowrap;}
.shell-spacer{flex:1;}
.shell-actions{display:flex;align-items:center;gap:var(--space-2);flex:none;}
/* 屏导航文字链 + 外链 (UX-V6 §7.1): idle 次级色; active = 加重 + accent 2px 下划线 (D1) */
.nav-links{display:flex;align-items:center;gap:var(--space-5);}
.nav-ext{display:flex;align-items:center;gap:var(--space-4);}
.nav-links a,.nav-ext a{font-size:14px;font-weight:500;color:var(--text-secondary);white-space:nowrap;
  padding-block:var(--space-1);transition:color .18s ease;}
.nav-links a:hover,.nav-ext a:hover{color:var(--text-primary);}
.nav-links a.is-active{color:var(--text-primary);font-weight:600;
  text-decoration:underline;text-decoration-color:var(--accent);
  text-decoration-thickness:2px;text-underline-offset:6px;}

/* START 主按钮样式保留仅供屏1 hero CTA (08 冻结片依赖); 壳层 START 钮已删 (C1) */
.btn-start{position:relative;z-index:0;display:inline-flex;align-items:center;justify-content:center;
  height:40px;min-width:44px;padding-inline:var(--space-5);border:0;border-radius:var(--radius-pill);cursor:pointer;
  background:var(--accent);color:var(--on-accent);font-family:var(--font-sans);font-size:14px;font-weight:600;
  transition:background-color .18s ease,transform .18s ease;}
.btn-start:hover{background:var(--accent-hover);transform:translateY(-1px);}
/* V5.4 START hover glow: hover 时辉光层提亮一档 (纯 opacity, 零重排; A9 冻结随屏1保留) */
@media (hover:hover){
  .btn-start:hover::after{opacity:.6;}
  :root[data-theme="dark"] .btn-start:hover::after{opacity:.5;}
}
.btn-start:active{transform:translateY(0) scale(.98);}
.btn-start::after{content:"";position:absolute;inset:-12px;z-index:-1;border-radius:inherit;
  background:radial-gradient(closest-side,var(--glow-accent),transparent 78%);filter:blur(20px);
  opacity:.35;animation:glow-breathe 6s ease-in-out infinite alternate;}
:root[data-theme="dark"] .btn-start::after{opacity:.25;animation-name:glow-breathe-dark;}

/* 主题/语言控件 (机制继承 V4, 44×44 触控区) */
.icon-btn{display:inline-flex;align-items:center;justify-content:center;width:44px;height:44px;
  border:1px solid var(--border);border-radius:var(--radius-pill);background:transparent;cursor:pointer;
  color:var(--text-secondary);transition:color .18s ease,border-color .18s ease;}
.icon-btn:hover{color:var(--text-primary);border-color:var(--border-strong);}
.icon-btn svg{width:18px;height:18px;}
:root[data-theme="dark"] .ic-sun{display:none;}
:root:not([data-theme="dark"]) .ic-moon{display:none;}
.lang-switch{display:inline-flex;border:1px solid var(--border);border-radius:var(--radius-pill);overflow:hidden;height:44px;}
.lang-switch button{border:0;background:transparent;cursor:pointer;padding-inline:var(--space-3);height:100%;
  font-size:11px;letter-spacing:0;color:var(--text-secondary);}
.lang-switch button[aria-checked="true"]{background:var(--pill-active-bg);color:var(--pill-active-fg);}

/* ===== 汉堡 + 移动菜单 + 遮罩 (UX-V6 §7.2, V4 F8 焦点圈闭机制回收) ===== */
.hamburger{display:none;align-items:center;justify-content:center;width:44px;height:44px;flex:none;
  border:1px solid var(--border);border-radius:var(--radius-pill);background:transparent;
  color:var(--text-secondary);cursor:pointer;}
.hamburger:hover{color:var(--text-primary);border-color:var(--border-strong);}
.hamburger svg{width:20px;height:20px;}
.menu-overlay{position:fixed;top:var(--shell-h);left:0;right:0;bottom:0;z-index:39;
  background:var(--menu-veil);opacity:0;visibility:hidden;transition:opacity .2s ease;}
.menu-overlay.open{opacity:1;visibility:visible;}
.mobile-menu{position:fixed;top:var(--shell-h);right:0;z-index:41;
  width:min(320px,100%);max-width:100%;  /* V13 门34 (R-V13-7): 100vw 含滚动条宽会溢出 → 100% (fixed 定位含块=视口) */
  max-height:calc(100dvh - var(--shell-h));
  overflow-y:auto;overscroll-behavior:contain;   /* chrome 滚动豁免 (UX-V6 §7.2), 屏零溢出口径不含菜单 */
  background:var(--surface-card);   /* V13 门18 (R-V13-19): 毛玻璃→实心面 (门29 glass 清零) —— 亮档白卡 vs 暖米纸 page, 暗档 #221d18 vs #0f0e10; F24 纪律: 边缘感与投影二选一, 本面选投影 elevation (shadow-lift), 描边删除 */
  box-shadow:var(--shadow-lift);
  border-radius:0 0 0 var(--radius-lg);padding:var(--space-2) var(--space-4) var(--space-4);display:none;flex-direction:column;}
.mobile-menu.open{display:flex;}
.mobile-menu a{display:flex;align-items:center;min-height:44px;font-size:16px;color:var(--text-secondary);}
.mobile-menu a.is-active{color:var(--text-primary);font-weight:600;text-decoration:underline;
  text-decoration-color:var(--accent);text-decoration-thickness:2px;text-underline-offset:5px;}
.mobile-menu .mm-row{display:flex;align-items:center;min-height:56px;}

/* ===== 屏容器 (z10) 与三屏 (REQ-V6 §3.2: 零纵向溢出, 屏内滚动 = 缺陷) =====
   壳高经 --shell-h 传导 (64 桌面 / 56 <1024), .p-grid 公式自动吸收 —— 屏1零触碰接线 */
.screen{position:fixed;left:0;right:0;top:var(--shell-h);bottom:0;z-index:10;
  overflow:hidden;                                 /* V6: 原 overflow-y:auto → hidden (CH2 全面零溢出) */
  overscroll-behavior:contain;
  opacity:0;visibility:hidden;pointer-events:none;}
.screen.is-active{opacity:1;visibility:visible;pointer-events:auto;}
.screen.exiting{visibility:visible;pointer-events:none;}  /* 交叉窗口内旧屏仍可见但不可交互 */
/* ===== V5.2 滑移层 (§3): --shift 驱动整页纵向位移, 只用 transform =====
   跟手期无过渡 (TRACKING 直接映射); SNAP/REBOUND 由 .snap 挂过渡 (--snap-dur) */
.screen.sliding{opacity:1;visibility:visible;pointer-events:none;
  transform:translate3d(0, calc(var(--shift,0) * var(--slide-h, 100vh)), 0);}
.screen.sliding.snap{transition:transform var(--snap-dur, 520ms) cubic-bezier(.2,0,0,1);}
/* 卡堆视差补偿层 (§7): 屏移 1.0 / 卡堆净 0.55 → 外层反向补偿 -0.45·shift·H
   (shift=-p 下一页: 屏 -pH, 本层 +0.45pH, 净 -0.55pH); 只作用独立包裹层,
   .cardstack 本体 transform (rock/tilt/Z) 零触碰 */
.cardstack-parallax{transform:translate3d(0, calc(var(--shift,0) * -0.45 * var(--slide-h, 100vh)), 0);}
.screen.sliding.snap .cardstack-parallax{transition:transform var(--snap-dur, 520ms) cubic-bezier(.2,0,0,1);}
.screen-inner{max-width:1200px;margin:0 auto;padding:var(--space-8);}
/* V6 ST2-a/b 星空全覆盖根因修复 (D9): 屏2/3 满屏阅读底 --screen-bg-translucent 已删,
   改局部底带 --scrim-band 只垫内容列; 左右 gutter ≥4vw + 上下 padding 星空直出。
   屏 section / .screen--platform 无任何背景铺底 (computed = rgba(0,0,0,0)) */
.screen--scenarios .screen-inner,.screen--start .screen-inner{
  background:var(--scrim-band);border-radius:var(--radius-lg);width:min(960px,92vw);}
/* 屏内通用排版 */
.screen h2{font-size:28px;margin-bottom:var(--space-2);}
.screen .lead{color:var(--text-secondary);font-size:16px;margin-bottom:var(--space-6);}

/* ===== 响应式: header 两档 (UX-V6 §1.3: 汉堡断点 <1024, D5) ===== */
@media (max-width:1023px){
  :root{--shell-h:56px;}
  .site-header{padding-inline:var(--space-4);gap:var(--space-2);}
  .shell-brand .logo-word{font-size:13px;overflow:hidden;text-overflow:ellipsis;max-width:38vw;}
  /* 仅品牌 + 汉堡可见 (AC-V6-04); 主题/语言收进菜单, 一次点击可达 */
  .nav-links,.nav-ext,.shell-actions{display:none;}
  .hamburger{display:inline-flex;}
}
@media (max-width:767px){
  .screen-inner{padding:var(--space-5) var(--space-4);}
}

/* ===== V12 N1 溢出杠杆 (UX-V12 §5.1/D9, F7 预演实测过档): 1024~1099 档 header 加两链
   (FAQ/使用手册) 后 actions 右界越界 +22px → nav gap 22→14 / logo 词截断 / nav-ext gap 18→12;
   ≥1100 自然宽不受影响, <1024 走汉堡本无此问题; 新页同规则命中但仅两链无溢出风险 (值仍安全)
   ---- */
@media (min-width:1024px) and (max-width:1099px){
  .nav-links{gap:var(--space-3);}
  .nav-ext{gap:var(--space-3);}
  .shell-brand .logo-word{max-width:120px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
}
