/* Shared styles for the static pages (blog). Same palette as the app
   (constants/theme.ts) and the privacy page; dark mode follows the OS. */
:root {
  --bg: #F7F9FC; --surface: #FFFFFF; --border: #E3E9F2;
  --text: #0F1B2E; --text2: #5A6B85; --muted: #667385;
  --green: #0A7D41; --green-bg: #DCF5E6; --primary: #1B3A6B; --primary-bg: #E8EDF8;
  --shadow: 0 8px 32px rgba(15, 32, 64, 0.08);
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0B1426; --surface: #132135; --border: #22344C;
    --text: #EAF2F8; --text2: #93A4BC; --muted: #657791;
    --green: #80DA56; --green-bg: #16301A; --primary: #3ECAC9; --primary-bg: #14243A;
    --shadow: 0 8px 32px rgba(0, 0, 0, 0.35);
  }
  .logo-light { display: none; }
  .logo-dark { display: block !important; }
  .hero { background: linear-gradient(135deg, #0B1426, #112038 55%, #1A2F4B) !important; }
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg); color: var(--text); min-height: 100vh; -webkit-font-smoothing: antialiased;
}
a { color: var(--green); font-weight: 600; text-decoration: none; }
a:hover { text-decoration: underline; }

/* Header: the sign-in page's soft waves behind the logo. */
.hero {
  background: #FEFEFE url("/brand-bg.webp") left 92% / 210% auto no-repeat;
  border-bottom: 1px solid var(--border);
}
.hero-inner { max-width: 880px; margin: 0 auto; padding: 18px 24px; display: flex; align-items: center; justify-content: space-between; }
.brand { display: flex; align-items: center; gap: 12px; color: var(--text); font-size: 22px; font-weight: 800; letter-spacing: -0.5px; }
.brand:hover { text-decoration: none; }
.brand img { width: 36px; height: 36px; }
.logo-dark { display: none; }
.topnav a { color: var(--text); font-size: 15px; }

main { max-width: 880px; margin: 0 auto; padding: 28px 24px 64px; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: 20px; box-shadow: var(--shadow); }

/* Blog index */
.page-title { text-align: center; margin: 12px 0 28px; }
.page-title h1 { font-size: 34px; line-height: 42px; font-weight: 800; letter-spacing: -0.6px; }
.page-title h1 em { font-style: normal; color: var(--green); }
.page-title p { margin-top: 8px; font-size: 16px; color: var(--text2); }
.post-list { list-style: none; display: grid; gap: 16px; }
.post-card a { display: block; padding: 24px 28px; color: inherit; font-weight: inherit; }
.post-card a:hover { text-decoration: none; }
.post-card:hover { border-color: var(--green); }
.post-card h2 { font-size: 20px; line-height: 28px; font-weight: 700; color: var(--text); }
.post-card p { margin-top: 6px; font-size: 15px; line-height: 1.6; color: var(--text2); }
.meta { display: block; margin-top: 10px; font-size: 13px; color: var(--muted); }

/* Article */
.crumbs { font-size: 13px; color: var(--muted); margin-bottom: 14px; }
.crumbs a { color: var(--muted); font-weight: 500; }
.article .card { padding: 36px 40px; }
.article h1 { font-size: 32px; line-height: 40px; font-weight: 800; letter-spacing: -0.6px; }
.article .meta { margin-top: 8px; margin-bottom: 8px; }
.prose h2 { font-size: 21px; line-height: 28px; font-weight: 700; margin: 30px 0 10px; }
.prose h3 { font-size: 17px; line-height: 24px; font-weight: 700; margin: 22px 0 8px; }
.prose p, .prose li { font-size: 16px; line-height: 1.75; color: var(--text2); }
.prose p { margin-top: 12px; }
.prose strong { color: var(--text); }
.prose ul, .prose ol { margin: 12px 0 0 22px; display: grid; gap: 6px; }
.prose ul { list-style: none; margin-left: 0; }
.prose ul li { position: relative; padding-left: 20px; }
.prose ul li::before { content: ""; position: absolute; left: 4px; top: 12px; width: 6px; height: 6px; border-radius: 50%; background: var(--green); }
.prose code { font-size: 14px; background: var(--primary-bg); padding: 1px 6px; border-radius: 6px; }
.callout, .prose blockquote { margin-top: 16px; background: var(--green-bg); border-radius: 14px; padding: 4px 18px 16px; }
.callout p, .prose blockquote p { color: var(--text); }

.cta { margin-top: 20px; padding: 28px 32px; text-align: center; }
.cta h2 { font-size: 20px; font-weight: 700; }
.cta p { margin-top: 8px; font-size: 15px; color: var(--text2); }
.button {
  display: inline-block; margin-top: 16px; padding: 12px 22px; border-radius: 12px;
  background: var(--green); color: #fff; font-size: 15px; font-weight: 700;
}
.button:hover { text-decoration: none; opacity: 0.92; }
@media (prefers-color-scheme: dark) { .button { color: #08240C; } }

.site-footer {
  max-width: 880px; margin: 0 auto; padding: 0 24px 48px;
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; font-size: 13px; color: var(--muted);
}
.site-footer a { color: var(--muted); font-weight: 500; }

@media (max-width: 640px) {
  .hero { background: linear-gradient(160deg, #FEFEFE 0%, #EEF5FD 55%, #D9EAFD 100%); }
  .article .card { padding: 24px 20px; border-radius: 16px; }
  .article h1 { font-size: 26px; line-height: 33px; }
  .page-title h1 { font-size: 28px; line-height: 35px; }
  .post-card a { padding: 20px; }
}
