/* 展葉植物筆記 (/blog) — static pages built by scripts/blog.mjs. Same colours as the app (src/index.css). */
:root { --bg: #0D1208; --surface: #151D0E; --card: #18220E; --line: #2E3E1E; --ink: #F2F5EC; --ink2: #C9D1BF; --muted: #8A9580;
  --fill: #8FCC00; --on-fill: #0D1208; --lime: #A8E01A; --dev: #8197B0; --plant: #E8C26A; --cta: rgba(143, 204, 0, .07); }
html[data-theme='light'] { --bg: #F1F4EA; --surface: #E6F0D2; --card: #E6F0D2; --line: #D4DEC5; --ink: #192014; --ink2: #3D4735; --muted: #7E8874;
  --fill: #80C429; --on-fill: #22330F; --lime: #427118; --dev: #47607D; --plant: #8A6514; --cta: #E6F0D2; }
* { box-sizing: border-box; margin: 0; }
body { background: var(--bg); color: var(--ink); font: 16px/1.75 'Noto Sans TC', system-ui, -apple-system, 'PingFang TC', sans-serif; -webkit-text-size-adjust: 100%; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; }
.wrap { max-width: 1040px; margin: 0 auto; padding: 0 20px; }

.top { display: flex; align-items: center; justify-content: space-between; padding: 18px 0; }
.brand { display: flex; align-items: center; gap: 10px; }
.brand img { height: 26px; width: auto; display: block; }
.brand .logo-light, html[data-theme='light'] .brand .logo-dark { display: none; }
html[data-theme='light'] .brand .logo-light { display: block; }
.brand span { color: var(--muted); font-size: 14px; padding-left: 10px; border-left: 1px solid var(--line); line-height: 18px; }
.get { border: 1px solid var(--fill); color: var(--lime); border-radius: 999px; padding: 5px 14px; font-size: 14px; font-weight: 500; white-space: nowrap; }

.hero { padding: 28px 0 18px; }
.eyebrow { font-size: 12px; letter-spacing: 3px; color: var(--lime); font-weight: 700; }
h1 { font-family: 'Noto Serif TC', serif; font-size: 32px; line-height: 1.3; margin: 8px 0; font-weight: 700; overflow-wrap: anywhere; }
.lead { color: var(--ink2); font-size: 15px; }
.chips { display: flex; gap: 8px; margin: 22px 0 8px; overflow-x: auto; }
.chip { border: 1px solid var(--line); background: none; border-radius: 999px; padding: 4px 14px; font: inherit; font-size: 14px; color: var(--ink2); white-space: nowrap; cursor: pointer; }
.chip.on { background: var(--fill); border-color: var(--fill); color: var(--on-fill); font-weight: 700; }

.feat { display: grid; background: var(--card); border-radius: 20px; overflow: hidden; margin: 18px 0 26px; }
.fimg { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; display: block; }
.feat .t { padding: 18px 20px 22px; }
.tag { display: inline-block; font-size: 12px; font-weight: 700; color: var(--lime); border: 1px solid var(--lime); border-radius: 999px; padding: 0 10px; line-height: 20px; }
.tag.dev { color: var(--dev); border-color: var(--dev); }
.tags { display: inline-flex; flex-wrap: wrap; gap: 6px; }
.tag.plant { color: var(--plant); border-color: var(--plant); }
.postTags { margin-top: 14px; }
.feat h2 { font-family: 'Noto Serif TC', serif; font-size: 22px; line-height: 1.4; margin: 10px 0 6px; overflow-wrap: anywhere; }
.ex { color: var(--ink2); font-size: 14px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.meta { color: var(--muted); font-size: 13px; margin-top: 8px; }

.list { display: grid; gap: 18px; }
.card { display: grid; grid-template-columns: 104px 1fr; gap: 14px; align-items: start; padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.cimg { width: 104px; aspect-ratio: 1; object-fit: cover; border-radius: 14px; display: block; }
.noimg { display: flex !important; align-items: center; justify-content: center; background: radial-gradient(circle, rgba(143, 204, 0, .18), transparent 70%), var(--surface); }
.noimg img { width: 55%; max-width: 140px; }
.card h3 { font-size: 16px; line-height: 1.45; margin: 6px 0 2px; font-weight: 700; overflow-wrap: anywhere; }
.none { color: var(--muted); padding: 12px 0; }
[hidden] { display: none !important; }

.empty { text-align: center; padding: 40px 20px; border: 1px dashed var(--line); border-radius: 20px; margin: 18px 0; }
.empty b { display: block; font-size: 18px; margin: 10px 0 4px; }
.empty p { color: var(--ink2); font-size: 14px; }

.cta { margin: 34px 0; border: 1px solid var(--fill); border-radius: 20px; padding: 22px; background: var(--cta); display: flex; gap: 16px; align-items: center; }
.cta > img { width: 56px; height: auto; flex: none; }
/* The leaf of the logo, gradient on the dark theme, dark green on the light one (like the header wordmark). */
.cta > .cta-light, html[data-theme='light'] .cta > .cta-dark { display: none; }
html[data-theme='light'] .cta > .cta-light { display: block; }
.cta b { display: block; font-size: 17px; }
.cta p { color: var(--ink2); font-size: 14px; }
.btn { display: inline-block; margin-top: 10px; background: var(--fill); color: var(--on-fill); font-weight: 700; border-radius: 12px; padding: 8px 18px; font-size: 15px; }

.crumb { color: var(--muted); font-size: 13px; margin-top: 8px; }
.crumb a { color: var(--lime); }
.post h1 { font-size: 28px; margin-top: 12px; }
.post .meta { margin-bottom: 18px; }
.cover { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 18px; display: block; margin-bottom: 20px; }
.toc { background: var(--surface); border-radius: 14px; padding: 12px 16px; font-size: 14px; color: var(--ink2); margin: 6px 0 18px; }
.toc b { color: var(--ink); display: block; margin-bottom: 4px; }
.toc ul { list-style: none; padding: 0; }
.toc li { margin: 2px 0; }
.toc a:hover { color: var(--lime); }
.body { max-width: 680px; }
.body h2 { font-family: 'Noto Serif TC', serif; font-size: 21px; line-height: 1.45; margin: 28px 0 8px; scroll-margin-top: 16px; }
.body h3 { font-size: 17px; margin: 20px 0 6px; }
.body p, .body li { color: var(--ink2); }
.body p { margin: 10px 0; }
.body ul, .body ol { padding-left: 22px; margin: 10px 0; }
.body li { margin: 6px 0; }
.body a { color: var(--lime); text-decoration: underline; text-underline-offset: 3px; }
.body img { border-radius: 14px; display: block; margin: 16px 0; }
.body blockquote { border-left: 3px solid var(--fill); background: var(--surface); border-radius: 0 12px 12px 0; padding: 4px 16px; margin: 18px 0; font-size: 15px; }
.body blockquote strong { color: var(--lime); }
.body table { border-collapse: collapse; width: 100%; font-size: 14px; margin: 14px 0; display: block; overflow-x: auto; }
.body th, .body td { border: 1px solid var(--line); padding: 6px 10px; text-align: left; }
.body code { background: var(--surface); border-radius: 6px; padding: 0 5px; font-size: .9em; }
.more h2 { font-size: 18px; margin-bottom: 14px; }

.foot { color: var(--muted); font-size: 12px; text-align: center; padding: 24px 0 40px; border-top: 1px solid var(--line); margin-top: 12px; }
.foot a:hover { color: var(--ink); }

@media (min-width: 820px) {
  h1 { font-size: 42px; }
  .post h1 { font-size: 36px; }
  .feat { grid-template-columns: 1.2fr 1fr; align-items: center; }
  .fimg { aspect-ratio: auto; height: 400px; }
  .feat .t { padding: 32px; }
  .feat h2 { font-size: 28px; }
  .list { grid-template-columns: repeat(3, 1fr); gap: 24px; }
  .card { grid-template-columns: 1fr; border: 0; padding: 0; }
  .cimg { width: 100%; aspect-ratio: 4 / 3; }
  .card h3 { font-size: 17px; }
  .post { max-width: 760px; margin: 0 auto; }
  .post ~ .cta, .post ~ .more { max-width: 760px; margin-left: auto; margin-right: auto; }
}
