* { box-sizing: border-box; }
body { margin: 0; font-family: system-ui, -apple-system, 'Segoe UI', sans-serif; color: #111; background: #fff; }
a { color: inherit; text-decoration: none; }
h1, h2, h3 { margin: 0; }
button, select { font-family: inherit; }

.site-header { display: flex; justify-content: space-between; align-items: center; padding: 18px 32px; border-bottom: 1px solid #eee; }
.brand { font-weight: 700; font-size: 18px; }
.nav { display: flex; gap: 22px; font-size: 14px; color: #555; }
.btn { background: #111; color: #fff; padding: 9px 16px; border-radius: 6px; font-size: 14px; border: none; cursor: pointer; }
.site-footer { padding: 20px 32px; border-top: 1px solid #eee; display: flex; justify-content: space-between; font-size: 13px; color: #777; }
.tag { font-size: 12px; font-weight: 600; color: #b5432e; text-transform: uppercase; }
.empty { padding: 60px 32px; text-align: center; color: #777; }
.empty a { color: #111; font-weight: 600; }

/* homepage */
.home-header { padding: 48px 32px 32px; text-align: center; }
.home-header .brand { font-size: 24px; }
.meta { font-size: 12px; color: #888; }
.section-title { font-size: 13px; text-transform: uppercase; color: #888; margin-bottom: 20px; }
.articles { width: 50%; min-width: 320px; margin: 0 auto; padding: 0 24px 40px; }
.card { padding: 28px 0; border-bottom: 1px solid #eee; }
.card:last-child { border-bottom: none; }
.card h2 { font-size: 22px; margin: 0 0 8px; }
.card h2 a:hover { text-decoration: underline; }
.card p { font-size: 15px; color: #555; margin: 0 0 8px; line-height: 1.6; }

/* article page */
.article { max-width: 640px; margin: 0 auto; padding: 40px 24px 0; }
.back { font-size: 13px; color: #777; }
.article h1 { font-size: 30px; margin: 14px 0 10px; }
.lede { color: #555; font-size: 16px; line-height: 1.6; margin: 0 0 16px; }
.byline { padding: 12px 0; border-top: 1px solid #eee; border-bottom: 1px solid #eee; margin-bottom: 24px; font-size: 13px; color: #888; }
.article-body { font-size: 16px; line-height: 1.7; }
.article-body p { margin: 0 0 18px; }
.article-body h3 { font-size: 19px; margin: 24px 0 10px; }
.article-body blockquote { border-left: 3px solid #111; padding-left: 16px; font-style: italic; margin: 24px 0; font-size: 17px; }
.related { max-width: 640px; margin: 0 auto; padding: 24px 24px 48px; border-top: 1px solid #eee; }
.related a { display: block; padding: 9px 0; font-size: 15px; }
.related a:hover { text-decoration: underline; }

/* editor */
.editor-bar { display: flex; justify-content: space-between; align-items: center; padding: 16px 32px; border-bottom: 1px solid #eee; flex-wrap: wrap; gap: 12px; }
.editor-bar-left { display: flex; align-items: center; gap: 14px; }
select { padding: 7px 10px; border: 1px solid #ddd; border-radius: 6px; font-size: 14px; background: #fff; }
.editor { max-width: 640px; margin: 0 auto; padding: 32px 24px 0; }
[contenteditable] { outline: none; }
[contenteditable]:empty:before { content: attr(data-placeholder); color: #999; }
#ed-title { font-size: 28px; font-weight: 700; margin-bottom: 10px; }
#ed-teaser { color: #555; font-size: 15px; margin-bottom: 20px; }
.toolbar { display: flex; gap: 6px; flex-wrap: wrap; padding: 10px 0; border-top: 1px solid #eee; border-bottom: 1px solid #eee; margin-bottom: 20px; }
.toolbar button { border: 1px solid #ddd; background: #fff; padding: 6px 12px; border-radius: 6px; font-size: 13px; cursor: pointer; }
.toolbar button:hover { background: #f5f5f5; }
#ed-body { font-size: 16px; line-height: 1.7; min-height: 240px; }
#ed-body p { margin: 0 0 16px; }
#ed-body h3 { font-size: 19px; margin: 20px 0 8px; }
#ed-body blockquote { border-left: 3px solid #111; padding-left: 14px; font-style: italic; margin: 18px 0; }
.foot { max-width: 640px; margin: 0 auto; padding: 14px 24px 44px; display: flex; justify-content: space-between; font-size: 13px; color: #888; }
#readtime { font-weight: 600; color: #111; }

@media (max-width: 680px) {
    .nav { display: none; }
}
