/* 钦律亲为 · 文章分享站 — 设计 DNA 参考 legalaiskill.com
   墨绿/米白学术冷静风 · 宋体大标题 + 无衬线正文 · 细线分割 · 编辑感 */

:root {
  --ink: #232b2f;
  --ink-soft: #505b62;
  --muted: #747a7b;
  --line: #d4d3cd;
  --line-strong: #b7b8b2;
  --paper: #fafaf8;
  --canvas: #ecece7;
  --mist: #e3e4e0;
  --teal: #526a78;
  --teal-dark: #344c59;
  --coral: #9b5d4b;
  --gold: #8b7249;
  --shadow: 0 14px 34px rgba(37, 42, 43, 0.10);
  --serif: "STSong", "Songti SC", "Noto Serif CJK SC", "Source Han Serif SC", SimSun, Georgia, serif;
  --sans: Inter, "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

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

a { color: var(--teal-dark); text-decoration: none; }
a:hover { color: var(--coral); }

.skip-link {
  position: absolute; left: -9999px; top: 0;
  background: var(--teal-dark); color: #fff; padding: 8px 14px; z-index: 100;
}
.skip-link:focus { left: 12px; top: 12px; }

.container { width: 100%; max-width: 1040px; margin: 0 auto; padding: 0 24px; }

/* ---------- 顶栏 ---------- */
.site-header {
  position: sticky; top: 0; z-index: 20;
  background: rgba(250, 250, 248, 0.92);
  backdrop-filter: saturate(140%) blur(8px);
  border-bottom: 1px solid var(--line);
}
.nav { display: flex; align-items: center; justify-content: space-between; max-width: 1040px; margin: 0 auto; padding: 14px 24px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-family: var(--serif); font-size: 19px; font-weight: 600; color: var(--ink); }
.brand-mark { width: 16px; height: 16px; border-radius: 4px; background: linear-gradient(135deg, var(--teal), var(--coral)); display: inline-block; }
.nav-links { display: flex; gap: 22px; }
.nav-links a { color: var(--ink-soft); font-size: 15px; padding: 4px 0; border-bottom: 2px solid transparent; }
.nav-links a:hover, .nav-links a.active { color: var(--ink); border-bottom-color: var(--coral); }

/* ---------- Hero ---------- */
.strata-hero {
  position: relative; overflow: hidden;
  background:
    radial-gradient(120% 90% at 85% 0%, rgba(82, 106, 120, 0.10), transparent 60%),
    linear-gradient(180deg, var(--canvas), var(--paper));
  border-bottom: 1px solid var(--line);
  padding: 84px 0 72px;
}
.strata-scan {
  position: absolute; inset: 0;
  background: repeating-linear-gradient(90deg, transparent 0 38px, rgba(35, 43, 47, 0.025) 38px 39px);
  pointer-events: none;
}
.strata-hero-layout { position: relative; }
.strata-intro { max-width: 720px; }
.eyebrow {
  text-transform: uppercase; letter-spacing: 0.18em; font-size: 12px;
  color: var(--teal); font-weight: 600; margin: 0 0 14px;
}
.strata-hero h1 {
  font-family: var(--serif); font-weight: 600; letter-spacing: 0.02em;
  font-size: clamp(40px, 7vw, 68px); line-height: 1.05; margin: 0 0 10px; color: var(--ink);
}
.strata-subtitle { font-family: var(--serif); font-size: 22px; color: var(--teal-dark); margin: 0 0 18px; }
.strata-lede { font-size: 17px; color: var(--ink-soft); max-width: 60ch; margin: 0 0 28px; }
.pediment-enter {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--ink); color: var(--paper); padding: 12px 22px; border-radius: 999px;
  font-size: 15px; font-weight: 500; transition: transform .15s ease, background .15s ease;
}
.pediment-enter:hover { background: var(--teal-dark); color: #fff; transform: translateY(-1px); }

/* ---------- 通用 section ---------- */
.section { padding: 56px 0; }
.section-soft { background: rgba(236, 236, 231, 0.5); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 28px; }
.section-heading h2 { font-family: var(--serif); font-weight: 600; font-size: 30px; margin: 6px 0 0; color: var(--ink); }
.section-heading p { max-width: 56ch; margin: 8px 0 0; color: var(--ink-soft); font-size: 14px; }
.all-link { color: var(--teal-dark); font-size: 14px; white-space: nowrap; border-bottom: 1px solid var(--line-strong); padding-bottom: 2px; }
.all-link:hover { color: var(--coral); border-color: var(--coral); }

/* ---------- 分类 tab ---------- */
.task-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 26px; }
.tab {
  font-family: var(--sans); font-size: 14px; color: var(--ink-soft);
  background: var(--paper); border: 1px solid var(--line); border-radius: 999px;
  padding: 7px 16px; cursor: pointer; transition: all .15s ease;
}
.tab:hover { border-color: var(--teal); color: var(--teal-dark); }
.tab.active { background: var(--ink); color: var(--paper); border-color: var(--ink); }

/* ---------- 文章网格 ---------- */
.task-results { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 18px; }
.atlas-item {
  display: flex; flex-direction: column; gap: 8px;
  background: var(--paper); border: 1px solid var(--line); border-radius: 12px;
  padding: 20px 20px 18px; color: var(--ink); transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}
.atlas-item:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--line-strong); }
.atlas-item-top { display: flex; justify-content: space-between; align-items: center; font-size: 12px; color: var(--muted); }
.atlas-item .cat { color: var(--teal); font-weight: 600; letter-spacing: .02em; }
.atlas-item h3 { font-family: var(--serif); font-weight: 600; font-size: 20px; line-height: 1.35; margin: 2px 0 0; color: var(--ink); }
.atlas-item .excerpt { font-size: 14px; color: var(--ink-soft); margin: 0; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.tag { font-size: 11px; color: var(--teal-dark); background: rgba(82, 106, 120, 0.10); border-radius: 6px; padding: 2px 8px; }
.loading { color: var(--muted); padding: 30px 0; }

/* ---------- 文章详情 ---------- */
.post { padding-bottom: 40px; }
.post-head { padding: 56px 24px 22px; border-bottom: 1px solid var(--line); max-width: 760px; }
.post-head h1 { font-family: var(--serif); font-weight: 600; font-size: clamp(30px, 5vw, 44px); line-height: 1.2; margin: 8px 0 12px; color: var(--ink); }
.post-meta { color: var(--muted); font-size: 14px; margin: 0; }
.post-body { max-width: 720px; padding-top: 30px; font-size: 17px; color: var(--ink); }
.post-body h1, .post-body h2, .post-body h3 { font-family: var(--serif); font-weight: 600; color: var(--ink); line-height: 1.3; margin: 1.6em 0 .5em; }
.post-body h2 { font-size: 26px; border-left: 4px solid var(--coral); padding-left: 12px; }
.post-body h3 { font-size: 21px; }
.post-body p { margin: 0 0 1.1em; }
.post-body ul { margin: 0 0 1.1em; padding-left: 1.3em; }
.post-body li { margin: 0 0 .4em; }
.post-body blockquote { margin: 0 0 1.1em; padding: 10px 16px; border-left: 3px solid var(--teal); background: rgba(82, 106, 120, 0.07); color: var(--ink-soft); border-radius: 0 8px 8px 0; }
.post-body pre { background: var(--canvas); border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px; overflow: auto; }
.post-body code { font-family: "SFMono-Regular", Consolas, monospace; font-size: 14px; }
.post-body a { border-bottom: 1px solid var(--line-strong); }

/* ---------- 评论 ---------- */
.comments { max-width: 720px; margin-top: 48px; padding-top: 30px; border-top: 1px solid var(--line); }
.comments h2 { font-family: var(--serif); font-size: 22px; margin: 0 0 18px; }
#comment-list { display: flex; flex-direction: column; gap: 14px; margin-bottom: 26px; }
.comment { background: var(--paper); border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px; }
.c-head { display: flex; justify-content: space-between; font-size: 13px; color: var(--muted); margin-bottom: 6px; }
.c-head strong { color: var(--ink); }
.comment p { margin: 0; font-size: 15px; color: var(--ink-soft); white-space: pre-wrap; word-break: break-word; }
#comment-form { display: flex; flex-direction: column; gap: 10px; }
#comment-form input, #comment-form textarea {
  font-family: var(--sans); font-size: 15px; color: var(--ink);
  background: var(--paper); border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; width: 100%;
}
#comment-form textarea { min-height: 92px; resize: vertical; }
#comment-form button {
  align-self: flex-start; background: var(--ink); color: var(--paper); border: none;
  border-radius: 999px; padding: 10px 22px; font-size: 15px; cursor: pointer; transition: background .15s ease;
}
#comment-form button:hover { background: var(--teal-dark); }
#comment-form button:disabled { opacity: .5; cursor: default; }
.comment-note { font-size: 12px; color: var(--muted); margin: 12px 0 0; }

/* ---------- 管理后台 ---------- */
.admin-form { display: flex; flex-direction: column; gap: 12px; max-width: 640px; margin-bottom: 36px; }
.admin-form input, .admin-form textarea {
  font-family: var(--sans); font-size: 15px; color: var(--ink);
  background: var(--paper); border: 1px solid var(--line); border-radius: 8px; padding: 11px 13px; width: 100%;
}
.admin-form textarea { min-height: 260px; resize: vertical; font-family: "SFMono-Regular", Consolas, monospace; font-size: 14px; line-height: 1.6; }
.admin-form button {
  align-self: flex-start; background: var(--ink); color: var(--paper); border: none;
  border-radius: 999px; padding: 11px 24px; font-size: 15px; cursor: pointer;
}
.admin-form button:hover { background: var(--teal-dark); }
.admin-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.admin-list li { display: flex; align-items: center; gap: 12px; background: var(--paper); border: 1px solid var(--line); border-radius: 8px; padding: 10px 14px; }
.admin-list li a { font-family: var(--serif); font-size: 17px; }
.admin-list form button { background: none; border: 1px solid var(--line-strong); color: var(--coral); border-radius: 6px; padding: 4px 12px; font-size: 13px; cursor: pointer; }
.admin-list form button:hover { background: var(--coral); color: #fff; border-color: var(--coral); }

/* ---------- 页脚 ---------- */
.site-footer { background: var(--canvas); border-top: 1px solid var(--line); padding: 44px 0 22px; margin-top: 40px; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr; gap: 28px; }
.footer-brand p { font-size: 13px; color: var(--ink-soft); max-width: 40ch; margin: 12px 0 0; }
.footer-column strong { display: block; color: var(--ink); margin-bottom: 10px; font-size: 14px; }
.footer-column a, .footer-column span { display: block; font-size: 13px; color: var(--ink-soft); margin-bottom: 8px; }
.footer-bottom { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; margin-top: 30px; padding-top: 18px; border-top: 1px solid var(--line); font-size: 12px; color: var(--muted); }

/* ---------- 响应式 ---------- */
@media (max-width: 720px) {
  .nav { flex-direction: column; align-items: flex-start; gap: 10px; }
  .nav-links { gap: 16px; }
  .strata-hero { padding: 56px 0 48px; }
  .footer-grid { grid-template-columns: 1fr; gap: 22px; }
  .section-heading { align-items: flex-start; }
}
