/* Notion 中文站 - 暖色杂志风 */
:root {
  --bg: #faf8f4;
  --surface: #ffffff;
  --surface2: #f3efe8;
  --border: #e5dfd4;
  --text: #2c2825;
  --muted: #6b6560;
  --accent: #c45c26;
  --accent2: #2d6a4f;
  --serif: Georgia, "Noto Serif SC", "Songti SC", serif;
  --sans: "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  --radius: 10px;
  --max: 1120px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { font-family: var(--sans); background: var(--bg); color: var(--text); line-height: 1.8; }

#progress-bar {
  position: fixed; top: 0; left: 0; height: 3px; width: 0;
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  z-index: 999; transition: width .1s;
}

a { color: var(--accent2); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; height: auto; display: block; }
.container { max-width: var(--max); margin: 0 auto; padding: 0 24px; }

.site-header {
  background: var(--surface); border-bottom: 3px solid var(--accent);
  position: sticky; top: 0; z-index: 100;
}
.header-top {
  background: var(--accent2); color: #fff; text-align: center;
  font-size: .82rem; padding: 6px; overflow: hidden;
}
.ticker { display: inline-block; animation: ticker 20s linear infinite; white-space: nowrap; }
@keyframes ticker { 0% { transform: translateX(100%); } 100% { transform: translateX(-100%); } }
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 0; gap: 16px; flex-wrap: wrap;
}
.logo { display: flex; align-items: center; gap: 12px; font-family: var(--serif); font-size: 1.4rem; font-weight: 700; color: var(--text); }
.logo-img { width: 40px; height: 40px; border-radius: 50%; border: 2px solid var(--accent); }
.main-nav { display: flex; gap: 4px; list-style: none; flex-wrap: wrap; }
.main-nav a { padding: 8px 16px; color: var(--muted); font-weight: 600; font-size: .9rem; border-bottom: 2px solid transparent; white-space: nowrap; }
.main-nav a:hover, .main-nav a.active { color: var(--accent); border-bottom-color: var(--accent); text-decoration: none; }
.theme-toggle {
  padding: 6px 12px; border: 1px solid var(--border); border-radius: 6px;
  background: var(--surface2); cursor: pointer; font-size: .85rem;
  flex-shrink: 0; white-space: nowrap;
}
.header-actions { display: flex; align-items: center; gap: 12px; margin-left: auto; }

body.dark {
  --bg: #1a1917; --surface: #242220; --surface2: #2e2c28;
  --border: #3d3a36; --text: #f0ece4; --muted: #a8a29e;
}

.breadcrumb { padding: 16px 0; font-size: .85rem; color: var(--muted); border-bottom: 1px dashed var(--border); margin-bottom: 8px; }
.breadcrumb ol { display: flex; flex-wrap: wrap; list-style: none; gap: 6px; }
.breadcrumb li + li::before { content: "→"; margin-right: 6px; }
.breadcrumb a { color: var(--muted); }

.hero-magazine {
  display: grid; grid-template-columns: 1.2fr 1fr; gap: 40px;
  padding: 56px 0; border-bottom: 1px solid var(--border);
}
.hero-magazine h1 {
  font-family: var(--serif); font-size: clamp(2rem, 4vw, 2.75rem);
  line-height: 1.25; margin-bottom: 20px; color: var(--text);
}
.hero-lead { font-size: 1.05rem; color: var(--muted); margin-bottom: 28px; }
.hero-lead strong { color: var(--text); }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }
.btn-download {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 16px 36px; background: var(--accent); color: #fff !important;
  font-weight: 700; font-size: 1.05rem; border-radius: 6px;
  text-decoration: none !important; box-shadow: 0 4px 16px rgba(196,92,38,.3);
  transition: transform .2s;
}
.btn-download:hover { transform: translateY(-2px); text-decoration: none !important; }
.btn-secondary {
  padding: 14px 28px; border: 2px solid var(--accent2); color: var(--accent2) !important;
  font-weight: 600; border-radius: 6px; text-decoration: none !important;
}
.hero-side { border-left: 4px solid var(--accent); padding-left: 24px; }
.hero-side h3 { font-family: var(--serif); font-size: 1.1rem; margin-bottom: 12px; }
.hero-side ul { list-style: none; }
.hero-side li { padding: 8px 0; border-bottom: 1px dotted var(--border); font-size: .92rem; color: var(--muted); }
.hero-side li::before { content: "📖 "; }

.section { padding: 64px 0; }
.section-head { text-align: center; margin-bottom: 40px; }
.section-head h2 { font-family: var(--serif); font-size: 1.75rem; margin-bottom: 8px; }
.section-head p { color: var(--muted); }

/* Accordion */
.accordion { max-width: 800px; margin: 0 auto; }
.acc-item { border: 1px solid var(--border); border-radius: var(--radius); margin-bottom: 10px; overflow: hidden; background: var(--surface); }
.acc-head {
  padding: 18px 22px; cursor: pointer; font-weight: 600; font-size: 1rem;
  display: flex; justify-content: space-between; align-items: center;
  transition: background .2s;
}
.acc-head:hover { background: var(--surface2); }
.acc-head.active { background: var(--surface2); color: var(--accent); }
.acc-icon { font-size: 1.2rem; transition: transform .3s; }
.acc-head.active .acc-icon { transform: rotate(45deg); }
.acc-body { max-height: 0; overflow: hidden; transition: max-height .35s ease; }
.acc-body-inner { padding: 0 22px 18px; color: var(--muted); font-size: .95rem; }

/* Carousel */
.carousel { position: relative; overflow: hidden; border-radius: var(--radius); border: 1px solid var(--border); }
.carousel-track { display: flex; transition: transform .5s ease; }
.carousel-slide { min-width: 100%; padding: 32px; background: var(--surface); }
.carousel-slide h3 { font-family: var(--serif); font-size: 1.3rem; margin-bottom: 10px; }
.carousel-dots { display: flex; justify-content: center; gap: 8px; margin-top: 16px; }
.carousel-dot { width: 10px; height: 10px; border-radius: 50%; border: none; background: var(--border); cursor: pointer; }
.carousel-dot.active { background: var(--accent); }

/* Masonry cards */
.masonry { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.masonry .wide { grid-column: span 2; }
.masonry-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  overflow: hidden; transition: box-shadow .25s;
}
.masonry-card:hover { box-shadow: 0 8px 24px rgba(0,0,0,.08); }
.masonry-card img { width: 100%; aspect-ratio: 16/10; object-fit: cover; }
.masonry-card .body { padding: 20px; }
.masonry-card h3 { font-family: var(--serif); font-size: 1.1rem; margin-bottom: 8px; }
.masonry-card p { font-size: .9rem; color: var(--muted); }

/* News list */
.news-list-item {
  display: flex; gap: 28px; padding: 24px 0;
  border-bottom: 1px solid var(--border);
}
.news-list-item img { width: 200px; border-radius: var(--radius); object-fit: cover; aspect-ratio: 4/3; flex-shrink: 0; }
.news-date { font-size: .82rem; color: var(--accent); font-weight: 600; margin-bottom: 6px; }
.news-list-item h2 { font-family: var(--serif); font-size: 1.2rem; margin-bottom: 8px; }
.news-list-item h2 a { color: var(--text); text-decoration: none; }
.news-list-item h2 a:hover { color: var(--accent); }

.download-banner {
  text-align: center; padding: 64px 32px;
  background: linear-gradient(135deg, var(--accent2) 0%, #1b4332 100%);
  color: #fff; border-radius: var(--radius);
  width: 100%;
}
.download-banner h2 { font-family: var(--serif); font-size: 1.75rem; margin-bottom: 12px; }
.download-banner p { max-width: 560px; margin-left: auto; margin-right: auto; }
.download-banner .btn-download { background: #fff; color: var(--accent2) !important; display: inline-flex; }

.section-cta { padding-bottom: 72px; }
.section-cta .download-banner { margin: 0; }

.site-footer { background: var(--text); color: rgba(255,255,255,.7); padding: 48px 0 24px; margin-top: 48px; }
body.dark .site-footer { background: #0d0d0c; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 36px; margin-bottom: 32px; }
.footer-grid a { color: rgba(255,255,255,.6); font-size: .88rem; }
.footer-friends { border-top: 1px solid rgba(255,255,255,.1); padding: 22px 0; margin-bottom: 8px; }
.footer-friends h4 { color: #fff; font-size: .9rem; margin-bottom: 12px; font-weight: 600; }
.friend-links { display: flex; flex-wrap: wrap; gap: 10px 24px; list-style: none; }
.friend-links a { color: rgba(255,255,255,.6); font-size: .88rem; }
.friend-links a:hover { color: #fff; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.1); padding-top: 20px; font-size: .84rem; }

/* Article */
.article-header { max-width: 760px; margin-bottom: 32px; }
.article-header h1 { font-family: var(--serif); font-size: clamp(1.75rem, 3.5vw, 2.25rem); line-height: 1.3; margin-bottom: 16px; }
.news-meta { display: flex; gap: 12px; align-items: center; font-size: .88rem; color: var(--muted); }
.news-tag { background: var(--surface2); color: var(--accent); padding: 2px 10px; border-radius: 4px; font-weight: 600; font-size: .78rem; }
.article-featured-img { margin: 32px 0; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border); }
.article-featured-img figcaption { padding: 12px 16px; font-size: .85rem; color: var(--muted); background: var(--surface2); }
.article-body { max-width: 760px; }
.article-body h2 { font-family: var(--serif); font-size: 1.35rem; margin: 36px 0 14px; color: var(--text); }
.article-body p { margin-bottom: 16px; color: var(--muted); }
.article-body ul, .article-body ol { margin: 0 0 16px 24px; color: var(--muted); }
.article-body li { margin-bottom: 8px; }
.article-body code { background: var(--surface2); padding: 2px 6px; border-radius: 4px; font-size: .88rem; word-break: break-all; }
.article-body figure { margin: 28px 0; border-radius: var(--radius); overflow: hidden; }
.article-body figcaption { font-size: .85rem; color: var(--muted); margin-top: 8px; }

/* Download */
.download-hero {
  text-align: center; padding: 72px 24px;
  background: linear-gradient(160deg, #f3efe8 0%, var(--surface) 50%, #ede8df 100%);
  border-bottom: 1px solid var(--border);
}
.download-hero .container {
  display: flex; flex-direction: column; align-items: center;
}
.download-hero h1 {
  font-family: var(--serif); font-size: clamp(1.75rem, 4vw, 2.5rem);
  margin-bottom: 16px; line-height: 1.3; max-width: 720px;
}
.download-hero .hero-lead { text-align: center; }
.download-hero .btn-download { margin-top: 4px; }

.platform-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  align-items: stretch;
}
.platform-module {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 28px; transition: border-color .2s;
  display: flex; flex-direction: column; height: 100%;
}
.platform-module:hover { border-color: var(--accent); }
.platform-module .icon { font-size: 2rem; margin-bottom: 12px; line-height: 1; }
.platform-module h3 { font-family: var(--serif); font-size: 1.15rem; margin-bottom: 10px; }
.platform-module p { font-size: .92rem; color: var(--muted); margin-bottom: 14px; flex: 1; }
.platform-module ul { list-style: none; font-size: .88rem; color: var(--muted); margin-top: auto; }
.platform-module li { padding: 6px 0; line-height: 1.5; }
.platform-module li::before { content: "✓ "; color: var(--accent2); font-weight: 700; }

/* 下载页三步配置卡片 */
.steps-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  align-items: stretch;
}
.steps-grid .masonry-card { height: 100%; display: flex; flex-direction: column; }
.steps-grid .masonry-card .body { flex: 1; display: flex; flex-direction: column; }
.steps-grid .masonry-card p { flex: 1; }

.footer-col h4 { color: #fff; font-size: .92rem; margin-bottom: 12px; }
.footer-col ul { list-style: none; }
.footer-col li { margin-bottom: 6px; }
.footer-brand p { font-size: .88rem; margin-top: 12px; line-height: 1.7; }

@media (max-width: 900px) {
  .hero-magazine, .masonry { grid-template-columns: 1fr; }
  .masonry .wide { grid-column: span 1; }
  .platform-grid, .steps-grid { grid-template-columns: 1fr; }
  .news-list-item { flex-direction: column; }
  .news-list-item img { width: 100%; }
  .footer-grid { grid-template-columns: 1fr; }
  .main-nav { flex-wrap: wrap; justify-content: center; }
  .download-hero { padding: 48px 20px; }
}

@media (min-width: 901px) and (max-width: 1100px) {
  .steps-grid { grid-template-columns: repeat(2, 1fr); }
  .steps-grid .masonry-card:last-child { grid-column: 1 / -1; }
}
