/* ============================================================
   大牛的 AI 笔记 — 全站样式
   纯静态响应式：PC（>=1024）/ 平板（768-1023）/ 手机（<=767）
   ============================================================ */

:root {
  --primary: #4f46e5;
  --primary-dark: #4338ca;
  --primary-soft: #eef2ff;
  --primary-soft-2: #e0e7ff;

  --ink: #0f172a;
  --heading: #1e293b;
  --body: #334155;
  --muted: #64748b;
  --faint: #94a3b8;

  --bg: #f6f8fb;
  --card: #ffffff;
  --line: #e8edf3;
  --line-soft: #eef2f7;

  --green: #16a34a;
  --green-soft: #dcfce7;
  --amber: #d97706;
  --amber-soft: #fef3c7;
  --red: #dc2626;
  --red-soft: #fee2e2;
  --cyan: #0891b2;
  --cyan-soft: #cffafe;
  --violet: #7c3aed;
  --violet-soft: #ede9fe;
  --pink: #db2777;
  --pink-soft: #fce7f3;
  --teal: #0d9488;
  --teal-soft: #ccfbf1;
  --orange: #ea580c;
  --orange-soft: #ffedd5;

  --dark: #172033;
  --dark-2: #1f2a40;

  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;

  --shadow-sm: 0 1px 2px rgba(15, 23, 42, .04);
  --shadow: 0 4px 16px rgba(15, 23, 42, .06);
  --shadow-lg: 0 12px 32px rgba(15, 23, 42, .10);

  --container: 1200px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif;
  color: var(--body);
  background: var(--bg);
  font-size: 15px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
ul, ol { list-style: none; }
input { font-family: inherit; }

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------------- 通用排版 ---------------- */
h1, h2, h3, h4 { color: var(--heading); font-weight: 700; line-height: 1.3; }

.section { padding: 64px 0; }
.section-head { display: flex; justify-content: space-between; align-items: flex-end; margin-bottom: 28px; gap: 16px; }
.section-head h2 { font-size: 26px; }
.section-head p { color: var(--muted); margin-top: 6px; font-size: 14px; }
.more-link { color: var(--primary); font-size: 14px; font-weight: 600; white-space: nowrap; display: inline-flex; align-items: center; gap: 4px; }
.more-link:hover { color: var(--primary-dark); }

/* ---------------- 按钮 ---------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 44px; padding: 0 22px; border-radius: var(--radius);
  font-size: 15px; font-weight: 600; transition: all .2s;
  border: 1px solid transparent; white-space: nowrap;
}
.btn-primary { background: var(--primary); color: #fff; box-shadow: 0 6px 16px rgba(79, 70, 229, .28); }
.btn-primary:hover { background: var(--primary-dark); transform: translateY(-1px); }
.btn-ghost { background: var(--card); color: var(--heading); border-color: var(--line); }
.btn-ghost:hover { border-color: #cbd5e1; box-shadow: var(--shadow-sm); }
.btn-sm { height: 36px; padding: 0 16px; font-size: 13px; border-radius: var(--radius-sm); }
.btn-block { width: 100%; }
.btn-white { background: #fff; color: var(--primary); }
.btn-white:hover { background: #f8fafc; }

/* ---------------- 标签 ---------------- */
.tag {
  display: inline-flex; align-items: center; gap: 4px;
  height: 24px; padding: 0 10px; border-radius: 6px;
  font-size: 12px; font-weight: 600; line-height: 1;
}
.tag-indigo { background: var(--primary-soft); color: var(--primary); }
.tag-violet { background: var(--violet-soft); color: var(--violet); }
.tag-cyan { background: var(--cyan-soft); color: var(--cyan); }
.tag-amber { background: var(--amber-soft); color: var(--amber); }
.tag-green { background: var(--green-soft); color: var(--green); }
.tag-red { background: var(--red-soft); color: var(--red); }
.tag-pink { background: var(--pink-soft); color: var(--pink); }
.tag-teal { background: var(--teal-soft); color: var(--teal); }
.tag-slate { background: #f1f5f9; color: #475569; }
.tag-blue { background: #dbeafe; color: #2563eb; }
.tag-orange { background: var(--orange-soft); color: var(--orange); }

/* ---------------- 顶部导航 ---------------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255, 255, 255, .9);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line-soft);
}
.header-inner { display: flex; align-items: center; gap: 28px; height: 68px; }
.brand { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.brand-logo { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-text strong { font-size: 15px; color: var(--heading); }
.brand-text small { font-size: 9px; letter-spacing: 1.5px; color: var(--faint); font-weight: 600; }

.main-nav { display: flex; align-items: center; gap: 4px; margin: 0 auto; }
.main-nav a {
  padding: 7px 14px; border-radius: 8px;
  font-size: 14.5px; font-weight: 500; color: var(--body);
  transition: all .18s;
}
.main-nav a:hover { color: var(--primary); background: var(--primary-soft); }
.main-nav a.active { color: var(--primary); background: var(--primary-soft); font-weight: 600; }

.header-actions { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.search-box {
  display: flex; align-items: center; gap: 8px;
  height: 38px; padding: 0 14px; width: 190px;
  background: #f1f5f9; border-radius: var(--radius-sm);
  border: 1px solid transparent; transition: all .2s;
}
.search-box:focus-within { background: var(--card); border-color: var(--primary-soft-2); box-shadow: 0 0 0 3px rgba(79,70,229,.1); }
.search-box input { border: none; outline: none; background: transparent; font-size: 13.5px; width: 100%; color: var(--heading); }
.search-box svg { color: var(--faint); flex-shrink: 0; }
.icon-btn {
  width: 38px; height: 38px; border-radius: var(--radius-sm);
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--muted); background: #f1f5f9; transition: all .2s;
}
.icon-btn:hover { color: var(--primary); background: var(--primary-soft); }
.menu-toggle { display: none; }

/* ---------------- Hero ---------------- */
.hero { padding: 56px 0 48px; }
.hero-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: 56px; align-items: center; }
.hero-badge {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--card); border: 1px solid var(--line);
  border-radius: 999px; padding: 6px 14px;
  font-size: 13px; font-weight: 600; color: var(--green);
  box-shadow: var(--shadow-sm); margin-bottom: 22px;
}
.hero-badge .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--green); }
.hero h1 { font-size: clamp(30px, 4vw, 42px); margin-bottom: 18px; letter-spacing: -.5px; }
.hero h1 .wave { display: inline-block; }
.hero h1 .grad { color: var(--primary); }
.hero-desc { color: var(--muted); font-size: 15.5px; max-width: 520px; margin-bottom: 22px; }
.hero-tags { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 30px; }
.hero-tags .tag { height: 30px; padding: 0 14px; font-size: 13px; border-radius: 999px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 38px; }

.hero-stats { display: grid; grid-template-columns: repeat(4, auto); gap: 0; }
.hero-stat { padding-right: 28px; margin-right: 28px; border-right: 1px solid var(--line); }
.hero-stat:last-child { border-right: none; }
.hero-stat b { display: block; font-size: 28px; color: var(--heading); font-weight: 800; line-height: 1.2; }
.hero-stat span { font-size: 13px; color: var(--faint); }

.hero-visual { position: relative; }
.hero-img { width: 100%; aspect-ratio: 16 / 10.5; object-fit: cover; border-radius: var(--radius-xl); box-shadow: var(--shadow-lg); }
.hero-float {
  position: absolute; background: var(--card); border-radius: var(--radius);
  box-shadow: var(--shadow-lg); padding: 14px 16px;
}
.hero-float-label { font-size: 11.5px; font-weight: 700; color: var(--primary); margin-bottom: 6px; }
.hero-float-title { font-size: 13.5px; font-weight: 600; color: var(--heading); line-height: 1.4; margin-bottom: 8px; }
.hero-float-meta { font-size: 12px; color: var(--faint); display: flex; gap: 10px; align-items: center; }
.float-new { left: -26px; bottom: 26px; width: 268px; }
.float-today { right: -18px; top: -22px; width: 210px; }
.float-today .row { display: flex; justify-content: space-between; align-items: center; }
.float-today b { font-size: 26px; color: var(--heading); }
.float-today .flame { width: 30px; height: 30px; border-radius: 8px; background: var(--amber-soft); color: var(--amber); display: flex; align-items: center; justify-content: center; }
.progress { height: 5px; border-radius: 99px; background: var(--line-soft); overflow: hidden; margin: 10px 0 6px; }
.progress i { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, #f59e0b, #f97316); }
.float-today small { font-size: 11px; color: var(--faint); }

/* ---------------- 技术方向 ---------------- */
.dir-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.dir-card {
  background: var(--card); border: 1px solid var(--line-soft);
  border-radius: var(--radius-lg); padding: 22px;
  transition: all .22s; display: flex; flex-direction: column;
}
.dir-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: #dce3ec; }
.dir-icon { width: 42px; height: 42px; border-radius: 11px; display: flex; align-items: center; justify-content: center; margin-bottom: 14px; }
.dir-card h3 { font-size: 16px; margin-bottom: 4px; }
.dir-card p { font-size: 13px; color: var(--muted); margin-bottom: 18px; }
.dir-foot { margin-top: auto; display: flex; justify-content: space-between; align-items: center; }
.dir-foot span { font-size: 13px; font-weight: 600; color: var(--primary); }
.dir-foot svg { color: var(--faint); transition: all .2s; }
.dir-card:hover .dir-foot svg { color: var(--primary); transform: translateX(3px); }

.subscribe-card {
  grid-column: span 2;
  background: linear-gradient(135deg, #5149e8 0%, #7c3aed 100%);
  border-radius: var(--radius-lg); padding: 30px; color: #fff;
  display: flex; flex-direction: column; justify-content: center;
}
.subscribe-card h3 { color: #fff; font-size: 19px; margin-bottom: 8px; }
.subscribe-card p { font-size: 13.5px; opacity: .85; margin-bottom: 18px; max-width: 360px; }
.subscribe-form { display: flex; gap: 10px; }
.subscribe-form input {
  flex: 1; height: 42px; border-radius: var(--radius-sm); border: none;
  padding: 0 16px; font-size: 14px; outline: none; min-width: 0;
}
.subscribe-form .btn { height: 42px; background: #fff; color: var(--primary); }
.subscribe-card--sm { border-radius: var(--radius-lg); padding: 26px; color: #fff; background: linear-gradient(135deg, #5149e8 0%, #7c3aed 100%); }
.subscribe-card--sm h3 { color: #fff; display: flex; align-items: center; gap: 8px; font-size: 17px; margin-bottom: 8px; }
.subscribe-card--sm h3 .mail-ic { width: 34px; height: 34px; border-radius: 9px; background: rgba(255,255,255,.18); display: inline-flex; align-items: center; justify-content: center; }
.subscribe-card--sm p { font-size: 13px; opacity: .85; margin-bottom: 16px; }
.subscribe-card--sm input { width: 100%; height: 40px; border-radius: var(--radius-sm); border: none; padding: 0 14px; font-size: 13.5px; outline: none; margin-bottom: 10px; background: rgba(255,255,255,.16); color: #fff; }
.subscribe-card--sm input::placeholder { color: rgba(255,255,255,.7); }
.subscribe-card--sm .btn { width: 100%; height: 40px; background: #fff; color: var(--primary); }

/* ---------------- 文章卡片 ---------------- */
.feature-card {
  display: grid; grid-template-columns: 42% 1fr;
  background: var(--card); border: 1px solid var(--line-soft);
  border-radius: var(--radius-lg); overflow: hidden;
  transition: box-shadow .22s;
}
.feature-card:hover { box-shadow: var(--shadow); }
.feature-img { position: relative; min-height: 280px; }
.feature-img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.feature-body { padding: 30px 32px; display: flex; flex-direction: column; }
.article-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.feature-body h3 { font-size: 23px; margin-bottom: 12px; transition: color .2s; }
.feature-card:hover h3 { color: var(--primary); }
.feature-body .excerpt { color: var(--muted); font-size: 14.5px; margin-bottom: 20px; }
.article-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 18px; color: var(--faint); font-size: 13px; margin-bottom: 22px; }
.article-meta .meta-item { display: inline-flex; align-items: center; gap: 5px; }
.author-mini { display: inline-flex; align-items: center; gap: 7px; font-weight: 600; color: var(--body); }
.author-mini img { width: 26px; height: 26px; border-radius: 50%; object-fit: cover; }
.feature-actions { margin-top: auto; display: flex; gap: 12px; }

.post-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 22px; }
.post-card {
  background: var(--card); border: 1px solid var(--line-soft);
  border-radius: var(--radius-lg); overflow: hidden;
  transition: all .22s; display: flex; flex-direction: column;
}
.post-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.post-thumb { aspect-ratio: 16 / 9; overflow: hidden; }
.post-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s; }
.post-card:hover .post-thumb img { transform: scale(1.05); }
.post-body { padding: 18px 20px 20px; display: flex; flex-direction: column; flex: 1; }
.post-body .article-tags { margin-bottom: 10px; }
.post-body h3 { font-size: 16.5px; margin-bottom: 8px; transition: color .2s; }
.post-card:hover h3 { color: var(--primary); }
.post-body .excerpt { font-size: 13.5px; color: var(--muted); margin-bottom: 16px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.post-foot { margin-top: auto; display: flex; justify-content: space-between; align-items: center; color: var(--faint); font-size: 12.5px; }
.post-foot .meta-item { display: inline-flex; align-items: center; gap: 4px; }
.post-foot .stats { display: flex; gap: 12px; }

/* ---------------- 学习记录（首页） ---------------- */
.records-band { background: var(--card); border-top: 1px solid var(--line-soft); border-bottom: 1px solid var(--line-soft); }
.records-grid { display: grid; grid-template-columns: .85fr 1.15fr; gap: 56px; align-items: start; }
.records-left .eyebrow { display: inline-block; background: var(--primary-soft); color: var(--primary); font-size: 12.5px; font-weight: 700; padding: 5px 14px; border-radius: 999px; margin-bottom: 16px; }
.records-left h2 { font-size: 28px; margin-bottom: 14px; }
.records-left > p { color: var(--muted); font-size: 14.5px; margin-bottom: 26px; }
.check-list li { display: flex; align-items: center; gap: 12px; padding: 11px 0; color: var(--heading); font-size: 14.5px; font-weight: 500; }
.check-ic { width: 24px; height: 24px; border-radius: 7px; background: var(--green-soft); color: var(--green); display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.records-left .btn { margin-top: 22px; }

.mini-timeline { display: flex; flex-direction: column; gap: 14px; }
.tl-item {
  background: var(--bg); border: 1px solid var(--line-soft);
  border-radius: var(--radius); padding: 18px 22px;
  display: grid; grid-template-columns: 64px 1fr; gap: 16px;
  transition: all .2s;
}
.tl-item:hover { border-color: #dce3ec; box-shadow: var(--shadow-sm); }
.tl-time { text-align: right; }
.tl-time b { display: block; font-size: 15px; color: var(--primary); font-weight: 700; }
.tl-time span { font-size: 11.5px; color: var(--faint); }
.tl-body h4 { font-size: 15px; margin-bottom: 5px; }
.tl-body p { font-size: 13px; color: var(--muted); margin-bottom: 9px; }
.tl-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.tl-chip { font-size: 11.5px; color: var(--muted); background: var(--card); border: 1px solid var(--line); border-radius: 6px; padding: 2px 9px; }

/* ---------------- 深色数据带 ---------------- */
.stats-band { background: var(--dark); color: #fff; padding: 52px 0; }
.stats-band .container { display: grid; grid-template-columns: 1.4fr repeat(5, 1fr); align-items: center; gap: 24px; }
.stats-band h2 { color: #fff; font-size: 23px; margin-bottom: 6px; }
.stats-band p { color: #94a3b8; font-size: 13.5px; }
.band-stat { padding-left: 28px; border-left: 1px solid rgba(255,255,255,.14); }
.band-stat b { display: block; font-size: 30px; font-weight: 800; color: #fff; line-height: 1.2; }
.band-stat span { font-size: 13px; color: #94a3b8; }

/* ---------------- 页脚 ---------------- */
.site-footer { background: var(--card); border-top: 1px solid var(--line-soft); padding: 48px 0 32px; }
.footer-grid { display: grid; grid-template-columns: 1.6fr repeat(3, auto) 1.2fr; gap: 40px; }
.footer-brand p { font-size: 13px; color: var(--muted); margin: 14px 0 18px; max-width: 280px; }
.socials { display: flex; gap: 10px; }
.socials a { width: 34px; height: 34px; border-radius: 9px; background: #f1f5f9; color: var(--muted); display: inline-flex; align-items: center; justify-content: center; transition: all .2s; }
.socials a:hover { background: var(--primary); color: #fff; }
.footer-col h4 { font-size: 14px; margin-bottom: 14px; }
.footer-col li { margin-bottom: 9px; }
.footer-col a { font-size: 13.5px; color: var(--muted); transition: color .2s; }
.footer-col a:hover { color: var(--primary); }
.footer-copy { text-align: right; font-size: 12.5px; color: var(--faint); line-height: 1.9; }
.footer-bottom { border-top: 1px solid var(--line-soft); margin-top: 36px; padding-top: 22px; display: flex; justify-content: space-between; align-items: center; font-size: 13px; color: var(--faint); gap: 12px; flex-wrap: wrap; }
.footer-bottom-links { display: flex; gap: 22px; }
.footer-bottom-links a { color: var(--muted); }
.footer-bottom-links a:hover { color: var(--primary); }

/* ---------------- 内页通用 ---------------- */
.page-head { padding: 30px 0 26px; }
.breadcrumb { font-size: 13px; color: var(--faint); margin-bottom: 14px; display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.breadcrumb a:hover { color: var(--primary); }
.breadcrumb .sep { color: #cbd5e1; }
.breadcrumb .current { color: var(--muted); }
.page-title { font-size: 32px; letter-spacing: -.5px; }
.page-sub { color: var(--muted); font-size: 14.5px; margin-top: 8px; }
.page-head-row { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; flex-wrap: wrap; }

.layout-2col { display: grid; grid-template-columns: 1fr 316px; gap: 28px; align-items: start; padding-bottom: 64px; }

/* 筛选条 */
.filter-bar {
  background: var(--card); border: 1px solid var(--line-soft); border-radius: var(--radius-lg);
  padding: 14px 16px; margin-bottom: 20px;
  display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap;
}
.pill-row { display: flex; flex-wrap: wrap; gap: 8px; }
.pill {
  height: 34px; padding: 0 16px; border-radius: 999px;
  font-size: 13.5px; font-weight: 500; color: var(--body);
  background: #f1f5f9; transition: all .18s;
}
.pill b { font-weight: 700; opacity: .7; margin-left: 3px; }
.pill:hover { background: var(--primary-soft); color: var(--primary); }
.pill.active { background: var(--primary); color: #fff; }
.pill.active b { opacity: .85; }

.select-wrap { position: relative; display: inline-flex; align-items: center; }
.select-wrap svg { position: absolute; left: 12px; color: var(--faint); pointer-events: none; }
.select-wrap select {
  appearance: none; height: 36px; border: 1px solid var(--line); border-radius: var(--radius-sm);
  background: var(--card); padding: 0 32px 0 32px; font-size: 13.5px; color: var(--body); outline: none;
}
.select-wrap .caret { position: absolute; left: auto; right: 10px; }

.view-toggle { display: inline-flex; background: var(--line-soft); border-radius: var(--radius-sm); padding: 3px; }
.view-toggle button {
  height: 32px; padding: 0 14px; border-radius: 6px; font-size: 13.5px; font-weight: 600;
  color: var(--muted); display: inline-flex; align-items: center; gap: 6px;
}
.view-toggle button.active { background: var(--card); color: var(--primary); box-shadow: var(--shadow-sm); }

/* 列表文章行 */
.article-list { display: flex; flex-direction: column; gap: 18px; }
.article-row {
  background: var(--card); border: 1px solid var(--line-soft); border-radius: var(--radius-lg);
  padding: 18px; display: grid; grid-template-columns: 230px 1fr auto; gap: 22px; align-items: center;
  transition: all .22s;
}
.article-row:hover { box-shadow: var(--shadow); border-color: #dce3ec; }
.article-row .thumb { border-radius: var(--radius); overflow: hidden; aspect-ratio: 16 / 10; }
.article-row .thumb img { width: 100%; height: 100%; object-fit: cover; }
.article-row .ar-body h3 { font-size: 19px; margin: 10px 0 8px; transition: color .2s; }
.article-row:hover h3 { color: var(--primary); }
.article-row .ar-body .excerpt { font-size: 13.5px; color: var(--muted); margin-bottom: 14px; }
.ar-actions { display: flex; flex-direction: column; gap: 8px; align-self: start; }
.ar-actions .icon-btn { background: #f8fafc; border: 1px solid var(--line-soft); width: 36px; height: 36px; }
.ar-actions .icon-btn:hover { color: var(--primary); }

/* 分页 */
.pagination { display: flex; justify-content: space-between; align-items: center; margin-top: 30px; gap: 14px; flex-wrap: wrap; }
.pagination .total { font-size: 13.5px; color: var(--faint); }
.page-nums { display: flex; gap: 8px; }
.page-nums a, .page-nums span {
  min-width: 38px; height: 38px; padding: 0 8px; border-radius: var(--radius-sm);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 14px; color: var(--body); background: var(--card); border: 1px solid var(--line);
  transition: all .18s;
}
.page-nums a:hover { border-color: var(--primary); color: var(--primary); }
.page-nums .current { background: var(--primary); border-color: var(--primary); color: #fff; font-weight: 700; }
.page-nums .disabled { color: #cbd5e1; }

/* ---------------- 侧边栏 ---------------- */
.sidebar { display: flex; flex-direction: column; gap: 20px; position: sticky; top: 88px; }
.widget { background: var(--card); border: 1px solid var(--line-soft); border-radius: var(--radius-lg); padding: 24px; }
.widget-title { font-size: 16.5px; margin-bottom: 16px; display: flex; align-items: center; gap: 8px; }
.widget-title .ic { color: var(--orange); }

.profile-widget { text-align: center; }
.profile-widget .avatar { width: 84px; height: 84px; border-radius: 50%; object-fit: cover; margin: 0 auto 12px; }
.profile-widget h3 { font-size: 18px; }
.profile-widget .role { color: var(--primary); font-size: 13px; font-weight: 600; margin: 4px 0 10px; }
.profile-widget .bio { font-size: 13px; color: var(--muted); margin-bottom: 18px; }
.profile-stats { display: grid; grid-template-columns: repeat(3, 1fr); padding-top: 16px; border-top: 1px solid var(--line-soft); }
.profile-stats div { text-align: center; }
.profile-stats b { display: block; font-size: 19px; color: var(--heading); }
.profile-stats span { font-size: 12px; color: var(--faint); }
.profile-widget .btn { margin-top: 18px; }

.hot-list li { display: flex; gap: 12px; padding: 10px 0; }
.hot-list li + li { border-top: 1px dashed var(--line-soft); }
.hot-rank { width: 22px; height: 22px; border-radius: 6px; background: #f1f5f9; color: var(--muted); font-size: 12px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; margin-top: 2px; }
.hot-list li:nth-child(1) .hot-rank { background: var(--orange); color: #fff; }
.hot-list li:nth-child(2) .hot-rank { background: #f97316; color: #fff; }
.hot-list li:nth-child(3) .hot-rank { background: #f59e0b; color: #fff; }
.hot-info h4 { font-size: 13.5px; font-weight: 600; line-height: 1.5; margin-bottom: 4px; transition: color .2s; }
.hot-info a:hover h4 { color: var(--primary); }
.hot-info span { font-size: 12px; color: var(--faint); }

.tag-cloud { display: flex; flex-wrap: wrap; gap: 8px; }
.tag-cloud .tag { height: 30px; border-radius: 999px; padding: 0 13px; font-size: 12.5px; }

/* ---------------- 文章详情 ---------------- */
.article-head { padding: 30px 0 20px; }
.article-head h1 { font-size: 30px; margin: 14px 0 12px; line-height: 1.35; }
.article-head .lead { color: var(--muted); font-size: 15px; max-width: 760px; }
.article-head-bar { display: flex; justify-content: space-between; align-items: center; margin-top: 22px; flex-wrap: wrap; gap: 14px; }
.article-head-bar .article-meta { margin: 0; }
.head-actions { display: flex; gap: 10px; }
.head-actions .btn span { color: var(--faint); font-size: 12.5px; font-weight: 500; }
.head-actions .btn:hover span { color: var(--primary); }

.article-layout { display: grid; grid-template-columns: 210px minmax(0,1fr) 300px; gap: 30px; align-items: start; padding-bottom: 56px; }

.toc { position: sticky; top: 88px; background: var(--card); border: 1px solid var(--line-soft); border-radius: var(--radius-lg); padding: 20px 18px; }
.toc-title { font-size: 13.5px; font-weight: 700; color: var(--heading); display: flex; align-items: center; gap: 7px; margin-bottom: 14px; }
.toc ol { display: flex; flex-direction: column; gap: 4px; }
.toc a { display: block; font-size: 13px; color: var(--muted); padding: 6px 10px; border-radius: 7px; border-left: none; transition: all .18s; line-height: 1.4; }
.toc a:hover { color: var(--primary); background: var(--primary-soft); }
.toc a.active { color: var(--primary); background: var(--primary-soft); font-weight: 600; }
.read-progress { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line-soft); }
.read-progress .rp-label { display: flex; justify-content: space-between; font-size: 12px; color: var(--faint); margin-bottom: 7px; }
.read-progress .rp-label b { color: var(--primary); }
.read-progress .progress { background: var(--line-soft); margin: 0; height: 6px; }
.read-progress .progress i { background: var(--primary); width: 24%; }

.article-body {
  background: var(--card); border: 1px solid var(--line-soft); border-radius: var(--radius-lg);
  padding: 28px; min-width: 0;
}
.article-cover { border-radius: var(--radius-lg); overflow: hidden; margin-bottom: 26px; aspect-ratio: 16/8; }
.article-cover img { width: 100%; height: 100%; object-fit: cover; }

/* 协议 / 说明类长文页面 */
.legal-wrap { margin: 0 auto 60px;}
.article-body .legal-toc { background: var(--primary-soft); border: 1px solid var(--line-soft); border-radius: var(--radius); padding: 16px 20px; margin: 4px 0 8px; counter-reset: none; }
.article-body .legal-toc h3 { font-size: 13.5px; letter-spacing: .04em; color: var(--title); margin: 0 0 10px; }
.article-body .legal-toc ol { display: flex; flex-wrap: wrap; gap: 8px 20px; list-style: none; padding: 0; margin: 0; counter-reset: none; }
.article-body .legal-toc ol li { padding: 0; margin: 0; font-size: 13.5px; counter-increment: none; }
.article-body .legal-toc ol li::before { content: none; }
.legal-toc a { color: var(--body); }
.legal-toc a:hover { color: var(--primary); }
.legal-meta { font-size: 13px; color: var(--text-3); margin: 0; }
.legal-updated { font-size: 13px; color: var(--text-3); margin-top: 18px; padding-top: 16px; border-top: 1px dashed var(--line); }
.article-body h2 { font-size: 22px; margin: 34px 0 14px; scroll-margin-top: 90px; }
.article-body h2:first-of-type { margin-top: 10px; }
.article-body p { margin-bottom: 14px; color: #3b475c; font-size: 15px; }

.callout { border-radius: var(--radius); padding: 16px 18px; font-size: 14px; margin: 18px 0; display: flex; gap: 12px; line-height: 1.65; }
.callout .co-ic { flex-shrink: 0; margin-top: 2px; }
.callout-quote { background: var(--primary-soft); border: 1px solid var(--primary-soft-2); color: #3730a3; }
.callout-warn { background: #fffbeb; border: 1px solid #fde68a; color: #92400e; }
.callout-success { background: #f0fdf4; border: 1px solid #bbf7d0; color: #166534; }
.callout-note { background: #f8fafc; border: 1px solid var(--line); color: var(--body); }
.callout b { font-weight: 700; }

.code-block { background: #0f172a; border-radius: var(--radius); overflow: hidden; margin: 18px 0; }
.code-bar { display: flex; align-items: center; justify-content: space-between; padding: 10px 16px; border-bottom: 1px solid rgba(255,255,255,.08); }
.code-dots { display: flex; gap: 6px; }
.code-dots i { width: 11px; height: 11px; border-radius: 50%; background: #ef4444; }
.code-dots i:nth-child(2) { background: #f59e0b; }
.code-dots i:nth-child(3) { background: #22c55e; }
.code-file { font-size: 12px; color: #94a3b8; margin-left: 12px; }
.code-copy { margin-left: auto; display: inline-flex; align-items: center; gap: 5px; color: #94a3b8; font-size: 12px; }
.code-copy:hover { color: #fff; }
.code-block pre { padding: 18px 20px; overflow-x: auto; }
.code-block code { font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace; font-size: 13px; line-height: 1.75; color: #e2e8f0; white-space: pre; }
.tok-kw { color: #c084fc; }
.tok-str { color: #86efac; }
.tok-fn { color: #7dd3fc; }
.tok-cm { color: #64748b; font-style: italic; }
.tok-im { color: #fca5a5; }

.steps { margin: 16px 0; counter-reset: step; display: flex; flex-direction: column; gap: 12px; }
.step { display: flex; gap: 13px; align-items: flex-start; }
.step-num { width: 24px; height: 24px; border-radius: 50%; background: var(--primary-soft); color: var(--primary); font-size: 12.5px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; margin-top: 2px; }
.step p { margin: 0; font-size: 14.5px; color: #3b475c; }

.article-body h3 { font-size: 16.5px; margin: 24px 0 10px; color: var(--title); }
.article-body p code, .article-body li code, .article-body td code { background: #eef2ff; color: #4338ca; padding: 2px 6px; border-radius: 5px; font-family: "SFMono-Regular", Consolas, Menlo, monospace; font-size: 12.5px; white-space: nowrap; }
.article-body ul, .article-body ol { margin: 0 0 14px; padding-left: 4px; list-style: none; }
.article-body ul li, .article-body ol li { position: relative; padding-left: 20px; margin-bottom: 8px; font-size: 14.5px; line-height: 1.8; color: #3b475c; }
.article-body ul li::before { content: ""; position: absolute; left: 4px; top: 11px; width: 6px; height: 6px; border-radius: 50%; background: var(--primary); opacity: .55; }
.article-body ol { counter-reset: olc; }
.article-body ol li { counter-increment: olc; padding-left: 26px; }
.article-body ol li::before { content: counter(olc); position: absolute; left: 0; top: 2px; width: 18px; height: 18px; border-radius: 50%; background: var(--primary-soft); color: var(--primary); font-size: 11px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; }

.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); margin: 18px 0; }
.data-table { width: 100%; border-collapse: collapse; font-size: 13.5px; min-width: 520px; }
.data-table th { background: #f8fafc; text-align: left; padding: 12px 16px; color: var(--muted); font-weight: 600; border-bottom: 1px solid var(--line); white-space: nowrap; }
.data-table td { padding: 12px 16px; border-bottom: 1px solid var(--line-soft); color: var(--body); white-space: nowrap; }
.data-table tr:last-child td { border-bottom: none; }
.star { color: #f59e0b; }

.article-end-bar { display: flex; align-items: center; gap: 12px; margin-top: 34px; padding-top: 24px; border-top: 1px solid var(--line-soft); flex-wrap: wrap; }
.article-end-bar .share-label { margin-left: auto; font-size: 13px; color: var(--faint); }
.like-btn { background: var(--primary-soft); color: var(--primary); }
.like-btn:hover { background: var(--primary); color: #fff; }
.like-btn.liked { background: var(--primary); color: #fff; }
.share-dot { width: 36px; height: 36px; border-radius: 50%; background: #f1f5f9; color: var(--muted); display: inline-flex; align-items: center; justify-content: center; }
.share-dot:hover { background: var(--primary-soft); color: var(--primary); }

/* 评论 */
.comments { background: var(--card); border: 1px solid var(--line-soft); border-radius: var(--radius-lg); padding: 26px 28px; margin-top: 22px; }
.comments-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 18px; }
.comments-head h3 { font-size: 18px; }
.comment-form { background: #f8fafc; border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; margin-bottom: 26px; }
.comment-form textarea { width: 100%; border: none; background: transparent; outline: none; resize: none; height: 56px; font-size: 14px; color: var(--heading); font-family: inherit; }
.comment-form-bar { display: flex; justify-content: space-between; align-items: center; margin-top: 8px; }
.form-tools { display: flex; gap: 12px; color: var(--faint); }
.form-tools button:hover { color: var(--primary); }

.comment { display: flex; gap: 13px; padding: 18px 0; }
.comment + .comment { border-top: 1px solid var(--line-soft); }
.comment > img { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.comment-main { flex: 1; min-width: 0; }
.comment-meta { display: flex; align-items: center; gap: 8px; margin-bottom: 5px; flex-wrap: wrap; }
.comment-meta b { font-size: 14px; color: var(--heading); }
.comment-meta .op-tag { background: var(--primary-soft); color: var(--primary); font-size: 10.5px; font-weight: 700; border-radius: 5px; padding: 1px 6px; }
.comment-meta time { font-size: 12px; color: var(--faint); }
.comment-main > p { font-size: 14px; color: var(--body); margin-bottom: 8px; }
.comment-actions { display: flex; align-items: center; gap: 14px; font-size: 12.5px; color: var(--faint); }
.comment-actions button { display: inline-flex; align-items: center; gap: 4px; color: var(--faint); font-size: 12.5px; }
.comment-actions button:hover { color: var(--primary); }
.comment.reply { margin-left: 53px; }
.load-more-comments { width: 100%; text-align: center; padding: 13px; color: var(--muted); font-size: 13.5px; border-top: 1px solid var(--line-soft); }
.load-more-comments:hover { color: var(--primary); }

.related-mini { display: flex; flex-direction: column; gap: 12px; }
.related-item { display: flex; gap: 11px; }
.related-item img { width: 58px; height: 58px; border-radius: var(--radius-sm); object-fit: cover; flex-shrink: 0; }
.related-item h4 { font-size: 13px; font-weight: 600; line-height: 1.5; margin-bottom: 3px; transition: color .2s; }
.related-item a:hover h4 { color: var(--primary); }
.related-item span { font-size: 11.5px; color: var(--faint); }

.link-log { border: 1px solid var(--line-soft); border-radius: var(--radius); padding: 13px 15px; }
.link-log + .link-log { margin-top: 10px; }
.link-log h4 { font-size: 13.5px; margin-bottom: 5px; }
.link-log .ll-meta { display: flex; justify-content: space-between; font-size: 12px; color: var(--faint); }

/* ---------------- 学习记录页 ---------------- */
.record-day { margin-bottom: 26px; }
.day-head { display: inline-flex; align-items: center; gap: 10px; background: var(--primary-soft); color: var(--primary); font-size: 13.5px; font-weight: 700; border-radius: 999px; padding: 7px 16px; margin-bottom: 16px; }
.day-head .day-sep { color: #a5b4fc; }
.day-head .day-total { font-weight: 500; color: var(--primary); opacity: .85; }

.record-card {
  position: relative; background: var(--card); border: 1px solid var(--line-soft);
  border-radius: var(--radius-lg); padding: 20px 24px 20px 30px; margin-bottom: 16px;
  transition: all .2s;
}
.record-card:hover { box-shadow: var(--shadow-sm); border-color: #dce3ec; }
.record-card::before {
  content: ""; position: absolute; left: 11px; top: 28px; width: 9px; height: 9px;
  border-radius: 50%; background: var(--primary); box-shadow: 0 0 0 4px var(--primary-soft);
}
.record-card.dot-amber::before { background: #f59e0b; box-shadow: 0 0 0 4px var(--amber-soft); }
.record-card.dot-gray::before { background: #94a3b8; box-shadow: 0 0 0 4px #f1f5f9; }
.rc-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 8px; }
.rc-head-left { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.rc-time { font-size: 13px; font-weight: 700; color: var(--primary); }
.rc-head-right { display: flex; align-items: center; gap: 14px; color: var(--faint); font-size: 12.5px; }
.rc-head-right .meta-item { display: inline-flex; align-items: center; gap: 4px; }
.rc-icon-btn { color: var(--faint); display: inline-flex; }
.rc-icon-btn:hover { color: var(--primary); }
.record-card h3 { font-size: 16.5px; margin-bottom: 6px; }
.record-card > p { font-size: 14px; color: var(--muted); margin-bottom: 12px; }
.rc-chips { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 12px; }
.rc-chips .chip-label { font-size: 12.5px; color: var(--faint); }
.rc-attachments { display: flex; flex-wrap: wrap; gap: 10px; }
.attach {
  display: inline-flex; align-items: center; gap: 7px;
  background: #f8fafc; border: 1px solid var(--line-soft);
  border-radius: var(--radius-sm); padding: 7px 13px;
  font-size: 12.5px; color: var(--body); transition: all .18s;
}
.attach:hover { border-color: var(--primary-soft-2); color: var(--primary); }
.attach.output { background: var(--primary-soft); border-color: var(--primary-soft-2); color: var(--primary); font-weight: 600; }

/* 侧栏：本周概览 */
.week-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 18px; }
.week-stat { background: var(--bg); border-radius: var(--radius-sm); padding: 12px 10px; text-align: center; }
.week-stat b { display: block; font-size: 18px; color: var(--heading); }
.week-stat span { font-size: 11.5px; color: var(--faint); }
.dir-rows { display: flex; flex-direction: column; gap: 10px; }
.dir-row { display: flex; align-items: center; gap: 9px; font-size: 13px; }
.dir-row .d { width: 8px; height: 8px; border-radius: 3px; flex-shrink: 0; }
.dir-row span { color: var(--body); }
.dir-row b { margin-left: auto; color: var(--heading); font-weight: 700; }

.heatmap-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 14px; }
.heatmap-head h3 { font-size: 16.5px; }
.heatmap-head span { font-size: 12.5px; color: var(--faint); }
.heatmap { display: grid; grid-template-columns: repeat(8, 1fr); gap: 5px; }
.heatmap i { aspect-ratio: 1; border-radius: 4px; background: var(--line-soft); }
.heatmap i.l1 { background: #c7d2fe; }
.heatmap i.l2 { background: #818cf8; }
.heatmap i.l3 { background: #6366f1; }
.heatmap i.l4 { background: #4338ca; }
.heatmap i.today { outline: 2px solid var(--primary); outline-offset: 1px; }
.heatmap-legend { display: flex; justify-content: flex-end; align-items: center; gap: 4px; margin-top: 10px; font-size: 11px; color: var(--faint); }
.heatmap-legend i { width: 11px; height: 11px; border-radius: 3px; }

.habit-card {
  background: linear-gradient(135deg, #5149e8 0%, #7c3aed 100%);
  border-radius: var(--radius-lg); padding: 26px; color: #fff;
}
.habit-card .habit-ic { width: 40px; height: 40px; border-radius: 11px; background: rgba(255,255,255,.18); display: flex; align-items: center; justify-content: center; margin-bottom: 14px; }
.habit-card h3 { color: #fff; font-size: 18px; margin-bottom: 10px; }
.habit-card p { font-size: 13px; opacity: .88; line-height: 1.7; }

/* ---------------- 数据看板 ---------------- */
.range-tabs { display: inline-flex; background: var(--line-soft); border-radius: var(--radius); padding: 4px; }
.range-tabs button { height: 34px; padding: 0 18px; border-radius: 8px; font-size: 13.5px; font-weight: 600; color: var(--muted); }
.range-tabs button.active { background: var(--card); color: var(--primary); box-shadow: var(--shadow-sm); }

.metric-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 18px; margin-bottom: 24px; }
.metric-card { background: var(--card); border: 1px solid var(--line-soft); border-radius: var(--radius-lg); padding: 22px; transition: all .22s; }
.metric-card:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.metric-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.metric-top span { font-size: 13.5px; color: var(--muted); }
.metric-ic { width: 36px; height: 36px; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center; }
.metric-card b.big { display: block; font-size: 30px; color: var(--heading); font-weight: 800; line-height: 1.15; margin-bottom: 8px; }
.metric-delta { font-size: 12.5px; font-weight: 600; display: inline-flex; align-items: center; gap: 3px; }
.metric-delta.up { color: var(--green); }
.metric-delta.flat { color: var(--amber); }

.chart-card { background: var(--card); border: 1px solid var(--line-soft); border-radius: var(--radius-lg); padding: 26px 28px; margin-bottom: 24px; }
.chart-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; margin-bottom: 10px; }
.chart-head h3 { font-size: 18px; }
.chart-head p { font-size: 13px; color: var(--faint); margin-top: 4px; }
.chart-legend { display: flex; gap: 18px; font-size: 12.5px; color: var(--muted); }
.chart-legend span { display: inline-flex; align-items: center; gap: 6px; }
.lg-line { width: 18px; height: 3px; border-radius: 2px; background: var(--primary); }
.lg-dash { width: 18px; border-top: 2px dashed #94a3b8; }
.chart-svg { width: 100%; height: auto; display: block; }

.dash-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.hbar-list { display: flex; flex-direction: column; gap: 18px; padding-top: 6px; }
.hbar-item .hbar-top { display: flex; justify-content: space-between; font-size: 13.5px; margin-bottom: 8px; }
.hbar-top span { display: inline-flex; align-items: center; gap: 8px; color: var(--body); font-weight: 500; }
.hbar-top b { color: var(--heading); }
.hbar-track { height: 9px; border-radius: 99px; background: var(--line-soft); overflow: hidden; }
.hbar-fill { height: 100%; border-radius: 99px; }

.week-bars { display: flex; align-items: flex-end; justify-content: space-between; gap: 10px; height: 210px; padding-top: 18px; }
.week-bar-col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 9px; height: 100%; justify-content: flex-end; }
.week-bar { width: 100%; max-width: 34px; border-radius: 7px 7px 4px 4px; background: linear-gradient(180deg, #818cf8, #4f46e5); min-height: 6px; transition: opacity .2s; position: relative; }
.week-bar-col:hover .week-bar { opacity: .82; }
.week-bar-val { position: absolute; top: -21px; left: 50%; transform: translateX(-50%); font-size: 11px; color: var(--muted); white-space: nowrap; }
.week-bar-col small { font-size: 11.5px; color: var(--faint); }

/* ---------------- 响应式：平板 ---------------- */
@media (max-width: 1023px) {
  .container { padding: 0 20px; }
  .section { padding: 52px 0; }

  /* 导航 */
  .menu-toggle { display: inline-flex; }
  .main-nav {
    position: fixed; top: 68px; left: 0; right: 0;
    background: var(--card); border-bottom: 1px solid var(--line);
    flex-direction: column; align-items: stretch; gap: 2px;
    padding: 12px 20px 18px; margin: 0;
    box-shadow: var(--shadow-lg);
    transform: translateY(-12px); opacity: 0; pointer-events: none;
    transition: all .22s;
  }
  .main-nav.open { transform: translateY(0); opacity: 1; pointer-events: auto; }
  .main-nav a { padding: 12px 14px; font-size: 15px; border-radius: var(--radius-sm); }
  .search-box { width: 160px; }

  /* Hero */
  .hero-grid { grid-template-columns: 1fr; gap: 40px; }
  .hero-visual { max-width: 560px; }
  .float-new { left: 0; }
  .float-today { right: 0; }

  /* 方向 */
  .dir-grid { grid-template-columns: repeat(2, 1fr); }
  .subscribe-card { grid-column: span 2; }

  /* 文章 */
  .post-grid { grid-template-columns: repeat(2, 1fr); }
  .feature-card { grid-template-columns: 1fr; }
  .feature-img { min-height: 240px; }

  /* 记录 */
  .records-grid { grid-template-columns: 1fr; gap: 36px; }

  /* 数据带 */
  .stats-band .container { grid-template-columns: repeat(3, 1fr); gap: 26px; }
  .stats-band .band-title { grid-column: 1 / -1; }
  .band-stat { border-left: none; padding-left: 0; }

  /* 页脚 */
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 30px; }
  .footer-brand { grid-column: 1 / -1; }
  .footer-copy { grid-column: 1 / -1; text-align: left; }

  /* 内页 */
  .layout-2col { grid-template-columns: 1fr; }
  .sidebar { position: static; display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }

  /* 详情 */
  .article-layout { grid-template-columns: minmax(0,1fr) 290px; }
  .article-layout .sidebar { grid-template-columns: 1fr; gap: 20px; }
  .toc { grid-column: 1 / -1; position: static; }
  .toc ol { display: flex; flex-wrap: wrap; gap: 4px; }
  .toc li { display: inline; }
  .read-progress { display: none; }

  /* 看板 */
  .metric-grid { grid-template-columns: repeat(3, 1fr); }
  .dash-cols { grid-template-columns: 1fr; }
}

/* ---------------- 响应式：手机 ---------------- */
@media (max-width: 640px) {
  body { font-size: 14.5px; }
  .container { padding: 0 16px; }
  .section { padding: 40px 0; }
  .section-head h2 { font-size: 22px; }

  /* 头部 */
  .header-inner { height: 60px; gap: 12px; }
  .main-nav { top: 60px; }
  .brand-text small { display: none; }
  .search-box { display: none; }
  .icon-btn { width: 36px; height: 36px; }
  .brand-logo { width: 36px; height: 36px; }

  /* Hero */
  .hero { padding: 36px 0 32px; }
  .hero h1 { font-size: 28px; }
  .hero-stats { grid-template-columns: repeat(2, 1fr); gap: 18px 0; }
  .hero-stat { padding-right: 0; margin-right: 0; border-right: none; }
  .hero-stat:nth-child(odd) { border-right: 1px solid var(--line); padding-right: 16px; }
  .hero-actions .btn { flex: 1; }
  .float-new { position: static; width: 100%; margin-top: 12px; }
  .float-today { position: static; width: 100%; margin-top: 12px; }
  .hero-float { box-shadow: var(--shadow); }

  /* 方向 */
  .dir-grid { grid-template-columns: 1fr; }
  .subscribe-card { grid-column: span 1; padding: 24px; }
  .subscribe-form { flex-direction: column; }
  .subscribe-form .btn { width: 100%; }

  /* 文章 */
  .feature-body { padding: 22px 20px; }
  .feature-body h3 { font-size: 19px; }
  .post-grid { grid-template-columns: 1fr; }

  /* 首页记录 */
  .tl-item { grid-template-columns: 1fr; gap: 6px; padding: 16px 18px; }
  .tl-time { text-align: left; display: flex; gap: 8px; align-items: baseline; }
  .records-left h2 { font-size: 23px; }

  /* 数据带 */
  .stats-band { padding: 38px 0; }
  .stats-band .container { grid-template-columns: repeat(2, 1fr); gap: 22px; }
  .band-stat b { font-size: 24px; }

  /* 页脚 */
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 24px; }
  .footer-bottom { justify-content: center; text-align: center; }

  /* 内页 */
  .page-title { font-size: 25px; }
  .article-head h1 { font-size: 22px; }
  .filter-bar { flex-direction: column; align-items: stretch; }
  .article-row { grid-template-columns: 1fr; gap: 14px; }
  .article-row .thumb { aspect-ratio: 16 / 8; }
  .ar-actions { flex-direction: row; position: absolute; }
  .article-row { position: relative; }
  .ar-actions { position: absolute; top: 28px; right: 26px; }
  .ar-actions .icon-btn.bookmark { }
  .article-row .ar-body h3 { font-size: 17px; padding-right: 44px; }

  .sidebar { grid-template-columns: 1fr; }

  /* 详情 */
  .article-layout { grid-template-columns: 1fr; }
  .article-body { padding: 20px 18px; }
  .article-body h2 { font-size: 19px; }
  .comments { padding: 20px 18px; }
  .comment.reply { margin-left: 0; }
  .article-end-bar .share-label { margin-left: 0; width: 100%; }
  .head-actions { width: 100%; }
  .head-actions .btn { flex: 1; }

  /* 记录页 */
  .record-card { padding: 18px 16px 18px 24px; }
  .rc-head-right { width: 100%; justify-content: flex-end; }
  .week-stats { grid-template-columns: repeat(3, 1fr); }

  /* 看板 */
  .metric-grid { grid-template-columns: repeat(2, 1fr); }
  .metric-card { padding: 18px; }
  .metric-card b.big { font-size: 24px; }
  .chart-card { padding: 20px 16px; }
  .week-bars { gap: 4px; }

  .view-toggle { width: 100%; justify-content: center; }
  .page-head-row .view-toggle { width: auto; }
}

@media (max-width: 380px) {
  .metric-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
}

/* ============================================================
   知识地图 / 关于我 — 新增组件
   ============================================================ */

/* ---------- 知识地图 ---------- */
.km-hero { padding: 40px 0 30px; }
.km-hero-row { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; flex-wrap: wrap; }
.km-hero-row h1 { font-size: 30px; margin-bottom: 6px; }
.km-hero-row p { color: var(--muted); font-size: 14.5px; }
.km-tools { display: flex; gap: 8px; flex-wrap: wrap; }

/* 知识体系全景图 */
.km-overview-card {
  background: var(--card); border: 1px solid var(--line-soft);
  border-radius: var(--radius-lg); padding: 30px; margin-bottom: 28px;
  position: relative; overflow: hidden;
}
.km-overview-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.km-overview-head h2 { font-size: 19px; }
.km-overview-head .legend { display: flex; gap: 18px; font-size: 12.5px; color: var(--muted); }
.km-overview-head .legend i { width: 10px; height: 10px; border-radius: 50%; display: inline-block; margin-right: 5px; vertical-align: middle; }
.km-overview-head .legend i.d1 { background: var(--primary); }
.km-overview-head .legend i.d2 { background: #c7d2fe; }
.km-overview-head .legend i.d3 { background: var(--line-soft); }
.km-overview-desc { font-size: 12.5px; color: var(--faint); margin-bottom: 20px; }
.km-map { position: relative; width: 100%; aspect-ratio: 16 / 7.5; }
.km-map svg { width: 100%; height: 100%; display: block; }
.km-map-node {
  position: absolute; width: 148px; height: 148px; border-radius: 50%;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  color: #fff; font-weight: 700; text-align: center;
  box-shadow: 0 10px 30px rgba(0,0,0,.12);
  transition: transform .2s;
  transform: translate(-50%, -50%);
}
.km-map-node:hover { transform: translate(-50%, -50%) scale(1.04); }
.km-map-node b { font-size: 17px; line-height: 1.25; }
.km-map-node small { font-size: 11px; opacity: .85; font-weight: 500; margin-top: 2px; }
.km-map-node.core { width: 170px; height: 170px; background: linear-gradient(135deg, #4f46e5, #7c3aed); z-index: 2; }
.km-map-node.n1 { background: linear-gradient(135deg, #6366f1, #818cf8); }
.km-map-node.n2 { background: linear-gradient(135deg, #7c3aed, #a78bfa); }
.km-map-node.n3 { background: linear-gradient(135deg, #0d9488, #2dd4bf); }
.km-map-node.n4 { background: linear-gradient(135deg, #d97706, #f59e0b); }
.km-map-node.n5 { background: linear-gradient(135deg, #ea580c, #fb923c); }
.km-map-node.n6 { background: linear-gradient(135deg, #0891b2, #22d3ee); }
.km-map-subnodes { position: absolute; display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; max-width: 280px; transform: translate(-50%, -50%); }
.km-map-subnodes .s {
  padding: 4px 12px; border-radius: 999px; font-size: 11.5px; font-weight: 600;
  color: var(--muted); background: var(--card); border: 1px solid var(--line-soft); white-space: nowrap;
}
.km-map-subnodes .s.active { background: var(--primary-soft); color: var(--primary); border-color: var(--primary-soft-2); }

/* 六大知识域卡片 */
.km-domains-head { display: flex; justify-content: space-between; align-items: flex-end; margin-bottom: 18px; gap: 14px; flex-wrap: wrap; }
.km-domains-head h2 { font-size: 24px; }
.km-domains-head p { font-size: 13.5px; color: var(--muted); margin-top: 4px; }
.km-domains-head .km-tabs { display: inline-flex; gap: 6px; background: var(--line-soft); border-radius: 999px; padding: 4px; }
.km-domains-head .km-tabs button {
  height: 30px; padding: 0 14px; border-radius: 999px; font-size: 12.5px; font-weight: 600; color: var(--muted);
}
.km-domains-head .km-tabs button.active { background: var(--card); color: var(--primary); box-shadow: var(--shadow-sm); }

.km-domain-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-bottom: 36px; }
.km-domain-card {
  background: var(--card); border: 1px solid var(--line-soft); border-radius: var(--radius-lg);
  padding: 22px; transition: all .22s; display: flex; flex-direction: column;
}
.km-domain-card:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.km-domain-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 12px; }
.km-domain-title { display: flex; align-items: center; gap: 12px; }
.km-domain-ic { width: 42px; height: 42px; border-radius: 11px; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.km-domain-title h3 { font-size: 16px; margin-bottom: 2px; }
.km-domain-title small { font-size: 11.5px; color: var(--faint); }
.km-domain-badge { font-size: 11.5px; font-weight: 700; padding: 4px 10px; border-radius: 6px; white-space: nowrap; flex-shrink: 0; }
.km-domain-pct { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 10px; }
.km-domain-pct b { font-size: 22px; color: var(--heading); }
.km-domain-pct b span { font-size: 12px; color: var(--faint); font-weight: 500; margin-left: 3px; }
.km-domain-pct small { font-size: 11.5px; color: var(--faint); }
.km-domain-bar { height: 6px; border-radius: 99px; background: var(--line-soft); overflow: hidden; margin-bottom: 14px; }
.km-domain-bar i { display: block; height: 100%; border-radius: 99px; }
.km-domain-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.km-domain-tags .t { font-size: 11.5px; padding: 3px 11px; border-radius: 999px; background: #f8fafc; color: var(--muted); }
.km-domain-tags .t.more { background: transparent; color: var(--primary); font-weight: 600; }

/* 环形分布 + 学习路径 */
.km-dual { display: grid; grid-template-columns: .85fr 1.15fr; gap: 24px; margin-bottom: 28px; }
.km-card { background: var(--card); border: 1px solid var(--line-soft); border-radius: var(--radius-lg); padding: 26px 28px; }
.km-card h3 { font-size: 18px; margin-bottom: 18px; display: flex; justify-content: space-between; align-items: center; }
.km-card h3 small { font-size: 12.5px; color: var(--faint); font-weight: 500; }

/* 环形图 */
.km-ring-row { display: grid; grid-template-columns: 220px 1fr; gap: 22px; align-items: center; }
.km-ring-wrap { position: relative; width: 220px; height: 220px; }
.km-ring-wrap svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.km-ring-center { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.km-ring-center b { font-size: 30px; color: var(--heading); font-weight: 800; line-height: 1.15; }
.km-ring-center span { font-size: 12px; color: var(--faint); }
.km-ring-legend { display: flex; flex-direction: column; gap: 12px; }
.km-ring-legend li { display: flex; align-items: center; gap: 10px; font-size: 13px; }
.km-ring-legend li i { width: 10px; height: 10px; border-radius: 3px; flex-shrink: 0; }
.km-ring-legend li span { flex: 1; color: var(--muted); }
.km-ring-legend li b { color: var(--heading); font-weight: 700; font-size: 13px; min-width: 42px; text-align: right; }

/* 推荐学习路径 */
.km-path-list { display: flex; flex-direction: column; gap: 14px; }
.km-path-step {
  display: grid; grid-template-columns: 56px 1fr auto; gap: 16px; align-items: center;
  padding: 16px 18px; background: var(--bg); border-radius: var(--radius); border: 1px solid transparent;
  transition: all .18s;
}
.km-path-step:hover { background: var(--card); border-color: var(--primary-soft-2); box-shadow: var(--shadow-sm); }
.km-path-step .n {
  width: 42px; height: 42px; border-radius: 12px; background: var(--line-soft); color: var(--faint);
  font-size: 18px; font-weight: 800; display: inline-flex; align-items: center; justify-content: center;
}
.km-path-step.done .n { background: var(--green-soft); color: var(--green); }
.km-path-step.done .status { color: var(--green); }
.km-path-step.half .n { background: var(--primary-soft); color: var(--primary); }
.km-path-step.half .status { color: var(--primary); }
.km-path-step.todo .status { color: var(--faint); }
.km-path-step h4 { font-size: 15px; margin-bottom: 4px; }
.km-path-step p { font-size: 12.5px; color: var(--muted); }
.km-path-step .status { font-size: 12px; font-weight: 700; white-space: nowrap; }
.km-path-step .status .bar { display: inline-block; width: 50px; height: 4px; border-radius: 99px; background: var(--line-soft); vertical-align: middle; margin-right: 6px; overflow: hidden; }
.km-path-step .status .bar i { display: block; height: 100%; background: var(--primary); border-radius: 99px; }
.km-path-step .status .bar.full i { background: var(--green); width: 100%; }

/* 知识点明细表 */
.km-detail-card { background: var(--card); border: 1px solid var(--line-soft); border-radius: var(--radius-lg); margin-bottom: 28px; overflow: hidden; }
.km-detail-head { padding: 22px 26px; display: flex; justify-content: space-between; align-items: center; gap: 14px; flex-wrap: wrap; }
.km-detail-head h3 { font-size: 18px; }
.km-detail-head .btn-sm { height: 34px; }
.km-detail-table-wrap { overflow-x: auto; }
.km-detail-table { width: 100%; border-collapse: collapse; min-width: 880px; }
.km-detail-table thead { background: #f8fafc; }
.km-detail-table th { text-align: left; padding: 14px 20px; font-size: 13px; font-weight: 600; color: var(--muted); border-bottom: 1px solid var(--line-soft); white-space: nowrap; }
.km-detail-table td { padding: 15px 20px; font-size: 13.5px; border-bottom: 1px solid var(--line-soft); color: var(--body); }
.km-detail-table tr:last-child td { border-bottom: none; }
.km-detail-table .k-name { color: var(--heading); font-weight: 600; }
.km-detail-table .mastery-cell { display: flex; align-items: center; gap: 10px; min-width: 140px; }
.km-detail-table .mastery-cell .bar { flex: 1; height: 6px; border-radius: 99px; background: var(--line-soft); overflow: hidden; min-width: 80px; }
.km-detail-table .mastery-cell .bar i { display: block; height: 100%; border-radius: 99px; }
.km-detail-table .mastery-cell b { font-size: 12.5px; color: var(--faint); font-weight: 600; min-width: 34px; text-align: right; }
.km-detail-table .status-tag { font-size: 11.5px; font-weight: 700; padding: 3px 9px; border-radius: 6px; }
.km-detail-table .status-tag.done { background: var(--green-soft); color: var(--green); }
.km-detail-table .status-tag.half { background: var(--primary-soft); color: var(--primary); }
.km-detail-table .status-tag.learn { background: var(--amber-soft); color: var(--amber); }
.km-detail-table .action-link { font-size: 12.5px; color: var(--primary); margin-right: 10px; font-weight: 600; }
.km-detail-table .action-link:hover { text-decoration: underline; }

.km-cta {
  background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
  border-radius: var(--radius-xl); padding: 36px 40px; margin-bottom: 48px;
  display: flex; justify-content: space-between; align-items: center; gap: 20px; flex-wrap: wrap; color: #fff;
}
.km-cta h3 { color: #fff; font-size: 20px; margin-bottom: 8px; }
.km-cta p { font-size: 14px; opacity: .9; max-width: 460px; }
.km-cta .btn-white { flex-shrink: 0; }

/* ---------- 关于我 ---------- */
.about-hero { padding: 48px 0 32px; }
.about-hero .container { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }
.about-hero h1 { font-size: clamp(30px, 4vw, 42px); margin-bottom: 18px; line-height: 1.3; letter-spacing: -.5px; }
.about-hero h1 b { color: var(--primary); }
.about-hero .eyebrow { display: inline-flex; align-items: center; gap: 8px; background: var(--card); border: 1px solid var(--line); border-radius: 999px; padding: 6px 14px; font-size: 12.5px; font-weight: 700; color: var(--primary); box-shadow: var(--shadow-sm); margin-bottom: 22px; }
.about-hero p.lead { color: var(--muted); font-size: 15px; max-width: 480px; margin-bottom: 22px; }
.about-hero .hero-tags { margin-bottom: 28px; }
.about-hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 26px; }
.about-side { display: flex; flex-direction: column; gap: 18px; }
.about-side-card { background: var(--card); border: 1px solid var(--line-soft); border-radius: var(--radius-lg); padding: 18px 20px; display: flex; align-items: center; gap: 16px; }
.about-side-card .ic { width: 40px; height: 40px; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.about-side-card .content h4 { font-size: 13px; color: var(--faint); font-weight: 600; margin-bottom: 3px; }
.about-side-card .content b { font-size: 15px; color: var(--heading); font-weight: 700; }
.about-side-card .arrow { color: var(--faint); margin-left: auto; }

/* 成长时间线 */
.growth-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 18px; flex-wrap: wrap; margin-bottom: 22px; }
.growth-head h2 { font-size: 24px; }
.growth-head p { font-size: 13.5px; color: var(--muted); }
.growth-timeline { position: relative; padding: 8px 0 8px 28px; }
.growth-timeline::before { content: ""; position: absolute; left: 8px; top: 0; bottom: 0; width: 2px; background: var(--line-soft); }
.gt-item { position: relative; padding: 18px 22px 18px 0; }
.gt-item::before {
  content: ""; position: absolute; left: -24px; top: 24px; width: 12px; height: 12px; border-radius: 50%;
  background: var(--card); border: 3px solid var(--primary); box-shadow: 0 0 0 4px var(--primary-soft);
}
.gt-item.l1::before { border-color: var(--green); box-shadow: 0 0 0 4px var(--green-soft); }
.gt-item.l2::before { border-color: var(--violet); box-shadow: 0 0 0 4px var(--violet-soft); }
.gt-item.l3::before { border-color: var(--amber); box-shadow: 0 0 0 4px var(--amber-soft); }
.gt-item time { display: block; font-size: 12px; color: var(--faint); font-weight: 600; letter-spacing: .5px; margin-bottom: 4px; }
.gt-item h4 { font-size: 15px; margin-bottom: 5px; }
.gt-item p { font-size: 13.5px; color: var(--muted); line-height: 1.65; }
.gt-item .gt-badge { display: inline-block; font-size: 11px; font-weight: 700; background: var(--primary-soft); color: var(--primary); border-radius: 999px; padding: 2px 9px; margin-left: 8px; }

/* 技能栈 */
.skills-section { padding: 48px 0; }
.skills-head { margin-bottom: 22px; }
.skills-head h2 { font-size: 24px; margin-bottom: 6px; }
.skills-head p { font-size: 13.5px; color: var(--muted); }
.skill-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.skill-group { background: var(--card); border: 1px solid var(--line-soft); border-radius: var(--radius-lg); padding: 22px; }
.skill-group h3 { font-size: 15px; margin-bottom: 18px; display: flex; justify-content: space-between; align-items: center; }
.skill-group h3 .dot { width: 8px; height: 8px; border-radius: 3px; background: var(--primary); }
.skill-group h3 .hint { font-size: 11.5px; color: var(--faint); font-weight: 500; }
.skill-item { margin-bottom: 14px; }
.skill-item:last-child { margin-bottom: 0; }
.skill-item .row { display: flex; justify-content: space-between; font-size: 13px; margin-bottom: 6px; }
.skill-item .row b { font-weight: 600; color: var(--heading); }
.skill-item .row small { color: var(--faint); font-weight: 600; }
.skill-item .bar { height: 6px; border-radius: 99px; background: var(--line-soft); overflow: hidden; }
.skill-item .bar i { display: block; height: 100%; border-radius: 99px; }

/* 项目网格 */
.projects-section { padding: 48px 0; }
.projects-head { display: flex; justify-content: space-between; align-items: flex-end; margin-bottom: 22px; gap: 14px; flex-wrap: wrap; }
.projects-head h2 { font-size: 24px; }
.projects-head p { font-size: 13.5px; color: var(--muted); margin-top: 4px; }
.projects-head a { font-size: 13px; font-weight: 600; color: var(--primary); white-space: nowrap; }
.project-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.project-card {
  background: var(--card); border: 1px solid var(--line-soft); border-radius: var(--radius-lg);
  overflow: hidden; transition: all .22s;
}
.project-card:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.project-thumb { aspect-ratio: 16 / 10.5; overflow: hidden; position: relative; }
.project-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s; }
.project-card:hover .project-thumb img { transform: scale(1.05); }
.project-tags { position: absolute; top: 12px; left: 12px; display: flex; gap: 6px; }
.project-body { padding: 18px 20px 20px; }
.project-body h3 { font-size: 15px; margin-bottom: 5px; }
.project-body p { font-size: 13px; color: var(--muted); margin-bottom: 12px; }
.project-stats { display: flex; gap: 14px; font-size: 12px; color: var(--faint); }
.project-stats span { display: inline-flex; align-items: center; gap: 4px; }

/* 工具 + 学习心法 */
.about-tool-tip { padding: 48px 0; }
.at-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 28px; }
.at-card { background: var(--card); border: 1px solid var(--line-soft); border-radius: var(--radius-lg); padding: 28px; }
.at-card h2 { font-size: 22px; margin-bottom: 6px; }
.at-card > p { font-size: 13.5px; color: var(--muted); margin-bottom: 22px; }

.tool-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 22px; }
.tool-card {
  background: #f8fafc; border: 1px solid var(--line-soft); border-radius: var(--radius);
  padding: 16px 12px; text-align: center; transition: all .18s;
}
.tool-card:hover { background: var(--card); border-color: var(--primary-soft-2); transform: translateY(-2px); box-shadow: var(--shadow-sm); }
.tool-card .tic { font-size: 20px; margin-bottom: 6px; display: block; }
.tool-card h4 { font-size: 13px; margin-bottom: 3px; }
.tool-card small { font-size: 11px; color: var(--faint); }

.at-footer-note { font-size: 12px; color: var(--faint); background: var(--bg); border-radius: var(--radius-sm); padding: 12px 14px; line-height: 1.6; }

.tip-list { display: flex; flex-direction: column; gap: 14px; }
.tip-item { display: flex; gap: 14px; align-items: flex-start; }
.tip-num {
  width: 28px; height: 28px; border-radius: 50%; background: var(--primary-soft); color: var(--primary);
  font-size: 13px; font-weight: 800; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; margin-top: 1px;
}
.tip-item h4 { font-size: 14px; margin-bottom: 3px; }
.tip-item p { font-size: 13px; color: var(--muted); line-height: 1.6; }

.about-final-cta {
  background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
  border-radius: var(--radius-xl); padding: 40px 44px; margin-bottom: 48px;
  display: flex; justify-content: space-between; align-items: center; gap: 20px; flex-wrap: wrap; color: #fff;
}
.about-final-cta h3 { color: #fff; font-size: 22px; margin-bottom: 8px; }
.about-final-cta p { font-size: 14px; opacity: .9; max-width: 480px; }

/* ---------- 知识地图 / 关于我 — 响应式 ---------- */
@media (max-width: 1023px) {
  .km-domain-grid { grid-template-columns: repeat(2, 1fr); }
  .km-dual { grid-template-columns: 1fr; }
  .km-ring-row { grid-template-columns: 1fr; }
  .km-ring-wrap { margin: 0 auto; }
  .skill-grid { grid-template-columns: repeat(2, 1fr); }
  .project-grid { grid-template-columns: repeat(2, 1fr); }
  .at-grid { grid-template-columns: 1fr; }
  .about-hero .container { grid-template-columns: 1fr; }
  .tool-grid { grid-template-columns: repeat(4, 1fr); }
}

@media (max-width: 640px) {
  .km-overview-card { padding: 22px 18px; }
  .km-map-node { width: 108px; height: 108px; }
  .km-map-node b { font-size: 14px; }
  .km-map-node.core { width: 130px; height: 130px; }
  .km-domain-grid { grid-template-columns: 1fr; }
  .skill-grid { grid-template-columns: 1fr; }
  .project-grid { grid-template-columns: 1fr; }
  .tool-grid { grid-template-columns: repeat(3, 1fr); }
  .km-path-step { grid-template-columns: 42px 1fr; }
  .km-path-step .status { grid-column: 1 / -1; justify-self: end; }
  .km-cta { padding: 26px 22px; }
  .km-cta h3 { font-size: 17px; }
  .about-final-cta { padding: 28px 22px; }
  .about-final-cta h3 { font-size: 18px; }
  .about-hero { padding: 32px 0 22px; }
}

/* ============================================================
   功能增强样式：Toast / 返回顶部 / 列表网格视图 / 空状态
   ============================================================ */

/* Toast 轻提示 */
#toast {
  position: fixed; left: 50%; bottom: 36px; transform: translate(-50%, 16px);
  background: var(--dark); color: #fff; font-size: 13.5px; font-weight: 500;
  padding: 11px 20px; border-radius: 999px; box-shadow: var(--shadow-lg);
  opacity: 0; pointer-events: none; transition: all .25s; z-index: 9999;
  max-width: min(86vw, 480px); text-align: center;
}
#toast.show { opacity: 1; transform: translate(-50%, 0); }

/* 返回顶部 */
.back-top {
  position: fixed; right: 22px; bottom: 28px; width: 44px; height: 44px;
  border-radius: 50%; border: 1px solid var(--line); background: var(--card);
  color: var(--primary); cursor: pointer; display: flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow); opacity: 0; pointer-events: none; transform: translateY(10px);
  transition: all .25s; z-index: 900;
}
.back-top.show { opacity: 1; pointer-events: auto; transform: translateY(0); }
.back-top:hover { background: var(--primary); color: #fff; border-color: var(--primary); }

/* 技术分享列表：卡片视图（视图切换） */
.article-list.as-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.article-list.as-grid .article-row { flex-direction: column; align-items: stretch; padding: 0; overflow: hidden; }
.article-list.as-grid .article-row .thumb { width: 100%; aspect-ratio: 16 / 9; flex-shrink: 0; border-radius: 0; }
.article-list.as-grid .article-row .thumb img { width: 100%; height: 100%; }
.article-list.as-grid .article-row .ar-body { padding: 18px 20px; }
.article-list.as-grid .article-row .ar-actions { display: none; }
@media (max-width: 767px) {
  .article-list.as-grid { grid-template-columns: 1fr; }
}

/* 空状态 */
.empty-state { text-align: center; padding: 64px 20px; color: var(--muted); }
.empty-state .es-ic { font-size: 40px; margin-bottom: 14px; }
.empty-state h3 { font-size: 17px; color: var(--heading); margin-bottom: 8px; }
.empty-state p { font-size: 13.5px; margin-bottom: 18px; }

/* 点赞 / 收藏激活态 */
[data-toggle].liked, .comment-actions button.liked { color: var(--primary); border-color: var(--primary-soft-2); background: var(--primary-soft); }
.rc-icon-btn:hover { color: var(--primary); }

/* 关于我 CTA 内联订阅表单 */
.subscribe-inline { display: flex; gap: 8px; background: rgba(255,255,255,.16); border-radius: 999px; padding: 5px 5px 5px 18px; align-items: center; min-width: 300px; }
.subscribe-inline input { flex: 1; min-width: 0; background: transparent; border: none; outline: none; color: #fff; font-size: 13.5px; }
.subscribe-inline input::placeholder { color: rgba(255,255,255,.75); }
@media (max-width: 640px) { .subscribe-inline { min-width: 0; width: 100%; } }

/* ============================================================
   深色主题（html[data-theme="dark"]）
   ============================================================ */
html[data-theme="dark"] {
  --ink: #e6ebf4;
  --heading: #f3f6fc;
  --body: #c3cddd;
  --muted: #8fa0b8;
  --faint: #6b7c96;

  --bg: #0b1220;
  --card: #121b2f;
  --line: #24304a;
  --line-soft: #1c2740;

  --primary-soft: rgba(99, 102, 241, .16);
  --primary-soft-2: rgba(99, 102, 241, .28);
  --green-soft: rgba(34, 197, 94, .16);
  --amber-soft: rgba(245, 158, 11, .16);
  --red-soft: rgba(239, 68, 68, .16);
  --cyan-soft: rgba(6, 182, 212, .16);
  --violet-soft: rgba(139, 92, 246, .2);
  --pink-soft: rgba(236, 72, 153, .16);
  --teal-soft: rgba(20, 184, 166, .16);
  --orange-soft: rgba(249, 115, 22, .16);

  --dark: #0e1526;
  --dark-2: #16203a;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .35);
  --shadow: 0 4px 16px rgba(0, 0, 0, .4);
  --shadow-lg: 0 12px 32px rgba(0, 0, 0, .5);

  color-scheme: dark;
}

/* 图表：网格线 / 文字 / 图例适配 */
html[data-theme="dark"] .chart-svg line,
html[data-theme="dark"] .km-map path.l { stroke: #26324e; }
html[data-theme="dark"] .chart-svg text { fill: #8fa0b8; }
html[data-theme="dark"] .chart-svg polyline,
html[data-theme="dark"] .chart-svg path { filter: brightness(1.25); }

/* 组件微调 */
html[data-theme="dark"] .site-header { background: rgba(11, 18, 32, .86); border-bottom-color: var(--line-soft); }
html[data-theme="dark"] .btn-ghost:hover { border-color: #35476e; }
html[data-theme="dark"] .callout-warn { background: rgba(245, 158, 11, .1); border-color: rgba(245, 158, 11, .3); color: #fbbf24; }
html[data-theme="dark"] .callout-warn b { color: #fcd34d; }
html[data-theme="dark"] .callout-success { background: rgba(34, 197, 94, .1); border-color: rgba(34, 197, 94, .3); color: #4ade80; }
html[data-theme="dark"] .callout-success b { color: #86efac; }
html[data-theme="dark"] .callout-quote { background: rgba(99, 102, 241, .1); color: #a5b4fc; }
html[data-theme="dark"] .callout-note { background: rgba(148, 163, 184, .09); }
html[data-theme="dark"] .article-body p code, html[data-theme="dark"] .article-body li code, html[data-theme="dark"] .article-body td code { background: rgba(129, 140, 248, .16); color: #c7d2fe; }
html[data-theme="dark"] .article-body p { color: var(--body); }
html[data-theme="dark"] .article-body ul li, html[data-theme="dark"] .article-body ol li { color: var(--body); }
html[data-theme="dark"] .data-table th { background: rgba(148, 163, 184, .08); }
html[data-theme="dark"] .tool-card { background: var(--dark-2); }
html[data-theme="dark"] .tool-card:hover { background: var(--card); border-color: var(--primary-soft-2); }
html[data-theme="dark"] .code-block { background: #0d1425; border-color: var(--line-soft); }
html[data-theme="dark"] .article-row:hover,
html[data-theme="dark"] .post-card:hover,
html[data-theme="dark"] .dir-card:hover,
html[data-theme="dark"] .feature-card:hover { border-color: #35476e; }
html[data-theme="dark"] .stat-band,
html[data-theme="dark"] .stats-band { background: var(--dark); }
html[data-theme="dark"] img { opacity: .92; }
html[data-theme="dark"] .hero-img,
html[data-theme="dark"] .feature-media img { opacity: 1; }
html[data-theme="dark"] .subscribe-card,
html[data-theme="dark"] .subscribe-card--sm { filter: brightness(.92); }
html[data-theme="dark"] .comment-form textarea { background: var(--dark-2); border-color: var(--line-soft); color: var(--body); }
html[data-theme="dark"] .back-top { background: var(--card); }
