*, ::before, ::after { margin: 0; padding: 0; box-sizing: border-box; }
:root {
  --accent: #3a6b78;
  --accent-light: #5a9bab;
  --bg: #ffffff;
  --bg-card: #f5f6f7;
  --text: #1a1a1a;
  --text-muted: #888;
  --border: #e4e6e8;
  --font-mono: 'IBM Plex Mono', 'SF Mono', 'Fira Code', monospace;
  --font-cn: 'Noto Sans SC', -apple-system, 'PingFang SC', sans-serif;
}
html { font-size: 16px; -webkit-font-smoothing: antialiased; }
body { font-family: var(--font-cn); background: var(--bg); color: var(--text); line-height: 1.8; min-height: 100vh; }

/* ── Nav ── */
.nav { position: sticky; top: 0; z-index: 100; background: rgba(255,255,255,0.9); backdrop-filter: blur(12px); border-bottom: 1px solid var(--border); }
.nav-inner { max-width: 820px; margin: 0 auto; padding: 14px 20px; display: flex; align-items: center; gap: 10px; }
.nav-logo { font-size: 1.1rem; color: var(--accent); flex-shrink: 0; }
.nav-title { font-family: var(--font-mono); font-size: 0.95rem; font-weight: 600; color: var(--text); white-space: nowrap; }
.nav-subtitle { font-size: 0.8rem; color: var(--text-muted); margin-left: auto; white-space: nowrap; }
.nav-back { background: none; border: 1px solid var(--border); border-radius: 6px; padding: 3px 10px; font-size: 0.78rem; font-family: var(--font-mono); cursor: pointer; color: var(--text-muted); flex-shrink: 0; transition: .2s; }
.nav-back:hover { border-color: var(--accent); color: var(--accent); }

/* ── Layout ── */
.container { max-width: 820px; margin: 0 auto; padding: 36px 20px 60px; }
.loading, .error { text-align: center; padding: 60px 0; font-family: var(--font-mono); color: var(--text-muted); }
.error { color: #c44; }

/* ── List View ── */
.list-header { margin-bottom: 28px; }
.list-title { font-family: var(--font-mono); font-size: 1.3rem; font-weight: 600; color: var(--text); margin-bottom: 6px; letter-spacing: -.3px; }
.list-desc { font-size: 0.82rem; color: var(--text-muted); }
.list-grid { display: flex; flex-direction: column; gap: 12px; }
.list-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: 10px; padding: 18px 20px; cursor: pointer; transition: .2s; animation: fadeIn .4s ease both; }
.list-card:nth-child(2) { animation-delay: .05s; }
.list-card:nth-child(3) { animation-delay: .1s; }
.list-card:active { transform: scale(.99); }
.list-card-top { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; font-family: var(--font-mono); font-size: 0.72rem; }
.list-index { color: var(--accent); font-weight: 600; }
.list-author { color: var(--text-muted); }
.list-date { color: var(--text-muted); margin-left: auto; }
.list-card-body { margin-bottom: 12px; }
.list-title-en { display: block; font-family: var(--font-mono); font-size: 0.9rem; font-weight: 500; line-height: 1.45; color: var(--text); margin-bottom: 5px; }
.list-title-cn { display: block; font-size: 0.82rem; font-weight: 400; line-height: 1.5; color: var(--accent); }
.list-card-footer { display: flex; align-items: center; gap: 6px; padding-top: 10px; border-top: 1px solid var(--border); font-size: 0.75rem; color: var(--text-muted); }
.list-author-name { font-weight: 500; color: var(--text); }
.list-sections { font-family: var(--font-mono); font-size: 0.68rem; }
.list-arrow { margin-left: auto; font-size: 1rem; color: var(--accent); opacity: .3; }

/* ── Detail View ── */
#detailView { display: none; animation: fadeIn .3s ease both; }
.detail-container { max-width: 820px; margin: 0 auto; padding: 0; }
.tweet-card { padding: 0; border: none; }
.tweet-header { padding: 28px 20px 0; margin-bottom: 24px; }
.tweet-meta { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; font-family: var(--font-mono); font-size: 0.75rem; }
.tweet-index { color: var(--accent); font-weight: 600; }
.tweet-author { color: var(--text-muted); }
.tweet-date { color: var(--text-muted); margin-left: auto; }
.tweet-author-info { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 0.82rem; color: var(--text-muted); padding: 10px 14px; background: var(--bg-card); border-radius: 8px; }
.tweet-author-name { font-weight: 600; color: var(--text); }
.tweet-author-bio { color: var(--text-muted); flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tweet-author-followers { font-family: var(--font-mono); font-size: 0.75rem; flex-shrink: 0; }
.tweet-title-group { padding: 0 20px; margin-bottom: 20px; }
.tweet-title-en { font-family: var(--font-mono); font-size: 1.4rem; font-weight: 600; line-height: 1.45; color: var(--text); margin-bottom: 8px; }
.tweet-title-cn { font-size: 1.15rem; font-weight: 400; line-height: 1.6; color: var(--accent); }
.tweet-original { padding: 0 20px; margin-bottom: 32px; }
.tweet-link { font-family: var(--font-mono); font-size: 0.8rem; color: var(--accent); text-decoration: none; border-bottom: 1px solid transparent; transition: border-color .2s; }
.tweet-link:hover { border-color: var(--accent); }

/* ── Sections ── */
.section { padding: 0 20px 32px; }
.section-heading { margin-bottom: 12px; padding-bottom: 8px; border-bottom: 1px solid var(--border); }
.section-title-en { display: block; font-family: var(--font-mono); font-size: 1.15rem; font-weight: 600; color: var(--text); margin-bottom: 4px; }
.section-title-cn { display: block; font-size: 1.05rem; font-weight: 400; color: var(--accent); }
.section-cn { font-size: 0.95rem; line-height: 1.8; color: #333; }
.section-cn .section-subheading {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text);
  margin: 1.4em 0 0.3em 0;
  padding-top: 0.6em;
  border-top: 1px dashed var(--border);
}
.section-cn ul, .section-cn ol { margin: 0.5em 0; padding-left: 1.6em; line-height: 1.8; }
.section-cn li { margin-bottom: 0.2em; }
.section-cn ul li { list-style-type: disc; }
.section-cn ol li { list-style-type: decimal; }

/* ── Code blocks ── */
.section-cn pre {
  background: #f0f2f4;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 14px 16px;
  margin: 0.8em 0;
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  line-height: 1.5;
  white-space: pre-wrap;
  word-break: break-word;
}
.section-cn code {
  background: #f0f2f4;
  padding: 2px 6px;
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 0.85em;
  color: var(--accent);
}
.section-cn pre code {
  background: none;
  padding: 0;
  border-radius: 0;
  font-size: inherit;
  color: inherit;
}

/* ── English area ── */
.section-en-area { margin-top: 8px; }
.en-btn { display: inline-flex; align-items: center; justify-content: center; gap: 2px; background: var(--bg-card); border: 1px solid var(--border); border-radius: 5px; padding: 3px 12px; font-family: var(--font-mono); font-size: 0.68rem; color: var(--text-muted); cursor: pointer; -webkit-tap-highlight-color: transparent; transition: .2s; letter-spacing: .3px; user-select: none; }
.en-btn:active { background: var(--border); }
.en-btn.open { border-color: var(--accent-light); color: var(--accent); }
.section-en { display: none; margin-top: 10px; padding: 14px 16px; background: var(--bg-card); border-radius: 8px; font-family: var(--font-mono); font-size: 0.76rem; line-height: 1.7; color: #444; }
.section-en.open { display: block; }

/* ── Footer ── */
.tweet-footer { margin: 0 20px; padding: 16px 0 48px; border-top: 1px solid var(--border); font-family: var(--font-mono); font-size: 0.72rem; color: var(--text-muted); display: flex; align-items: center; gap: 8px; }
.tweet-footer a { color: var(--accent); text-decoration: none; }
.footer { border-top: 1px solid var(--border); padding: 20px; }
.footer-inner { max-width: 820px; margin: 0 auto; display: flex; justify-content: space-between; font-family: var(--font-mono); font-size: 0.7rem; color: var(--text-muted); }
.footer-inner a { color: var(--accent); text-decoration: none; }

@keyframes fadeIn {
  0% { opacity: 0; transform: translateY(10px); }
  100% { opacity: 1; transform: translateY(0); }
}
