@import url('https://fonts.googleapis.com/css2?family=Archivo:wght@300;400;500;600;700&family=Space+Grotesk:wght@300;400;500;600;700&display=swap');

/* ===== 变量 ===== */
:root {
  --ice: #c8e0f4;
  --pink: #f5e0e8;
  --ink: #171f26;
  --ice-dark: #a8c8e8;
  --pink-dark: #e8c8d8;
  --ink-light: #2e3d4e;
  --ink-lighter: #4a5a6a;
  --bg: #d4e8f4;
  --bg-alt: #f0e4ec;
  --white: #ffffff;
  --radius: 14px;
  --radius-sm: 8px;
  --shadow-out: -5px -5px 15px rgba(255,255,255,0.75), 5px 5px 15px rgba(0,0,0,0.12);
  --shadow-out-sm: -3px -3px 8px rgba(255,255,255,0.7), 3px 3px 8px rgba(0,0,0,0.1);
  --shadow-in: inset -3px -3px 8px rgba(255,255,255,0.7), inset 3px 3px 8px rgba(0,0,0,0.12);
  --shadow-pink-out: -4px -4px 12px rgba(255,255,255,0.8), 4px 4px 12px rgba(232,180,200,0.4);
  --font-main: 'Archivo', 'Space Grotesk', system-ui, -apple-system, sans-serif;
  --transition: 150ms ease;
}

/* ===== Reset ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }
body {
  font-family: var(--font-main);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--ink-light); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--ink); }
img { max-width: 100%; height: auto; display: block; border-radius: var(--radius-sm); }
ol, ul { list-style: none; }

/* ===== 页面骨架 ===== */
.page-wrap { display: flex; flex-direction: column; min-height: 100vh; }

/* ===== 公告条 ===== */
.announce-bar {
  background: linear-gradient(135deg, var(--pink) 0%, var(--ice) 100%);
  color: var(--ink-light);
  text-align: center;
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  padding: 6px 16px;
}

/* ===== 头部 ===== */
.site-header {
  background: var(--bg);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 12px rgba(0,0,0,0.08);
}
.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 10px 20px;
  display: flex;
  align-items: center;
  gap: 16px;
}

/* ===== 品牌图标 ===== */
.brand-icon {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--bg);
  box-shadow: var(--shadow-out-sm);
  transition: box-shadow var(--transition);
}
.brand-icon:hover { box-shadow: var(--shadow-in); }
.brand-glyph {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--ink-light);
  line-height: 1;
}

/* ===== 导航 ===== */
.site-nav { flex: 1; overflow-x: auto; }
.site-nav ol {
  display: flex;
  gap: 4px;
  align-items: center;
  flex-wrap: wrap;
}
.site-nav ol li a {
  display: block;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--ink-lighter);
  white-space: nowrap;
  min-height: 40px;
  line-height: 1.3;
  display: flex;
  align-items: center;
  background: var(--bg);
  box-shadow: var(--shadow-out-sm);
  transition: box-shadow var(--transition), color var(--transition);
}
.site-nav ol li a:hover,
.site-nav ol li a[aria-current="page"] {
  box-shadow: var(--shadow-in);
  color: var(--ink);
}

/* ===== 粘性锚点条 ===== */
.sticky-anchor {
  position: sticky;
  top: 62px;
  z-index: 90;
  background: linear-gradient(135deg, var(--ice) 0%, var(--bg) 100%);
  padding: 8px 20px;
  font-size: 0.82rem;
  color: var(--ink-lighter);
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}
.anchor-label { font-weight: 400; }
.anchor-title { font-weight: 600; color: var(--ink); }

/* ===== Hero 首页 ===== */
.hero-section {
  min-height: 45vh;
  background: linear-gradient(145deg, var(--bg) 30%, var(--bg-alt) 100%);
  display: flex;
  align-items: center;
  padding: 48px 20px 36px;
}
.hero-inner {
  max-width: 1200px;
  margin: 0 auto;
  text-align: right;
  width: 100%;
  position: relative;
}
.hero-badge {
  display: inline-block;
  background: linear-gradient(135deg, var(--pink) 0%, var(--pink-dark) 100%);
  color: var(--ink);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  padding: 4px 14px;
  border-radius: 20px;
  box-shadow: var(--shadow-pink-out);
  margin-bottom: 16px;
}
.hero-h1 {
  font-size: clamp(1.6rem, 4vw, 2.8rem);
  font-weight: 700;
  line-height: 1.25;
  color: var(--ink);
  margin-bottom: 14px;
}
.hero-sub {
  font-size: 1rem;
  color: var(--ink-lighter);
  max-width: 500px;
  margin-left: auto;
  margin-bottom: 20px;
}
.hero-deco {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}
.deco-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--bg);
  box-shadow: var(--shadow-out-sm);
}
.deco-dot:nth-child(2) { background: linear-gradient(135deg, var(--ice), var(--ice-dark)); }
.deco-dot:nth-child(3) { background: linear-gradient(135deg, var(--pink), var(--pink-dark)); }

/* ===== Channel Hero ===== */
.channel-hero {
  background: linear-gradient(145deg, var(--ice) 0%, var(--bg) 100%);
  padding: 40px 20px 28px;
}
.channel-hero h1 {
  max-width: 1200px;
  margin: 0 auto 10px;
  font-size: clamp(1.4rem, 3vw, 2rem);
  font-weight: 700;
}
.channel-hero .subtitle {
  max-width: 1200px;
  margin: 0 auto 12px;
}
.channel-hero .pub-date {
  max-width: 1200px;
  margin: 0 auto;
  display: block;
}

/* ===== 内容区布局（侧边栏在左） ===== */
.content-section {
  max-width: 1200px;
  margin: 0 auto;
  padding: 32px 20px;
  display: flex;
  gap: 28px;
  align-items: flex-start;
}
.sidebar {
  flex: 0 0 220px;
  order: -1;
}
.sidebar-inner {
  background: var(--bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow-out);
  padding: 20px 16px;
  position: sticky;
  top: 90px;
}
.sidebar-inner h2 {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 4px;
  letter-spacing: 0.02em;
}
.sidebar-inner .subtitle {
  font-size: 0.75rem;
  color: var(--ink-lighter);
  margin-bottom: 12px;
}
.sidebar-divider {
  height: 1px;
  background: linear-gradient(to right, transparent, var(--ice-dark), transparent);
  margin: 16px 0;
}
.sidebar-nav { display: flex; flex-direction: column; gap: 6px; }
.sidebar-nav li a {
  display: block;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  font-size: 0.83rem;
  color: var(--ink-lighter);
  background: var(--bg);
  box-shadow: var(--shadow-out-sm);
  transition: box-shadow var(--transition), color var(--transition);
  min-height: 40px;
  line-height: 1.3;
  display: flex;
  align-items: center;
}
.sidebar-nav li a:hover {
  box-shadow: var(--shadow-in);
  color: var(--ink);
}
.main-content { flex: 1; min-width: 0; }

/* ===== 正文 ===== */
.prose {
  background: var(--bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow-out);
  padding: 28px 24px;
  font-size: 1rem;
  line-height: 1.75;
  color: var(--ink);
}
.prose h2 { font-size: 1.25rem; font-weight: 700; margin: 24px 0 8px; color: var(--ink); }
.prose h3 { font-size: 1.05rem; font-weight: 600; margin: 18px 0 6px; }
.prose p { margin-bottom: 1em; }
.prose a { color: var(--ink-light); text-decoration: underline; }
.prose ul, .prose ol { margin: 0.8em 0 0.8em 1.4em; }
.prose li { margin-bottom: 0.3em; }
.prose blockquote {
  border-left: 3px solid var(--ice-dark);
  padding: 10px 16px;
  color: var(--ink-lighter);
  background: linear-gradient(135deg, var(--ice) 0%, var(--bg) 100%);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  margin: 1em 0;
}

/* ===== 副标题 ===== */
.subtitle {
  font-size: 0.9rem;
  color: var(--ink-lighter);
  line-height: 1.5;
  margin-bottom: 8px;
}

/* ===== 面包屑 ===== */
.breadcrumb {
  font-size: 0.8rem;
  color: var(--ink-lighter);
  margin-bottom: 12px;
  max-width: 1200px;
  padding: 0;
}
.breadcrumb a { color: var(--ink-lighter); }
.breadcrumb a:hover { color: var(--ink); }
.breadcrumb span { margin: 0 6px; }

/* ===== Article 头部 ===== */
.article-header {
  background: linear-gradient(145deg, var(--bg-alt) 0%, var(--bg) 100%);
  padding: 36px 20px 24px;
}
.article-header h1 {
  max-width: 1200px;
  margin: 0 auto 10px;
  font-size: clamp(1.3rem, 3vw, 2rem);
  font-weight: 700;
  line-height: 1.3;
}
.article-header .subtitle {
  max-width: 1200px;
  margin: 0 auto 12px;
}
.article-meta {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}
.article-hero-img {
  max-width: 1200px;
  margin: 16px auto 0;
  width: 100%;
}
.hero-img-wrap {
  max-width: 1200px;
  margin: 0 auto;
}
.pub-date, .mod-date {
  font-size: 0.8rem;
  color: var(--ink-lighter);
  background: var(--bg);
  border-radius: var(--radius-sm);
  padding: 3px 10px;
  box-shadow: var(--shadow-out-sm);
  display: inline-block;
}
.update-note {
  margin-top: 20px;
  font-size: 0.82rem;
  color: var(--ink-lighter);
  padding: 8px 12px;
  background: linear-gradient(135deg, var(--ice), var(--bg));
  border-radius: var(--radius-sm);
}

/* ===== 卡片（首页featured） ===== */
.home-cards, .channel-list {
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px 20px;
}
.home-cards h2, .channel-list h2 {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 4px;
}
.home-cards .subtitle, .channel-list .subtitle {
  margin-bottom: 20px;
}
/* div > section 直接子元素结构 */
.home-cards {
  display: block;
}
.home-cards .card {
  display: inline-block;
  width: calc(25% - 12px);
  margin: 6px;
  vertical-align: top;
}
@media (max-width: 960px) {
  .home-cards .card { width: calc(50% - 12px); }
}
@media (max-width: 600px) {
  .home-cards .card { width: 100%; margin: 6px 0; }
}
.card-inner {
  background: var(--bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow-out);
  padding: 18px 16px;
  height: 100%;
  transition: box-shadow var(--transition);
}
.card-inner:hover { box-shadow: var(--shadow-in); }
.card-eyebrow {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--ink-lighter);
  background: linear-gradient(135deg, var(--pink) 0%, var(--ice) 100%);
  padding: 2px 8px;
  border-radius: 10px;
  margin-bottom: 8px;
}
.card-inner h3 { font-size: 0.95rem; font-weight: 600; margin-bottom: 6px; line-height: 1.35; }
.card-inner h3 a { color: var(--ink); }
.card-inner h3 a:hover { color: var(--ink-light); }
.card-desc { font-size: 0.83rem; color: var(--ink-lighter); line-height: 1.5; margin-bottom: 8px; }
.card-date { font-size: 0.75rem; color: var(--ink-lighter); }

/* ===== 频道卡片 ===== */
.channel-list { display: block; }
.channel-card {
  display: inline-block;
  width: calc(50% - 12px);
  margin: 6px;
  vertical-align: top;
}
@media (max-width: 600px) {
  .channel-card { width: 100%; margin: 6px 0; }
}
.channel-card h3 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 4px;
  background: var(--bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow-out);
  padding: 14px 16px 6px;
}
.channel-card h3 a { color: var(--ink); }
.channel-card p {
  font-size: 0.83rem;
  color: var(--ink-lighter);
  background: var(--bg);
  border-radius: 0 0 var(--radius) var(--radius);
  box-shadow: var(--shadow-out);
  padding: 0 16px 14px;
  margin-top: -2px;
}

/* ===== 子页列表 div > section 直接子 ===== */
.sub-list {
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px 20px;
}
.sub-list h2 { font-size: 1.15rem; font-weight: 700; margin-bottom: 4px; }
.sub-list .subtitle { margin-bottom: 18px; }
.sub-card {
  background: var(--bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow-out);
  margin-bottom: 12px;
  transition: box-shadow var(--transition);
}
.sub-card:hover { box-shadow: var(--shadow-in); }
.sub-card-inner { padding: 16px 18px; }
.sub-card h3 { font-size: 1rem; font-weight: 600; margin-bottom: 5px; }
.sub-card h3 a { color: var(--ink); }
.sub-card h3 a:hover { color: var(--ink-light); }
.sub-card p { font-size: 0.85rem; color: var(--ink-lighter); line-height: 1.55; margin-bottom: 6px; }
.sub-card time { font-size: 0.75rem; color: var(--ink-lighter); }

/* ===== Tag 页 ===== */
.tag-header {
  background: linear-gradient(145deg, var(--pink) 0%, var(--bg) 100%);
  padding: 36px 20px 24px;
  text-align: center;
}
.tag-chip {
  display: inline-block;
  background: var(--bg);
  border-radius: 20px;
  box-shadow: var(--shadow-out-sm);
  padding: 5px 18px;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--ink-lighter);
  margin-bottom: 12px;
}
.tag-header h1 {
  font-size: clamp(1.4rem, 3vw, 2rem);
  font-weight: 700;
  margin-bottom: 8px;
}
.tag-list { }

/* ===== About 页 ===== */
.about-header {
  background: linear-gradient(145deg, var(--ice) 0%, var(--bg) 100%);
  padding: 40px 20px 28px;
  text-align: center;
}
.about-badge {
  display: inline-block;
  background: var(--bg);
  border-radius: 20px;
  box-shadow: var(--shadow-out-sm);
  padding: 4px 16px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--ink-lighter);
  margin-bottom: 12px;
}
.about-header h1 {
  font-size: clamp(1.4rem, 3vw, 2rem);
  font-weight: 700;
  margin-bottom: 8px;
}
.about-channels {
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px 20px;
}
.about-channels h2 { font-size: 1.15rem; font-weight: 700; margin-bottom: 4px; }
.about-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 16px;
}
.about-link-card {
  flex: 1 1 140px;
  background: var(--bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow-out);
  padding: 18px 16px;
  text-align: center;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--ink);
  min-height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: box-shadow var(--transition);
}
.about-link-card:hover { box-shadow: var(--shadow-in); color: var(--ink); }

/* ===== Privacy 页 ===== */
.privacy-header {
  background: linear-gradient(145deg, var(--bg) 0%, var(--bg-alt) 100%);
  padding: 36px 20px 24px;
}
.privacy-badge {
  display: inline-block;
  background: var(--bg);
  border-radius: 20px;
  box-shadow: var(--shadow-out-sm);
  padding: 4px 16px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--ink-lighter);
  margin-bottom: 12px;
}
.privacy-header h1 {
  max-width: 1200px;
  margin: 0 auto 10px;
  font-size: clamp(1.3rem, 3vw, 2rem);
  font-weight: 700;
}
.privacy-header .subtitle {
  max-width: 1200px;
  margin: 0 auto 12px;
}

/* ===== 页脚 footer 单行结构 ===== */
.site-footer {
  margin-top: auto;
  background: linear-gradient(135deg, var(--bg) 0%, var(--bg-alt) 100%);
  border-top: 1px solid var(--ice-dark);
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}
.footer-brand {
  font-weight: 700;
  font-size: 0.88rem;
  color: var(--ink);
  flex-shrink: 0;
}
.site-footer nav ol {
  display: flex;
  flex-wrap: wrap;
  gap: 2px;
}
.site-footer nav ol li a {
  display: flex;
  align-items: center;
  padding: 8px 10px;
  font-size: 0.78rem;
  color: var(--ink-lighter);
  min-height: 40px;
  border-radius: var(--radius-sm);
  transition: color var(--transition), background var(--transition);
}
.site-footer nav ol li a:hover {
  color: var(--ink);
  background: rgba(200,224,244,0.3);
}
.footer-copy {
  font-size: 0.75rem;
  color: var(--ink-lighter);
  flex-shrink: 0;
}

/* ===== 图片 ===== */
.article-hero-img img { width: 100%; border-radius: var(--radius); box-shadow: var(--shadow-out); }

/* ===== 动效 ===== */
@media (prefers-reduced-motion: no-preference) {
  .card-inner, .sub-card, .about-link-card, .sidebar-nav li a, .site-nav ol li a {
    transition: box-shadow 150ms ease, color 150ms ease, transform 150ms ease;
  }
  .card-inner:active, .sub-card:active, .about-link-card:active {
    transform: scale(0.98);
  }
  .site-nav ol li a:active, .sidebar-nav li a:active {
    transform: scale(0.97);
  }
  /* stagger list */
  .sub-list .sub-card {
    opacity: 0;
    transform: translateY(18px);
    animation: fadeUp 0.4s ease forwards;
  }
  .sub-list .sub-card:nth-child(1) { animation-delay: 0.05s; }
  .sub-list .sub-card:nth-child(2) { animation-delay: 0.10s; }
  .sub-list .sub-card:nth-child(3) { animation-delay: 0.15s; }
  .sub-list .sub-card:nth-child(4) { animation-delay: 0.20s; }
  .sub-list .sub-card:nth-child(5) { animation-delay: 0.25s; }
  .sub-list .sub-card:nth-child(6) { animation-delay: 0.30s; }
  .home-cards .card {
    opacity: 0;
    transform: translateY(14px);
    animation: fadeUp 0.35s ease forwards;
  }
  .home-cards .card:nth-child(1) { animation-delay: 0.04s; }
  .home-cards .card:nth-child(2) { animation-delay: 0.08s; }
  .home-cards .card:nth-child(3) { animation-delay: 0.12s; }
  .home-cards .card:nth-child(4) { animation-delay: 0.16s; }
  .home-cards .card:nth-child(5) { animation-delay: 0.20s; }
  .home-cards .card:nth-child(6) { animation-delay: 0.24s; }
  .home-cards .card:nth-child(7) { animation-delay: 0.28s; }
  .home-cards .card:nth-child(8) { animation-delay: 0.32s; }
  @keyframes fadeUp {
    to { opacity: 1; transform: translateY(0); }
  }
}

/* ===== 移动端 ===== */
@media (max-width: 768px) {
  .header-inner { padding: 8px 12px; gap: 10px; }
  .site-nav ol { gap: 2px; }
  .site-nav ol li a { padding: 8px 8px; font-size: 0.78rem; }
  .content-section { flex-direction: column; padding: 20px 12px; }
  .sidebar { flex: none; width: 100%; order: 1; }
  .sidebar-inner { position: static; }
  .main-content { order: 0; }
  .hero-section { min-height: 42vh; padding: 32px 12px 24px; }
  .hero-inner { text-align: left; }
  .hero-sub { margin-left: 0; }
  .hero-deco { justify-content: flex-start; }
  .home-cards, .channel-list, .sub-list, .about-channels { padding: 16px 12px; }
  .prose { padding: 18px 14px; }
  .article-header, .channel-hero, .tag-header, .about-header, .privacy-header { padding: 24px 12px 16px; }
  .site-footer { flex-direction: column; align-items: flex-start; gap: 8px; padding: 14px 12px; }
  .site-footer nav ol { gap: 0; }
}
@media (max-width: 480px) {
  .site-nav { display: none; }
}

/* ===== 无障碍 ===== */
:focus-visible {
  outline: 3px solid var(--ice-dark);
  outline-offset: 2px;
  border-radius: 4px;
}
