:root {
  color-scheme: light;
  --bg: #f3f4f6;
  --surface: #ffffff;
  --surface-2: #f6f7f9;
  --ink: #0f172a;            /* 深色横幅 / 数据卡底色 */
  --text: #0b0b0b;
  --text-2: #52514e;
  --muted: #898781;
  --grid: #e7e8eb;
  --border: rgba(15, 23, 42, 0.08);
  --accent: #2a78d6;
  --link: #1d5fae;
  --accent-wash: rgba(42, 120, 214, 0.08);
  --shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 6px 20px rgba(15, 23, 42, 0.04);
  --radius: 12px;
  --radius-lg: 18px;
}
@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --bg: #141413;
    --surface: #1e1e1d;
    --surface-2: #262625;
    --ink: #0b1220;
    --text: #f0efec;
    --text-2: #c3c2b7;
    --muted: #898781;
    --grid: #2c2c2a;
    --border: rgba(255, 255, 255, 0.08);
    --accent: #3987e5;
    --link: #7fb2f0;
    --accent-wash: rgba(57, 135, 229, 0.14);
    --shadow: none;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.6 system-ui, -apple-system, "Segoe UI", Roboto, "PingFang SC", "Hiragino Sans GB", "Noto Sans SC",
    "Microsoft YaHei", sans-serif;
}
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
[hidden] { display: none !important; }
svg.icon { width: 16px; height: 16px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.wrap { max-width: 1200px; margin: 0 auto; padding: 0 16px; }

/* ---------- 页头 ---------- */
.site-header { position: sticky; top: 0; z-index: 10; background: color-mix(in srgb, var(--surface) 92%, transparent);
  backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid var(--border); }
.header-row { display: flex; align-items: center; gap: 28px; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); flex: none; }
.brand:hover { text-decoration: none; }
.brand-mark { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; color: #fff;
  font-weight: 800; background: linear-gradient(135deg, #1d4f91, var(--accent)); }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-text b { font-size: 1.05rem; letter-spacing: -0.01em; }
.brand-text small { font-size: 0.62rem; letter-spacing: 0.14em; color: var(--muted); text-transform: uppercase; }
.nav { display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none; flex: 1; min-width: 0; }
.nav::-webkit-scrollbar { display: none; }
.nav a { color: var(--text-2); font-size: 0.93rem; padding: 6px 11px; border-radius: 8px; white-space: nowrap; }
.nav a:hover { text-decoration: none; background: var(--surface-2); color: var(--text); }
.nav a[aria-current="page"] { color: var(--text); font-weight: 600; background: var(--accent-wash); }
.header-actions { display: flex; align-items: center; gap: 8px; flex: none; }
.icon-btn { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 999px; color: var(--text-2); background: var(--surface-2); }
.icon-btn:hover { color: var(--text); text-decoration: none; }
.lang-btn { font-size: 0.85rem; font-weight: 600; color: #fff; background: var(--ink); padding: 7px 14px; border-radius: 999px; white-space: nowrap; }
.lang-btn:hover { text-decoration: none; opacity: 0.9; }

/* ---------- 页脚 ---------- */
.site-footer { margin-top: 56px; border-top: 1px solid var(--border); background: var(--surface); color: var(--muted); font-size: 0.875rem; }
.site-footer .wrap { padding-top: 24px; padding-bottom: 40px; }

/* ---------- 通用排版 ---------- */
main { padding-bottom: 8px; }
h1 { font-size: clamp(1.7rem, 3.6vw, 2.4rem); line-height: 1.18; letter-spacing: -0.02em; margin: 24px 0 10px; }
h2 { font-size: 1.12rem; line-height: 1.35; margin: 0; letter-spacing: -0.01em; }
.lead { color: var(--text-2); font-size: 1.04rem; max-width: 72ch; margin: 0 0 12px; }
.note { color: var(--muted); font-size: 0.875rem; max-width: 80ch; }
.crumbs { margin-top: 20px; font-size: 0.85rem; color: var(--muted); }
.crumbs a { color: var(--muted); }
.crumbs span { margin: 0 2px; }
.plain { padding-left: 20px; max-width: 80ch; }
.plain li { margin-bottom: 8px; }
main > h2 { margin-top: 32px; margin-bottom: 8px; font-size: 1.2rem; }
main > p { max-width: 80ch; }

/* 面板：每个 section 都是一张白卡片 */
section { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow);
  padding: 18px 22px 20px; margin-top: 20px; min-width: 0; }
section[id] { scroll-margin-top: 80px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px;
  padding-bottom: 12px; margin-bottom: 4px; border-bottom: 1px solid var(--grid); }
.section-head h2 { display: flex; align-items: center; gap: 8px; }
.section-head h2::before { content: ""; width: 4px; height: 16px; border-radius: 2px; background: var(--accent); }
.more { font-size: 0.85rem; white-space: nowrap; color: var(--muted); }
.section-intro { color: var(--text-2); margin: 10px 0 4px; max-width: 80ch; font-size: 0.93rem; }

/* 主栏 + 侧栏 */
.layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 20px; align-items: start; margin-top: 20px; }
.main-col, .side-col { display: flex; flex-direction: column; gap: 20px; min-width: 0; }
.layout section { margin-top: 0; }
.side-col section { padding: 16px 18px; }

/* ---------- 首页：简介 + 焦点区 ---------- */
.intro { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; flex-wrap: wrap; margin: 24px 0 18px; }
.intro h1 { margin: 0 0 6px; font-size: clamp(1.5rem, 3vw, 2rem); }
.intro .lead { margin: 0; font-size: 0.98rem; }
.search { display: flex; gap: 8px; flex: 0 1 420px; min-width: 260px; }
input[type="search"], select {
  font: inherit; font-size: 0.93rem; color: var(--text); background: var(--surface);
  border: 1px solid var(--border); border-radius: 10px; padding: 9px 12px; min-width: 0;
}
input[type="search"] { flex: 1; }
.search button { font: inherit; font-size: 0.93rem; font-weight: 600; color: #fff; background: var(--ink);
  border: 0; border-radius: 10px; padding: 9px 18px; cursor: pointer; }

.hero-grid { display: grid; grid-template-columns: 1.7fr 1fr 1fr; grid-template-rows: 1fr 1fr; gap: 14px; min-height: 380px; }
.hero-card { position: relative; overflow: hidden; display: flex; flex-direction: column; justify-content: flex-end; gap: 8px;
  padding: 48px 20px 18px; border-radius: var(--radius-lg); color: #fff; min-height: 170px; isolation: isolate; }
.hero-card:hover { text-decoration: none; }
.hero-card::after { content: ""; position: absolute; inset: 0; z-index: -1; transition: opacity 0.2s;
  background: radial-gradient(120% 90% at 100% 0%, rgba(255, 255, 255, 0.16), transparent 55%); }
.hero-card:hover::after { opacity: 0.6; }
.hero-card.big { grid-row: span 2; padding: 56px 28px 26px; }
.hero-card.tall { grid-row: span 2; }
.hero-card .badge { position: absolute; top: 14px; left: 16px; font-size: 0.72rem; font-weight: 600; letter-spacing: 0.02em;
  padding: 3px 9px; border-radius: 6px; background: rgba(255, 255, 255, 0.18); color: #fff; }
.hero-card .glyph { position: absolute; right: -6px; top: 10px; z-index: -1; font-size: 5.5rem; font-weight: 800; line-height: 1;
  color: rgba(255, 255, 255, 0.08); letter-spacing: -0.04em; }
.hero-title { font-weight: 700; font-size: 1.02rem; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.hero-card.big .hero-title { font-size: clamp(1.3rem, 2.4vw, 1.75rem); line-height: 1.28; -webkit-line-clamp: 4; }
.hero-excerpt { font-size: 0.9rem; color: rgba(255, 255, 255, 0.82); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin: 0; }
.hero-meta { font-size: 0.78rem; color: rgba(255, 255, 255, 0.7); }
.tone-learn { background: linear-gradient(135deg, #10284d, #1f5fae); }
.tone-case { background: linear-gradient(135deg, #072f27, #0f6b52); }
.tone-insight { background: linear-gradient(135deg, #1e1852, #4636a8); }
.tone-news { background: linear-gradient(135deg, #4a1c08, #9a4318); }
.tone-media { background: linear-gradient(135deg, #4a1530, #8f2f57); }
.tone-ink { background: linear-gradient(160deg, #0b1220, #172554); }
.data-card { justify-content: space-between; }
.data-rows { display: flex; flex-direction: column; gap: 14px; margin-top: 36px; }
.data-row b { display: block; font-size: 1.9rem; font-weight: 700; letter-spacing: -0.02em; line-height: 1.1; }
.data-row span { font-size: 0.82rem; color: rgba(255, 255, 255, 0.72); }
.cta { font-size: 0.85rem; font-weight: 600; color: #fff; }

/* 热门导航 + 编号头条 */
.quick-nav { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 14px; padding: 10px 14px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); }
.quick-label { font-size: 0.82rem; color: var(--muted); margin-right: 4px; }
.quick-nav a { display: inline-flex; align-items: center; gap: 6px; font-size: 0.85rem; color: var(--text-2);
  padding: 5px 12px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface-2); }
.quick-nav a:hover { color: var(--text); text-decoration: none; border-color: var(--accent); }
.ticker { margin-top: 12px; overflow-x: auto; scrollbar-width: thin; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); }
.ticker ol { display: flex; list-style: none; margin: 0; padding: 0; }
.ticker li { display: flex; align-items: center; gap: 10px; padding: 12px 18px; flex: 0 0 300px; border-right: 1px solid var(--grid); }
.ticker li:last-child { border-right: 0; }
.ticker .n { color: var(--accent); font-weight: 700; font-variant-numeric: tabular-nums; }
.ticker a { color: var(--text); font-size: 0.88rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* 深色横幅（学习路径） */
section.banner { background: linear-gradient(135deg, #0b1220, #14213d); color: #fff; border: 0; padding: 26px 28px; }
.eyebrow { font-size: 0.72rem; letter-spacing: 0.18em; color: rgba(255, 255, 255, 0.55); text-transform: uppercase; }
.banner h2 { font-size: clamp(1.25rem, 2.4vw, 1.6rem); margin: 6px 0 8px; color: #fff; }
.banner h2::before { display: none; }
.banner p { color: rgba(255, 255, 255, 0.72); margin: 0 0 18px; max-width: 64ch; font-size: 0.93rem; }
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.step { display: flex; flex-direction: column; gap: 2px; padding: 12px 14px; border-radius: 12px; color: #fff;
  background: rgba(255, 255, 255, 0.07); border: 1px solid rgba(255, 255, 255, 0.1); }
.step:hover { text-decoration: none; background: rgba(255, 255, 255, 0.12); }
.step-n { font-size: 0.75rem; color: #7fb2f0; font-weight: 700; }
.step b { font-size: 0.95rem; }
.step small { color: rgba(255, 255, 255, 0.6); font-size: 0.78rem; }
.btn-light { display: inline-block; margin-top: 16px; font-size: 0.88rem; font-weight: 600; color: var(--ink); background: #fff;
  padding: 8px 16px; border-radius: 999px; }
.btn-light:hover { text-decoration: none; opacity: 0.92; }

/* 标签页 */
.tabs { display: flex; gap: 4px; margin: 12px 0 2px; flex-wrap: wrap; }
.tabs button { font: inherit; font-size: 0.85rem; color: var(--text-2); background: var(--surface-2); border: 1px solid var(--border);
  border-radius: 999px; padding: 5px 14px; cursor: pointer; }
.tabs button[aria-selected="true"] { color: #fff; background: var(--ink); border-color: var(--ink); }
@media (prefers-color-scheme: dark) {
  /* 深色模式下 --ink 和页面底色太接近，按钮改用强调色 */
  .search button, .lang-btn, .tabs button[aria-selected="true"] { background: var(--accent); border-color: var(--accent); }
}

/* ---------- 指标卡 ---------- */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; margin-top: 20px; }
.kpi { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px 18px; box-shadow: var(--shadow); }
.kpi-label { color: var(--text-2); font-size: 0.875rem; }
.kpi-value { font-size: 1.75rem; font-weight: 600; letter-spacing: -0.02em; line-height: 1.25; margin-top: 4px; }
.kpi-sub { color: var(--muted); font-size: 0.8rem; margin-top: 2px; }

/* ---------- 卡片与标签 ---------- */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; margin-top: 14px; }
.card { display: flex; flex-direction: column; gap: 6px; padding: 16px 18px; color: var(--text);
  background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius); }
.card:hover { text-decoration: none; border-color: var(--accent); }
.card-kicker { font-size: 0.72rem; color: var(--accent); font-weight: 600; }
.card-title { font-weight: 600; line-height: 1.35; }
.card-meta { color: var(--muted); font-size: 0.8rem; }
.card-text { color: var(--text-2); font-size: 0.88rem; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.chip { font-size: 0.85rem; padding: 5px 12px; border-radius: 999px; color: var(--text-2); background: var(--surface); border: 1px solid var(--border); }
.chip:hover { text-decoration: none; color: var(--text); border-color: var(--accent); }
.chip { display: inline-flex; align-items: center; gap: 6px; }
[data-filter] { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
  box-shadow: var(--shadow); padding: 16px 22px 20px; margin-top: 16px; }
[data-filter] .table-wrap { border-radius: var(--radius); }
.tag { display: inline-block; font-size: 0.72rem; font-weight: 500; padding: 1px 8px; border-radius: 6px; color: var(--text-2);
  background: var(--surface-2); border: 1px solid var(--border); vertical-align: 1px; }
.tag.cat-learn { color: #1d5fae; background: rgba(42, 120, 214, 0.08); border-color: transparent; }
.tag.cat-case { color: #0f6b52; background: rgba(27, 175, 122, 0.1); border-color: transparent; }
.tag.cat-insight { color: #4636a8; background: rgba(98, 80, 214, 0.1); border-color: transparent; }
.tag.cat-news { color: #9a4318; background: rgba(235, 104, 52, 0.1); border-color: transparent; }
.tag.cat-media { color: #8f2f57; background: rgba(232, 123, 164, 0.12); border-color: transparent; }
@media (prefers-color-scheme: dark) {
  .tag.cat-learn { color: #7fb2f0; } .tag.cat-case { color: #4fd1a5; } .tag.cat-insight { color: #a99ff0; }
  .tag.cat-news { color: #f0a07a; } .tag.cat-media { color: #f0a3c1; }
}

/* ---------- 文章与讨论列表 ---------- */
.items { list-style: none; margin: 0; padding: 0; }
.item { padding: 14px 0; border-bottom: 1px solid var(--grid); }
.item:last-child { border-bottom: 0; padding-bottom: 0; }
.item-title { font-weight: 600; font-size: 1rem; line-height: 1.42; overflow-wrap: anywhere; color: var(--text); }
.item-title:hover { color: var(--link); }
.item-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; color: var(--muted); font-size: 0.8rem; margin-top: 4px; }
.item-excerpt { color: var(--text-2); font-size: 0.9rem; margin: 6px 0 0; max-width: 82ch; overflow-wrap: anywhere;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.items.compact .item { padding: 10px 0; }
.item.ranked { display: grid; grid-template-columns: 30px 1fr; gap: 6px; }
.rank { color: var(--muted); font-weight: 700; font-variant-numeric: tabular-nums; padding-top: 1px; }
.item.ranked:nth-child(-n+3) .rank { color: var(--accent); }
.signal { font-size: 0.72rem; color: var(--text-2); background: var(--accent-wash); border-radius: 999px; padding: 1px 8px; }

/* 侧栏紧凑列表 */
.mini { list-style: none; margin: 8px 0 0; padding: 0; counter-reset: mini; }
.mini li { display: flex; gap: 10px; align-items: baseline; padding: 9px 0; border-bottom: 1px solid var(--grid); font-size: 0.88rem; }
.mini li:last-child { border-bottom: 0; }
.mini.numbered li::before { counter-increment: mini; content: counter(mini); color: var(--accent); font-weight: 700; min-width: 14px; font-variant-numeric: tabular-nums; }
.mini a { color: var(--text); flex: 1; min-width: 0; overflow-wrap: anywhere; }
.mini a:hover { color: var(--link); }
.mini .count { color: var(--muted); font-size: 0.78rem; white-space: nowrap; margin-left: auto; }
.side-dark { background: linear-gradient(160deg, #0b1220, #172554); color: #fff; border: 0; }
.side-dark h2 { color: #fff; }
.side-dark .section-head { border-color: rgba(255, 255, 255, 0.12); }
.side-dark .section-head h2::before { background: #7fb2f0; }
.side-dark p { color: rgba(255, 255, 255, 0.72); font-size: 0.88rem; margin: 10px 0 12px; }
.side-dark .btn-light { margin-top: 0; }

/* ---------- 搜索与筛选 ---------- */
.filters { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 4px 0 8px; }
.filters input[type="search"] { flex: 1 1 240px; }
.filters select { flex: 0 1 auto; max-width: 100%; }
.filters .count { color: var(--muted); font-size: 0.85rem; margin-left: auto; }

/* ---------- 表格 ---------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); margin-top: 12px; }
table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
th, td { text-align: left; padding: 10px 14px; border-bottom: 1px solid var(--grid); vertical-align: top; }
th { color: var(--text-2); font-weight: 500; font-size: 0.8rem; background: var(--surface-2); white-space: nowrap; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: var(--accent-wash); }
td.num, th.num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
td a { font-weight: 500; }

/* ---------- 图表：单系列条形图与区间图 ---------- */
.chart { margin: 14px 0 0; padding: 16px 18px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
.chart figcaption { color: var(--text-2); font-size: 0.85rem; margin-bottom: 12px; }
.bar-row { display: grid; grid-template-columns: minmax(110px, 190px) 1fr 44px; align-items: center; gap: 12px; padding: 3px 0; border-radius: 4px; }
.bar-row:hover { background: var(--accent-wash); }
.bar-label { font-size: 0.85rem; color: var(--text); overflow-wrap: anywhere; }
.bar-track { position: relative; height: 12px; border-left: 1px solid var(--grid); }
.bar { position: absolute; left: 0; top: 0; bottom: 0; background: var(--accent); border-radius: 0 4px 4px 0; }
.bar-value { font-size: 0.8rem; color: var(--text-2); text-align: right; font-variant-numeric: tabular-nums; }
.range-row { display: grid; grid-template-columns: minmax(110px, 190px) 1fr 116px; align-items: center; gap: 12px; padding: 4px 0; border-radius: 4px; }
.range-row:not(.axis):hover { background: var(--accent-wash); }
.range-label { font-size: 0.85rem; overflow-wrap: anywhere; }
.range-track { position: relative; height: 12px; }
.gridline { position: absolute; top: -4px; bottom: -4px; width: 1px; background: var(--grid); }
.range-bar { position: absolute; top: 0; bottom: 0; background: var(--accent); border-radius: 4px; }
.range-value { font-size: 0.8rem; color: var(--text-2); text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.range-row.axis { margin-top: 4px; }
.range-row.axis .range-track { height: 18px; }
.tick { position: absolute; transform: translateX(-50%); font-size: 0.72rem; color: var(--muted); white-space: nowrap; }

/* ---------- 响应式 ---------- */
@media (max-width: 1080px) {
  .hero-grid { grid-template-columns: 1fr 1fr; grid-template-rows: auto; min-height: 0; }
  .hero-card.big { grid-column: span 2; grid-row: auto; min-height: 260px; }
  .hero-card.tall { grid-row: auto; }
}
@media (max-width: 960px) {
  .layout { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .header-row { flex-wrap: wrap; height: auto; padding: 10px 0 0; gap: 8px 12px; }
  .brand { order: 1; }
  .header-actions { order: 2; margin-left: auto; }
  .nav { order: 3; flex-basis: 100%; padding-bottom: 8px; }
  .brand-text small { display: none; }
  .hero-grid { grid-template-columns: 1fr; }
  .hero-card.big { grid-column: auto; min-height: 240px; padding: 50px 20px 22px; }
  .search { flex-basis: 100%; min-width: 0; }
  .steps { grid-template-columns: 1fr; }
  section { padding: 16px 16px 18px; }
  .ticker li { flex-basis: 240px; }
  .filters .count { margin-left: 0; width: 100%; }
  .bar-row { grid-template-columns: 96px 1fr 38px; gap: 8px; }
  .range-row { grid-template-columns: 84px 1fr; gap: 2px 8px; padding: 6px 0 10px; border-bottom: 1px solid var(--grid); border-radius: 0; }
  .range-row.axis { border-bottom: 0; }
  .range-value { grid-column: 2; text-align: left; }
  .range-row.axis .range-value { display: none; }
  .tick:nth-child(even) { display: none; }
  th, td { padding: 9px 10px; }
}
