:root {
  --bg: #fff8f1;
  --surface: #ffffff;
  --surface-subtle: #fef3e2;
  --surface-soft: #fffaf5;
  --surface-code: #f8f9fa;
  --bg-deep: #f8ead8;
  --text: #202124;
  --text-muted: #5f6368;
  --line: #eadfd4;
  --line-strong: #d4b99f;
  --primary: #b06000;
  --primary-strong: #8c4300;
  --on-primary: #ffffff;
  --published-bg: #e6f4ea;
  --published-text: #137333;
  --draft-bg: #fef7e0;
  --draft-text: #b06000;
  --chip-bg: #fef7e0;
  --chip-text: #8c4300;
  --hero-glow: rgba(176, 96, 0, 0.12);
  --glass-surface: rgba(255, 255, 255, 0.92);
  --glass-line: rgba(234, 223, 212, 0.9);
  --shadow-soft: 0 10px 24px rgba(176, 96, 0, 0.08);
  --shadow: 0 12px 40px rgba(176, 96, 0, 0.1);
  --focus-ring: rgba(176, 96, 0, 0.16);
  --radius-xl: 24px;
  --radius-lg: 18px;
  --radius-md: 14px;
}

* {
  box-sizing: border-box;
}

html {
  color-scheme: light;
}

body {
  margin: 0;
  font-family: "Google Sans", "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  background:
    radial-gradient(circle at top left, var(--hero-glow), transparent 30%),
    linear-gradient(180deg, var(--surface-soft) 0%, var(--bg) 30%, var(--bg-deep) 100%);
  color: var(--text);
}

a {
  color: inherit;
}

.archive-site-nav,
.archive-site-footer {
  width: min(1120px, calc(100vw - 32px));
  margin: 0 auto;
}

.archive-site-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  padding: 20px 0 0;
}

.archive-site-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-weight: 700;
  text-decoration: none;
}

.archive-site-mark {
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: var(--primary);
  color: var(--on-primary);
}

.archive-site-badge {
  padding: 4px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--chip-bg);
  color: var(--chip-text);
  font-size: 12px;
  font-weight: 700;
}

.archive-site-menu {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  color: var(--text-muted);
  font-size: 14px;
}

.archive-site-menu a {
  padding: 8px 10px;
  border-radius: 8px;
  text-decoration: none;
}

.archive-site-menu a:hover {
  background: var(--surface);
  color: var(--text);
}

.archive-site-footer {
  display: grid;
  grid-template-columns: minmax(220px, 0.9fr) minmax(0, 1.7fr);
  gap: 28px;
  padding: 34px 0 48px;
  border-top: 1px solid var(--line);
  color: var(--text-muted);
  font-size: 14px;
}

.archive-site-footer-brand {
  display: grid;
  gap: 10px;
  align-content: start;
}

.archive-site-footer-brand strong {
  color: var(--text);
  font-size: 16px;
}

.archive-site-footer-brand p {
  margin: 0;
  line-height: 1.7;
}

.archive-site-footer-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.archive-site-footer-column {
  display: grid;
  gap: 8px;
  align-content: start;
}

.archive-site-footer-column h2 {
  margin: 0 0 4px;
  color: var(--text);
  font-size: 14px;
}

.archive-site-footer-column a {
  color: var(--text-muted);
  text-decoration: none;
}

.archive-site-footer-column a:hover {
  color: var(--primary);
}

.page-shell {
  width: min(1120px, calc(100vw - 32px));
  margin: 0 auto;
  padding: 40px 0 72px;
}

.page-shell--article {
  width: min(880px, calc(100vw - 32px));
}

.page-shell--catalog {
  width: min(1040px, calc(100vw - 32px));
}

.hero-card,
.panel-card,
.article-card {
  background: var(--glass-surface);
  border: 1px solid var(--glass-line);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
}

.hero-card,
.panel-card {
  padding: 28px;
}

.panel-card {
  margin-top: 20px;
}

.panel-card--topics {
  margin-top: 20px;
}

.article-card {
  margin-top: 14px;
  padding: 28px;
}

.eyebrow {
  margin: 0;
  color: var(--primary);
  font-size: 14px;
  font-weight: 700;
}

.hero-title,
.article-title,
.section-title {
  margin: 12px 0 0;
  line-height: 1.15;
  font-weight: 700;
  letter-spacing: 0;
}

.hero-title {
  font-size: clamp(32px, 5vw, 54px);
}

.article-title {
  font-size: clamp(28px, 4vw, 42px);
}

.section-title {
  font-size: clamp(24px, 3vw, 32px);
}

.hero-copy,
.article-digest,
.meta-row,
.stat-label,
.timeline-empty,
.section-copy {
  color: var(--text-muted);
}

.hero-copy,
.article-digest,
.section-copy {
  margin: 16px 0 0;
  font-size: 16px;
  line-height: 1.75;
}

.section-head {
  display: flex;
  gap: 16px;
  align-items: flex-end;
  justify-content: space-between;
  flex-wrap: wrap;
}

.section-link {
  white-space: nowrap;
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-top: 24px;
}

.stat-grid--single {
  grid-template-columns: minmax(0, 260px);
}

.stat-card {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, var(--surface), var(--surface-soft));
}

.stat-label {
  margin: 0;
  font-size: 13px;
}

.stat-value {
  margin: 12px 0 0;
  font-size: clamp(30px, 3vw, 40px);
  font-weight: 700;
}

.toolbar {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  margin-top: 20px;
}

.search-input {
  flex: 1 1 320px;
  min-height: 48px;
  padding: 12px 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text);
  font-size: 15px;
  outline: none;
}

.search-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px var(--focus-ring);
}

.filter-group {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.filter-btn {
  min-height: 44px;
  padding: 10px 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text);
  font: inherit;
  cursor: pointer;
}

.filter-btn:hover,
.filter-btn:focus-visible {
  border-color: var(--primary);
  color: var(--primary);
}

.filter-btn.is-active {
  border-color: var(--primary);
  background: var(--primary);
  color: var(--on-primary);
}

.topic-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
  margin-top: 20px;
}

.topic-card {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  min-height: 132px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, var(--surface), var(--surface-soft));
  text-decoration: none;
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.topic-card:hover {
  transform: translateY(-1px);
  border-color: var(--line-strong);
  box-shadow: var(--shadow-soft);
}

.topic-card-label {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
}

.topic-card-copy {
  margin: 10px 0 0;
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1.6;
}

.topic-card-count {
  margin: 0;
  font-size: 34px;
  font-weight: 700;
  color: var(--primary);
}

.timeline-list {
  display: grid;
  gap: 14px;
  margin-top: 22px;
}

.timeline-card {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, var(--surface), var(--surface-soft));
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.timeline-card:hover {
  transform: translateY(-1px);
  border-color: var(--line-strong);
  box-shadow: var(--shadow-soft);
}

.meta-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
  font-size: 13px;
}

.meta-row--source {
  margin-top: 16px;
}

.status-chip,
.topic-chip {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 12px;
  border-radius: 999px;
  font-weight: 700;
  text-decoration: none;
}

.status-chip--published {
  background: var(--published-bg);
  color: var(--published-text);
}

.status-chip--draft {
  background: var(--draft-bg);
  color: var(--draft-text);
}

.topic-chip {
  background: var(--chip-bg);
  color: var(--chip-text);
}

.topic-chip:hover {
  text-decoration: underline;
}

.topic-chip-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 14px;
}

.timeline-title {
  margin: 14px 0 0;
  font-size: 24px;
  line-height: 1.3;
}

.timeline-digest {
  margin: 10px 0 0;
  color: var(--text-muted);
  line-height: 1.7;
}

.link-row,
.nav-links {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.link-row {
  margin-top: 16px;
}

.nav-links {
  margin-top: 4px;
}

.link,
.data-link {
  color: var(--primary);
  text-decoration: none;
  font-weight: 600;
}

.link:hover,
.data-link:hover {
  color: var(--primary-strong);
  text-decoration: underline;
}

.link--back {
  display: inline-block;
}

.timeline-empty {
  padding: 28px;
  border: 1px dashed var(--line);
  border-radius: var(--radius-lg);
  text-align: center;
}

.wechat-content {
  margin-top: 28px;
  line-height: 1.8;
  font-size: 16px;
  overflow-wrap: anywhere;
}

.wechat-content img,
.wechat-content video,
.wechat-content iframe {
  max-width: 100%;
  height: auto;
}

.wechat-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 18px 0;
}

.wechat-content table td,
.wechat-content table th {
  border: 1px solid var(--line);
  padding: 8px 10px;
}

.wechat-content pre,
.wechat-content code {
  font-family: "SFMono-Regular", "Menlo", "Consolas", monospace;
}

.wechat-content pre {
  overflow-x: auto;
  padding: 14px;
  border-radius: var(--radius-md);
  background: var(--surface-code);
}

@media (max-width: 720px) {
  .page-shell,
  .page-shell--article,
  .page-shell--catalog {
    width: min(100vw - 20px, 1120px);
    padding: 20px 0 48px;
  }

  .hero-card,
  .panel-card,
  .article-card {
    padding: 20px;
    border-radius: 20px;
  }

  .stat-grid,
  .stat-grid--single {
    grid-template-columns: 1fr;
  }

  .timeline-title {
    font-size: 20px;
  }

  .topic-card {
    min-height: auto;
  }

  .archive-site-footer,
  .archive-site-footer-grid {
    grid-template-columns: 1fr;
  }
}
