/* PlaylinePro - 文档站式版式：左导目录树 + 右侧正文 / 元数据窄栏 */
:root {
  --ink: #14161a;
  --ink-2: #1c1f25;
  --line: #2e323a;
  --paper: #f5f3ee;
  --paper-2: #eae7df;
  --txt: #23262c;
  --txt-dim: #5c626d;
  --amber: #c8860d;
  --amber-soft: #f3e2bd;
  --mono: ui-monospace, SFMono-Regular, "Roboto Mono", Menlo, Consolas, monospace;
  --sans: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, -apple-system, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--txt);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }

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

/* ---------- 顶部壳 ---------- */
.site-head {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--ink);
  border-bottom: 1px solid var(--line);
}
.head-inner {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 20px;
  height: 68px;
  display: flex;
  align-items: center;
  gap: 18px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #f7f5f0;
  flex: 0 0 auto;
}
.brand img { width: 34px; height: 34px; border-radius: 6px; }
.brand b { font-size: 17px; letter-spacing: .02em; }
.brand span { font-size: 11px; color: #9aa2ad; font-family: var(--mono); letter-spacing: .12em; text-transform: uppercase; }

.head-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: 1 1 auto;
  overflow-x: auto;
  scrollbar-width: none;
}
.head-nav::-webkit-scrollbar { display: none; }
.head-nav a {
  color: #d8dce2;
  font-size: 14px;
  padding: 8px 10px;
  white-space: nowrap;
  border-radius: 6px;
}
.head-nav a:hover { background: #23272f; color: #fff; text-decoration: none; }
.head-nav a.is-active { color: var(--amber-soft); background: #23272f; }

.menu-btn {
  display: none;
  background: #23272f;
  color: #f7f5f0;
  border: 1px solid var(--line);
  border-radius: 6px;
  font-size: 14px;
  padding: 8px 12px;
  cursor: pointer;
}

/* ---------- 主体布局：目录树 + 正文 + 窄栏 ---------- */
.wrap {
  max-width: 1240px;
  margin: 0 auto;
  padding: 28px 20px 56px;
  display: grid;
  grid-template-columns: 232px minmax(0, 1fr) 268px;
  gap: 32px;
  align-items: start;
}
.wrap--no-aside { grid-template-columns: 232px minmax(0, 1fr); }
.wrap--full { grid-template-columns: minmax(0, 1fr); }

.tree {
  position: sticky;
  top: 92px;
  border-left: 2px solid var(--line);
  padding-left: 14px;
}
.tree h2 {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .16em;
  color: var(--txt-dim);
  margin: 0 0 10px;
  text-transform: uppercase;
  font-weight: 600;
}
.tree ul { list-style: none; margin: 0 0 18px; padding: 0; }
.tree li { margin: 0 0 2px; }
.tree a {
  display: block;
  font-size: 13.5px;
  color: var(--txt);
  padding: 5px 8px;
  border-radius: 4px;
  border-left: 2px solid transparent;
  margin-left: -16px;
  padding-left: 14px;
}
.tree a:hover { background: var(--paper-2); color: var(--txt); text-decoration: none; }
.tree a.is-active { border-left-color: var(--amber); color: var(--amber); font-weight: 600; }
.tree .tree-meta { font-size: 12px; color: var(--txt-dim); line-height: 1.6; }

.main { min-width: 0; }

/* ---------- 首页模块 ---------- */
.hero-doc {
  border: 1px solid var(--line);
  background: var(--ink);
  color: #f3f1ec;
  padding: 26px 26px 24px;
  border-radius: 4px;
}
.hero-doc .kicker {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .14em;
  color: var(--amber-soft);
  text-transform: uppercase;
}
.hero-doc h1 {
  font-size: 30px;
  line-height: 1.28;
  margin: 10px 0 12px;
  font-weight: 700;
  letter-spacing: -.01em;
}
.hero-doc p { margin: 0 0 16px; color: #c9ced6; font-size: 15px; max-width: 46ch; }
.hero-doc figure { margin: 0; position: relative; }
.hero-doc figure img { border-radius: 3px; width: 100%; aspect-ratio: 16/9; object-fit: cover; }
.hero-doc figcaption {
  font-family: var(--mono);
  font-size: 11.5px;
  color: #8d949e;
  margin-top: 8px;
}

.stat-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  margin-top: 22px;
}
.stat-row div {
  background: var(--ink-2);
  padding: 14px 16px;
}
.stat-row b {
  display: block;
  font-family: var(--mono);
  font-size: 22px;
  color: var(--amber-soft);
  line-height: 1.2;
}
.stat-row span { font-size: 12px; color: #949ba5; }

.sec { margin-top: 40px; }
.sec-head {
  display: flex;
  align-items: baseline;
  gap: 12px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 8px;
  margin-bottom: 18px;
}
.sec-head h2 { font-size: 19px; margin: 0; font-weight: 700; letter-spacing: -.005em; }
.sec-head .idx { font-family: var(--mono); font-size: 11.5px; color: var(--txt-dim); letter-spacing: .1em; }
.sec-head a.more { margin-left: auto; font-size: 13px; }

.feat-lead {
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  gap: 22px;
  align-items: start;
}
.feat-lead figure { margin: 0; }
.feat-lead img { border-radius: 3px; aspect-ratio: 16/10; object-fit: cover; width: 100%; }
.feat-lead h3 { font-size: 21px; margin: 0 0 8px; line-height: 1.4; }
.feat-lead p { font-size: 14px; color: var(--txt-dim); margin: 0 0 10px; }

.doc-list { list-style: none; margin: 0; padding: 0; }
.doc-list li {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr);
  gap: 14px;
  padding: 12px 0;
  border-bottom: 1px dashed var(--line);
}
.doc-list time {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--txt-dim);
  padding-top: 3px;
}
.doc-list a { font-size: 15.5px; color: var(--txt); font-weight: 600; }
.doc-list a:hover { color: var(--amber); text-decoration: none; }
.doc-list p { margin: 3px 0 0; font-size: 13px; color: var(--txt-dim); line-height: 1.6; }

.grid-2x {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}
.grid-2x figure { margin: 0; }
.grid-2x img { aspect-ratio: 4/3; object-fit: cover; width: 100%; border-radius: 3px; }
.grid-2x h3 { font-size: 16px; margin: 10px 0 4px; line-height: 1.45; }
.grid-2x p { font-size: 13px; color: var(--txt-dim); margin: 0; line-height: 1.6; }

.defs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px 26px;
}
.defs article {
  padding-left: 14px;
  border-left: 3px solid var(--amber-soft);
}
.defs h3 { font-size: 15.5px; margin: 0 0 5px; }
.defs p { margin: 0; font-size: 13.5px; color: var(--txt-dim); line-height: 1.65; }

.table-wrap { overflow-x: auto; border: 1px solid var(--line); }
table { width: 100%; border-collapse: collapse; font-size: 13.5px; background: #fff; }
th, td { padding: 10px 12px; text-align: left; border-bottom: 1px solid #ddd8cd; }
thead th { background: var(--paper-2); font-family: var(--mono); font-size: 12px; letter-spacing: .06em; color: var(--txt); }
tbody td:first-child { font-weight: 600; }

.cat-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}
.cat-strip a {
  display: block;
  padding: 16px;
  background: #fff;
  border: 1px solid var(--line);
  border-top: 3px solid var(--amber);
  border-radius: 3px;
  color: var(--txt);
}
.cat-strip a:hover { text-decoration: none; background: var(--amber-soft); }
.cat-strip b { display: block; font-size: 15px; margin-bottom: 4px; }
.cat-strip span { font-size: 12.5px; color: var(--txt-dim); line-height: 1.6; display: block; }

.faq { border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); padding: 12px 0; }
.faq summary { cursor: pointer; font-size: 15px; font-weight: 600; }
.faq details p { margin: 8px 0 0; font-size: 13.5px; color: var(--txt-dim); }

.note-bar {
  border: 1px dashed var(--amber);
  background: #fdf7e9;
  padding: 14px 18px;
  font-size: 13.5px;
  color: #5a4a24;
  border-radius: 3px;
}

/* ---------- 栏目页 ---------- */
.cat-hero { border-left: 4px solid var(--amber); padding: 4px 0 4px 16px; }
.cat-hero h1 { font-size: 26px; margin: 0 0 6px; }
.cat-hero p { margin: 0; color: var(--txt-dim); font-size: 14px; }
.cat-hero img { margin-top: 16px; width: 100%; aspect-ratio: 21/9; object-fit: cover; border-radius: 3px; }

.cat-items { list-style: none; margin: 26px 0 0; padding: 0; }
.cat-items li { padding: 16px 0; border-bottom: 1px solid var(--line); display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 20px; }
.cat-items img { aspect-ratio: 16/10; object-fit: cover; width: 100%; border-radius: 3px; }
.cat-items h2 { font-size: 18px; margin: 0 0 6px; line-height: 1.4; }
.cat-items h2 a { color: var(--txt); }
.cat-items h2 a:hover { color: var(--amber); text-decoration: none; }
.cat-items .meta { font-family: var(--mono); font-size: 11.5px; color: var(--txt-dim); letter-spacing: .04em; margin-bottom: 6px; }
.cat-items p { margin: 0; font-size: 13.5px; color: var(--txt-dim); line-height: 1.7; }

/* ---------- 文章页 ---------- */
.crumb,
.breadcrumb {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--txt-dim);
  margin-bottom: 16px;
}
.crumb a { color: var(--txt-dim); }
.crumb a:hover { color: var(--amber); }
.crumb span { margin: 0 6px; color: #b3ada0; }

.article-head h1 { font-size: 28px; line-height: 1.35; margin: 0 0 12px; letter-spacing: -.01em; }
.byline {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  font-size: 12.5px;
  color: var(--txt-dim);
  font-family: var(--mono);
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}

.article-body { margin-top: 22px; }
.article-body h2 {
  font-size: 20px;
  margin: 34px 0 12px;
  padding-left: 12px;
  border-left: 3px solid var(--amber);
  line-height: 1.45;
}
.article-body h3 { font-size: 16.5px; margin: 22px 0 8px; }
.article-body p { margin: 0 0 14px; font-size: 15.5px; line-height: 1.9; }
.article-body figure { margin: 22px 0; }
.article-body figcaption { font-family: var(--mono); font-size: 11.5px; color: var(--txt-dim); margin-top: 6px; }
.article-body ul, .article-body ol { margin: 0 0 16px; padding-left: 22px; }
.article-body li { margin-bottom: 6px; font-size: 15px; line-height: 1.8; }
.article-body .key {
  background: var(--amber-soft);
  padding: 1px 4px;
  border-radius: 2px;
}
.article-body .box {
  border: 1px solid var(--line);
  border-left: 3px solid var(--amber);
  background: #fbf9f4;
  padding: 14px 18px;
  margin: 18px 0;
  font-size: 14px;
  color: var(--txt-dim);
}
.article-body table { font-size: 13px; }

.back-cat {
  margin-top: 32px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  font-size: 13.5px;
  color: var(--txt-dim);
}

/* aside：随版式放在右侧窄栏 */
.aside {
  position: sticky;
  top: 92px;
  background: #fff;
  border: 1px solid var(--line);
  border-top: 3px solid var(--ink);
  padding: 18px;
  border-radius: 3px;
}
.aside h2 {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--txt-dim);
  margin: 0 0 10px;
}
.aside ul { list-style: none; margin: 0 0 18px; padding: 0; }
.aside li { padding: 9px 0; border-bottom: 1px dashed #ddd8cd; }
.aside li a { font-size: 13.5px; color: var(--txt); line-height: 1.5; display: block; }
.aside li a:hover { color: var(--amber); text-decoration: none; }
.aside .aside-note { font-size: 12.5px; color: var(--txt-dim); line-height: 1.7; margin: 0; }

/* ---------- 页脚 ---------- */
.site-foot {
  background: var(--ink);
  color: #b9c0c9;
  margin-top: 40px;
  border-top: 3px solid var(--amber);
}
.foot-inner {
  max-width: 1240px;
  margin: 0 auto;
  padding: 34px 20px 28px;
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: 28px;
  font-size: 13px;
  line-height: 1.8;
}
.foot-inner h3 { color: #f0eee9; font-size: 14px; margin: 0 0 10px; }
.foot-inner a { color: var(--amber-soft); }
.foot-legal {
  max-width: 1240px;
  margin: 0 auto;
  padding: 14px 20px 30px;
  border-top: 1px solid var(--line);
  font-size: 12px;
  color: #8d949e;
  line-height: 2;
}
.foot-brand { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.foot-brand img { width: 30px; height: 30px; border-radius: 5px; }
.foot-brand b { color: #f0eee9; font-size: 15px; }

/* ---------- 响应式 ---------- */
@media (max-width: 1080px) {
  .wrap { grid-template-columns: 208px minmax(0, 1fr); }
  .wrap .aside { position: static; grid-column: 1 / -1; }
  .foot-inner { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
  .head-inner { height: auto; min-height: 60px; padding: 10px 14px; flex-wrap: wrap; }
  .head-nav { display: none; order: 3; flex-basis: 100%; flex-wrap: wrap; overflow: visible; padding-bottom: 6px; }
  .head-nav.is-open { display: flex; }
  .menu-btn { display: inline-block; margin-left: auto; }
  .brand span { display: none; }

  .wrap { display: block; padding: 18px 14px 40px; }
  .tree { position: static; border-left: 2px solid var(--line); margin-bottom: 22px; }
  .tree ul { display: flex; flex-wrap: wrap; gap: 4px; }
  .tree li { margin: 0; }
  .tree a { margin-left: 0; padding: 6px 10px; background: var(--paper-2); border-radius: 4px; border-left: 0; }
  .tree a.is-active { background: var(--amber-soft); }
  .tree .tree-meta { display: none; }

  .aside { margin-top: 30px; }

  .hero-doc { padding: 20px 18px; }
  .hero-doc h1 { font-size: 23px; }
  .stat-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .feat-lead, .grid-2x, .defs, .cat-strip { grid-template-columns: minmax(0, 1fr); }
  .doc-list li { grid-template-columns: minmax(0, 1fr); gap: 4px; }
  .cat-items li { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .article-head h1 { font-size: 22px; }
  .article-body h2 { font-size: 18px; }
  .article-body p { font-size: 15px; }
  .foot-inner { grid-template-columns: minmax(0, 1fr); }
  table { font-size: 12.5px; }
}

@media (prefers-reduced-motion: no-preference) {
  a, .cat-strip a { transition: background-color .2s ease, color .2s ease; }
}
