/* DMT redesign: blog index + single post (job 64, task #832). Loaded only on blog pages, after site.css. */

/* ---------- index head */
.bhead { padding-bottom: 0; }
.sec.bhead + .sec.bmain { padding-top: var(--head-gap) !important; }
.bhead h1 { font-size: clamp(34px, 4.6vw, 56px); margin: 12px 0 var(--text-gap); color: #fff; max-width: 20ch; }
.bhead__lede { font-size: 18px; color: var(--paper-2); max-width: 36em; }
.crumbs a { padding: 4px 0; display: inline-block; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: var(--stack); }
.chips a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px; border-radius: 999px; border: 1px solid #3a362f; text-decoration: none; font-weight: 700; font-size: 15px; color: var(--paper-2); }
.chips a:hover { border-color: var(--gold-lt); color: #fff; }
.chips a[aria-current="page"] { background: var(--gold); border-color: var(--gold); color: #111; }

/* ---------- post cards */
.bgrid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--card-gap) calc(var(--card-gap) + 8px); }
.bcard { position: relative; display: grid; grid-template-rows: auto 1fr; background: var(--card); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; transition: border-color .2s; }
.bcard:hover { border-color: #5a4f33; }
.bcard__media { display: block; }
.bcard__img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; background: #222; }
.bcard__body { padding: var(--card-pad); display: grid; align-content: start; gap: 8px; }
.bcard__title { font-size: 22px; line-height: 1.15; color: #fff; }
.bcard__title a { text-decoration: none; }
.bcard__title a::after { content: ""; position: absolute; inset: 0; } /* whole card is the link */
.bcard__title a:hover { color: var(--gold-lt); }
.bcard__text { color: var(--muted); font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bcard__meta { font: 600 12px/1.3 var(--mono); letter-spacing: .04em; color: var(--muted); }
.bgrid__lead { grid-column: 1 / -1; }
.bgrid__lead .lead { margin: 0 auto; max-width: 640px; }
.bgrid__lead--solo { margin-top: var(--head-gap); }
.bgrid__none { color: var(--muted); }
.pager { display: flex; flex-wrap: wrap; gap: 8px; margin-top: var(--head-gap); }
.pager a, .pager span { display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px; border-radius: 8px; border: 1px solid #3a362f; text-decoration: none; font-weight: 700; }
.pager .current { background: var(--gold); border-color: var(--gold); color: #111; }

/* ---------- single post */
.post__top { padding-bottom: 28px; }
.post__top h1 { font-size: clamp(32px, 4.4vw, 52px); margin: 12px 0 var(--text-gap); color: #fff; max-width: 22ch; }
.post__meta { font: 600 13px/1.4 var(--mono); letter-spacing: .03em; color: var(--muted); }
.post__fig { margin: 0 auto; padding-bottom: var(--head-gap); max-width: 1000px; }
.post__img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 14px; background: #222; }
.post__main { padding-top: calc(var(--sec-y) * .7); }
.post__body { max-width: 68ch; margin: 0 auto; font-size: 18px; line-height: 1.72; color: #3a372f; }
.post__body > * { margin-block: 0; }
.post__body p, .post__body ul, .post__body ol, .post__body figure, .post__body blockquote, .post__body table { margin: 0 0 1.15em; }
.post__body .has-text-color, .post__body p, .post__body li { color: #3a372f !important; }
.post__body strong { color: #1a1a1a; }
.post__body h2 { font-size: clamp(26px, 3vw, 34px); line-height: 1.14; color: #111 !important; margin: 2.1em 0 .6em; scroll-margin-top: 84px; max-width: none; }
.post__body > h2:first-child { margin-top: 0; }
.post__body h3 { font: 800 20px/1.3 var(--sans); color: #111 !important; margin: 1.8em 0 .5em; }
.post__body a, .post__body .has-link-color a { color: var(--gold-dk) !important; font-weight: 700; text-underline-offset: 3px; }
.post__body ul, .post__body ol { padding-left: 1.3em; }
.post__body li { margin: 0 0 .5em; }
.post__body img { border-radius: 10px; height: auto; }
.post__body figure { margin-inline: 0; }
.post__body figcaption { font-size: 14px; color: var(--muted-dk) !important; margin-top: 6px; }
.post__body blockquote { border-left: 3px solid var(--gold); padding: 4px 0 4px 18px; margin-left: 0; }
.post__body table { width: 100%; border-collapse: collapse; font-size: 16px; display: block; overflow-x: auto; }
.post__body th, .post__body td { border-bottom: 1px solid #d9d1c2; padding: 8px 10px; text-align: left; }

.toc { background: var(--paper-2); border: 1px solid #d9d1c2; border-radius: 12px; padding: 4px 20px; margin: 0 0 2em; font-size: 16px; line-height: 1.4; }
.toc summary { cursor: pointer; list-style: none; padding: 14px 0; font: 600 12px/1.3 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--gold-dk); }
.toc summary::-webkit-details-marker { display: none; }
.toc ol { margin: 0 0 14px; padding-left: 1.4em; }
.toc li { margin: 0; }
.toc li { padding: 6px 0; }
.toc a { display: inline; padding: 0; font-weight: 600; color: #1a1a1a !important; text-decoration: none; }
.toc a:hover { text-decoration: underline; }

/* mid-article card */
.cta { background: var(--card); color: var(--cream); border: 1px solid #34302a; border-radius: 14px; padding: 24px; margin: 2.2em 0; display: grid; gap: 10px; line-height: 1.4; }
.post__body .cta .cta__title { font: 400 24px/1.1 var(--serif); color: #fff !important; margin: 0; max-width: none; }
.post__body .cta .cta__text { margin: 0; font-size: 16px; color: var(--paper-2) !important; }
.cta__btns { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 6px; }
.cta__btns .btn { flex: 1 1 200px; }
.cta__btns svg { width: 18px; height: 18px; fill: currentColor; }
.post__body .cta .btn--gold { color: #111 !important; }
.post__body .cta .btn--line { color: var(--cream) !important; }
.post__body .cta a { font-weight: 800; text-decoration: none; }

/* related service box */
.svcbox { background: #fff; border: 1px solid #d9d1c2; border-radius: 14px; padding: 22px 24px; margin: 2.4em 0 0; display: grid; gap: 6px; justify-items: start; line-height: 1.45; }
.svcbox .eyebrow { margin: 0; }
.svcbox__title { font: 400 26px/1.1 var(--serif); color: #111; margin: 0; }
.svcbox__text { margin: 0 0 8px; font-size: 16px; color: var(--muted-dk) !important; }
.post__body .svcbox .btn--gold { color: #111 !important; text-decoration: none; }

/* end lead card + related posts */
.post__end { border-top: 1px solid var(--line); }
.post__end .lead { margin: 0 auto; max-width: 640px; }
.related h2 { font-size: clamp(28px, 3.4vw, 40px); margin: 10px 0 var(--head-gap); color: #fff; }
.related { border-top: 1px solid var(--line); }
.post__end + .related { padding-top: var(--sec-y); }

/* ---------- task 841: checklists, numbered steps, pull-quotes and callouts in post bodies.
   Plain core blocks pick this up automatically: every bulleted list is a checklist, every numbered
   list a step list, every Quote / Pullquote a pull-quote. Add the class "callout" (Advanced >
   Additional CSS class) to a Paragraph or Group to make it a callout box. Icon: Phosphor Light check-circle. */
.post__body ul:not(.toc *, .cta *, .svcbox *, .link-cards__grid) { list-style: none; padding: 0; display: grid; gap: 10px; }
.post__body ul:not(.link-cards__grid) > li { position: relative; margin: 0; padding: 14px 16px 14px 52px; background: #fff; border: 1px solid #e3dccf; border-radius: 12px; line-height: 1.5; }
.post__body ul:not(.link-cards__grid) > li::before { content: ""; position: absolute; left: 16px; top: 14px; width: 24px; height: 24px; background: var(--gold-dk); -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 256 256%22%3E%3Cpath d=%22M172.24,99.76a6,6,0,0,1,0,8.48l-56,56a6,6,0,0,1-8.48,0l-24-24a6,6,0,0,1,8.48-8.48L112,151.51l51.76-51.75A6,6,0,0,1,172.24,99.76ZM230,128A102,102,0,1,1,128,26,102.12,102.12,0,0,1,230,128Zm-12,0a90,90,0,1,0-90,90A90.1,90.1,0,0,0,218,128Z%22/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 256 256%22%3E%3Cpath d=%22M172.24,99.76a6,6,0,0,1,0,8.48l-56,56a6,6,0,0,1-8.48,0l-24-24a6,6,0,0,1,8.48-8.48L112,151.51l51.76-51.75A6,6,0,0,1,172.24,99.76ZM230,128A102,102,0,1,1,128,26,102.12,102.12,0,0,1,230,128Zm-12,0a90,90,0,1,0-90,90A90.1,90.1,0,0,0,218,128Z%22/%3E%3C/svg%3E") center / contain no-repeat; }
.post__body ol:not(.toc *, .cta *, .svcbox *) { list-style: none; padding: 0; counter-reset: st; display: grid; gap: 0; }
.post__body ol:not(.toc *, .cta *, .svcbox *) > li { counter-increment: st; position: relative; margin: 0; padding: 0 0 20px 56px; }
.post__body ol:not(.toc *, .cta *, .svcbox *) > li::before { content: counter(st, decimal-leading-zero); position: absolute; left: 0; top: -2px; display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; box-shadow: inset 0 0 0 1.5px var(--gold-dk); font: 600 12px/1 var(--mono); letter-spacing: .06em; color: var(--gold-dk); background: var(--paper); }
.post__body ol:not(.toc *, .cta *, .svcbox *) > li:not(:last-child)::after { content: ""; position: absolute; left: 19px; top: 40px; bottom: 2px; width: 1px; background: #d9d1c2; }
.post__body blockquote, .post__body .wp-block-pullquote { position: relative; margin: 2em 0; padding: 26px 28px 26px 30px; border: 0; border-left: 3px solid var(--gold); border-radius: 0 14px 14px 0; background: #fff; text-align: left; }
.post__body blockquote p, .post__body .wp-block-pullquote p { margin: 0; font: 400 clamp(22px, 2.4vw, 27px)/1.3 var(--serif); color: #111 !important; }
.post__body blockquote cite, .post__body .wp-block-pullquote cite { display: block; margin-top: 12px; font: 600 12px/1.3 var(--mono); letter-spacing: .06em; text-transform: uppercase; font-style: normal; color: var(--muted-dk); }
.post__body .callout { margin: 2em 0; padding: 20px 22px; background: rgba(201, 168, 76, .16); border: 1px solid rgba(122, 90, 16, .25); border-radius: 14px; }
.post__body .callout > :last-child { margin-bottom: 0; }
.post__body p.callout { font-size: 17px; }

@media (max-width: 1080px) {
	.bgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
	.bgrid { grid-template-columns: 1fr; }
	.bhead__lede { font-size: 16px; }
	.post__body { font-size: 17px; line-height: 1.68; }
	.post__top { padding-bottom: 20px; }
	.post__img { border-radius: 10px; }
	.cta { padding: 20px; }
	.svcbox { padding: 20px; }
	.svcbox .btn { width: 100%; }
	.bcard__title { font-size: 21px; }
}

/* task 870: visual audit fixes */
/* space between a list and the paragraph after it */
.post__body :is(ul, ol) + p { margin-top: 1.4em; }
/* phone tables: scroll sideways instead of breaking words mid-word */
.post__body th, .post__body td { min-width: 8.5em; overflow-wrap: normal; word-break: normal; hyphens: manual; }
/* headings in older posts carry the legacy foreground color class */
.post__body :is(h2, h3).has-foreground-color { color: #111 !important; }
/* legacy "link cards" block inside a post (Related): title, line, cue as one card, not a checklist row */
.post__body .link-cards { margin: 0 0 2em; }
.post__body .link-cards__grid { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr)); gap: 12px; }
.post__body .link-cards__card { margin: 0; padding: 0; background: none; border: 0; }
.post__body .link-cards__inner { display: grid; gap: 6px; height: 100%; padding: 18px 20px; background: #fff; border: 1px solid #e3dccf; border-radius: 12px; text-decoration: none !important; font-weight: 400 !important; }
.post__body .link-cards__body { display: grid; gap: 6px; }
.post__body .link-cards__title { font: 400 21px/1.2 var(--serif); color: #111; }
.post__body .link-cards__desc { font-size: 15px; color: var(--muted-dk); }
.post__body .link-cards__cue { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; font-size: 14px; color: var(--gold-dk); }
.post__body .link-cards__inner:hover { border-color: var(--gold-dk); }
