/* CGR blog: article and index styles. Loaded after cgr-mcp.css by cgr-blog-single.php / cgr-blog-index.php. */

/* Hero */
.cgrx .post-hero{padding:72px 0 64px}
.cgrx .post-wrap{max-width:796px}
.cgrx .post-hero .eyebrow a{color:inherit}
.cgrx .post-hero h1{font-size:clamp(32px,4.4vw,50px);line-height:1.1}
.cgrx .post-hero .lead{color:var(--onD)}
.cgrx .post-meta{display:flex;flex-wrap:wrap;gap:6px 18px;margin-top:24px;font-size:14.5px;color:var(--onD2)}
.cgrx .post-meta .by::before{content:"·";margin-right:18px}

/* Article body */
.cgrx .post-body{padding-top:56px;padding-bottom:88px;font-size:17.5px;line-height:1.75;color:#3B4659}
.cgrx .post-body>*+*{margin-top:1.15em}
.cgrx .post-body h2{font-size:clamp(24px,2.6vw,30px);line-height:1.2;margin-top:2em;max-width:none}
.cgrx .post-body h3{font-size:20.5px;line-height:1.3;margin-top:1.7em;margin-bottom:0}
.cgrx .post-body h4{font-size:17.5px;font-weight:700;color:var(--ink);margin-top:1.5em}
.cgrx .post-body h2+*,.cgrx .post-body h3+*,.cgrx .post-body h4+*{margin-top:.6em}
.cgrx .post-body strong{color:var(--ink)}
.cgrx .post-body a{text-decoration:underline;text-underline-offset:3px;text-decoration-thickness:1px}
.cgrx .post-body a:hover{text-decoration-thickness:2px}

/* Lists */
.cgrx .post-body ul,.cgrx .post-body ol{padding-left:1.35em}
.cgrx .post-body ul{list-style:disc}
.cgrx .post-body ol{list-style:decimal}
.cgrx .post-body li{padding-left:.25em}
.cgrx .post-body li+li{margin-top:.45em}
.cgrx .post-body li::marker{color:var(--blue);font-weight:700}
.cgrx .post-body li>ul,.cgrx .post-body li>ol{margin-top:.45em}

/* Checklists: <ul class="checklist"><li>…</li><li class="done">…</li></ul> */
.cgrx .post-body ul.checklist{list-style:none;padding-left:0}
.cgrx .post-body ul.checklist>li{position:relative;padding-left:36px}
.cgrx .post-body ul.checklist>li::before{content:"";position:absolute;left:0;top:.28em;width:20px;height:20px;border:2px solid var(--blue);border-radius:6px;background:#fff}
.cgrx .post-body ul.checklist>li.done::before{background:var(--blue) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12l5 5 9-10'/%3E%3C/svg%3E") center/14px no-repeat}

/* Quotes, rules, figures */
.cgrx .post-body blockquote{margin-left:0;margin-right:0;border-left:4px solid var(--or);padding:4px 0 4px 22px;color:var(--ink);font-size:19px;line-height:1.6}
.cgrx .post-body blockquote p+p{margin-top:.6em}
.cgrx .post-body hr{border:0;border-top:1px solid var(--line);margin:2.6em 0}
.cgrx .post-body figure img,.cgrx .post-body>p>img{display:block;border-radius:12px}
.cgrx .post-body figcaption{margin-top:10px;font-size:14px;color:var(--muted);text-align:center}
.cgrx .post-feature{margin-bottom:2em}
.cgrx .post-feature img{width:100%;border-radius:14px}

/* Tables: wrapped in .table-wrap so wide tables scroll sideways on phones instead of breaking the page */
.cgrx .post-body .table-wrap{overflow-x:auto;-webkit-overflow-scrolling:touch;border:1px solid var(--line);border-radius:12px}
.cgrx .post-body table{width:100%;border-collapse:collapse;font-size:15.5px;line-height:1.55}
.cgrx .post-body th{background:var(--n8);color:#fff;text-align:left;font-weight:700;padding:11px 16px;white-space:nowrap}
.cgrx .post-body td{padding:11px 16px;border-top:1px solid var(--line);vertical-align:top;min-width:120px}
.cgrx .post-body tbody tr:nth-child(even) td{background:var(--tint)}

/* Code */
.cgrx .post-body code{font-family:"JetBrains Mono",Consolas,monospace;font-size:.86em;background:var(--tint);color:var(--ink);border:1px solid var(--line);border-radius:6px;padding:.12em .4em}
.cgrx .post-body pre{background:var(--n8);color:#E7EDF8;border-radius:12px;padding:18px 22px;overflow-x:auto;font-size:14px;line-height:1.65}
.cgrx .post-body pre code{background:none;border:0;padding:0;color:inherit;font-size:inherit}

/* Self-hosted video: <figure class="post-video"> (16:9, column width) or <figure class="post-video portrait"> (4:5, max 480px) */
.cgrx .post-body .post-video{margin-top:2em;margin-bottom:2em}
.cgrx .post-body .post-video video{display:block;width:100%;height:auto;aspect-ratio:16/9;background:#000;border-radius:12px}
.cgrx .post-body .post-video.portrait{max-width:480px;margin-left:auto;margin-right:auto}
.cgrx .post-body .post-video.portrait video{aspect-ratio:4/5}

/* Index */
.cgrx .blog-sec{padding:72px 0 96px}
.cgrx .blog-list{display:grid;grid-template-columns:repeat(auto-fill,minmax(320px,1fr));gap:24px}
.cgrx .post-card{display:flex;flex-direction:column;background:#fff;border:1px solid var(--line);border-radius:var(--r);padding:28px;color:var(--body);transition:box-shadow .15s,transform .15s}
.cgrx .post-card:hover{text-decoration:none;box-shadow:0 18px 40px rgba(10,21,51,.10);transform:translateY(-2px)}
.cgrx .post-card-img{display:block;margin:-28px -28px 20px;overflow:hidden;border-radius:var(--r) var(--r) 0 0}
.cgrx .post-card-img img{display:block;width:100%;aspect-ratio:16/9;object-fit:cover}
.cgrx .post-card time{font-size:13px;color:var(--muted);font-weight:600}
.cgrx .post-card h2{font-size:21px;line-height:1.3;margin:8px 0 10px;max-width:none}
.cgrx .post-card p{font-size:15.5px}
.cgrx .post-card .tlink{margin-top:auto;padding-top:18px}
.cgrx .blog-empty{font-size:17px}
.cgrx .blog-sec .pagination{margin-top:40px}
.cgrx .blog-sec .nav-links{display:flex;flex-wrap:wrap;gap:8px;justify-content:center}
.cgrx .blog-sec .page-numbers{display:inline-flex;min-width:42px;min-height:42px;align-items:center;justify-content:center;padding:0 14px;border-radius:999px;border:1px solid var(--line);background:#fff;font-weight:700;color:var(--ink)}
.cgrx .blog-sec .page-numbers.current{background:var(--n8);border-color:var(--n8);color:#fff}

@media (max-width:640px){
  .cgrx .post-hero{padding:52px 0 44px}
  .cgrx .post-body{padding-top:40px;padding-bottom:64px;font-size:16.5px}
  .cgrx .post-body blockquote{font-size:17.5px}
  .cgrx .blog-list{grid-template-columns:1fr}
}
