:root { --red: #d81920; --red-dark: #8f0f14; --ink: #0b0b0d; --glow: #7fd8ff; }
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  color: var(--ink); background: #fff; line-height: 1.8;
}
a { color: inherit; text-decoration: none; }
.wrap { max-width: 760px; margin: 0 auto; padding: 0 20px; }

header { position: sticky; top: 0; z-index: 10; background: rgba(11,11,13,.92); }
header .wrap { max-width: 1080px; display: flex; align-items: center; justify-content: space-between; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; color: #fff; font-weight: 700; letter-spacing: .05em; }
.brand img { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; }
header nav { display: flex; gap: 22px; color: #eee; font-size: .95rem; }
header nav a:hover { color: var(--glow); }

main { padding: 56px 20px 80px; }
h1 { font-size: clamp(1.8rem, 5vw, 2.4rem); line-height: 1.3; }
.list h1::after { content: ""; display: block; width: 56px; height: 4px; background: var(--red); margin-top: 10px; border-radius: 2px; }
.lead { color: #555; margin: 12px 0 32px; }
.item { display: block; padding: 22px 0; border-bottom: 1px solid #eee; }
.item:hover h2 { color: var(--red); }
.item h2 { font-size: 1.3rem; margin: 2px 0 4px; transition: color .2s; }
.item p { color: #555; }
time { color: #888; font-size: .85rem; }
.empty { color: #888; }

.back { color: var(--red); font-size: .9rem; display: inline-block; margin-bottom: 16px; }
.post h1 { margin-bottom: 6px; }
.cover { display: block; width: auto; max-width: 100%; max-height: 600px; margin: 24px auto 0; border-radius: 12px; } /* wide covers fill the column, tall ones stay a sensible size */
.content { margin-top: 28px; font-size: 1.05rem; }
.content > * + * { margin-top: 1em; }
.content h2 { font-size: 1.45rem; margin-top: 1.8em; border-left: 4px solid var(--red); padding-left: 12px; }
.content h3 { font-size: 1.2rem; margin-top: 1.5em; }
.content a { color: var(--red); text-decoration: underline; }
.content ul, .content ol { padding-left: 1.4em; }
.content img { max-width: 100%; border-radius: 8px; }
.content blockquote { border-left: 4px solid #ddd; padding-left: 16px; color: #555; }
.content code { background: #f3f3f5; padding: 2px 6px; border-radius: 4px; font-size: .9em; }
.content pre { background: #16161a; color: #eee; padding: 16px; border-radius: 8px; overflow-x: auto; }
.content pre code { background: none; padding: 0; }

footer { background: var(--ink); color: #aaa; text-align: center; padding: 28px 20px; font-size: .85rem; }
header nav a { white-space: nowrap; }
/* On phones the logo links home; keep only 文章 and the Facebook button beside it */
@media (max-width: 560px) { header nav a:not(.keep) { display: none; } .nav-right { gap: 14px; } }

.byline { color: #888; font-size: .85rem; }
.byline a { color: var(--red); }
.post-cta { margin-top: 40px; padding: 20px 22px; border-radius: 12px; background: #fdecee; border-left: 4px solid var(--red); }
.post-cta a { color: var(--red); font-weight: 700; text-decoration: underline; }
.preview-flag { background: #fff4d6; color: #7a5300; border-radius: 8px; padding: 10px 14px; font-weight: 700; margin-bottom: 16px; }

/* ---- navigation ---- */
main.wrap:has(.list), main.wrap:has(.more) { max-width: 1000px; }
.post { max-width: 720px; margin: 0 auto; }
.crumbs { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-size: .85rem; color: #888; margin-bottom: 14px; }
.crumbs a { color: #d81920; }
.crumbs .here { color: #888; max-width: 60vw; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.progress { position: fixed; top: 0; left: 0; right: 0; height: 3px; background: #d81920; transform-origin: 0 50%; transform: scaleX(0); z-index: 20; }
.prevnext { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 28px; }
.pn { display: flex; flex-direction: column; gap: 4px; padding: 16px 18px; border: 2px solid #eee; border-radius: 14px; transition: border-color .2s; }
.pn:hover { border-color: #d81920; }
.pn small { color: #888; }
.pn strong { line-height: 1.45; }
.pn.next { text-align: right; }
.more { margin-top: 56px; padding-top: 32px; border-top: 1px solid #eee; }
.more h2 { font-size: 1.4rem; margin-bottom: 18px; }
.all { text-align: center; margin: 28px 0 0; }
.btn-all { display: inline-block; padding: 12px 28px; border-radius: 999px; background: #d81920; color: #fff; font-weight: 700; }
.btn-all:hover { background: #8f0f14; }
.list .lead { margin-bottom: 24px; }
.list-cta { margin-top: 32px; }
@media (max-width: 560px) { .prevnext { grid-template-columns: 1fr; } .pn.next { text-align: left; } }
