:root{
    --bg: #0b1020;
    --bg-soft: #121a2b;
    --card: #0f1626;
    --text: #e6e7ea;
    --muted: #9aa3b2;
    --primary: #3ee6a5;
    --primary-600: #2acb90;
    --chip: #19253a;
    --border: #1c2740;
  }
  
  html,body{background:var(--bg);color:var(--text)}
  
  .blog-hero{
    background: radial-gradient(1200px 400px at 50% -10%, #1a2d52 0%, rgba(26, 45, 82, 0) 60%),
                linear-gradient(180deg, rgba(20,26,44,0.8) 0%, rgba(11,16,32,0) 100%);
    border-bottom: 1px solid var(--border);
  }
  .blog-hero h1{letter-spacing:-0.02em}
  .blog-hero .sub{color:var(--muted)}
  
  .chip{display:inline-flex;align-items:center;gap:.5rem;padding:.35rem .7rem;border-radius:999px;background:var(--chip);color:var(--text);border:1px solid var(--border);font-size:.825rem;max-width:100%;overflow-wrap:anywhere}
  .chip.active{background:rgba(62,230,165,.12);border-color:var(--primary);color:var(--primary)}
  .chip:hover{border-color:var(--primary);color:var(--primary)}
  
  .search-wrap{position:relative}
  .search-wrap input{width:100%;background:var(--bg-soft);border:1px solid var(--border);border-radius:.75rem;padding:.9rem 1rem  .9rem 2.6rem;color:var(--text)}
  .search-wrap svg{position:absolute;left:.8rem;top:50%;transform:translateY(-50%);color:var(--muted)}
  .search-wrap button{background:var(--primary);color:#061016;border-radius:.6rem;padding:.7rem 1rem;border:none}
  .search-wrap button:hover{background:var(--primary-600)}
  
  .grid-cards{display:grid;grid-template-columns:repeat(auto-fit,minmax(280px,1fr));gap:1.2rem;align-items:stretch}
  
  .card{background:linear-gradient(180deg, rgba(255,255,255,0.02), rgba(255,255,255,0) 60%), var(--card);border:1px solid var(--border);border-radius:1rem;padding:1.1rem;transition:transform .2s ease, box-shadow .2s ease, border-color .2s ease;display:flex;flex-direction:column;height:100%}
  .card:hover{transform:translateY(-2px);border-color:#274267;box-shadow:0 10px 30px rgba(0,0,0,.25)}
  .card h2{font-size:1.2rem;margin:0;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
  .card .meta{display:flex;gap:.7rem;align-items:center;color:var(--muted);font-size:.85rem;margin-top:.35rem}
  .card .intro{color:#d7d9de;margin-top:.75rem;display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden}
  .post-card{margin-bottom:2rem}
  .post-card img{width:100%;aspect-ratio:16/9;height:auto;object-fit:cover}
  .card .actions{display:flex;flex-wrap:wrap;gap:.6rem;align-items:center;margin-top:auto}
  .link{color:var(--primary)}
  
  .pagination{display:flex;justify-content:center;align-items:center;gap:.5rem;margin-top:1.5rem}
  .page-btn{padding:.45rem .8rem;border-radius:.5rem;border:1px solid var(--border);background:var(--bg-soft);color:var(--text)}
  .page-btn:hover{border-color:var(--primary);color:var(--primary)}
  
  .post-hero{padding:3rem 0;border-bottom:1px solid var(--border);background:radial-gradient(1200px 400px at 50% -10%, #1a2d52 0%, rgba(26, 45, 82, 0) 60%)}
  .post-hero h1{letter-spacing:-0.02em;margin:0}
  .post-meta{display:flex;gap:1rem;align-items:center;color:var(--muted);margin-top:.6rem}
  
  .content{max-width:860px;margin:0 auto;padding:2rem 0}
  .featured-image{margin-bottom:1.5rem}
  .content img{border-radius:.5rem}
  .content h2,.content h3{scroll-margin-top:90px}
  
  .toc{position:sticky;top:90px;border-left:1px solid var(--border);padding-left:1rem;color:var(--muted)}
  .toc a{display:block;color:var(--muted);padding:.2rem 0}
  .toc a:hover{color:var(--primary)}
  
  .progress{position:fixed;left:0;top:0;height:3px;background:linear-gradient(90deg,var(--primary),#6ff3c5);width:0;z-index:1000}
  
  .share{display:flex;gap:.6rem;align-items:center}
  .share a,.share button{border:1px solid var(--border);background:var(--bg-soft);color:var(--text);border-radius:.5rem;display:inline-flex;align-items:center;justify-content:center;width:36px;height:36px;padding:0;position:relative}
  .share a:hover,.share button:hover{border-color:var(--primary);color:var(--primary)}
  .share svg{width:18px;height:18px}
  .share button.copied::after{content:'Copied!';position:absolute;top:-28px;background:var(--bg-soft);border:1px solid var(--border);padding:.2rem .4rem;border-radius:.35rem;font-size:.75rem;white-space:nowrap}
  
  .content a[href^="http"]:not([href*="chatexpense.com"]),
  .prose a[href^="http"]:not([href*="chatexpense.com"]),
  .rich-text a[href^="http"]:not([href*="chatexpense.com"]),
  .card .intro a[href^="http"]:not([href*="chatexpense.com"]) {
    color: #56ccf0;
    text-decoration: underline;
  }
  