/* ============================================================
   每日咨询 · 视觉重设计
   设计语言：克制的编辑感 + 玻璃拟态 + 柔和渐变
   ============================================================ */
:root {
  --bg:           #f4f5f9;
  --surface:      #ffffff;
  --ink:          #181c28;
  --ink-soft:     #5a6172;
  --ink-faint:    #8b91a3;
  --line:         #e9ebf2;
  --accent:       #2e9e6b;
  --accent-2:     #56b98a;
  --accent-3:     #9ccc65;
  --gold:         #c8954a;
  --radius:       16px;
  --radius-lg:    28px;
  --shadow-sm:    0 1px 3px rgba(20,22,45,.06);
  --shadow-md:    0 12px 34px rgba(40,42,95,.10);
  --shadow-lg:    0 24px 60px rgba(40,42,95,.20);
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI",
          "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei",
          "Source Han Sans SC", sans-serif;
  --serif: "Georgia", "Songti SC", "Noto Serif SC", serif;
}

* { box-sizing: border-box; }
html, body { background: var(--bg); }
body {
  font-family: var(--font);
  color: var(--ink);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* 滚动条 */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: #c9ccd9; border-radius: 99px; border: 2px solid var(--bg);
}
::-webkit-scrollbar-thumb:hover { background: #aeb2c4; }

/* ============ 顶栏：玻璃拟态 ============ */
.app-bar {
  background: rgba(255,255,255,.72) !important;
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--line);
  box-shadow: none !important;
  padding: 0 22px !important;
}
.app-name { display: flex; align-items: center; }
.app-name .app-name-link {
  color: var(--ink) !important;
  font-weight: 800;
  letter-spacing: .4px;
  font-size: 1.02rem;
}
.brand-mark {
  display: inline-flex; align-items: center; justify-content: center;
  width: 28px; height: 28px; border-radius: 9px; margin-right: 10px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff; font-size: 14px; font-weight: 800;
  box-shadow: 0 4px 14px rgba(91,84,230,.40);
  transform: translateY(1px);
}
.app-nav { display: flex; align-items: center; gap: 4px; }
.app-nav li { margin: 0 !important; }
.app-nav li a {
  color: var(--ink-soft) !important; font-weight: 600; font-size: .9rem;
  padding: 6px 12px; border-radius: 9px; transition: all .15s;
}
.app-nav li a:hover { background: #f0f1f8; color: var(--accent) !important; }

/* ============ 侧边栏 ============ */
.sidebar {
  background: var(--surface);
  border-right: 1px solid var(--line);
}
.sidebar::-webkit-scrollbar { width: 8px; }
.sidebar-nav { padding: 20px 14px; }
.sidebar-nav > p,
.sidebar-nav > h1,
.sidebar-nav > .app-sidebar-title {
  font-size: .72rem; font-weight: 800; letter-spacing: 2px;
  text-transform: uppercase; color: var(--ink-faint);
  margin: 4px 12px 14px;
}
.sidebar-nav ul { padding: 0; }
.sidebar-nav li { margin: 1px 0; list-style: none; }
.sidebar-nav li > a {
  position: relative; display: block;
  padding: 8px 13px; border-radius: 10px;
  color: var(--ink-soft); font-size: .92rem; font-weight: 500;
  text-decoration: none; transition: all .16s ease;
}
.sidebar-nav li > a:hover { background: #f1f2fb; color: var(--accent); }
/* 一级：日期 */
.sidebar-nav > ul > li > a {
  font-weight: 800; color: var(--ink); font-size: .96rem;
  letter-spacing: .3px; padding-left: 13px;
}
.sidebar-nav > ul > li > a::before {
  content: ""; display: inline-block; width: 7px; height: 7px;
  border-radius: 50%; margin-right: 9px; vertical-align: middle;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  transform: translateY(-1px);
}
/* 二级：分类 */
.sidebar-nav > ul > li > ul > li > a {
  font-weight: 500; color: var(--ink-soft); font-size: .9rem;
  padding-left: 30px;
}
.sidebar-nav > ul > li > ul > li > a::before {
  content: ""; position: absolute; left: 19px; top: 50%;
  width: 5px; height: 5px; border-radius: 50%;
  background: #c7cbd9; transform: translateY(-50%); transition: all .16s;
}
.sidebar-nav > ul > li > ul > li > a:hover::before { background: var(--accent); }
.sidebar-nav li.active > a {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff !important; box-shadow: 0 6px 18px rgba(91,84,230,.30);
}
.sidebar-nav li.active > a::before { background: #fff !important; }

/* ============ 正文排版 ============ */
.markdown-section {
  max-width: 880px;
  margin: 0 auto;
  padding: 42px 30px 90px;
  font-family: var(--font);
  line-height: 1.9;
  color: #34394a;
}
.markdown-section h1 {
  font-size: 1.95rem; font-weight: 800; color: var(--ink);
  letter-spacing: .2px; margin: 0 0 .6em;
}
.markdown-section h2 {
  font-size: 1.32rem; font-weight: 700; color: var(--ink);
  margin: 2em 0 .7em; padding-left: 14px; position: relative;
}
.markdown-section h2::before {
  content: ""; position: absolute; left: 0; top: .18em; bottom: .18em;
  width: 4px; border-radius: 99px;
  background: linear-gradient(180deg, var(--accent), var(--accent-2));
}
.markdown-section h3 { font-size: 1.08rem; font-weight: 700; color: var(--ink); margin: 1.4em 0 .5em; }
.markdown-section p, .markdown-section li { color: #3a3f50; }
.markdown-section a { color: var(--accent); text-decoration: none; border-bottom: 1px solid transparent; transition: border-color .15s; }
.markdown-section a:hover { border-bottom-color: var(--accent); }
.markdown-section blockquote {
  margin: 1.2em 0; padding: 14px 20px;
  border-left: 4px solid var(--accent);
  background: linear-gradient(90deg, #f3f2ff, #faf9ff);
  border-radius: 0 12px 12px 0; color: #4b5066;
}
.markdown-section code {
  background: #eef0f7; border-radius: 6px; padding: 2px 7px;
  font-size: .88em; color: #5b54e6; font-family: "SFMono-Regular", Consolas, monospace;
}
.markdown-section pre {
  border-radius: 12px; padding: 18px 20px; background: #1d2030;
  box-shadow: var(--shadow-sm); border: 1px solid #2a2e42;
}
.markdown-section pre code { background: none; color: #e6e8f2; padding: 0; }
.markdown-section table {
  width: 100%; border-collapse: separate; border-spacing: 0;
  margin: 1.4em 0; overflow: hidden; border-radius: 12px;
  box-shadow: var(--shadow-sm); border: 1px solid var(--line);
}
.markdown-section th, .markdown-section td { padding: 11px 15px; border-bottom: 1px solid var(--line); }
.markdown-section th { background: #f6f7fc; font-weight: 700; color: var(--ink); text-align: left; }
.markdown-section tr:last-child td { border-bottom: none; }
.markdown-section tr:hover td { background: #fafbff; }
.markdown-section img { border-radius: 12px; box-shadow: var(--shadow-sm); }

/* ============ 全幅 Hero 封面（浅绿） ============ */
.cover {
  width: 100%;
  margin: 0 0 18px;
  min-height: 30vh;
  display: flex !important; align-items: center; justify-content: center;
  position: relative; overflow: hidden;
  color: #163a2b;
  border-radius: var(--radius-lg);
  background:
    radial-gradient(900px 520px at 10% 12%, rgba(120,200,150,.55), transparent 60%),
    radial-gradient(820px 520px at 90% 88%, rgba(70,180,130,.50), transparent 60%),
    linear-gradient(135deg, #d8f3e3 0%, #b7e8cf 50%, #9fdcbf 100%);
}
/* 光点纹理 */
.cover::before {
  content: ""; position: absolute; inset: 0; z-index: 0;
  background-image: radial-gradient(rgba(46,158,107,.12) 1px, transparent 1px);
  background-size: 26px 26px; opacity: .6;
}
/* 柔光晕 */
.cover::after {
  content: ""; position: absolute; width: 560px; height: 560px; z-index: 0;
  top: -180px; right: -140px; border-radius: 50%;
  background: radial-gradient(circle, rgba(255,255,255,.55), transparent 70%);
  filter: blur(6px);
}
.cover .cover-main {
  position: relative; z-index: 2; text-align: center;
  padding: 0 26px; max-width: 740px;
}
.cover .eyebrow {
  display: inline-block; font-size: .74rem; font-weight: 700;
  letter-spacing: 4px; text-transform: uppercase;
  color: #1f7a52; margin-bottom: 18px;
  padding: 6px 16px; border: 1px solid rgba(46,158,107,.35);
  border-radius: 99px; background: rgba(255,255,255,.40);
  backdrop-filter: blur(4px);
}
.cover .cover-main h1 {
  font-size: clamp(2.3rem, 5.4vw, 3.7rem); font-weight: 800;
  letter-spacing: 3px; margin: 0 0 .35em; line-height: 1.15;
  color: #143a29; text-shadow: 0 2px 20px rgba(255,255,255,.45);
}
.cover .cover-main .subtitle {
  font-size: clamp(1rem, 2.2vw, 1.22rem); font-weight: 600;
  color: #1f5d44; margin: .2em 0;
}
.cover .cover-main .lead {
  font-size: 1rem; color: #2f6b52; margin: .6em 0 0;
}
.cover .cover-main .enter-forecast-btn {
  display: inline-block; margin-top: 2em; padding: 14px 38px;
  background: #1f7a52; color: #fff !important;
  border: 1px solid #1f7a52; border-radius: 999px;
  font-weight: 700; font-size: 1rem; text-decoration: none;
  box-shadow: 0 10px 26px rgba(31,122,82,.30);
  transition: all .2s ease;
}
.cover .cover-main .enter-forecast-btn:hover {
  background: #163a2b; border-color: #163a2b;
  transform: translateY(-3px); box-shadow: 0 16px 38px rgba(31,122,82,.36);
}
.cover .cover-meta {
  display: flex; gap: 18px; justify-content: center; flex-wrap: wrap;
  margin-top: 2em; font-size: .85rem; color: #1f5d44;
}
.cover .cover-meta span {
  padding: 6px 14px; border-radius: 99px;
  background: rgba(255,255,255,.55); border: 1px solid rgba(46,158,107,.30);
  backdrop-filter: blur(4px); color: #1f5d44;
}
.cover .cover-meta a.contact-link {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 6px 14px; border-radius: 99px; text-decoration: none;
  background: var(--accent); border: 1px solid var(--accent);
  color: #fff; font-weight: 600;
  box-shadow: 0 6px 18px rgba(31,122,82,.28);
  transition: transform .2s ease, background .2s ease, box-shadow .2s ease;
}
.cover .cover-meta a.contact-link:hover {
  background: #163a2b; border-color: #163a2b;
  transform: translateY(-2px); box-shadow: 0 10px 26px rgba(31,122,82,.34);
}

/* ============ 页脚（联系我们） ============ */
.site-footer {
  margin-top: 48px; padding: 22px 14px 8px;
  border-top: 1px solid var(--line);
  text-align: center; font-size: .85rem; color: var(--ink-faint);
}
.site-footer a { color: var(--accent); text-decoration: none; font-weight: 600; }
.site-footer a:hover { text-decoration: underline; }

/* ============ 快速入口卡片 ============ */
.markdown-section h2 + .archive-grid { margin-top: 22px; }
.markdown-section .archive-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(232px, 1fr));
  gap: 18px; margin: 10px 0 0;
}
.markdown-section .archive-card {
  position: relative; display: flex; align-items: center; gap: 13px;
  padding: 14px 20px;
  border-radius: var(--radius); background: var(--surface);
  border: 1px solid var(--line); text-decoration: none;
  box-shadow: var(--shadow-sm); overflow: hidden;
  transition: transform .22s ease, box-shadow .22s ease, border-color .22s;
}
.markdown-section .archive-card::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2), var(--accent-3));
  transform: scaleX(0); transform-origin: left; transition: transform .28s ease;
}
.markdown-section .archive-card:hover {
  transform: translateY(-3px); border-color: transparent;
  box-shadow: var(--shadow-lg);
}
.markdown-section .archive-card:hover::before { transform: scaleX(1); }
.markdown-section .archive-card .cat-icon {
  flex: 0 0 auto;
  display: inline-flex; align-items: center; justify-content: center;
  width: 38px; height: 38px; border-radius: 12px;
  font-size: 1.25rem; line-height: 1;
  background: linear-gradient(135deg, rgba(46,158,107,.12), rgba(86,185,138,.18));
  border: 1px solid rgba(46,158,107,.18);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.6);
}
.markdown-section .archive-card .cat {
  flex: 1 1 auto; min-width: 0;
  display: inline-block; padding: 4px 11px;
  font-size: .9rem; font-weight: 600; color: var(--accent);
  background: #f1f0ff; border-radius: 99px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.markdown-section .archive-card .arrow {
  flex: 0 0 auto; margin-left: auto; color: var(--ink-faint);
  font-size: 1.1rem; transition: transform .2s, color .2s;
}
.markdown-section .archive-card:hover .arrow { color: var(--accent); transform: translateX(4px); }

/* ============ 要闻资讯（首页） ============ */
.markdown-section .news-title { margin-top: 2.4em; }
.markdown-section .news-list {
  margin: 14px 0 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  padding: 6px 6px;
  list-style: none;
}
.markdown-section .news-list li {
  position: relative; padding: 11px 14px 11px 24px;
  border-bottom: 1px solid var(--line);
  font-size: .94rem; line-height: 1.7; color: #3a3f50;
}
.markdown-section .news-list li:last-child { border-bottom: none; }
.markdown-section .news-list li::before {
  content: ""; position: absolute; left: 9px; top: 19px;
  width: 6px; height: 6px; border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
}
.markdown-section .news-list li a { color: var(--accent); }
.markdown-section .news-more { margin-top: 14px; }
.markdown-section .news-more a {
  display: inline-block; font-weight: 600; color: var(--accent);
  text-decoration: none; border-bottom: 1px solid transparent;
}
.markdown-section .news-more a:hover { border-bottom-color: var(--accent); }
.markdown-section .news-more p { color: var(--ink-faint); margin: 0; }
/* 要闻资讯标题旁的日期标记 */
.markdown-section .news-title .news-date {
  font-size: .58em; font-weight: 500; color: var(--ink-faint);
  margin-left: 10px; padding: 2px 9px; border: 1px solid var(--line);
  border-radius: 999px; vertical-align: middle; letter-spacing: .4px;
  background: var(--surface);
}

/* ============ 预测页：渲染前先隐藏原始 JSON 代码块，避免刷新闪现黑底 ============ */
/* 原始代码块由 JS 渲染成图表，绘制前先用 CSS 隐藏，消除“黑底数据→图表”的闪烁 */
.markdown-section pre:has(> code.lang-stock-forecast) { display: none; }
/* 紧随预测代码块的市场小标题（## 美股 等）一并先隐藏，由图表区标题替代 */
.markdown-section h2:has(+ pre > code.lang-stock-forecast) { display: none; }

/* ============ 封面现在是 home.md 顶部的一段横幅（不再用 docsify 独立封面浮层） ============ */
/* 因此“左侧栏 + 右栏(封面横幅 / 要闻 / 今日完整咨询)”由 docsify 默认两列布局自然实现，
   无需任何 fixed 覆盖或 main.hidden 处理。封面横幅的具体样式见上方“.cover”规则。 */

/* ============ 移动端 ============ */
@media (max-width: 768px) {
  .markdown-section { padding: 26px 18px 70px; }
  /* 封面横幅在移动端与正文一起全宽显示；侧边栏默认收起，点汉堡以抽屉形式滑出（docsify 默认）。 */
  .cover { min-height: 24vh; }
  .cover .cover-meta { gap: 10px; }
  .markdown-section .archive-grid { grid-template-columns: 1fr 1fr; }

  /* 顶栏给汉堡按钮让位 */
  .app-bar { padding-left: 64px !important; }

  /* 汉堡按钮：明显可见、可点（修正 docsify 默认透明小按钮被压住的问题） */
  .sidebar-toggle {
    position: fixed !important;
    top: 9px !important;
    left: 10px !important;
    bottom: auto !important;
    z-index: 101 !important;
    width: auto !important;
    padding: 9px 11px !important;
    background: #fff !important;
    border: 1px solid var(--line);
    border-radius: 10px;
    box-shadow: 0 4px 14px rgba(0,0,0,.12);
    display: block !important;
  }
  .sidebar-toggle span {
    background-color: var(--accent) !important;
    width: 18px; height: 2px; margin: 0 auto 3px;
  }
  .sidebar-toggle span:last-child { margin-bottom: 0; }

  /* 抽屉展开时：实底 + 阴影，盖在内容/封面之上 */
  .sidebar {
    z-index: 100 !important;
    background: var(--surface) !important;
    box-shadow: 4px 0 24px rgba(0,0,0,.18);
  }
}
