/* ============================================================
   BLOG: single post, blog index, category and other archives.
   Colours and fonts come from the site stylesheet's variables
   (--mellow, --sky, --display, --body and so on).
   ============================================================ */

/* ---------- shared bands ---------- */
html body .rl-post-head,
html body .rl-blog-head { background: var(--mellow); padding: clamp(36px, 4.5vw, 56px) var(--gutter) clamp(44px, 5.5vw, 72px); }
html body .rl-post-head-inner,
html body .rl-blog-head-inner { width: 100%; max-width: 1180px; margin-inline: auto; padding: 0; display: flex; flex-direction: column; gap: 20px; align-items: flex-start; }
html body .rl-post-head-inner > *,
html body .rl-blog-head-inner > * { margin: 0; }

/* ---------- breadcrumbs (Rank Math) ---------- */
html body .rl-crumbs .rank-math-breadcrumb p,
html body .rl-crumbs p { margin: 0; font-family: var(--body); font-size: 14px; line-height: 1.5; color: var(--off-black); }
html body .rl-crumbs a { color: var(--off-black); text-decoration: underline; text-underline-offset: 3px; }
html body .rl-crumbs a:hover { color: var(--true-black); }
html body .rl-crumbs .separator { color: #9AA0A6; padding-inline: 6px; }

/* ---------- category pill ---------- */
html body .rl-post-cat { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; }
html body .rl-post-cat .wp-block-post-terms__separator { display: none; }
html body .rl-post-cat a { display: inline-flex; align-items: center; min-height: 32px; padding: 5px 14px; border-radius: 999px; background: var(--sky); font-family: var(--body); font-size: 14px; font-weight: 600; line-height: 1.3; color: var(--true-black); text-decoration: none; }

/* ---------- title ---------- */
html body .rl-post-head .rl-post-title { font-family: var(--display); font-weight: 800; font-size: clamp(38px, 4.6vw, 64px); line-height: 1.05; letter-spacing: -1.8px; color: var(--true-black); max-width: 20ch; margin: 0; }

/* ---------- meta row: author, updated date, reading time ---------- */
html body .rl-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; font-family: var(--body); font-size: 15px; line-height: 1.4; color: var(--off-black); }
html body .rl-meta-author { display: inline-flex; align-items: center; gap: 10px; color: var(--true-black); font-weight: 600; }
html body .rl-meta-avatar { display: block; width: 36px; height: 36px; border-radius: 50%; object-fit: cover; }
html body .rl-meta-read { display: inline-flex; align-items: center; gap: 18px; }
html body .rl-meta-read::before { content: ""; width: 4px; height: 4px; border-radius: 50%; background: #9AA0A6; }

/* ---------- body layout: contents list beside the article ---------- */
html body .rl-post-wrap { padding: clamp(40px, 5vw, 72px) var(--gutter) clamp(56px, 6vw, 96px); }
html body .rl-post-grid { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: clamp(40px, 5vw, 80px); align-items: start; width: 100%; max-width: 1180px; margin-inline: auto; padding: 0; }
html body .rl-post-grid:not(:has(> .rl-toc)) { grid-template-columns: minmax(0, 1fr); }
html body .rl-post-grid:not(:has(> .rl-toc)) > .rl-article { margin-inline: auto; }
html body .rl-article { width: 100%; max-width: 740px; padding: 0; display: flex; flex-direction: column; gap: 28px; margin: 0; }
html body .rl-article > * { margin: 0; }

/* ---------- "On this page" ---------- */
html body .rl-toc { position: sticky; top: 24px; margin: 0; }
html body.admin-bar .rl-toc { top: 56px; }
html body .rl-toc-box { margin: 0; }
html body .rl-toc-title { display: block; list-style: none; padding: 0 0 12px; margin: 0; cursor: default; font-family: var(--body); font-size: 13px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--off-black); }
html body .rl-toc-title::-webkit-details-marker { display: none; }
html body .rl-toc-list { list-style: none; margin: 0; padding: 0; border-left: 1px solid var(--border); }
html body .rl-toc-list li { margin: 0; padding: 0; }
html body .rl-toc-link { display: block; padding: 8px 0 8px 16px; margin-left: -1px; border-left: 2px solid transparent; font-family: var(--body); font-size: 15px; line-height: 1.35; color: var(--s-text-base); text-decoration: none; }
html body .rl-toc-link:hover { color: var(--accent); }
html body .rl-toc-link.is-active { border-left-color: var(--green); color: var(--true-black); font-weight: 600; }

/* ---------- the short answer (from the Excerpt field) ---------- */
html body .rl-answer { background: var(--sky); padding: clamp(22px, 2.4vw, 30px); display: flex; flex-direction: column; gap: 10px; width: 100%; }
html body .rl-answer .rl-answer-label { font-family: var(--alt); font-weight: 400; font-variation-settings: "SOFT" 0, "WONK" 1; font-size: 22px; line-height: 1.15; color: var(--true-black); margin: 0; }
html body .rl-answer-text,
html body .rl-answer-text p { margin: 0; font-family: var(--body); font-size: clamp(17px, 1.3vw, 19px); line-height: 1.6; color: var(--true-black); }
html body .rl-answer-text p + p { margin-top: 12px; }

/* ---------- featured image ---------- */
html body .rl-post-image { margin: 0; }
html body .rl-post-image img { display: block; width: 100%; height: auto; aspect-ratio: 1200 / 630; object-fit: cover; }

/* ---------- the article (WordPress editor content) ---------- */
html body .rl-post-body { font-family: var(--body); color: var(--s-text-base); }
html body .rl-post-body > * { margin: 0 0 22px; }
html body .rl-post-body > *:last-child { margin-bottom: 0; }
html body .rl-post-body p,
html body .rl-post-body li { font-family: var(--body); font-size: clamp(17px, 1.25vw, 18px); line-height: 1.7; color: var(--s-text-base); }
html body .rl-post-body p { margin: 0 0 22px; }
html body .rl-post-body h2 { font-family: var(--display); font-weight: 700; font-size: clamp(26px, 2.4vw, 34px); line-height: 1.15; letter-spacing: -.6px; color: var(--true-black); margin: 44px 0 16px; scroll-margin-top: 24px; }
html body .rl-post-body h3 { font-family: var(--display); font-weight: 700; font-size: clamp(20px, 1.7vw, 23px); line-height: 1.2; color: var(--true-black); margin: 30px 0 12px; scroll-margin-top: 24px; }
html body .rl-post-body > h2:first-child,
html body .rl-post-body > h3:first-child { margin-top: 0; }
html body.admin-bar .rl-post-body h2,
html body.admin-bar .rl-post-body h3 { scroll-margin-top: 56px; }
html body .rl-post-body strong { color: var(--true-black); font-weight: 600; }
html body .rl-post-body a:not(.cta-button) { color: var(--accent); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
html body .rl-post-body a:not(.cta-button):hover { text-decoration-thickness: 2px; }
html body .rl-post-body ul { list-style: none; margin: 0 0 22px; padding: 0; display: flex; flex-direction: column; gap: 10px; }
html body .rl-post-body ul li { position: relative; padding-left: 26px; margin: 0; }
html body .rl-post-body ul li::before { content: ""; position: absolute; left: 0; top: .66em; width: 9px; height: 9px; background: var(--green); }
html body .rl-post-body ol { margin: 0 0 22px; padding-left: 1.4em; display: flex; flex-direction: column; gap: 10px; }
html body .rl-post-body figure { margin: 0 0 22px; }
html body .rl-post-body img { max-width: 100%; height: auto; display: block; }
html body .rl-post-body figcaption { margin-top: 10px; font-size: 14px; line-height: 1.45; color: var(--off-black); text-align: left; }
html body .rl-post-body .wp-block-table { overflow-x: auto; border: 1px solid var(--border); }
html body .rl-post-body table { width: 100%; min-width: 520px; border-collapse: collapse; margin: 0; font-family: var(--body); font-size: 16px; line-height: 1.45; border: 0; }
html body .rl-post-body th { text-align: left; font-weight: 600; color: var(--true-black); background: #F7F7F4; padding: 12px 16px; border: 0; border-bottom: 1px solid var(--border); }
html body .rl-post-body td { padding: 12px 16px; border: 0; border-bottom: 1px solid var(--border); color: var(--s-text-base); vertical-align: top; }
html body .rl-post-body tr:last-child td { border-bottom: 0; }
html body .rl-post-body .wp-block-table thead { border-bottom: 0; }
html body .rl-post-body blockquote { margin: 0 0 22px; padding: 0 0 0 20px; border: 0; border-left: 3px solid var(--green); font-style: normal; }
html body .rl-post-body hr { border: 0; border-top: 1px solid var(--border); margin: 36px 0; }

/* the product callout */
html body .rl-post-body .rl-callout { border: 1px solid var(--true-black); padding: clamp(22px, 2.4vw, 32px); margin: 36px 0 22px; display: flex; flex-direction: column; align-items: flex-start; gap: 14px; }
html body .rl-post-body .rl-callout p { margin: 0; }
html body .rl-post-body .rl-callout .rl-callout-kicker { font-size: 13px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--off-black); }
html body .rl-post-body .rl-callout .rl-callout-title { font-family: var(--alt); font-weight: 400; font-variation-settings: "SOFT" 0, "WONK" 1; font-size: clamp(22px, 2vw, 28px); line-height: 1.15; color: var(--true-black); }

/* questions: native open/close, same look as the site's FAQ */
html body .rl-post-body .rl-faq { border-top: 1px solid var(--rule); margin: 0 0 22px; }
html body .rl-post-body .rl-faq details { border-bottom: 1px solid var(--rule); padding: 0; }
html body .rl-post-body .rl-faq details[open] { background: var(--mellow); }
html body .rl-post-body .rl-faq summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 22px 24px; font-family: var(--alt); font-weight: 400; font-variation-settings: "SOFT" 0, "WONK" 1; font-size: clamp(20px, 1.7vw, 23px); line-height: 1.2; color: var(--true-black); }
html body .rl-post-body .rl-faq summary::-webkit-details-marker { display: none; }
html body .rl-post-body .rl-faq summary::after { content: "+"; flex: none; font-family: var(--body); font-size: 26px; line-height: 1; color: var(--rule); }
html body .rl-post-body .rl-faq details[open] summary::after { content: "\2212"; }
html body .rl-post-body .rl-faq details p { margin: 0 24px 22px; border-left: 5px solid var(--green); padding: 2px 15px; font-size: 17px; line-height: 1.6; color: var(--off-black); }

/* ---------- author box ---------- */
html body .rl-author { border-top: 1px solid var(--border); padding-top: 32px; display: flex; align-items: flex-start; gap: 22px; }
html body .rl-author .rl-author-avatar { flex: none; display: block; width: 88px; height: 88px; border-radius: 50%; object-fit: cover; margin: 0; }
html body .rl-author .rl-author-name { font-family: var(--display); font-weight: 700; font-size: 21px; line-height: 1.2; color: var(--true-black); margin: 0 0 8px; }
html body .rl-author .rl-author-name a { color: inherit; text-decoration: none; }
html body .rl-author .rl-author-name a:hover { text-decoration: underline; text-underline-offset: 3px; }
html body .rl-author .rl-author-role { font-family: var(--body); font-weight: 600; font-size: 14.5px; line-height: 1.4; color: var(--off-black); margin: -4px 0 10px; }
html body .rl-author .rl-author-bio,
html body .rl-author .rl-author-bio p { font-family: var(--body); font-size: 16px; line-height: 1.6; color: var(--s-text-base); margin: 0; }
html body .rl-author .rl-author-bio p + p { margin-top: 10px; }

/* ---------- closing call to action ---------- */
html body .rl-cta-band { padding: clamp(16px, 2vw, 24px) var(--gutter) clamp(56px, 6vw, 88px); }
html body .rl-cta-box { max-width: 1180px; margin-inline: auto; border: 1px solid var(--true-black); padding: clamp(40px, 5vw, 72px) clamp(20px, 4vw, 60px); display: flex; flex-direction: column; align-items: center; gap: 32px; text-align: center; }
html body .rl-cta-box .rl-cta-line { font-family: var(--alt); font-weight: 400; font-variation-settings: "SOFT" 0, "WONK" 1; font-size: clamp(30px, 3.4vw, 48px); line-height: 1.1; color: var(--true-black); max-width: 20ch; margin: 0; }
html body .rl-cta-box .cta-group { justify-content: center; }

/* ---------- "Keep reading" ---------- */
html body .rl-related { background: var(--sky); padding: clamp(56px, 6vw, 96px) var(--gutter); }
html body .rl-related-inner,
html body .rl-blog-body-inner { width: 100%; max-width: 1180px; margin-inline: auto; padding: 0; display: flex; flex-direction: column; gap: 28px; }
html body .rl-row-head { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; flex-wrap: wrap; }
html body .rl-row-head h2 { font-family: var(--display); font-weight: 700; font-size: clamp(26px, 2.4vw, 34px); letter-spacing: -.6px; line-height: 1.15; color: var(--true-black); margin: 0; }
html body .rl-row-head a { font-family: var(--body); font-weight: 600; color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }

/* ---------- post cards ---------- */
html body .rl-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 35px 30px; }
html body .rl-card { display: flex; flex-direction: column; background: var(--white); border: 1px solid var(--border); border-radius: 16px; box-shadow: -1px 1px 4px 0 rgba(0, 0, 0, .06); overflow: hidden; transition: box-shadow .2s ease; margin: 0; }
html body .rl-card:hover { box-shadow: -1px 3px 12px 0 rgba(0, 0, 0, .09); }
html body .rl-card-media { display: block; margin: 0; overflow: hidden; }
html body .rl-card-media img { display: block; width: 100%; height: auto; aspect-ratio: 100 / 53; object-fit: cover; }
html body .rl-card-body { display: flex; flex-direction: column; padding: 20px 22px 22px; }
html body .rl-card-cat { margin: 0 0 10px; font-family: var(--body); font-size: 13px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; line-height: 1.3; color: var(--off-black); }
html body .rl-card .rl-card-title { font-family: var(--display); font-weight: 700; font-size: 21px; line-height: 1.2; letter-spacing: -.3px; color: var(--true-black); margin: 0 0 10px; }
html body .rl-card .rl-card-title a { color: inherit; text-decoration: none; }
html body .rl-card .rl-card-title a:hover { color: var(--accent); }
html body .rl-card .rl-card-title a::after { content: ""; position: absolute; inset: 0; }
html body .rl-card { position: relative; }
html body .rl-card-excerpt { font-family: var(--body); font-size: 15.5px; line-height: 1.5; color: var(--off-black); margin: 0 0 12px; }
html body .rl-card-date { font-family: var(--body); font-size: 14px; line-height: 1.4; color: var(--s-text-subdued); margin: auto 0 0; padding-top: 4px; }
html body .rl-card-body > *:last-child { margin-bottom: 0; }

/* ---------- pagination ---------- */
html body .rl-pagination { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px; margin-top: 8px; font-family: var(--body); font-size: 16px; }
html body .rl-pagination .page-numbers { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; padding: 0 12px; color: var(--true-black); text-decoration: none; }
html body .rl-pagination a.page-numbers:hover { background: var(--sky); }
html body .rl-pagination .page-numbers.current { background: var(--true-black); color: #fff; }
html body .rl-empty { font-family: var(--body); font-size: 18px; color: var(--off-black); margin: 0; }

/* ---------- blog index and category pages ---------- */
html body .rl-blog-intro { display: flex; flex-direction: column; gap: 20px; align-items: flex-start; }
html body .rl-blog-intro > * { margin: 0; }
html body .rl-blog-head .rl-blog-title { font-family: var(--display); font-weight: 800; font-size: clamp(40px, 5.1vw, 72px); line-height: 1.05; letter-spacing: -2px; color: var(--true-black); margin: 0; isolation: isolate; }
html body .rl-blog-head .vanish { position: relative; white-space: nowrap; }
html body .rl-blog-head .vanish::after { content: ""; position: absolute; left: .2em; right: -.15em; bottom: .12em; height: .18em; min-height: 7px; background: var(--green); z-index: -1; }
html body .rl-blog-head .rl-blog-lead { font-family: var(--body); font-size: clamp(18px, 1.6vw, 22px); line-height: 1.5; color: var(--off-black); max-width: 760px; margin: 0; }
html body .rl-chips { display: flex; flex-wrap: wrap; gap: 10px; }
html body .rl-chips a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 18px; border: 1px solid var(--true-black); font-family: var(--body); font-size: 15px; font-weight: 600; color: var(--true-black); text-decoration: none; }
html body .rl-chips a:hover { background: var(--sky); }
html body .rl-chips a[aria-current="page"] { background: var(--true-black); color: #fff; }
html body .rl-blog-body { padding: clamp(44px, 5vw, 72px) var(--gutter) clamp(64px, 7vw, 110px); }

/* ---------- smaller screens ---------- */
@media (max-width: 980px) {
  html body .rl-post-grid { grid-template-columns: minmax(0, 1fr); }
  html body .rl-toc { position: static; width: 100%; min-width: 0; border: 1px solid var(--border); padding: 18px 18px 10px; }
  html body .rl-toc-title { cursor: pointer; display: flex; justify-content: space-between; align-items: center; padding-bottom: 8px; }
  html body .rl-toc-title::after { content: "+"; font-size: 22px; line-height: 1; letter-spacing: 0; color: var(--off-black); }
  html body .rl-toc-box[open] .rl-toc-title::after { content: "\2212"; }
  html body .rl-toc-box[open] .rl-toc-title { padding-bottom: 12px; }
  html body .rl-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 620px) {
  html body .rl-cards { grid-template-columns: minmax(0, 1fr); }
  html body .rl-author { gap: 16px; }
  html body .rl-author .rl-author-avatar { width: 64px; height: 64px; }
  html body .rl-post-body .rl-faq summary { padding: 20px 14px; }
  html body .rl-post-body .rl-faq details p { margin: 0 14px 20px; }
}
@media (prefers-reduced-motion: reduce) {
  html body .rl-card { transition: none; }
}
