/* ==========================================================================
   股库 StockLibs · 设计系统
   方向：墨底纸白（Ink & Paper）· 编辑级排版 · 克制的金色强调
        A 股语义色独占红/绿，不与强调色争抢
   原则：1px 发丝线分层（不用重阴影）· 大留白 · 数字等宽对齐 · 动效克制
   ========================================================================== */

/* ---------- 字体（自托管，不外链） ---------- */
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 400 600; font-display: swap;
  src: url('../fonts/inter-400-600-latin.woff2') format('woff2'); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 400 600; font-display: swap;
  src: url('../fonts/inter-400-600-latin-ext.woff2') format('woff2'); unicode-range: U+0100-024F,U+0259,U+1E00-1EFF,U+2020,U+20A0-20AB,U+20AD-20CF,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family: 'Space Grotesk'; font-style: normal; font-weight: 500 700; font-display: swap;
  src: url('../fonts/space-grotesk-500-700-latin.woff2') format('woff2'); }
@font-face { font-family: 'Space Grotesk'; font-style: normal; font-weight: 500 700; font-display: swap;
  src: url('../fonts/space-grotesk-500-700-latin-ext.woff2') format('woff2'); }
@font-face { font-family: 'JetBrains Mono'; font-style: normal; font-weight: 400 600; font-display: swap;
  src: url('../fonts/jetbrains-mono-400-600-latin.woff2') format('woff2'); }
@font-face { font-family: 'JetBrains Mono'; font-style: normal; font-weight: 400 600; font-display: swap;
  src: url('../fonts/jetbrains-mono-400-600-latin-ext.woff2') format('woff2'); }

/* ---------- 令牌 ---------- */
:root {
  --ink-0: #08090d;
  --ink-1: #0d0f15;
  --ink-2: #14171f;
  --ink-3: #1b1f29;
  --line: rgba(255, 255, 255, .075);
  --line-2: rgba(255, 255, 255, .14);
  --paper: #f2f3f5;
  --muted: #8a90a0;
  --faint: #575d6d;
  --accent: #c8a96a;
  --accent-soft: rgba(200, 169, 106, .14);
  --up: #ff5a5f;
  --down: #2fd87a;
  --flat: #8a90a0;
  --ma5: #e8c07d;
  --ma10: #7fb4ff;
  --ma20: #c79bff;
  --ma60: #6b7280;

  --font-sans: 'Inter', system-ui, -apple-system, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  --font-display: 'Space Grotesk', 'Inter', system-ui, 'PingFang SC', 'Microsoft YaHei', sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, Consolas, 'SF Mono', monospace;

  --r-sm: 8px;
  --r: 14px;
  --r-lg: 20px;
  --gut: 24px;
  --maxw: 1320px;
  --ease: cubic-bezier(.22, .61, .36, 1);
  --ease-out: cubic-bezier(.16, 1, .3, 1);
}

html[data-theme='light'] {
  --ink-0: #efece7;
  --ink-1: #f7f5f2;
  --ink-2: #ffffff;
  --ink-3: #f1efeb;
  --line: rgba(20, 22, 30, .09);
  --line-2: rgba(20, 22, 30, .18);
  --paper: #14161e;
  --muted: #6b7280;
  --faint: #9aa0ab;
  --accent: #9a7b34;
  --accent-soft: rgba(154, 123, 52, .12);
  --up: #d93025;
  --down: #12864a;
  --flat: #6b7280;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
/* 安全网：任何子元素算错宽度都不该让整页横向滚动 */
html, body { overflow-x: clip; }

body {
  margin: 0;
  background: var(--ink-1);
  color: var(--paper);
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  transition: background-color .28s var(--ease), color .28s var(--ease);
}
.topbar, .card, .stat, .table-wrap { transition: background-color .28s var(--ease), border-color .28s var(--ease); }

html[dir='rtl'] body { direction: rtl; }

a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }

::selection { background: var(--accent); color: var(--ink-0); }

/* 数字：等宽 + 表格数字（对齐的关键） */
.num, .kpi, td.num, th.num, .ticker-val {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-feature-settings: 'tnum' 1;
  letter-spacing: -.01em;
}

.up { color: var(--up); }
.down { color: var(--down); }
.flat { color: var(--flat); }
.muted { color: var(--muted); }
.faint { color: var(--faint); }

/* 可访问性：键盘焦点始终可见 */
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- 骨架 ---------- */
.shell { min-height: 100vh; display: flex; flex-direction: column; }
.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gut); }

/* 顶栏 */
.topbar {
  position: sticky; top: 0; z-index: 60;
  background: color-mix(in srgb, var(--ink-1) 88%, transparent);
  backdrop-filter: saturate(140%) blur(14px);
  border-bottom: 1px solid var(--line);
}
.topbar-inner { display: flex; align-items: center; gap: 18px; height: 62px; }
.brand { display: flex; align-items: center; gap: 9px; font-family: var(--font-display); font-weight: 700; font-size: 17px; letter-spacing: -.02em; white-space: nowrap; }
.brand-mark {
  /* 真实标识（红砖 + 白蜡烛 + 金点）。以前这里是个金色方块占位，已换成品牌 SVG。 */
  width: 24px; height: 24px; flex: none; display: block;
}
.nav { display: flex; align-items: center; gap: 2px; }
.nav a {
  padding: 7px 12px; border-radius: 9px; color: var(--muted);
  font-size: 13.5px; font-weight: 500; transition: color .18s var(--ease), background .18s var(--ease);
}
.nav a:hover { color: var(--paper); background: var(--ink-3); }
.nav a.on { color: var(--paper); background: var(--ink-3); }
.nav a.on::after {
  content: ''; display: block; height: 2px; margin: 5px auto -9px; width: 16px;
  background: var(--accent); border-radius: 2px;
}
.topbar-right { margin-inline-start: auto; display: flex; align-items: center; gap: 10px; }

/* 搜索（带下拉建议） */
.search-wrap { position: relative; }
.search-input {
  width: 240px; height: 36px; padding: 0 12px 0 34px;
  background: var(--ink-2); border: 1px solid var(--line); border-radius: 10px;
  color: var(--paper); font-size: 13px; transition: border-color .18s var(--ease), width .22s var(--ease);
}
.search-input::placeholder { color: var(--faint); }
.search-input:focus { border-color: var(--accent); outline: none; width: 288px; }
.search-ico { position: absolute; inset-inline-start: 11px; top: 50%; transform: translateY(-50%); color: var(--faint); pointer-events: none; }
.suggest {
  position: absolute; top: calc(100% + 8px); inset-inline-start: 0; width: 340px; max-height: 380px; overflow-y: auto;
  background: var(--ink-2); border: 1px solid var(--line-2); border-radius: var(--r);
  padding: 6px; z-index: 70;
  opacity: 0; transform: translateY(-6px) scale(.98); pointer-events: none;
  transition: opacity .16s var(--ease-out), transform .16s var(--ease-out);
}
.suggest.on { opacity: 1; transform: none; pointer-events: auto; }
.sg-item { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 9px; cursor: pointer; }
.sg-item:hover, .sg-item.active { background: var(--ink-3); }
.sg-code { font-family: var(--font-mono); font-size: 12px; color: var(--muted); min-width: 62px; }
.sg-name { font-size: 13px; }
.sg-board { margin-inline-start: auto; font-size: 11px; color: var(--faint); }

/* 语言 / 主题 / 账号 */
.icon-btn {
  width: 36px; height: 36px; display: inline-flex; align-items: center; justify-content: center;
  background: var(--ink-2); border: 1px solid var(--line); border-radius: 10px; cursor: pointer;
  transition: border-color .18s var(--ease), background .18s var(--ease);
}
.icon-btn:hover { border-color: var(--line-2); background: var(--ink-3); }
.lang-select {
  height: 36px; padding: 0 8px; background: var(--ink-2); border: 1px solid var(--line);
  border-radius: 10px; color: var(--paper); font-size: 12.5px; cursor: pointer;
}

/* ---------- 顶栏下拉（语言用国旗、账号用人头） ---------- */
.dd { position: relative; }
.dd-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 5px;
  height: 36px; min-width: 36px; padding: 0 9px; cursor: pointer;
  background: var(--ink-2); border: 1px solid var(--line); border-radius: 10px; color: var(--paper);
  transition: border-color .18s var(--ease), background .18s var(--ease);
}
.dd-btn:hover { border-color: var(--line-2); background: var(--ink-3); }
.dd-btn .flag { display: inline-flex; line-height: 0; }
.dd-btn .flag svg, .dd-flag svg { width: 19px; height: 13px; border-radius: 2px; display: block; box-shadow: inset 0 0 0 1px rgba(255,255,255,.14); }
.dd-btn .ava svg { width: 18px; height: 18px; display: block; }
.dd-btn .caret { font-size: 9px; color: var(--faint); }
.dd-btn.round { border-radius: 50%; padding: 0; width: 36px; }
.dd-btn .ava { font-size: 16px; line-height: 1; }
.dd-panel {
  position: absolute; top: calc(100% + 8px); inset-inline-end: 0; min-width: 176px;
  background: var(--ink-2); border: 1px solid var(--line-2); border-radius: 12px; padding: 6px;
  z-index: 80; box-shadow: 0 18px 40px -22px rgba(0, 0, 0, .8);
  opacity: 0; transform: translateY(-6px) scale(.98); pointer-events: none;
  transition: opacity .16s var(--ease-out), transform .16s var(--ease-out);
}
.dd-panel.on { opacity: 1; transform: none; pointer-events: auto; }
.dd-panel[hidden] { display: none !important; }
.dd-item {
  display: flex; align-items: center; gap: 9px; padding: 8px 10px; border-radius: 9px;
  font-size: 13px; color: var(--muted); width: 100%; text-align: start; cursor: pointer;
  background: transparent; border: 0;
}
.dd-item:hover { background: var(--ink-3); color: var(--paper); }
.dd-item.on { color: var(--paper); font-weight: 600; }
.dd-flag { width: 22px; display: inline-flex; align-items: center; justify-content: center; }
.dd-sep { height: 1px; background: var(--line); margin: 5px 6px; }
.dd-head { padding: 8px 10px 6px; font-size: 11.5px; color: var(--faint); }

/* 按钮 */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  height: 38px; padding: 0 16px; border-radius: 10px; cursor: pointer;
  background: var(--ink-2); border: 1px solid var(--line); color: var(--paper);
  font-size: 13.5px; font-weight: 500;
  transition: transform .16s var(--ease), border-color .18s var(--ease), background .18s var(--ease);
}
.btn:hover { border-color: var(--line-2); background: var(--ink-3); transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn-primary {
  background: var(--accent); border-color: var(--accent); color: var(--ink-0); font-weight: 600;
}
.btn-primary:hover { background: color-mix(in srgb, var(--accent) 88%, #fff); border-color: transparent; }
.btn-ghost { background: transparent; }
.btn-sm { height: 32px; padding: 0 12px; font-size: 12.5px; }

/* ---------- 卡片 ---------- */
.card {
  background: var(--ink-2); border: 1px solid var(--line); border-radius: var(--r);
  padding: 18px; min-width: 0;
  transition: border-color .2s var(--ease), transform .2s var(--ease);
}
.card-hover:hover { border-color: var(--line-2); transform: translateY(-2px); }
.card-head { display: flex; align-items: baseline; gap: 10px; margin-bottom: 14px; }
.card-title { font-family: var(--font-display); font-size: 14px; font-weight: 600; letter-spacing: -.01em; margin: 0; }
.card-sub { font-size: 12px; color: var(--faint); }

.grid { display: grid; gap: 16px; }
.g-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.g-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g-main { grid-template-columns: minmax(0, 1fr) 320px; }

/* ---------- 行情条 ---------- */
.ticker { display: flex; gap: 22px; overflow-x: auto; scrollbar-width: none; }
.ticker::-webkit-scrollbar { display: none; }
.tk { display: flex; align-items: baseline; gap: 8px; white-space: nowrap; font-size: 12.5px; }
.tk-name { color: var(--muted); }
.tk-val { font-weight: 600; }

/* ---------- 首页 Hero ---------- */
/*
 * 首屏 = 一张「左黑 → 右灰 + 全红 K 线」的横带。
 * 这块**恒为暗底**（连浅色主题也保持同一张图），所以在这里就地覆盖 --paper/--muted 等
 * 令牌，保证两种主题下文字颜色都对着这张图来；出了 .hero 作用域即失效，不影响别处。
 */
.hero {
  /* ⚠️ 2026-10-09：必须连 --ink-* 一起钉死（浅色主题下 --ink-2=#fff / --ink-0=#efece7，
     只钉 --paper 会让首屏那个次级按钮变成「白底 + 近白字」看不见）。 */
  --ink-0: #05070c; --ink-1: #0a0d14;
  --ink-2: rgba(255, 255, 255, .07); --ink-3: rgba(255, 255, 255, .14);
  --paper: #f3f4f6; --muted: #b6bcc9; --faint: #8e95a4;
  --accent: #d9bd85; --accent-soft: rgba(217, 189, 133, .16);
  --line: rgba(255, 255, 255, .10); --line-2: rgba(255, 255, 255, .18);
  color: var(--paper);
  position: relative; isolation: isolate; overflow: hidden;
  display: flex; align-items: center;
  margin-top: 26px; min-height: 430px;
  padding: 62px 56px 58px;
  border: 1px solid var(--line-2); border-radius: var(--r-lg);
  background: #05070c;
}
.hero-art {
  position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background-image: url('../img/hero-kline.jpg');
  background-image: -webkit-image-set(url('../img/hero-kline.webp') 1x);
  background-image: image-set(url('../img/hero-kline.webp') 1x);
  background-repeat: no-repeat;
  background-position: right center;
  background-size: cover;
}
/* 罩层：左边压暗保证正文可读，右边放开让红色 K 线出来；顺带一缕金色氛围光 */
.hero-veil {
  position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background:
    linear-gradient(90deg,
      rgba(5, 7, 12, .95) 0%, rgba(5, 7, 12, .80) 28%,
      rgba(5, 7, 12, .30) 52%, rgba(5, 7, 12, 0) 72%),
    radial-gradient(680px 320px at 6% -14%, var(--accent-soft), transparent 62%);
}
.hero-inner { position: relative; z-index: 2; max-width: 620px; }
/* 按钮同样按暗底来画：浅色主题下 .btn 是"白底 + --paper 字"，压在这张黑灰图上会白字白底 */
.hero .btn { background: rgba(255, 255, 255, .07); border-color: rgba(255, 255, 255, .22); color: var(--paper); }
.hero .btn:hover { background: rgba(255, 255, 255, .14); border-color: rgba(255, 255, 255, .34); }
.hero .btn-primary { background: var(--accent); border-color: var(--accent); color: #16181f; }
.hero .btn-primary:hover { background: color-mix(in srgb, var(--accent) 88%, #fff); }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--accent);
  border: 1px solid var(--line-2); border-radius: 999px; padding: 6px 13px;
}
.eyebrow::before { content: ''; width: 5px; height: 5px; border-radius: 50%; background: var(--accent); }
h1.hero-title {
  font-family: var(--font-display);
  font-size: clamp(34px, 5.6vw, 68px);
  line-height: 1.04; letter-spacing: -.035em; font-weight: 700;
  margin: 22px 0 0; max-width: 17ch;
  /* 渐变只压在"纸白 → 浅灰"这一段：以前收到 --ink-1，浅色主题下会变成深色字，
     现在这块 Hero 恒为暗底 + 白字，两种主题都一样。 */
  background: linear-gradient(180deg, var(--paper) 0%, color-mix(in srgb, var(--paper) 76%, #8e95a4) 100%);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.hero-sub { margin: 18px 0 30px; max-width: 52ch; color: var(--muted); font-size: 15.5px; line-height: 1.7; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.hero-stats { display: flex; gap: 40px; margin-top: 46px; flex-wrap: wrap; }
.hs-v { font-family: var(--font-display); font-size: 26px; font-weight: 700; letter-spacing: -.02em; }
.hs-k { font-size: 12px; color: var(--faint); margin-top: 2px; }

/* ---------- 指数卡 ---------- */
a.idx-card { color: inherit; text-decoration: none; }   /* 指数卡做成链接后不能变色/带下划线 */
.idx-card { display: flex; flex-direction: column; gap: 8px; padding: 16px; }
.idx-name { font-size: 12.5px; color: var(--muted); display: flex; align-items: center; gap: 7px; }
.idx-code { font-family: var(--font-mono); font-size: 11px; color: var(--faint); }
.idx-val { font-family: var(--font-display); font-size: 27px; font-weight: 700; letter-spacing: -.025em; }
.idx-chg { display: flex; gap: 10px; font-size: 12.5px; align-items: baseline; }
.spark { display: block; width: 100%; height: 30px; opacity: .9; }

/* ---------- 榜单 ---------- */
.list-head { display: flex; align-items: center; gap: 10px; padding: 0 4px 10px; font-size: 12px; color: var(--faint); }
.rank-row {
  display: grid; grid-template-columns: 24px minmax(0, 1fr) auto auto;
  align-items: center; gap: 12px;
  padding: 9px 8px; border-radius: 9px; cursor: pointer;
  transition: background .16s var(--ease);
}
.rank-row:hover { background: var(--ink-3); }
.rank-i { font-family: var(--font-mono); font-size: 11px; color: var(--faint); text-align: end; }
.rank-n { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rank-c { font-family: var(--font-mono); font-size: 11.5px; color: var(--faint); }
.rank-p { font-family: var(--font-mono); font-size: 13px; text-align: end; min-width: 68px; }

/* 涨跌分布 */
.breadth-bar { display: flex; height: 34px; border-radius: 9px; overflow: hidden; border: 1px solid var(--line); }
.breadth-seg { display: flex; align-items: center; justify-content: center; font-family: var(--font-mono); font-size: 11.5px; color: rgba(0,0,0,.72); font-weight: 600; min-width: 0; }
.breadth-legend { display: flex; justify-content: space-between; margin-top: 12px; font-size: 12px; }

/* ---------- 表格 ---------- */
.table-wrap { overflow-x: auto; margin: 0 -4px; }
table.dt { width: 100%; border-collapse: collapse; }
table.dt th, table.dt td { padding: 11px 10px; border-bottom: 1px solid var(--line); text-align: start; white-space: nowrap; }
table.dt th { font-size: 11.5px; font-weight: 500; color: var(--faint); text-transform: uppercase; letter-spacing: .06em; }
table.dt td.r, table.dt th.r { text-align: end; }
table.dt tbody tr { transition: background .14s var(--ease); }
table.dt tbody tr:hover { background: var(--ink-3); }
table.dt tbody tr:last-child td { border-bottom: 0; }
.tcode { font-family: var(--font-mono); font-size: 12px; color: var(--muted); }

/* ---------- 个股页 ---------- */
.inst-head { padding: 30px 0 8px; }
.inst-title { display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; }
.inst-name { font-family: var(--font-display); font-size: clamp(26px, 3.4vw, 40px); font-weight: 700; letter-spacing: -.03em; margin: 0; }
.inst-code { font-family: var(--font-mono); font-size: 13px; color: var(--muted); }
/* 副名：中文界面显示官方英文全称 / 其它语言显示中文原名（2026-10-03 i18n） */
.inst-alt { flex-basis: 100%; font-size: 13px; line-height: 1.35; color: var(--muted); margin-top: -6px; letter-spacing: 0; font-weight: 400; }

/* ---------- 公式集市 · 定时跟踪 / 订阅（2026-10-03 站长口径） ----------
   2026-10-08 站长反馈「两块跟踪任务没对齐」：`.mk-track` 原来自带一套盒子
   （14/16px 内边距 · 12px 圆角 · 半透明底），和它上面的 `.card#mkFwd`
   （18px · var(--r)=14px · 实底）并排时，标题左边界、圆角、底色全对不上。
   现在 `#mkTrack` 直接复用 `.card` 的盒子（blade 里加了 card 类），
   这里只留它自己的**行内**排版，不再设 padding/border/radius/background —— 别再加回来。 */
.mk-track-meta { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12.5px; color: var(--muted); font-family: var(--font-mono); }
.mk-track-pick { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.mk-opt { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; padding: 6px 10px; border: 1px solid var(--line); border-radius: 999px; cursor: pointer; }
/* 选中态：原来只写 `color: var(--ink-0)`（深色主题里 --ink-0 = #08090d），
   而胶囊**没有**强调色底 —— 等于把标签写成"近黑字压近黑卡片"，
   站长截图里「7 天 · 700 积分」和「☑ 公开这条跟踪记录」发灰看不清就是这个原因。
   改成站内既有口径（同 `.cond-item.on`）：强调色描边 + --accent-soft 底 + --paper 文字。 */
.mk-opt:has(input:checked) { border-color: var(--accent); color: var(--paper); background: var(--accent-soft); }
.mk-chip-ok { border-color: color-mix(in srgb, var(--up) 45%, var(--line)); color: var(--up); }
/* 「这两条跟踪不是一回事」的说明行（2026-10-08）：两块卡片各一行，把区别写在页面上。
   overflow-wrap 是给 de/ar 的长词与 RTL 兜底（360 下不许撑破卡片）。 */
.mk-xref { margin: 0 0 12px; font-size: 12px; line-height: 1.7; color: var(--faint); overflow-wrap: anywhere; }
@media (max-width: 640px) {
  .mk-track-pick { gap: 6px; }
}
.inst-price { display: flex; align-items: baseline; justify-content: space-between; gap: 14px; margin-top: 14px; flex-wrap: wrap; width: 100%; }
.inst-px { font-family: var(--font-display); font-size: clamp(34px, 5vw, 52px); font-weight: 700; letter-spacing: -.035em; line-height: 1; }
.inst-chg { font-family: var(--font-mono); font-size: 16px; font-weight: 600; margin-inline-start: auto; text-align: end; white-space: nowrap; }
.inst-meta { display: flex; gap: 10px; margin-top: 10px; flex-wrap: wrap; }
.pill { font-size: 11.5px; padding: 4px 10px; border-radius: 999px; border: 1px solid var(--line); color: var(--muted); }
.pill-accent { border-color: color-mix(in srgb, var(--accent) 45%, transparent); color: var(--accent); background: var(--accent-soft); }

.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 2px; margin-top: 22px; border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; background: var(--line); }
.stat { background: var(--ink-2); padding: 13px 15px; }
.stat-k { font-size: 11.5px; color: var(--faint); margin-bottom: 4px; }
.stat-v { font-family: var(--font-mono); font-size: 15px; font-weight: 600; font-variant-numeric: tabular-nums; }

/* 周期切换 */
.tabs { display: inline-flex; gap: 2px; padding: 3px; background: var(--ink-3); border: 1px solid var(--line); border-radius: 11px; }
.tab {
  position: relative; border: 0; background: transparent; cursor: pointer;
  padding: 7px 14px; border-radius: 8px; font-size: 13px; color: var(--muted);
  transition: color .18s var(--ease), background .18s var(--ease);
}
.tab:hover { color: var(--paper); }
.tab[aria-selected='true'] { color: var(--ink-0); background: var(--accent); font-weight: 600; }

/* 图表 */
.chart-card { padding: 16px 16px 10px; }
.chart-head { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 12px; }
.chart-ident-inline {
  display: inline-flex; align-items: center; gap: 8px; min-width: 0; max-width: min(100%, 360px);
  padding: 6px 10px; border: 1px solid var(--line); border-radius: 9px;
  background: color-mix(in srgb, var(--ink-2) 72%, transparent);
}
.chart-ident-inline b {
  min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  color: var(--paper); font-size: 12.5px; font-weight: 650; letter-spacing: -.01em;
}
.chart-ident-inline span {
  flex: none; direction: ltr; unicode-bidi: isolate; color: var(--accent);
  font-family: var(--font-mono); font-size: 10.5px; letter-spacing: .045em;
}
.chart-legend { display: flex; gap: 14px; font-size: 11.5px; color: var(--muted); flex-wrap: wrap; }
.lg { display: inline-flex; align-items: center; gap: 6px; }
.lg::before { content: ''; width: 12px; height: 2px; border-radius: 2px; background: currentColor; }
.chart-box { position: relative; }
.chart-box canvas { display: block; width: 100%; cursor: crosshair; }
.chart-tip {
  position: absolute; pointer-events: none; z-index: 5;
  background: color-mix(in srgb, var(--ink-0) 92%, transparent);
  border: 1px solid var(--line-2); border-radius: 10px; padding: 9px 11px;
  font-family: var(--font-mono); font-size: 11.5px; line-height: 1.65;
  opacity: 0; transform: translateY(3px); transition: opacity .12s var(--ease);
  backdrop-filter: blur(8px); white-space: nowrap;
}
.chart-tip.on { opacity: 1; transform: none; }
.chart-tip b { color: var(--muted); font-weight: 400; margin-inline-end: 6px; }
.chart-state {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  color: var(--faint); font-size: 13px; gap: 8px;
}
/* 权益提示（2026-10-04）：按档位降级时如实说明"已显示最近 N 根"（文案由后端按语言给） */
.chart-note { font-size: 11.5px; color: var(--faint); margin-top: 6px; display: none; }
.chart-note.on { display: block; }

/* 分时图 */
.minute-note { font-size: 11.5px; color: var(--faint); margin-top: 8px; }

/* ---------- 图 + 盘口（一到五档 B/S） ----------
   桌面：图在左、盘口在右；平板/手机：盘口落到图下面，改用「左卖 / 中价 / 右买」的横排。
   档位数量由接口给（今天 5 档，将来 Level-2 十档自动变十行），CSS 不用改。 */
.chart-split { display: grid; grid-template-columns: minmax(0, 1fr) 212px; gap: 16px; align-items: start; }
.chart-main { min-width: 0; }
.depth { border: 1px solid var(--line); border-radius: var(--r); background: var(--ink-2); padding: 12px; display: flex; flex-direction: column; gap: 8px; }
.depth-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.depth-title { font-family: var(--font-display); font-size: 13px; font-weight: 600; margin: 0; letter-spacing: -.01em; }
.depth-state { font-size: 10.5px; color: var(--faint); text-align: end; font-family: var(--font-mono); }
.depth-sub { font-size: 10.5px; color: var(--faint); margin-top: -4px; }
.depth-cols { display: flex; flex-direction: column; gap: 2px; }
.depth-side { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.depth-row {
  position: relative; display: grid; grid-template-columns: 20px minmax(0, 1fr) minmax(36px, auto);
  align-items: center; gap: 6px; padding: 3px 6px; border-radius: 6px;
  font-family: var(--font-mono); font-size: 11.5px; overflow: hidden;
}
.depth-row::before { content: ''; position: absolute; inset-block: 0; inset-inline-start: 0; width: var(--w, 4%); background: currentColor; opacity: .13; }
.depth-row > * { position: relative; }
.depth-row.ask { color: var(--down); }
.depth-row.bid { color: var(--up); }
/* 2026-10-12 站长：五档**价格**按与昨收比较着色（红 / 常规 / 绿）。
   ⚠️ 特异性：`.depth-row.ask` 是 0,2,0，这里必须写到 0,3,0 才盖得住；
      档位标签与量能条仍沿用买卖方向色（.depth-lv 继承行色、::before 用 currentColor）。 */
.depth-row .depth-p.up { color: var(--up); }
.depth-row .depth-p.down { color: var(--down); }
.depth-row .depth-p.flat { color: var(--paper); }
.depth-lv { font-size: 9.5px; opacity: .75; letter-spacing: .02em; }
.depth-v { color: var(--muted); text-align: end; }
.depth-cap { font-size: 10px; letter-spacing: .06em; color: var(--faint); padding: 0 6px 2px; }
.depth-cap.ask { color: color-mix(in srgb, var(--down) 78%, var(--faint)); }
.depth-cap.bid { color: color-mix(in srgb, var(--up) 78%, var(--faint)); }
.depth-none { font-size: 12px; color: var(--faint); line-height: 1.6; padding: 10px 2px; }
.depth-mid {
  display: flex; align-items: baseline; justify-content: center; gap: 8px; flex-wrap: wrap;
  padding: 7px 0; margin: 4px 0; border-block: 1px dashed var(--line-2);
}
.depth-last { font-family: var(--font-display); font-size: 17px; font-weight: 700; letter-spacing: -.02em; }
/* 2026-10-12 站长：中间大字现价按与昨收比较着色（高=红 / 等=常规 / 低=绿） */
.depth-mid .depth-last.up { color: var(--up); }
.depth-mid .depth-last.down { color: var(--down); }
.depth-mid .depth-last.flat { color: var(--paper); }
.depth-chg { font-size: 11.5px; font-weight: 600; }
.depth-note { font-size: 10.5px; line-height: 1.55; color: var(--faint); margin-top: 2px; }

/* ---------- 时光机条 + 全屏 ---------- */
.tm-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 12px;
  padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.tm-label { font-size: 12.5px; color: var(--muted); white-space: nowrap; }
.tm-date { background: var(--ink-3); border: 1px solid var(--line); color: var(--paper);
  border-radius: 10px; padding: 6px 10px; font-family: var(--font-mono); font-size: 12.5px; }
.tm-date:focus { outline: none; border-color: var(--accent); }
.tm-viewing { font-size: 12.5px; color: var(--accent); }
.tm-hint { font-size: 12px; }

/* ---------- 复权开关 + 缩放 ---------- */
.seg { display: inline-flex; padding: 3px; gap: 2px; background: var(--ink-3); border: 1px solid var(--line); border-radius: 10px; }
.seg-btn {
  border: 0; background: transparent; color: var(--muted); cursor: pointer;
  font: inherit; font-size: 12.5px; padding: 5px 11px; border-radius: 7px;
  transition: background .16s var(--ease), color .16s var(--ease);
}
.seg-btn:hover { color: var(--paper); }
.seg-btn.on { background: var(--accent); color: var(--ink-0); font-weight: 600; }
.zoom { display: inline-flex; align-items: center; gap: 4px; }
.zoom-btn {
  width: 28px; height: 28px; border-radius: 8px; cursor: pointer;
  background: var(--ink-3); border: 1px solid var(--line); color: var(--paper);
  font-size: 15px; line-height: 1; display: inline-flex; align-items: center; justify-content: center;
}
.zoom-btn:hover { border-color: var(--line-2); background: var(--ink-2); }
.zoom-num { font-size: 11px; color: var(--faint); min-width: 44px; text-align: center; }
.zoom-all { border: 1px solid var(--line); background: transparent; color: var(--muted); cursor: pointer;
  font: inherit; font-size: 12px; padding: 5px 9px; border-radius: 8px; }
.zoom-all:hover { color: var(--paper); border-color: var(--line-2); }
.adj-warn {
  margin: 0 0 10px; padding: 9px 12px; border-radius: 10px; font-size: 12.5px; line-height: 1.65;
  color: color-mix(in srgb, var(--accent) 72%, var(--paper));
  background: color-mix(in srgb, var(--accent) 10%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent) 26%, transparent);
}

/* 全屏：容器铺满，图表自己按视口算高度 */
.chart-card:fullscreen { background: var(--ink-1); border: 0; border-radius: 0; padding: 10px 12px;
  display: flex; flex-direction: column; }
.chart-card:fullscreen .chart-box { flex: 1; }
body.is-full { overflow: hidden; }

/* 手机横屏：收紧头部与页脚，把高度让给图 */
@media (orientation: landscape) and (max-height: 560px) {
  .topbar, .mobilenav, .site-foot { display: none; }
  .inst-head { padding: 8px 0 4px; }
  .inst-name { font-size: 22px; }
  .sec { margin-top: 8px; }
  .chart-card { padding: 8px; border-radius: 10px; }
  .tm-bar { margin-bottom: 6px; padding-bottom: 6px; }
  .chart-head { margin-bottom: 6px; }
  /* 手机上把缩放/复权控件收紧一点，别把标题挤掉 */
  .seg-btn { padding: 4px 9px; font-size: 12px; }
  .zoom-num { display: none; }
  .zoom-all { padding: 4px 8px; font-size: 11.5px; }
}

/* ---------- 选股器 ---------- */
/* 2026-10-03 站长（最终口径）：**选股区做成通栏五段，结果区永远在下方**。
   （前两版：先左右分栏、再整体对调；都不如"选股在上、结果在下"顺手 —— 表格能占满宽度。） */
.scr-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 380px); gap: 16px; align-items: start; }
.scr-stack { display: block; }
.scr-panel { padding: 20px 22px 22px; }
.scr-row { padding: 16px 0; border-top: 1px solid var(--line); }
.scr-row:first-child { padding-top: 0; border-top: 0; }
.scr-row:last-child { padding-bottom: 0; }
.scr-row-k { font-size: 11.5px; letter-spacing: .12em; text-transform: uppercase;
  color: var(--faint); margin-bottom: 11px; }
.scr-row-k .faint { text-transform: none; letter-spacing: 0; }
.scr-acts { display: flex; gap: 10px; align-items: center; margin-top: 14px; flex-wrap: wrap; }
/* 「我的公式」那一行的小长方块与内置条件同款，只加一点点区别（左侧一条金色的边） */
.cond-item.is-mine { border-color: color-mix(in srgb, var(--accent) 26%, var(--line)); }
.cond-item.is-mine:hover { border-color: color-mix(in srgb, var(--accent) 50%, var(--line)); }
.cond { display: flex; flex-direction: column; gap: 6px; }
/* 通栏面板里（2026-10-03 站长口径）：内置条件 / 我的公式 都排成**可换行的小长方块**，
   不再是占满整行的长条 —— 通栏宽度下这样一眼看全、点起来也更准。 */
.scr-panel .cond { flex-direction: row; flex-wrap: wrap; gap: 8px; }
.scr-panel .cond-item {
  width: auto; max-width: 260px; padding: 8px 13px; border-radius: 999px;
  background: var(--ink-2); font-size: 13px; gap: 7px;
}
.scr-panel .cond-item .lk { margin-inline-start: 4px; font-size: 10.5px; }
.scr-panel .cond-item > span:nth-child(2) {
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.cond-item {
  display: flex; align-items: center; gap: 10px; padding: 10px 12px;
  border: 1px solid var(--line); border-radius: 10px; cursor: pointer; background: transparent;
  transition: border-color .18s var(--ease), background .18s var(--ease), transform .16s var(--ease);
  text-align: start; width: 100%;
}
.cond-item:hover { border-color: var(--line-2); background: var(--ink-3); transform: translateY(-1px); }
.cond-item.on { border-color: var(--accent); background: var(--accent-soft); }
.cond-item .lk { margin-inline-start: auto; font-size: 11.5px; color: var(--faint); white-space: nowrap; }
.cond-item.locked { color: var(--muted); }
.editor {
  width: 100%; min-height: 96px; padding: 12px; border-radius: 10px; resize: vertical;
  background: var(--ink-3); border: 1px solid var(--line); color: var(--paper);
  font-family: var(--font-mono); font-size: 12.5px; line-height: 1.7;
}
.editor:focus { outline: none; border-color: var(--accent); }
.scr-stats { display: flex; gap: 16px; font-size: 12px; color: var(--faint); flex-wrap: wrap; align-items: center; }
.skeleton { height: 14px; border-radius: 6px; background: linear-gradient(90deg, var(--ink-3), var(--ink-2), var(--ink-3)); background-size: 200% 100%; animation: sk 1.2s linear infinite; }
@keyframes sk { to { background-position: -200% 0; } }
@media (max-width: 980px) {
  .scr-grid { grid-template-columns: minmax(0, 1fr); }
  /* 窄屏只有一列：把"条件/公式"放回前面，不然首屏是一张空的结果卡（用户得先滚动才能选股） */
  .scr-col-setup { order: 1; }
  .scr-col-results { order: 2; }
}

/* ---------- 空状态 / 页脚 ---------- */
.admin-wrap { width: 100%; max-width: 1180px; margin: 0 auto; padding: 28px var(--gut) 60px; }
.admin-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
/* ---------- 认证页（登录 / 注册）----------
   独立版式：不套主站外壳，居中卡片 + 大留白，输入框 48px / 16px 字号（避免 iOS 聚焦缩放）
*/
.auth-shell { min-height: 100vh; display: flex; flex-direction: column; position: relative; }
.auth-bg {
  position: fixed; inset: 0; pointer-events: none; z-index: 0;
  background:
    radial-gradient(700px 320px at 15% -8%, var(--accent-soft), transparent 62%),
    radial-gradient(520px 300px at 88% 4%, rgba(127, 180, 255, .10), transparent 60%);
}
.auth-top, .auth-main, .auth-foot { position: relative; z-index: 1; }
.auth-top {
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px var(--gut); max-width: var(--maxw); width: 100%; margin: 0 auto;
}
.auth-top-right { display: flex; align-items: center; gap: 10px; }
.auth-main { flex: 1; display: flex; align-items: center; justify-content: center; padding: 8px var(--gut) 40px; }
.auth-card {
  width: 100%; max-width: 424px;
  background: color-mix(in srgb, var(--ink-2) 92%, transparent);
  border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: 34px 32px 28px;
  backdrop-filter: blur(14px) saturate(130%);
  box-shadow: 0 24px 60px -30px rgba(0, 0, 0, .75);
}
@media (prefers-reduced-motion: no-preference) {
  .auth-card { animation: authIn .5s var(--ease-out) both; }
  @keyframes authIn { from { opacity: 0; transform: translateY(14px) scale(.985); } to { opacity: 1; transform: none; } }
}
.auth-title {
  font-family: var(--font-display); font-size: 27px; font-weight: 700;
  letter-spacing: -.03em; margin: 0 0 6px;
}
.auth-sub { color: var(--muted); font-size: 13.5px; margin: 0 0 22px; line-height: 1.65; }
.field { margin-bottom: 15px; }
.field label { display: block; font-size: 12.5px; color: var(--muted); margin-bottom: 7px; }
.field input {
  width: 100%; height: 48px; padding: 0 14px;
  background: var(--ink-3); border: 1px solid var(--line); border-radius: 12px;
  color: var(--paper); font-size: 16px; font-family: var(--font-sans);
  transition: border-color .18s var(--ease), box-shadow .18s var(--ease), background .18s var(--ease);
}
.field input:hover { border-color: var(--line-2); }
.field input:focus {
  outline: none; border-color: var(--accent); background: var(--ink-2);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.auth-btn { width: 100%; height: 48px; margin-top: 8px; font-size: 15px; border-radius: 12px; }
.auth-err {
  background: color-mix(in srgb, var(--up) 14%, transparent);
  border: 1px solid color-mix(in srgb, var(--up) 42%, transparent);
  color: var(--up); border-radius: 10px; padding: 11px 13px; font-size: 13px; margin-bottom: 16px;
}
.auth-ok {
  background: color-mix(in srgb, var(--down) 12%, transparent);
  border: 1px solid color-mix(in srgb, var(--down) 36%, transparent);
  color: var(--down); border-radius: 10px; padding: 11px 13px; font-size: 13px; margin-bottom: 16px;
  line-height: 1.6;
}
.auth-ok.is-err {
  background: color-mix(in srgb, var(--up) 14%, transparent);
  border-color: color-mix(in srgb, var(--up) 42%, transparent);
  color: var(--up);
}
.field-row { position: relative; display: flex; align-items: center; }
.auth-tabs { display: flex; gap: 4px; padding: 4px; background: var(--ink-3); border: 1px solid var(--line);
  border-radius: 12px; margin-bottom: 20px; }
.auth-tab { flex: 1; border: 0; background: transparent; color: var(--muted); font-size: 13.5px;
  padding: 9px 10px; border-radius: 9px; cursor: pointer;
  transition: color .18s var(--ease), background .18s var(--ease); }
.auth-tab:hover { color: var(--paper); }
.auth-tab.on { color: var(--ink-0); background: var(--accent); font-weight: 600; }
/* 邮箱框 + 内嵌「发送验证码」：按钮放进输入框右侧内部。
   否则两个等宽圆角块上下叠着，看起来像"多出来一个输入框"。 */
.field-row input { flex: 1; min-width: 0; padding-inline-end: 122px; }
.field-row .btn {
  position: absolute; inset-inline-end: 6px; top: 50%; transform: translateY(-50%);
  height: 36px; padding: 0 12px; border-radius: 8px; white-space: nowrap;
  font-size: 12.5px; color: var(--accent); background: var(--ink-2); border: 1px solid var(--line-2);
}
.field-row .btn:hover { background: var(--ink-3); transform: translateY(-50%); }
.field-row .btn:disabled { color: var(--faint); border-color: var(--line); cursor: default; }
.auth-alt { margin: 20px 0 0; text-align: center; font-size: 13px; color: var(--muted); }
.auth-alt a { color: var(--accent); border-bottom: 1px solid transparent; }
.auth-alt a:hover { border-bottom-color: var(--accent); }
.auth-foot { padding: 22px var(--gut) 30px; text-align: center; font-size: 12px; }
@media (max-width: 520px) {
  .auth-top { padding: 14px var(--gut); }
  .auth-main { padding: 4px var(--gut) 28px; align-items: flex-start; }
  .auth-card { max-width: none; padding: 26px 20px 22px; border-radius: 16px; }
  .auth-title { font-size: 24px; }
  .brand span:last-child { display: inline; }
}

.feed-item { display: grid; grid-template-columns: 92px minmax(0, 1fr); gap: 16px; padding: 15px 4px; border-bottom: 1px solid var(--line); }
.feed-item:last-child { border-bottom: 0; }
.feed-time { font-size: 11.5px; color: var(--faint); padding-top: 3px; }
.feed-title { margin: 0; font-size: 14.5px; font-weight: 600; line-height: 1.5; letter-spacing: -.01em; }
.feed-sum { margin: 6px 0 0; font-size: 13px; color: var(--muted); line-height: 1.7; }
.mt-note { display: inline-block; margin-top: 6px; font-size: 11px; color: var(--faint);
  border: 1px solid var(--line); border-radius: 999px; padding: 2px 8px; }
.ann-row { display: flex; gap: 12px; padding: 11px 4px; border-bottom: 1px solid var(--line); align-items: baseline; }
.ann-row:last-child { border-bottom: 0; }
.ann-date { font-family: var(--font-mono); font-size: 11.5px; color: var(--faint); flex: 0 0 84px; }
.ann-title { flex: 1; min-width: 0; font-size: 13.5px; }
.ann-title:hover { color: var(--accent); }
@media (max-width: 620px) { .feed-item { grid-template-columns: minmax(0, 1fr); gap: 6px; } .feed-time { padding-top: 0; } }

.chat { display: flex; flex-direction: column; gap: 10px; min-height: 220px; max-height: 52vh; overflow-y: auto; padding: 4px 2px 8px; }
.msg { max-width: 82%; padding: 10px 13px; border-radius: 14px; font-size: 13.5px; line-height: 1.65; white-space: pre-wrap; word-break: break-word; }
.msg.user { align-self: flex-end; background: var(--accent-soft); border: 1px solid color-mix(in srgb, var(--accent) 34%, transparent); }
.msg.assistant { align-self: flex-start; background: var(--ink-3); border: 1px solid var(--line); }
.chat-input { border-top: 1px solid var(--line); padding-top: 14px; margin-top: 6px; }

.empty { padding: 56px 20px; text-align: center; color: var(--faint); }
.empty-title { font-family: var(--font-display); font-size: 17px; color: var(--paper); margin-bottom: 6px; }

.site-foot { margin-top: 64px; border-top: 1px solid var(--line); padding: 26px 0 34px; color: var(--faint); font-size: 12.5px; }
.foot-row { display: flex; gap: 18px; flex-wrap: wrap; align-items: center; }
.foot-disclaimer { margin-top: 12px; font-size: 12px; color: var(--muted); }

/* 区块标题 */
.sec { margin-top: 40px; }
.sec-head { display: flex; align-items: baseline; gap: 12px; margin-bottom: 16px; }
.sec-title { font-family: var(--font-display); font-size: 19px; font-weight: 600; letter-spacing: -.02em; margin: 0; }
.sec-note { font-size: 12.5px; color: var(--faint); }

/* ---------- 站内资讯阅读页 ---------- */
.art-bar { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.art-tag { font-size: 11.5px; color: var(--faint); font-family: var(--font-mono); }
.art-card { padding: 30px 34px 26px; }
.art-title { font-family: var(--font-display); font-size: clamp(20px, 2.6vw, 30px); line-height: 1.28; letter-spacing: -.025em; margin: 0 0 14px; }
.art-mt { margin-bottom: 14px; }
.art-body { font-size: 15px; line-height: 1.95; max-width: 74ch; }
.art-body p { margin: 0 0 14px; }
.art-foot { margin-top: 24px; padding-top: 14px; border-top: 1px solid var(--line); display: flex; gap: 16px; flex-wrap: wrap; font-size: 12px; color: var(--muted); }
.art-foot a { color: var(--accent); }
.art-pdf { margin-top: 4px; }
.art-pdf iframe { width: 100%; height: min(78vh, 900px); border: 1px solid var(--line); border-radius: var(--r); background: var(--ink-2); }

/* 后台上传页的底图预览 */
.hero-preview { border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; background: var(--ink-3); }
.hero-preview img { display: block; width: 100%; height: auto; }

/* 资讯列表里的「阅读全文」入口 */
.feed-title a { color: inherit; text-decoration: none; }
.feed-title a:hover { color: var(--accent); }
.feed-foot { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 6px; }
.feed-read { font-size: 12px; color: var(--accent); text-decoration: none; }
.feed-read:hover { text-decoration: underline; }

/* ---------- 动效（尊重 reduced-motion） ---------- */
@media (prefers-reduced-motion: no-preference) {
  /* 滚动进入视口才揭示（比"一进页面全动"更克制） */
  .reveal { opacity: 0; transform: translateY(14px); }
  .reveal.in {
    opacity: 1; transform: none;
    transition: opacity .58s var(--ease-out), transform .58s var(--ease-out);
    transition-delay: calc(var(--i, 0) * 60ms);
  }
  .sku { display: inline-block; animation: sku .5s var(--ease-out) both; animation-delay: calc(var(--i, 0) * 40ms + .1s); }
  @keyframes sku { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
}
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; }
}

/* ---------- 响应式 ---------- */
.mobilenav { display: none; }
@media (max-width: 820px) {
  .mobilenav {
    display: block; position: sticky; top: 56px; z-index: 55;
    background: color-mix(in srgb, var(--ink-1) 92%, transparent);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--line);
  }
  .mobilenav-inner { display: flex; gap: 4px; overflow-x: auto; padding: 8px 0; scrollbar-width: none; }
  .mobilenav-inner::-webkit-scrollbar { display: none; }
  .mobilenav a {
    white-space: nowrap; font-size: 13px; padding: 6px 12px; border-radius: 999px;
    border: 1px solid var(--line); color: var(--muted);
  }
  .mobilenav a.on { color: var(--ink-0); background: var(--accent); border-color: var(--accent); font-weight: 600; }
}
@media (max-width: 1100px) {
  .g-main { grid-template-columns: minmax(0, 1fr); }
  .g-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  /* 平板：底图往右收一点，正文限宽，别和 K 线抢地方 */
  .hero { padding: 46px 34px 44px; min-height: 380px; }
  .hero-art { background-position: 72% center; }
  .hero-inner { max-width: 58%; }
  /* 平板：盘口从"图右侧"改到"图下面" */
  .chart-split { grid-template-columns: minmax(0, 1fr); }
  .depth { padding: 12px 14px; }
  /* 图上、盘口在下：改成「左卖 / 中现价 / 右买」的横排，窄屏也放得下 */
  .depth-cols { display: grid; grid-template-columns: minmax(0, 1fr) 68px minmax(0, 1fr); align-items: center; gap: 8px; }
  .depth-row { grid-template-columns: 16px minmax(0, 1fr) minmax(34px, auto); column-gap: 4px; font-size: 11px; }
  .depth-lv { font-size: 9px; }
  .depth-mid span { font-size: 15px; }
  .depth-mid { margin: 0; border-block: 0; }
}
@media (max-width: 820px) {
  :root { --gut: 16px; }
  .topbar-inner { height: 56px; gap: 10px; flex-wrap: nowrap; }
  .nav { display: none; }
  .search-input, .search-input:focus { width: 150px; }
  /* 搜索建议面板原来是绝对定位 + 340px 宽，从搜索框往右会撑出整页横向滚动 ——
     窄屏改成贴着视口的 fixed 面板 */
  .suggest { position: fixed; inset-inline: var(--gut); top: 60px; width: auto; max-width: none; }
  .g-4, .g-3, .g-2 { grid-template-columns: minmax(0, 1fr); }
  /* 手机：底图不再是整块背景，而是贴着底边的一条 K 线带（顶边羽化融进墨底） */
  .hero { display: block; margin-top: 18px; min-height: 0; padding: 30px 22px 32px; border-radius: var(--r); }
  .hero-inner { max-width: none; padding-bottom: 174px; }
  .hero-art {
    inset: auto 0 0 0; height: 202px;
    background-size: auto 100%; background-position: right bottom;
    -webkit-mask-image: linear-gradient(180deg, transparent 0%, #000 44%);
    mask-image: linear-gradient(180deg, transparent 0%, #000 44%);
  }
  .hero-veil {
    background:
      linear-gradient(180deg,
        rgba(5, 7, 12, .98) 0%, rgba(5, 7, 12, .94) 46%,
        rgba(5, 7, 12, .62) 68%, rgba(5, 7, 12, .12) 100%),
      radial-gradient(420px 220px at 4% -10%, var(--accent-soft), transparent 60%);
  }
  .hero-stats { gap: 24px; margin-top: 30px; }
  .art-card { padding: 22px 20px 20px; }
  .art-body { font-size: 14.5px; line-height: 1.9; }
  .depth-row { font-size: 11px; padding: 2px 5px; }
  .inst-head { padding: 20px 0 4px; }
  .sec { margin-top: 28px; }
  .rank-row { grid-template-columns: 20px minmax(0, 1fr) auto; }
  .rank-c { display: none; }
}
@media (max-width: 520px) {
  .search-input, .search-input:focus { width: 116px; }
  .brand span:last-child { display: none; }
  .topbar-inner { gap: 6px; }
  .topbar-right { gap: 6px; }
  .dd-btn { padding: 0 7px; }
  .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ==========================================================================
   主导航 9 项 + 板块下拉（2026-10-03）
   简体全部 2 字：盘面 · 板块 · 个股 · 选股 · 集市 · 自选 · 资讯 · AI · 会员
   硬约束：任何宽度都不换行、不撑出横向滚动；820px 以下交给 .mobilenav 横滑。
   ========================================================================== */
.nav { flex-wrap: nowrap; }
.nav > a, .nav-dd > a { white-space: nowrap; }
.nav-dd { position: relative; display: inline-flex; align-items: center; }
.nav-dd > a { display: inline-flex; align-items: center; gap: 4px; position: relative; }
/* 2026-10-04 站长报：点「板块」时激活指示器"跑到一边"。根因：.nav-dd > a 是 inline-flex，
   原来的 .nav a.on::after（margin:5px auto -9px）在 flex 容器里变成了**行内 flex 子项**，
   auto 外边距把它推到行尾 → 指示器贴到右边。这里对这一格改成绝对定位居中下划线。 */
.nav-dd > a.on::after {
  position: absolute; left: 50%; transform: translateX(-50%);
  bottom: -7px; margin: 0; width: 16px; height: 2px;
}
/* ⚠️ 必须限定在 .nav-dd 里：else 会把语言下拉那个 `<span class="caret">▼</span>` 也变成
   CSS 三角形 → 国旗右边出现两个下拉箭头（2026-10-03 站长报的 bug）。 */
.nav-dd .caret { width: 0; height: 0; display: inline-block; opacity: .55;
  border-inline-start: 4px solid transparent; border-inline-end: 4px solid transparent;
  border-top: 4px solid currentColor; }
.nav-dd-menu { position: absolute; top: calc(100% + 8px); inset-inline-start: 0; z-index: 70;
  min-width: 148px; display: flex; flex-direction: column; gap: 2px; padding: 6px;
  border: 1px solid var(--line-2); border-radius: 12px; background: var(--ink-2);
  box-shadow: 0 18px 42px rgba(0, 0, 0, .45); opacity: 0; visibility: hidden;
  transform: translateY(-4px);
  transition: opacity .16s var(--ease), transform .16s var(--ease), visibility .16s var(--ease); }
.nav-dd:hover .nav-dd-menu, .nav-dd:focus-within .nav-dd-menu { opacity: 1; visibility: visible; transform: none; }
.nav-dd-menu a { padding: 8px 12px; border-radius: 8px; font-size: 13px; color: var(--muted); text-decoration: none; }
.nav-dd-menu a:hover { background: var(--ink-3); color: var(--paper); }
/* 中间宽度收紧内边距（不是收项）：9 项在 1000–1280 也放得下 */
@media (max-width: 1400px) { .nav a { padding: 6px 9px; } }
@media (max-width: 1180px) { .nav { gap: 0; } .nav a { padding: 6px 7px; font-size: 13px; } }
@media (max-width: 1000px) { .nav a { padding: 6px 5px; font-size: 12.5px; } }
@media (max-width: 860px)  { .nav a { padding: 6px 4px; font-size: 12px; } .nav-dd-menu { min-width: 132px; } }
/* 移动端导航（胶囊横滑）里「板块」只作链接，不弹菜单 */
@media (max-width: 820px) {
.mobilenav .nav-dd-menu { display: none; }
.mobilenav .nav-dd .caret { display: none; }
}

/* ==========================================================================
   2026-10-04 修复：长标签语言的头部在 820–1200px 之间会**元素级横向越界**
   ─────────────────────────────────────────────────────────────────────────
   现象（实测 `node tmp-stocklibs-wave4/_hdrcheck.mjs`）：德语 9 项主导航
   （Marktplatz / Nachrichten / Aktien…）在 1024px 下把 `.topbar-right`（搜索框 +
   语言下拉 + 主题按钮）挤出视口 → `div.topbar-right / .search-wrap / input.search-input`
   等 14 个元素越界（整页没横向滚动，但右侧工具被裁）。`/de`、`/de/market`、
   `/de/sectors` 全部一样 → 与具体页面无关，是头部布局问题。
   处理：这四种标签较长的语言，在 1200px 以下就收起桌面导航，改用 `.mobilenav`
   横滑（与 ≤820px 同一策略）；中文/日文标签短，行为不变。
   ⚠️ 这段必须放在 ≤820px 那个 media 块**外面**（第一次写进了块里，结果只在 ≤820 生效）。
   ========================================================================== */
/* 2026-10-04（Wave 4 · 复核）：原阈值 1200 对**西班牙语**不够 —— 实测 `/es/*` 在 1280 仍越界
   （`.topbar-right` / `.dd` / `.dd-btn`，es 的标签最长）。抬到 1300。 */
@media (max-width: 1300px) {
  html[lang="de"] .nav, html[lang="fr"] .nav, html[lang="es"] .nav, html[lang="ar"] .nav { display: none; }
  html[lang="de"] .mobilenav, html[lang="fr"] .mobilenav,
  html[lang="es"] .mobilenav, html[lang="ar"] .mobilenav {
    display: block; position: sticky; top: 62px; z-index: 55;
    background: color-mix(in srgb, var(--ink-1) 92%, transparent);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--line);
  }
  html[lang="de"] .search-input, html[lang="de"] .search-input:focus,
  html[lang="fr"] .search-input, html[lang="fr"] .search-input:focus,
  html[lang="es"] .search-input, html[lang="es"] .search-input:focus,
  html[lang="ar"] .search-input, html[lang="ar"] .search-input:focus { width: 168px; }
}

/* 2026-10-04（Wave 4 · 复核）：中文/繁中/日文在 **821–880** 这一小段也放不下桌面导航
   （实测 `/cn` @860 越界 5 个元素：`.topbar-right` / `.dd` / `.dd-btn`）——
   因为"收起桌面导航"的断点是 820，而中文 9 项导航要到 ~880 才装得下。
   与长语言同一策略：这一小段也换成 `.mobilenav` 横滑。 */
@media (max-width: 880px) {
  html[lang="cn"] .nav, html[lang="tw"] .nav, html[lang="jp"] .nav { display: none; }
  html[lang="cn"] .mobilenav, html[lang="tw"] .mobilenav, html[lang="jp"] .mobilenav {
    display: block; position: sticky; top: 62px; z-index: 55;
    background: color-mix(in srgb, var(--ink-1) 92%, transparent);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--line);
  }
}

/* 2026-10-04（Wave 4 · 复核）：**日文**单独一档 —— 日文条目比中文长（「スクリーナー」「マーケット」等），
   实测 `/jp/*` 在 1024 越界 12 个元素（`.topbar-right` / `.suggest` / `.dd` / `.dd-btn`），
   而 1180 起装得下。所以日文在 ≤1180 就用横滑导航，与长语言同一策略。
   ⚠️ 中文/繁中 1024 是好的（实测），**别顺手把它们也拉进这一档**。 */
@media (max-width: 1180px) {
  html[lang="jp"] .nav { display: none; }
  html[lang="jp"] .mobilenav {
    display: block; position: sticky; top: 62px; z-index: 55;
    background: color-mix(in srgb, var(--ink-1) 92%, transparent);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--line);
  }
}

/* 窄屏下卡片标题允许断行：德语那种长复合词（"Der Formelkörper ist nur für Autor und
   Plattform sichtbar"）在 390px 会顶出卡片右边界（实测 h2.card-title 越界）。 */
@media (max-width: 520px) {
  /* 真因是 `.card-title { white-space: nowrap }`（实测 computed）→ 必须先放开 nowrap */
  .card-title { white-space: normal; overflow-wrap: anywhere; }
}

/* ==========================================================================
   板块 / 概念 / 地区页（/{lang}/sectors 与 /{lang}/sector/{code}）
   ========================================================================== */
.sec-toolbar { display: flex; align-items: center; justify-content: space-between;
  gap: 12px; flex-wrap: wrap; margin: 16px 0 16px; }
.sec-tabs { display: flex; gap: 6px; flex-wrap: wrap; }
.sec-tabs a { display: inline-flex; align-items: center; gap: 6px; text-decoration: none;
  padding: 8px 14px; border: 1px solid var(--line); border-radius: 999px;
  font-size: 13.5px; color: var(--muted);
  transition: color .16s var(--ease), border-color .16s var(--ease), background .16s var(--ease); }
.sec-tabs a:hover { color: var(--paper); border-color: var(--line-2); }
.sec-tabs a.on { color: var(--paper); background: var(--ink-3); border-color: var(--line-2); font-weight: 600; }
.sec-sort { display: flex; gap: 4px; }
.sec-sort a { padding: 6px 10px; border-radius: 8px; font-size: 12.5px; color: var(--faint); text-decoration: none; }
.sec-sort a:hover { color: var(--muted); }
.sec-sort a.on { color: var(--paper); background: var(--ink-3); }
.sec-name { font-weight: 500; }
.sec-leader { display: inline-flex; align-items: baseline; gap: 8px; color: var(--paper); text-decoration: none; }
.sec-leader span { font-variant-numeric: tabular-nums; font-size: 12.5px; }
.dt-sectors tbody tr:hover td { background: var(--ink-2); }

.crumb { display: flex; gap: 8px; align-items: center; padding-top: 24px; font-size: 12.5px; color: var(--muted); }
.crumb a { color: var(--muted); text-decoration: none; }
.crumb a:hover { color: var(--paper); }
.sec-detail-head { display: flex; align-items: flex-end; justify-content: space-between;
  gap: 16px; flex-wrap: wrap; margin: 10px 0 16px; }
.sec-big { display: flex; flex-direction: column; align-items: flex-end;
  font-family: var(--font-display); font-size: clamp(26px, 3.4vw, 40px); font-weight: 700;
  letter-spacing: -.03em; font-variant-numeric: tabular-nums; line-height: 1.05; }
.sec-big em { font-style: normal; font-size: 11px; letter-spacing: .14em; text-transform: uppercase;
  color: var(--faint); font-weight: 500; margin-top: 4px; }
.sec-leader-line { display: flex; gap: 10px; align-items: baseline; font-size: 13.5px; margin: 16px 0 0; }
.sec-leader-line a { color: var(--paper); text-decoration: none; }
@media (max-width: 620px) {
  .sec-big { align-items: flex-start; }
  .sec-detail-head { align-items: flex-start; }
}

/* 窄屏：页头标题与说明改上下排（原来 flex 一行会把标题挤成"一字一行"的竖排） */
@media (max-width: 820px) {
  .sec-head { flex-direction: column; align-items: flex-start; gap: 6px; }
  .sec-head .sec-title { white-space: nowrap; }
  /* 后台的卡片头同理（"权益矩阵"这种 4 字标题被挤成竖排过） */
  .card-head { flex-direction: column; align-items: flex-start; gap: 4px; }
  .card-head .card-title { white-space: nowrap; }
  /* 后台顶部工具栏：按钮换行时占满一行，别挤成两列 */
  .admin-head { gap: 8px; }
  .admin-head .btn { flex: 0 1 auto; }
}

/* ---------- 板块轮动（多空象限）---------- */
.idx-group-label { font-size: 11.5px; letter-spacing: .14em; text-transform: uppercase;
  color: var(--faint); margin: 0 0 10px; }
/* 融资融券标的（R）：用站点强调色的描边胶囊，别和涨跌红绿抢眼 */
.pill-r { color: var(--accent); border: 1px solid color-mix(in srgb, var(--accent) 48%, transparent);
  background: var(--accent-soft, rgba(200,169,106,.14)); font-weight: 600; }
.r-tag { display: inline-block; margin-inline-start: 6px; padding: 0 5px; border-radius: 5px;
  font-size: 10px; line-height: 15px; vertical-align: 1px; }
/* 融资融券标的：**列表里一律挂在小名字的右下角**（2026-10-03 站长口径），
   比挂在代码后面更好扫 —— 眼扫一列名字时右下角的小 R 自然成一条线。 */
.nm-r { position: relative; display: inline-block; padding-inline-end: 10px; }
.nm-r > i {
  position: absolute; inset-inline-end: 0; bottom: -2px;
  font-style: normal; font-size: 9px; line-height: 1; font-weight: 700;
  color: var(--accent); letter-spacing: .02em;
}
.nm-r > i::before { content: 'R'; }

/* ==========================================================================
   AI 公式助手 + 变量/函数说明（2026-10-03）
   ========================================================================== */
.ai-help { margin-top: 16px; padding: 14px 14px 12px; border: 1px solid var(--line);
  border-radius: var(--r-lg, 16px); background: linear-gradient(180deg, var(--ink-2), var(--ink-1)); }
.ai-help-head { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.ai-k { font-size: 13px; font-weight: 600; color: var(--accent); letter-spacing: .02em; }
.ai-help-head .hint { font-size: 11.5px; color: var(--faint); }
/* 选股区改成通栏后，AI 那一行左右排（输入占满剩余宽度、按钮自适应） */
.ai-help-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; align-items: center; }
/* ⚠️ class 里的 display 会盖掉 [hidden]，这两个必须显式再压一次（否则"填入公式框"会提前露出来） */
.ai-acts[hidden], .ai-out[hidden] { display: none; }
.ai-out { margin: 12px 0 0; padding: 12px 13px; border-radius: 11px; border: 1px solid var(--line);
  background: var(--ink-3); color: var(--paper); font-family: var(--font-mono, monospace);
  font-size: 12.5px; line-height: 1.7; white-space: pre-wrap; word-break: break-word; }
.ai-acts { display: flex; align-items: center; gap: 10px; margin-top: 10px; flex-wrap: wrap; }
.ai-spec { margin-top: 12px; border-top: 1px solid var(--line); padding-top: 10px; }
.ai-spec summary { cursor: pointer; font-size: 12.5px; color: var(--muted); }
.ai-spec summary:hover { color: var(--paper); }
.ai-spec p { margin: 8px 0 10px; font-size: 11.5px; }
.ai-spec-grid { display: grid; gap: 10px; }
.ai-spec-grid b { display: block; font-size: 11px; color: var(--faint); letter-spacing: .08em;
  text-transform: uppercase; margin-bottom: 4px; font-weight: 500; }
.ai-spec-grid code { display: block; font-family: var(--font-mono, monospace); font-size: 11.5px;
  color: var(--paper); background: var(--ink-3); border: 1px solid var(--line);
  border-radius: 8px; padding: 8px 10px; line-height: 1.8; word-break: break-word; }
@media (max-width: 620px) {
  .ai-help-row { grid-template-columns: minmax(0, 1fr); }
  .ai-help-row .btn { width: 100%; }
}

/* 个股页 AI 分析卡 */
.ai-stock { margin-top: 18px; padding: 16px 18px; border: 1px solid var(--line);
  border-radius: var(--r-lg, 16px); background: linear-gradient(180deg, var(--ink-2), var(--ink-1)); }
.ai-stock-head { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.ai-stock-head h2 { margin: 0; font-family: var(--font-display, inherit); font-size: 16px; font-weight: 600; }
.ai-stock-head .hint { font-size: 11.5px; color: var(--faint); }
.ai-stock-body { margin-top: 12px; }
.ai-report { margin: 0; white-space: pre-wrap; font-size: 13.5px; line-height: 1.95; color: var(--paper); }
.ai-report b { color: var(--accent); font-weight: 600; }
.ai-cost { font-size: 12px; color: var(--muted); }
/* 个股页「所属板块/概念」标签（2026-10-03） */
.inst-sectors { display: grid; gap: 8px; }
.inst-sector-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.inst-sector-chip { display: inline-flex; align-items: center; gap: 6px; text-decoration: none;
  padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line);
  background: var(--ink-2); color: var(--paper); font-size: 12.5px;
  transition: border-color .16s var(--ease), background .16s var(--ease); }
.inst-sector-chip:hover { border-color: var(--line-2); background: var(--ink-3); }
.inst-sector-chip span { font-size: 10.5px; letter-spacing: .04em; }
.inst-sector-chip em { font-style: normal; font-variant-numeric: tabular-nums; font-size: 11.5px; }
.idx-group-label.is-sep { margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--line); }
.idx-card-sm .idx-val { font-size: 20px; }

/* 涨跌分布：分组横条（市场 / 板块） */
.bd-group-label { font-size: 11.5px; letter-spacing: .12em; text-transform: uppercase;
  color: var(--faint); margin: 0 0 8px; }
.bd-group-label.is-sep { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line); }
.bd-row { display: grid; grid-template-columns: 74px minmax(0, 1fr) 108px;
  align-items: center; gap: 10px; padding: 5px 0; }
.bd-name { font-size: 12.5px; color: var(--muted); white-space: nowrap; }
.bd-row.is-all .bd-name { color: var(--paper); font-weight: 600; }
.bd-bar { display: flex; height: 8px; border-radius: 999px; overflow: hidden; background: var(--ink-3); }
.bd-bar i { display: block; height: 100%; }
.bd-num { display: flex; justify-content: flex-end; gap: 8px; font-size: 11.5px;
  font-variant-numeric: tabular-nums; }
.bd-num b { font-weight: 500; }

/* 板块榜（首页） */
.st-list { display: grid; }
.st-row { display: grid; grid-template-columns: 20px minmax(0, 1fr) 58px 66px;
  align-items: center; gap: 8px; padding: 6px 4px; text-decoration: none; color: var(--paper);
  border-bottom: 1px solid var(--line); font-size: 13px; }
.st-row:last-child { border-bottom: 0; }
.st-row:hover { background: var(--ink-2); }
.st-rank { font-size: 11px; }
.st-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.st-amt { font-size: 11px; text-align: end; }
.st-pct { text-align: end; font-variant-numeric: tabular-nums; }

.quad-wrap { position: relative; }
#quadCanvas { display: block; width: 100%; height: 520px; }
.quad-tip {
  position: absolute; z-index: 6; pointer-events: none;
  padding: 7px 10px; border-radius: 10px; font-size: 12px; line-height: 1.5;
  background: color-mix(in srgb, var(--ink-0) 92%, transparent);
  border: 1px solid var(--line-2); color: var(--paper); white-space: nowrap;
  box-shadow: 0 12px 28px rgba(0, 0, 0, .4);
}
.quad-legend { display: flex; gap: 16px; flex-wrap: wrap; align-items: center;
  margin-top: 12px; font-size: 12.5px; color: var(--muted); }
.quad-legend .q-dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%;
  margin-inline-end: 6px; vertical-align: middle; }
@media (max-width: 820px) {
  #quadCanvas { height: 380px; }
  .quad-legend { gap: 10px; font-size: 11.5px; }
}
@media (max-width: 520px) {
  #quadCanvas { height: 320px; }
}
@media (max-width: 620px) {
  .bd-row { grid-template-columns: 64px minmax(0, 1fr) 96px; gap: 8px; }
  .bd-num { gap: 6px; }
  .st-row { grid-template-columns: 18px minmax(0, 1fr) 62px; }
  .st-amt { display: none; }
}

/* ==========================================================================
   保存公式面板（2026-10-03 站长：原来的白框丑、不合规范）
   起因：集市那几张页用的是模板遗留的 --fg / --fg-dim 变量，本站主题里**根本没定义** →
         <input>/<select> 的 color 声明失效、掉回浏览器默认样式（白底黑字）。
   修法：① 在 :root 把 --fg/--fg-dim 映射到本站令牌（一次性修好所有 .mk-* 控件）；
         ② 这块面板本身按站点规范重做：墨底、发丝线、金强调、圆角与高度对齐站内表单。
   ========================================================================== */
:root { --fg: var(--paper); --fg-dim: var(--muted); }
.scr-save { margin-top: 18px; padding: 16px 18px;
  border: 1px solid var(--line); border-radius: var(--r-lg, 16px);
  background: linear-gradient(180deg, var(--ink-2), var(--ink-1)); }
.scr-save-head { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.scr-save-k { font-size: 11.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--faint); }
.scr-save-head .hint { font-size: 11.5px; color: var(--faint); }
/* 这块面板落在选股器左侧那张 ~420px 的卡里，三列硬排会把"名称"挤成一条 ——
   改成自适应列 + 按钮独占一行，宽窄都好看。 */
.scr-save-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; align-items: end; }
.scr-lb { display: flex; flex-direction: column; gap: 6px; font-size: 11.5px; color: var(--muted); }
.scr-field { height: 44px; width: 100%; padding: 0 14px;
  border-radius: 11px; border: 1px solid var(--line); background: var(--ink-3);
  color: var(--paper); font-size: 14px; font-family: inherit;
  transition: border-color .18s var(--ease), box-shadow .18s var(--ease), background .18s var(--ease); }
.scr-field::placeholder { color: var(--faint); }
.scr-field:hover { border-color: var(--line-2); }
.scr-field:focus { outline: none; border-color: var(--accent); background: var(--ink-2);
  box-shadow: 0 0 0 3px var(--accent-soft); }
.scr-sel { appearance: none; -webkit-appearance: none; padding-inline-end: 34px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%238a90a0' stroke-width='1.6' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center; }
html[dir='rtl'] .scr-sel { background-position: left 12px center; }
.scr-save-btn { grid-column: 1 / -1; justify-self: start; height: 44px; padding: 0 22px; border-radius: 11px; white-space: nowrap; }
.scr-save-ok { display: block; width: fit-content; margin-top: 10px; font-size: 12.5px; color: var(--accent); text-decoration: none; }
.scr-save-ok[hidden] { display: none; }   /* 类里的 display 会盖掉 [hidden]，必须显式再压一次 */
.scr-save-ok:hover { text-decoration: underline; }
@media (max-width: 620px) {
  .scr-save { padding: 14px; }
  .scr-save-grid { grid-template-columns: minmax(0, 1fr); }
  .scr-save-btn { width: 100%; }
}

/* ==========================================================================
   弹窗体系（2026-10-03 补）：`.mask` / `.modal` 这两个类在视图里用了很久
   （AI 同意弹窗、选股器锁项提示），但**全站一直没有对应 CSS** ——
   结果它们不是浮层，而是当作普通块挂在页面底部。
   现在按站点规范定义：墨底遮罩 + 发丝线卡片 + 金强调聚焦；窄屏变底部抽屉。
   ========================================================================== */
.mask { position: fixed; inset: 0; z-index: 120; display: flex; align-items: center; justify-content: center;
  padding: 20px; background: rgba(4, 6, 10, .62); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  opacity: 0; visibility: hidden; transition: opacity .2s var(--ease), visibility .2s var(--ease); }
.mask.on { opacity: 1; visibility: visible; }
.modal { width: 100%; max-width: 480px; max-height: 88vh; overflow: auto;
  padding: 22px 22px 20px; border: 1px solid var(--line-2); border-radius: var(--r-lg, 18px);
  background: linear-gradient(180deg, var(--ink-2), var(--ink-1));
  box-shadow: 0 30px 70px rgba(0, 0, 0, .55);
  transform: translateY(10px) scale(.985); transition: transform .22s var(--ease); }
.mask.on .modal { transform: none; }
.modal h3 { margin: 0 0 8px; font-family: var(--font-display, inherit); font-size: 17px; font-weight: 600; letter-spacing: -.01em; }
.modal p { margin: 0 0 14px; color: var(--muted); font-size: 13.5px; line-height: 1.7; }
.modal .acts { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 16px; }
.modal .acts .btn { flex: 1 1 auto; justify-content: center; height: 44px; }

/* 表单字段（弹窗内） */
.mfield { display: flex; flex-direction: column; gap: 6px; margin-bottom: 12px;
  font-size: 11.5px; color: var(--muted); }
.mfield input, .mfield select, .mfield textarea {
  width: 100%; height: 44px; padding: 0 13px; border-radius: 11px;
  border: 1px solid var(--line); background: var(--ink-3); color: var(--paper);
  font-size: 14px; font-family: inherit; transition: border-color .18s var(--ease), box-shadow .18s var(--ease), background .18s var(--ease); }
.mfield textarea { height: auto; min-height: 92px; padding: 12px 13px; line-height: 1.7; resize: vertical; }
.mfield input::placeholder, .mfield textarea::placeholder { color: var(--faint); }
.mfield input:hover, .mfield select:hover, .mfield textarea:hover { border-color: var(--line-2); }
.mfield input:focus, .mfield select:focus, .mfield textarea:focus {
  outline: none; border-color: var(--accent); background: var(--ink-2); box-shadow: 0 0 0 3px var(--accent-soft); }
.mfield select { appearance: none; -webkit-appearance: none; padding-inline-end: 34px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%238a90a0' stroke-width='1.6' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center; }
html[dir='rtl'] .mfield select { background-position: left 12px center; }
.mgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }
.mnote { margin: 4px 0 0; font-size: 11.5px; color: var(--faint); }
.mnote.is-err { color: var(--up); }
.mnote.is-ok { color: var(--accent); }

/* 集市主分类 + 搜索（2026-10-03） */
.mk-toolbar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 16px; }
.mk-tabs { display: flex; gap: 6px; flex-wrap: wrap; }
.mk-tabs a { padding: 8px 14px; border-radius: 999px; border: 1px solid var(--line);
  font-size: 13px; color: var(--muted); text-decoration: none;
  transition: color .16s var(--ease), border-color .16s var(--ease), background .16s var(--ease); }
.mk-tabs a:hover { color: var(--paper); border-color: var(--line-2); }
.mk-tabs a.on { color: var(--paper); background: var(--ink-3); border-color: var(--line-2); font-weight: 600; }
.mk-search { display: flex; gap: 8px; align-items: center; margin-inline-start: auto; }
.mk-search input { width: 260px; height: 40px; padding: 0 13px; border-radius: 10px;
  border: 1px solid var(--line); background: var(--ink-3); color: var(--paper);
  font-size: 13.5px; font-family: inherit; }
.mk-search input::placeholder { color: var(--faint); }
.mk-search input:focus { outline: none; border-color: var(--accent); background: var(--ink-2);
  box-shadow: 0 0 0 3px var(--accent-soft); }
.mk-card.is-pinned { border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); }
.mk-flag { display: inline-flex; align-items: center; gap: 4px; font-size: 10.5px; font-weight: 600;
  padding: 2px 7px; border-radius: 999px; margin-inline-start: 6px; vertical-align: middle; }
.mk-flag-pin { color: var(--ink-0); background: var(--accent); }
.mk-flag-feat { color: var(--accent); border: 1px solid color-mix(in srgb, var(--accent) 45%, transparent); }
@media (max-width: 720px) {
  .mk-search { margin-inline-start: 0; width: 100%; }
  .mk-search input { width: 100%; }
}
@media (max-width: 620px) {
  .mask { align-items: flex-end; padding: 0; }
  .modal { max-width: none; border-radius: 18px 18px 0 0; padding: 20px 16px 22px; }
  .mgrid { grid-template-columns: 1fr; }
}

/* ==========================================================================
   2026-10-04（Wave 4 · 交易表单截图自检抓到的）：窄屏卡片标题被裁
   ─────────────────────────────────────────────────────────────────────────
   现象：`/de/market/f/<code>` @390 的 `h2.card-title`（"Der Formelkörper ist nur für
   Autor und Plattform sichtbar"）右边界超出卡片（rect 35..410 > 视口 390）。
   真因：`.card-head .card-title { white-space: nowrap }`（文件上方那条），
   所以 `overflow-wrap` 单独加是没用的 —— 必须同时放开 nowrap。
   ⚠️ 放在文件**最后**：`.card-head .card-title` 选择器权重更高，写在前面会被它盖掉（已踩）。
   ========================================================================== */
@media (max-width: 520px) {
  .card-head .card-title, .card-title { white-space: normal; overflow-wrap: anywhere; }
}

/* ==========================================================================
   选股器「数据时点」（2026-10-04 站长：查询要能选历史日期/区间）
   设计口径与站点既有语言一致：发丝线分隔、墨底纸白、金色强调、等宽数字；
   分段控件沿用 .seg/.seg-btn（与个股页复权开关同源），日期控件去掉原生廉价感。
   注意：只影响**用户查询**，集市上架的公式不受影响。
   ========================================================================== */
.scr-when{margin:14px 0 2px;padding:12px 14px;border:1px solid var(--line);border-radius:14px;
  background:linear-gradient(180deg,color-mix(in srgb,var(--ink-3) 55%,transparent),transparent)}
.scr-when-head{display:flex;align-items:center;gap:12px;flex-wrap:wrap}
.scr-when-k{font-size:11.5px;letter-spacing:.14em;text-transform:uppercase;color:var(--faint);white-space:nowrap}
.scr-when-fields{display:flex;gap:10px;flex-wrap:wrap;margin-inline-start:auto}
.scr-date-f{display:inline-flex;align-items:center;gap:8px;padding:4px 10px 4px 12px;border:1px solid var(--line-2);
  border-radius:999px;background:var(--ink-2);transition:border-color .18s var(--ease),box-shadow .18s var(--ease)}
.scr-date-f:hover{border-color:color-mix(in srgb,var(--accent) 45%,var(--line-2))}
.scr-date-f:focus-within{border-color:var(--accent);box-shadow:0 0 0 3px var(--accent-soft)}
.scr-date-f[hidden]{display:none}
.scr-date-k{font-size:11.5px;color:var(--fg-dim);white-space:nowrap}
.scr-date-f input[type=date]{height:30px;border:0;background:transparent;color:var(--paper);
  font-family:var(--font-mono,ui-monospace,monospace);font-size:12.5px;font-variant-numeric:tabular-nums;outline:none}
.scr-date-f input[type=date]::-webkit-calendar-picker-indicator{opacity:.45;cursor:pointer;transition:opacity .18s var(--ease)}
.scr-date-f:hover input[type=date]::-webkit-calendar-picker-indicator{opacity:.9}
.scr-when-hint{margin:9px 0 0;font-size:11.5px;line-height:1.7;color:var(--faint)}
.scr-when-hint.is-on{color:var(--accent)}
@media (max-width:760px){
  .scr-when-fields{margin-inline-start:0;width:100%}
  .scr-date-f{flex:1 1 150px}
}

/* ==========================================================================
   表单控件统一（2026-10-04 · 第二十二班）
   --------------------------------------------------------------------------
   问题：集市 / 我的公式 / 会员 / 后台这些页面里，下拉与输入框还是**浏览器原生样式**
   （白底黑字、无圆角、焦点是系统蓝框），跟全站墨底纸白完全不搭 —— 站长反馈"很原始"。
   做法：把 .sec / .card 里的控件统一到站内令牌（--ink-2 / --line-2 / --paper / --accent），
   含 hover / focus / disabled / placeholder / 原生下拉箭头自绘；checkbox 走 accent-color。
   ⚠️ 不用 :where()（特异性 0 会被浏览器默认或模板旧样式盖掉，后台那次踩过）。
   ========================================================================== */
.sec input:not([type=checkbox]):not([type=radio]):not([type=file]):not([type=submit]):not([type=button]):not([type=range]):not([type=color]),
.sec textarea, .sec select,
.card input:not([type=checkbox]):not([type=radio]):not([type=file]):not([type=submit]):not([type=button]):not([type=range]):not([type=color]),
.card textarea, .card select {
  /* ⚠️ 这里**不能**写 width:100%：集市搜索框那种"输入框 + 按钮"是行内 flex，
     套 100% 会把按钮挤成两行、占位符被截断（2026-10-04 站长截图反馈）。
     宽度交给布局：行内用 flex:1、表单里用 label>input 的 100%（见下面两条）。 */
  min-height: 42px; padding: 9px 12px; font: inherit; font-size: 13.5px;
  color: var(--paper); background: var(--ink-2);
  border: 1px solid var(--line-2); border-radius: var(--r-sm);
  transition: border-color .16s var(--ease), box-shadow .16s var(--ease), background .16s var(--ease);
}
/* 按钮：不许被挤成两行 */
.sec button, .sec .btn { white-space: nowrap; flex: 0 0 auto; }
/* 标签不许竖排（一个汉字一行）；行内控件不许被拉伸（2026-10-04 站长截图：规格/数量 被挤成竖排 + 双层框） */
.sec label, .card label { white-space: nowrap; }
/* 购买表单的"规格 / 数量"：标签只是文字，外观交给里面的 select/input（去掉外面那层胶囊边框，双层框很丑） */
.mk-buy-row .mk-opt { border: 0; padding: 0; background: transparent; border-radius: 0; gap: 8px; flex-wrap: nowrap; }
.mk-buy-row .mk-opt select, .mk-buy-row .mk-opt input { flex: 0 0 auto; margin-top: 0; }
.mk-buy-row .mk-opt select { min-width: 132px; }
.mk-buy-row .mk-opt input[type=number] { width: 84px; }
.sec select, .card select {
  padding-right: 32px; appearance: none; -webkit-appearance: none; cursor: pointer;
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1.7 2.4 6 6.6l4.3-4.2' fill='none' stroke='%238a90a0' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 11px center;
}
.sec input:not([type=checkbox]):not([type=radio]):not([type=file]):hover,
.sec textarea:hover, .sec select:hover,
.card input:not([type=checkbox]):not([type=radio]):not([type=file]):hover,
.card textarea:hover, .card select:hover { border-color: color-mix(in srgb, var(--accent) 55%, transparent); }
.sec input:not([type=checkbox]):not([type=radio]):not([type=file]):focus,
.sec textarea:focus, .sec select:focus,
.card input:not([type=checkbox]):not([type=radio]):not([type=file]):focus,
.card textarea:focus, .card select:focus {
  outline: 0; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft);
}
.sec input::placeholder, .sec textarea::placeholder,
.card input::placeholder, .card textarea::placeholder { color: var(--faint); opacity: 1; }
.sec input[type=checkbox], .sec input[type=radio],
.card input[type=checkbox], .card input[type=radio] { accent-color: var(--accent); inline-size: 16px; block-size: 16px; vertical-align: -2px; }
.sec input:disabled, .sec textarea:disabled, .sec select:disabled,
.card input:disabled, .card textarea:disabled, .card select:disabled { opacity: .6; cursor: not-allowed; background: var(--ink-3); }
.sec label, .card label { font-size: 12.5px; color: var(--muted); }
.sec label > input:not([type=checkbox]):not([type=radio]),
.sec label > select, .sec label > textarea { margin-top: 5px; }
/* 表格/行内的控件紧凑一档（一行多个输入框：集市明细、矩阵取值） */
.sec table input, .sec table select, .card table input, .card table select { min-height: 36px; padding: 6px 9px; font-size: 12.5px; }
/* 原生控件（日期/时间/滚动条）跟随主题 */
.sec, .card { color-scheme: dark; }
html[data-theme='light'] .sec, html[data-theme='light'] .card { color-scheme: light; }

/* ==========================================================================
   品牌锁定版（带文字的水平 logo）· 2026-10-08 站长要求
   --------------------------------------------------------------------------
   顶栏与页脚都用 `logo-medium[-ondark].svg`（同一份，两处不再各画一遍）。
   站点默认深色主题：深底用 `-ondark`、浅底用标准版，由 html[data-theme] 切换。
   ========================================================================== */
.brand-lock { display: block; width: auto; height: 32px; }
.brand-lock-onlight { display: none; }
html[data-theme='light'] .brand-lock-onlight { display: block; }
html[data-theme='light'] .brand-lock-ondark { display: none; }
.topbar .brand { gap: 0; }          /* 锁定版自带图标+文字，不再需要两元素间距 */
.foot-brand { display: inline-flex; align-items: center; }
.foot-brand:hover .brand-lock { opacity: .88; }
.foot-brand .brand-lock { height: 40px; transition: opacity .16s var(--ease); }

/* 「基于 OCPS 底座构建与生成」行（8 语言词条 foot.built_on） */
.foot-built { margin-top: 10px; font-size: 12.5px; }
.foot-built a { color: var(--faint); text-decoration: none; border-bottom: 1px solid transparent;
  transition: color .16s var(--ease), border-color .16s var(--ease); }
.foot-built a:hover { color: var(--accent); border-bottom-color: var(--accent); }

/* ==========================================================================
   移动端底部 Tab（2026-10-08 站长要求）
   --------------------------------------------------------------------------
   5 项 = 盘面 / 板块 / 集市 / 自选 / 会员（复用现成 nav.* 词条，8 语言跟随语言切换）。
   只在 ≤760 常驻；正文与页脚用 body 的 padding-bottom 让位（滚到底不被遮）；
   图表全屏与手机横屏（高度很小）时隐藏。⚠️ 下面两条「隐藏」规则必须排在
   ≤760 那条之后（同优先级靠后者生效）。
   ========================================================================== */
.tabbar { display: none; }
@media (max-width: 760px) {
  .tabbar {
    display: grid; grid-template-columns: repeat(5, minmax(0, 1fr));
    position: fixed; inset-inline: 0; bottom: 0; z-index: 58;
    background: color-mix(in srgb, var(--ink-1) 92%, transparent);
    backdrop-filter: saturate(140%) blur(14px);
    border-top: 1px solid var(--line);
    padding-bottom: env(safe-area-inset-bottom);
  }
  .tabbar a {
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
    min-height: 52px; padding: 7px 2px 6px; text-decoration: none;
    font-size: 10.5px; line-height: 1.15; color: var(--faint);
    -webkit-tap-highlight-color: transparent; transition: color .16s var(--ease);
  }
  .tabbar a svg { width: 21px; height: 21px; display: block; }
  .tabbar a.on { color: var(--accent); }
  .tabbar a:active { color: var(--paper); }
  /* 固定 Tab 会盖住页面底部：给正文与页脚留出等高空间（含 iOS 安全区） */
  body { padding-bottom: calc(58px + env(safe-area-inset-bottom)); }
  /* ≤760 已有常驻底部 Tab：横向导航不再吸顶，滚走把高度让给内容。
     ⚠️ 必须把长标签语言（de/fr/es/ar ≤1300、jp ≤1180、cn/tw/jp ≤880）那几条
     `html[lang=xx] .mobilenav{position:sticky}` 一起点名 —— 它们优先级更高，
     只写 `.mobilenav` 会被盖过去（实测 ar@390 仍是吸顶）。 */
  .mobilenav,
  html[lang="de"] .mobilenav, html[lang="fr"] .mobilenav,
  html[lang="es"] .mobilenav, html[lang="ar"] .mobilenav,
  html[lang="cn"] .mobilenav, html[lang="tw"] .mobilenav,
  html[lang="jp"] .mobilenav { position: static; }
  /* 平台注入的「AI 助手」浮球/气泡（`.ocps-ai-*`，运行时由 stats/s.js 写进 head 末尾）
     默认贴底 18px，会被底部 Tab 压住 → 抬到 Tab 之上。
     用 !important 是因为它按脚本注入，文档顺序永远在本站样式表之后。 */
  .ocps-ai-fab { bottom: calc(70px + env(safe-area-inset-bottom)) !important; }
  .ocps-ai-tip { bottom: calc(78px + env(safe-area-inset-bottom)) !important; }
}
/* 图表全屏（body.is-full）：让位给图，别让 Tab 压上去 */
body.is-full .tabbar { display: none; }
/* 手机横屏、高度很小：整条骨架让给内容（与 stock.css 顶部 .topbar/.mobilenav/.site-foot 同一口径） */
@media (orientation: landscape) and (max-height: 560px) { .tabbar { display: none; } }

/* 2026-10-09 站长：邮箱 / 手机号 渠道切换（注册 / 登录 / 找回密码共用；触摸 ≥44） */
.auth-ch { display: inline-flex; gap: 2px; padding: 3px; margin: 0 0 16px;
  background: var(--ink-3); border: 1px solid var(--line); border-radius: 999px; }
.auth-ch-btn { border: 0; background: transparent; color: var(--muted); font-size: 12.5px;
  padding: 8px 16px; min-height: 38px; border-radius: 999px; cursor: pointer;
  transition: color .18s var(--ease), background .18s var(--ease); }
.auth-ch-btn:hover { color: var(--paper); }
.auth-ch-btn.on { color: var(--ink-0); background: var(--accent); font-weight: 600; }
@media (max-width: 760px) { .auth-ch-btn { min-height: 44px; padding: 10px 18px; } }

/* ==========================================================================
   「下载」分栏（2026-10-09）
   站长口径：等于股库的自我介绍 / 宣传页 —— PC、Android，以及将来的 iOS、小程序、鸿蒙。
   约束：令牌全部走全局（--accent / --paper / --r-lg …），**不写死色值**；
        窄屏从 360 起单列（铁律 9），所有栅格用 auto-fit + minmax；
        方向一律用逻辑属性（RTL 阿语不返工）。
   ========================================================================== */
.dl-hero {
  /* 和首页首屏同一手法：这一块恒为暗底，所以就地覆盖令牌，出了作用域即失效。
     ⚠️ 必须连 --ink-* 一起钉死：浅色主题下 --ink-2 是 #fff、--ink-0 是 #efece7，
        只钉 --paper 的话，次级按钮会变成「白底 + 近白字」= 看不见（2026-10-09 站长实测）。 */
  --ink-0: #05070c; --ink-1: #0a0d14;
  --ink-2: rgba(255, 255, 255, .07); --ink-3: rgba(255, 255, 255, .14);
  --paper: #f3f4f6; --muted: #b6bcc9; --faint: #8e95a4;
  --accent: #d9bd85; --accent-soft: rgba(217, 189, 133, .16);
  --line: rgba(255, 255, 255, .10); --line-2: rgba(255, 255, 255, .18);
  color: var(--paper);
  position: relative; isolation: isolate; overflow: hidden;
  margin-top: 26px; padding: 54px 52px 48px;
  border: 1px solid var(--line-2); border-radius: var(--r-lg);
  background:
    radial-gradient(720px 380px at 88% -12%, rgba(217, 189, 133, .18), transparent 62%),
    radial-gradient(560px 320px at 2% 108%, rgba(127, 180, 255, .10), transparent 60%),
    #05070c;
}
.dl-hero-in { position: relative; z-index: 1; max-width: 760px; }
.dl-hero-glow {
  position: absolute; inset-block-start: -30%; inset-inline-end: -12%;
  width: 46%; aspect-ratio: 1; border-radius: 50%; z-index: 0; pointer-events: none;
  background: radial-gradient(circle, rgba(217, 189, 133, .30), transparent 66%);
  filter: blur(28px);
}
.dl-eyebrow {
  margin: 0 0 14px; font-size: 11.5px; letter-spacing: .18em; text-transform: uppercase;
  color: var(--accent); font-weight: 600;
}
.dl-h1 {
  font-family: var(--font-display); font-weight: 700;
  font-size: clamp(29px, 4.6vw, 52px); line-height: 1.06; letter-spacing: -.035em;
  margin: 0 0 14px;
}
.dl-lede { margin: 0 0 24px; max-width: 60ch; color: var(--muted); font-size: clamp(13.5px, 1.4vw, 15px); line-height: 1.75; }
.dl-cta-row { display: flex; flex-wrap: wrap; gap: 12px; }
.dl-hero .btn { backdrop-filter: blur(8px) saturate(120%); }
.dl-hero .btn-primary { color: #08090d; }
.dl-btn-lg { height: 48px; padding: 0 22px; border-radius: 12px; font-size: 14.5px; }
.dl-trust { margin: 16px 0 0; font-size: 12.5px; color: var(--faint); }
.dl-hero-stats { display: flex; flex-wrap: wrap; gap: 28px; margin-top: 26px; }
.dl-stat { display: inline-flex; align-items: baseline; gap: 8px; font-size: 12px; color: var(--faint); }
.dl-stat b { font-family: var(--font-display); font-size: 22px; font-weight: 700; letter-spacing: -.02em; color: var(--paper); font-variant-numeric: tabular-nums; }
.dl-points { margin: 26px 0 0; padding: 0; list-style: none; display: grid; gap: 8px; }
.dl-points li { position: relative; padding-inline-start: 20px; font-size: 12.5px; line-height: 1.7; color: var(--muted); }
.dl-points li::before {
  content: ''; position: absolute; inset-inline-start: 0; inset-block-start: .62em;
  width: 7px; height: 7px; border-radius: 2px; background: var(--accent); opacity: .85;
}

/* 平台卡：auto-fit 栅格（360 单列 → 桌面 4 列），卡高靠 flex 拉开，按钮永远贴底 */
.dl-grid { grid-template-columns: repeat(auto-fit, minmax(248px, 1fr)); }
.dl-card { display: flex; flex-direction: column; gap: 10px; min-height: 258px; }
.dl-card.is-ready:hover { border-color: var(--line-2); transform: translateY(-2px); }
.dl-card.is-soon { opacity: .82; }
.dl-card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.dl-ico {
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; border-radius: 12px;
  background: var(--accent-soft); color: var(--accent); border: 1px solid var(--line);
}
.dl-ico svg { width: 21px; height: 21px; }
.dl-badge {
  padding: 4px 9px; border-radius: 999px; border: 1px solid var(--line);
  font-size: 11px; color: var(--faint); white-space: nowrap;
}
.dl-badge.on { color: var(--accent); border-color: var(--accent-soft); background: var(--accent-soft); font-weight: 600; }
.dl-card-title { font-family: var(--font-display); font-size: 17px; font-weight: 600; letter-spacing: -.02em; margin: 2px 0 0; }
.dl-card-sub { margin: 0; font-size: 12.5px; line-height: 1.7; color: var(--muted); }
.dl-list { margin: 2px 0 0; padding: 0; list-style: none; display: grid; gap: 7px; }
.dl-list li { position: relative; padding-inline-start: 17px; font-size: 12px; line-height: 1.65; color: var(--faint); }
.dl-list li::before {
  content: ''; position: absolute; inset-inline-start: 0; inset-block-start: .6em;
  width: 5px; height: 5px; border-radius: 50%; background: var(--line-2);
}
.dl-card-foot { margin-top: auto; padding-top: 12px; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.dl-card-soon { font-size: 12px; color: var(--faint); }
.dl-card-stat { margin-inline-start: auto; font-size: 11.5px; color: var(--faint); font-variant-numeric: tabular-nums; white-space: nowrap; }

/* 规格条（版本 / 大小 / 更新）：读站内发布物，不依赖外部接口 */
.dl-specs { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.dl-spec { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.dl-spec-k { font-size: 11.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--faint); }
.dl-spec-v { font-family: var(--font-display); font-size: 22px; font-weight: 700; letter-spacing: -.02em; }
.dl-spec-n { font-size: 12.5px; color: var(--muted); }

.dl-cta { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 18px; }
.dl-cta-title { font-family: var(--font-display); font-size: clamp(18px, 2.2vw, 24px); font-weight: 600; letter-spacing: -.025em; margin: 0 0 6px; }
.dl-cta-sub { margin: 0; max-width: 62ch; font-size: 13px; line-height: 1.7; color: var(--muted); }
.dl-legal { margin: 16px 2px 0; font-size: 11.5px; line-height: 1.7; color: var(--faint); }

@media (max-width: 820px) {
  .dl-hero { margin-top: 18px; padding: 30px 20px 32px; border-radius: var(--r); }
  .dl-hero-glow { width: 78%; inset-block-start: -18%; inset-inline-end: -20%; }
  .dl-hero-stats { gap: 20px; margin-top: 22px; }
  .dl-points { margin-top: 22px; }
  .dl-card { min-height: 0; }
  .dl-card-foot .dl-card-stat { margin-inline-start: 0; width: 100%; }
  .dl-cta { flex-direction: column; align-items: flex-start; }
}
@media (max-width: 380px) {
  .dl-btn-lg { height: 46px; padding: 0 16px; font-size: 13.5px; width: 100%; }
  .dl-cta-row { gap: 10px; }
}

/* ---------- 下载页文案 · 站点后台（2026-10-09）----------
   后台壳同时引了 stock.css 与 admin.css，所以这层放这里就够（不必再动 admin.css）。
   窄屏：芯片 ≥44 触屏，栅格 auto-fit 自动落单列（铁律 9）。 */
.dl-ad-tabs { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-top: 12px; }
.dl-ad-tabs > .muted { font-size: 12px; margin-inline-end: 2px; }
.dl-ad-tab {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 12px; min-height: 34px; border: 1px solid var(--line); border-radius: 999px;
  font-size: 12.5px; color: var(--muted); text-decoration: none;
  transition: color .16s var(--ease), border-color .16s var(--ease), background .16s var(--ease);
}
.dl-ad-tab:hover { color: var(--paper); border-color: var(--line-2); }
.dl-ad-tab.on { background: var(--accent); border-color: var(--accent); color: var(--ink-0); font-weight: 600; }
.dl-ad-tab i { font-style: normal; font-size: 10px; opacity: .72; }
.dl-ad-tab.on i { opacity: .85; }
.dl-ad-grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.dl-ad-field { display: block; min-width: 0; }
.dl-ad-field > span { display: block; font-size: 11.5px; color: var(--faint); margin-bottom: 6px; }
.dl-ad-full { grid-column: 1 / -1; }
@media (max-width: 760px) { .dl-ad-tab { min-height: 44px; padding: 8px 14px; } }
