/* 度裁见解 — 移动端优先阅读排版 */
:root {
  --ink: #1a2329;
  --ink-soft: #3f4a54;
  --muted: #6f7a85;
  --paper: #f7f4ef;
  --paper-deep: #ebe6dc;
  --paper-card: #fffcf7;
  --line: rgba(26, 35, 41, 0.1);
  --accent: #0d5a4a;
  --accent-hover: #094539;
  --accent-soft: #e4f0ec;
  --accent-line: rgba(13, 90, 74, 0.22);
  --max: 36rem;
  --wide: 42rem;
  --serif: Georgia, "Noto Serif SC", "Source Han Serif SC", "Songti SC", serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --text-xs: 0.8125rem;
  --text-sm: 0.875rem;
  --text-base: 0.9375rem;
  --text-lg: 1.0625rem;
  --text-xl: 1.25rem;
  --text-2xl: 1.5rem;
  --radius: 10px;
  --shadow: 0 1px 2px rgba(26, 35, 41, 0.04), 0 8px 24px rgba(26, 35, 41, 0.05);
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  color: var(--ink-soft);
  background:
    radial-gradient(900px 380px at 8% -8%, #fff9ee 0%, transparent 58%),
    radial-gradient(700px 320px at 100% 0%, var(--accent-soft) 0%, transparent 52%),
    var(--paper);
  font-family: var(--sans);
  font-size: var(--text-base);
  line-height: 1.85;
  letter-spacing: 0.01em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a {
  color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

a:hover { color: var(--accent-hover); }

.wrap {
  width: min(100% - 1.5rem, var(--wide));
  margin: 0 auto;
}

.narrow {
  width: min(100% - 1.5rem, var(--max));
  margin: 0 auto;
}

/* —— 顶栏 —— */
.site-header {
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--line);
  background: rgba(247, 244, 239, 0.9);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  position: sticky;
  top: 0;
  z-index: 20;
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.brand {
  font-family: var(--serif);
  font-size: 1.125rem;
  letter-spacing: 0.06em;
  color: var(--ink);
  text-decoration: none;
  font-weight: 700;
  line-height: 1.2;
}

.brand span {
  display: block;
  color: var(--muted);
  font-family: var(--sans);
  font-weight: 500;
  font-size: var(--text-xs);
  letter-spacing: 0.14em;
  margin-top: 0.15rem;
}

.nav {
  display: flex;
  gap: 0.35rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.nav a {
  color: var(--ink-soft);
  text-decoration: none;
  font-size: var(--text-sm);
  padding: 0.35rem 0.55rem;
  border-radius: 6px;
  line-height: 1.3;
}

.nav a:hover {
  color: var(--accent);
  background: var(--accent-soft);
}

/* —— 首页 Hero —— */
.hero {
  padding: 2.75rem 0 2.25rem;
  border-bottom: 1px solid var(--line);
}

.hero h1 {
  font-family: var(--serif);
  font-size: clamp(1.5rem, 5.2vw, 2rem);
  font-weight: 700;
  line-height: 1.38;
  margin: 0 0 0.85rem;
  max-width: 16em;
  letter-spacing: 0.02em;
  color: var(--ink);
}

.hero p {
  margin: 0;
  max-width: 34rem;
  color: var(--ink-soft);
  font-size: var(--text-sm);
  line-height: 1.8;
}

.hero .meta {
  margin-top: 1.1rem;
  color: var(--muted);
  font-size: var(--text-xs);
  letter-spacing: 0.06em;
}

/* —— 区块标题 —— */
.section {
  padding: 2.25rem 0 3rem;
}

.section h2 {
  font-family: var(--serif);
  font-size: var(--text-xl);
  font-weight: 700;
  margin: 0 0 1.15rem;
  letter-spacing: 0.03em;
  color: var(--ink);
  padding-left: 0.75rem;
  border-left: 3px solid var(--accent);
  line-height: 1.35;
}

/* —— 文章列表 —— */
.article-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0.75rem;
}

.article-list li {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper-card);
  box-shadow: var(--shadow);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.article-list li:hover {
  border-color: var(--accent-line);
  box-shadow: 0 2px 4px rgba(26, 35, 41, 0.05), 0 10px 28px rgba(13, 90, 74, 0.08);
}

.article-list a {
  color: inherit;
  text-decoration: none;
  display: block;
  padding: 1rem 1.05rem;
}

.article-list .title {
  font-family: var(--serif);
  font-size: var(--text-lg);
  font-weight: 700;
  line-height: 1.45;
  color: var(--ink);
  transition: color 0.2s ease;
  margin-bottom: 0.45rem;
}

.article-list a:hover .title { color: var(--accent); }

.article-list .summary {
  color: var(--muted);
  margin: 0 0 0.65rem;
  font-size: var(--text-sm);
  line-height: 1.75;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.article-list .date {
  color: var(--muted);
  font-size: var(--text-xs);
  letter-spacing: 0.04em;
}

/* —— 文章页头 —— */
.article-header {
  padding: 2rem 0 1.25rem;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(255, 252, 247, 0.65) 0%, transparent 100%);
}

.article-header h1 {
  font-family: var(--serif);
  font-size: clamp(1.375rem, 4.8vw, 1.875rem);
  font-weight: 700;
  line-height: 1.38;
  margin: 0 0 0.75rem;
  letter-spacing: 0.015em;
  color: var(--ink);
}

.article-header .date {
  display: inline-block;
  color: var(--muted);
  font-size: var(--text-xs);
  letter-spacing: 0.05em;
  padding: 0.25rem 0.55rem;
  background: var(--paper-deep);
  border-radius: 999px;
}

/* —— 正文 —— */
.prose {
  padding: 1.5rem 0 3.5rem;
  font-size: var(--text-base);
  color: var(--ink-soft);
}

.prose p {
  margin: 0 0 1.15rem;
  text-align: justify;
  text-justify: inter-ideograph;
  hanging-punctuation: allow-end;
}

.prose h2 {
  font-family: var(--serif);
  font-size: var(--text-xl);
  font-weight: 700;
  color: var(--ink);
  margin: 2.25rem 0 0.85rem;
  padding-bottom: 0.45rem;
  border-bottom: 2px solid var(--accent-soft);
  line-height: 1.42;
  letter-spacing: 0.02em;
}

.prose h2:first-child {
  margin-top: 0;
}

.prose h3 {
  font-family: var(--sans);
  font-size: var(--text-lg);
  font-weight: 600;
  color: var(--ink);
  margin: 1.65rem 0 0.6rem;
  line-height: 1.5;
  letter-spacing: 0.01em;
}

.prose strong {
  color: var(--ink);
  font-weight: 600;
}

.prose em {
  font-style: normal;
  color: var(--ink);
  border-bottom: 1px dashed var(--accent-line);
}

.prose table {
  width: 100%;
  border-collapse: collapse;
  margin: 0.5rem 0 1.35rem;
  font-size: var(--text-sm);
  line-height: 1.65;
  display: block;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--paper-card);
}

.prose thead,
.prose tbody,
.prose tr {
  display: table;
  width: 100%;
  table-layout: fixed;
}

.prose th,
.prose td {
  border-bottom: 1px solid var(--line);
  padding: 0.55rem 0.65rem;
  text-align: left;
  vertical-align: top;
  word-break: break-word;
}

.prose tr:last-child td,
.prose tr:last-child th {
  border-bottom: none;
}

.prose th {
  background: var(--accent-soft);
  color: var(--ink);
  font-weight: 600;
  font-size: var(--text-xs);
  letter-spacing: 0.03em;
}

.prose ol,
.prose ul {
  padding-left: 1.35rem;
  margin: 0 0 1.15rem;
  font-size: var(--text-sm);
  line-height: 1.8;
}

.prose li {
  margin-bottom: 0.55rem;
  padding-left: 0.15rem;
}

.prose li::marker {
  color: var(--accent);
}

.prose .note {
  margin: 1.5rem 0;
  padding: 0.85rem 1rem;
  background: var(--accent-soft);
  border-left: 3px solid var(--accent);
  border-radius: 0 var(--radius) var(--radius) 0;
  color: var(--ink-soft);
  font-size: var(--text-sm);
  line-height: 1.75;
}

.prose .note + h2 {
  margin-top: 2rem;
}

/* 文内链接 */
.prose a {
  word-break: break-word;
}

/* 文末返回 */
.prose > p:last-child {
  margin-top: 2rem;
  padding-top: 1.25rem;
  border-top: 1px dashed var(--line);
  text-align: left;
}

.prose > p:last-child a {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: var(--text-sm);
  color: var(--muted);
  text-decoration: none;
  padding: 0.35rem 0;
}

.prose > p:last-child a:hover {
  color: var(--accent);
}

/* —— 页脚 —— */
.site-footer {
  border-top: 1px solid var(--line);
  padding: 1.35rem 0 2rem;
  padding-bottom: calc(2rem + env(safe-area-inset-bottom, 0px));
  color: var(--muted);
  font-size: var(--text-xs);
  line-height: 1.6;
}

.site-footer .wrap {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.site-footer-legal a {
  color: var(--muted);
  text-decoration: none;
}

.site-footer-legal a:hover {
  color: var(--accent);
}

/* —— 大屏微调 —— */
@media (min-width: 640px) {
  body {
    font-size: 1rem;
  }

  .wrap,
  .narrow {
    width: min(100% - 2.5rem, var(--wide));
  }

  .narrow {
    width: min(100% - 2.5rem, var(--max));
  }

  .brand span {
    display: inline;
    margin-left: 0.45rem;
    margin-top: 0;
  }

  .hero {
    padding: 3.5rem 0 2.75rem;
  }

  .hero p {
    font-size: var(--text-base);
  }

  .article-list a {
    padding: 1.15rem 1.25rem;
  }

  .prose {
    padding: 1.75rem 0 4rem;
  }

  .prose ol,
  .prose ul {
    font-size: var(--text-base);
  }

  .prose table {
    display: table;
    overflow-x: visible;
  }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .article-list li,
  .article-list .title { transition: none; }
}
