:root{color-scheme:light;--violet-50:#f5f3ff;--violet-100:#ede9fe;--violet-200:#ddd6fe;--violet-600:#7c3aed;--violet-700:#6d28d9;--ink:#171717}
*{box-sizing:border-box}
body{margin:0;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Helvetica,Arial,sans-serif;color:var(--ink);background:#ececec;line-height:1.6}
.wrap{max-width:1152px;margin:0 auto;padding:0 24px}
a{color:var(--violet-700);text-decoration:none}
a:hover{text-decoration:underline}

.site-header{position:sticky;top:0;z-index:20;border-bottom:1px solid #d4d4d4;background:#ececec}
.header-row{display:flex;align-items:center;justify-content:space-between;padding:16px 24px;gap:24px}
.brand{display:flex;align-items:center;gap:6px;font-weight:600;font-size:16px;color:var(--ink)}
.brand:hover{text-decoration:none}
.brand-icon{color:var(--violet-600);flex-shrink:0}
.header-nav{display:none;align-items:center;gap:24px;font-size:14px;font-weight:500;color:#525252}
.header-nav a{color:#525252;padding-bottom:4px}
.header-nav a:hover{color:var(--ink);text-decoration:none}
.header-nav a.active{color:var(--ink);border-bottom:2px solid var(--violet-600)}
.header-actions{display:flex;align-items:center;gap:12px}
.theme-toggle{display:flex;align-items:center;justify-content:center;width:36px;height:36px;border-radius:999px;border:1px solid #e5e5e5;background:#fff;font-size:14px;cursor:pointer;line-height:1}
.theme-toggle:hover{background:#fafafa}
.btn-outline{display:none;align-items:center;height:36px;border:1px solid #e5e5e5;padding:0 16px;border-radius:999px;font-size:14px;font-weight:500;color:var(--ink) !important}
.btn-outline:hover{background:#fafafa;text-decoration:none}
.btn-primary{display:inline-flex;align-items:center;height:36px;background:var(--violet-600);color:#fff !important;padding:0 16px;border-radius:999px;font-weight:500;font-size:14px}
.btn-primary:hover{background:var(--violet-700);text-decoration:none}
.auth-only{display:none}
html.is-authed .guest-only{display:none}
html.is-authed .auth-only{display:inline-flex}

.trust-bar{display:flex;flex-wrap:wrap;justify-content:center;gap:12px 32px;padding:20px 24px 40px;font-size:13px;color:#737373}

.site-footer{border-top:1px solid #e5e5e5;padding:48px 0 0;margin-top:24px}
.footer-grid{display:grid;grid-template-columns:1fr;gap:32px;padding-bottom:32px}
.footer-brand-col .footer-brand{font-weight:600;font-size:16px;color:var(--ink)}
.footer-tagline{margin:12px 0 0;max-width:32ch;font-size:14px;color:#737373}
.footer-col-title{margin:0 0 12px;font-size:11px;font-weight:600;text-transform:uppercase;letter-spacing:.04em;color:#a3a3a3}
.footer-col ul{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:8px;font-size:14px}
.footer-col a{color:#525252}
.footer-col a:hover{color:var(--violet-700);text-decoration:none}
.footer-col-cta{color:var(--violet-600) !important;font-weight:500}
.footer-bottom{display:flex;flex-wrap:wrap;justify-content:space-between;gap:8px;border-top:1px solid #f0f0f0;padding:20px 0;font-size:12px;color:#a3a3a3}
@media(min-width:640px){
  .footer-grid{grid-template-columns:1fr 1fr}
}
@media(min-width:1024px){
  .footer-grid{grid-template-columns:1.4fr 1fr 1fr 1fr}
}

@media(min-width:640px){
  .btn-outline{display:inline-flex}
}
@media(min-width:768px){
  .header-nav{display:flex}
}

/* Dark mode — mirrors the React app's Tailwind neutral/violet dark palette
   (see web/src/index.css + store/themeStore.ts) so static pages match every
   other page instead of staying stuck in light mode. */
html.dark{color-scheme:dark}
html.dark body{background:#0a0a0a;color:#f5f5f5}
html.dark a{color:#a78bfa}
html.dark .site-header{background:#0a0a0a;border-color:#262626}
html.dark .brand{color:#f5f5f5}
html.dark .brand-icon{color:#a78bfa}
html.dark .header-nav a{color:#a3a3a3}
html.dark .header-nav a:hover{color:#f5f5f5}
html.dark .header-nav a.active{color:#f5f5f5}
html.dark .theme-toggle{border-color:#404040;background:#171717;color:#d4d4d4}
html.dark .theme-toggle:hover{background:#262626}
html.dark .btn-outline{border-color:#404040;color:#f5f5f5 !important}
html.dark .btn-outline:hover{background:#262626}
html.dark .trust-bar{color:#a3a3a3}
html.dark .site-footer{border-color:#262626}
html.dark .footer-brand-col .footer-brand{color:#f5f5f5}
html.dark .footer-tagline{color:#a3a3a3}
html.dark .footer-col-title{color:#737373}
html.dark .footer-col a{color:#a3a3a3}
html.dark .footer-col a:hover{color:#a78bfa}
html.dark .footer-col-cta{color:#a78bfa !important}
html.dark .footer-bottom{border-color:#262626;color:#737373}
.hero{background:linear-gradient(180deg,var(--violet-50),#fafafa)}
.hero-grid{display:grid;grid-template-columns:1fr;gap:32px;padding:56px 24px 40px}
.eyebrow-pill{display:inline-flex;align-items:center;gap:6px;background:#fff;border:1px solid var(--violet-200);color:var(--violet-700);font-size:12px;font-weight:600;padding:6px 14px;border-radius:999px;margin:0 0 16px}
.blog-title{font-size:38px;font-weight:800;letter-spacing:-.02em;margin:0 0 12px;line-height:1.15}
.accent{color:var(--violet-600)}
.blog-subtitle{color:#525252;margin:0 0 24px;max-width:480px;font-size:16px}
.search-box{position:relative;max-width:480px}
.search-icon{position:absolute;left:16px;top:50%;transform:translateY(-50%);font-size:14px}
.search-box input{width:100%;height:48px;border-radius:12px;border:1px solid #e5e5e5;padding:0 16px 0 42px;font-size:14px;background:#fff}
.search-box input:focus{outline:2px solid var(--violet-200)}

.newsletter-card{background:#fff;border:1px solid #e5e5e5;border-radius:16px;padding:24px;box-shadow:0 1px 3px rgba(0,0,0,.04)}
.newsletter-icon{display:flex;align-items:center;justify-content:center;width:40px;height:40px;border-radius:999px;background:var(--violet-600);color:#fff;font-size:18px;margin-bottom:12px}
.newsletter-title{font-weight:600;font-size:16px;margin:0 0 4px}
.newsletter-subtitle{color:#737373;font-size:13px;margin:0 0 16px}
.newsletter-form{display:flex;flex-direction:column;gap:8px}
.newsletter-form input{height:42px;border-radius:8px;border:1px solid #e5e5e5;padding:0 12px;font-size:14px}
.newsletter-form button{height:42px;border-radius:8px;border:none;background:var(--violet-600);color:#fff;font-weight:500;font-size:14px;cursor:pointer}
.newsletter-form button:hover{background:var(--violet-700)}
.newsletter-form button:disabled{opacity:.6;cursor:default}
.newsletter-msg{display:none;color:var(--violet-700);font-size:13px;margin:4px 0 0;font-weight:500}

.blog-main{padding-top:32px;padding-bottom:16px}
.category-pills{display:flex;flex-wrap:wrap;gap:8px;margin-bottom:28px}
.category-pill{border:1px solid #e5e5e5;background:#fff;border-radius:999px;padding:8px 16px;font-size:13px;font-weight:500;color:#404040;cursor:pointer}
.category-pill:hover{border-color:#d4d4d4}
.category-pill.active{background:var(--violet-600);border-color:var(--violet-600);color:#fff}

.blog-layout{display:grid;grid-template-columns:1fr;gap:32px}
.post-list{list-style:none;margin:0;padding:0}
.post-grid{display:grid;grid-template-columns:1fr;gap:16px}
.post-card{border:1px solid #e5e5e5;border-radius:16px;overflow:hidden;transition:box-shadow .15s,border-color .15s}
.post-card:hover{border-color:#d4d4d4;box-shadow:0 4px 12px rgba(0,0,0,.05)}
.post-card a{color:inherit;display:block}
.post-card a:hover{text-decoration:none}
.post-thumb{height:120px;display:flex;align-items:center;justify-content:center;font-size:40px}
.post-card-body{padding:18px 20px}
.article-tags{display:flex;flex-wrap:wrap;align-items:center;gap:8px;margin-bottom:10px}
.cat-pill{display:inline-block;font-size:11px;font-weight:600;padding:4px 10px;border-radius:999px;margin-bottom:0}
.opo-tag{display:inline-block;font-size:11px;font-weight:500;padding:4px 10px;border-radius:999px;border:1px solid #e5e5e5;color:#525252}
.post-card h2{font-size:17px;font-weight:600;margin:0 0 6px;line-height:1.35}
.post-card p{margin:0 0 8px;color:#525252;font-size:14px}
.read-link{color:var(--violet-700);font-size:13px;font-weight:600}
.post-empty{display:none;color:#737373;font-size:14px;padding:24px 0;text-align:center}

.blog-sidebar{display:flex;flex-direction:column;gap:20px}
.sidebar-box{border:1px solid #e5e5e5;border-radius:16px;padding:18px 20px}
.section-title{font-size:14px;font-weight:600;margin:0 0 12px}
.sidebar-list{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:12px}
.sidebar-list a{display:block}
.sidebar-list a:hover{text-decoration:none}
.sidebar-item-title{margin:0 0 2px;font-size:13px;font-weight:500;color:var(--ink)}
.sidebar-item-meta{margin:0;font-size:12px;color:#a3a3a3}
.sidebar-cat-list{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:10px;font-size:13px;color:#404040}
.sidebar-cat-list li{display:flex;justify-content:space-between}
.cat-count{color:#a3a3a3}

.feature-strip{margin:40px 0;padding:24px;background:#fafafa;border-radius:16px;display:grid;grid-template-columns:1fr;gap:16px;font-size:13px}
.feature-strip strong{font-size:13px}
.feature-strip small{color:#737373}

.article{padding-top:40px;padding-bottom:64px;max-width:760px}
.eyebrow{font-size:13px;margin-bottom:16px}
.eyebrow a{color:#525252}
.article h1{font-size:30px;font-weight:700;margin:12px 0 8px;line-height:1.25}
.article-meta{color:#737373;font-size:13px;margin:0 0 32px}
.prose{font-size:16px;color:#262626}
.prose h2{font-size:22px;font-weight:600;margin:36px 0 12px}
.prose h3{font-size:18px;font-weight:600;margin:28px 0 10px}
.prose p{margin:0 0 16px}
.prose ul,.prose ol{margin:0 0 16px;padding-left:24px}
.prose li{margin:0 0 6px}
.prose strong{font-weight:600}
.prose a{text-decoration:underline}
.cta-box{margin-top:40px;padding:20px 24px;background:var(--violet-50);border-radius:12px;font-size:15px}
.related{margin-top:48px;border-top:1px solid #e5e5e5;padding-top:24px}
.post-list-compact{display:flex;flex-direction:column;gap:10px}
.post-list-compact .post-card{border:none;border-radius:0;border-bottom:1px solid #f0f0f0;padding-bottom:10px}
.post-list-compact .post-card:hover{box-shadow:none}
.post-list-compact h2{font-size:15px;margin:0 0 2px}

@media(min-width:768px){
  .hero-grid{grid-template-columns:1.6fr 1fr;align-items:start}
  .post-grid{grid-template-columns:repeat(3,1fr)}
  .blog-layout{grid-template-columns:1fr 300px}
  .feature-strip{grid-template-columns:repeat(4,1fr)}
}

/* Dark mode — blog-specific rules only; header/footer/buttons/trust-bar dark
   rules live in site-shell.mjs's BASE_CSS (see its own comment). */
html.dark .hero{background:linear-gradient(180deg,rgba(46,16,101,.35),#0a0a0a)}
html.dark .eyebrow-pill{background:#171717;border-color:#5b21b6;color:#c4b5fd}
html.dark .blog-subtitle{color:#a3a3a3}
html.dark .search-box input{background:#171717;border-color:#404040;color:#f5f5f5}
html.dark .newsletter-card{background:#171717;border-color:#262626}
html.dark .newsletter-subtitle{color:#a3a3a3}
html.dark .newsletter-form input{background:#0a0a0a;border-color:#404040;color:#f5f5f5}
html.dark .category-pill{background:#171717;border-color:#404040;color:#d4d4d4}
html.dark .category-pill:hover{border-color:#525252}
html.dark .post-card{border-color:#262626;background:#171717}
html.dark .post-card:hover{border-color:#404040}
html.dark .post-card p{color:#a3a3a3}
html.dark .post-empty{color:#a3a3a3}
html.dark .sidebar-box{border-color:#262626}
html.dark .sidebar-item-title{color:#f5f5f5}
html.dark .sidebar-item-meta{color:#737373}
html.dark .sidebar-cat-list{color:#d4d4d4}
html.dark .cat-count{color:#737373}
html.dark .feature-strip{background:#171717}
html.dark .feature-strip small{color:#a3a3a3}
html.dark .article h1{color:#f5f5f5}
html.dark .article-meta{color:#a3a3a3}
html.dark .eyebrow a{color:#a3a3a3}
html.dark .prose{color:#d4d4d4}
html.dark .cta-box{background:rgba(124,58,237,.15)}
html.dark .opo-tag{border-color:#404040;color:#a3a3a3}
html.dark .related{border-color:#262626}
html.dark .post-list-compact .post-card{border-bottom-color:#262626}
