* { box-sizing: border-box; }
:root {
  --bg: #0b0d12;
  --card: #11151c;
  --card-hover: #141923;
  --text: #e8eef6;
  --muted: #9aa7b6;
  --brand: #6c8cff;
  --brand-weak: rgba(108, 140, 255, .18);
  --border: #1c2330;
}
@media (prefers-color-scheme: light) {
  :root {
    --bg: #f7f8fb;
    --card: #ffffff;
    --card-hover: #f5f7ff;
    --text: #0c1222;
    --muted: #6b7787;
    --brand: #365cff;
    --brand-weak: rgba(54, 92, 255, .12);
    --border: #e8ecf3;
  }
}
html, body { height: 100%; }
body { margin: 0; font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif; color: var(--text); background: radial-gradient(1200px 800px at 85% -10%, var(--brand-weak), transparent), var(--bg); }
.container { max-width: 920px; margin: 0 auto; padding: 20px; }
.site-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; position: sticky; top: 0; background: linear-gradient(to bottom, rgba(0,0,0,.35), transparent), var(--bg); backdrop-filter: blur(6px); padding-bottom: 12px; z-index: 10; }
.brand { display: flex; align-items: baseline; gap: 8px; font-weight: 700; letter-spacing: .2px; }
.logo-dot { width: 12px; height: 12px; border-radius: 50%; background: var(--brand); box-shadow: 0 0 0 6px var(--brand-weak); display: inline-block; }
.brand-name { font-size: 20px; }
.brand-sub { font-size: 14px; color: var(--muted); font-weight: 600; }
.toolbar { display: flex; align-items: center; gap: 10px; }
.btn { appearance: none; border: 1px solid var(--border); background: transparent; color: var(--text); padding: 8px 12px; border-radius: 10px; cursor: pointer; transition: .2s background, .2s border-color, .2s transform; }
.btn:hover { background: var(--card-hover); border-color: var(--brand-weak); }
.btn:active { transform: translateY(1px); }
.btn.primary { background: var(--brand); color: white; border-color: transparent; }
.btn.primary:hover { filter: brightness(1.02); }
.cards { display: grid; grid-template-columns: 1fr; gap: 12px; margin-top: 14px; }
.card { background: var(--card); border: 1px solid var(--border); border-radius: 14px; padding: 14px 16px; transition: .2s background, .2s border-color; }
.card:hover { background: var(--card-hover); border-color: var(--brand-weak); }
.card-title { margin: 0 0 6px; font-size: 16px; line-height: 1.45; }
.card-title a { color: var(--text); text-decoration: none; }
.card-title a:hover { text-decoration: underline; }
.meta { display: flex; align-items: center; gap: 10px; color: var(--muted); margin: 0; }
.badge { display: inline-block; font-size: 12px; padding: 2px 8px; border-radius: 999px; background: var(--brand-weak); color: var(--brand); border: 1px solid var(--border); }
.muted { color: var(--muted); }
.pager { margin: 16px 0 8px; display: flex; align-items: center; gap: 12px; justify-content: center; }
.hidden { display: none; }
article { white-space: pre-wrap; line-height: 1.7; background: var(--card); border: 1px solid var(--border); border-radius: 14px; padding: 16px; }
/* Reader/Detail view refinements */
#detail-view.reader { max-width: 760px; margin: 0 auto; }
.detail-title { margin: 10px 0 8px; font-size: 24px; line-height: 1.35; letter-spacing: .2px; }
.detail-meta { gap: 8px; flex-wrap: wrap; }
.detail-meta .link { opacity: .9; }
/* Prose-like typography */
article.prose { white-space: normal; font-size: 16.5px; line-height: 1.85; letter-spacing: 0.1px; word-break: break-word; overflow-wrap: anywhere; hyphens: auto; box-shadow: 0 4px 20px rgba(0,0,0,.12); }
article.prose p { margin: 0 0 14px; }
article.prose ul { margin: 6px 0 14px 1.25em; padding-left: 1.25em; }
article.prose li { margin: 4px 0; }
article.prose a { color: var(--brand); text-decoration: none; }
article.prose a:hover { text-decoration: underline; }
article.prose blockquote { margin: 12px 0; padding: 8px 12px; border-left: 3px solid var(--brand); background: rgba(108,140,255,.06); border-radius: 8px; }
article.prose hr { border: 0; border-top: 1px solid var(--border); margin: 16px 0; }
.link { color: var(--brand); text-decoration: none; }
.link:hover { text-decoration: underline; }
