/* /news index + article pages (founder 2026-11-01, same structure as StylePal's blog,
   in Habidu's own brand). Generated pages only link this file: build-articles.py. */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
:root {
  color-scheme: light dark;
  --bg: #F9F8F5; --card: #FFFFFF; --text: #1E1E1E; --body: #333331; --muted: #6B6B69;
  --border: #E2DDD6; --primary: #3F6F62; --primary-fade: #E8F0EE; --btn-bg: #4A7C6F; --btn-text: #FFFFFF;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #121614; --card: #1B211E; --text: #EFECE5; --body: #D6D4CD; --muted: #A0A8A3;
    --border: #2E3733; --primary: #8CC0B1; --primary-fade: #1F2E2A; --btn-bg: #4A7C6F; --btn-text: #FFFFFF;
  }
}
body { font-family: 'Inter', sans-serif; background: var(--bg); color: var(--text); line-height: 1.6; -webkit-font-smoothing: antialiased; }
img { max-width: 100%; display: block; }
.read { width: 100%; max-width: calc(68ch + 32px); margin: 0 auto; padding: 0 16px; }
.wide { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 16px; }

/* nav + footer */
.site-nav { display: flex; align-items: center; justify-content: space-between; gap: 12px; max-width: 1120px; margin: 0 auto; padding: 16px; }
.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); }
.logo-text { font-family: 'Fraunces', serif; font-size: 22px; font-weight: 400; }
.nav-right { display: flex; align-items: center; gap: 16px; }
.nav-link { color: var(--text); font-size: 14px; font-weight: 500; text-decoration: none; }
.nav-cta { background: var(--btn-bg); color: var(--btn-text); padding: 10px 18px; border-radius: 100px; font-size: 14px; font-weight: 500; text-decoration: none; white-space: nowrap; }
.site-footer { max-width: 1120px; margin: 64px auto 0; padding: 28px 16px 36px; border-top: 1px solid var(--border); display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 8px 18px; }
.site-footer nav a { color: var(--muted); font-size: 13px; text-decoration: none; }
.site-footer nav a:hover { color: var(--text); }
.site-footer p { font-size: 13px; color: var(--muted); }

/* category chip */
.cat { display: inline-flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--primary); text-decoration: none; }
.cat::before { content: ''; width: 18px; height: 3px; border-radius: 3px; background: var(--primary); flex: none; }

/* article */
.art-head { padding-top: 32px; }
.art-head h1 { font-family: 'Fraunces', serif; font-size: clamp(32px, 7vw, 50px); font-weight: 400; line-height: 1.12; letter-spacing: -0.5px; margin: 14px 0 16px; }
.byline { display: flex; flex-wrap: wrap; gap: 4px 10px; font-size: 14px; color: var(--muted); }
.byline span:not(:last-child)::after { content: '\00B7'; margin-left: 10px; }
.art-cover { max-width: 1040px; margin: 28px auto 8px; padding: 0 16px; }
.art-cover img { width: 100%; height: auto; border-radius: 18px; border: 1px solid var(--border); background: var(--card); }
@media (min-width: 760px) { .art-cover img { border-radius: 26px; } }
.article-content { padding-top: 24px; font-size: 18px; line-height: 1.72; color: var(--body); }
.article-content > * + * { margin-top: 18px; }
.article-content .article-lead { font-size: 20px; line-height: 1.6; color: var(--text); }
.article-content h2 { font-family: 'Fraunces', serif; font-size: clamp(25px, 5.5vw, 32px); font-weight: 400; line-height: 1.22; color: var(--text); margin-top: 48px; }
.article-content h3 { font-size: 20px; font-weight: 600; line-height: 1.35; color: var(--text); margin-top: 32px; }
.article-content h2 + *, .article-content h3 + * { margin-top: 12px; }
.article-content p { overflow-wrap: break-word; }
.article-content a { color: var(--primary); text-underline-offset: 3px; }
.article-content strong { font-weight: 600; color: var(--text); }
.article-content ul { padding-left: 24px; }
.article-content li + li { margin-top: 8px; }
.article-content li::marker { color: var(--primary); }
.article-content code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 15px; background: var(--primary-fade); border-radius: 6px; padding: 2px 6px; word-break: break-all; }
.article-content pre { background: var(--primary-fade); border-radius: 12px; padding: 14px 16px; overflow-x: auto; }
.article-content pre code { background: none; padding: 0; word-break: normal; }
.table-wrap { overflow-x: auto; }
.article-content table { border-collapse: separate; border-spacing: 0; width: 100%; font-size: 15px; line-height: 1.5; background: var(--card); border: 1px solid var(--border); border-radius: 14px; overflow: hidden; }
.article-content th, .article-content td { text-align: start; vertical-align: top; padding: 11px 13px; border-bottom: 1px solid var(--border); min-width: 110px; }
.article-content tr:last-child td { border-bottom: 0; }
.article-content th { font-weight: 600; color: var(--text); background: var(--primary-fade); }

/* download cards: compact near the top, full at the end */
.stores { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.stores a { display: inline-flex; line-height: 0; }
.stores img { height: 40px; width: auto; }
.try-top { display: grid; gap: 14px; background: var(--card); border: 1px solid var(--border); border-radius: 18px; padding: 18px 16px; margin: 26px 0; }
.article-content .try-top { margin-top: 26px; }
.try-top p { font-size: 16px; line-height: 1.5; color: var(--body); }
.try-top strong { color: var(--text); font-weight: 600; }
@media (min-width: 640px) { .try-top { grid-template-columns: 1fr auto; align-items: center; padding: 18px 20px; gap: 20px; } .try-top .stores { flex-wrap: nowrap; } }
.try-bottom { background: #2C5449; border-radius: 20px; padding: 32px 20px; text-align: center; color: #F4F2EC; scroll-margin-top: 16px; }
.article-content .try-bottom { margin-top: 56px; }
.try-bottom h3, .article-content .try-bottom h3 { font-family: 'Fraunces', serif; font-size: clamp(24px, 6vw, 32px); font-weight: 400; line-height: 1.2; color: #FFFFFF; margin: 0 auto 10px; max-width: 520px; }
.try-bottom p { font-size: 16px; line-height: 1.55; color: #D7E4DF; max-width: 520px; margin: 0 auto 20px; }
.try-bottom .stores { justify-content: center; }
.try-bottom .stores img { height: 44px; }
@media (min-width: 640px) { .try-bottom { padding: 44px 40px; } }

/* cards */
.posts { display: grid; gap: 18px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .posts { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1040px) { .posts { grid-template-columns: repeat(3, 1fr); } }
.post { display: flex; flex-direction: column; background: var(--card); border: 1px solid var(--border); border-radius: 18px; overflow: hidden; color: var(--text); text-decoration: none; transition: transform .15s ease, box-shadow .15s ease; }
.post:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(0,0,0,.08); }
.post[hidden], [hidden] { display: none !important; }
.post .art { aspect-ratio: 7 / 4; background: var(--primary-fade); overflow: hidden; }
.post .art img { width: 100%; height: 100%; object-fit: cover; }
.post .body { display: flex; flex-direction: column; flex: 1; padding: 18px; }
.post .cat { font-size: 11px; margin-bottom: 8px; }
.post h2, .post h3 { font-size: 17px; font-weight: 600; line-height: 1.35; margin-bottom: 8px; }
.post p { font-size: 14px; line-height: 1.55; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.post .meta, .lead-post .meta { display: block; font-size: 12px; color: var(--muted); margin-top: 10px; }
.post .meta { margin-top: auto; padding-top: 10px; }
.related { margin-top: 64px; }
.related > h2, .feed-title { font-family: 'Fraunces', serif; font-size: clamp(24px, 5.5vw, 32px); font-weight: 400; margin-bottom: 22px; }

/* index */
.feed-hero { padding-top: 32px; }
.eyebrow { font-size: 12px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--primary); }
.feed-hero h1 { font-family: 'Fraunces', serif; font-size: clamp(36px, 8vw, 60px); font-weight: 400; line-height: 1.08; letter-spacing: -0.5px; margin: 12px 0; }
.feed-hero .lead { font-size: 18px; color: var(--muted); max-width: 620px; }
.lead-post { display: grid; gap: 20px; margin-top: 32px; color: var(--text); text-decoration: none; }
.lead-post .art { aspect-ratio: 7 / 4; border-radius: 22px; overflow: hidden; border: 1px solid var(--border); background: var(--primary-fade); }
.lead-post .art img { width: 100%; height: 100%; object-fit: cover; }
.lead-post h2 { font-family: 'Fraunces', serif; font-size: clamp(26px, 5.5vw, 38px); font-weight: 400; line-height: 1.16; margin: 10px 0; }
.lead-post p { font-size: 17px; color: var(--muted); }
.lead-post:hover h2 { color: var(--primary); }
@media (min-width: 900px) { .lead-post { grid-template-columns: 1.35fr 1fr; align-items: center; gap: 44px; } }
.feed { margin-top: 56px; }
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 22px; }
.filters button { font: inherit; font-size: 14px; font-weight: 500; min-height: 40px; padding: 8px 16px; border-radius: 100px; border: 1px solid var(--border); background: var(--card); color: var(--text); cursor: pointer; }
.filters button[aria-pressed="true"] { background: var(--btn-bg); border-color: var(--btn-bg); color: var(--btn-text); }
.index-top { margin-top: 28px; }
.index-end { margin-top: 64px; }
