/* ---------- The blog, in the "red line" edition (body.ed.post, body.ed.blog-home) ----------
   Loaded after site.css and editorial.css by blog/index.html and every post.
   It restyles the markup the posts already have (page-hero, .prose, .toc,
   .keytakeaways, .faq, .related, the closing CTA) so no article body changes.
   Brand colours only, from the tokens editorial.css sets on body.ed. */

/* ---------- the cover: a large title on the cloud ground ---------- */
body.ed .page-hero{background:var(--ground);border:0;text-align:left;padding:56px 0 56px}
body.ed .page-hero .wrap{display:flex;flex-direction:column;align-items:flex-start}
body.ed .breadcrumb{justify-content:flex-start;font-size:var(--s-small);color:var(--muted);margin:0 0 28px;order:0}
body.ed .breadcrumb a{color:var(--ink);font-weight:600}
body.ed .breadcrumb a:hover{color:var(--red)}
body.ed .breadcrumb span{color:var(--muted)}
body.ed .page-hero h1{order:1;margin:0;max-width:1200px;font-size:clamp(36px,5vw,88px);line-height:.94;letter-spacing:-.045em;text-align:left}
body.ed .page-hero h1 .accent{color:var(--red)}
body.ed .page-hero .lead{order:2;margin:28px 0 0;max-width:46ch;font-size:var(--s-lead);line-height:1.45;color:var(--ink);text-align:left}
/* the category is a tag after the title, not a label over it */
body.ed .page-hero .eyebrow{order:3;margin:28px 0 0;background:var(--red);color:#fff;letter-spacing:0;text-transform:none;font-size:var(--s-small);font-weight:700;padding:7px 16px;border-radius:99px}  /* taste-skill-ignore: the category, moved after the title as a tag */

/* ---------- an article: on white, the contents hold still on the left, the text runs on the right ---------- */
body.post{background:var(--paper)}
body.post header,body.post .page-hero{background:var(--paper)}
body.post .page-hero+section{padding:0 0 112px}
body.post .wrap.prose{max-width:none;padding:0 var(--m);margin:0;display:grid;grid-template-columns:minmax(0,30fr) minmax(0,70fr);column-gap:48px;font-size:18px;line-height:1.65;color:var(--text)}
body.post .prose>*{grid-column:2;max-width:720px;min-width:0}
body.post .prose>.article-hero-img{grid-column:1/-1;grid-row:1;max-width:none;width:100%;height:min(46svh,440px);object-fit:contain;background:var(--ground);border:0;border-radius:28px;padding:0;margin:0 0 56px}
/* posts without a contents list: the picture holds still on the left instead */
body.post .wrap.prose:not(:has(>.toc))>.article-hero-img{grid-column:1;grid-row:1/span 400;align-self:start;position:sticky;top:96px;height:auto;aspect-ratio:5/3;margin:0}
body.post .prose>.toc{grid-column:1;grid-row:2/span 400;align-self:start;position:sticky;top:96px;background:none;border:0;padding:0;margin:0;max-width:none}
body.post .toc b{font-family:var(--display);font-variation-settings:'opsz' 96;font-size:clamp(24px,2vw,32px);font-weight:800;letter-spacing:-.035em;text-transform:none;color:var(--ink);margin-bottom:16px}
body.post .prose .toc ol{list-style:none;margin:0;padding:0;display:grid;gap:2px}
body.post .prose .toc a:not(.btn){text-decoration:none;display:block;padding:8px 16px;border-radius:99px;color:var(--muted);font-size:var(--s-small);font-weight:600;line-height:1.35;text-decoration:none}
body.post .prose .toc a:not(.btn):hover{color:var(--ink);background:var(--ground)}
body.post .prose .toc a.on:not(.btn){background:var(--red);color:#fff}

body.post .prose p{margin-bottom:20px}
body.post .post-meta{font-size:var(--s-small);color:var(--muted);margin-bottom:20px}
body.post .post-meta a{color:var(--ink)}
body.post .lede{font-size:var(--s-lead);line-height:1.5;color:var(--ink);margin-bottom:32px}
body.post .prose h2{font-family:var(--display);font-variation-settings:'opsz' 96;font-size:clamp(30px,2.8vw,46px);line-height:1;letter-spacing:-.04em;font-weight:800;color:var(--ink);margin:80px 0 22px;scroll-margin-top:96px}
body.post .prose h3{font-family:var(--display);font-variation-settings:'opsz' 96;font-size:clamp(22px,1.7vw,27px);letter-spacing:-.025em;font-weight:700;color:var(--ink);margin:40px 0 12px}
body.post .prose ul,body.post .prose ol{margin:0 0 24px 22px;gap:12px}
body.post .prose li{font-size:18px;color:var(--text)}
body.post .prose li::marker{color:var(--red)}
body.post .prose a:not(.btn){color:var(--ink);font-weight:600;text-decoration:underline;text-decoration-color:var(--red);text-decoration-thickness:2px;text-underline-offset:4px}
body.post .prose a:not(.btn):hover{color:var(--red)}
body.post .prose b,body.post .prose strong{color:var(--ink)}
body.post .prose blockquote{margin:36px 0;padding:0 0 0 28px;background:none;border-left:8px solid var(--red);border-radius:0;font-family:var(--display);font-variation-settings:'opsz' 96;font-size:clamp(24px,2vw,32px);line-height:1.2;letter-spacing:-.02em;font-weight:700;color:var(--ink)}
body.post .prose code{background:var(--blush);padding:1px 6px;border-radius:4px;font-size:.9em}
body.post .prose table:not(.facts):not(.merik-calc table){width:100%;border-collapse:collapse;margin:0 0 28px;font-size:16px}
body.post .prose table:not(.facts):not(.merik-calc table) th{text-align:left;background:var(--ink);color:#fff;padding:12px 14px;font-weight:700}
body.post .prose table:not(.facts):not(.merik-calc table) td{padding:12px 14px;border-top:2px solid #E2DED6;vertical-align:top}
body.post .prose table:not(.facts):not(.merik-calc table) tr:nth-child(even) td{background:var(--paper)}

/* key takeaways: a red field */
body.post .keytakeaways{background:var(--red);color:#fff;border-radius:28px;padding:36px 40px;margin:8px 0 48px}
body.post .keytakeaways>b{font-family:var(--display);font-variation-settings:'opsz' 96;font-size:clamp(26px,2.2vw,36px);font-weight:800;letter-spacing:-.035em;text-transform:none;color:#fff;margin-bottom:18px}
body.post .keytakeaways ul{margin:0;gap:14px}
body.post .keytakeaways li{display:block;position:relative;padding-left:26px;font-size:18px;color:#fff;line-height:1.5}
body.post .keytakeaways li b{display:inline;color:#fff;font:inherit;font-weight:700;letter-spacing:0;text-transform:none;margin:0}
body.post .keytakeaways li::before{content:"";position:absolute;left:0;top:.6em;width:10px;height:10px;border-radius:50%;background:#fff}
body.post .keytakeaways a{color:#fff!important;text-decoration-color:#fff!important}

/* the free-tool callout carries inline styles; this brings it into the palette */
body.post .tool-callout{border:0!important;background:var(--blush)!important;border-radius:28px!important;padding:32px 36px!important;margin:8px 0 48px!important}
body.post .tool-callout>div:first-child{color:var(--red-d)!important;letter-spacing:0!important;text-transform:none!important;font-size:var(--s-small)!important}
body.post .tool-callout>div:nth-child(2){font-family:var(--display);font-variation-settings:'opsz' 96;font-size:clamp(24px,2vw,32px)!important;letter-spacing:-.03em;line-height:1.1}

/* quick reference and questions */
body.post .prose table.facts{margin:0 0 24px}
body.post .prose .faq{max-width:720px;margin:0 0 32px!important;gap:10px}
body.post .faq details{background:var(--ground);border:0;border-radius:20px;padding:4px 28px;box-shadow:none}
body.post .faq details[open]{box-shadow:none;background:var(--blush)}
body.post .faq summary{font-family:var(--display);font-variation-settings:'opsz' 96;font-size:clamp(20px,1.6vw,24px);font-weight:700;letter-spacing:-.02em;line-height:1.2;padding:22px 0;gap:20px}
body.post .faq summary::after{content:"+";flex:none;width:32px;height:32px;border-radius:50%;background:var(--red);color:#fff;display:flex;align-items:center;justify-content:center;font-family:'Inter',sans-serif;font-size:20px;font-weight:600;line-height:1;transform:none}
body.post .faq details[open] summary::after{content:"\2212"}
body.post .faq details p{font-size:17px;padding:0 0 24px}

/* ---------- related articles and the blog index share one card ---------- */
body.ed .blog-card{background:var(--paper);border:0;border-radius:28px;overflow:hidden;display:flex;flex-direction:column;box-shadow:none;transition:transform .3s var(--ease),background-color .25s ease}
body.ed .blog-card:hover{transform:translateY(-6px);box-shadow:none;background:var(--blush)}
body.ed .blog-card .thumb{aspect-ratio:16/10;background:var(--ground);padding:0;object-fit:cover;transition:transform .5s var(--ease)}
body.ed .blog-card:hover .thumb{transform:scale(1.04)}
body.ed .blog-card{isolation:isolate}
body.ed .blog-card .bc-body{padding:24px 28px 30px;display:flex;flex-direction:column;flex:1}
body.ed .blog-card .tag2{order:3;margin-top:auto;align-self:flex-start;background:var(--ground);color:var(--ink);border-radius:99px;padding:5px 12px;font-size:13px;font-weight:700;letter-spacing:0;text-transform:none}
body.ed .blog-card h3{font-family:var(--display);font-variation-settings:'opsz' 96;font-size:clamp(21px,1.6vw,26px);line-height:1.1;letter-spacing:-.025em;font-weight:800;margin:0 0 10px}
body.ed .blog-card p{margin-bottom:20px}
body.ed .blog-card p{font-size:16px;color:#3F424A}
body.ed .blog-card .rt{margin-top:auto;padding-top:14px}
body.ed .related{background:var(--ground);padding:112px 0}
body.ed .related>.wrap{max-width:none;padding:0 var(--m)}
body.ed .related.soft{background:var(--ground)}
body.ed .related h2{font-size:var(--s-h2);margin-bottom:48px}
body.ed .related .grid{gap:16px}

/* ---------- the closing call to action: a red band ---------- */
body.ed .lp-sec.lp-tight{background:var(--red);padding:112px 0;margin:0}
body.ed .end-cta{display:grid;grid-template-columns:minmax(0,58fr) minmax(0,42fr);gap:48px;align-items:end;background:none;border:0;border-radius:0;padding:0 var(--m);max-width:none}
body.ed .end-cta h2{color:#fff;font-size:var(--s-h2);max-width:16ch}
body.ed .end-cta p{color:#fff;font-size:var(--s-lead);margin-top:20px;max-width:44ch}
body.ed .end-cta-a{display:flex;flex-wrap:wrap;align-items:center;gap:24px;justify-content:flex-start}
body.ed .end-cta .btn-primary{background:var(--ink)}
body.ed .end-cta .btn-primary:hover{background:#000}
body.ed .end-cta .lp-link{color:#fff;font-weight:700;text-decoration:underline;text-decoration-thickness:2px;text-underline-offset:4px}

/* ---------- the blog index ---------- */
body.blog-home .page-hero h1{font-size:var(--s-hero);max-width:14ch}
body.blog-home .page-hero+section{padding:0 0 112px;background:var(--ground)}
body.blog-home .page-hero+section>.wrap{max-width:none;padding:0 var(--m)}
body.blog-home .blog-search{max-width:none;margin:0 0 20px}
body.blog-home .blog-search input{font-size:var(--s-lead);padding:22px 28px 22px 64px;border:2px solid transparent;border-radius:99px;background:var(--paper);box-shadow:none}
body.blog-home .blog-search input:focus{border-color:var(--red);box-shadow:none}
body.blog-home .blog-search::before{left:28px;font-size:24px;color:var(--red)}
body.blog-home .blog-filters{justify-content:flex-start;margin:0 0 48px}
body.blog-home .blog-filters button{border:0;background:var(--paper);color:var(--ink);padding:10px 18px;font-size:var(--s-small)}
body.blog-home .blog-filters button:hover{background:var(--blush);color:var(--ink)}
body.blog-home .blog-filters button.on{background:var(--red);color:#fff}
body.blog-home .grid{gap:16px}
/* the newest guide leads, twice the size */
body.blog-home #blogGrid>.blog-card:first-child{grid-column:span 2;grid-row:span 2;background:var(--ink)}
body.blog-home #blogGrid>.blog-card:first-child .thumb{flex:1;aspect-ratio:auto;min-height:320px}
body.blog-home #blogGrid>.blog-card:first-child h3{color:#fff;font-size:clamp(30px,3vw,48px);line-height:1;letter-spacing:-.04em}
body.blog-home #blogGrid>.blog-card:first-child p{color:#D6D7DB;font-size:var(--s-lead)}
body.blog-home #blogGrid>.blog-card:first-child .tag2{background:var(--red);color:#fff}
body.blog-home #blogGrid>.blog-card:first-child:hover{background:#000}

/* ---------- phones and tablets ---------- */
@media(max-width:900px){
  body.post .wrap.prose{grid-template-columns:1fr;font-size:17px}
  body.post .prose>*,body.post .wrap.prose:not(:has(>.toc))>.article-hero-img{grid-column:1}
  body.post .wrap.prose:not(:has(>.toc))>.article-hero-img{grid-row:auto;position:static;margin-bottom:40px}
  body.post .prose>.article-hero-img{height:auto;aspect-ratio:16/10;padding:24px;margin-bottom:40px;border-radius:22px}
  body.post .prose>.toc{grid-column:1;grid-row:auto;position:static;margin:0 0 32px;background:var(--paper);border-radius:22px;padding:24px 20px}
  body.post .keytakeaways{padding:28px 24px}
  body.post .tool-callout{padding:24px 22px!important}
  body.post .faq details{padding:2px 20px}
  body.ed .related .grid,body.blog-home .grid{grid-template-columns:1fr 1fr}
  body.ed .end-cta{grid-template-columns:1fr;gap:28px}
  body.blog-home #blogGrid>.blog-card:first-child{grid-row:auto}
}
@media(max-width:600px){
  body.ed .related .grid,body.blog-home .grid{grid-template-columns:1fr}
  body.blog-home #blogGrid>.blog-card:first-child{grid-column:auto}
  body.blog-home #blogGrid>.blog-card:first-child .thumb{min-height:220px;padding:32px}
  body.ed .page-hero h1{font-size:32px}
  body.post .prose h2{font-size:26px}
  body.post .prose blockquote{font-size:21px}
  body.post .tool-callout>div:nth-child(2){font-size:21px!important}
  body.blog-home #blogGrid>.blog-card:first-child h3{font-size:24px}
  body.blog-home .page-hero h1{font-size:var(--s-hero)}
}

/* links that carry an inline brand colour keep the darker red, for contrast */
body.post .prose a[style]:not(.btn){color:var(--red-d)!important}

/* on the index the page is white and each card is one warm block, picture included */
body.blog-home{background:var(--paper)}
body.blog-home header,body.blog-home .page-hero,body.blog-home .page-hero+section{background:var(--paper)}
body.blog-home .blog-card{background:var(--ground)}
body.blog-home .blog-card:hover{background:var(--blush)}
body.blog-home .blog-search input,body.blog-home .blog-filters button{background:var(--ground)}

/* motion: the cover rises in, the picture opens, cards arrive as they scroll in */
@keyframes bl-rise{from{opacity:0;transform:translateY(28px)}to{opacity:1;transform:none}}
@keyframes bl-open{from{clip-path:inset(0 0 100% 0)}to{clip-path:inset(0)}}
body.ed .page-hero h1{animation:bl-rise .9s var(--ease) both}
body.ed .page-hero .lead{animation:bl-rise .9s .12s var(--ease) both}
body.ed .page-hero .eyebrow{animation:bl-rise .9s .22s var(--ease) both}  /* taste-skill-ignore: the category, moved after the title as a tag */
body.post .prose>.article-hero-img{animation:bl-open 1.1s .2s cubic-bezier(.7,0,.2,1) both}
@supports (animation-timeline:view()){
  body.ed .blog-card,body.post .keytakeaways,body.post .prose blockquote{animation:bl-rise linear both;animation-timeline:view();animation-range:entry 0% entry 40%}
}
@media(prefers-reduced-motion:reduce){
  body.ed .page-hero h1,body.ed .page-hero .lead,body.ed .page-hero .eyebrow,body.post .prose>.article-hero-img,body.ed .blog-card,body.post .keytakeaways,body.post .prose blockquote{animation:none}  /* taste-skill-ignore: the category, moved after the title as a tag */
}

/* the working calculators in three posts (styles injected by blog-calcs.js; these win on specificity) */
body.post .prose .merik-calc{border:0;border-radius:28px;background:var(--blush);padding:36px 40px;margin:8px 0 48px}
body.post .prose .merik-calc .mc-k{letter-spacing:0;text-transform:none;font-size:var(--s-small);color:var(--red-d)}
body.post .prose .merik-calc h3{font-size:clamp(24px,2vw,32px);margin:4px 0 20px}
body.post .prose .merik-calc label{font-size:var(--s-small)}
body.post .prose .merik-calc input,body.post .prose .merik-calc select{border:2px solid transparent;border-radius:12px;font-size:17px}
body.post .prose .merik-calc input:focus,body.post .prose .merik-calc select:focus{border-color:var(--red)}
body.post .prose .merik-calc .mc-out{background:var(--ink);border-radius:20px;padding:24px 26px}
body.post .prose .merik-calc .mc-big{font-family:var(--display);font-variation-settings:'opsz' 96;font-size:clamp(36px,3.4vw,56px);letter-spacing:-.045em;line-height:1}
body.post .prose .merik-calc .mc-sub{color:#D6D7DB;font-size:15px}
body.post .prose .merik-calc th{text-transform:none;letter-spacing:0;font-size:13px;color:#D6D7DB}
body.post .prose .merik-calc td,body.post .prose .merik-calc th{border-bottom-color:rgba(255,255,255,.25)}
body.post .prose .merik-calc .mc-note{font-size:14px;color:var(--text)}
@media(max-width:900px){body.post .prose .merik-calc{padding:24px 20px}}
body.post .prose .merik-calc .mc-out :is(b,strong){color:#fff}
body.post .prose code,body.post .prose a{overflow-wrap:anywhere}
body.post .prose>table.facts{max-width:720px}

/* ---------- author pages (body.ed.post.author) ---------- */
body.author .page-hero{position:relative;overflow:hidden;padding-bottom:72px;min-height:calc(min(30vw,380px) + 140px)}
body.author .page-hero h1{font-size:var(--s-hero);max-width:12ch;line-height:.88}
body.author .page-hero .wrap{padding-right:calc(var(--m) + min(30vw,380px))}
body.author .au-role{order:4;margin:28px 0 0;background:var(--red);color:#fff;font-size:var(--s-small);font-weight:700;padding:7px 16px;border-radius:99px;animation:bl-rise .9s .22s var(--ease) both}
/* no portrait exists, so the initials stand in for one, in the logo's red */
.au-mark{position:absolute;right:var(--m);top:50%;margin-top:calc(min(30vw,380px) / -2);width:min(30vw,380px);aspect-ratio:1;border-radius:50%;background:var(--red);display:flex;align-items:center;justify-content:center;font-family:var(--display);font-variation-settings:'opsz' 96;font-weight:800;font-size:min(11vw,150px);letter-spacing:-.06em;color:#fff;animation:bl-rise 1s .2s var(--ease) both}
.au-count{order:3;margin-top:28px;font-size:var(--s-lead);color:var(--ink)}
.au-count b{font-family:var(--display);font-variation-settings:'opsz' 96;font-weight:800;font-size:clamp(40px,4vw,64px);letter-spacing:-.05em;color:var(--red);margin-right:10px;vertical-align:-.12em}
body.author .wrap.prose>*{max-width:none}
body.author .wrap.prose>h2{grid-column:1;grid-row:3/span 2;align-self:start;position:sticky;top:96px;margin:0;font-size:clamp(28px,2.4vw,40px)}
body.author .wrap.prose>p:first-child{font-size:var(--s-lead);color:var(--ink)}
body.author .prose ul.au-guides{list-style:none;margin:0 0 40px;padding:0;display:grid;grid-template-columns:1fr 1fr;column-gap:24px;gap:0 24px;max-width:none}
body.author .au-guides li{margin:0;padding:0;border-top:2px solid var(--ground)}
body.author .au-guides li:nth-last-child(-n+2){border-bottom:2px solid var(--ground)}
body.author .prose .au-guides a:not(.btn){display:flex;justify-content:space-between;align-items:center;gap:24px;padding:20px 8px;text-decoration:none;color:var(--ink);font-family:var(--display);font-variation-settings:'opsz' 96;font-size:clamp(20px,1.6vw,26px);font-weight:700;letter-spacing:-.025em;line-height:1.15;border-radius:16px;transition:background-color .2s ease,padding .25s var(--ease),color .2s ease}
body.author .prose .au-guides a:not(.btn)::after{content:"\2192";font-family:'Inter',sans-serif;font-weight:600;color:var(--red);transition:transform .25s var(--ease)}
body.author .prose .au-guides a:not(.btn):hover{background:var(--blush);padding-left:20px;padding-right:20px;color:var(--ink)}
body.author .prose .au-guides a:not(.btn):hover::after{transform:translateX(4px)}

/* the founders, on the About page */
.pg-founders{list-style:none;padding:0!important;margin:32px 0 0!important;display:grid!important;grid-template-columns:1fr 1fr;gap:16px!important;max-width:none!important}
body.ed main .pg-founders a:not(.btn){display:flex;flex-direction:column;gap:20px;padding:28px;border-radius:28px;background:var(--ground);text-decoration:none;color:var(--ink);transition:background-color .25s ease,transform .3s var(--ease)}
body.ed main .pg-founders a:not(.btn):hover{background:var(--blush);transform:translateY(-4px);color:var(--ink)}
.pg-founders .mono{width:88px;height:88px;border-radius:50%;background:var(--red);color:#fff;display:flex;align-items:center;justify-content:center;font-family:var(--display);font-variation-settings:'opsz' 96;font-weight:800;font-size:34px;letter-spacing:-.05em}
.pg-founders li:nth-child(2) .mono{background:var(--ink)}
.pg-founders b{display:block;font-family:var(--display);font-variation-settings:'opsz' 96;font-size:clamp(24px,2vw,30px);font-weight:800;letter-spacing:-.035em;line-height:1.05}
.pg-founders small{display:block;margin-top:8px;font-size:var(--s-small);color:var(--text);line-height:1.45}

@media(max-width:900px){
  body.author .page-hero .wrap{padding-right:var(--m)}
  .au-mark{order:-1;position:static;margin-top:0;width:140px;font-size:56px;margin:32px var(--m) 0}
  body.author .page-hero{display:flex;flex-direction:column}
  body.author .wrap.prose>*{max-width:none}
body.author .wrap.prose>h2{grid-column:1;grid-row:auto;position:static;margin:24px 0 16px}
  .pg-founders{grid-template-columns:1fr}
  body.author .prose ul.au-guides{grid-template-columns:1fr}
  body.author .au-guides li:nth-last-child(2){border-bottom:0}
  body.author .page-hero{min-height:0}
}
