/* deepseek.wang — 浅底 · 深蓝结构色 · 舒展版式（2026-10-13 放宽） */
:root {
  --blue: #0064C9;        /* 青绿主色（原站体系） */
  --blue-dark: #003C7E;
  --blue-100: #E6F0FB;
  --accent: #D97706;      /* 琥珀强调 */
  --accent-100: #FEF3C7;
  --ink: #1E293B;
  --muted: #64748B;
  --line: #E2E8F0;
  --bg: #ffffff;
  --bg-soft: #FAFAF9;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: -apple-system, "PingFang SC", "Microsoft YaHei", "Segoe UI", sans-serif;
  color: var(--ink); background: var(--bg); line-height: 1.85; font-size: 17px;
}
.wrap { max-width: 1160px; margin: 0 auto; padding: 0 28px; }

/* 头部 */
header { position: sticky; top: 0; z-index: 60; border-bottom: 2px solid var(--blue-dark);
  background: rgba(255,255,255,.92); backdrop-filter: saturate(180%) blur(12px); -webkit-backdrop-filter: saturate(180%) blur(12px); }
.hdr { display: flex; align-items: center; justify-content: space-between; padding-top: 22px; }
.brand { font-size: 22px; font-weight: 700; color: var(--blue-dark); text-decoration: none; }
.brand .logo { height: 30px; width: auto; margin-right: 8px; vertical-align: -6px; }
.brand .dom { font-size: 12.5px; color: var(--muted); font-weight: 400; margin-left: 10px; }
.lang-sw {
  border: 1px solid var(--blue); color: var(--blue); padding: 4px 16px;
  border-radius: 5px; text-decoration: none; font-size: 13.5px; font-weight: 600;
}
.lang-sw:hover { background: #eaf2fc; }
nav.wrap { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px; padding-bottom: 0; }
nav.wrap a {
  padding: 11px 15px; color: var(--ink); text-decoration: none; font-size: 14.5px;
  border-bottom: 3px solid transparent;
}
nav.wrap a:hover { color: var(--blue); }
nav.wrap a.on { color: var(--blue); font-weight: 600; border-bottom-color: var(--blue); }

main.wrap { padding-top: 46px; padding-right: 28px; padding-bottom: 64px; padding-left: 28px; }
main.wrap:has(> .hero) { padding-top: 8px; } /* 首页hero贴顶：与导航横线留8px */ /* 首页hero贴顶：与导航横线留8px */

/* 首页 hero（含星座动效画布） */
.hero {
  position: relative; overflow: hidden;
  background: linear-gradient(180deg, #F2F7FD 0%, #E6F0FB 100%);
  border: 1px solid #C7DBF2; border-radius: 14px;
  min-height: 190px;
  display: flex; flex-direction: column; justify-content: center;
  padding: 22px 40px; margin-bottom: 46px;
}
.hero canvas { position: absolute; inset: 0; width: 100%; height: 100%; opacity: .9; }
.hero > *:not(canvas) { position: relative; z-index: 1; }
.hero h1 { color: var(--blue-dark); font-size: 34px; margin-bottom: 8px; letter-spacing: .5px; }
.hero p { color: var(--ink); font-size: 17px; text-wrap: balance; }
.hero-note { font-size: 13.5px; color: var(--muted); margin-top: 8px; }
.hero a { color: var(--blue); }

section { margin-bottom: 48px; }
section h2 { font-size: 20px; border-left: 4px solid var(--accent); padding-left: 12px;
  margin-bottom: 18px; }
section h2 a { color: var(--ink); text-decoration: none; }

/* 卡片网格 */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 16px; }
.post-card {
  display: flex; flex-direction: column; gap: 6px; text-decoration: none;
  border: 1px solid var(--line); border-radius: 10px; padding: 18px 20px;
  background: #fff; transition: border-color .18s, box-shadow .18s, transform .18s;
}
.post-card:hover { border-color: var(--blue); box-shadow: 0 4px 18px rgba(0,100,201,.10);
  transform: translateY(-2px); }
.pc-t { color: var(--ink); font-weight: 600; font-size: 15.5px; line-height: 1.5; }
.pc-m { color: var(--muted); font-size: 12.5px; }

/* 文章页 */
article { max-width: 860px; margin: 0 auto; }
article:has(.ds-single-wrap) { max-width: 1160px; }
.ds-content { max-width: 800px; }
article .meta { color: var(--muted); font-size: 13.5px; margin-bottom: 10px; }
article h1 { font-size: 30px; color: var(--blue-dark); margin-bottom: 24px; line-height: 1.4; }
article h2 { font-size: 23px; margin: 36px 0 14px; border-left: 4px solid var(--accent); padding-left: 12px; }
article h3 { font-size: 18px; margin: 28px 0 10px; color: var(--blue-dark); }
article p { margin: 13px 0; }
article ul, article ol { margin: 13px 0 13px 24px; }
article li { margin: 6px 0; }
article a { color: var(--blue); }
article img { max-width: 100%; height: auto; border-radius: 8px; margin: 12px 0;
  border: 1px solid var(--line); }
article table { border-collapse: collapse; width: 100%; margin: 18px 0; font-size: 14.5px; }
article th, article td { border: 1px solid var(--line); padding: 10px 13px; text-align: left; }
article th { background: var(--bg-soft); }
article pre { background: #0f172a; color: #e2e8f0; padding: 18px; border-radius: 10px;
  overflow-x: auto; font-size: 13.5px; line-height: 1.6; margin: 16px 0; }
article code { font-family: ui-monospace, "SF Mono", Consolas, monospace; }
article pre code { background: none; color: inherit; }
article :not(pre) > code { background: var(--bg-soft); border: 1px solid var(--line);
  padding: 2px 6px; border-radius: 5px; font-size: 13.5px; }
article blockquote { border-left: 4px solid var(--line); margin: 16px 0; padding: 10px 20px;
  color: var(--muted); background: var(--bg-soft); border-radius: 0 8px 8px 0; }
.cat-desc { color: var(--muted); margin-bottom: 22px; font-size: 15.5px; }

/* 页脚 */
footer { border-top: 3px solid var(--blue-dark); background: var(--bg-soft); padding: 30px 0 36px; }
.foot-note { font-size: 13px; color: var(--muted); margin-bottom: 10px; }
footer p { font-size: 13.5px; color: var(--muted); }
footer a { color: var(--blue); }

@media (max-width: 640px) {
  .wrap { padding: 0 18px; }
  .grid { grid-template-columns: 1fr; }
  .hero { padding: 20px 22px; min-height: 0; }
  .hero h1 { font-size: 26px; }
  article h1 { font-size: 24px; }
  main.wrap { padding: 30px 18px 48px; }
}

/* FAQ 折叠（GEO） */
details.faq { border: 1px solid var(--line); border-radius: 10px; margin: 10px 0; background: #fff; }
details.faq summary { cursor: pointer; padding: 15px 20px; font-weight: 600; font-size: 15.5px; color: var(--ink); }
details.faq summary:hover { color: var(--blue); }
details.faq[open] summary { border-bottom: 1px solid var(--line); color: var(--blue); }
details.faq p { padding: 14px 20px; color: var(--muted); font-size: 15px; margin: 0; }


/* ---------- 首页统计带（参考原站） ---------- */
.stats-band { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin: 18px 0 46px; }
.stat { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 16px 18px 14px;
  box-shadow: 0 1px 2px rgba(15,23,42,.04), 0 1px 3px rgba(15,23,42,.05); text-align: center; }
.stat b { display: block; font-size: 26px; color: var(--blue); font-weight: 700; letter-spacing: .5px; }
.stat span { font-size: 13px; color: var(--muted); }
@media (max-width: 640px) { .stats-band { grid-template-columns: repeat(2, 1fr); } }

/* ---------- 精选入门卡（从这里开始） ---------- */
.starter-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.starter-card { display: flex; flex-direction: column; text-decoration: none; background: #fff;
  border: 1px solid var(--line); border-radius: 12px; overflow: hidden;
  transition: border-color .18s, box-shadow .18s, transform .18s; }
.starter-card:hover { border-color: var(--blue); box-shadow: 0 6px 20px rgba(0,100,201,.12); transform: translateY(-2px); }
.sc-img { position: relative; height: 132px; background: var(--blue-100); overflow: hidden; }
.sc-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.sc-no { position: absolute; left: 10px; top: 8px; font-size: 30px; font-weight: 800; color: #fff;
  text-shadow: 0 1px 6px rgba(15,23,42,.45); letter-spacing: 1px; }
.sc-body { padding: 14px 16px 15px; display: flex; flex-direction: column; gap: 6px; }
.sc-cat { display: inline-block; align-self: flex-start; font-size: 11.5px; font-weight: 700; color: var(--accent);
  background: var(--accent-100); border-radius: 999px; padding: 2px 10px; letter-spacing: 1px; }
.sc-t { font-size: 15.5px; font-weight: 600; color: var(--ink); line-height: 1.5; }
.sc-d { font-size: 13px; color: var(--muted); line-height: 1.65; }
.sc-go { font-size: 13.5px; color: var(--blue); font-weight: 600; margin-top: 2px; }
.sec-desc { color: var(--muted); font-size: 14.5px; margin: -10px 0 18px; }

/* ---------- 文章表格（移动端横向滚动防撑破） ---------- */
article table { width: 100%; border-collapse: collapse; margin: 16px 0; font-size: 15px; background: #fff;
  border: 1px solid var(--line); border-radius: 10px; overflow: hidden;
  display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; }
article table td, article table th { white-space: normal; word-break: break-word; }
article th { background: var(--blue-100); color: var(--blue-dark); text-align: left; padding: 10px 14px; font-weight: 600; }
article td { padding: 9px 14px; border-top: 1px solid var(--line); color: var(--ink); }
article tr:nth-child(even) td { background: #FAFAF9; }


/* ---------- 文章双栏布局（原站组件移植） ---------- */
.ds-single-wrap { display: grid; grid-template-columns: 262px minmax(0, 1fr); gap: 34px; align-items: start; }
.ds-side { position: sticky; top: 86px; display: flex; flex-direction: column; gap: 16px; max-height: calc(100vh - 104px); overflow: auto; scrollbar-width: thin; }
@media (max-width: 1023px) { .ds-single-wrap { grid-template-columns: 1fr; } .ds-side { position: static; max-height: none; overflow: visible; } .ds-toc-list { max-height: none; } }

.ds-factbox { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 15px 17px; box-shadow: 0 1px 3px rgba(15,23,42,.05); }
.ds-factbox-eyebrow { font-size: 10.5px; font-weight: 700; letter-spacing: 2px; color: var(--accent); text-transform: uppercase; }
.ds-factbox-title { font-size: 15px; font-weight: 700; color: var(--blue-dark); margin-top: 2px; }
.ds-factbox-list { margin-top: 9px; }
.ds-fact-row { display: flex; gap: 10px; padding: 7px 0; border-top: 1px dashed var(--line); font-size: 13px; }
.ds-fact-row:first-child { border-top: none; }
.ds-fact-key { flex: 0 0 74px; color: var(--muted); }
.ds-fact-val { color: var(--ink); font-weight: 500; }

.ds-toc-sidebar { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 13px 15px; box-shadow: 0 1px 3px rgba(15,23,42,.05); }
.ds-toc-title { display: flex; justify-content: space-between; align-items: baseline; font-size: 13.5px; font-weight: 700; color: var(--blue-dark); margin: 0 0 7px; }
.ds-toc-count { font-size: 11.5px; color: var(--muted); font-weight: 400; }
.ds-toc-rail { position: relative; }
.ds-toc-fill { position: absolute; left: 0; top: 0; width: 2px; height: 0; background: var(--blue); }
.ds-toc-list { list-style: none; margin: 0; padding: 0; font-size: 12.5px; max-height: 38vh; overflow: auto; scrollbar-width: thin; }
.ds-toc-list li { margin: 2px 0; }
.ds-toc-list a { display: block; padding: 4px 8px 4px 11px; border-left: 2px solid var(--line); color: var(--muted); text-decoration: none; line-height: 1.5; }
.ds-toc-list a:hover { color: var(--blue); border-left-color: var(--blue); background: var(--blue-100); }
.ds-toc-list .lv3 a, .ds-toc-list li ul a { padding-left: 22px; font-size: 12px; }

.ds-meta { font-size: 13px; color: var(--muted); margin-bottom: 14px; }
.ds-meta a { color: var(--blue); text-decoration: none; }
.ds-meta .sep { margin: 0 8px; color: var(--line); }

figure.wp-block-image { margin: 18px 0; }
figure.wp-block-image img { width: 100%; height: auto; border-radius: 10px; border: 1px solid var(--line); }
figure.wp-block-image figcaption { font-size: 12.5px; color: var(--muted); margin-top: 8px; text-align: center; }

.ds-sources { margin-top: 34px; border-top: 1px solid var(--line); padding-top: 16px; }
.ds-sources-h2 { font-size: 17px; color: var(--blue-dark); }
.ds-sources-bucket { margin: 12px 0; }
.ds-sources-h3 { font-size: 13.5px; color: var(--muted); font-weight: 600; margin-bottom: 6px; }
.ds-sources-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.ds-source-card { display: block; background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; text-decoration: none; font-size: 13px; }
.ds-source-card:hover { border-color: var(--blue); }
.ds-source-name { font-weight: 600; color: var(--ink); }
.ds-source-badge { display: inline-block; font-size: 11px; color: var(--accent); background: var(--accent-100); border-radius: 999px; padding: 1px 8px; margin-left: 6px; }

.ds-author-card { margin-top: 26px; background: var(--bg-soft); border: 1px solid var(--line); border-radius: 12px; padding: 15px 18px; display: flex; gap: 14px; align-items: center; font-size: 13.5px; color: var(--muted); }
.ds-author-avatar { width: 42px; height: 42px; border-radius: 50%; background: var(--blue-100); display: flex; align-items: center; justify-content: center; font-size: 19px; flex: 0 0 auto; }

.ds-related { margin-top: 30px; }
.ds-related-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 12px; }
.ds-related-head h2 { font-size: 17px; color: var(--blue-dark); border: none; padding: 0; margin: 0; }
.ds-related-head .more { font-size: 13px; color: var(--blue); text-decoration: none; }
.ds-related-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.ds-related-item { display: block; background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; text-decoration: none; font-size: 13.5px; font-weight: 600; color: var(--ink); line-height: 1.5; }
.ds-related-item:hover { border-color: var(--blue); color: var(--blue); }
.ds-related-item .cat, .ds-related-item .date { display: block; font-size: 11.5px; color: var(--muted); font-weight: 400; margin-top: 3px; }

/* ---------- 移动端防撑破（图片/代码/表格） ---------- */
img, video, iframe, svg { max-width: 100%; }
figure { max-width: 100%; margin-left: auto; margin-right: auto; }
article pre { overflow-x: auto; -webkit-overflow-scrolling: touch; }
article code { word-break: break-word; overflow-wrap: anywhere; }
.toc-rail { max-width: 40vw; }
