@charset "UTF-8";
/* ===========================================================================
   Sin Clean 官网视觉系统
   ---------------------------------------------------------------------------
   基线：website/implementation/源文件/styles.css（WEB-I1 交付）
   规范：website/WEB-D2-visual-system.md（七令牌冻结，不得增删改）
   风格：试作社编辑部骨架（sinpilot.net）——发丝线、4-6px 锐角、区块编号、
   描边 chip、不透明头部+滚动投影、阅读进度条、hero 点阵底纹与索引面板。
   配色令牌、系统字体栈、无障碍纪律全部沿用 SinClean 冻结体系。
   零第三方资源：无 @import、无外链字体、无外部图片；字体走系统栈。
   =========================================================================== */

:root {
  color-scheme: dark;

  /* --- 冻结品牌令牌（WEB-D2 §1）--------------------------------------- */
  --obsidian: #070917;      /* 深渊黑：页面主背景、主 CTA 文字色 */
  --surface: #11142B;       /* 曜石蓝：卡片/导航/截图框面 */
  --text: #F4F7FF;          /* 冰川白：正文与标题 */
  --muted: #AEB6C9;         /* 雾灰：次要文字 */
  --cyan: #70E7F2;          /* 极光青：主 CTA 面、链接、焦点、光晕 */
  --violet: #8775FF;        /* 星尘紫：预留，本期不启用 */
  --healthy: #54E6A7;       /* 新叶绿：安全/成功语义（一律配文字） */
  --note: #FF3B6B;          /* 注记专用：占位与待定标记（不承担界面元素着色） */
  --note-ink: #FFB4C6;      /* 注记专用色的正文安全变体（failing 红作正文对比度不足） */

  /* --- 结构色（纯黑/纯白低透明，WEB-D2 §4）---------------------------- */
  --line: rgba(244, 247, 255, .16);
  --line-strong: rgba(244, 247, 255, .28);
  --edge-black: rgba(0, 0, 0, .40);
  --edge-white: rgba(255, 255, 255, .14);

  /* --- 排版 ------------------------------------------------------------ */
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans SC",
    "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;

  /* 字号阶梯：h1 对齐试作社编辑部曲线（收敛、克制），其余沿用 WEB-D2 §2 */
  --fs-h1: clamp(2.5rem, 3.6vw, 3.75rem);       /* 40 -> 60，系数按 sinpilot.net 实测 */
  --fs-h2: 2rem;                               /* 试作社 h2：固定 32px */
  --fs-h3: clamp(1.25rem, 1.6vw, 1.375rem);    /* 20 -> 22 */
  --fs-body: clamp(1rem, 1.1vw, 1.0625rem);    /* 16 -> 17 */
  --fs-aux: clamp(.8125rem, .9vw, .9375rem);   /* 13 -> 15 */
  --lh-body: 1.7;                               /* 试作社实测 */
  --lh-head: 1.25;
  --measure: 62ch;                              /* 正文列 <= 640px 等效行长 */

  /* --- 间距（8px 体系，WEB-D2 §3）-------------------------------------- */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --space-7: 48px;
  --space-8: 72px;
  --space-9: 96px;
  --section-gap: clamp(48px, 7vw, 96px);
  --shell-max: 1224px;                          /* 对齐试作社 container */
  --header-h: 72px;

  /* --- 形状（试作社锐角编辑部风：4/6/3px）------------------------------ */
  --radius-card: 4px;
  --radius-control: 4px;
  --radius-chip: 3px;
  --radius-panel: 6px;

  /* --- 动效（WEB-D2 §5：只动 transform/opacity，180–360ms 缓出）--------- */
  --ease: cubic-bezier(.2, .7, .3, 1);
  --dur: 220ms;
}

/* =========================== 基础 ========================================= */

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--obsidian);
  color: var(--text);
  font-family: var(--font);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  overflow-x: hidden;               /* 表格等宽内容不得造成页面横向滚动 */
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; }

a {
  color: var(--cyan);
  text-decoration: underline;        /* 颜色不单独承载状态：链接常驻下划线 */
  text-underline-offset: .2em;
  text-decoration-thickness: 1px;
}
a:hover { text-decoration-thickness: 2px; }

button { font: inherit; }

/* 禁用 JS 时 <details> 之外的一切内容都必须可读；不使用 display:none 隐藏正文 */
[hidden] { display: none !important; }

/* 焦点样式：清晰、两像素、与背景高对比 */
:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 3px;
  border-radius: 4px;
}
/* 高对比偏好下再加一圈底色描边，避免落在青色面上时看不清 */
@media (prefers-contrast: more) {
  :focus-visible { outline: 3px solid var(--text); outline-offset: 2px; }
}

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.shell {
  width: min(calc(100% - 32px), var(--shell-max));
  margin-inline: auto;
}

.muted { color: var(--muted); }

/* 跳至正文：文档第一个可聚焦元素 */
.skip-link {
  position: absolute;
  z-index: 100;
  left: 16px;
  top: -96px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  padding: 8px 20px;
  background: var(--cyan);
  color: var(--obsidian);
  font-weight: 700;
  text-decoration: none;
  border-radius: var(--radius-control);
  transition: top var(--dur) var(--ease);
}
.skip-link:focus { top: 8px; }

/* =========================== 阅读进度条 =================================== */
/* 试作社骨架：固定顶部 3px 极光青，scaleX 随滚动增长；无 JS 时保持 0 不可见 */
.reading-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: var(--cyan);
  transform: scaleX(0);
  transform-origin: 0 50%;
  z-index: 40;
  pointer-events: none;
}

/* =========================== 页头 / 导航 ================================== */
/* 试作社骨架：不透明底 + 发丝下缘线；滚动后出现投影（.is-scrolled 由脚本挂） */
.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  background: var(--obsidian);
  border-bottom: 1px solid var(--line);
  transition: box-shadow .2s ease;      /* 试作社同值：投影淡入 */
}
.site-header.is-scrolled {
  box-shadow: 0 3px 20px var(--edge-black);
}

.header-inner {
  min-height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-5);
}

.brand {
  display: inline-flex;
  align-items: center;
  min-height: 44px;                 /* 命中区 >= 44px */
  flex: none;
  padding-inline: 2px;
}
/* 对齐试作社 brand 规格：40px 级图标 + 名称的视觉量；lockup 为 888×256 字标，高 44px */
.brand img { display: block; height: 44px; width: auto; }

.desktop-nav {
  display: flex;
  align-items: center;
  gap: clamp(12px, 2vw, 28px);
  flex-wrap: wrap;
}
.desktop-nav > a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 10px 2px;
  color: var(--muted);
  text-decoration: none;
  text-underline-offset: 6px;
  white-space: nowrap;
}
.desktop-nav > a:hover { color: var(--text); text-decoration: underline; }
/* 激活态＝下划线 + 加重，不只靠颜色 */
.desktop-nav > a[aria-current="page"] {
  color: var(--text);
  font-weight: 700;
  text-decoration: underline;
  text-decoration-color: var(--cyan);
  text-decoration-thickness: 2px;
  text-underline-offset: 8px;
}

/* 语言切换：试作社同款描边分组按钮 */
.lang-switch {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 3px;
  margin-left: auto;
}
.lang-switch > a {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 6px 12px;
  font-size: var(--fs-aux);
  letter-spacing: .08em;
  color: var(--muted);
  text-decoration: none;
}
.lang-switch > a + a { border-left: 1px solid var(--line); }
.lang-switch > a:hover { color: var(--text); }
.lang-switch > a[aria-current="page"] {
  color: var(--cyan);
  box-shadow: inset 0 -2px 0 var(--cyan);
}
.mobile-nav .lang-switch { margin: var(--space-4) 0 0; }

.menu-button {
  display: none;
  width: 48px;
  height: 48px;
  padding: 12px;
  background: transparent;
  color: var(--text);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-control);
  cursor: pointer;
}
/* 汉堡只在窄屏出现：宽屏桌面导航已可见，不再需要（.js 生效点移入 900px 媒体查询） */
.menu-button span {
  display: block;
  height: 2px;
  margin: 4px 0;
  background: currentColor;
  border-radius: 2px;
}

/* 无 JS 时移动导航默认展开（正文与导航必须完整可用） */
.mobile-nav {
  display: grid;
  gap: var(--space-2);
  padding: 8px 0 20px;
}
.mobile-nav > a {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 4px 12px;
  color: var(--muted);
  text-decoration: none;
  text-underline-offset: 6px;
}
.mobile-nav > a:hover { color: var(--text); text-decoration: underline; }
.mobile-nav > a[aria-current="page"] {
  color: var(--text);
  font-weight: 700;
  text-decoration: underline;
  text-decoration-color: var(--cyan);
}
.menu-close { display: none; }
.js .menu-close {
  display: block;
  min-height: 44px;
  margin-top: var(--space-2);
  padding: 8px 16px;
  background: transparent;
  color: var(--muted);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-control);
  cursor: pointer;
}

/* =========================== 按钮 ========================================= */
/* 试作社骨架：4px 锐角、52px 高、hover 上浮、尾部箭头右移（mask 自绘，无外链） */
.button,
.button:visited {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;                 /* 命中区 >= 44px */
  min-width: 148px;
  max-width: 100%;
  padding: 10px 24px;
  border: 0;
  border-radius: var(--radius-control);
  background: var(--cyan);
  color: var(--obsidian);
  font-weight: 700;
  line-height: 1.25;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: transform .25s ease, filter .25s ease;   /* 试作社 .btn-primary 同值 */
}
.button::after {
  content: "";
  flex: none;
  display: inline-block;
  width: 14px;
  height: 14px;
  margin-left: 10px;
  background-color: currentColor;
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2012%2012'%3E%3Cpath%20d='M2%206h8M6.5%202.5L10%206l-3.5%203.5'%20fill='none'%20stroke='%23000'%20stroke-width='1.5'%20stroke-linecap='round'%20stroke-linejoin='round'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2012%2012'%3E%3Cpath%20d='M2%206h8M6.5%202.5L10%206l-3.5%203.5'%20fill='none'%20stroke='%23000'%20stroke-width='1.5'%20stroke-linecap='round'%20stroke-linejoin='round'/%3E%3C/svg%3E");
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-position: center;
  -webkit-mask-size: contain;
  mask-size: contain;
  transition: transform .2s ease;        /* 试作社 .btn svg 同值 */
}
.button:hover { filter: brightness(1.06); transform: translateY(-3px); }
.button:hover::after { transform: translateX(4px); }
.button:disabled,
.button[aria-disabled="true"] {
  background: #4B5268;
  color: var(--text);
  cursor: not-allowed;
  transform: none;
  filter: none;
}
.button-small { min-width: 116px; min-height: 44px; padding-inline: 18px; }

.text-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-weight: 650;
}

.copy-button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  padding: 8px 14px;
  background: transparent;
  color: var(--text);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-control);
  cursor: pointer;
}
.copy-button:hover { border-color: var(--cyan); }

/* =========================== 站点横幅 / 页头区 ============================= */

.site-banner {
  padding-block: var(--space-3);
  color: var(--cyan);
  font-size: var(--fs-aux);
}
.site-banner p { margin: 0; }

/* --- 页头区（hero）：短杠 + 点阵底纹；首页双栏带「本页索引」面板 --------- */
.page-lead {
  position: relative;
  padding-block: clamp(40px, 6vw, 76px) var(--space-6);
}
/* 试作社点阵底纹：极光青圆点、22px 网格、向右淡出（纯装饰） */
.page-lead::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: radial-gradient(circle, rgba(112, 231, 242, .13) 1.3px, transparent 1.4px);
  background-size: 22px 22px;
  -webkit-mask-image: linear-gradient(to right, #000, transparent 58%);
  mask-image: linear-gradient(to right, #000, transparent 58%);
}
.page-lead > * { position: relative; }   /* 内容压在点阵之上 */

.page-lead .lead-main > * + * { margin-top: var(--space-4); }
.page-lead .eyebrow { margin-bottom: 0; }
.page-lead h1 { font-size: var(--fs-h1); margin-bottom: 0; }
.page-lead .lead { max-width: 62ch; }
.page-lead .fact-grid { margin-top: var(--space-6); }

/* H1 上方的青色短杠（试作社 brand-rule）：编辑部符号 */
.brand-rule {
  display: block;
  width: 40px;
  height: 4px;
  background: var(--cyan);
}

/* --- 首页落地版式（Codex 式：居中超大字 hero + 诚信条 + 整幅实机截图）------ */
.page-lead.is-landing { text-align: center; }
.page-lead.is-landing .lead-main { max-width: 880px; margin-inline: auto; }
.page-lead.is-landing .brand-rule { margin-inline: auto; }
.page-lead.is-landing h1 { font-size: clamp(3rem, 7vw, 6rem); line-height: 1.06; }
.page-lead.is-landing .lead { margin-inline: auto; }
.page-lead.is-landing .action-list { margin-top: var(--space-5); }
.page-lead.is-landing .action-row { justify-content: center; }

.badges {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}
.badges li {
  border: 1px solid var(--line);
  border-radius: var(--radius-chip);
  padding: 6px 12px;
  color: var(--muted);
  font-size: var(--fs-aux);
  letter-spacing: .04em;
}

.hero-shot { margin: var(--space-8) 0 0; }
.hero-shot img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius-panel);
  background: var(--obsidian);
  box-shadow: 0 30px 80px rgba(0, 0, 0, .45);
}

/* 落地页正文：区块编号退场，其余留白沿用编辑部节奏 */
.page-flow.is-landing .section-number { display: none; }
/* 首页落地页：「四件可验证的事」「功能全景」清单改卡片栅格（圣上 2026-10-13 旨），卡片描边/hover 与 .card 同值 */
.page-flow.is-landing #home-verifiable .lined-list,
.page-flow.is-landing #home-panorama .lined-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-4);
  max-width: none;
}
.page-flow.is-landing #home-verifiable .lined-list li,
.page-flow.is-landing #home-panorama .lined-list li {
  padding: 22px 24px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  transition: border-color .2s ease, box-shadow .2s ease;
}
.page-flow.is-landing #home-verifiable .lined-list li:hover,
.page-flow.is-landing #home-panorama .lined-list li:hover {
  border-color: var(--cyan);
  box-shadow: 0 14px 30px rgba(0, 0, 0, .35);
}
@media (max-width: 720px) {
  .page-flow.is-landing #home-verifiable .lined-list,
  .page-flow.is-landing #home-panorama .lined-list { grid-template-columns: 1fr; }
}

/* 实机截图交替图文行（Codex 式左右交替；gallery 语义与放大链接不变） */
.layout-showcase .gallery {
  display: flex;
  flex-direction: column;
  gap: var(--space-8);
  max-width: none;
}
.layout-showcase .gallery-figure {
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
  gap: clamp(24px, 4vw, 56px);
  align-items: center;
}
.layout-showcase .gallery-item:nth-child(even) .gallery-link { order: 2; }
.layout-showcase .gallery-figure figcaption {
  padding: 0;
  font-size: var(--fs-body);
}
.layout-showcase .gallery-label {
  display: block;
  margin-bottom: var(--space-2);
  font-size: 1.125rem;
}

/* 底部大 CTA（Codex 式收尾） */
.layout-cta-band { border-top: 1px solid var(--line); }
.layout-cta-band .section-head { text-align: center; }
.layout-cta-band .section-head h2 { max-width: none; }
.layout-cta-band .section-body { text-align: center; }
.layout-cta-band .section-body > p { margin-inline: auto; }
.layout-cta-band .action-row { justify-content: center; }

.eyebrow {
  margin: 0 0 var(--space-4);
  color: var(--cyan);
  font-size: var(--fs-aux);
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
}

h1, h2, h3, h4 { margin-top: 0; line-height: var(--lh-head); letter-spacing: -.02em; }
/* 标题排版对齐 sinpilot.net 实测：h1 lh1.18/ls -.035em；h2 600/lh1.3/ls -.025em */
h1 { font-size: var(--fs-h1); margin-bottom: var(--space-5); overflow-wrap: anywhere; line-height: 1.18; letter-spacing: -.035em; }
h2 { font-size: var(--fs-h2); margin-bottom: var(--space-5); font-weight: 600; line-height: 1.3; letter-spacing: -.025em; }
h3 { font-size: var(--fs-h3); margin-bottom: var(--space-3); }
p { margin-top: 0; margin-bottom: var(--space-4); }

.lead { color: var(--muted); max-width: var(--measure); font-size: 1.125rem; line-height: 1.8; }

/* =========================== 区块 / 目录 ================================== */

.section { padding-block: var(--section-gap); }
/* 试作社区块头：01 / 编号在标题上方，编号纯装饰 */
.section-head { margin-bottom: var(--space-5); }
.section-head h2 { max-width: 40ch; margin-bottom: 0; }
.section-number {
  margin: 0 0 var(--space-2);
  color: var(--cyan);
  font-size: var(--fs-aux);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  letter-spacing: .1em;
}
/* 区块体通栏（对齐试作社满宽区块）；长文段落与列表单独限行长，保住可读性 */
.section-body > p,
.section-body > ul { max-width: var(--measure); }
.section-body {
  display: flow-root;
  /* 兜底：正文流里出现任何超宽内容都不把文档撑出横向滚动。
     作用与 .page-flow 的 min-width:0 同类——只在表格自身的滚动容器之外兜底，
     表格内部的横向滚动仍由 .table-scroll 负责。 */
  overflow-x: clip;
}
.section-body > * + * { margin-top: var(--space-5); }
.section-prefix { margin-bottom: var(--space-4); }

/* 目录 + 正文流：宽屏并排，窄屏回落为方角 chip 行 */
.page-layout {
  display: grid;
  grid-template-columns: 236px minmax(0, 1fr);
  gap: clamp(24px, 4vw, 56px);
  align-items: start;
  padding-bottom: var(--space-8);
}
.page-flow { min-width: 0; }
.page-flow > .section:first-child { padding-top: var(--space-4); }

.page-toc {
  position: sticky;
  top: calc(var(--header-h) + 20px);
  align-self: start;
  padding: var(--space-5);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-panel);
  max-height: calc(100vh - var(--header-h) - 40px);
  overflow-y: auto;
}
.toc-title {
  margin: 0 0 var(--space-3);
  font-size: var(--fs-aux);
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
}
.toc-links { display: grid; gap: 2px; }
.toc-links a {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 2px 0;
  color: var(--muted);
  text-decoration: none;
}
.toc-links a:hover { color: var(--cyan); text-decoration: underline; }

.breadcrumb { padding-top: var(--space-4); font-size: var(--fs-aux); color: var(--muted); }
.breadcrumb ol { list-style: none; display: flex; flex-wrap: wrap; gap: var(--space-2); margin: 0; padding: 0; }
.breadcrumb li + li::before { content: "/"; margin-right: var(--space-2); color: var(--line-strong); }

/* =========================== item: p / ul ================================= */

.item > *:last-child { margin-bottom: 0; }
.section-body p { color: var(--muted); }
.section-body h3 { color: var(--text); }

.lined-list {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--line);
}
.lined-list li {
  padding: var(--space-3) 0;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
}

/* =========================== item: steps ================================== */

.process {
  list-style: none;
  margin: 0;
  padding: 0;
  counter-reset: step;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: var(--space-4);
}
/* 试作社卡片处理：发丝描边 + 锐角，hover 青边柔影 */
.process-step {
  min-width: 0;
  padding: var(--space-5);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  transition: border-color .2s ease, box-shadow .2s ease;  /* 试作社 .card 同值；上浮由脚本 */
}
.process-step:hover,
.process-step:focus-within {
  border-color: var(--cyan);
  box-shadow: 0 14px 30px rgba(0, 0, 0, .35);
}
.process-index {
  display: block;
  margin-bottom: var(--space-2);
  color: var(--cyan);
  font-size: var(--fs-aux);
  font-variant-numeric: tabular-nums;
  letter-spacing: .08em;
}
.process-title { margin-bottom: var(--space-2); }
.process-step p { margin: 0; color: var(--muted); font-size: var(--fs-aux); }

/* =========================== item: kv ==================================== */

.requirements {
  margin: 0;
  border-top: 1px solid var(--line);
}
.requirements > div {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: var(--space-5);
  padding: var(--space-3) 0;
  border-bottom: 1px solid var(--line);
}
.requirements dt { color: var(--muted); }
.requirements dd { margin: 0; text-align: right; font-variant-numeric: tabular-nums; }
/* 复制按钮由脚本注入，用无类型选择器保证它按块级排布 */
.requirements .copy-button,
.table-wrap .copy-button { margin-top: var(--space-3); }

/* =========================== item: table ================================= */

.table-wrap { margin: 0; }
/* 唯一的横向滚动容器；父级 min-width:0 保证不会把页面撑宽 */
.table-scroll {
  max-width: 100%;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  border: 1px solid var(--line);
  border-radius: var(--radius-panel);
  background: var(--surface);
  -webkit-overflow-scrolling: touch;
}
.table-scroll:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; }

.data-table {
  width: 100%;
  /* 窄屏策略：不再用固定 480px 把文档撑宽（那会让 html.scrollWidth 变成 634px）。
     下限取「480px 或容器宽度」中较小者——容器够宽时保持整齐的表格列宽，
     容器更窄时表格跟随容器收窄，长串由 overflow-wrap 换行，不产生横向溢出。 */
  min-width: min(480px, 100%);
  border-collapse: collapse;
  font-size: var(--fs-body);
  font-variant-numeric: tabular-nums;
}
.data-table caption {
  caption-side: top;
  padding: var(--space-5) var(--space-5) var(--space-3);
  text-align: left;
  color: var(--text);
  font-weight: 700;
}
.table-hint { display: none; color: var(--muted); font-weight: 400; font-size: var(--fs-aux); }
/* 只有确实可能横向溢出时才提示 */
@media (max-width: 720px) { .table-hint { display: inline; } }

.data-table th,
.data-table td {
  /* 校验值、路径这类长串必须能断行，否则会把表格顶宽 */
  overflow-wrap: anywhere;
  padding: var(--space-3) var(--space-5);
  text-align: left;
  vertical-align: top;
  border-top: 1px solid var(--line);
}
.data-table thead th {
  color: var(--muted);
  font-size: var(--fs-aux);
  font-weight: 700;
  letter-spacing: .04em;
  white-space: nowrap;
  border-top: 0;
  border-bottom: 1px solid var(--line-strong);
}
.data-table tbody th { font-weight: 700; color: var(--text); }
.data-table tbody td { color: var(--muted); }
.data-table tbody tr:hover th,
.data-table tbody tr:hover td { color: var(--text); }

/* =========================== item: note ================================== */

.note {
  padding: var(--space-5);
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 4px solid var(--cyan);
  border-radius: var(--radius-card);
}
.note-badge {
  margin: 0 0 var(--space-3);
  color: var(--cyan);
  font-size: var(--fs-aux);
  font-weight: 700;
  letter-spacing: .08em;
}
.note-body { margin: 0; color: var(--muted); }
.note-title { margin-bottom: var(--space-2); }
/* warn 语气：警示色 + 虚线左缘 + 文案「注意」，三重编码，不单靠颜色 */
.note--warn { border-left-color: var(--note); border-left-style: dashed; }
.note--warn .note-badge { color: var(--note-ink); }

/* =========================== item: pending =============================== */

.pending-block {
  padding: var(--space-5);
  background: var(--surface);
  border: 1px dashed var(--note);
  border-radius: var(--radius-card);
}
.pending-flag { margin: 0 0 var(--space-3); }
.pending-flag strong {
  display: inline-block;
  padding: 2px 12px;
  background: var(--note);
  color: var(--obsidian);            /* 深字压亮底，对比度达标 */
  border-radius: var(--radius-chip);
  font-size: var(--fs-aux);
  letter-spacing: .1em;
}
.pending-title { margin-bottom: var(--space-2); }
.pending-text { margin: 0 0 var(--space-3); color: var(--muted); }
.pending-unlock { margin: 0; font-size: var(--fs-aux); }
.pending-unlock-label {
  display: inline-block;
  margin-right: var(--space-2);
  padding: 1px 10px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-chip);
  color: var(--muted);
}

/* =========================== item: gallery =============================== */

.gallery {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  /* 产品画面是竖版长图（1544×1898 这类比例）。多列会把图压到 300px 宽，
     界面文字完全读不出来——画面证据的意义就是让人看清界面，所以默认单列、
     限一个可读上限；窄屏自然占满容器宽度。 */
  grid-template-columns: minmax(0, 1fr);
  gap: var(--space-6);
  max-width: 720px;
}
.gallery-item { min-width: 0; }
.gallery-figure { margin: 0; }
.gallery-link {
  position: relative;
  display: block;
  border: 1px solid var(--line);
  border-radius: var(--radius-panel);
  background: var(--surface);
  overflow: hidden;
  text-decoration: none;
}
.gallery-link:hover { border-color: var(--cyan); }
/* width/height 属性 + object-fit: contain：加载前即占位，不裁切、不抖动 */
.gallery-link img {
  display: block;
  width: 100%;
  height: auto;
  /* 不再限制 max-height：竖版长图按容器宽度等比展开，界面细节才看得清。
     整页高度由 min-width: min(480px,100%) 与图片自身尺寸共同保证不抖动。 */
  background: var(--obsidian);
}
.gallery-zoom {
  position: absolute;
  right: var(--space-3);
  bottom: var(--space-3);
  padding: 6px 14px;
  background: var(--obsidian);
  color: var(--text);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-chip);
  font-size: var(--fs-aux);
  transition: transform var(--dur) var(--ease);
}
.gallery-link:hover .gallery-zoom,
.gallery-link:focus-visible .gallery-zoom { transform: translateY(-2px); }
.gallery-figure figcaption {
  padding: var(--space-3) 2px 0;
  color: var(--muted);
  font-size: var(--fs-aux);
}
.gallery-label { color: var(--text); font-weight: 700; }

/* =========================== item: actions ================================ */

.action-list { display: grid; gap: var(--space-4); }
.action-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-4);
  min-width: 0;
}
.action-row .button { min-height: 48px; }
.action-note { margin: 0; color: var(--muted); font-size: var(--fs-aux); min-width: 0; }

/* =========================== 事实列表 ==================================== */

.fact-grid,
.fact-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.fact-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-4);
}
.fact-list { display: grid; gap: var(--space-4); }
.fact-grid li,
.fact-list li { position: relative; padding-left: 24px; color: var(--muted); }
/* 安全语义绿点 + 文字并列，颜色不单独承载状态 */
.fact-grid li::before,
.fact-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: .62em;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--healthy);
}

/* =========================== 卡片 / 分栏 ================================= */

.card {
  min-width: 0;
  padding: var(--space-6);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  transition: border-color .2s ease, box-shadow .2s ease;  /* 试作社 .card 同值；上浮由脚本 */
}
.card:hover,
.card:focus-within {
  border-color: var(--cyan);
  box-shadow: 0 14px 30px rgba(0, 0, 0, .35);
}
.card p { color: var(--muted); }
.two-col { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-5); }
.after-link { padding-block: var(--space-6) var(--space-8); }

/* =========================== 页脚 ======================================== */
/* 试作社骨架：与正文同底色 + 发丝顶线 + 导航回声 */

.site-footer {
  margin-top: var(--space-7);
  padding: var(--space-8) 0 var(--space-7);
  border-top: 1px solid var(--line);
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr;
  gap: clamp(24px, 4vw, 56px);
}
.footer-brand a { display: inline-flex; align-items: center; min-height: 44px; }
.footer-brand img { display: block; width: 124px; height: auto; }
.footer-brand p { margin: var(--space-3) 0 0; max-width: 32ch; color: var(--muted); font-size: var(--fs-aux); }
.site-footer h2 {
  margin: 0 0 var(--space-3);
  font-size: var(--fs-aux);
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
}
.site-footer nav { display: flex; flex-direction: column; align-items: flex-start; }
.site-footer nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--text);
  text-decoration: none;
  text-underline-offset: 6px;
}
.site-footer nav a:hover { color: var(--cyan); text-decoration: underline; }
.site-footer nav a[aria-current="page"] { font-weight: 700; text-decoration: underline; text-decoration-color: var(--cyan); }
.footer-brandnav ul {
  list-style: none;
  margin: 0;
  padding: 0;
}
.footer-brandnav li { margin-bottom: var(--space-2); }
.footer-brandnav a { color: var(--text); }
.footer-brandnav .brand-status { color: var(--muted); font-size: var(--fs-aux); }
.footer-brandnav .brand-plain { color: var(--muted); }
.footer-brandnav .brand-note { margin: 0 0 var(--space-3); color: var(--muted); font-size: var(--fs-aux); }

.footer-meta p { margin: 0 0 var(--space-2); color: var(--muted); font-size: var(--fs-aux); }
.footer-legal { margin-top: var(--space-7); padding-top: var(--space-5); border-top: 1px solid var(--line); }
.footer-legal p { margin: 0; color: var(--muted); font-size: var(--fs-aux); }

/* =========================== 断点 ======================================== */

@media (max-width: 1080px) {
  .page-layout { grid-template-columns: 1fr; }
  .page-toc {
    position: static;
    max-height: none;
    padding: var(--space-4);
  }
  .toc-links { grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); }
  .toc-links a {
    min-height: 44px;
    padding: 4px 12px;
    border: 1px solid var(--line);
    border-radius: var(--radius-chip);
  }
}

@media (max-width: 900px) {
  .desktop-nav { display: none; }
  .js .menu-button { display: block; }
  .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  /* 交替图文行折为单列，图始终在文前 */
  .layout-showcase .gallery-figure { grid-template-columns: 1fr; }
  .layout-showcase .gallery-item:nth-child(even) .gallery-link { order: 0; }
}

@media (max-width: 720px) {
  .shell { width: calc(100% - 32px); }
  .header-inner { min-height: 64px; }
  .brand img { height: 36px; }
  .fact-grid,
  .two-col,
  .footer-grid { grid-template-columns: 1fr; }
  .process { grid-template-columns: 1fr; }
  .card { padding: var(--space-5); }
  .requirements > div { display: block; }
  .requirements dd { text-align: left; }
  .gallery { grid-template-columns: 1fr; }
  .gallery-link img { max-height: none; }
}

/* =========================== 偏好回退 ==================================== */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *,
  *::before,
  *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
  .button:hover { transform: none; }
  .button:hover::after { transform: none; }
}

/* 脚本检出 reduced-motion 时兜底：位移装饰一律归零（试作社 .no-motion 同义） */
.no-motion .card,
.no-motion .process-step { transform: none !important; }

@media (prefers-contrast: more) {
  :root {
    --muted: #D7DCEA;               /* 抬高次要文字对比度 */
    --line: rgba(244, 247, 255, .34);
    --line-strong: rgba(244, 247, 255, .48);
  }
  .card,
  .note,
  .pending-block,
  .process-step,
  .table-scroll,
  .page-toc { border: 1px solid var(--line-strong); }
  .hero-shot img { border: 1px solid var(--line-strong); }
  .note { border-left-width: 6px; }
}

@media print {
  .site-header,
  .page-toc,
  .reading-progress,
  .skip-link { display: none; }
  .page-lead::before { display: none; }
  body { background: #fff; color: #000; }
}
