/* Schemata 前端设计系统(单一样式源)。
 *
 * 三个页面共用这一份:
 *   index.html  官网首页(营销向,深色 hero + 浅色内容)
 *   login.html  登录/注册(分栏)
 *   studio.html 工作台(应用向,浅色高密度)
 *
 * 结构:① 令牌 ② 基础元素 ③ 基础组件(按钮/表单/卡片/状态) ④ 官网 ⑤ 登录 ⑥ 工作台。
 * 画布自身的 UI 在 canvas.css(它随 IR 一起发版,口径独立)。
 */

/* ══════════════════════════════════════════════════════ ① 令牌 */
:root {
  /* 中性色 —— 用带一点冷调的灰,避免"默认灰"带来的廉价感 */
  --ink:        #0b1220;
  --ink-2:      #131c2e;
  --bg:         #f5f7fa;
  --bg-2:       #eef1f6;
  --surface:    #ffffff;
  --surface-2:  #f7f9fc;
  --surface-3:  #eff2f7;
  --line:       #e2e7f0;
  --line-2:     #d3dae6;
  --text:       #0f1729;
  --text-2:     #4a5568;
  --text-3:     #78829a;

  /* 品牌 —— 深青(科研仪器感),配靛蓝/紫罗兰做辅助色 */
  --brand:      #0e7c72;
  --brand-hi:   #12988c;
  --brand-ink:  #0a5049;
  --brand-soft: #e6f4f1;
  --brand-line: #b9ded8;
  --indigo:     #4f46e5;
  --violet:     #7c3aed;
  --sky:        #0ea5e9;
  --amber:      #b45309;
  --amber-soft: #fdf3e4;
  --danger:     #b42318;
  --danger-soft:#fdeceb;
  --ok:         #0e7c72;
  --ok-soft:    #e6f4f1;

  --radius-xs: 6px;
  --radius-sm: 9px;
  --radius:    13px;
  --radius-lg: 20px;
  --radius-xl: 30px;

  --sh-1: 0 1px 2px rgba(15, 23, 41, .05);
  --sh-2: 0 2px 6px rgba(15, 23, 41, .06), 0 1px 2px rgba(15, 23, 41, .04);
  --sh-3: 0 14px 34px -14px rgba(15, 23, 41, .22), 0 2px 8px rgba(15, 23, 41, .05);
  --sh-4: 0 30px 70px -28px rgba(11, 18, 32, .45);

  --font: "PingFang SC", "SF Pro Text", system-ui, -apple-system, "Segoe UI",
          "Noto Sans SC", "Microsoft YaHei", sans-serif;
  --mono: ui-monospace, "SF Mono", "JetBrains Mono", Menlo, Consolas, monospace;

  /* 压在品牌色上的前景色。🔴 暗色模式下 --brand-hi 是**浅**青
     (#5eead4),白字配它对比度不足 —— 按钮与徽标必须跟着换成深墨色。 */
  --on-brand: #ffffff;

  /* 深色面上的前景色(hero / 登录页左栏共用)。
     🔴 必须挂在 :root 上:只挂在 .site 上的话登录页取不到 —— `color: var(--hero-fg)`
        整条声明失效,标题会退回深色字压在深色底上,肉眼几乎看不见。 */
  --hero-fg: #eaf0fb;

  --rail-w: 268px;
  --inspector-w: 348px;
  --bar-h: 58px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --ink:        #070b14;
    --ink-2:      #0d1422;
    --bg:         #0c111c;
    --bg-2:       #101725;
    --surface:    #141b2b;
    --surface-2:  #19212f;
    --surface-3:  #212a3b;
    --line:       #263044;
    --line-2:     #333f56;
    --text:       #e8ecf5;
    --text-2:     #a4b0c4;
    --text-3:     #7b8799;

    --brand:      #2dd4bf;
    --brand-hi:   #5eead4;
    --brand-ink:  #a7f3e4;
    --brand-soft: #10312e;
    --brand-line: #1c4a45;
    --indigo:     #818cf8;
    --violet:     #a78bfa;
    --sky:        #38bdf8;
    --on-brand:   #04211e;
    --amber:      #fbbf24;
    --amber-soft: #33270f;
    --danger:     #f87171;
    --danger-soft:#3a1c1a;

    --sh-1: 0 1px 2px rgba(0, 0, 0, .4);
    --sh-2: 0 2px 8px rgba(0, 0, 0, .45);
    --sh-3: 0 16px 36px -16px rgba(0, 0, 0, .7);
    --sh-4: 0 30px 70px -28px rgba(0, 0, 0, .8);
  }
}

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

/* 🔴 作者样式里的 `display` 会**压过** UA 的 `[hidden] { display: none }`
   (同特异性时作者表优先)。于是任何带 `display: grid/flex` 的元素上写 `hidden`
   根本不生效 —— 空状态和画布会同时在页面上,画布被推到下面看不见。
   实测踩到:生成成功后画布明明挂上了,屏幕上还是「还没有图」。
   这条兜住所有 `el.hidden = true`。 */
[hidden] { display: none !important; }

html, body { height: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 14px/1.6 var(--font);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4 { margin: 0; font-weight: 650; letter-spacing: -.01em; line-height: 1.25; }
p { margin: 0; }
a { color: inherit; text-decoration: none; }
ul, ol { margin: 0; padding: 0; list-style: none; }
img, svg { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }

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

.muted { color: var(--text-2); }
.small { font-size: 12.5px; }
.mono  { font-family: var(--mono); }
.nowrap { white-space: nowrap; }
.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;
}

/* ══════════════════════════════════════════════════════ ③ 组件 */

/* ── 按钮 ── */
.btn {
  --btn-bg: var(--surface);
  --btn-fg: var(--text);
  --btn-bd: var(--line-2);
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  padding: 8px 15px; min-height: 36px;
  background: var(--btn-bg); color: var(--btn-fg);
  border: 1px solid var(--btn-bd); border-radius: var(--radius-sm);
  font-size: 13.5px; font-weight: 550; letter-spacing: .01em;
  cursor: pointer; white-space: nowrap;
  transition: background .15s ease, border-color .15s ease, transform .12s ease,
              box-shadow .15s ease, color .15s ease;
}
.btn:hover:not(:disabled) { background: var(--surface-3); border-color: var(--line-2); }
.btn:active:not(:disabled) { transform: translateY(.5px); }
.btn:disabled { opacity: .45; cursor: not-allowed; }

.btn.primary {
  --btn-bg: linear-gradient(180deg, var(--brand-hi), var(--brand));
  --btn-fg: var(--on-brand); --btn-bd: transparent;
  box-shadow: 0 1px 2px rgba(14, 124, 114, .28), 0 6px 16px -8px rgba(14, 124, 114, .6);
}
.btn.primary:hover:not(:disabled) {
  background: linear-gradient(180deg, color-mix(in srgb, var(--brand-hi) 92%, white),
                             color-mix(in srgb, var(--brand) 92%, white));
}
.btn.soft    { --btn-bg: var(--brand-soft); --btn-fg: var(--brand-ink); --btn-bd: var(--brand-line); }
.btn.soft:hover:not(:disabled) { --btn-bg: color-mix(in srgb, var(--brand-soft) 70%, var(--brand-line)); }
.btn.ghost   { --btn-bg: transparent; --btn-bd: transparent; --btn-fg: var(--text-2); }
.btn.ghost:hover:not(:disabled) { --btn-bg: var(--surface-3); --btn-fg: var(--text); }
.btn.danger  { --btn-fg: var(--danger); --btn-bd: color-mix(in srgb, var(--danger) 30%, var(--line-2)); }
.btn.lg      { min-height: 46px; padding: 12px 26px; font-size: 15px; border-radius: var(--radius); }
.btn.sm      { min-height: 30px; padding: 5px 11px; font-size: 12.5px; border-radius: var(--radius-xs); }
.btn.icon    { padding: 6px; min-width: 32px; min-height: 32px; }
.btn .i { width: 16px; height: 16px; flex: none; }

/* ── 表单 ── */
.field { display: grid; gap: 6px; margin-bottom: 14px; }
.field > label, .field-label {
  font-size: 12.5px; font-weight: 600; color: var(--text-2); letter-spacing: .02em;
}
.field-hint { font-size: 12px; color: var(--text-3); }

.input, .select, .textarea {
  width: 100%; padding: 9px 12px;
  background: var(--surface);
  border: 1px solid var(--line-2); border-radius: var(--radius-sm);
  font-size: 14px; color: var(--text);
  transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}
.textarea { resize: vertical; min-height: 84px; line-height: 1.65; }
.input::placeholder, .textarea::placeholder { color: var(--text-3); }
.input:hover, .select:hover, .textarea:hover { border-color: var(--text-3); }
.input:focus, .select:focus, .textarea:focus {
  outline: none; border-color: var(--brand);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 16%, transparent);
}
.select {
  appearance: none;
  padding-right: 32px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M2.5 4.5 6 8l3.5-3.5' fill='none' stroke='%2378829a' stroke-width='1.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  background-size: 13px;
  cursor: pointer;
}

/* ── 状态点(替代旧的黄色横幅)── */
.pill {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 5px 11px 5px 9px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--line);
  font-size: 12.5px; color: var(--text-2); white-space: nowrap;
}
.pill .dot {
  width: 7px; height: 7px; border-radius: 50%; flex: none;
  background: var(--text-3); box-shadow: 0 0 0 3px color-mix(in srgb, var(--text-3) 18%, transparent);
}
.pill[data-state="live"]   { color: var(--brand-ink); border-color: var(--brand-line); background: var(--brand-soft); }
.pill[data-state="live"] .dot { background: var(--brand); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 22%, transparent); }
.pill[data-state="demo"]   { color: var(--text-2); }
.pill[data-state="demo"] .dot { background: var(--text-3); }
.pill[data-state="busy"] .dot { background: var(--indigo); animation: pulse 1.1s ease-in-out infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .3; } }
@media (prefers-reduced-motion: reduce) { .pill .dot { animation: none !important; } }

/* ── 提示条:信息级(不是警告横幅)── */
.note {
  display: flex; gap: 9px; align-items: flex-start;
  padding: 10px 12px; border-radius: var(--radius-sm);
  background: var(--surface-2); border: 1px solid var(--line);
  font-size: 12.5px; color: var(--text-2); line-height: 1.55;
}
.note .i { width: 15px; height: 15px; flex: none; margin-top: 1px; color: var(--text-3); }
.note.bad { background: var(--danger-soft); border-color: color-mix(in srgb, var(--danger) 26%, transparent); color: var(--danger); }
.note.bad .i { color: var(--danger); }

/* ── 卡片 ── */
.card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--sh-1);
}

/* ── 吐司 ── */
.toasts {
  position: fixed; right: 18px; bottom: 18px; z-index: 90;
  display: grid; gap: 8px; justify-items: end; pointer-events: none;
}
.toast {
  display: flex; align-items: center; gap: 9px;
  max-width: 380px; padding: 10px 15px;
  background: var(--ink); color: #eef2f8;
  border-radius: var(--radius-sm); box-shadow: var(--sh-3);
  font-size: 13px; animation: rise .22s ease;
}
.toast.ok  { background: #0b4f48; }
.toast.bad { background: #6d1c17; }
.toast .i { width: 15px; height: 15px; flex: none; }
@keyframes rise { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .toast { animation: none; } }

/* ── 品牌标记 ── */
.brandmark { display: inline-flex; align-items: center; gap: 9px; }
.brandmark .glyph {
  width: 28px; height: 28px; border-radius: 8px; flex: none;
  background: linear-gradient(140deg, var(--brand-hi), var(--indigo) 90%);
  display: grid; place-items: center; color: var(--on-brand);
  box-shadow: 0 2px 8px -2px rgba(14, 124, 114, .55);
}
.brandmark .glyph svg { width: 17px; height: 17px; }
.brandmark .word { font-weight: 680; font-size: 15.5px; letter-spacing: -.015em; }
.brandmark .word small {
  display: block; font-size: 10.5px; font-weight: 500;
  color: var(--text-3); letter-spacing: .06em; text-transform: uppercase;
}

/* ══════════════════════════════════════════════════════ ④ 官网首页 */
.site { background: var(--bg); }

.site-header {
  position: sticky; top: 0; z-index: 40;
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 24px;
  padding: 14px clamp(20px, 5vw, 56px);
  background: color-mix(in srgb, var(--ink) 72%, transparent);
  backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid rgba(255, 255, 255, .08);
  color: var(--hero-fg);
}
.site-header > .row { justify-content: flex-end; }
.site-header .brandmark .word small { color: rgba(234, 240, 251, .55); }
.site-nav { display: flex; align-items: center; gap: 4px; }
.site-nav a {
  padding: 7px 13px; border-radius: 999px;
  font-size: 13.5px; color: rgba(234, 240, 251, .74);
  transition: color .15s ease, background .15s ease;
}
.site-nav a:hover { color: #fff; background: rgba(255, 255, 255, .09); }
.site-header .btn { --btn-bg: rgba(255, 255, 255, .1); --btn-fg: #fff; --btn-bd: rgba(255, 255, 255, .16); }
.site-header .btn:hover { --btn-bg: rgba(255, 255, 255, .18); }
.site-header .btn.primary { --btn-bg: linear-gradient(180deg, #2dd4bf, #0e9c90); --btn-fg: #04211e; }
@media (max-width: 780px) {
  /* 窄屏收成两栏:品牌 + 操作,导航整块隐藏(下面 .site-nav 的 display:none 兜住)。 */
  .site-header { grid-template-columns: auto 1fr; }
  .site-nav { display: none; }
}

/* hero */
.hero {
  position: relative; overflow: hidden; color: var(--hero-fg);
  background: var(--ink);
  padding: clamp(56px, 8vw, 104px) clamp(20px, 5vw, 56px) clamp(48px, 7vw, 88px);
}
.hero::before, .hero::after {
  content: ""; position: absolute; border-radius: 50%; filter: blur(90px);
  pointer-events: none; opacity: .55;
}
.hero::before { width: 620px; height: 620px; top: -260px; left: -140px;
  background: radial-gradient(circle, rgba(45, 212, 191, .5), transparent 68%); }
.hero::after  { width: 700px; height: 700px; top: -220px; right: -220px;
  background: radial-gradient(circle, rgba(99, 102, 241, .48), transparent 68%); }
.hero-inner {
  position: relative; z-index: 1;
  max-width: 1180px; margin: 0 auto;
  /* 1fr / 1fr:两栏等宽。原先右侧图栏多 6%,视觉重心偏右,标题与图不对称。 */
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(36px, 5vw, 68px); align-items: center;
}
@media (max-width: 980px) { .hero-inner { grid-template-columns: 1fr; } }

.kicker {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 5px 13px 5px 8px; border-radius: 999px; margin-bottom: 22px;
  background: rgba(255, 255, 255, .07); border: 1px solid rgba(255, 255, 255, .13);
  font-size: 12.5px; color: rgba(234, 240, 251, .9);
}
.kicker .dot { width: 6px; height: 6px; border-radius: 50%; background: #2dd4bf;
  box-shadow: 0 0 0 3px rgba(45, 212, 191, .2); }

.hero h1 {
  font-size: clamp(34px, 5.2vw, 58px); line-height: 1.1; letter-spacing: -.03em;
  font-weight: 700; margin-bottom: 20px;
}
.hero h1 em {
  font-style: normal;
  background: linear-gradient(96deg, #5eead4, #38bdf8 42%, #a78bfa);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero .lede {
  font-size: clamp(15px, 1.5vw, 17.5px); line-height: 1.72; max-width: 30em;
  color: rgba(234, 240, 251, .74); margin-bottom: 30px;
}
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 26px; }
.hero-cta .btn { --btn-bg: rgba(255, 255, 255, .08); --btn-fg: #fff; --btn-bd: rgba(255, 255, 255, .16); }
.hero-cta .btn:hover { --btn-bg: rgba(255, 255, 255, .16); }
.hero-cta .btn.primary { --btn-bg: linear-gradient(180deg, #2dd4bf, #0e9c90); --btn-fg: #04211e; --btn-bd: transparent; }
.hero-meta { display: flex; flex-wrap: wrap; gap: 8px 20px; font-size: 12.5px;
  color: rgba(234, 240, 251, .6); }
.hero-meta span { display: inline-flex; align-items: center; gap: 7px; }
.hero-meta .i { width: 14px; height: 14px; color: #5eead4; }

/* 🔴 页内锚点必须让开吸顶头部 —— 头部是 `sticky; top: 0`(高约 62px),
   不加 `scroll-margin` 时跳过去标题会**被头部盖住**,读者以为没跳对。
   旧版没写这条:从页脚点「生成管线」,落点处正好少了标题那一行。 */
.section[id] { scroll-margin-top: 78px; }

/* hero 里的产品实拍(真实管线产物,非示意图) */
.figure-card {
  position: relative; margin: 0; border-radius: var(--radius-lg); padding: 14px;
  background: rgba(255, 255, 255, .06);
  border: 1px solid rgba(255, 255, 255, .14);
  box-shadow: var(--sh-4);
  backdrop-filter: blur(6px);
}
.figure-card .frame {
  background: #fff; border-radius: var(--radius); padding: clamp(14px, 1.6vw, 20px);
  box-shadow: 0 8px 24px -12px rgba(0, 0, 0, .5);
}
/* 只给 width,height 交给 aspect-ratio(viewBox 2:1)—— 之前写死 680×340 会让
   窄栏时高度按固定值算,和 100% 宽打架。 */
.figure-card .frame svg { display: block; width: 100%; height: auto; }
/* 图注:宽屏**必须一行**。`nowrap` 只加在行内元素上,容器仍保留 wrap ——
   窄屏放不下时整块换行 stacking,而不是把「真实产物 · 非设计稿」从中间
   劈成两行(实测踩到:`flex: none` 只固定了 flex item 的宽度,里面照样断行)。 */
.figure-card figcaption {
  display: flex; align-items: center; justify-content: space-between;
  gap: 8px 16px; flex-wrap: wrap;
  margin-top: 12px; font-size: 12px; color: rgba(234, 240, 251, .58);
}
.figure-card .cap { margin-left: auto; text-align: right; text-wrap: nowrap; }
.figure-card .cap code {
  font-family: var(--mono); font-size: 11px; padding: 1px 5px; border-radius: 4px;
  background: rgba(255, 255, 255, .1); color: rgba(234, 240, 251, .8);
}
.figure-card .tag {
  flex: none; white-space: nowrap; padding: 3px 9px; border-radius: 999px;
  background: rgba(45, 212, 191, .16); color: #7ef0dd;
  font-size: 11.5px; font-weight: 600; letter-spacing: .02em;
}
@media (max-width: 560px) {
  /* 放不下就整块左对齐换行,不做半截折行 */
  .figure-card .cap { margin-left: 0; text-align: left; white-space: normal; }
}

/* 通用区块 */
.section { padding: clamp(52px, 7vw, 92px) clamp(20px, 5vw, 56px); }
.section-inner { max-width: 1180px; margin: 0 auto; }
.section.alt { background: var(--surface); border-block: 1px solid var(--line); }
/* 标题组居中:下方网格 / 表格都是对称的多列布局,标题左对齐会让整块看着「歪」。
   行长仍锁在 62ch,居中只是换了轴,不牺牲可读性。 */
.section-head { max-width: 62ch; margin: 0 auto clamp(28px, 4vw, 46px); text-align: center; }
.section-eyebrow {
  font-size: 12px; font-weight: 650; letter-spacing: .12em; text-transform: uppercase;
  color: var(--brand); margin-bottom: 12px;
}
.section h2 {
  font-size: clamp(25px, 3.2vw, 36px); letter-spacing: -.025em; margin-bottom: 14px;
  text-wrap: balance;
}
.section .lede { font-size: 15.5px; line-height: 1.75; color: var(--text-2); text-wrap: pretty; }

/* 指标条 —— 均为可核验的结构性事实,不含评测分数。
   显式 4 列而非 auto-fit:auto-fit 在某些宽度下会落成 3+1,末项孤零零占满一行。 */
.stat-row {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px;
  background: var(--line); border: 1px solid var(--line);
  border-radius: var(--radius); overflow: hidden;
}
@media (max-width: 900px) { .stat-row { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 460px) { .stat-row { grid-template-columns: 1fr; } }
.stat { background: var(--surface); padding: 24px 22px; }
.stat .label { font-size: 12.5px; color: var(--text-3); margin-bottom: 10px; }
.stat .value {
  font-size: 34px; font-weight: 660; letter-spacing: -.03em; line-height: 1.05;
  color: var(--text);
}
.stat .value .unit { font-size: 15px; font-weight: 500; color: var(--text-3); margin-left: 5px; letter-spacing: 0; }
.stat .sub { margin-top: 9px; font-size: 12.5px; color: var(--text-2); text-wrap: pretty; }

/* 能力卡 —— 4 张一行、6 张两行,两种都排满整行,不留孤儿卡 */
.feature-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }
.feature-grid[data-cols="3"] { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 1040px) {
  .feature-grid, .feature-grid[data-cols="3"] { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 620px) {
  .feature-grid, .feature-grid[data-cols="3"] { grid-template-columns: 1fr; }
}
.feature {
  position: relative; padding: 26px 24px 24px; border-radius: var(--radius);
  background: var(--surface); border: 1px solid var(--line);
  box-shadow: var(--sh-1);
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
  overflow: hidden;
}
.feature:hover { transform: translateY(-2px); box-shadow: var(--sh-3); border-color: var(--line-2); }
/* 能力卡图标:淡色底 + 同色相线稿。
 * 🔴 旧版是「实心深渐变底 + 白色图标」—— 4~6 张卡并排时,一排深色方块成了页面上
 *    最重的元素,把标题与正文都压住了。图标是**语义符号**,不该抢内容。
 *    改淡底之后:① 卡片回到「文字为主、图标点睛」;② 暗色模式**不必另写一份覆盖** ——
 *    底 / 线 / 墨三者都由 color-mix 从同一个色相派生,主题切换时一起翻。 */
.feature .ico {
  --ico-ink: var(--brand);
  width: 40px; height: 40px; border-radius: 12px;
  display: grid; place-items: center; margin-bottom: 16px;
  color: var(--ico-ink);
  background: color-mix(in srgb, var(--ico-ink) 11%, var(--surface));
  border: 1px solid color-mix(in srgb, var(--ico-ink) 24%, transparent);
}
.feature .ico svg { width: 20px; height: 20px; }
.feature h3 { font-size: 15.5px; margin-bottom: 8px; }
.feature p { font-size: 13.5px; line-height: 1.7; color: var(--text-2); }
/* 每个色相只改一枚变量,底色与描边随之派生 —— 再加第五种色相只需加一行。 */
.feature .tint-teal   { --ico-ink: var(--brand); }
.feature .tint-indigo { --ico-ink: var(--indigo); }
.feature .tint-violet { --ico-ink: var(--violet); }
.feature .tint-sky    { --ico-ink: var(--sky); }

/* 管线示意 —— 7 个阶段是单列时间线,靠「居中的定宽块 + 左侧固定数字槽」保持对称,
   满宽铺开会让右侧说明行长度参差,看着散。 */
.pipeline { display: grid; gap: 8px; max-width: 940px; margin: 0 auto; }
.pipe-row {
  display: grid; grid-template-columns: 190px minmax(0, 1fr); gap: 28px; align-items: center;
  padding: 18px 24px; border-radius: var(--radius-sm);
  background: var(--surface-2); border: 1px solid var(--line);
}
@media (max-width: 700px) { .pipe-row { grid-template-columns: 1fr; gap: 8px; padding: 16px 18px; } }
.pipe-row .step { display: flex; align-items: center; gap: 11px; font-size: 14px; font-weight: 600; }
.pipe-row .num {
  width: 24px; height: 24px; flex: none; border-radius: 7px; display: grid; place-items: center;
  font-size: 11.5px; font-weight: 700; font-family: var(--mono);
  background: var(--brand-soft); color: var(--brand-ink); border: 1px solid var(--brand-line);
}
.pipe-row p { font-size: 13.5px; color: var(--text-2); line-height: 1.65; }
.pipe-row code {
  font-family: var(--mono); font-size: 12px; padding: 1px 6px; border-radius: 5px;
  background: var(--surface-3); color: var(--text-2);
}

/* 矩阵表 */
.matrix { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 13.5px; }
.matrix th, .matrix td { padding: 13px 16px; text-align: left; border-bottom: 1px solid var(--line); }
/* 中间两列只有短标签(是 / 逐元素 / 否),居中后表格左右两侧的视觉重量才对等;
   首列(格式名)与末列(典型用途)是长文本,保持左对齐。 */
.matrix thead th:nth-child(2), .matrix thead th:nth-child(3),
.matrix tbody td:nth-child(2), .matrix tbody td:nth-child(3) { text-align: center; }
.matrix thead th {
  font-size: 12px; font-weight: 650; letter-spacing: .04em; text-transform: uppercase;
  color: var(--text-3); background: var(--surface-2);
}
.matrix thead th:first-child { border-top-left-radius: var(--radius-sm); }
.matrix thead th:last-child { border-top-right-radius: var(--radius-sm); }
.matrix tbody tr:last-child td { border-bottom: none; }
.matrix td:first-child { font-weight: 550; }
.tag-yes, .tag-no {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 600;
}
.tag-yes { background: var(--ok-soft); color: var(--brand-ink); }
.tag-no  { background: var(--surface-3); color: var(--text-3); }
.tag-yes .i, .tag-no .i { width: 12px; height: 12px; }

/* 收尾 CTA */
.cta-band {
  position: relative; overflow: hidden;
  background: var(--ink); color: var(--hero-fg);
  border-radius: var(--radius-xl); padding: clamp(34px, 5vw, 58px);
  text-align: center;
}
.cta-band::before {
  content: ""; position: absolute; inset: -40% 20% auto; height: 420px; filter: blur(90px);
  background: radial-gradient(circle, rgba(45, 212, 191, .34), transparent 70%);
}
.cta-band > * { position: relative; }
.cta-band h2 { font-size: clamp(24px, 3.2vw, 34px); margin-bottom: 14px; }
.cta-band p { color: rgba(234, 240, 251, .7); max-width: 52ch; margin: 0 auto 28px; }
.cta-band .btn.primary { --btn-bg: linear-gradient(180deg, #2dd4bf, #0e9c90); --btn-fg: #04211e; --btn-bd: transparent; }

/* 站点页脚(index / legal 共用)。
 *
 * 🔴 为什么是「多列 + 收口」而不是「两端推开」:
 *   旧版是 `display:flex; justify-content:space-between` —— 宽屏下只剩两坨内容被
 *   推到屏幕最左最右,中间拉出一大片空;窄屏又缩成居中的两行。**两种宽度下都不成形**,
 *   因为「左右两坨」这个结构本身没有信息层级,只有分布。
 *   改为「列标题 → 内容」的多列信息架构(参考 figmirror):左侧品牌列承载站点定位,
 *   右侧两列分别装「产品」与「法务与支持」。列宽由内容决定,不靠 space-between 硬撑。
 *
 * 🔴 声明与法务行必须**独占整行、靠左收口**:`AI 生成`标识与备案号是**法定展示项**
 *   (《人工智能生成合成内容标识办法》/ 工信部备案规范),不是版权文案的点缀。
 *   把它们塞进某一列会让它们在窄屏被挤没。 */
.site-footer {
  border-top: 1px solid var(--line);
  background: var(--surface);
  font-size: 12.5px; color: var(--text-3);
}
.site-footer-inner {
  max-width: 1180px; margin: 0 auto;
  padding: clamp(36px, 4.6vw, 54px) clamp(20px, 5vw, 56px) clamp(20px, 2.6vw, 28px);
  display: grid; gap: clamp(22px, 2.8vw, 32px);
}
.site-footer-cols {
  display: grid;
  /* 品牌列宽于两个链接列:它装的是段落,另两列是短标签。 */
  grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(22px, 3.4vw, 44px);
}
@media (max-width: 760px) {
  /* 收成两列时,品牌列**独占整行** —— 否则说明文字被压成一条细柱。 */
  .site-footer-cols { grid-template-columns: 1fr 1fr; }
  .site-footer-col:first-child { grid-column: 1 / -1; }
}
@media (max-width: 460px) { .site-footer-cols { grid-template-columns: 1fr; } }

.site-footer-col h4 {
  margin: 0 0 13px; font-size: 11.5px; font-weight: 680;
  letter-spacing: .11em; text-transform: uppercase; color: var(--text);
}
.site-footer-col p { margin: 0 0 10px; line-height: 1.75; max-width: 36em; }
.site-footer-col ul { display: grid; gap: 9px; }
.site-footer-col li { line-height: 1.5; }
.site-footer-brand { margin-bottom: 13px; }
.site-footer a { color: var(--text-2); transition: color .15s ease; }
.site-footer a:hover { color: var(--brand-ink); }
/* 外链标记(↗)比正文小一号:提示"会离开本站",但不抢正文注意力。 */
.site-footer .ext { font-size: .85em; opacity: .7; margin-left: 2px; }

/* AI 生成内容标识(法定显式标识,措辞与 08-compliance §3.1 一致)。
   独占一行、带分隔线 —— 它是一句**声明**,不是某个导航列的附属项。 */
/* 🔴 分隔线挂在**全宽的列容器**上,不是挂在这句声明上:
   声明本身 `max-width:78ch`(行宽超过 78 字符可读性崩),若把 border-top
   挂在它身上,线会跟着文字一起缩窄 —— 实测截图里线只铺了半宽,像断了。 */
.site-footer-cols {
  border-bottom: 1px solid var(--line);
  padding-bottom: clamp(22px, 2.8vw, 30px);
}
.site-footer-statement {
  margin: 0; padding-top: clamp(18px, 2.4vw, 24px);
  line-height: 1.8; max-width: 78ch;
}
.site-footer-statement strong { color: var(--text-2); font-weight: 620; }

/* 收口行:版权 + 备案号。备案号链接至工信部备案系统,是展示规范的一部分。 */
.site-footer-legal {
  margin: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px;
  font-size: 11.5px;
}
.site-footer-legal .sep { color: var(--line-2); }

/* 工作台页脚:工具界面的空间金贵,做成贴底的一细条,只放必要链接。 */
.app-footer {
  flex: none; display: flex; flex-wrap: wrap; gap: 8px 18px;
  align-items: center; justify-content: space-between;
  padding: 7px 16px; border-top: 1px solid var(--line);
  background: var(--surface); font-size: 11.5px; color: var(--text-3);
}
.app-footer nav { display: flex; gap: 16px; }
.app-footer a { color: var(--text-3); }
.app-footer a:hover { color: var(--text); }

/* ══════════════════════════════════════════════════════ ⑤ 登录 */
.auth {
  min-height: 100vh; display: grid; grid-template-columns: 1.05fr .95fr;
}
@media (max-width: 900px) { .auth { grid-template-columns: 1fr; } .auth-aside { display: none; } }

.auth-aside {
  position: relative; overflow: hidden; color: var(--hero-fg);
  background: var(--ink); padding: clamp(36px, 5vw, 64px);
  display: flex; flex-direction: column; justify-content: space-between; gap: 40px;
}
.auth-aside::before {
  content: ""; position: absolute; width: 620px; height: 620px; top: -180px; left: -180px;
  border-radius: 50%; filter: blur(90px); opacity: .6;
  background: radial-gradient(circle, rgba(45, 212, 191, .48), transparent 68%);
}
.auth-aside::after {
  content: ""; position: absolute; width: 560px; height: 560px; bottom: -220px; right: -180px;
  border-radius: 50%; filter: blur(90px); opacity: .5;
  background: radial-gradient(circle, rgba(129, 140, 248, .45), transparent 68%);
}
.auth-aside > * { position: relative; z-index: 1; }
.auth-aside h2 { font-size: clamp(24px, 2.6vw, 33px); line-height: 1.3; margin-bottom: 16px; letter-spacing: -.02em; }
.auth-aside .lede { color: rgba(234, 240, 251, .72); font-size: 15px; line-height: 1.75; max-width: 34em; }
.aside-points { display: grid; gap: 13px; margin-top: 26px; }
.aside-points li { display: flex; gap: 11px; font-size: 13.5px; color: rgba(234, 240, 251, .8); }
.aside-points .i { width: 17px; height: 17px; flex: none; margin-top: 2px; color: #2dd4bf; }

/* 品牌栏收口:法务入口清单 + 版权/备案行。
   🔴 链接的**触达面积**要够 —— 这是一列可点的文字,不是正文,行高给到 1.5 以上。 */
.aside-foot { display: grid; gap: 14px; }
.aside-links { display: grid; gap: 11px; }
.aside-links li { display: flex; align-items: center; gap: 10px; }
.aside-links .i { width: 15px; height: 15px; flex: none; color: #2dd4bf; }
.aside-links a { font-size: 13px; color: rgba(234, 240, 251, .72); }
.aside-links a:hover { color: #fff; text-decoration: underline; }
.aside-legal {
  display: flex; flex-wrap: wrap; align-items: center; gap: 6px 9px;
  font-size: 11.5px; color: rgba(234, 240, 251, .42);
}
.aside-legal .sep { opacity: .5; }
.aside-legal a { color: rgba(234, 240, 251, .62); }
.aside-legal a:hover { color: #fff; }

.auth-main {
  display: grid; place-items: center; padding: clamp(28px, 5vw, 56px);
  background: var(--bg);
}
.auth-card { width: 100%; max-width: 400px; }
.auth-card .brandmark { margin-bottom: 26px; }
.auth-card h1 { font-size: 24px; margin-bottom: 8px; letter-spacing: -.02em; }
.auth-card > p { color: var(--text-2); font-size: 13.5px; margin-bottom: 26px; }
.auth-switch { margin-top: 22px; padding-top: 20px; border-top: 1px solid var(--line);
  font-size: 13px; color: var(--text-2); text-align: center; }
.auth-switch button { background: none; border: 0; padding: 0; cursor: pointer;
  color: var(--brand); font-weight: 600; }
.auth-switch button:hover { text-decoration: underline; }
.auth-msg { min-height: 20px; margin-top: 12px; font-size: 13px; display: flex; gap: 7px; align-items: flex-start; }
.auth-msg .i { width: 15px; height: 15px; flex: none; margin-top: 2px; }
.auth-msg.bad { color: var(--danger); }
.auth-msg.ok  { color: var(--brand-ink); }
/* 🔴 T-38 新增的第三种语气。此前只有 bad/ok,`pending` 会**没有任何样式** ——
   而未验证提示是用户注册后**必然**会看到的一条,不是边角状态。
   用中性色而不是警示色:它不是错误,是一个待办。 */
.auth-msg.pending { color: var(--text-2); }
.auth-extra { display: flex; gap: 14px; margin-top: 10px; }
.auth-extra:empty { display: none; }
.linkish { background: none; border: 0; padding: 0; font: inherit; font-size: 13px;
  color: var(--text-3); cursor: pointer; text-decoration: underline; }
.linkish:hover { color: var(--text); }
.auth-back { display: inline-flex; align-items: center; gap: 6px; margin-bottom: 20px;
  font-size: 13px; color: var(--text-3); }
.auth-back:hover { color: var(--text); }

/* ══════════════════════════════════════════════════════ ⑥ 工作台 */
/* 定高外壳:高度链必须"确定" —— `min-height` 只保证下限,内容(如画布坞面板)
   会把整条链撑高,画布视口于是随面板内容变高,选个节点就跳一次。
   滚动归各列自己(.rail-list/.tab-panel/.stage-scroll),页面级不滚。 */
.app { height: 100vh; height: 100dvh; display: flex; flex-direction: column; }

.app-bar {
  display: flex; align-items: center; gap: 14px;
  height: var(--bar-h); padding: 0 16px; flex: none;
  background: var(--surface); border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 30;
}
.app-bar .divider { width: 1px; height: 22px; background: var(--line); flex: none; }
.app-bar .spacer { flex: 1; }
.app-bar .credits {
  display: flex; align-items: baseline; gap: 6px; padding: 4px 11px;
  border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line);
  font-size: 12.5px; color: var(--text-2);
}
.app-bar .credits b { font-size: 13.5px; color: var(--text); font-weight: 640; }
.app-bar .user {
  display: flex; align-items: center; gap: 9px; padding: 4px 6px 4px 4px;
  border-radius: 999px; border: 1px solid transparent;
}
.app-bar .user:hover { background: var(--surface-2); border-color: var(--line); }
.app-bar .avatar {
  width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center;
  background: linear-gradient(140deg, var(--brand-hi), var(--indigo));
  color: var(--on-brand); font-size: 12px; font-weight: 650; flex: none;
}
.app-bar .user .email { font-size: 12.5px; color: var(--text-2); max-width: 16ch;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* 三栏:导航轨 / 画布台 / 检查器 */
.app-body {
  flex: 1; min-height: 0;
  display: grid;
  grid-template-columns: var(--rail-w) minmax(0, 1fr) var(--inspector-w);
  grid-template-rows: minmax(0, 1fr); /* 行高吃满、绝不被坞内容顶高(三列均 min-height:0) */
}
@media (max-width: 1240px) { .app-body { grid-template-columns: var(--rail-w) minmax(0, 1fr); } .inspector { display: none; } }
@media (max-width: 900px)  { .app-body { grid-template-columns: 1fr; } .rail { display: none; } }

/* 左轨 */
.rail {
  display: flex; flex-direction: column; min-height: 0;
  background: var(--surface); border-right: 1px solid var(--line);
}
.rail-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 14px 10px;
}
.rail-head h2 { font-size: 12px; font-weight: 650; letter-spacing: .1em;
  text-transform: uppercase; color: var(--text-3); }
.rail-list { flex: 1; overflow: auto; padding: 0 8px 12px; display: grid; gap: 2px; align-content: start; }
.rail-item {
  display: flex; align-items: center; gap: 10px; width: 100%;
  padding: 9px 10px; border: 0; border-radius: var(--radius-sm);
  background: transparent; text-align: left; cursor: pointer;
  transition: background .13s ease;
}
.rail-item:hover { background: var(--surface-2); }
.rail-item.active { background: var(--brand-soft); }
.rail-item.active .name { color: var(--brand-ink); font-weight: 600; }
.rail-item .name { flex: 1; min-width: 0; font-size: 13.5px; color: var(--text);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rail-item .meta { font-size: 11.5px; color: var(--text-3); flex: none; }
.rail-item .glyph {
  width: 24px; height: 24px; flex: none; border-radius: 7px; display: grid; place-items: center;
  background: var(--surface-3); color: var(--text-3); font-size: 11px; font-weight: 650;
}
.rail-item.active .glyph { background: var(--brand); color: var(--on-brand); }
.rail-foot { padding: 10px; border-top: 1px solid var(--line); }
.rail-new { display: flex; gap: 7px; }
.rail-empty { padding: 20px 12px; text-align: center; font-size: 12.5px; color: var(--text-3); }

/* 项目行的"更多操作"(重命名 / 删除)。悬停才出现,免得左轨一直挂着一排图标。 */
.rail-row { position: relative; }
.rail-more {
  position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
  width: 24px; height: 24px; border: 0; border-radius: 6px;
  background: var(--surface-3); color: var(--text-2);
  font-size: 15px; line-height: 1; cursor: pointer;
  opacity: 0; transition: opacity .13s ease;
}
.rail-row:hover .rail-more, .rail-more:focus-visible { opacity: 1; }
.rail-more:hover { color: var(--text); }
.rail-menu {
  position: absolute; right: 6px; top: calc(50% + 16px); z-index: 30;
  display: flex; flex-direction: column; min-width: 132px;
  padding: 4px; border: 1px solid var(--line-2); border-radius: var(--radius-sm);
  background: var(--surface); box-shadow: 0 8px 24px rgb(0 0 0 / 12%);
}
.rail-menu button {
  border: 0; border-radius: var(--radius-xs); background: transparent;
  padding: 7px 9px; text-align: left; font-size: 13px; color: var(--text); cursor: pointer;
}
.rail-menu button:hover { background: var(--surface-2); }
.rail-menu button.danger { color: var(--danger); }
.rail-menu button.danger[data-armed="true"] { background: var(--danger-soft); font-weight: 600; }
.rail-rename { width: 100%; font-size: 13px; }

/* 画布台 */
.stage {
  display: flex; flex-direction: column; min-width: 0; min-height: 0;
  background:
    radial-gradient(circle at 1px 1px, color-mix(in srgb, var(--text) 7%, transparent) 1px, transparent 0)
    0 0 / 22px 22px,
    var(--bg-2);
}
.stage-bar {
  display: flex; align-items: center; gap: 8px; flex: none;
  padding: 10px 16px; border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--surface) 72%, transparent);
  backdrop-filter: blur(8px);
}
.stage-bar h1 { font-size: 14px; font-weight: 620; }
.stage-bar .spacer { flex: 1; }
.tool-group { display: flex; gap: 4px; padding: 3px; border-radius: var(--radius-sm);
  background: var(--surface-2); border: 1px solid var(--line); }

/* 描述输入台(工作台的主操作区) */
.composer { flex: none; padding: 16px 16px 0; }
.composer-box {
  background: var(--surface); border: 1px solid var(--line-2);
  border-radius: var(--radius); box-shadow: var(--sh-2);
  transition: border-color .16s ease, box-shadow .16s ease;
}
.composer-box:focus-within { border-color: var(--brand); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 15%, transparent); }
.composer-box textarea {
  width: 100%; padding: 13px 15px; min-height: 62px; resize: vertical;
  background: transparent; border: 0; font-size: 14.5px; line-height: 1.65;
}
.composer-box textarea:focus { outline: none; }
.composer-box textarea::placeholder { color: var(--text-3); }
.composer-foot {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  padding: 9px 11px; border-top: 1px solid var(--line);
}
.composer-foot .spacer { flex: 1; }
.composer-hint { font-size: 12px; color: var(--text-3); }

.stage-scroll { flex: 1; min-height: 0; overflow: auto; padding: 18px 16px 26px; position: relative; }
/* 画布全幅模式:编辑器占满整个滚动区 —— 页面级滚动条退场,平移/缩放全归画布
   (三层 overflow 嵌套滚动条互相打架,是"操作复杂"的来源之一)。 */
.stage-scroll.is-canvas { display: flex; flex-direction: column; padding: 0; overflow: hidden; }
.stage-scroll.is-canvas .canvas-host:not([hidden]) {
  flex: 1 1 auto; min-width: 0; min-height: 0;
  padding: 0; border: none; border-radius: 0; box-shadow: none; overflow: hidden;
  background: transparent;
}
.stage-scroll.is-canvas .schemata-canvas { border: none; border-radius: 0; }
.stage-scroll.is-canvas #save-msg { position: absolute; left: 14px; bottom: 10px; margin: 0; }
.stage-empty {
  height: 100%; min-height: 320px; display: grid; place-content: center; justify-items: center;
  gap: 14px; text-align: center; color: var(--text-3); padding: 24px;
}
.stage-empty .glyph {
  width: 54px; height: 54px; border-radius: 16px; display: grid; place-items: center;
  background: var(--surface); border: 1px solid var(--line); color: var(--text-3); box-shadow: var(--sh-2);
}
.stage-empty .glyph svg { width: 24px; height: 24px; }
.stage-empty h3 { font-size: 15px; color: var(--text-2); font-weight: 600; }
.stage-empty p { font-size: 13px; max-width: 38ch; }

/* 阶段进度 */
.stages { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.stage-chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 11px; border-radius: 999px; font-size: 12px;
  background: var(--surface); border: 1px solid var(--line); color: var(--text-3);
}
.stage-chip .i { width: 12px; height: 12px; }
.stage-chip[data-s="ok"]      { color: var(--brand-ink); background: var(--brand-soft); border-color: var(--brand-line); }
.stage-chip[data-s="running"] { color: var(--indigo); border-color: color-mix(in srgb, var(--indigo) 34%, transparent); }
.stage-chip[data-s="failed"],
.stage-chip[data-s="degraded"] { color: var(--amber); background: var(--amber-soft);
                                 border-color: color-mix(in srgb, var(--amber) 30%, transparent); }

/* 画布容器 */
.canvas-host {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 12px; box-shadow: var(--sh-2); overflow: auto;
}

/* 检查器 */
.inspector {
  display: flex; flex-direction: column; min-height: 0;
  background: var(--surface); border-left: 1px solid var(--line);
}
.tabs { display: flex; gap: 2px; padding: 8px; border-bottom: 1px solid var(--line); flex: none; }
.tab {
  flex: 1; padding: 7px 8px; border: 0; border-radius: var(--radius-sm);
  background: transparent; color: var(--text-3); font-size: 12.5px; font-weight: 600;
  cursor: pointer; transition: background .14s ease, color .14s ease;
}
.tab:hover { color: var(--text-2); background: var(--surface-2); }
.tab.active { background: var(--brand-soft); color: var(--brand-ink); }
.tab-panel { flex: 1; min-height: 0; overflow: auto; padding: 16px; }
.tab-panel[hidden] { display: none; }
.tab-panel h3 { font-size: 12px; font-weight: 650; letter-spacing: .1em;
  text-transform: uppercase; color: var(--text-3); margin-bottom: 12px; }
.tab-panel section + section { margin-top: 22px; padding-top: 20px; border-top: 1px solid var(--line); }

.kv { display: grid; grid-template-columns: auto 1fr; gap: 7px 14px; font-size: 12.5px; }
.kv dt { color: var(--text-3); }
.kv dd { margin: 0; color: var(--text); text-align: right; }

.code {
  font: 11.5px/1.6 var(--mono); white-space: pre-wrap; word-break: break-word;
  background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 11px 12px; max-height: 420px; overflow: auto; color: var(--text-2);
}
details.fold { border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface-2); }
details.fold > summary {
  padding: 9px 12px; cursor: pointer; font-size: 12.5px; color: var(--text-2);
  font-weight: 550; list-style: none;
}
details.fold > summary::-webkit-details-marker { display: none; }
details.fold > summary::before { content: "▸"; display: inline-block; margin-right: 7px;
  color: var(--text-3); transition: transform .16s ease; }
details.fold[open] > summary::before { transform: rotate(90deg); }
details.fold > div { padding: 0 12px 12px; }

/* 导出面板沿用的类(export.ts 自己生成 DOM,不改它的类契约) */
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.row + .row { margin-top: 10px; }
.metric { font-size: 26px; font-weight: 650; letter-spacing: -.02em; }
.list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.list .name { font-size: 12.5px; }
.verdict { font-size: 12.5px; font-weight: 600; }

/* 面板里的 select 是裸元素(无 .select 类),按面板作用域补齐外观,
   免得它在专业的外壳里像没做完的原生控件。 */
#export-panel > div > .row:first-child { margin-bottom: 10px; }
/* 格式名最长(「SVG(矢量,分层可编辑)」),挤在三列里会被截断 ⇒ 独占一行。 */
#export-panel > div > .row:first-child label:first-child { flex: 1 1 100%; }
#export-panel label {
  display: grid; gap: 5px; flex: 1 1 96px; min-width: 0;
  font-size: 12px; font-weight: 600; color: var(--text-2);
}
#export-panel select {
  width: 100%; padding: 7px 28px 7px 10px; appearance: none;
  background-color: var(--surface);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M2.5 4.5 6 8l3.5-3.5' fill='none' stroke='%2378829a' stroke-width='1.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 9px center; background-size: 13px;
  border: 1px solid var(--line-2); border-radius: var(--radius-sm);
  font-size: 12.5px; font-weight: 500; color: var(--text); cursor: pointer;
}
#export-panel select:disabled { opacity: .5; cursor: not-allowed; }
#export-panel select:focus {
  outline: none; border-color: var(--brand);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 15%, transparent);
}
#export-panel p { margin-top: 9px; line-height: 1.6; }
#export-panel .list li {
  display: grid; grid-template-columns: 1fr auto; gap: 4px 10px; align-items: baseline;
  padding: 9px 11px; border: 1px solid var(--line); border-radius: var(--radius-sm);
  background: var(--surface-2);
}
#export-panel .list li .muted { grid-column: 1 / -1; font-size: 11.5px; }
#export-panel .list li .verdict { color: var(--text-3); }
#export-panel .list li[data-pass="true"] .verdict { color: var(--brand); }
#export-panel .list li[data-pass="false"] { border-color: color-mix(in srgb, var(--danger) 32%, transparent);
  background: var(--danger-soft); }
#export-panel .list li[data-pass="false"] .verdict { color: var(--danger); }
#export-panel > div > .btn { margin-top: 12px; }

/* 生成记录(版本列表,T-39 顺带修「重新登录后图不见了」) */
.version-list {
  display: flex; flex-direction: column; gap: 4px;
  max-height: 260px; overflow-y: auto; margin-top: 8px;
}
.version-item {
  display: flex; flex-direction: column; gap: 2px; width: 100%;
  padding: 8px 10px; border: 1px solid transparent; border-radius: var(--radius-sm);
  background: var(--surface-2); text-align: left; cursor: pointer;
  transition: background .13s ease, border-color .13s ease;
}
.version-item:hover { background: var(--surface-3); }
.version-item.active { background: var(--brand-soft); border-color: var(--brand-line); }
.version-item .version-title { font-size: 13px; font-weight: 600; color: var(--text); }
.version-item.active .version-title { color: var(--brand-ink); }
/* 原始描述(Q22 B1):让用户一眼认出"哪条是哪次生成" —— 这是这个列表存在的理由 */
.version-item .version-desc {
  font-size: 12.5px; color: var(--text-2); line-height: 1.45;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.version-item .version-meta { font-size: 11.5px; color: var(--text-3); }

/* 素材库(T-14 入口)。🔴 **缩略图是必须的**:素材库的价值就是"看得见的样子" ——
   只列名字的列表等于让人盲选(此前画布里的换图标面板就是纯文字按钮)。 */
.asset-filter {
  display: flex; align-items: center; gap: 6px;
  margin: 8px 0 10px; cursor: pointer;
}
.asset-grid {
  display: grid; gap: 8px;
  grid-template-columns: repeat(auto-fill, minmax(84px, 1fr));
  max-height: 400px; overflow-y: auto; padding: 2px;
  align-content: start;
}
.asset-card {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  padding: 6px 4px; border: 1px solid var(--line); border-radius: var(--radius-sm);
  background: var(--surface-2); cursor: pointer; text-align: center;
  transition: border-color .13s ease, background .13s ease;
}
.asset-card:hover { border-color: var(--brand-line); background: var(--surface-3); }
.asset-card.active { border-color: var(--brand-line); background: var(--brand-soft); }
.asset-card.active .asset-name { color: var(--brand-ink); font-weight: 600; }
/* 图标本体是黑线稿 ⇒ 给白底,免得贴在浅灰卡面上看不清 */
.asset-thumb {
  width: 46px; height: 46px; object-fit: contain;
  background: #ffffff; border-radius: 6px;
}
.asset-name {
  font-size: 11.5px; line-height: 1.3; color: var(--text);
  overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
}
.asset-license { font-size: 10px; color: var(--text-3); letter-spacing: .01em; }

/* ══════════════════════════════════════════════════════ ⑦ 法务文书页 */
/* 协议 / 隐私是**要给人读完**的长文:克制的排版、足够的行距、可扫读的目录。
   全部走令牌变量,暗色模式自动跟随(此页无独立的暗色覆盖)。 */
.legal-page { min-height: 100vh; background: var(--bg); }
.legal-top {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 14px clamp(20px, 5vw, 56px);
  background: var(--surface); border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 10;
}
.legal-top .auth-back { margin-bottom: 0; }
.legal-wrap {
  max-width: 760px; margin: 0 auto;
  padding: clamp(28px, 5vw, 56px) clamp(20px, 5vw, 32px) 72px;
}
.legal-eyebrow {
  font-size: 11.5px; font-weight: 650; letter-spacing: .12em; text-transform: uppercase;
  color: var(--brand-ink);
}
.legal-wrap h1 { font-size: clamp(24px, 3vw, 31px); letter-spacing: -.02em; margin: 8px 0 10px; }
.legal-meta { font-size: 12.5px; color: var(--text-3); line-height: 1.7; }
.legal-meta a, .legal p a { color: var(--brand-ink); }
.legal-lede {
  margin: 18px 0 0; padding: 15px 17px; font-size: 14px; line-height: 1.85;
  color: var(--text-2); background: var(--surface); border: 1px solid var(--line);
  border-left: 3px solid var(--brand-line); border-radius: var(--radius-sm);
}
.legal-toc {
  display: flex; flex-wrap: wrap; gap: 10px; margin: 22px 0 6px;
  padding-top: 18px; border-top: 1px solid var(--line);
}
.legal-toc a {
  font-size: 13px; color: var(--brand-ink); padding: 6px 13px;
  background: var(--brand-soft); border-radius: 999px;
}
.legal-toc a:hover { background: var(--brand-line); }

.legal { padding-top: 26px; }
.legal h2 {
  font-size: clamp(20px, 2.4vw, 24px); letter-spacing: -.01em;
  padding-bottom: 10px; margin-bottom: 18px; border-bottom: 1px solid var(--line);
}
.legal h3 { font-size: 15px; margin: 26px 0 9px; color: var(--text); }
.legal p, .legal li { font-size: 13.5px; line-height: 1.9; color: var(--text-2); }
.legal p { margin-bottom: 10px; }
.legal ul { margin: 0 0 10px; padding-left: 20px; display: grid; gap: 5px; }
.legal li::marker { color: var(--brand-line); }
.legal strong { color: var(--text); font-weight: 650; }
.legal-note {
  margin: 12px 0; padding: 12px 15px; font-size: 13px; border-radius: var(--radius-sm);
  background: var(--amber-soft); border: 1px solid color-mix(in srgb, var(--amber) 22%, transparent);
  color: var(--text-2);
}
.legal-table { width: 100%; border-collapse: collapse; margin: 12px 0 14px; font-size: 12.8px; }
.legal-table th, .legal-table td {
  text-align: left; vertical-align: top; padding: 9px 11px;
  border: 1px solid var(--line); line-height: 1.7; color: var(--text-2);
}
.legal-table th { background: var(--surface-3); color: var(--text); font-weight: 620; }
.legal-table td:first-child { color: var(--text); font-weight: 600; white-space: nowrap; }
.legal-foot {
  margin-top: 40px; padding-top: 18px; border-top: 1px solid var(--line);
  font-size: 12px; color: var(--text-3); line-height: 1.7;
}

/* 注册表单里的「同意协议」勾选。🔴 不是装饰 —— auth.js 会拦未勾选的提交。 */
.auth-legal {
  display: flex; gap: 9px; align-items: flex-start;
  margin: 4px 0 2px; font-size: 12.5px; line-height: 1.65; color: var(--text-2);
}
.auth-legal[hidden] { display: none; }
.auth-legal input { margin-top: 2px; flex: none; accent-color: var(--brand); width: 15px; height: 15px; }
.auth-legal a { color: var(--brand-ink); text-decoration: underline; }
.auth-legal.invalid { color: var(--danger); }
.auth-legal.invalid a { color: var(--danger); }
.auth-legal-links {
  display: flex; flex-wrap: wrap; gap: 8px; justify-content: center;
  margin-top: 20px; font-size: 12px; color: var(--text-3);
}
.auth-legal-links a { color: var(--text-3); }
.auth-legal-links a:hover { color: var(--text); }

