﻿/* =========================================================
   社科调研组 · 站点样式
   配色取自 logo：蓝 #3A78F2 / 墨 #1C1E24 / 白
   ========================================================= */

:root {
  --ink: #1c1e24;
  --ink-2: #3a3f4b;
  --muted: #6e7686;
  --blue: #3a78f2;
  --blue-dark: #2a5fd0;
  --blue-tint: #eef4ff;
  --line: #e4e8f1;
  --soft: #f7f8fc;
  --white: #fff;
  --sans: "PingFang SC", "Microsoft YaHei", "Hiragino Sans GB", "Noto Sans SC",
    system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  --radius: 14px;
  --shadow: 0 18px 50px -28px rgba(28, 30, 36, 0.35);
  --max: 1120px;
}

* { box-sizing: border-box; }

[hidden] { display: none !important; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--white);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4 { margin: 0; line-height: 1.25; letter-spacing: -0.01em; font-weight: 700; }
p { margin: 0 0 1em; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { font: inherit; color: inherit; }

.skip {
  position: absolute; left: -9999px; top: 0;
  background: var(--ink); color: #fff; padding: 10px 16px; z-index: 100;
}
.skip:focus { left: 12px; top: 12px; }

:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; }

/* ---------------- 顶栏 ---------------- */

.topbar {
  position: sticky; top: 0; z-index: 40;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(14px) saturate(150%);
  border-bottom: 1px solid var(--line);
}
.topbar-inner {
  max-width: var(--max); margin: 0 auto; padding: 14px 28px;
  display: flex; align-items: center; gap: 24px;
}
.brand { display: flex; align-items: center; gap: 12px; margin-right: auto; }
.brand-mark { width: 34px; height: auto; }
.brand-text { display: flex; flex-direction: column; line-height: 1.2; }
.brand-text strong { font-size: 15px; letter-spacing: 0.02em; }
.brand-text em {
  font-style: normal; font-size: 9.5px; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--muted); margin-top: 3px;
}
.nav { display: flex; gap: 26px; }
.nav a {
  font-size: 14px; color: var(--ink-2); position: relative; padding: 4px 0;
  transition: color 0.18s ease;
}
.nav a:hover { color: var(--blue); }
.nav a.nav-survey {
  color: var(--blue); border: 1px solid #cfe0ff; background: var(--blue-tint);
  border-radius: 999px; padding: 4px 12px;
}
.nav a.nav-survey::after { display: none; }
.nav a.nav-survey:hover { background: #e2ecff; }
.nav a::after {
  content: ""; position: absolute; left: 0; right: 100%; bottom: 0; height: 1.5px;
  background: var(--blue); transition: right 0.25s ease;
}
.nav a:hover::after { right: 0; }

.icon-btn {
  width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--line);
  background: var(--white); display: grid; place-items: center; cursor: pointer;
  transition: border-color 0.2s ease, color 0.2s ease;
}
.icon-btn svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; }
.icon-btn:hover { border-color: var(--blue); color: var(--blue); }

/* ---------------- 首屏 ---------------- */

.hero {
  border-bottom: 1px solid var(--line);
  padding: 84px 28px 0;
}
.hero-inner {
  max-width: var(--max); margin: 0 auto;
  display: grid; grid-template-columns: minmax(0, 1fr) 330px;
  gap: 72px; align-items: center;
}
.hero-art { display: flex; justify-content: flex-end; }
.hero-card {
  width: 100%; border: 1px solid var(--line); border-radius: 20px;
  background: linear-gradient(180deg, #ffffff 0%, #fafcff 100%);
  padding: 34px 30px 22px; box-shadow: 0 40px 80px -60px rgba(28, 30, 36, 0.55);
}
.hero-card img { width: 100%; height: auto; }
.hero-card-label {
  margin: 18px 0 0; text-align: center; font-size: 10px; letter-spacing: 0.16em;
  color: var(--muted); text-transform: uppercase;
}
.eyebrow {
  font-size: 11px; letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--blue); font-weight: 600; margin: 0 0 18px;
}
.hero h1 {
  font-size: clamp(34px, 5vw, 56px); font-weight: 800; letter-spacing: -0.03em;
  margin-bottom: 24px;
}
.lede { font-size: 17px; color: var(--ink-2); max-width: 620px; margin-bottom: 34px; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }

.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 22px; border-radius: 999px; font-size: 14.5px; font-weight: 600;
  border: 1px solid transparent; transition: transform 0.15s ease, background 0.2s ease, border-color 0.2s ease;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--blue); color: #fff; }
.btn-primary:hover { background: var(--blue-dark); }
.btn-ghost { border-color: var(--line); color: var(--ink-2); background: var(--white); }
.btn-ghost:hover { border-color: var(--blue); color: var(--blue); }

.stats {
  max-width: var(--max); margin: 56px auto 0;
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px; padding: 26px 0 32px; border-top: 1px solid var(--line);
}
.stats dt { font-size: 12px; color: var(--muted); letter-spacing: 0.08em; }
.stats dd { margin: 6px 0 0; font-size: clamp(24px, 3vw, 32px); font-weight: 700; letter-spacing: -0.02em; }
.stats dd small { font-size: 12px; font-weight: 500; color: var(--muted); margin-left: 3px; }

/* ---------------- 问卷入口 ---------------- */

.survey-cta { background: linear-gradient(180deg, #f2f7ff 0%, #eaf2ff 100%); border-bottom: 1px solid #dbe7ff; }
.survey-cta-inner {
  max-width: var(--max); margin: 0 auto; padding: 40px 28px;
  display: flex; align-items: center; justify-content: space-between; gap: 32px;
}
.survey-cta .eyebrow { margin-bottom: 10px; }
.survey-cta h2 { font-size: clamp(20px, 2.6vw, 26px); margin-bottom: 10px; }
.survey-cta-note { margin: 0; color: var(--ink-2); font-size: 14.5px; max-width: 560px; }
.survey-cta-btn { flex: none; padding: 14px 26px; font-size: 15px; box-shadow: 0 14px 30px -18px rgba(58, 120, 242, 0.8); }

@media (max-width: 760px) {
  .survey-cta-inner { flex-direction: column; align-items: flex-start; gap: 20px; padding: 32px 22px; }
  .survey-cta-btn { width: 100%; justify-content: center; }
}

/* ---------------- 章节 ---------------- */

.section { max-width: var(--max); margin: 0 auto; padding: 88px 28px; border-bottom: 1px solid var(--line); }
.section-tight { padding-top: 64px; padding-bottom: 64px; }
.section-head { margin-bottom: 40px; max-width: 640px; }
.section-head h2 { font-size: clamp(24px, 3vw, 32px); margin-bottom: 12px; }
.section-note { color: var(--muted); font-size: 14.5px; margin: 0; }

/* ---------------- 发布轨迹 ---------------- */

.journal-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: start; }

.chart { display: flex; align-items: stretch; gap: 14px; height: 230px; padding-top: 10px; }
.chart .bar-wrap { flex: 1; display: flex; flex-direction: column; align-items: center; height: 100%; gap: 8px; min-width: 0; }
.chart .bar-plot { flex: 1 1 auto; width: 100%; display: flex; align-items: flex-end; justify-content: center; }
.chart .bar {
  width: 100%; max-width: 64px; flex: none; border-radius: 8px 8px 2px 2px;
  background: linear-gradient(180deg, #6f9cff, var(--blue));
  transform-origin: bottom; animation: grow 0.7s cubic-bezier(0.2, 0.7, 0.3, 1) both;
}
.chart .bar.is-now { background: linear-gradient(180deg, #3a78f2, #2a5fd0); }
.chart .bar.is-empty { background: var(--line); border-radius: 2px; }
.chart .bar-val { height: 16px; line-height: 16px; font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.chart .bar-year { height: 18px; line-height: 18px; font-size: 12px; color: var(--ink-2); }
@keyframes grow { from { transform: scaleY(0.1); opacity: 0; } to { transform: scaleY(1); opacity: 1; } }

.latest { display: flex; flex-direction: column; }
.latest-item {
  display: flex; gap: 18px; padding: 18px 0; border-bottom: 1px dashed var(--line);
  align-items: baseline; transition: color 0.2s ease;
}
.latest-item:first-child { padding-top: 0; }
.latest-item:hover { color: var(--blue); }
.latest-item time { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.latest-item span { font-size: 15px; line-height: 1.5; }

/* ---------------- 阅读夹 ---------------- */

.shelf-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.shelf-empty {
  grid-column: 1 / -1; border: 1px dashed var(--line); border-radius: var(--radius);
  padding: 26px; color: var(--muted); font-size: 14.5px; background: var(--soft);
}
.shelf-card {
  border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 18px 16px;
  background: var(--white); transition: border-color 0.2s ease, box-shadow 0.2s ease;
  display: flex; flex-direction: column; gap: 8px;
}
.shelf-card:hover { border-color: var(--blue); box-shadow: var(--shadow); }
.shelf-card h3 { font-size: 15px; line-height: 1.45; }
.shelf-card .shelf-meta { font-size: 12px; color: var(--muted); display: flex; justify-content: space-between; }
.progress-track { height: 3px; background: var(--line); border-radius: 999px; overflow: hidden; }
.progress-track i { display: block; height: 100%; background: var(--blue); }

/* ---------------- 文章档案 ---------------- */

.toolbar {
  position: sticky; top: 65px; z-index: 20; background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(10px); padding: 14px 0 16px; border-bottom: 1px solid var(--line);
  margin-bottom: 8px;
}
.search {
  display: flex; align-items: center; gap: 10px; border: 1px solid var(--line);
  border-radius: 999px; padding: 10px 16px; background: var(--white);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.search:focus-within { border-color: var(--blue); box-shadow: 0 0 0 4px var(--blue-tint); }
.search svg { width: 17px; height: 17px; fill: none; stroke: var(--muted); stroke-width: 1.7; stroke-linecap: round; }
.search input { flex: 1; border: 0; outline: 0; background: transparent; font-size: 15px; color: var(--ink); }
.search input::placeholder { color: #9aa3b2; }
.search kbd, .kbd-hint kbd {
  font-family: var(--mono); font-size: 11px; color: var(--muted);
  border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 5px;
  padding: 1px 6px; background: var(--soft);
}

.filters { display: flex; align-items: center; gap: 16px; margin-top: 14px; flex-wrap: wrap; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip {
  border: 1px solid var(--line); background: var(--white); border-radius: 999px;
  padding: 6px 14px; font-size: 13px; cursor: pointer; color: var(--ink-2);
  transition: all 0.18s ease;
}
.chip:hover { border-color: var(--blue); color: var(--blue); }
.chip.is-on { background: var(--ink); border-color: var(--ink); color: #fff; }

.sort { margin-left: auto; display: flex; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; }
.sort-btn { border: 0; background: var(--white); padding: 6px 16px; font-size: 13px; cursor: pointer; color: var(--muted); }
.sort-btn.is-on { background: var(--ink); color: #fff; }

.tags { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 12px; }
.tag {
  border: 0; background: none; padding: 0; font-size: 12.5px; color: var(--muted);
  cursor: pointer; border-bottom: 1px solid transparent;
}
.tag:hover { color: var(--blue); }
.tag.is-on { color: var(--blue); border-bottom-color: var(--blue); }

.post-list { outline: none; }
.post {
  display: grid; grid-template-columns: 46px 1fr auto; gap: 18px; align-items: start;
  padding: 22px 16px; border-bottom: 1px solid var(--line); cursor: pointer;
  border-radius: 10px; transition: background 0.18s ease, color 0.18s ease;
}
.post:hover, .post.is-active { background: var(--soft); }
.post.is-active { box-shadow: inset 2px 0 0 var(--blue); }
.post-no { font-family: var(--mono); font-size: 12px; color: #aeb6c4; padding-top: 4px; }
.post-title { display: block; font-size: 17px; font-weight: 650; letter-spacing: -0.01em; margin-bottom: 6px; }
.post:hover .post-title, .post.is-active .post-title { color: var(--blue-dark); }
.post-summary { display: block; font-size: 14px; color: var(--muted); line-height: 1.65; margin: 0 0 10px; }
.post-meta { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12px; color: var(--muted); align-items: center; }
.post-meta .cat { color: var(--blue); }
.post-meta .tag-dot { color: #b9c1cf; }
.post-right { text-align: right; font-size: 12px; color: var(--muted); display: flex; flex-direction: column; gap: 6px; align-items: flex-end; }
.post-read { font-variant-numeric: tabular-nums; }
.post-progress { width: 54px; height: 3px; background: var(--line); border-radius: 999px; overflow: hidden; }
.post-progress i { display: block; height: 100%; background: var(--blue); }

.empty-state {
  padding: 60px 20px; text-align: center; color: var(--muted); font-size: 14.5px;
}
.kbd-hint { margin: 18px 0 0; font-size: 12px; color: var(--muted); text-align: right; }
.kbd-hint kbd { margin: 0 2px; }

/* ---------------- 项目 ---------------- */

.project-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.project {
  border: 1px solid var(--line); border-radius: var(--radius); padding: 24px;
  display: flex; flex-direction: column; gap: 10px; background: var(--white);
  transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}
.project:hover { border-color: var(--blue); transform: translateY(-2px); box-shadow: var(--shadow); }
.project-top { display: flex; justify-content: space-between; align-items: center; font-size: 12px; color: var(--muted); }
.status { border-radius: 999px; padding: 2px 10px; font-size: 11.5px; }
.status.on { background: var(--blue-tint); color: var(--blue-dark); }
.status.done { background: #f1f3f7; color: var(--muted); }
.project h3 { font-size: 17px; }
.project p { font-size: 13.5px; color: var(--muted); margin: 0; }
.project dl { display: flex; gap: 22px; margin: 4px 0 0; font-size: 12px; color: var(--ink-2); }
.project dl div { display: flex; flex-direction: column; gap: 2px; }
.project dl dt { color: var(--muted); font-size: 11px; letter-spacing: 0.04em; }
.project dl dd { margin: 0; font-weight: 600; }

/* ---------------- 关于 ---------------- */

.about { display: grid; grid-template-columns: 0.85fr 1.15fr; gap: 56px; align-items: start; }
.about-logo { border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; background: var(--white); }
.about-text h2 { font-size: clamp(24px, 3vw, 32px); margin-bottom: 18px; }
.about-text p { color: var(--ink-2); font-size: 15px; }
.about-points { margin: 22px 0; padding: 0; list-style: none; border-top: 1px solid var(--line); }
.about-points li { padding: 12px 0; border-bottom: 1px solid var(--line); font-size: 14px; color: var(--ink-2); }
.about-points strong { color: var(--ink); }
.about-contact { font-size: 13.5px; color: var(--muted); }
.about-contact a { color: var(--blue); border-bottom: 1px solid currentColor; }

/* ---------------- 阅读视图 ---------------- */

.reader { min-height: 100vh; background: var(--white); }
.reader-bar {
  position: sticky; top: 0; z-index: 30; background: rgba(255,255,255,0.94);
  backdrop-filter: blur(12px); border-bottom: 1px solid var(--line);
}
.reader-progress { height: 2px; background: var(--line); }
.reader-progress i { display: block; height: 100%; width: 0; background: var(--blue); transition: width 0.1s linear; }
.reader-bar-inner {
  max-width: 720px; margin: 0 auto; padding: 12px 28px;
  display: flex; align-items: center; justify-content: space-between;
}
.back, .fav-btn {
  border: 1px solid var(--line); background: var(--white); border-radius: 999px;
  padding: 7px 16px; font-size: 13px; cursor: pointer; display: inline-flex; align-items: center; gap: 7px;
  transition: border-color 0.18s ease, color 0.18s ease;
}
.back:hover, .fav-btn:hover { border-color: var(--blue); color: var(--blue); }
.fav-btn svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.6; }
.fav-btn[aria-pressed="true"] { border-color: var(--blue); color: var(--blue); background: var(--blue-tint); }
.fav-btn[aria-pressed="true"] svg { fill: var(--blue); }

.reader-main { max-width: 720px; margin: 0 auto; padding: 64px 28px 40px; }
.reader-main .eyebrow { margin-bottom: 14px; }
.reader-main h1 { font-size: clamp(28px, 4vw, 40px); letter-spacing: -0.025em; margin-bottom: 18px; }
.reader-meta { display: flex; gap: 14px; flex-wrap: wrap; font-size: 13px; color: var(--muted); margin-bottom: 40px; padding-bottom: 20px; border-bottom: 1px solid var(--line); }
.reader-body { font-size: 16.5px; line-height: 1.95; color: #262a33; }
.reader-body h2 { font-size: 20px; margin: 40px 0 14px; }
.reader-body h3 { font-size: 17px; margin: 30px 0 10px; color: var(--ink); }
.reader-body p { margin: 0 0 1.2em; }
.reader-body blockquote {
  margin: 26px 0; padding: 4px 0 4px 20px; border-left: 2px solid var(--blue);
  color: var(--ink-2); font-size: 15.5px;
}
.reader-body ul, .reader-body ol { margin: 0 0 1.2em; padding-left: 22px; }
.reader-body li { margin-bottom: 6px; }
.reader-body strong { color: var(--ink); }

.post-cta {
  margin-top: 56px; padding: 26px 28px; border: 1px solid #dbe7ff; border-radius: var(--radius);
  background: linear-gradient(180deg, #f7faff, #eef4ff);
  display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap;
}
.post-cta p { margin: 0; font-size: 15px; color: var(--ink-2); }
.post-cta .btn { flex: none; }

.reader-nav {
  max-width: 720px; margin: 0 auto; padding: 0 28px 96px;
  display: flex; justify-content: space-between; gap: 16px;
}
.reader-nav a {
  flex: 0 1 46%; border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px;
  font-size: 13.5px; color: var(--ink-2); transition: border-color 0.2s ease, color 0.2s ease;
}
.reader-nav a.next { margin-left: auto; text-align: right; }
.reader-nav a:hover { border-color: var(--blue); color: var(--blue); }
.reader-nav span { display: block; font-size: 11px; color: var(--muted); letter-spacing: 0.1em; margin-bottom: 4px; }

body.reading main, body.reading .topbar, body.reading .footer { display: none; }

/* ---------------- 页脚 ---------------- */

.footer { border-top: 1px solid var(--line); background: var(--soft); }
.footer-inner { max-width: var(--max); margin: 0 auto; padding: 40px 28px; font-size: 13px; }
.footer p { margin: 0 0 6px; }
.muted { color: var(--muted); }

/* ---------------- 响应式 ---------------- */

@media (max-width: 900px) {
  .nav { display: none; }
  .hero-inner { grid-template-columns: 1fr; gap: 40px; }
  .hero-art { display: none; }
  .hero { padding: 64px 22px 0; }
  .stats { margin-top: 40px; }
  .journal-grid, .about { grid-template-columns: 1fr; gap: 36px; }
  .project-grid, .shelf-list { grid-template-columns: 1fr; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 20px; }
  .section { padding: 64px 22px; }
  .toolbar { top: 60px; }
  .post { grid-template-columns: 32px 1fr; }
  .post-right { grid-column: 2; flex-direction: row; align-items: center; gap: 10px; margin-top: 4px; }
}

@media (max-width: 520px) {
  .brand-text em { display: none; }
  .hero h1 { font-size: 32px; }
  .filters { align-items: flex-start; }
  .sort { margin-left: 0; }
  .reader-main { padding: 40px 22px 32px; }
  .reader-bar-inner { padding: 10px 18px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
  html { scroll-behavior: auto; }
}

/* 手机端菜单 */
.menu-btn { display: none; }
@media (max-width: 900px) {
  .topbar-inner { position: relative; }
  .menu-btn { display: inline-flex; }
  .nav.is-open {
    display: flex;
    position: absolute;
    top: calc(100% + 10px);
    right: 16px;
    left: 16px;
    flex-direction: column;
    gap: 2px;
    padding: 10px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 16px;
    box-shadow: 0 20px 44px rgba(18, 28, 58, 0.14);
    z-index: 60;
  }
  .nav.is-open a { padding: 12px 14px; border-radius: 10px; font-size: 15px; }
  .nav.is-open a::after { display: none; }
  .nav.is-open a:active { background: var(--soft); }
  .nav.is-open a.nav-survey { margin-top: 4px; text-align: center; }
}

/* ---------------- 印章与徽章 ---------------- */

.hero-badge {
  display: block;
  width: min(80%, 300px);
  margin: 0 auto 18px;
  border-radius: 50%;
  filter: drop-shadow(0 18px 28px rgba(24, 40, 80, 0.18));
}

.about-seal {
  margin-top: 26px;
  display: flex;
  justify-content: flex-end;
}
.about-seal img {
  width: 112px;
  height: auto;
  transform: rotate(-7deg);
  opacity: 0.9;
  mix-blend-mode: multiply;
}

.reader-seal {
  margin: 44px 0 0;
  display: flex;
  align-items: center;
  gap: 14px;
  justify-content: flex-end;
  color: var(--muted);
  font-size: 12.5px;
  letter-spacing: 0.04em;
}
.reader-seal img {
  width: 64px;
  height: auto;
  transform: rotate(-6deg);
  opacity: 0.85;
  mix-blend-mode: multiply;
}

@media (max-width: 760px) {
  .about-seal { justify-content: flex-start; margin-top: 20px; }
  .about-seal img { width: 92px; }
  .reader-seal { justify-content: flex-start; }
  .reader-seal img { width: 54px; }
}


/* 首屏统计：数据到位前显示占位横线，避免先显示本地示例数字再跳变 */
.stats dd:empty::after { content: "—"; color: #ccd4e3; font-weight: 600; }
