/* fy.kuromi.io — 语域转换
   配色、字体、间距、"不用圆角"的处理都取自 fatou 门面站。
   明暗切换沿用 dashboard 的逻辑：暗色打底，.day-mode 覆盖成明亮；
   Auto 按钟点走（7:00–19:00 算白天），选择存 localStorage。
   区别是 dashboard 逐元素写了六十来行覆盖，这里改成一层"角色色"变量，
   两套值各写一遍就够，以后加组件不用再补一条 day-mode 规则。 */

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

[hidden] { display: none !important; }

:root {
  /* ── 品牌色：两种模式共用，取自 fatou ── */
  --navy:  #1e2d4a;
  --gold:  #b8912f;
  --dark:  #0f1c2e;
  --cream: #faf7f2;
  --light: #f0ebe2;

  /* ── 角色色：暗色（基准）── */
  --bg:         var(--dark);
  --ink:        #e8e4dc;
  --ink-soft:   #9aa3b0;
  --surface:    rgba(255,255,255,0.04);   /* 卡片 */
  --sunken:     rgba(255,255,255,0.02);   /* 结果框这类凹下去的区域 */
  --edge:       rgba(255,255,255,0.08);   /* 卡片描边 */
  --field-edge: rgba(255,255,255,0.16);   /* 输入框描边 */
  --rule:       rgba(255,255,255,0.07);   /* 分隔线 */
  --hover:      rgba(255,255,255,0.03);
  --input-bg:   rgba(255,255,255,0.05);
  --th-bg:      rgba(255,255,255,0.05);
  --th-ink:     rgba(255,255,255,0.5);

  --ok:   #6dbb8b;
  --warn: #d9ac54;
  --fail: #e0806c;
  --ok-bg:   rgba(109,187,139,0.15);
  --warn-bg: rgba(217,172,84,0.15);
  --fail-bg: rgba(224,128,108,0.15);
  --err-bg:   rgba(224,128,108,0.12);
  --err-edge: rgba(224,128,108,0.35);

  /* 不透明的面板底色。--surface 是半透明的白，叠在 --bg 上好看，
     但 sticky 标题用它会透出下面滚过去的内容。这里给一个等效实色。 */
  --surface-solid: #192536;

  --login-bg:   var(--dark);
  --login-card: var(--cream);
  --watermark:  rgba(255,255,255,0.015);
}

/* ── 角色色：明亮 ──
   类挂在 <html> 而不是 <body> 上，这样 <head> 里的内联脚本能在首次绘制前
   就把它加上，不会先闪一下暗色再跳成亮色。 */
:root.day-mode {
  --surface-solid: #ffffff;
  --bg:         var(--cream);
  --ink:        var(--navy);
  --ink-soft:   #64748b;
  --surface:    #ffffff;
  --sunken:     var(--cream);
  --edge:       #e8e2d8;
  --field-edge: #d8d1c4;
  --rule:       var(--light);
  --hover:      var(--cream);
  --input-bg:   #ffffff;
  --th-bg:      var(--navy);
  --th-ink:     #ffffff;

  --ok:   #2f7d4f;
  --warn: #9a6f14;
  --fail: #a4211b;
  --ok-bg:   #e6f1ea;
  --warn-bg: var(--light);
  --fail-bg: #fdecea;
  --err-bg:   #fdecea;
  --err-edge: #f0c8c4;

  --login-bg:   var(--light);
  --login-card: #ffffff;
  --watermark:  rgba(0,0,0,0.028);
}

/* Playfair 没有中文字形，中文会落到后面的宋体系列上，
   跟 Playfair 同为衬线，混排不违和。 */
body {
  font-family: 'Source Sans 3', -apple-system, BlinkMacSystemFont, 'PingFang SC',
               'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
  background: var(--bg);
  color: var(--ink);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
  transition: background-color 0.25s ease, color 0.25s ease;
}

.serif {
  font-family: 'Playfair Display', 'Songti SC', 'Noto Serif SC', 'SimSun', serif;
}

/* ── 导航（两种模式都是深色，与 dashboard 一致）───────── */
nav {
  background: var(--dark);
  padding: 1.2rem 5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: nowrap;
}
.logo {
  font-family: 'Playfair Display', 'Songti SC', serif;
  color: #fff;
  font-size: 1.1rem;
  letter-spacing: 0.04em;
  white-space: nowrap;      /* 导航里任何一项都不许折成两行 */
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}
.logo span { color: var(--gold); }
.nav-right { display: flex; align-items: center; gap: 1.1rem; flex-wrap: nowrap; flex-shrink: 0; }
.nav-user {
  color: var(--gold);
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
}
.nav-link {
  color: rgba(255,255,255,0.4);
  text-decoration: none;
  font-size: 0.84rem;
  white-space: nowrap;
  transition: color 0.2s;
}
.nav-link:hover { color: var(--gold); }

/* 明暗选择器。导航栏两种模式下都是深色，所以它自己始终是浅字深底。
   width/flex 必须写死 —— 通用 select 规则是 width:100%，一旦这条没生效
   它就会把整条导航挤到换行。 */
#theme-select {
  width: auto;
  flex: 0 0 auto;
  background-color: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.18);
  color: #fff;
  padding: 0.32rem 1.5rem 0.32rem 0.6rem;
  font-family: inherit;
  font-size: 0.78rem;
  line-height: 1.4;
  cursor: pointer;
  outline: none;
  transition: background-color 0.2s, border-color 0.2s;
  /* 箭头也要覆盖：通用规则用的是 --ink-soft，明亮模式下那是深灰，
     画在深色导航上几乎看不见 */
  background-image:
    linear-gradient(45deg,  transparent 50%, rgba(255,255,255,0.65) 50%),
    linear-gradient(135deg, rgba(255,255,255,0.65) 50%, transparent 50%);
  background-position: calc(100% - 13px) 54%, calc(100% - 9px) 54%;
  background-size: 4px 4px, 4px 4px;
  background-repeat: no-repeat;
}
#theme-select:hover { background-color: rgba(255,255,255,0.14); border-color: rgba(255,255,255,0.3); }
#theme-select:focus { border-color: var(--gold); }
#theme-select option { background: var(--dark); color: #fff; }

/* ── 页头（两种模式都是深色）──────────────────────────── */
.page-header { background: var(--navy); padding: 2.6rem 5rem; }
.page-header .eyebrow {
  color: var(--gold);
  font-size: 0.75rem;
  letter-spacing: 0.18em;
  margin-bottom: 0.6rem;
}
.page-header h1 {
  font-family: 'Playfair Display', 'Songti SC', 'Noto Serif SC', serif;
  color: #fff;
  font-size: 1.9rem;
  margin-bottom: 0.5rem;
  font-weight: 600;
}
.page-header p {
  color: rgba(255,255,255,0.45);
  font-size: 0.9rem;
  max-width: 620px;
  line-height: 1.8;
}

/* ── 主体 ─────────────────────────────────────────────── */
/* 屏幕宽就把宽度用掉：输入框、结果框跟着一起变宽，不再卡在 1020px。
   1720 是上限，再宽下去一行字太长反而难读；对齐方式保持左对齐，与页头同一条左边线。 */
main { flex: 1; padding: 2.5rem 5rem 4rem; max-width: 1720px; width: 100%; }

.panel {
  background: var(--surface);
  border: 1px solid var(--edge);
  padding: 1.6rem;
  margin-bottom: 1.2rem;
  transition: background-color 0.25s ease, border-color 0.25s ease;
}

.section-title {
  font-family: 'Playfair Display', 'Songti SC', 'Noto Serif SC', serif;
  font-size: 1.1rem;
  padding-bottom: 0.6rem;
  border-bottom: 1px solid var(--rule);
  margin-bottom: 1.2rem;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
}

label.field { display: block; }
.field > span {
  display: block;
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  color: var(--ink-soft);
  text-transform: uppercase;
  margin-bottom: 0.45rem;
}

textarea, select, input[type=text], input[type=password] {
  width: 100%;
  font-family: inherit;
  font-size: 16px;          /* 必须 ≥16px，否则 iOS 一点输入框整页放大且不缩回 */
  color: var(--ink);
  background: var(--input-bg);
  border: 1px solid var(--field-edge);
  padding: 0.7rem 0.8rem;
  transition: border-color 0.2s, background-color 0.25s ease, color 0.25s ease;
}
textarea { resize: vertical; line-height: 1.8; }
textarea:focus, select:focus, input:focus { outline: none; border-color: var(--gold); }
textarea::placeholder, input::placeholder { color: var(--ink-soft); opacity: 0.75; }

select {
  cursor: pointer;
  appearance: none;
  padding-right: 1.8rem;
  background-image:
    linear-gradient(45deg,  transparent 50%, var(--ink-soft) 50%),
    linear-gradient(135deg, var(--ink-soft) 50%, transparent 50%);
  background-position: calc(100% - 15px) 53%, calc(100% - 10px) 53%;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
}
/* 暗色下原生下拉列表在部分浏览器会用系统白底，指定一下免得刺眼 */
select option { background: var(--bg); color: var(--ink); }

.grid { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); }
.grid.two { grid-template-columns: 1fr 1fr; }
/* 自定义语域没有档位，语域那排自己占满一行 */
.grid.two > .span2 { grid-column: 1 / -1; }

/* ── 分段选择（目标语域 / 档位）────────────────────
   一排标签，选中的那个套一枚胶囊。全站就这一处圆角：胶囊是这个控件的识别特征，
   方了就跟旁边的下拉框糊成一片、看不出哪个是"当前选中"。
   配色仍走站内的 gold，不引入新色。 */
.seg { display: flex; flex-wrap: wrap; gap: 0.3rem; margin-top: -0.15rem; }
.seg-btn {
  font-family: inherit;
  font-size: 0.92rem;
  line-height: 1.25;
  padding: 0.5rem 1.05rem;
  border: 1px solid transparent;
  border-radius: 999px;
  background: transparent;
  color: var(--ink-soft);
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s, background-color 0.15s;
}
.seg-btn:hover { color: var(--ink); }
.seg-btn.on {
  color: var(--gold);
  font-weight: 600;
  border-color: rgba(184,145,47,0.55);
  background: rgba(184,145,47,0.10);
}
.seg-btn.on:hover { color: var(--gold); }
.seg-btn:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
/* 提示语高度定死，切换档位时下面那排下拉不要跟着上下跳 */
.seg-hint { margin-top: 0.5rem; min-height: 2.6em; }

/* 勾选行：提纲式输出这类"改输出形态"的开关，跟下拉参数分开放 */
.opt-row {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0.4rem 1rem;
  margin-top: 1.1rem;
}
.opt-row .hint { flex: 1 1 320px; }

.counter { text-align: right; font-size: 0.75rem; color: var(--ink-soft); margin-top: 0.35rem; }
.counter.over { color: var(--fail); }

details.adv { margin-top: 1.1rem; }
details.adv summary {
  cursor: pointer;
  font-size: 0.8rem;
  color: var(--ink-soft);
  letter-spacing: 0.06em;
  list-style: none;
  user-select: none;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
details.adv summary::-webkit-details-marker { display: none; }
details.adv summary::before {
  content: '';
  width: 0; height: 0;
  border-left: 5px solid var(--gold);
  border-top: 4px solid transparent;
  border-bottom: 4px solid transparent;
  transition: transform 0.2s;
}
details.adv[open] summary::before { transform: rotate(90deg); }
details.adv summary:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
details.adv > div { margin-top: 0.8rem; }

.actions { display: flex; align-items: center; gap: 1.2rem; flex-wrap: wrap; margin-top: 1.3rem; }

.btn {
  display: inline-block;
  padding: 0.85rem 2rem;
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  border: 0;
  cursor: pointer;
  transition: opacity 0.2s;
}
.btn-gold { background: var(--gold); color: var(--dark); }
.btn-gold:hover:not(:disabled) { opacity: 0.85; }
.btn-gold:disabled { opacity: 0.45; cursor: default; }
.btn-ghost {
  background: transparent;
  color: var(--ink-soft);
  border: 1px solid var(--field-edge);
  padding: 0.45rem 1rem;
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s;
}
.btn-ghost:hover { border-color: var(--gold); color: var(--ink); }

.check { display: inline-flex; align-items: center; gap: 0.5rem; font-size: 0.88rem; cursor: pointer; user-select: none; }
.check input { accent-color: var(--gold); width: 16px; height: 16px; cursor: pointer; }
.hint { color: var(--ink-soft); font-size: 0.78rem; line-height: 1.6; }

.err {
  margin-top: 0.9rem;
  padding: 0.7rem 0.9rem;
  background: var(--err-bg);
  border: 1px solid var(--err-edge);
  color: var(--fail);
  font-size: 0.85rem;
  line-height: 1.6;
}

/* ── 输出 ─────────────────────────────────────────────── */
#output {
  min-height: 140px;
  white-space: pre-wrap;
  word-break: break-word;
  background: var(--sunken);
  border: 1px solid var(--edge);
  padding: 1rem 1.1rem;
  line-height: 1.9;
  font-size: 0.98rem;
  transition: background-color 0.25s ease, border-color 0.25s ease;
}
#output:empty::before { content: '结果会出现在这里。'; color: var(--ink-soft); }
/* 推理模型在出正文前会沉默一阵，给个明确的「在想」而不是空白框 */
#output.thinking:empty::before {
  content: '模型正在思考…（高精度档会先推理再落笔，通常十几秒）';
  color: var(--gold);
}
#output.streaming::after {
  content: '▍';
  color: var(--gold);
  animation: blink 1s steps(2, start) infinite;
}
@keyframes blink { to { visibility: hidden; } }

table.metrics { width: 100%; border-collapse: collapse; font-size: 0.85rem; margin-top: 1.2rem; }
table.metrics th {
  background: var(--th-bg);
  color: var(--th-ink);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 500;
  text-align: right;
  padding: 0.65rem 1rem;
}
table.metrics td { padding: 0.6rem 1rem; border-bottom: 1px solid var(--rule); text-align: right; }
table.metrics th:first-child, table.metrics td:first-child { text-align: left; }
table.metrics td:first-child { color: var(--ink-soft); }
table.metrics tr:hover td { background: var(--hover); }
.delta { font-size: 0.72rem; margin-left: 0.4rem; }
.delta.good { color: var(--ok); }
.delta.bad { color: var(--warn); }

/* ── 保真校验 ─────────────────────────────────────────── */
.verdict {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  padding: 0.22rem 0.7rem;
  text-transform: uppercase;
}
.verdict.ok   { background: var(--ok-bg);   color: var(--ok); }
.verdict.warn { background: var(--warn-bg); color: var(--warn); }
.verdict.fail { background: var(--fail-bg); color: var(--fail); }

ul.issues { list-style: none; margin-top: 1rem; }
ul.issues li {
  border-left: 3px solid var(--rule);
  padding: 0.1rem 0 0.1rem 0.9rem;
  margin-bottom: 1.1rem;
  font-size: 0.88rem;
  line-height: 1.7;
}
ul.issues li.high   { border-color: var(--fail); }
ul.issues li.medium { border-color: var(--gold); }
ul.issues .tag {
  display: block;
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  color: var(--gold);
  text-transform: uppercase;
  font-weight: 600;
  margin-bottom: 0.2rem;
}
ul.issues .frag { color: var(--ink-soft); font-size: 0.82rem; margin-top: 0.25rem; }
ul.issues .frag b { color: var(--ink); font-weight: 600; }

.spin {
  display: inline-block;
  width: 12px; height: 12px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: sp 0.7s linear infinite;
  vertical-align: -1px;
  margin-right: 0.45rem;
}
@keyframes sp { to { transform: rotate(360deg); } }

/* ── 页脚（两种模式都是深色）──────────────────────────── */
footer {
  background: var(--dark);
  padding: 1.5rem 5rem;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-top: auto;
}
footer p { color: rgba(255,255,255,0.22); font-size: 0.78rem; }

/* ── 登录页 ───────────────────────────────────────────── */
.login-body {
  background: var(--login-bg);
  justify-content: center;
  align-items: center;
  padding: 1.5rem;
}
.login-body::before {
  content: '语';
  position: fixed;
  right: 4rem; top: 50%;
  transform: translateY(-50%);
  font-family: 'Playfair Display', 'Songti SC', serif;
  font-size: 26rem;
  color: var(--watermark);
  line-height: 1;
  pointer-events: none;
}
/* 登录卡片两种模式下都是浅色卡片，只是底色深浅不同——
   所以卡片内部的文字颜色固定用 navy，不跟随 --ink。 */
.login-card {
  background: var(--login-card);
  border-top: 3px solid var(--gold);
  padding: 2.6rem 2.2rem;
  width: 100%;
  max-width: 380px;
  position: relative;
  z-index: 1;
  color: var(--navy);
}
.login-card .brand {
  font-family: 'Playfair Display', 'Songti SC', serif;
  font-size: 0.95rem;
  margin-bottom: 1.6rem;
  letter-spacing: 0.03em;
}
.login-card .brand span { color: var(--gold); }
.login-card .eyebrow {
  color: var(--gold);
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  margin-bottom: 0.4rem;
}
.login-card h1 {
  font-family: 'Playfair Display', 'Songti SC', 'Noto Serif SC', serif;
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 1.6rem;
}
.login-card .field { margin-bottom: 1rem; }
.login-card .field > span { color: #64748b; }
.login-card input {
  background: #fff;
  border-color: #d8d1c4;
  color: var(--navy);
}
.login-card .btn { width: 100%; margin-top: 0.6rem; }
.login-card .err { background: #fdecea; border-color: #f0c8c4; color: #a4211b; }
.login-foot { color: #64748b; font-size: 0.75rem; margin-top: 1.4rem; line-height: 1.6; }

/* ── 移动端 ───────────────────────────────────────────── */
@media (max-width: 820px) {
  nav { padding: 1rem 1.2rem; gap: 0.6rem; }
  .nav-right { gap: 0.7rem; }
  .nav-right .nav-link[href^="https"] { display: none; }  /* 窄屏先让掉外链，保住主题选择器 */
  .logo { font-size: 0.95rem; }
  .nav-user { font-size: 0.72rem; letter-spacing: 0.04em; }
  #theme-select { padding: 0.28rem 1.2rem 0.28rem 0.45rem; font-size: 0.72rem;
                  background-position: calc(100% - 10px) 54%, calc(100% - 6px) 54%; }
  .page-header { padding: 2rem 1.5rem; }
  .page-header h1 { font-size: 1.5rem; }
  main { padding: 1.5rem 1.5rem 3rem; }
  .panel { padding: 1.1rem; }
  .grid.two { grid-template-columns: 1fr; }
  .seg-btn { font-size: 0.86rem; padding: 0.45rem 0.85rem; }
  .seg-hint { min-height: 0; }
  .btn { width: 100%; text-align: center; }
  .actions { gap: 0.8rem; }
  footer { padding: 1.2rem 1.5rem; flex-direction: column; gap: 0.4rem; text-align: center; }
  .login-body::before { display: none; }
  table.metrics th, table.metrics td { padding: 0.55rem 0.6rem; font-size: 0.8rem; }
}

/* 系统开了「减少动态效果」就别做主题过渡的淡入淡出 */
@media (prefers-reduced-motion: reduce) {
  body, .panel, #output, textarea, select, input, .seg-btn { transition: none; }
}

/* ═══════════════════════════════════════════════════════════════
   主页磁贴 + 市场摘要
   沿用既有角色色变量，不引入新配色；不用圆角，与 fatou 一致。
   ═══════════════════════════════════════════════════════════════ */

/* logo 变成回主页的链接后，别让它染上默认链接色 */
.logo a { color: inherit; text-decoration: none; }
.logo a:hover { opacity: 0.85; }

/* ── 主页磁贴 ── */
.tiles {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.2rem;
}
.tile {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--edge);
  padding: 1.6rem;
  color: inherit;
  text-decoration: none;
  transition: background-color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}
.tile:hover { background: var(--hover); border-color: var(--gold); transform: translateY(-2px); }
.tile-kicker {
  color: var(--gold);
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  margin-bottom: 0.7rem;
}
.tile h2 {
  font-family: 'Playfair Display', 'Songti SC', 'Noto Serif SC', serif;
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 0.6rem;
}
.tile p { color: var(--ink-soft); font-size: 0.9rem; line-height: 1.7; flex: 1; }
.tile-go { margin-top: 1.1rem; color: var(--gold); font-size: 0.85rem; font-weight: 500; }
/* 规划中的那块：不可点，视觉上压一档，但别弱到看不见 */
.tile-soon { opacity: 0.55; cursor: default; }
.tile-soon:hover { background: var(--surface); border-color: var(--edge); transform: none; }
.tile-soon .tile-go { color: var(--ink-soft); }

/* ── 市场摘要：左日期右正文 ── */
main.market {
  /* 不设上限：用户要「充分使用网页的宽度，宽度增加时文字框跟着扩展」。
     若哪天在超宽屏上觉得行太长，在这里加一行 max-width 即可。 */
  max-width: none;
  /* 页边距也收窄：main 基础规则给的是 5rem，摘要页信息密度高，
     那 160px 白边不如让给正文。 */
  padding-left: 2.2rem;
  padding-right: 2.2rem;
  display: grid;
  grid-template-columns: 248px minmax(0, 1fr);
  gap: 1.2rem;
  /* 不要写 align-items: start —— 那会让侧栏这个网格项只有内容那么高，
     position:sticky 在自己的盒子里就没有可移动的空间，等于失效。
     让外层 .daycol 撑满整列，里面的 .daylist 才吸得住。 */
}
.daycol { height: 100%; }
.daylist {
  background: var(--surface-solid);
  border: 1px solid var(--edge);
  /* 上内边距交给月头自己出（它要贴着容器顶吸住），
     左右内边距交给行自己出（选中高亮要通栏，不能被容器内边距切断）。 */
  padding: 0 0 0.9rem;
  position: sticky;
  top: 1.2rem;
  max-height: calc(100vh - 3rem);
  overflow-y: auto;
}
.doc { align-self: start; }

/* ── 日期栏：日历磁贴 ──
   原来是一行行的文字列表，日期和周几要读才知道。改成磁贴后
   「哪天有内容、那天什么方向」扫一眼就有，不用逐行看。 */
.cmonth { margin-bottom: 1.1rem; }
.cmonth-head {
  position: sticky;
  /* ★ top 必须是 0。写成负值等于让标题停在容器顶「上方」，
     底下的行就从那道缝里露出来 —— 背景再不透明也遮不住。 */
  top: 0;
  z-index: 3;
  background: var(--surface-solid);   /* 必须不透明，否则内容会透上来 */
  font-family: 'Playfair Display', 'Songti SC', 'Noto Serif SC', serif;
  font-size: 1rem;
  font-weight: 600;
  /* 通栏：左右各吃掉一个行内边距，否则两侧留缝、内容照样漏 */
  padding: 0.8rem 1rem 0.55rem;
  margin-bottom: 0.75rem;
  border-bottom: 1px solid var(--rule);
}
.cmonth-y { font-size: 0.72rem; font-weight: 400; color: var(--ink-soft); margin-left: 0.4rem; }

.clist { display: flex; flex-direction: column; gap: 0.45rem; }

/* 一行一天。左边是放大的日历方块（数字和周几都加大，占住视觉重心），
   右边是当天的方向与条目密度。做成方块而不是纯文字行，是为了让
   「哪天有内容、那天什么方向」不用逐行读就能扫出来。 */
.cday {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  /* 左右内边距在行上而不在容器上 —— 这样选中高亮能通栏铺满 */
  padding: 0.45rem 1rem;
  color: inherit;
  text-decoration: none;
  transition: background-color 0.15s ease;
}
.cday:hover { background: var(--hover); }

/* 日历页的样子：上面一条着色的星期条，下面一个大日期。
   整块只有一圈细边（那就是「日历的框」），不在外面再套第二圈。 */
.cbox {
  flex: none;
  width: 56px;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--edge);
  overflow: hidden;
  line-height: 1;
}
.cday-w {
  font-size: 0.74rem;
  text-align: center;
  padding: 0.16rem 0 0.18rem;
  color: #fff;
  background: var(--ink-soft);      /* 方向色覆盖在下面 */
  letter-spacing: 0.02em;
}
.cday-n {
  font-size: 1.55rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  text-align: center;
  padding: 0.2rem 0 0.28rem;
}

.cmeta { display: flex; flex-direction: column; gap: 0.12rem; min-width: 0; }
.cdir { font-size: 0.92rem; font-weight: 600; line-height: 1.35; }
.ccnt { font-size: 0.78rem; color: var(--ink-soft); font-variant-numeric: tabular-nums; }
.ccorr { font-size: 0.72rem; color: var(--gold); }

/* 方向色：与正文那套语义一致 —— 绿多、红空、金中性、灰不明确 */
/* 方向色落在星期条上（日历页的月份条就是这个位置），
   块身保持素净，不再整块染色 —— 那样一列全是色块反而看不出重点。 */
.cday.t-up   .cday-w { background: var(--ok); }
.cday.t-down .cday-w { background: var(--fail); }
.cday.t-mid  .cday-w { background: var(--gold); }
.cday.t-flat .cday-w { background: var(--ink-soft); }
.cday.t-up   .cbox { border-color: var(--ok); }
.cday.t-down .cbox { border-color: var(--fail); }
.cday.t-mid  .cbox { border-color: var(--gold); }
/* 灰色（方向不明确）的日子也要有框，否则那几天看着像缺了一块 */
.cday.t-flat .cbox { border-color: var(--ink-soft); }
.cday.t-up   .cdir { color: var(--ok); }
.cday.t-down .cdir { color: var(--fail); }
.cday.t-mid  .cdir { color: var(--gold); }
.cday.t-flat .cdir { color: var(--ink-soft); }

/* 选中：整行高亮贯穿，不再给行和方块各描一圈金边 ——
   框里套框正是要避免的。方块自己的边框保持方向色不变。 */
.cday.on { background: var(--view-bg); }
.cday.on .cday-n { color: var(--ink); }

/* ── 摘要正文 ── */
.doc { padding: 1.8rem 2rem; }
.doc-title {
  font-family: 'Playfair Display', 'Songti SC', 'Noto Serif SC', serif;
  font-size: 1.5rem;
  font-weight: 600;
  padding-bottom: 0.8rem;
  border-bottom: 1px solid var(--rule);
  margin-bottom: 1.4rem;
}
.doc h3 {
  font-family: 'Playfair Display', 'Songti SC', 'Noto Serif SC', serif;
  font-size: 1.15rem;
  font-weight: 600;
  margin: 1.8rem 0 0.7rem;
  padding-left: 0.6rem;
  border-left: 3px solid var(--gold);
}
.doc h4 { font-size: 1rem; font-weight: 600; margin: 1.2rem 0 0.5rem; }
.doc p { line-height: 1.85; margin: 0.6rem 0; }
.doc ul { margin: 0.5rem 0 0.5rem 1.1rem; }
.doc li { line-height: 1.85; margin: 0.35rem 0; }
.doc ul ul { margin-top: 0.3rem; margin-bottom: 0.3rem; }
.doc strong { color: var(--ink); font-weight: 600; }
.doc hr { border: 0; border-top: 1px solid var(--rule); margin: 1.6rem 0; }
.doc code {
  background: var(--sunken);
  border: 1px solid var(--edge);
  padding: 0.05em 0.35em;
  font-size: 0.9em;
}
/* 原消息时间戳：调淡但仍可读 —— 它的用途是回查，不是阅读重点 */
.doc .ts {
  color: var(--ink-soft);
  font-size: 0.8em;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.doc .ts::before { content: '（'; }
.doc .ts::after  { content: '）'; }
.doc-meta {
  margin-top: 2rem;
  padding-top: 0.9rem;
  border-top: 1px solid var(--rule);
  color: var(--ink-soft);
  font-size: 0.78rem;
}

@media (max-width: 900px) {
  main.market { grid-template-columns: 1fr; }
  .daycol { height: auto; }
  .daylist { position: static; max-height: 300px; }

  .doc { padding: 1.4rem; }
}

/* ═══════════════════════════════════════════════════════════════
   市场摘要 · 结构化视图
   两条语义：
     层面 —— 新闻 / 战略 / 技术 / 更正，切成选项卡，一次只看一类。
              （原来战略与技术左右分栏，两栏各自太窄、卡片里再套标签，框套框。）
     性质 —— 事实 / 观点，**按组归集**：一节里各出一次组标题，
              不再逐条挂小标签 —— 一屏几十个标签会把版面切碎。
   ═══════════════════════════════════════════════════════════════ */

:root {
  --fact:    #5b8ca8;
  --fact-bg: rgba(91,140,168,0.14);
  --view-bg: rgba(184,145,47,0.14);
}
:root.day-mode {
  --fact:    #2f6b8a;
  --fact-bg: #e7f0f5;
  --view-bg: #f6efdd;
}

.headline {
  font-family: 'Playfair Display', 'Songti SC', 'Noto Serif SC', serif;
  font-size: 1.2rem;
  line-height: 1.65;
  margin-bottom: 1.2rem;
  color: var(--ink);
}

/* ── 整体判断 ── */
.stance {
  display: flex;
  gap: 1.3rem;
  align-items: center;
  background: var(--sunken);
  border: 1px solid var(--edge);
  /* 左边框直接就是方向色（偏多绿 / 偏空红 / 中性灰）。
     原来这里恒为金色，方向另用一个带边框的小盒子表示 —— 框里套框，看着累。 */
  border-left: 4px solid var(--ink-soft);
  padding: 1rem 1.3rem;
  margin-bottom: 1.4rem;
}
.stance.st-up   { border-left-color: var(--ok); }
.stance.st-down { border-left-color: var(--fail); }
.stance.st-mid  { border-left-color: var(--gold); }
.stance.st-flat { border-left-color: var(--ink-soft); }

/* 方向词只上色、不画框 */
.stance-badge { text-align: center; min-width: 76px; padding: 0; border: 0; background: none; }
.stance-dir { display: block; font-size: 1.35rem; font-weight: 600; line-height: 1.25; }
.stance-hz  { display: block; font-size: 0.82rem; color: var(--ink-soft); margin-top: 0.15rem; }
.stance.st-up   .stance-dir { color: var(--ok); }
.stance.st-down .stance-dir { color: var(--fail); }
.stance.st-mid  .stance-dir { color: var(--gold); }
.stance.st-flat .stance-dir { color: var(--ink-soft); }
.stance-note { font-size: 0.95rem; line-height: 1.8; color: var(--ink); }

.tone-up    { color: var(--ok);   border-color: var(--ok)   !important; background: var(--ok-bg); }
.tone-down  { color: var(--fail); border-color: var(--fail) !important; background: var(--fail-bg); }
/* 中性 / 持有：表过态但不偏向任一边，用金色。
   与「不明确 / 观望 / 关注」区分开 —— 那三个是没表态，维持中性白。 */
.tone-mid   { color: var(--gold); border-color: var(--gold) !important; background: var(--view-bg); }
.tone-flat  { color: var(--ink-soft); }

/* ── 选项卡 ── */
.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  border-bottom: 1px solid var(--rule);
  margin-bottom: 1.3rem;
}
.tab {
  position: relative;
  background: none;
  border: 0;
  border-bottom: 2px solid transparent;
  color: var(--ink-soft);
  font-family: inherit;
  font-size: 1rem;
  padding: 0.65rem 1.15rem;
  cursor: pointer;
  transition: color 0.15s ease, border-color 0.15s ease;
}
.tab:hover:not(:disabled) { color: var(--ink); }
.tab.on { color: var(--ink); border-bottom-color: var(--gold); font-weight: 600; }
.tab-n {
  margin-left: 0.4rem;
  font-size: 0.8rem;
  color: var(--ink-soft);
  font-variant-numeric: tabular-nums;
}
/* 更正与变动漏看代价最大，非空时给个记号 */
.tab-dot {
  display: inline-block; width: 6px; height: 6px;
  background: var(--gold); margin-right: 0.4rem; vertical-align: middle;
}

/* ── 按性质归集 ── */
.kind-group { margin-bottom: 1.5rem; }
.kind-head {
  font-size: 0.95rem;
  font-weight: 600;
  padding-left: 0.6rem;
  border-left: 3px solid var(--fact);
  color: var(--fact);
  margin-bottom: 0.7rem;
}
.kind-group.k-view .kind-head { border-left-color: var(--gold); color: var(--gold); }
.kind-n {
  margin-left: 0.45rem; font-size: 0.82rem; font-weight: 400;
  color: var(--ink-soft); font-variant-numeric: tabular-nums;
}

/* ── 条目 ──
   卡片不再画边框套边框，只用一条淡分隔线；宽度跟着容器走。 */
.cards { list-style: none; margin: 0; padding: 0; }
.card {
  padding: 0.75rem 0 0.85rem;
  border-bottom: 1px solid var(--rule);
}
.card:last-child { border-bottom: 0; }
.card-title {
  display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem;
  font-weight: 600; font-size: 1rem; margin-bottom: 0.35rem;
}
.card-body { font-size: 0.95rem; line-height: 1.85; color: var(--ink); margin: 0; }
.card-foot { margin-top: 0.45rem; display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; }

.tag { font-size: 0.8rem; color: var(--ink-soft); background: var(--hover); padding: 0.1rem 0.45rem; }

/* 标的代码：等宽加重，扫一眼就能找到 */
.sym {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 1.02rem; font-weight: 600; letter-spacing: 0.02em; color: var(--ink);
}
.sym-none { font-family: inherit; font-size: 0.9rem; font-weight: 400; color: var(--ink-soft); }
.sym-name { font-size: 0.85rem; font-weight: 400; color: var(--ink-soft); }
.act {
  font-size: 0.8rem; font-weight: 600; padding: 0.14rem 0.5rem;
  border: 1px solid currentColor; white-space: nowrap;
}

/* ── 更正与变动 ── */
.corr { list-style: none; margin: 0; padding: 0; }
.corr > li {
  border-left: 3px solid var(--gold);
  background: var(--view-bg);
  padding: 0.9rem 1.1rem;
  margin-bottom: 0.8rem;
}
.corr-row { display: flex; gap: 0.6rem; align-items: baseline; font-size: 0.95rem; line-height: 1.8; margin: 0.25rem 0; }
.corr-tag {
  flex: none; font-size: 0.8rem; padding: 0.06rem 0.4rem;
  border: 1px solid currentColor; font-weight: 600;
}
.corr-tag.was { color: var(--ink-soft); }
.corr-tag.now { color: var(--gold); }
.corr-note { font-size: 0.9rem; line-height: 1.8; color: var(--ink-soft); margin: 0.5rem 0 0; }

/* ── 新闻事实 ──
   类别标题不小于正文（原来 0.72rem 太小，看不清分组）。 */
.news-group { margin-bottom: 1.4rem; }
.news-cat {
  font-size: 1rem;
  font-weight: 600;
  color: var(--fact);
  border-left: 3px solid var(--fact);
  padding-left: 0.6rem;
  margin-bottom: 0.5rem;
}
.news-list { list-style: none; margin: 0; padding-left: 0.9rem; }
.news-list li {
  font-size: 0.95rem; line-height: 1.85; margin: 0.35rem 0; color: var(--ink);
  padding-left: 0.9rem; text-indent: -0.9rem;
}
.news-list li::before { content: '·'; color: var(--ink-soft); margin-right: 0.5rem; }

/* ── 行动项与存疑：不进选项卡 ──
   一个太重要不该藏起来，一个是全篇的注脚。 */
.tail-blk, .notes-blk { margin-top: 1.8rem; }
.acts { list-style: none; margin: 0; padding: 0; }
.acts li {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.6rem;
  padding: 0.55rem 0; border-bottom: 1px solid var(--rule); font-size: 0.95rem;
}
.due { font-size: 0.85rem; color: var(--gold); border: 1px solid var(--gold); padding: 0.06rem 0.45rem; }
.due-none { color: var(--ink-soft); border-color: var(--edge); }

.notes-blk { opacity: 0.9; }
.notes { list-style: none; margin: 0; padding: 0; }
.notes li {
  font-size: 0.9rem; line-height: 1.8; color: var(--ink-soft);
  border-left: 2px solid var(--edge); padding-left: 0.8rem; margin-bottom: 0.55rem;
}

/* 区块标题 */
.blk { margin-bottom: 1.6rem; }
.blk-head {
  display: flex; align-items: baseline; gap: 0.7rem;
  padding-bottom: 0.5rem; margin-bottom: 0.85rem;
  border-bottom: 1px solid var(--rule);
}
.blk-head h3 {
  font-family: 'Playfair Display', 'Songti SC', 'Noto Serif SC', serif;
  font-size: 1.15rem; font-weight: 600; margin: 0; padding: 0; border: 0;
}
.blk-sub { font-size: 0.88rem; color: var(--ink-soft); }

/* 日期栏的方向小圆点 */
.dot { display: inline-block; width: 7px; height: 7px; margin-right: 0.4rem; border: 1px solid; }
.dot.tone-flat { border-color: var(--ink-soft); background: transparent; }

/* 早期只有 markdown 的那几份走这里 */
.legacy { font-size: 0.95rem; }

@media (max-width: 900px) {
  .stance { flex-direction: column; align-items: flex-start; gap: 0.7rem; }
  .tab { padding: 0.6rem 0.8rem; font-size: 0.95rem; }
}

/* 群务／课程营销：内容一概不收，只留这一条痕迹。
   刻意做得不显眼 —— 它是个脚注，不是内容。 */
/* 营销脚注：全篇最不重要的一行，放在最末，压到最淡。 */
.promo-note {
  font-size: 0.8rem;
  color: var(--ink-soft);
  opacity: 0.75;
  padding-top: 0.9rem;
  margin-top: 1.4rem;
  border-top: 1px solid var(--rule);
}

/* 课程主题／提要／下期预告：既非观点也非事实，压成标题下的一行小字，
   不占卡片、不参与事实-观点的分组。 */
/* 课程主题那一行：不加左竖线 —— 它是标题的延续，不是一条独立条目，
   画上 bullet 反而像在列举。 */
.agenda {
  font-size: 0.92rem;
  line-height: 1.75;
  color: var(--ink-soft);
  margin: -0.7rem 0 1.2rem;
}

/* ── 行情条 ──
   放在选项卡上方：读摘要前先知道那天盘面是什么样，正文里的判断才有参照。
   涨绿跌红，与页面其余部分同一套语义。 */
/* 容器本身不画框、不铺底 —— 磁贴各自已经有框了，
   外面再套一层就是框套框。只留一条头部说明。 */
.market-band { margin-bottom: 1.5rem; }
.mb-head {
  font-size: 0.82rem;
  color: var(--ink-soft);
  margin-bottom: 0.55rem;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid var(--rule);
}
.mb-sub { margin-left: 0.5rem; opacity: 0.75; }

/* 八个指标：要么一行八个，要么两行各四个（auto-fit 会排成 5+3、6+2，不整齐）。
   按行情条自己的宽度切（容器查询），不按整个窗口 —— 左边的日期栏宽窄不定。 */
.market-band { container-type: inline-size; }
.mtiles {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.5rem;
}
@container (min-width: 900px) {
  .mtiles { grid-template-columns: repeat(8, minmax(0, 1fr)); }
}
/* 手机上仍是两行各四个：字号跟着行情条的宽度缩（cqi），五位数加两位小数也放得下，不截断 */
@container (max-width: 480px) {
  /* 选择器带上 .market-band：后面还有一条 max-width:700px 的媒体查询会把 .mt-val 设回 1rem */
  .market-band .mtiles { gap: 0.3rem; }
  .market-band .mt-label { font-size: 0.66rem; padding: 0.12rem 0.1rem; }
  .market-band .mt-body { padding: 0.28rem 0.25rem 0.32rem; }
  .market-band .mt-val { font-size: clamp(0.66rem, 3.5cqi, 0.9rem); white-space: nowrap; letter-spacing: -0.01em; }
  .market-band .mt-chg { font-size: clamp(0.6rem, 3cqi, 0.76rem); }
  .market-band .mt-alt { display: none; } /* 太挤了，黄金的 GLD 价格在窄屏上不显示 */
}
/* 与左侧日历磁贴同一个骨架：顶部一条着色的名字带，下面是数字。
   整块只有一圈细边，外面不再套第二层框。 */
.mtile {
  border: 1px solid var(--ink-soft);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.mt-label {
  font-size: 0.76rem;
  text-align: center;
  padding: 0.16rem 0.3rem 0.18rem;
  color: #fff;
  background: var(--ink-soft);
  letter-spacing: 0.02em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.mt-body { padding: 0.4rem 0.55rem 0.5rem; background: var(--surface); }
.mt-val {
  font-size: 1.12rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  line-height: 1.25;
}
.mt-foot {
  display: flex; align-items: baseline; gap: 0.45rem; flex-wrap: wrap;
  margin-top: 0.12rem;
}
.mt-chg { font-size: 0.82rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.mt-alt { font-size: 0.72rem; color: var(--ink-soft); font-variant-numeric: tabular-nums; }

/* 方向色落在名字带和外框上 */
.mtile.m-up   { border-color: var(--ok); }
.mtile.m-down { border-color: var(--fail); }
.mtile.m-flat { border-color: var(--ink-soft); }
.mtile.m-up   .mt-label { background: var(--ok); }
.mtile.m-down .mt-label { background: var(--fail); }
.mtile.m-flat .mt-label { background: var(--ink-soft); }
.mtile.m-up   .mt-chg { color: var(--ok); }
.mtile.m-down .mt-chg { color: var(--fail); }
.mtile.m-flat .mt-chg { color: var(--ink-soft); }

@media (max-width: 700px) {
  .mt-val { font-size: 1rem; }
}

/* 个股卡片右侧的收盘价：靠右对齐，与标的名拉开距离，
   一眼能扫出「他说的这只当天是涨是跌」。 */
.quote { margin-left: auto; display: flex; align-items: baseline; gap: 0.45rem; white-space: nowrap; }
.q-px {
  font-size: 1rem; font-weight: 600;
  font-variant-numeric: tabular-nums;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}
.q-chg { font-size: 0.85rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.q-chg.tone-up { color: var(--ok); }
.q-chg.tone-down { color: var(--fail); }
.q-chg.tone-flat { color: var(--ink-soft); }
@media (max-width: 620px) { .quote { margin-left: 0; width: 100%; } }

/* ── 导航栏的悬浮菜单 ──
   显隐交给 :hover / :focus-within，不写 JS 开关：
   鼠标悬停即出、键盘 Tab 进去也出、触屏点按钮拿到焦点同样出。 */
/* #navMenu 自己也要是 flex 容器：它在 .nav-right 里只算「一个」子项，
   里面几个链接之间吃不到外层的 gap，只剩 HTML 换行折叠出的一个空格。 */
#navMenu { display: flex; align-items: center; gap: 1.1rem; }

.nav-drop { position: relative; display: inline-block; }
.nav-drop-btn {
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
  /* 字色不写 inherit：那会从 body 继承 --ink，亮色模式下是深蓝，画在常驻深色的导航栏上几乎看不见。
     留给 .nav-link 那条规则管（半透明白，悬停变金）。 */
  /* 只继承字体族，**不要写 `font: inherit`** —— 那个简写会把 font-size
     一起重置成父级的 16px，把 .nav-link 的 0.84rem 覆盖掉，按钮就比旁边的字大一圈。 */
  font-family: inherit;
  font-size: 0.84rem;
  letter-spacing: inherit;
  line-height: inherit;
}
.nav-caret { font-size: 0.72em; opacity: 0.7; margin-left: 0.15em; }

.nav-drop-list {
  position: absolute;
  top: 100%;
  right: 0;
  /* 与按钮之间留一点缝会导致鼠标移过去时菜单消失，
     所以不留缝，改用 padding-top 制造视觉间距。 */
  padding-top: 0.55rem;
  min-width: 11rem;
  display: none;
  z-index: 40;
}
.nav-drop:hover .nav-drop-list,
.nav-drop:focus-within .nav-drop-list { display: block; }

.nav-drop-list a {
  display: block;
  background: var(--dark);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-bottom: 0;
  color: #e8e4dc;
  text-decoration: none;
  font-size: 0.82rem;
  letter-spacing: 0.04em;
  padding: 0.6rem 0.9rem;
  white-space: nowrap;
  transition: background-color 0.15s ease, color 0.15s ease;
}
.nav-drop-list a:last-child { border-bottom: 1px solid rgba(255, 255, 255, 0.12); }
.nav-drop-list a:hover { background: rgba(255, 255, 255, 0.07); color: var(--gold); }

@media (max-width: 640px) {
  .nav-drop-list { right: auto; left: 0; }
}

/* ── 市场摘要：手动更新（只有管理员看得到）──
   放在页头里；页头两种模式下都是深色，所以文字色按深底取，不用角色色变量。 */
.refresh-bar { display: flex; align-items: center; gap: 0.8rem 1.2rem; flex-wrap: wrap; margin-top: 1.2rem; }
.btn-sm { padding: 0.55rem 1.2rem; font-size: 0.78rem; letter-spacing: 0.08em; }
.refresh-status { color: rgba(255,255,255,0.62); font-size: 0.82rem; line-height: 1.6; }
.refresh-status.ok { color: var(--ok); }
.refresh-status.fail { color: var(--fail); }

/* ── 图片生成（/draw）──
   只补这一页要用的组件；颜色一律走角色色变量，所以明暗切换自动跟着走。 */
.shots {
  display: grid;
  gap: 1.4rem;
  /* 图是主角，给足宽度；屏幕越宽排得越多，不设列数上限 */
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}

.shot {
  margin: 0;
  border: 1px solid var(--edge);
  background: var(--surface);
  display: flex;
  flex-direction: column;
}
.shot a { display: block; line-height: 0; }
.shot img {
  width: 100%;
  height: auto;
  display: block;
  /* 出图前后高度不跳：画幅是已知的几种，但图到得有先后，
     没有这条的话列表会在加载过程里反复重排。 */
  background: var(--sunken);
}
.shot figcaption { padding: 0.85rem 0.95rem; display: flex; flex-direction: column; gap: 0.45rem; }

.shot-prompt {
  font-size: 0.85rem;
  line-height: 1.65;
  color: var(--ink);
  /* 描述可以很长，列表里只给三行，点开大图能看全 */
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.shot-revised {
  font-size: 0.75rem;
  line-height: 1.6;
  color: var(--ink-soft);
  border-left: 2px solid var(--edge);
  padding-left: 0.6rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.shot-meta { font-size: 0.72rem; color: var(--ink-soft); letter-spacing: 0.03em; }

.shot-acts { display: flex; gap: 1rem; flex-wrap: wrap; margin-top: 0.15rem; }
.shot-act {
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  font-size: 0.76rem;
  color: var(--gold);
  cursor: pointer;
  text-decoration: none;
  letter-spacing: 0.03em;
}
.shot-act:hover { opacity: 0.75; }
.shot-act.danger { color: var(--fail); }

/* ── 交易分析（/analysis）──
   左边新建 + 列表，右边报告。版式照市场摘要：不设宽度上限、页边距收窄，
   报告正文在 iframe 里，自己一套变量，父页面切明暗时同步过去。 */
main.analysis {
  max-width: none;
  padding-left: 2.2rem;
  padding-right: 2.2rem;
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 1.2rem;
}
/* 侧栏本身就是网格项，所以 align-self:start + sticky 能吸住（市场摘要那个坑是 sticky 放在了里层） */
.an-side {
  align-self: start;
  position: sticky;
  top: 1rem;
  max-height: calc(100vh - 2rem);
  overflow-y: auto;
  min-width: 0;
}
.an-new { margin-bottom: 1rem; }
/* 收起时整块只剩一行「＋ 新建分析」 */
.an-new-open {
  display: none; width: 100%; text-align: left;
  background: none; border: 0; cursor: pointer;
  font-family: 'Playfair Display', 'Songti SC', 'Noto Serif SC', serif; font-size: 1.05rem;
  color: var(--gold); padding: 0.1rem 0;
}
.an-new-open:hover { opacity: 0.8; }
.an-new.collapsed { padding: 0.8rem 1.2rem; }
.an-new.collapsed .an-new-open { display: block; }
.an-new.collapsed .an-new-body { display: none; }
.an-fold {
  background: none; border: 0; cursor: pointer; padding: 0;
  font-family: inherit; font-size: 0.75rem; color: var(--ink-soft); letter-spacing: 0.04em;
}
.an-fold:hover { color: var(--gold); }
/* 类型切换（单股 / 对比）放在表单最上面 */
.an-kind { margin: -0.2rem 0 1.1rem; }

/* 代码输入：外框画在 .an-picker 上，里面的 input 去掉自己的框 ——
   对比模式下已选的代码以标签排在输入框前面，整块看起来是一个输入框 */
.an-pick { position: relative; }
.an-picker {
  display: flex; flex-wrap: wrap; align-items: center; gap: 0.35rem;
  background: var(--input-bg);
  border: 1px solid var(--field-edge);
  padding: 0.35rem 0.5rem;
  cursor: text;
  transition: border-color 0.2s, background-color 0.25s ease;
}
.an-picker:focus-within { border-color: var(--gold); }
.an-chips { display: contents; }
.an-picker input[type=text] {
  flex: 1 1 8rem; min-width: 6rem;
  border: 0; background: transparent; padding: 0.35rem 0.3rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: 0.02em;
}
.an-picker input[type=text]:focus { outline: none; }
.an-picker input[type=text]::placeholder { font-family: inherit; letter-spacing: 0; }
.an-chip {
  display: inline-flex; align-items: center; gap: 0.25rem;
  padding: 0.15rem 0.2rem 0.15rem 0.55rem;
  background: var(--view-bg);
  border: 1px solid rgba(184,145,47,0.45);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.85rem; font-weight: 600;
}
.an-chip button {
  background: none; border: 0; cursor: pointer; color: var(--ink-soft);
  font-size: 1rem; line-height: 1; padding: 0 0.25rem;
}
.an-chip button:hover { color: var(--fail); }

.an-suggest {
  position: absolute; left: 0; right: 0; z-index: 30;
  background: var(--surface-solid);
  border: 1px solid var(--field-edge); border-top: 0;
  max-height: 20rem; overflow-y: auto;
  box-shadow: 0 8px 20px rgba(0,0,0,0.18);
}
.an-opt {
  display: grid; grid-template-columns: auto 1fr; gap: 0.1rem 0.6rem; align-items: baseline;
  padding: 0.5rem 0.7rem; cursor: pointer; border-bottom: 1px solid var(--rule);
}
.an-opt:last-child { border-bottom: 0; }
.an-opt.on, .an-opt:hover { background: var(--view-bg); }
.an-opt .an-tk { font-size: 0.92rem; }
.an-opt-n { font-size: 0.8rem; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.an-opt-x { grid-column: 2; font-size: 0.7rem; color: var(--ink-soft); }
.an-tag {
  display: inline-block; font-size: 0.66rem; letter-spacing: 0.06em; font-weight: 600;
  color: var(--gold); border: 1px solid rgba(184,145,47,0.5);
  padding: 0 0.3rem; margin-right: 0.35rem; line-height: 1.5; vertical-align: 1px;
}
.an-resolved { margin-top: 0.4rem; min-height: 1.3em; }
.an-ok { color: var(--ok); font-weight: 700; }
.an-bad { color: var(--fail); }
.btn-gold:disabled { opacity: 0.45; cursor: default; }

/* 对比报告的编辑：每只一行，评级下拉 + 理由 */
.an-rank-edit { display: flex; flex-direction: column; gap: 0.6rem; }
.an-rank-row { display: grid; grid-template-columns: 1.6rem 5.5rem 7rem 1fr; gap: 0.6rem; align-items: start; }
.an-rank-row .an-rank-n { font-weight: 700; color: var(--ink-soft); padding-top: 0.6rem; }
.an-rank-row .an-tk { padding-top: 0.55rem; }
.an-rank-row textarea { font-size: 15px; line-height: 1.6; }
@media (max-width: 640px) {
  .an-rank-row { grid-template-columns: 1.4rem 1fr 6.5rem; }
  .an-rank-row textarea { grid-column: 1 / -1; }
}
.an-cond-field { margin-top: 1.1rem; }
.an-cond-field textarea { font-size: 15px; line-height: 1.65; }
.an-effort { margin-top: 1.1rem; }
.an-hascond { color: var(--gold); }
/* 分析前提：结论是按它判断的，读者要先看到 */
.an-cond {
  margin-top: 0.6rem;
  padding: 0.55rem 0.8rem;
  border: 1px dashed var(--field-edge);
  background: var(--sunken);
  color: var(--ink);
  font-size: 0.85rem;
  line-height: 1.7;
  white-space: pre-line;
}
.an-cond span {
  display: block;
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  color: var(--ink-soft);
  margin-bottom: 0.15rem;
  white-space: normal;
}
.an-editor .an-cond { margin-top: 0; margin-bottom: 0.2rem; }
.an-new .actions { margin-top: 0.4rem; }
.an-new .btn { width: 100%; text-align: center; }
.an-quota { margin-top: 0.7rem; }

.an-listhead {
  display: flex; align-items: center; justify-content: space-between; gap: 0.6rem;
  margin: 0.2rem 0 0.5rem;
}
.an-listhead .seg { margin-top: 0; }
.an-listhead .seg-btn { font-size: 0.82rem; padding: 0.35rem 0.8rem; }

/* 列表上方的筛选框：比表单里的输入框矮一号，别跟「新建」抢视线。
   它是 type=search，吃不到站内 input[type=text] 那条通用规则，颜色得自己写，不然暗色下是一块白 */
.an-listq {
  width: 100%; margin-bottom: 0.6rem;
  font-family: inherit; font-size: 16px; /* ≥16px，iOS 点进去才不会整页放大 */
  padding: 0.45rem 0.7rem;
  color: var(--ink); background: var(--input-bg);
  border: 1px solid var(--field-edge); border-radius: 0;
  -webkit-appearance: none; appearance: none;
  transition: border-color 0.2s, background-color 0.25s ease;
}
.an-listq:focus { outline: none; border-color: var(--gold); }
.an-listq::placeholder { color: var(--ink-soft); opacity: 0.75; font-size: 14px; }
.an-list { display: flex; flex-direction: column; }
.an-none { padding: 0.9rem 0.2rem; }
/* 日期分组：组标题吸顶。背景必须是实色、top 必须是 0 —— 市场摘要的日期列表踩过这两个坑
   （半透明底会透出下面的行；负的 top 会在标题上方留一道缝）。左右留白放在行上，不放在容器上。 */
.an-group-h {
  position: sticky; top: 0; z-index: 2;
  display: flex; justify-content: space-between; align-items: baseline;
  background: var(--bg);
  padding: 0.55rem 0.75rem 0.35rem;
  font-size: 0.74rem; letter-spacing: 0.08em; font-weight: 600; color: var(--ink-soft);
  border-bottom: 1px solid var(--rule);
}
.an-group-h span { font-weight: 400; opacity: 0.8; }
.an-group + .an-group { margin-top: 0.4rem; }
.an-older {
  margin: 0.8rem 0 0.4rem; background: none; border: 1px dashed var(--field-edge); cursor: pointer;
  font-family: inherit; font-size: 0.8rem; color: var(--ink-soft); padding: 0.5rem; width: 100%;
}
.an-older:hover { color: var(--gold); border-color: var(--gold); }
.an-item {
  display: flex; flex-direction: column; gap: 0.12rem;
  width: 100%; text-align: left;
  padding: 0.5rem 0.75rem;
  background: transparent; border: 0; border-bottom: 1px solid var(--rule);
  color: var(--ink); font-family: inherit; cursor: pointer;
  transition: background-color 0.15s ease;
}
.an-item:hover { background: var(--hover); }
/* 选中是通栏高亮、不描边 —— 与市场摘要的日期列表一致，避免框套框 */
.an-item.on { background: var(--view-bg); }
.an-item-top { display: flex; align-items: baseline; justify-content: space-between; gap: 0.6rem; }
/* 代码 + 公司名挤在一行，公司名太长就省略，评级始终留在右边 */
.an-item-h { display: flex; align-items: baseline; gap: 0.45rem; min-width: 0; overflow: hidden; }
.an-item-h .an-tk { flex-shrink: 0; }
/* 对比的代码串可能很长（四只），它来省略，「对比」标签和右边的首选不动 */
.an-item-h .an-tk.an-tk-cmp { flex-shrink: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 0.9rem; }
.an-item-h .an-tag { flex-shrink: 0; white-space: nowrap; margin-right: 0; }
.an-item-top > .an-act, .an-item-top > .an-state { flex-shrink: 0; }
.an-iname { font-size: 0.78rem; color: var(--ink-soft); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.an-item.is-failed .an-tk, .an-item.is-failed .an-iname { opacity: 0.6; }
.an-tk {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-weight: 700; font-size: 1rem; letter-spacing: 0.02em;
}
.an-name { font-size: 0.82rem; color: var(--ink-soft); line-height: 1.4; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.an-meta { font-size: 0.7rem; color: var(--ink-soft); opacity: 0.8; }
.an-act { font-size: 0.85rem; font-weight: 600; white-space: nowrap; }
.an-act.v-up { color: var(--ok); }
.an-act.v-down { color: var(--fail); }
.an-act.v-mid { color: var(--gold); }
.an-act.v-flat { color: var(--ink-soft); }
.an-state { font-size: 0.76rem; white-space: nowrap; color: var(--gold); }
.an-state.s-failed { color: var(--fail); }
.an-state.s-queued { color: var(--ink-soft); }
.an-state .spin { width: 10px; height: 10px; margin-right: 0.3rem; }

.an-main { min-width: 0; }
.an-empty p + p { margin-top: 0.6rem; }
.an-bar {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 0.8rem 1.4rem;
  flex-wrap: wrap;
  padding-bottom: 0.9rem; margin-bottom: 1.1rem;
  border-bottom: 1px solid var(--rule);
}
.an-bar-l { min-width: 0; }
.an-title { font-size: 1.2rem; line-height: 1.4; }
.an-title .an-tk { font-size: 1.2rem; }
.an-cname { font-family: 'Playfair Display', 'Songti SC', 'Noto Serif SC', serif; margin-left: 0.3rem; }
.an-sub { font-size: 0.78rem; color: var(--ink-soft); margin-top: 0.25rem; line-height: 1.6; }
.an-acts { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.an-acts a.btn-ghost { text-decoration: none; display: inline-block; }
.btn-ghost.danger { color: var(--fail); }
.btn-ghost.danger:hover { border-color: var(--fail); color: var(--fail); }

.an-status .an-st { font-size: 1rem; font-weight: 600; color: var(--gold); margin-bottom: 0.5rem; }
.an-status .an-st.fail { color: var(--fail); }
.an-status .actions { margin-top: 1rem; }

.an-editor .field { margin-top: 1rem; }
.an-editor .section-title .hint {
  font-family: 'Source Sans 3', -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Microsoft YaHei', sans-serif;
  font-size: 0.75rem;
}
.an-verdict-row { grid-template-columns: repeat(2, minmax(140px, 220px)); }
.an-verdict-row .field { margin-top: 0; }
.an-editor textarea { font-size: 15px; line-height: 1.75; }

.an-frame { display: block; width: 100%; border: 0; background: transparent; }

@media (max-width: 900px) {
  main.analysis { grid-template-columns: 1fr; padding-left: 1.2rem; padding-right: 1.2rem; }
  .an-side { position: static; max-height: none; overflow: visible; }
  .an-list { max-height: 50vh; overflow-y: auto; }
}
@media (max-width: 640px) {
  .an-acts { width: 100%; }
  .an-verdict-row { grid-template-columns: 1fr 1fr; }
}

/* ── 设置页（/settings）── */
main.settings { max-width: 820px; }
.st-lead { margin: -0.3rem 0 1rem; font-size: 0.86rem; }
.st-field { margin-top: 0.4rem; }
/* type=email 吃不到站内 input[type=text] 那条通用规则，补一份同样的 */
input[type=email] {
  width: 100%; font-family: inherit; font-size: 16px;
  color: var(--ink); background: var(--input-bg);
  border: 1px solid var(--field-edge); padding: 0.7rem 0.8rem; border-radius: 0;
  transition: border-color 0.2s, background-color 0.25s ease, color 0.25s ease;
}
input[type=email]:focus { outline: none; border-color: var(--gold); }
input[type=email]::placeholder { color: var(--ink-soft); opacity: 0.75; }
.st-check { margin: 0.9rem 0 0.3rem; }
.st-check2 { display: flex; margin-top: 0.2rem; }
.st-resend { display: flex; align-items: flex-end; gap: 0.8rem; margin: 1.2rem 0 0.5rem; flex-wrap: wrap; }
.st-resend .field { flex: 1 1 220px; }
.st-resend .btn-ghost { padding: 0.72rem 1.2rem; }
.st-log td { font-size: 0.8rem; text-align: left !important; vertical-align: top; }
.st-log th { text-align: left !important; }
.st-ok { font-style: normal; font-size: 0.78rem; color: var(--ok); margin-left: 0.4rem; }
.st-verify {
  margin: 1rem 0 0.4rem; padding: 0.8rem 1rem; font-size: 0.86rem; line-height: 1.7;
  border-left: 3px solid var(--gold); background: var(--input-bg);
}
.st-verify .err { margin-top: 0.6rem; }
.st-verify-acts { display: flex; gap: 0.6rem; flex-wrap: wrap; margin-top: 0.7rem; }

/* 设置页页头的「← 返回」（页头常驻深色，字色按深底取） */
.back-link { display: inline-block; margin-bottom: 0.9rem; font-size: 0.82rem; color: var(--gold); text-decoration: none; }
.back-link:hover { text-decoration: underline; }

/* 导航栏上的用户名 = 设置入口 */
.nav-user a { color: inherit; text-decoration: none; }
.nav-user a:hover { opacity: 0.8; text-decoration: underline; }

/* 市场摘要页头里的「邮件订阅」（页头常驻深色，字色按深底取） */
.mail-link { display: inline-block; margin-top: 0.8rem; font-size: 0.82rem; color: var(--gold); text-decoration: none; }
.mail-link:hover { text-decoration: underline; }

/* ── 验证与复盘（/review，2026-09-29 加）── */
main.review { max-width: 1320px; }
.rv-status { margin-top: 0.9rem; font-size: 0.8rem; line-height: 1.7; color: rgba(255,255,255,0.62); }
.rv-status b { color: var(--gold); font-weight: 600; }
/* 页头常驻深色，按钮按深底配色 */
.rv-admin { display: flex; gap: 0.6rem; align-items: center; flex-wrap: wrap; margin-top: 0.9rem; }
.rv-hbtn {
  background: transparent; color: rgba(255,255,255,0.82); border: 1px solid rgba(255,255,255,0.28);
  padding: 0.42rem 0.95rem; font-family: inherit; font-size: 0.78rem; letter-spacing: 0.05em; cursor: pointer;
}
.rv-hbtn:hover { border-color: var(--gold); color: #fff; }
.rv-admin-msg { font-size: 0.78rem; color: var(--gold); }
.rv-empty p { font-size: 0.92rem; }

/* 推测 */
.rv-fc-head { font-size: 1.12rem; font-weight: 600; margin-bottom: 1rem; }
.rv-fc-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.rv-h { border: 1px solid var(--edge); border-left: 4px solid var(--gold); padding: 1rem 1.2rem; background: var(--sunken); }
.rv-h.rv-up { border-left-color: var(--ok); }
.rv-h.rv-down { border-left-color: var(--fail); }
.rv-h.rv-mid { border-left-color: var(--gold); }
.rv-h-top { display: flex; justify-content: space-between; align-items: baseline; gap: 0.6rem; }
.rv-h-name { font-weight: 600; font-size: 0.95rem; }
.rv-h-dir { font-size: 1.5rem; font-weight: 600; margin: 0.35rem 0 0.6rem; }
.rv-h.rv-up .rv-h-dir { color: var(--ok); }
.rv-h.rv-down .rv-h-dir { color: var(--fail); }
.rv-h.rv-mid .rv-h-dir { color: var(--gold); }
.rv-h-dir span { font-size: 0.8rem; font-weight: 400; color: var(--ink-soft); margin-left: 0.6rem; }
.rv-h-view p, .rv-trust p { font-size: 0.9rem; line-height: 1.75; margin: 0 0 0.6rem; }
.rv-h-list { margin-top: 0.4rem; font-size: 0.84rem; }
.rv-h-list b, .rv-trust b, .rv-watch b, .rv-risks b { display: block; font-size: 0.8rem; color: var(--ink-soft); font-weight: 600; margin-bottom: 0.3rem; }
.rv-h-list ul, .rv-watch ul, .rv-risks ul { margin: 0 0 0.5rem; padding-left: 1.1rem; }
.rv-h-list li, .rv-watch li, .rv-risks li { font-size: 0.86rem; line-height: 1.65; margin-bottom: 0.2rem; }
.rv-h-check { margin-top: 0.6rem; padding-top: 0.6rem; border-top: 1px solid var(--rule); font-size: 0.82rem; }
.rv-trust, .rv-watch, .rv-risks { margin-top: 1.1rem; }
.rv-disclaimer { margin-top: 0.8rem; }
.rv-past { margin-top: 1.2rem; }
.rv-past summary { cursor: pointer; font-size: 0.88rem; color: var(--ink-soft); }
.rv-past summary:hover { color: var(--gold); }

/* 命中率卡片 */
.rv-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 0.8rem; margin-bottom: 1.2rem; }
.rv-card {
  display: block; background: var(--surface); border: 1px solid var(--edge); padding: 1rem 1.1rem;
  color: inherit; text-decoration: none; transition: border-color 0.15s;
}
.rv-card:hover { border-color: var(--gold); }
.rv-card-name { font-size: 0.8rem; color: var(--ink-soft); }
.rv-card-big { font-family: 'Playfair Display', serif; font-size: 1.9rem; margin: 0.2rem 0 0.25rem; }
.rv-card-sub { font-size: 0.76rem; color: var(--ink-soft); line-height: 1.55; }

/* 走势图 */
.rv-chart svg { width: 100%; height: 240px; display: block; }
.rv-line { fill: none; stroke: var(--ink-soft); stroke-width: 1.4; vector-effect: non-scaling-stroke; }
.rv-grid { stroke: var(--rule); stroke-width: 1; vector-effect: non-scaling-stroke; }
.rv-ax { fill: var(--ink-soft); font-size: 11px; }
.rv-chart circle { stroke-width: 2; vector-effect: non-scaling-stroke; }
.rv-dot-up { fill: var(--ok); stroke: var(--ok); }
.rv-dot-down { fill: var(--fail); stroke: var(--fail); }
.rv-dot-mid { fill: var(--gold); stroke: var(--gold); }
.rv-dot-flat { fill: var(--ink-soft); stroke: var(--ink-soft); }
.rv-chart circle.rv-dot-miss { fill: var(--bg); }
.rv-chart circle.rv-dot-pend { opacity: 0.45; }
.rv-legend { display: flex; flex-wrap: wrap; gap: 0.4rem 1.1rem; align-items: center; font-size: 0.8rem; margin: 0.5rem 0 0.2rem; }
.rv-dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 0.35rem; vertical-align: 0; }
.rv-dot.rv-up { background: var(--ok); }
.rv-dot.rv-down { background: var(--fail); }
.rv-dot.rv-mid { background: var(--gold); }
.rv-dot.rv-flat { background: var(--ink-soft); }

/* 表格 */
.rv-table { font-size: 0.83rem; }
.rv-table td { vertical-align: top; }
/* 文字列靠左、数字列（.n）靠右；站内 table.metrics 默认除首列外全部靠右，这里改过来 */
.rv-table th, .rv-table td { text-align: left !important; }
.rv-table th.n, .rv-table td.n { text-align: right !important; white-space: nowrap; }
.rv-table td.pos { color: var(--ok); }
.rv-table td.neg { color: var(--fail); }
.rv-table code { font-family: Menlo, Consolas, monospace; font-size: 0.82rem; color: var(--ink); }
.rv-table a { color: var(--ink-soft); text-decoration: none; }
.rv-table a:hover { color: var(--gold); text-decoration: underline; }
.rv-break { max-width: 720px; }
.rv-row { cursor: pointer; }
.rv-detail td { text-align: left !important; background: var(--sunken); font-size: 0.82rem; line-height: 1.7; }
.rv-quote { font-size: 0.78rem; color: var(--ink-soft); margin-top: 0.25rem; line-height: 1.6; }
.rv-more { margin-top: 0.9rem; }
.rv-v { display: inline-block; font-size: 0.74rem; padding: 0.08rem 0.45rem; white-space: nowrap; }
.rv-v-ok { color: var(--ok); background: var(--ok-bg); }
.rv-v-bad { color: var(--fail); background: var(--fail-bg); }
.rv-v-flat { color: var(--warn); background: var(--warn-bg); }
.rv-v-pend { color: var(--ink-soft); border: 1px dashed var(--field-edge); }
.rv-v-na { color: var(--ink-soft); }
.rv-dir { font-weight: 600; }
.rv-dir.rv-up { color: var(--ok); }
.rv-dir.rv-down { color: var(--fail); }
.rv-dir.rv-mid { color: var(--gold); }
.rv-dir.rv-flat { color: var(--ink-soft); }
.rv-filters { display: flex; flex-wrap: wrap; gap: 0.6rem 1.4rem; align-items: center; margin-bottom: 0.4rem; }
.rv-q { width: 9rem; font-family: inherit; font-size: 0.85rem; color: var(--ink); background: var(--input-bg); border: 1px solid var(--field-edge); padding: 0.45rem 0.7rem; }
.rv-q:focus { outline: none; border-color: var(--gold); }
.rv-unknown { margin-top: 0.8rem; }
.rv-method summary { cursor: pointer; font-family: 'Playfair Display', 'Songti SC', serif; font-size: 1.1rem; }
.rv-method-body { margin-top: 1rem; }
.rv-method-body p { font-size: 0.86rem; line-height: 1.8; margin: 0 0 0.7rem; }

@media (max-width: 900px) {
  .rv-fc-grid { grid-template-columns: 1fr; }
  .rv-table { display: block; overflow-x: auto; }
}
/* 窄屏：标题和右侧说明挤不下时换行，别把标题折成两截 */
main.review .section-title { flex-wrap: wrap; row-gap: 0.3rem; }
#fcTitle { white-space: nowrap; }

/* 验证与复盘 v2：板块轮动、板块观点、持仓档案（2026-09-29） */
span.rv-up, b.rv-up { color: var(--ok); }
span.rv-down, b.rv-down { color: var(--fail); }
span.rv-mid, b.rv-mid { color: var(--gold); }
span.rv-flat, b.rv-flat { color: var(--ink-soft); }
.rv-sec { border-bottom: 1px dotted var(--field-edge); cursor: help; white-space: nowrap; }
.rv-sub-title { font-size: 0.9rem; font-weight: 600; margin: 1.6rem 0 0.2rem; }
.rv-wide { min-width: 16rem; }
.rv-mk { font-size: 0.88rem; line-height: 1.7; margin-bottom: 1rem; padding: 0.6rem 0.9rem; background: var(--sunken); border: 1px solid var(--edge); }
.rv-picks { margin-top: 0.7rem; }
.rv-picks b { display: block; font-size: 0.82rem; margin-bottom: 0.3rem; }
.rv-picks ul { margin: 0; padding-left: 1.1rem; }
.rv-picks li { font-size: 0.88rem; line-height: 1.6; margin-bottom: 0.45rem; }
.rv-pick-why { font-size: 0.82rem; color: var(--ink-soft); line-height: 1.6; }
.rv-hold-notes { margin-top: 1.1rem; }
.rv-hold-notes b { display: block; font-size: 0.8rem; color: var(--ink-soft); font-weight: 600; margin-bottom: 0.3rem; }
.rv-hold-notes ul { margin: 0; padding-left: 1.1rem; }
.rv-hold-notes li { font-size: 0.86rem; line-height: 1.65; margin-bottom: 0.35rem; }
.rv-call { display: inline-block; font-size: 0.74rem; padding: 0.05rem 0.45rem; white-space: nowrap; background: var(--hover); }
.rv-call.rv-up { color: var(--ok); background: var(--ok-bg); }
.rv-call.rv-down { color: var(--fail); background: var(--fail-bg); }
.rv-call.rv-mid { color: var(--warn); background: var(--warn-bg); }

/* 热力图：一行一个板块，一列一周；板块名那列横向滚动时钉住 */
.rv-heat-wrap { overflow-x: auto; margin-top: 0.4rem; }
.rv-heat { border-collapse: separate; border-spacing: 2px; font-size: 0.72rem; }
.rv-heat th { font-weight: 400; color: var(--ink-soft); padding: 0 0 0.2rem; min-width: 1.6rem; text-align: center; line-height: 1.2; }
.rv-heat th div { font-size: 0.66rem; }
.rv-heat td { width: 1.6rem; height: 1.35rem; text-align: center; color: var(--ink); background: var(--hover); font-size: 0.66rem; line-height: 1; }
.rv-heat .rv-heat-name { position: sticky; left: 0; background: var(--surface-solid); text-align: left; padding-right: 0.6rem; white-space: nowrap; font-size: 0.8rem; min-width: 8.5rem; z-index: 1; }
.rv-heat-sep td { background: none; text-align: left; color: var(--ink-soft); font-size: 0.72rem; padding-top: 0.6rem; }
.rv-months td { vertical-align: top; }
.rv-lead { font-size: 0.82rem; line-height: 1.5; margin-bottom: 0.3rem; white-space: nowrap; }
.rv-lead b.pos { color: var(--ok); }
.rv-lead b.neg { color: var(--fail); }

/* 持仓档案 */
.rv-hchart { width: 100%; height: 200px; display: block; margin-top: 0.4rem; }
.rv-line-strong { stroke: var(--gold); stroke-width: 1.8; }
.rv-bline { fill: none; stroke: var(--ink-soft); stroke-width: 1.2; stroke-dasharray: 4 3; vector-effect: non-scaling-stroke; }
.rv-entry { stroke: var(--field-edge); stroke-width: 1; stroke-dasharray: 2 3; vector-effect: non-scaling-stroke; }
.rv-hchart circle { stroke-width: 2; vector-effect: non-scaling-stroke; stroke: var(--surface-solid); }
.rv-mk-up { fill: var(--ok); }
.rv-mk-down { fill: var(--fail); }
.rv-mk-mid { fill: var(--gold); }
.rv-mk-flat { fill: var(--ink-soft); }
.rv-swatch { display: inline-block; width: 14px; height: 0; border-top: 2px solid; margin-right: 0.35rem; vertical-align: middle; }
.rv-swatch-px { border-color: var(--gold); }
.rv-swatch-bx { border-color: var(--ink-soft); border-top-style: dashed; }
.rv-timeline { margin: 0.8rem 0 0.2rem; padding-left: 0; list-style: none; }
.rv-timeline li { font-size: 0.82rem; line-height: 1.65; padding: 0.3rem 0; border-top: 1px solid var(--rule); }
.rv-tl-date { display: inline-block; width: 6.2rem; color: var(--ink-soft); font-family: Menlo, Consolas, monospace; font-size: 0.76rem; }
.rv-table td:first-child, .rv-holds td:nth-child(3), .rv-holds td:nth-child(4) { white-space: nowrap; }

.rv-hold-note { margin: 0.3rem 0 0; }
.rv-holds th, .rv-holds td { padding-left: 0.6rem; padding-right: 0.6rem; }
.rv-hname { max-width: 11rem; white-space: normal; line-height: 1.35; margin-top: 0.1rem; }
.rv-table th { white-space: nowrap; }

/* 热力图图例：色阶 + 符号 */
.rv-heat-legend { margin: 0.2rem 0 0.8rem; }
.rv-hl-row { display: flex; flex-wrap: wrap; align-items: center; gap: 0.35rem 0.9rem; font-size: 0.76rem; color: var(--ink-soft); margin-bottom: 0.35rem; }
.rv-hl-name { font-weight: 600; color: var(--ink); min-width: 2.2rem; }
.rv-hl-item { display: inline-flex; align-items: center; gap: 0.3rem; white-space: nowrap; }
.rv-hl-item b { color: var(--ink); font-weight: 400; }
.rv-hl-cell { display: inline-block; width: 1.6rem; height: 0.95rem; }
.rv-hl-none { background: var(--hover); border: 1px solid var(--edge); }
.rv-hl-sub { color: var(--ink-soft); min-width: 9.5rem; }
.rv-hl-item b { display: inline-block; width: 0.9rem; text-align: center; }
@media (max-width: 600px) {
  .rv-hl-sub { flex-basis: 100%; min-width: 0; }
  .rv-hl-name:empty { display: none; }
}
.rv-status a.rv-raw { color: var(--gold); margin-right: 0.4rem; }

/* 热力图色带：和 heatColor 同一套颜色（-8% 到 +8% 线性，0 两侧最浅），刻度按比例排在下面 */
.rv-hl-scale { position: relative; display: inline-block; flex: 0 1 360px; min-width: 220px; height: 2.1rem; }
.rv-hl-bar { position: absolute; left: 0; right: 0; top: 0; height: 0.95rem; background-color: var(--surface); }
.rv-hl-zero { position: absolute; left: 50%; top: -2px; bottom: -2px; width: 1px; background: var(--ink-soft); }
.rv-hl-ticks span { position: absolute; top: 1.1rem; transform: translateX(-50%); font-size: 0.68rem; color: var(--ink-soft); white-space: nowrap; }
.rv-hl-ticks .rv-hl-t-l { transform: none; }
.rv-hl-ticks .rv-hl-t-r { transform: translateX(-100%); }
.rv-hl-end { font-size: 0.76rem; }
@media (max-width: 600px) {
  .rv-hl-end { display: none; }       /* 窄屏：刻度带正负号，够看了 */
  .rv-hl-scale { flex: 1 1 100%; }
}

/* 复盘周报：验证结论、我们的推演、标的 */
.rv-part { margin-top: 1.3rem; }
.rv-part-title { font-size: 0.98rem; font-weight: 600; margin-bottom: 0.6rem; padding-bottom: 0.35rem; border-bottom: 1px solid var(--rule); }
.rv-findings { margin: 0; padding-left: 1.3rem; }
.rv-findings li { font-size: 0.9rem; line-height: 1.7; margin-bottom: 0.7rem; }
.rv-findings li b { margin-left: 0.3rem; }
.rv-finding-detail { font-size: 0.85rem; color: var(--ink-soft); line-height: 1.7; }
.rv-picks td { font-size: 0.84rem; }
.rv-picks td:nth-child(3), .rv-picks td:nth-child(4), .rv-picks td:nth-child(7) { white-space: nowrap; }

/* ── 验证与复盘：选项卡与栏目收起 ── */
.rv-tabs {
  position: sticky; top: 0; z-index: 6; background: var(--bg);
  display: flex; justify-content: space-between; align-items: flex-end; gap: 0.6rem 1rem; flex-wrap: wrap;
  border-bottom: 1px solid var(--rule); margin: -0.6rem 0 1.2rem; padding-top: 0.5rem;
}
.rv-tab-list { display: flex; overflow-x: auto; scrollbar-width: none; }
.rv-tab-list::-webkit-scrollbar { display: none; }
.rv-tab-list button {
  background: none; border: 0; border-bottom: 2px solid transparent; margin-bottom: -1px;
  padding: 0.6rem 1rem; font-family: inherit; font-size: 0.95rem; color: var(--ink-soft); cursor: pointer; white-space: nowrap;
}
.rv-tab-list button:hover { color: var(--ink); }
.rv-tab-list button.on { color: var(--ink); font-weight: 600; border-bottom-color: var(--gold); }
.rv-foldall { display: flex; gap: 0.4rem; padding-bottom: 0.45rem; }
.rv-foldall button {
  background: none; border: 1px solid var(--field-edge); color: var(--ink-soft); font-family: inherit;
  font-size: 0.74rem; padding: 0.25rem 0.6rem; cursor: pointer;
}
.rv-foldall button:hover { border-color: var(--gold); color: var(--ink); }
.rv-pane.rv-off { display: none; }

/* 可收起的栏目：标题前一个三角，收起后只留标题 */
[data-fold] > .section-title, [data-fold] > .rv-sub-title, [data-fold] > .rv-part-title { cursor: pointer; user-select: none; }
.panel[data-fold] > .section-title { justify-content: flex-start; }
.panel[data-fold] > .section-title > .hint { margin-left: auto; }
[data-fold] > .section-title::before, [data-fold] > .rv-sub-title::before, [data-fold] > .rv-part-title::before {
  content: '▾'; display: inline-block; width: 1.1em; flex: none; color: var(--ink-soft); font-size: 0.85em; transition: transform 0.15s;
}
.rv-folded > .section-title::before, .rv-folded > .rv-sub-title::before, .rv-folded > .rv-part-title::before { transform: rotate(-90deg); }
.panel.rv-folded > :not(.section-title), .rv-sub.rv-folded > :not(.rv-sub-title), .rv-part.rv-folded > :not(.rv-part-title) { display: none !important; }
.panel.rv-folded > .section-title { border-bottom: 0; margin-bottom: 0; padding-bottom: 0; }
.section-title + .rv-sub > .rv-sub-title { margin-top: 0.3rem; }
.rv-sub { border-top: 1px solid var(--rule); margin-top: 1rem; padding-top: 0.2rem; }
.section-title + .rv-sub { border-top: 0; margin-top: 0; }
.rv-sub-title { padding: 0.4rem 0; }
.rv-part.rv-folded { margin-bottom: 0.2rem; }
.rv-hold-notes, .rv-risks { margin-top: 0; }

/* ── 验证与复盘：选项卡栏修正（2026-09-29）──
   原来 .rv-tab-list 设了 overflow-x:auto，另一个方向就自动变成 auto；选中项的下划线又用 margin-bottom:-1px
   往下压了 1 像素，内容比容器高，结果鼠标滚轮能让这一排上下挪。改成：下划线用内阴影画（不占位置），
   横向滚动只在窄屏开，且明确禁止纵向滚动。 */
.rv-tab-list { overflow: visible; }
.rv-tab-list button { margin-bottom: 0; border-bottom: 0; }
.rv-tab-list button.on { box-shadow: inset 0 -2px 0 var(--gold); }
@media (max-width: 700px) {
  .rv-tab-list { overflow-x: auto; overflow-y: hidden; }
}

/* 分了选项卡，每一页就是容器：里面的栏目不再各自带框和底色，只靠标题下的分隔线分开（不要框套框） */
.rv-pane > .panel { background: none; border: 0; padding: 0; margin-bottom: 2.4rem; }
.rv-pane > .panel.rv-folded { padding: 0; margin-bottom: 1.2rem; }
.rv-pane > .panel > .section-title { font-size: 1.2rem; }
/* 周报里的短期 / 中期：只留左边一条竖线；大盘背景就是一行字 */
.rv-pane .rv-h { border: 0; border-left: 3px solid var(--gold); background: none; padding: 0.1rem 0 0.1rem 1rem; }
.rv-pane .rv-mk { border: 0; background: none; padding: 0; }
.rv-pane .rv-fc-grid { gap: 1.6rem; }

/* 热力图配色：站内的涨跌色，从接近页面底色的中性色往两端调（review.js 的 heatMix 用 oklab 混） */
:root { --heat-up: #5fae80; --heat-dn: #d9705f; --heat-0: #1b2838; }
:root.day-mode { --heat-up: #2f7d4f; --heat-dn: #a4211b; --heat-0: #efe9df; }
.rv-heat td { background: transparent; box-shadow: inset 0 0 0 1px var(--rule); color: var(--ink); } /* 没有行情：空格子 */
.rv-heat td[style] { box-shadow: none; }
.rv-heat td.rv-hot { color: #fff; }
:root:not(.day-mode) .rv-heat td.rv-hot { color: var(--dark); }
.rv-heat .rv-heat-name { background: var(--bg); }
.rv-heat th { background: var(--bg); }
.rv-hl-none { background: transparent; border: 0; box-shadow: inset 0 0 0 1px var(--rule); }
.rv-heat-sep td { box-shadow: none; }
.rv-heat td.rv-heat-name { box-shadow: none; }

/* 热力图图例：放进一个细框，「颜色」「符号」两栏对齐；两行符号按列对齐（看好对看多、看淡对看空……） */
.rv-heat-legend { margin: 0.3rem 0 1rem; }
.rv-hl-box {
  display: inline-grid; grid-template-columns: auto auto; gap: 0.7rem 1rem; align-items: start;
  border: 1px solid var(--edge); padding: 0.8rem 1.1rem 0.7rem; max-width: 100%;
}
.rv-hl-box .rv-hl-name { font-size: 0.78rem; font-weight: 600; color: var(--ink); min-width: 0; line-height: 1.2rem; }
.rv-hl-line { display: flex; align-items: flex-start; gap: 0.3rem 0.8rem; flex-wrap: wrap; font-size: 0.76rem; color: var(--ink-soft); }
.rv-hl-line .rv-hl-end { line-height: 1rem; }
.rv-hl-nodata { margin-left: 0.6rem; line-height: 1rem; }
.rv-hl-syms { display: grid; grid-template-columns: auto repeat(4, auto); gap: 0.4rem 1.1rem; align-items: center; font-size: 0.76rem; color: var(--ink-soft); }
.rv-hl-syms .rv-hl-sub { min-width: 0; margin-right: 0.4rem; }
.rv-hl-syms .rv-hl-item { white-space: nowrap; }
@media (max-width: 600px) {
  .rv-hl-box { grid-template-columns: 1fr; gap: 0.4rem; }
  .rv-hl-syms { grid-template-columns: repeat(2, auto); }
  .rv-hl-syms .rv-hl-sub { grid-column: 1 / -1; }
}

/* 热力图表头：月份一行（横跨、下面一条线标出范围），日期一行（每格一样高） */
.rv-heat thead th { font-weight: 400; color: var(--ink-soft); padding: 0; line-height: 1.3; }
.rv-heat .rv-heat-mrow th.rv-heat-month {
  text-align: left; font-size: 0.72rem; color: var(--ink); padding: 0 0 0.15rem 0.15rem;
  border-bottom: 1px solid var(--field-edge);
}
.rv-heat .rv-heat-drow th { font-size: 0.68rem; padding: 0.2rem 0 0.25rem; min-width: 1.6rem; }
.rv-heat thead th.rv-heat-name { vertical-align: bottom; padding-bottom: 0.25rem; font-size: 0.8rem; }
@media (min-width: 701px) {
  .rv-hl-line { flex-wrap: nowrap; }
  .rv-hl-line .rv-hl-scale { flex: 0 0 340px; }
}

/* ── 验证与复盘：表格隔行变色（2026-09-29）──
   面板去掉底色以后，表格行是透明的、和页面底色一样，看不出是张表。两种行色交替，都和页面底色不同；
   个股、持仓表里每行后面藏着一行详情，所以只按看得见的数据行数单双（:nth-child(… of …)），
   不然看得见的行会全是同一种颜色。旧浏览器不认这个写法，就全是第一种行色，也不会和底色混。 */
:root { --row-a: rgba(255,255,255,0.035); --row-b: rgba(255,255,255,0.075); --row-hover: rgba(184,145,47,0.14); --row-detail: rgba(255,255,255,0.11); }
:root.day-mode { --row-a: #ffffff; --row-b: #f2ece2; --row-hover: #ece0c6; --row-detail: #e9e2d5; }
main.review .rv-table tbody tr:not(.rv-detail) { background: var(--row-a); }
main.review .rv-table tbody tr:nth-child(even of :not(.rv-detail)) { background: var(--row-b); }
main.review .rv-table tbody tr:not(.rv-detail):hover td { background: var(--row-hover); }
main.review .rv-table tbody tr.rv-detail td { background: var(--row-detail); }
main.review .rv-table td { border-bottom-color: transparent; }

/* 市场摘要：某天内容不全的标记（2026-09-30 加：旧群被封那天只收到两条消息） */
.day-note {
  margin: 0 0 1.2rem; padding: 0.75rem 1rem; font-size: 0.9rem; line-height: 1.7;
  color: var(--ink); background: var(--warn-bg); border-left: 3px solid var(--warn);
}
.day-note b { color: var(--warn); margin-right: 0.6rem; }
.cnote { color: var(--warn); font-weight: 600; margin-right: 0.35rem; }
#docHead { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.note-btn { flex: none; }
#docHead .doc-title { flex: 1 1 auto; }
