/* Book4Ad blog — article typography & legacy-content normalisation (loads after main.css).
   Reading best practice: left-aligned ragged-right text (no full justify, WCAG 1.4.8),
   ~65–80 characters per line, 1.7–1.75 line-height, 16px minimum on phones. */

/* ---------- Body text ---------- */
article.post{font-size:17px;line-height:1.75;color:#333;padding:44px 52px}
article.post p,article.post li,article.post dd,article.post blockquote{text-align:left}
article.post [style*="text-align: justify"],article.post [style*="text-align:justify"]{text-align:left!important}
article.post>*+*{margin-top:1.05em}
article.post p{margin-bottom:0}
/* Old editor spans with hard-coded fonts/sizes: inherit the article typography. */
article.post span[style]:not(.pill),article.post font{font-family:inherit!important;font-size:inherit!important;line-height:inherit!important}

/* ---------- Headings: clear hierarchy, tight to their section ---------- */
article.post h2{font-size:27px;line-height:1.25;margin-top:1.8em;margin-bottom:0;letter-spacing:-.015em;text-align:left}
article.post h3{font-size:21px;line-height:1.3;margin-top:1.5em;margin-bottom:0;color:var(--navy);text-align:left}
article.post h4{font-size:18px;line-height:1.35;margin-top:1.4em;color:var(--navy)}
article.post h2+*,article.post h3+*,article.post h4+*{margin-top:.6em}
article.post h2[id],article.post h3[id]{scroll-margin-top:140px}

/* ---------- Lists ---------- */
article.post ul,article.post ol{padding-left:1.4em}
article.post li{margin-top:.45em;padding-left:.15em}
article.post li::marker{color:var(--orange)}
article.post li>ul,article.post li>ol{margin-top:.3em}

/* ---------- Images & captions (WordPress alignment classes; Astra's CSS is not loaded) ---------- */
article.post img{height:auto}
article.post .aligncenter,article.post img.aligncenter,article.post figure.aligncenter{display:block;margin-left:auto;margin-right:auto}
article.post .alignleft{float:left;margin:.3em 1.4em .8em 0;max-width:45%}
article.post .alignright{float:right;margin:.3em 0 .8em 1.4em;max-width:45%}
article.post .alignnone{margin-left:0;margin-right:0}
article.post::after{content:"";display:table;clear:both}
article.post h2,article.post h3{clear:both}
article.post .wp-caption-text,article.post figcaption{margin-top:.55em;font-size:13.5px;line-height:1.45;color:var(--muted);text-align:center}
article.post figure{margin-left:0;margin-right:0}

/* ---------- Dividers, tables, TOC ---------- */
article.post hr,article.post .wp-block-separator{border:0;height:1px;background:var(--border);margin:2em 0;opacity:1}
article.post .wp-block-table{overflow-x:auto}
article.post table th,article.post table td{line-height:1.5;vertical-align:top}
article.post #ez-toc-container{width:100%!important;background:#F7F8FA!important;border:1px solid var(--border)!important;border-left:4px solid var(--orange)!important;border-radius:12px!important;padding:14px 18px!important;box-shadow:none!important;margin-top:1.6em}
article.post #ez-toc-container .ez-toc-title-container{display:flex;align-items:center;justify-content:space-between;gap:12px}
article.post #ez-toc-container .ez-toc-title{margin:0!important;font:700 13px/1.2 'Inter',system-ui,sans-serif!important;letter-spacing:.08em;text-transform:uppercase;color:var(--navy)!important}
article.post #ez-toc-container .ez-toc-title-toggle a{display:grid;place-items:center;width:30px;height:30px;border:1px solid var(--border)!important;border-radius:8px;background:#fff}
article.post #ez-toc-container nav>ul{margin-top:10px;padding-left:1.2em}
article.post #ez-toc-container li{margin-top:.35em;font-size:15px;line-height:1.45}
article.post #ez-toc-container a{color:var(--navy)!important;font-weight:500;border-bottom:none!important}
article.post #ez-toc-container a:hover{color:var(--orange-dark)!important}

/* ---------- Phones ---------- */
@media (max-width:1020px){article.post{padding:36px 36px}}
@media (max-width:640px){
  article.post{font-size:16px;line-height:1.7;padding:20px 16px}
  article.post h2{font-size:23px}
  article.post h3{font-size:19px}
  article.post .alignleft,article.post .alignright{float:none;display:block;max-width:100%;margin:1em auto}
  article.post #ez-toc-container{padding:12px 14px!important}
}

/* ---------- Newsletter box: field shrinks, button never clipped ---------- */
.news-band .mc4wp-form,.news-band form{flex:1 1 320px;min-width:0;max-width:100%}
.news-form{min-width:0!important;width:100%;max-width:440px}
.news-form input{min-width:0;width:100%}
.news-form .btn,.news-form button,.news-form input[type=submit]{flex-shrink:0;width:auto}
@media (max-width:640px){
  .news-band{padding:26px 20px}
  .news-form{max-width:none}
  .news-form input{padding:10px 12px}
  .news-form .btn,.news-form button,.news-form input[type=submit]{padding:10px 14px}
}

/* ---------- Tags under the article: small chips ---------- */
article.post .pill{display:inline-flex;align-items:center;font-size:11px!important;line-height:1.2!important;letter-spacing:.04em;padding:5px 10px!important;margin:0 6px 6px 0!important;border-radius:999px;background:rgba(245,130,32,.1);color:var(--orange-dark)}
article.post .pill a{color:inherit!important;border-bottom:none!important;font-weight:700}
@media (max-width:640px){
  .author-box{gap:12px;padding:14px;margin-top:24px}
  .author-box .av{width:40px;height:40px;font-size:14px}
  .author-box p{font-size:13px;line-height:1.5}
}
