/* ==========================================================================
   Oing — www.oing.top
   手写 CSS，无框架、无构建步骤。

   设计令牌的取值参考了同类产品官网的通行做法（配色、圆角与间距刻度本身
   属于不受著作权保护的设计语言），样式代码、图形与文案全部为原创。

   依赖 css/fonts.css 提供 DM Sans 与 Montserrat。

   目录
     1 设计令牌        2 基础重置        3 排版刻度
     4 按钮            5 页头            6 首屏（渐变 + 流场画布 + 磨砂输入卡）
     7 项目卡片        8 页脚            9 提示条
    10 动效           10.5 /ask 问答页  11 响应式      12 打印与无障碍
   ========================================================================== */

/* ------------------------------------------------------------- 1 设计令牌 */
:root {
  color-scheme: light;

  /* 品牌 */
  --brand: #4d6bfe;
  --brand-rgb: 77, 107, 254;
  --brand-deep: #3a65c2;
  --brand-ink: #4176e6;
  --brand-soft: #e4edfd;

  /* 文本 */
  --text-primary: #1e232c;
  --text-title: #152443;
  --text-secondary: rgba(0, 0, 0, .7);
  --text-description: rgba(0, 0, 0, .65);
  --text-placeholder: #8691a1;

  /* 背景与表面 */
  --bg-page: #f9f8f8;
  --bg-solid: #ffffff;
  --surface-glass: hsla(0, 0%, 100%, .34);
  --surface-raised: hsla(0, 0%, 100%, .5);
  --bg-hover: rgba(0, 0, 0, .04);
  --bg-sunken: rgba(0, 0, 0, .025);

  /* 描边 */
  --border-subtle: rgba(0, 0, 0, .06);
  --border-default: rgba(0, 0, 0, .1);
  --border-divider: rgba(0, 0, 0, .08);
  --border-strong: rgba(0, 0, 0, .2);
  --border-bluish: rgba(9, 45, 78, .14);

  /* 按钮 */
  --btn-primary-bg: #1a1615;
  --btn-primary-text: #ffffff;
  --btn-soft-bg: hsla(0, 0%, 100%, .42);
  --btn-soft-border: rgba(9, 45, 78, .18);
  --btn-soft-hover-bg: rgba(255, 255, 255, .78);

  /* 首屏天空渐变 */
  --hero-sky-1: #93bcE6;
  --hero-sky-2: rgba(150, 189, 231, .46);
  --hero-sky-3: rgba(249, 248, 248, 0);

  /* 圆角刻度 */
  --r-pill: 100px;
  --r-card: 24px;
  --r-panel: 16px;
  --r-media: 12px;
  --r-input: 10px;
  --r-sm: 8px;

  /* 间距刻度 */
  --s1: 4px;  --s2: 8px;  --s3: 12px; --s4: 16px;
  --s5: 24px; --s6: 32px; --s7: 40px; --s8: 56px;
  --s9: 80px; --s10: 120px;

  /* 阴影 */
  --shadow-card: 0 0 0 1px #f1f5f9, 0 2px 4px rgba(0, 0, 0, .05), 0 12px 24px rgba(0, 0, 0, .05);
  --shadow-float: 0 2px 6px rgba(21, 36, 67, .04), 0 18px 44px rgba(21, 36, 67, .09);

  /* 字体 */
  --font-sans: "DM Sans", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
               Roboto, "Helvetica Neue", Arial, "PingFang SC", "Hiragino Sans GB",
               "Microsoft YaHei", "Noto Sans SC", sans-serif;
  --font-display: "Montserrat", var(--font-sans);
  --font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas,
               "PingFang SC", "Microsoft YaHei", monospace;

  --blur: 20px;
  --flow-alpha: .19;          /* 流场笔触强度：浅色底需要更重才可见 */
  --header-h: 64px;

  /* 悬浮胶囊页头：下面两组是"未滚动 → 滚动后"的起止值，
     js/header.js 在两者之间做弹簧插值。想调多细、多宽，改这里就行。 */
  --hdr-top: 8px;             /* 容器顶部留白 */
  --hdr-top-on: 5px;
  --hdr-pad-y: 4px;           /* 胶囊纵向内边距 */
  --hdr-pad-y-on: 2px;
  --hdr-inner-h: 48px;        /* 胶囊内容高度 */
  --hdr-inner-h-on: 42px;
  --hdr-inset: 80px;          /* 滚动后左右各内缩多少（相对容器，不是绝对宽度） */
  --hdr-pad-l-on: 18px;
  --hdr-pad-r-on: 12px;
  --hdr-inset-min: 720;       /* 容器窄于此值就不内缩，否则手机上有内容被挤爆 */
  --shell: 1080px;
  --ease: cubic-bezier(.22, .61, .36, 1);
}

[data-theme="dark"] {
  color-scheme: dark;

  --brand: #6d88ff;
  --brand-rgb: 109, 136, 255;
  --brand-deep: #7ba6ff;
  --brand-ink: #8fb0ff;
  --brand-soft: #1a2440;

  --text-primary: #ffffff;
  --text-title: #ffffff;
  --text-secondary: hsla(0, 0%, 100%, .8);
  --text-description: hsla(0, 0%, 100%, .52);
  --text-placeholder: hsla(0, 0%, 100%, .3);

  --bg-page: #0f1115;
  --bg-solid: #171a21;
  --surface-glass: hsla(0, 0%, 100%, .055);
  --surface-raised: hsla(0, 0%, 100%, .09);
  --bg-hover: rgba(255, 255, 255, .06);
  --bg-sunken: rgba(255, 255, 255, .03);

  --border-subtle: rgba(255, 255, 255, .08);
  --border-default: rgba(255, 255, 255, .12);
  --border-divider: rgba(255, 255, 255, .09);
  --border-strong: rgba(255, 255, 255, .24);
  --border-bluish: rgba(255, 255, 255, .14);

  --btn-primary-bg: #f2f3f5;
  --btn-primary-text: #0a0a0a;
  --btn-soft-bg: rgba(255, 255, 255, .07);
  --btn-soft-border: rgba(255, 255, 255, .14);
  --btn-soft-hover-bg: rgba(255, 255, 255, .13);

  --hero-sky-1: #1b2a44;
  --hero-sky-2: rgba(27, 42, 68, .5);
  --hero-sky-3: rgba(15, 17, 21, 0);

  --flow-alpha: .13;

  --shadow-card: 0 0 0 1px rgba(255, 255, 255, .05), 0 12px 24px rgba(0, 0, 0, .35);
  --shadow-float: 0 18px 44px rgba(0, 0, 0, .5);
}

/* ------------------------------------------------------------- 2 基础重置 */
*, *::before, *::after { box-sizing: border-box; }

/* 作者样式里一旦给元素写了 display，就会盖掉浏览器默认的 [hidden] { display: none }，
   导致 hidden 属性失效。统一在这里兜住（.chat-empty、#answer-src 都踩过）。 */
[hidden] { display: none !important; }

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

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.6;
  color: var(--text-primary);
  background: var(--bg-page);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: "kern" 1;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, p, figure { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
img, svg, canvas { display: block; max-width: 100%; }
textarea { font: inherit; }

:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 3px;
  border-radius: var(--r-sm);
}

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

@media (min-width: 1024px) {
  .site-header { width: min(100% - 128px, 1280px); }
}

.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;
}

.skip-link {
  position: fixed; top: 10px; left: 50%; z-index: 200;
  transform: translate(-50%, -180%);
  padding: 10px 20px; border-radius: var(--r-pill);
  background: var(--btn-primary-bg); color: var(--btn-primary-text);
  font-size: 14px; transition: transform .2s var(--ease);
}
.skip-link:focus { transform: translate(-50%, 0); }

/* ------------------------------------------------------------- 3 排版刻度 */
/* 沿用同类站点通行的排版刻度：caption 14 / body 15-16 / title 18 / slogan 大号宽字距 */
.t-caption { font-size: 14px; line-height: 1.5; }
.t-body    { font-size: 16px; line-height: 1.6; text-wrap: pretty; }
.t-title   { font-size: 18px; font-weight: 500; line-height: 1.5; letter-spacing: -.01em; }

.eyebrow {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 400;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--text-description);
}

/* ---------------------------------------------------------------- 4 按钮 */
.btn {
  position: relative;
  display: inline-flex; align-items: center; justify-content: center;
  gap: var(--s2);
  height: 40px; padding: 0 20px;
  border: 1px solid transparent; border-radius: var(--r-pill);
  font-family: var(--font-sans);
  font-size: 15px; font-weight: 500; line-height: 1.2;
  white-space: nowrap; cursor: pointer;
  transition: background-color .2s var(--ease), border-color .2s var(--ease),
              color .2s var(--ease), transform .2s var(--ease), box-shadow .2s var(--ease);
}
.btn:active { transform: translateY(.5px); }

.btn-primary {
  background: var(--btn-primary-bg);
  color: var(--btn-primary-text);
  box-shadow: 0 1px 2px rgba(0, 0, 0, .16), 0 6px 16px rgba(21, 36, 67, .12);
}
.btn-primary:hover { box-shadow: 0 2px 4px rgba(0, 0, 0, .18), 0 10px 24px rgba(21, 36, 67, .18); }

.btn-soft {
  background: var(--btn-soft-bg);
  border-color: var(--btn-soft-border);
  color: var(--text-primary);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.btn-soft:hover { background: var(--btn-soft-hover-bg); border-color: var(--border-strong); }

.btn-ghost { color: var(--text-primary); }
.btn-ghost:hover { background: var(--bg-hover); }

.btn-s { height: 32px; padding: 0 14px; font-size: 14px; }

.icon-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; border-radius: var(--r-sm);
  color: var(--text-description);
  transition: background-color .18s var(--ease), color .18s var(--ease);
}
.icon-btn:hover { background: var(--bg-hover); color: var(--text-primary); }
.icon-btn svg { fill: none; stroke: currentColor; }
#theme-toggle .i-moon { display: none; }
[data-theme="dark"] #theme-toggle .i-sun { display: none; }
[data-theme="dark"] #theme-toggle .i-moon { display: block; }

/* 语言切换 —— 细长的分段控件 */
.lang-switch {
  display: inline-flex; align-items: center;
  padding: 2px; gap: 2px;
  border-radius: var(--r-pill);
  background: var(--bg-sunken);
}
.lang-switch button {
  padding: 4px 11px; border-radius: var(--r-pill);
  font-size: 13px; font-weight: 500; color: var(--text-description);
  transition: background-color .18s var(--ease), color .18s var(--ease);
}
.lang-switch button:hover { color: var(--text-primary); }
.lang-switch button.is-active {
  background: var(--bg-solid); color: var(--text-primary);
  box-shadow: 0 1px 2px rgba(0, 0, 0, .06);
}

/* ---------------------------------------------------------------- 5 页头 */
/* 悬浮玻璃胶囊页头。
   未滚动：贴边、全宽、完全透明。
   滚过 80px：胶囊收窄并向内缩，同时磨砂玻璃淡入 —— 像一颗浮起来的液态玻璃药丸。
   收窄与内缩是数值动画（js/header.js 用弹簧积分驱动，对应参考站 framer-motion 的
   layout 弹簧：stiffness 180 / damping 28），玻璃背景交给 CSS transition。 */
.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  width: min(100% - 32px, 1280px);
  margin: 0 auto;
  padding: var(--hdr-top) 0 0;
  pointer-events: none;             /* 胶囊之外不挡底下的内容 */
}
.header-bar {
  max-width: 1280px;                /* ← 弹簧动画改这个值（未滚动 1280 / 滚动后 980 或 1180） */
  margin: 0 auto;
  padding: var(--hdr-pad-y) 0;      /* ← 弹簧动画改这里的四个值与 max-width */
  border: 1px solid transparent;
  border-radius: var(--r-pill);
  background: transparent;
  pointer-events: auto;
  transition: background-color .3s var(--ease), border-color .3s var(--ease),
              box-shadow .3s var(--ease);
}
.header-bar.is-scrolled {
  background: var(--surface-raised);
  border-color: var(--border-default);
  box-shadow: 0 2px 12px rgba(21, 36, 67, .07);
}
@supports ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .header-bar.is-scrolled {
    backdrop-filter: blur(12px) saturate(170%);
    -webkit-backdrop-filter: blur(12px) saturate(170%);
  }
}
.header-inner { display: flex; align-items: center; gap: var(--s5); height: var(--hdr-inner-h); }

.brand { display: inline-flex; align-items: center; gap: 8px; flex: none; }
.brand-mark { display: inline-flex; color: var(--brand-ink); }
.brand-name {
  font-size: 18px; font-weight: 500; letter-spacing: -.01em;
  color: var(--text-primary);
}

.nav { display: flex; align-items: center; gap: var(--s5); }
.nav a {
  font-size: 15px; color: var(--text-secondary);
  transition: color .18s var(--ease);
}
.nav a:hover { color: var(--text-primary); }

.header-actions { display: flex; align-items: center; gap: var(--s3); margin-left: auto; }
.nav-toggle { display: none; }

/* ---------------------------------------------------------------- 6 首屏 */
.hero {
  position: relative;
  overflow: hidden;
  background: linear-gradient(180deg, var(--hero-sky-1) 0%, var(--hero-sky-2) 42%, var(--hero-sky-3) 100%);
}
/* 流场画布铺在渐变色之上、内容之下 */
.hero-canvas {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  pointer-events: none;
}
.hero-inner {
  position: relative; z-index: 2;
  display: flex; flex-direction: column; align-items: center;
  gap: var(--s7);                       /* 内容块之间 40px */
  width: min(var(--shell), 100% - 48px);
  margin-inline: auto;
  padding: var(--s8) 0 var(--s10);      /* 顶部让开固定页头，底部给流场留白 */
  padding-top: calc(var(--header-h) + var(--s8));
}

/* 公告 */
.hero-announce {
  display: inline-flex; align-items: center; gap: var(--s2);
  max-width: 100%;
  font-size: 14px; line-height: 1.5;
  color: var(--text-description);
  transition: color .2s var(--ease);
}
.hero-announce:hover { color: var(--text-primary); }
.hero-announce .sparkle { flex: none; width: 16px; height: 16px; }
.hero-announce .announce-text {
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.hero-announce .announce-more { flex: none; color: var(--brand-ink); font-weight: 500; }

/* 标语 */
.slogan {
  display: inline-block;
  margin-right: -.3em;                  /* 抵消字距在右侧多出的空隙，保证视觉居中 */
  font-family: var(--font-display);
  font-size: 30px;
  font-weight: 500;
  line-height: 1.5;
  letter-spacing: .3em;
  text-align: center;
  color: var(--text-title);
  white-space: pre-line;
}
html[lang="en"] .slogan {
  font-size: 26px; letter-spacing: .14em; margin-right: -.14em;
  text-transform: uppercase;
}

/* 磨砂输入卡 */
.composer {
  width: 100%; max-width: 880px;
  display: flex; flex-direction: column; gap: 4px;
  padding: 4px 10px 10px;
  background: var(--surface-glass);
  border: 1px solid var(--border-subtle);
  border-radius: var(--r-card);
  backdrop-filter: blur(var(--blur)) saturate(150%);
  -webkit-backdrop-filter: blur(var(--blur)) saturate(150%);
  box-shadow: var(--shadow-float);
  transition: border-color .2s var(--ease), box-shadow .2s var(--ease);
}
.composer:focus-within {
  border-color: rgba(var(--brand-rgb), .38);
  box-shadow: var(--shadow-float), 0 0 0 4px rgba(var(--brand-rgb), .1);
}
.composer textarea {
  width: 100%; min-height: 80px; max-height: 300px;
  padding: var(--s3);
  border: 0; outline: 0; resize: none;
  background: transparent; color: var(--text-primary);
  font-family: var(--font-sans); font-size: 16px; line-height: 1.6;
  overflow-y: auto;
}
.composer textarea::placeholder { color: var(--text-placeholder); }

.composer-bar { display: flex; align-items: center; gap: var(--s2); }
.composer-note { padding: 0 var(--s3); margin: 6px 0 2px; font-size: 12.5px; color: var(--text-placeholder); }

/* 问答：输入框 + 建议问题 + 回答卡，作为一个整体参与首屏的 40px 间距 */
.ask-block { display: flex; flex-direction: column; align-items: center; gap: 18px; width: 100%; }

.chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.chip {
  padding: 7px 15px;
  border: 1px solid var(--border-default); border-radius: var(--r-pill);
  background: var(--surface-glass); color: var(--text-description);
  font-size: 13.5px; white-space: nowrap;
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  transition: border-color .18s var(--ease), color .18s var(--ease), transform .18s var(--ease);
}
.chip:hover { border-color: var(--brand-400); color: var(--brand-ink); transform: translateY(-1px); }

.answer {
  width: 100%; max-width: 880px; text-align: left;
  padding: var(--s5) var(--s6);
  background: var(--surface-glass);
  border: 1px solid var(--border-default);
  border-radius: var(--r-card);
  backdrop-filter: blur(var(--blur)) saturate(150%);
  -webkit-backdrop-filter: blur(var(--blur)) saturate(150%);
  box-shadow: var(--shadow-float);
}
.answer.is-miss { border-color: rgba(var(--brand-rgb), .38); }
.answer__q { font-size: 13px; color: var(--text-placeholder); }
.answer__you { margin-right: 8px; }
.answer__a { margin-top: 10px; font-size: 16px; line-height: 1.75; color: var(--text-primary); }
.answer__foot {
  margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--border-subtle);
  font-size: 13px; color: var(--text-placeholder);
}
.answer__foot a { margin-left: 6px; color: var(--brand-ink); font-weight: 500; }
#answer-src { display: block; margin-bottom: 6px; color: var(--text-placeholder); }
.answer.is-pending .answer__a { color: var(--text-placeholder); }
.send-btn {
  flex: none; margin-left: auto;
  display: inline-flex; align-items: center; justify-content: center;
  width: 38px; height: 38px; border-radius: 50%;
  background: var(--brand); color: #fff;
  box-shadow: 0 2px 6px rgba(var(--brand-rgb), .34);
  transition: opacity .2s var(--ease), transform .2s var(--ease), box-shadow .2s var(--ease);
}
.send-btn svg { fill: none; stroke: currentColor; }
.send-btn:hover:not(:disabled) { transform: scale(1.06); box-shadow: 0 4px 12px rgba(var(--brand-rgb), .44); }
.send-btn:disabled { opacity: .3; cursor: not-allowed; box-shadow: none; }

/* 三个次级入口按钮 */
.hero-actions {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: center;
  gap: var(--s3);
}
.btn .btn-icon { width: 17px; height: 17px; fill: none; stroke: currentColor; flex: none; }
.btn-soft { padding-left: 16px; }

/* ------------------------------------------------------------ 7 编辑式列表 */
.section { padding: var(--s9) 0; }
.section-head {
  display: grid; grid-template-columns: 200px 1fr; gap: var(--s7);
  margin-bottom: var(--s7);
}
.section-head h2 {
  font-size: 24px; font-weight: 500; letter-spacing: -.015em;
  color: var(--text-title);
}
.section-head .eyebrow { padding-top: 6px; }
.section-note { margin-top: 10px; font-size: 14.5px; color: var(--text-description); }

/* 项目推广卡片（2026-10 替代原来的「能力」清单）
   整张卡是一个 <a>：只有一个点击目标，比"卡片里再放一个链接"更好点也好读 */
.proj-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s4); }
.proj-card {
  display: flex; flex-direction: column; gap: 10px; height: 100%;
  padding: var(--s5);
  background: var(--bg-solid);
  border: 1px solid var(--border-default);
  border-radius: var(--r-card);
  transition: border-color .2s var(--ease), transform .2s var(--ease), box-shadow .2s var(--ease);
}
.proj-card:hover {
  border-color: rgba(var(--brand-rgb), .5);
  transform: translateY(-2px);
  box-shadow: var(--shadow-float);
}
.proj-head { display: flex; align-items: center; gap: 10px; }
.proj-name { font-size: 17px; font-weight: 600; color: var(--text-title); }
.proj-tag {
  padding: 2px 9px;
  border: 1px solid var(--border-divider); border-radius: var(--r-pill);
  font-size: 11.5px; color: var(--text-placeholder);
}
.proj-desc { font-size: 14px; line-height: 1.75; color: var(--text-description); }
.proj-go {
  display: inline-flex; align-items: center; gap: 5px;
  margin-top: auto; padding-top: 8px;
  font-family: var(--font-mono); font-size: 13px;
  color: var(--brand-ink);
}
.proj-arrow { width: 15px; height: 15px; stroke: currentColor; transition: transform .2s var(--ease); }
.proj-card:hover .proj-arrow { transform: translateX(3px); }

.news-row {
  display: grid; grid-template-columns: 120px 1fr auto; gap: var(--s5);
  align-items: baseline;
  padding: var(--s5) 0;
  border-bottom: 1px solid var(--border-divider);
  transition: padding-left .22s var(--ease);
}
.news-row:hover { padding-left: var(--s2); }
.news-row.is-static:hover { padding-left: 0; }   /* 非链接条目不做悬停位移 */
.news-row time {
  font-family: var(--font-mono); font-size: 12px;
  color: var(--text-placeholder); font-variant-numeric: tabular-nums;
}
.news-row .news-title { display: block; font-size: 16px; font-weight: 500; color: var(--text-primary); }
.news-row .news-desc { display: block; margin-top: 3px; font-size: 15px; color: var(--text-description); }
.news-row .news-arrow {
  font-size: 15px; color: var(--text-placeholder);
  transition: transform .22s var(--ease), color .22s var(--ease);
}
.news-row:hover .news-arrow { transform: translateX(4px); color: var(--brand-ink); }

/* ---------------------------------------------------------------- 8 页脚 */
.site-footer { padding: var(--s9) 0 48px; border-top: 1px solid var(--border-divider); }
.footer-top {
  display: flex; flex-wrap: wrap; gap: var(--s7) var(--s8);
  justify-content: space-between;
}
.footer-brand { display: flex; flex-direction: column; gap: var(--s4); max-width: 280px; }
.footer-brand p { font-size: 14px; color: var(--text-description); }
.qr-box {
  display: inline-flex; align-items: center; gap: var(--s3);
  align-self: flex-start;
  padding: var(--s2);
  background: var(--surface-raised);
  border: 1px solid var(--border-subtle);
  border-radius: var(--r-media);
}
.qr-box img { width: 88px; height: 88px; border-radius: var(--r-sm); }
.qr-box span { max-width: 52px; font-size: 12px; line-height: 1.45; color: var(--text-placeholder); }

.footer-cols { display: flex; flex-wrap: wrap; gap: var(--s8); }
.footer-col { display: flex; flex-direction: column; gap: var(--s5); min-width: 120px; }
.footer-col > p { font-size: 14px; font-weight: 500; color: var(--text-primary); }
.footer-col nav { display: flex; flex-direction: column; gap: var(--s4); }
.footer-col a { font-size: 14px; color: var(--text-description); transition: color .18s var(--ease); }
.footer-col a:hover { color: var(--text-primary); }

.footer-bottom {
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--s4); flex-wrap: wrap;
  margin-top: var(--s8); padding-top: var(--s6);
  border-top: 1px solid var(--border-divider);
}
.footer-bottom p { font-size: 14px; color: var(--text-description); }
.footer-bottom .sep { margin: 0 6px; }
#filing a { color: var(--text-description); margin-left: 10px; }
#filing a:hover { color: var(--brand-ink); }

/* 法务页正文段落 */
.legal-p { margin-top: var(--s3); max-width: 66ch; font-size: 15px; color: var(--text-description); }

/* ------------------------------------------------------------- 9 提示条 */
.toast {
  position: fixed; left: 50%; bottom: 32px; z-index: 300;
  transform: translate(-50%, 12px);
  max-width: min(90vw, 440px);
  padding: 11px 20px;
  border-radius: var(--r-pill);
  background: var(--btn-primary-bg); color: var(--btn-primary-text);
  font-size: 14px; box-shadow: var(--shadow-float);
  opacity: 0;
  transition: opacity .26s var(--ease), transform .26s var(--ease);
}
.toast.is-visible { opacity: 1; transform: translate(-50%, 0); }

/* 诊断开关：?noglass=1（见 js/main.js）—— 用来判断手机上的闪烁是不是磨砂层造成的 */
html[data-noglass] *, html[data-noglass] *::before, html[data-noglass] *::after {
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

/* ---------------------------------------------------------------- 10 动效 */
.reveal { opacity: 0; transform: translateY(10px); }
.reveal.is-in {
  opacity: 1; transform: none;
  transition: opacity .7s var(--ease), transform .7s var(--ease);
}

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

/* ------------------------------------------------------- 10.5 /ask 问答页 */
.chat-main { padding-top: calc(var(--header-h) + var(--s7)); padding-bottom: 0; }
.chat-shell { display: flex; flex-direction: column; gap: var(--s6); max-width: 760px; }
.chat-head h1 { font-size: 26px; font-weight: 600; color: var(--text-title); }
.chat-head .section-note { margin-top: 8px; }

.chat-list { display: flex; flex-direction: column; gap: var(--s5); }
.chat-turn { display: flex; flex-direction: column; gap: 6px; max-width: 78%; }
.chat-turn.is-user { align-self: flex-end; align-items: flex-end; }
.chat-bubble {
  padding: 12px 16px;
  border: 1px solid var(--border-default);
  border-radius: 18px;
  background: var(--bg-solid);
  color: var(--text-primary);
  font-size: 15px; line-height: 1.7;
  white-space: pre-wrap; overflow-wrap: anywhere;
}
.chat-turn.is-user .chat-bubble {
  background: rgba(var(--brand-rgb), .1);
  border-color: rgba(var(--brand-rgb), .22);
}
.chat-turn.is-pending .chat-bubble { color: var(--text-placeholder); }
.chat-meta { font-size: 12.5px; color: var(--text-placeholder); }

.chat-empty { display: flex; flex-direction: column; gap: 12px; }
.chat-empty > p { font-size: 14px; color: var(--text-description); }

/* 输入区用 sticky 而不是 fixed：fixed 在移动端地址栏伸缩时会跟着跳，
   而且之前那轮 Android 闪烁的教训是大面积的合成图层要尽量少。 */
.chat-composer {
  position: sticky; bottom: 0;
  margin-top: var(--s8);
  padding: var(--s3) 0 var(--s5);
  background: var(--bg-page);
  border-top: 1px solid var(--border-divider);
}
.chat-composer-inner { display: flex; align-items: flex-end; gap: var(--s2); max-width: 760px; }
.chat-composer textarea {
  flex: 1 1 auto;
  min-height: 46px; max-height: 180px;
  padding: 12px 14px;
  border: 1px solid var(--border-default); border-radius: 14px;
  background: var(--bg-solid); color: var(--text-primary);
  font-family: var(--font-sans); font-size: 15px; line-height: 1.5;
  resize: none;
}
.chat-composer textarea:focus { outline: 0; border-color: rgba(var(--brand-rgb), .5); }
.chat-composer textarea::placeholder { color: var(--text-placeholder); }

/* 首页回答卡里的「继续追问」入口 */
.answer__more { margin-top: 10px; font-size: 13.5px; }
.answer__more a { color: var(--brand-ink); font-weight: 500; }

/* -------------------------------------------------------------- 11 响应式 */
@media (min-width: 640px) {
  .slogan { font-size: 38px; }
  html[lang="en"] .slogan { font-size: 30px; }
}
@media (min-width: 768px) {
  .slogan { font-size: 42px; letter-spacing: .4em; margin-right: -.4em; }
  html[lang="en"] .slogan { font-size: 34px; letter-spacing: .15em; margin-right: -.15em; }
}
@media (min-width: 1024px) {
  .slogan { font-size: 46px; }
  html[lang="en"] .slogan { font-size: 36px; }
}

@media (max-width: 900px) {
  .section-head { grid-template-columns: 1fr; gap: var(--s4); }
  .proj-list { grid-template-columns: 1fr; }
  .chat-turn { max-width: 92%; }
  .news-row { grid-template-columns: 1fr; gap: var(--s2); }
  .news-row .news-arrow { display: none; }
  .footer-top { flex-direction: column; }
}

@media (max-width: 760px) {
  :root {
    --header-h: 60px;
    /* 20px 的背景模糊在手机 GPU 上很贵（页头 + 输入框 + chip 多处叠加）。
       12px 观感几乎一样，开销小得多。 */
    --blur: 12px;
  }
  .shell, .hero-inner { width: min(var(--shell), 100% - 32px); }

  /* 移动端抽屉 */
  :root {
    --hdr-top: 6px; --hdr-top-on: 4px;
    --hdr-inner-h: 44px; --hdr-inner-h-on: 40px;
    --hdr-inset: 0px;           /* 手机上一律不内缩 */
  }
  .site-header { width: min(100% - 24px, 1280px); }
  .nav {
    position: fixed; inset: var(--header-h) 0 auto;
    flex-direction: column; align-items: stretch; gap: 0;
    padding: var(--s3) 16px var(--s5);
    background: var(--bg-page);
    border-bottom: 1px solid var(--border-divider);
    box-shadow: var(--shadow-float);
    transform: translateY(-8px);
    opacity: 0; visibility: hidden; pointer-events: none;
    transition: opacity .2s var(--ease), transform .2s var(--ease), visibility .2s;
  }
  .nav.is-open { transform: none; opacity: 1; visibility: visible; pointer-events: auto; }
  .nav a { padding: 13px 4px; font-size: 16px; border-bottom: 1px solid var(--border-divider); }
  .nav-toggle { display: inline-flex; }
  .header-actions .lang-switch,
  .header-actions .btn { display: none; }

  .hero-inner { gap: var(--s6); padding-bottom: var(--s8); }
  .hero-announce .announce-text {
    white-space: normal;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  }
  .composer { max-width: 100%; }
  .section { padding: var(--s8) 0; }
  .footer-cols { gap: var(--s7) var(--s6); }
}

@media (max-width: 480px) {
  .slogan { font-size: 26px; letter-spacing: .22em; margin-right: -.22em; }
  .hero-actions { width: 100%; }
  .hero-actions .btn { flex: 1 1 auto; }
}

/* ------------------------------------------------- 12 打印与无障碍 */
@media print {
  .site-header, .hero-canvas, .composer, .hero-actions, .nav-toggle, .toast { display: none !important; }
  .hero { background: none; }
  body { color: #000; background: #fff; }
}

@media (prefers-contrast: more) {
  :root { --border-subtle: rgba(0, 0, 0, .3); --text-description: rgba(0, 0, 0, .85); }
}
