/* ============================================================
   FinCase 财务分析案例库 — 统一样式表
   设计语言借鉴 qwenwork.cn：暖米白底、品牌绿、深墨字、模块化卡片
   ============================================================ */

:root {
  /* 基础色板 */
  --ink: #191c1a;            /* 主文字：深墨 */
  --ink-soft: #4a514c;       /* 次级文字 */
  --ink-faint: #7d847e;      /* 弱化文字 */
  --cream: #f2efe8;          /* 页面背景：暖米白 */
  --cream-deep: #e9e5da;     /* 深一档米白（分区底） */
  --card: #ffffff;           /* 卡片底 */
  --line: #e2ded3;           /* 边框线 */

  /* 品牌色 */
  --green: #20ad68;          /* 品牌绿（主色） */
  --green-bright: #2fd978;   /* 亮绿（点缀/图标） */
  --green-deep: #16341f;     /* 深墨绿（头部背景） */
  --green-mist: #e7f6ee;     /* 浅绿底（标签/提示块） */

  /* 辅助色 */
  --purple: #866ad4;         /* 紫（次级标签） */
  --purple-mist: #efebfa;
  --orange: #ff7452;         /* 橙（警示/偿债类） */
  --orange-mist: #fff0eb;
  --gold: #d8fa40;           /* 荧光黄绿（深底上的强调） */
  --blue: #2878ff;           /* 蓝（链接） */

  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(25,28,26,.04), 0 8px 24px -12px rgba(25,28,26,.10);
}

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

html { scroll-behavior: smooth; }

body {
  font-family: "PingFang SC", "Microsoft YaHei", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  background: var(--cream);
  color: var(--ink);
  line-height: 1.75;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ---------- 顶部导航 ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(242,239,232,.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.nav-inner {
  max-width: 1080px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 24px;
}
.brand {
  display: flex; align-items: center; gap: 10px;
  font-weight: 700; font-size: 18px; color: var(--ink);
}
.brand:hover { text-decoration: none; }
.brand-dot {
  width: 26px; height: 26px; border-radius: 8px;
  background: linear-gradient(135deg, var(--green-bright), var(--green));
  display: inline-flex; align-items: center; justify-content: center;
  color: #fff; font-size: 14px; font-weight: 800;
}
.nav-links { display: flex; gap: 22px; font-size: 14px; }
.nav-links a { color: var(--ink-soft); }
.nav-links a:hover { color: var(--green); text-decoration: none; }

/* ---------- 首页 Hero ---------- */
.hero {
  background:
    radial-gradient(600px 300px at 85% -20%, rgba(47,217,120,.22), transparent 70%),
    radial-gradient(500px 260px at 5% 110%, rgba(134,106,212,.14), transparent 70%),
    var(--green-deep);
  color: #f4f6f3;
  padding: 72px 24px 80px;
}
.hero-inner { max-width: 1080px; margin: 0 auto; }
.hero-kicker {
  display: inline-block; font-size: 12px; letter-spacing: .18em;
  text-transform: uppercase; color: var(--gold);
  border: 1px solid rgba(216,250,64,.4); border-radius: 999px;
  padding: 5px 14px; margin-bottom: 22px;
}
.hero h1 { font-size: 40px; line-height: 1.3; font-weight: 800; margin-bottom: 16px; }
.hero h1 em { font-style: normal; color: var(--green-bright); }
.hero p { font-size: 16px; color: rgba(244,246,243,.78); max-width: 640px; }
.hero-stats { display: flex; gap: 40px; margin-top: 40px; flex-wrap: wrap; }
.hero-stat b { display: block; font-size: 28px; color: var(--green-bright); font-weight: 800; }
.hero-stat span { font-size: 13px; color: rgba(244,246,243,.66); }

/* ---------- 通用区块 ---------- */
.section { max-width: 1080px; margin: 0 auto; padding: 48px 24px 8px; }
.section-title {
  font-size: 22px; font-weight: 800; margin-bottom: 20px;
  display: flex; align-items: center; gap: 10px;
}
.section-title::before {
  content: ""; width: 8px; height: 22px; border-radius: 4px;
  background: linear-gradient(180deg, var(--green-bright), var(--green));
}

/* ---------- 首页案例卡片网格 ---------- */
.case-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 20px; padding-bottom: 56px;
}
.case-card {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 22px;
  box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 12px;
  transition: transform .18s ease, box-shadow .18s ease;
}
.case-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 2px 4px rgba(25,28,26,.05), 0 16px 32px -12px rgba(25,28,26,.16);
  text-decoration: none;
}
.case-card .cc-top { display: flex; justify-content: space-between; align-items: center; }
.case-card .cc-date { font-size: 13px; color: var(--ink-faint); font-variant-numeric: tabular-nums; }
.case-card h3 { font-size: 17px; line-height: 1.5; color: var(--ink); font-weight: 700; }
.case-card .cc-focus { font-size: 13px; color: var(--ink-soft); }
.case-card .cc-focus b { color: var(--green); font-weight: 600; }

/* 类型徽章 */
.badge {
  display: inline-block; font-size: 12px; font-weight: 600;
  border-radius: 999px; padding: 3px 12px; white-space: nowrap;
}
.badge-green  { background: var(--green-mist);  color: var(--green); }
.badge-purple { background: var(--purple-mist); color: var(--purple); }
.badge-orange { background: var(--orange-mist); color: var(--orange); }
.badge-dark   { background: var(--ink); color: var(--green-bright); }

/* ---------- 文章页头部 ---------- */
.article-hero {
  background:
    radial-gradient(700px 320px at 90% -30%, rgba(47,217,120,.25), transparent 70%),
    var(--green-deep);
  color: #f4f6f3; padding: 56px 24px 48px;
}
.article-hero-inner { max-width: 860px; margin: 0 auto; }
.article-meta { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 18px; }
.article-hero h1 { font-size: 32px; line-height: 1.4; font-weight: 800; margin-bottom: 14px; }
.focus-flag {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(216,250,64,.12); border: 1px solid rgba(216,250,64,.45);
  color: var(--gold); border-radius: 999px; padding: 6px 16px; font-size: 14px;
}
.article-hero .ah-sub { font-size: 14px; color: rgba(244,246,243,.65); margin-top: 14px; }

/* ---------- 文章正文 ---------- */
.article-body { max-width: 860px; margin: 0 auto; padding: 40px 24px 24px; }
.article-body h2 {
  font-size: 21px; font-weight: 800; margin: 40px 0 16px;
  display: flex; align-items: center; gap: 10px;
}
.article-body h2 .h2-num {
  flex: none; width: 30px; height: 30px; border-radius: 9px;
  background: var(--ink); color: var(--green-bright);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 800;
}
.article-body h3 { font-size: 17px; font-weight: 700; margin: 26px 0 10px; color: var(--ink); }
.article-body p { margin-bottom: 12px; color: var(--ink-soft); }
.article-body ul, .article-body ol { margin: 0 0 14px 22px; color: var(--ink-soft); }
.article-body li { margin-bottom: 6px; }
.article-body strong { color: var(--ink); }

/* ---------- KPI 数据卡 ---------- */
.kpi-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px; margin: 18px 0 8px;
}
.kpi-card {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius-sm); padding: 16px 18px;
}
.kpi-card .kpi-label { font-size: 13px; color: var(--ink-faint); margin-bottom: 6px; }
.kpi-card .kpi-value { font-size: 22px; font-weight: 800; color: var(--ink); font-variant-numeric: tabular-nums; }
.kpi-card .kpi-value small { font-size: 13px; font-weight: 600; color: var(--ink-faint); margin-left: 2px; }
.kpi-card .kpi-note { font-size: 12px; color: var(--green); margin-top: 4px; }
.kpi-card .kpi-note.down { color: var(--orange); }

/* ---------- 财务表格 ---------- */
.fin-table {
  width: 100%; border-collapse: collapse; margin: 16px 0;
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius-sm); overflow: hidden;
  font-size: 14px;
}
.fin-table caption {
  caption-side: top; text-align: left; font-size: 13px;
  color: var(--ink-faint); padding: 0 2px 8px;
}
.fin-table th {
  background: var(--cream-deep); color: var(--ink);
  font-weight: 700; text-align: left; padding: 10px 14px;
  border-bottom: 1px solid var(--line); white-space: nowrap;
}
.fin-table td { padding: 10px 14px; border-bottom: 1px solid #efede6; color: var(--ink-soft); }
.fin-table tr:last-child td { border-bottom: none; }
.fin-table td.num, .fin-table th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.fin-table tr.hl td { background: var(--green-mist); font-weight: 600; color: var(--ink); }

/* ---------- 四维比率分析卡 ---------- */
.ratio-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin: 18px 0; }
@media (max-width: 720px) { .ratio-grid { grid-template-columns: 1fr; } }
.ratio-card {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 20px 22px; box-shadow: var(--shadow);
}
.ratio-card .rc-head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.ratio-card .rc-icon {
  width: 34px; height: 34px; border-radius: 10px; flex: none;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 17px;
}
.rc-profit   .rc-icon { background: var(--green-mist); }
.rc-debt     .rc-icon { background: var(--orange-mist); }
.rc-ops      .rc-icon { background: var(--purple-mist); }
.rc-growth   .rc-icon { background: #fff8e0; }
.ratio-card .rc-title { font-size: 16px; font-weight: 800; }
.ratio-card table { width: 100%; border-collapse: collapse; font-size: 14px; }
.ratio-card td { padding: 7px 4px; border-top: 1px dashed #eceade; color: var(--ink-soft); }
.ratio-card td:last-child { text-align: right; font-weight: 700; color: var(--ink); font-variant-numeric: tabular-nums; white-space: nowrap; }
.ratio-card .rc-verdict {
  margin-top: 12px; font-size: 13px; border-radius: 8px; padding: 8px 12px;
  background: var(--cream); color: var(--ink-soft);
}
.ratio-card .rc-verdict b { color: var(--green); }

/* ---------- 亮点启示框 ---------- */
.insight-box {
  background: linear-gradient(135deg, var(--green-mist), #f4fbf6);
  border: 1px solid #cdeeda; border-left: 5px solid var(--green);
  border-radius: var(--radius-sm); padding: 20px 24px; margin: 18px 0;
}
.insight-box .ib-title { font-weight: 800; font-size: 15px; color: var(--green); margin-bottom: 8px; }
.insight-box p, .insight-box li { color: var(--ink-soft); font-size: 15px; }

/* ---------- 待核实标注 ---------- */
.unverified {
  background: #fff6df; border-radius: 4px; padding: 0 5px;
  color: #9a7b00; font-size: .9em; white-space: nowrap;
}

/* ---------- 自检清单 ---------- */
.checklist { list-style: none; margin: 14px 0 8px 0 !important; }
.checklist li {
  position: relative; padding-left: 30px; margin-bottom: 8px; color: var(--ink-soft);
}
.checklist li::before {
  content: "✓"; position: absolute; left: 0; top: 1px;
  width: 20px; height: 20px; border-radius: 6px;
  background: var(--green-mist); color: var(--green);
  font-size: 13px; font-weight: 800;
  display: inline-flex; align-items: center; justify-content: center;
}

/* ---------- 来源与免责声明 ---------- */
.source-box {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius-sm); padding: 16px 20px; font-size: 14px;
  color: var(--ink-soft); margin: 16px 0;
}
.disclaimer {
  max-width: 860px; margin: 32px auto 0; padding: 20px 24px;
  background: var(--cream-deep); border-radius: var(--radius-sm);
  font-size: 13px; color: var(--ink-faint); line-height: 1.9;
}

/* ---------- 页脚 ---------- */
.footer {
  margin-top: 64px; background: var(--ink); color: rgba(244,246,243,.6);
  padding: 36px 24px; font-size: 13px; text-align: center; line-height: 2;
}
.footer b { color: var(--green-bright); font-weight: 700; }

/* ---------- 空状态 ---------- */
.empty {
  text-align: center; padding: 72px 24px; color: var(--ink-faint);
}

@media (max-width: 640px) {
  .hero h1 { font-size: 30px; }
  .article-hero h1 { font-size: 24px; }
  .hero-stats { gap: 24px; }
}
