/* ============================================================
   Juemingzi Press — 米黄纸面 / 编辑排版
   ============================================================ */
:root {
  --paper:      #f2e9d8;
  --paper-2:    #ece2cd;
  --paper-3:    #e5d9c0;
  --paper-line: #cfbf9c;

  --ink:        #2b2419;
  --ink-2:      #574a38;
  --ink-3:      #8a7758;
  --ink-4:      #a8967a;

  --seal:       #a8442a;
  --seal-soft:  rgba(168, 68, 42, .1);
  --olive:      #5c6b3c;
  --olive-soft: rgba(92, 107, 60, .12);
  --gold:       #9a7a2e;

  --serif: "Songti SC", "STSong", "Source Han Serif SC", "Noto Serif SC",
           Georgia, "Times New Roman", serif;
  --sans:  -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB",
           "Microsoft YaHei", "Helvetica Neue", sans-serif;
  --mono:  ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: var(--sans);
  color: var(--ink);
  background-color: var(--paper);
  background-image:
    radial-gradient(ellipse 90% 50% at 50% 0%, rgba(255,251,240,.85), transparent 65%),
    radial-gradient(ellipse 70% 40% at 100% 100%, rgba(210,190,158,.35), transparent 60%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.82' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23n)' opacity='0.055'/%3E%3C/svg%3E");
  min-height: 100vh;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}

.wrap { max-width: 1080px; margin: 0 auto; padding: 0 28px 90px; }
.wide { max-width: 1240px; }

/* ==================== 导航 ==================== */
.nav {
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px 0 16px;
  border-bottom: 2px solid var(--ink);
  position: relative;
}
.nav::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -6px;
  height: 1px; background: var(--paper-line);
}
.nav-brand { display: flex; align-items: baseline; gap: 11px; text-decoration: none; color: var(--ink); }
.nav-mark { font-family: var(--serif); font-size: 23px; font-weight: 700; letter-spacing: -0.8px; }
.nav-sub {
  font-size: 10px; letter-spacing: 2.4px; text-transform: uppercase;
  color: var(--ink-3); font-weight: 500;
}
.nav-links { display: flex; gap: 4px; align-items: center; }
.nav-link {
  font-size: 13px; color: var(--ink-3); text-decoration: none;
  padding: 7px 14px; border-radius: 2px; letter-spacing: .4px;
  transition: all .18s; position: relative;
}
.nav-link:hover { color: var(--ink); background: var(--paper-2); }
.nav-link.active { color: var(--ink); font-weight: 600; }
.nav-link.active::after {
  content: ""; position: absolute; left: 14px; right: 14px; bottom: 2px;
  height: 1px; background: var(--seal);
}

/* ==================== 通用标题 ==================== */
.kicker {
  font-size: 10.5px; letter-spacing: 4px; text-transform: uppercase;
  color: var(--seal); font-weight: 600;
}
.section-title {
  font-family: var(--serif); font-size: 13px; font-weight: 700;
  letter-spacing: 3px; text-transform: uppercase; color: var(--ink-2);
  display: flex; align-items: center; gap: 14px; margin-bottom: 24px;
}
.section-title::after {
  content: ""; flex: 1; height: 1px;
  background: linear-gradient(90deg, var(--paper-line), transparent);
}

/* ==================== 首页封面 ==================== */
.cover { padding: 58px 0 48px; }
.cover-grid {
  display: grid; grid-template-columns: 1fr 300px; gap: 56px; align-items: start;
}
.cover h1 {
  font-family: var(--serif); font-size: clamp(34px, 5.2vw, 56px);
  font-weight: 700; line-height: 1.18; letter-spacing: 1px; margin: 18px 0 22px;
}
.cover h1 em {
  font-style: normal; position: relative; white-space: nowrap;
}
.cover h1 em::after {
  content: ""; position: absolute; left: -2px; right: -2px; bottom: 7px;
  height: 10px; background: var(--seal-soft); z-index: -1;
}
.cover-lede {
  font-size: 15.5px; color: var(--ink-2); line-height: 1.95; max-width: 560px;
}
.cover-meta {
  margin-top: 26px; display: flex; gap: 22px; flex-wrap: wrap;
  font-size: 11.5px; color: var(--ink-3); letter-spacing: .6px;
}
.cover-meta b { color: var(--ink); font-weight: 650; }

/* 侧栏 */
.aside-box {
  border: 1px solid var(--paper-line); background: var(--paper-2);
  padding: 18px 18px 16px; border-radius: 3px;
}
.aside-box h4 {
  font-family: var(--serif); font-size: 12px; font-weight: 700;
  letter-spacing: 2px; text-transform: uppercase; color: var(--ink-2);
  margin-bottom: 14px; padding-bottom: 9px; border-bottom: 1px solid var(--paper-line);
}
.aside-item {
  display: flex; align-items: baseline; gap: 8px;
  padding: 7px 0; text-decoration: none; color: var(--ink-2);
  font-size: 12.5px; border-bottom: 1px dotted var(--paper-line);
  transition: color .16s;
}
.aside-item:last-child { border-bottom: none; }
.aside-item:hover { color: var(--seal); }
.aside-item .v {
  margin-left: auto; font-family: var(--mono); font-size: 10px;
  color: var(--ink-4); font-variant-numeric: tabular-nums;
}

/* ==================== 文章列表 ==================== */
.post-list { border-top: 1px solid var(--paper-line); }
.post-card {
  display: block; text-decoration: none; color: inherit;
  padding: 24px 10px 24px 0; border-bottom: 1px solid var(--paper-line);
  transition: padding-left .22s, background .2s;
  position: relative;
}
.post-card:hover { background: rgba(255,252,245,.6); padding-left: 12px; }
.post-card::before {
  content: ""; position: absolute; left: 0; top: 50%; width: 3px; height: 0;
  background: var(--seal); transform: translateY(-50%); transition: height .24s;
}
.post-card:hover::before { height: 54%; }
.pc-head { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-bottom: 7px; }
.pc-title {
  font-family: var(--serif); font-size: 20px; font-weight: 700;
  letter-spacing: .3px; color: var(--ink); line-height: 1.4;
}
.pc-date { font-family: var(--mono); font-size: 11px; color: var(--ink-4); margin-left: auto; }
.pc-summary { font-size: 13.5px; color: var(--ink-2); line-height: 1.85; max-width: 760px; }
.pc-tags { margin-top: 11px; display: flex; gap: 7px; flex-wrap: wrap; }
.tg {
  font-size: 10px; letter-spacing: 1px; text-transform: uppercase;
  color: var(--ink-3); border: 1px solid var(--paper-line);
  padding: 1px 7px; border-radius: 2px; background: var(--paper-2);
}
.pc-mins { font-size: 11px; color: var(--ink-4); letter-spacing: .4px; }

/* ==================== 下载页 ==================== */
.dl-head { padding: 46px 0 34px; }
.dl-head h1 {
  font-family: var(--serif); font-size: clamp(28px, 4.4vw, 42px);
  font-weight: 700; letter-spacing: .8px; margin: 14px 0 14px;
}
.dl-head p { font-size: 14.5px; color: var(--ink-2); max-width: 620px; line-height: 1.9; }

.prod-tabs {
  display: flex; gap: 0; border-bottom: 1px solid var(--paper-line);
  margin: 30px 0 34px; overflow-x: auto; scrollbar-width: none;
}
.prod-tabs::-webkit-scrollbar { display: none; }
.ptab {
  position: relative; padding: 12px 20px 14px; background: none; border: none;
  cursor: pointer; font-family: var(--sans); font-size: 13.5px; color: var(--ink-3);
  white-space: nowrap; transition: color .2s;
  display: flex; align-items: baseline; gap: 8px;
}
.ptab:hover { color: var(--ink); }
.ptab.active { color: var(--ink); font-weight: 650; }
.ptab::after {
  content: ""; position: absolute; left: 16px; right: 16px; bottom: -1px;
  height: 2px; background: var(--ink); transform: scaleX(0); transition: transform .26s;
}
.ptab.active::after { transform: scaleX(1); }
.ptab .cnt { font-family: var(--mono); font-size: 10px; color: var(--ink-4); }
.ptab.active .cnt { color: var(--seal); }

.prod-intro {
  display: flex; align-items: center; gap: 18px; flex-wrap: wrap;
  padding: 16px 20px; background: var(--paper-2);
  border-left: 2px solid var(--ink-3); margin-bottom: 26px;
}
.prod-intro h2 {
  font-family: var(--serif); font-size: 19px; font-weight: 700; letter-spacing: .5px;
}
.prod-intro .meta { font-size: 12px; color: var(--ink-3); }
.prod-intro .links { margin-left: auto; display: flex; gap: 14px; font-size: 12px; }
.prod-intro .links a { color: var(--ink-2); text-decoration: none; border-bottom: 1px solid var(--paper-line); }
.prod-intro .links a:hover { color: var(--seal); border-color: var(--seal); }

/* 版本条目 */
.entry { border-bottom: 1px solid var(--paper-line); }
.entry-head {
  display: grid; grid-template-columns: 1fr auto auto; align-items: center; gap: 16px;
  padding: 18px 6px 18px 0; cursor: pointer; position: relative;
  transition: background .18s, padding-left .2s;
}
.entry-head:hover { background: rgba(255,252,245,.6); padding-left: 10px; }
.entry-head::before {
  content: ""; position: absolute; left: 0; top: 50%; width: 3px; height: 0;
  background: var(--seal); transform: translateY(-50%); transition: height .24s;
}
.entry.open .entry-head::before { height: 60%; }
.e-ver { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.e-num { font-family: var(--mono); font-size: 16px; font-weight: 600; letter-spacing: -.3px; }
.tag-b {
  font-size: 9.5px; font-weight: 650; letter-spacing: 1px; text-transform: uppercase;
  padding: 2px 7px; border: 1px solid currentColor; border-radius: 2px; line-height: 1.6;
}
.tag-b.now { color: var(--seal); background: var(--seal-soft); }
.tag-b.pre { color: var(--gold); background: rgba(154,122,46,.1); }
.tag-b.be { color: var(--ink-4); border-color: var(--paper-line); font-family: var(--mono); letter-spacing: .2px; text-transform: none; }
.e-date { font-size: 11.5px; color: var(--ink-3); font-variant-numeric: tabular-nums; white-space: nowrap; }
.e-toggle {
  width: 24px; height: 24px; border-radius: 50%; border: 1px solid var(--paper-line);
  display: grid; place-items: center; font-size: 8px; color: var(--ink-3); transition: all .22s;
}
.entry.open .e-toggle { background: var(--ink); border-color: var(--ink); color: var(--paper); transform: rotate(90deg); }
.entry-body { display: none; padding: 4px 0 26px; }
.entry.open .entry-body { display: block; animation: fade .3s ease; }
@keyframes fade { from { opacity: 0; transform: translateY(6px); } }

.group { margin-bottom: 22px; }
.group-head { display: flex; align-items: center; gap: 13px; margin-bottom: 12px; }
.group-name { font-family: var(--serif); font-size: 14.5px; font-weight: 700; letter-spacing: 1.4px; }
.group-desc { font-size: 11px; color: var(--ink-4); }
.group-head::after { content: ""; flex: 1; height: 1px; background: linear-gradient(90deg, var(--paper-line), transparent); }

.files { display: grid; grid-template-columns: repeat(auto-fill, minmax(266px, 1fr)); gap: 11px; }
.file {
  display: flex; flex-direction: column; gap: 8px;
  background: var(--paper-2); border: 1px solid var(--paper-line);
  border-radius: 3px; padding: 14px 15px 12px; text-decoration: none; color: var(--ink);
  transition: all .2s cubic-bezier(.2,.7,.3,1);
  box-shadow: 0 1px 0 rgba(255,255,250,.65) inset, 0 1px 3px rgba(90,70,40,.055);
}
.file:hover {
  border-color: var(--ink-3); transform: translateY(-2px);
  box-shadow: 0 2px 0 rgba(255,255,250,.8) inset, 0 8px 20px -10px rgba(90,70,40,.28);
  background: #f4ecdc;
}
.f-top { display: flex; align-items: baseline; gap: 8px; }
.f-arch { font-size: 14px; font-weight: 650; }
.f-ext {
  font-family: var(--mono); font-size: 9px; letter-spacing: .7px; text-transform: uppercase;
  color: var(--ink-2); border: 1px solid var(--paper-line); border-radius: 2px;
  padding: 1px 5px; background: var(--paper-3);
}
.f-size { margin-left: auto; font-family: var(--mono); font-size: 10.5px; color: var(--ink-3); }
.f-desc { font-size: 11px; color: var(--ink-3); }
.f-src { display: flex; align-items: center; gap: 6px; font-size: 10.5px; }
.sd { width: 5px; height: 5px; border-radius: 50%; flex: none; }
.sd.cdn { background: var(--olive); box-shadow: 0 0 0 2px var(--olive-soft); }
.sd.gh { background: var(--ink-4); box-shadow: 0 0 0 2px rgba(168,150,122,.18); }
.src-cdn { color: var(--olive); font-weight: 600; }
.src-gh { color: var(--ink-3); }
.f-sha { display: flex; align-items: center; gap: 5px; }
.sha-val {
  flex: 1; min-width: 0; font-family: var(--mono); font-size: 9px; color: var(--ink-4);
  background: var(--paper-3); border: 1px solid var(--paper-line); border-radius: 2px;
  padding: 3px 6px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.btn-mini {
  font-size: 9.5px; letter-spacing: .7px; text-transform: uppercase; padding: 3px 7px;
  border-radius: 2px; cursor: pointer; background: transparent;
  border: 1px solid var(--paper-line); color: var(--ink-3);
  font-family: var(--sans); transition: all .16s; white-space: nowrap;
}
.btn-mini:hover { border-color: var(--ink-3); color: var(--ink); background: var(--paper-3); }
.btn-mini.ok { border-color: var(--olive); color: var(--olive); }

/* ==================== 文章页 ==================== */
.article { max-width: 720px; margin: 0 auto; padding: 52px 0 40px; }
.art-head { border-bottom: 1px solid var(--paper-line); padding-bottom: 24px; margin-bottom: 34px; }
.art-head h1 {
  font-family: var(--serif); font-size: clamp(28px, 4.4vw, 40px);
  font-weight: 700; line-height: 1.28; letter-spacing: .5px; margin: 14px 0 16px;
}
.art-meta { display: flex; gap: 16px; font-size: 11.5px; color: var(--ink-3); flex-wrap: wrap; align-items: baseline; }
.art-body { font-size: 15.5px; line-height: 2.05; color: var(--ink-2); }
.art-body h2 {
  font-family: var(--serif); font-size: 24px; font-weight: 700; color: var(--ink);
  margin: 46px 0 16px; letter-spacing: .5px; line-height: 1.4;
  padding-left: 14px; border-left: 3px solid var(--seal);
}
.art-body h3 {
  font-family: var(--serif); font-size: 19px; font-weight: 700; color: var(--ink);
  margin: 34px 0 12px; letter-spacing: .3px;
}
.art-body h4 { font-size: 15.5px; font-weight: 650; color: var(--ink); margin: 26px 0 10px; }
.art-body p { margin-bottom: 20px; }
.art-body ul, .art-body ol { margin: 0 0 20px 22px; }
.art-body li { margin-bottom: 9px; }
.art-body blockquote {
  border-left: 2px solid var(--seal); background: var(--paper-2);
  padding: 14px 20px; margin: 24px 0; color: var(--ink-2); font-size: 14.5px;
}
.art-body code {
  font-family: var(--mono); font-size: 12.5px; background: var(--paper-3);
  padding: 1.5px 5px; border-radius: 2px; border: 1px solid var(--paper-line); color: var(--ink);
}
.art-body pre {
  background: #2b2419; color: #ece2cd; padding: 18px 20px; border-radius: 3px;
  overflow-x: auto; margin: 22px 0; font-size: 12.5px; line-height: 1.75;
}
.art-body pre code { background: none; border: none; color: inherit; padding: 0; font-size: inherit; }
.art-body hr { border: none; border-top: 1px solid var(--paper-line); margin: 36px 0; }
.art-body a { color: var(--seal); text-decoration: none; border-bottom: 1px solid rgba(168,68,42,.35); }
.art-body a:hover { border-bottom-color: var(--seal); }
.art-body strong { color: var(--ink); font-weight: 650; }
.art-foot {
  margin-top: 52px; padding-top: 24px; border-top: 2px solid var(--ink);
  display: flex; justify-content: space-between; align-items: center;
  font-size: 12px; color: var(--ink-3); flex-wrap: wrap; gap: 14px;
}
.art-foot a { color: var(--ink-2); text-decoration: none; border-bottom: 1px solid var(--paper-line); }
.art-foot a:hover { color: var(--seal); }

/* ==================== 状态 / 按钮 ==================== */
.state { text-align: center; padding: 80px 20px; color: var(--ink-3); }
.state h3 { font-family: var(--serif); font-size: 17px; color: var(--ink-2); margin-bottom: 8px; }
.state p { font-size: 13px; }
.spinner {
  width: 24px; height: 24px; margin: 0 auto 18px;
  border: 2px solid var(--paper-line); border-top-color: var(--seal);
  border-radius: 50%; animation: spin .9s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.btn {
  display: inline-block; margin-top: 18px; padding: 10px 24px;
  background: var(--ink); color: var(--paper); border: none; border-radius: 2px;
  font-size: 11px; letter-spacing: 2px; text-transform: uppercase;
  cursor: pointer; font-family: var(--sans); transition: all .2s;
}
.btn:hover { background: var(--seal); }

/* ==================== 页脚 ==================== */
.foot {
  margin-top: 66px; padding-top: 26px; border-top: 2px solid var(--ink);
  display: grid; grid-template-columns: 1fr auto; gap: 22px;
  font-size: 11.5px; color: var(--ink-3); line-height: 1.9;
}
.foot a { color: var(--ink-2); text-decoration: none; border-bottom: 1px solid var(--paper-line); }
.foot a:hover { color: var(--seal); border-color: var(--seal); }
.stamp {
  font-family: var(--serif); font-size: 10px; letter-spacing: 1px; color: var(--seal);
  border: 1px solid var(--seal); border-radius: 2px; padding: 6px 10px;
  text-align: center; line-height: 1.45; opacity: .82; transform: rotate(-2.5deg);
  align-self: start;
}

/* ==================== 响应式 ==================== */
@media (max-width: 860px) {
  .cover-grid { grid-template-columns: 1fr; gap: 34px; }
}
@media (max-width: 720px) {
  .wrap { padding: 0 16px 70px; }
  .nav { padding: 15px 0 13px; }
  .nav-mark { font-size: 19px; }
  .nav-sub { display: none; }
  .nav-link { padding: 6px 10px; font-size: 12.5px; }
  .cover { padding: 34px 0 30px; }
  .cover-lede { font-size: 14px; }
  .pc-title { font-size: 17.5px; }
  .pc-date { margin-left: 0; }
  .files { grid-template-columns: 1fr; }
  .entry-head { grid-template-columns: 1fr auto; gap: 9px; padding: 15px 0; }
  .e-date { grid-column: 1 / -1; order: 9; font-size: 11px; }
  .prod-intro { flex-direction: column; align-items: flex-start; gap: 10px; }
  .prod-intro .links { margin-left: 0; }
  .article { padding: 32px 0 30px; }
  .art-body { font-size: 15px; line-height: 1.95; }
  .art-body h2 { font-size: 20px; margin-top: 34px; }
  .foot { grid-template-columns: 1fr; }
  .stamp { justify-self: start; }
}
