/*
Blog styles for the SA Business Advisor theme.

Loaded only on post views (single, home, archive, search) via
sba_enqueue_blog_assets(). Colour and type tokens come from theme.json
presets, so nothing here hardcodes a brand value.
*/

:root {
	--sba-radius-sm: 12px;
	--sba-shadow-lg: 0 18px 40px rgba(0, 58, 76, .14);
	--sba-ease: cubic-bezier(.16, 1, .3, 1);
	/* Sticky header height. Anything that pins below the header offsets by this. */
	--sba-header-h: 84px;
}

@media (max-width: 781px) {
	:root { --sba-header-h: 76px; }
}

/* ------------------------------------------------------------ Small parts */

.sba-chip,
.doc-topics a,
.topic-chips a,
.cover-topics a {
	display: inline-flex;
	align-items: center;
	padding: 5px 12px;
	border-radius: 999px;
	border: 1px solid var(--wp--preset--color--teal-100);
	background: var(--wp--preset--color--teal-50);
	color: var(--wp--preset--color--teal-700);
	font-family: Quicksand, sans-serif;
	font-size: 12.5px;
	font-weight: 700;
	letter-spacing: .02em;
	line-height: 1.4;
	text-decoration: none;
	transition: background .18s var(--sba-ease), border-color .18s var(--sba-ease), color .18s var(--sba-ease);
}

.doc-topics a:hover,
.topic-chips a:hover,
.cover-topics a:hover {
	background: var(--wp--preset--color--teal-100);
	border-color: var(--wp--preset--color--teal-300);
	color: var(--wp--preset--color--teal-700);
}

.sba-meta,
.sba-meta time,
.card-foot .wp-block-post-date,
.card-foot .wp-block-post-author-name {
	font-family: 'IBM Plex Mono', monospace;
	font-size: 13.5px;
	color: var(--wp--preset--color--fg3);
	letter-spacing: -.01em;
}

.sba-breadcrumbs {
	font-size: 13.5px;
	color: var(--wp--preset--color--fg3);
}
.sba-breadcrumbs ol {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
	list-style: none;
	margin: 0;
	padding: 0;
}
.sba-breadcrumbs li { display: flex; align-items: center; gap: 8px; }
.sba-breadcrumbs li + li::before { content: "/"; color: var(--wp--preset--color--teal-300); }
.sba-breadcrumbs a { color: var(--wp--preset--color--teal-700); text-decoration: none; }
.sba-breadcrumbs a:hover { text-decoration: underline; }
.sba-breadcrumbs [aria-current="page"] { color: var(--wp--preset--color--fg2); }

/* Reading progress. Scroll-driven CSS animation, so no scroll listener and
   no layout thrash. Hidden entirely where the timeline is unsupported. */
.post-progress { display: none; }
@supports (animation-timeline: scroll()) {
	.post-progress {
		display: block;
		position: fixed;
		inset: var(--sba-header-h) 0 auto 0;
		height: 3px;
		z-index: 99;
		background: var(--wp--preset--color--brand-teal);
		transform-origin: 0 50%;
		animation: sba-progress linear both;
		animation-timeline: scroll(root block);
	}
	@keyframes sba-progress {
		from { transform: scaleX(0); }
		to { transform: scaleX(1); }
	}
}

/* ======================================================= Archive / hub ==== */

.blog-hub { background: var(--wp--preset--color--canvas); }

/* Core's flow layout hands every child a 24px block margin. The containers
   below lay their children out on a grid, so that margin has to go. */
.start-here > *,
.hub-grid > li,
.related-grid > li,
.post-layout > *,
.post-rail > * { margin-block: 0; }

.hub-head h1,
.hub-head .wp-block-query-title {
	max-width: 18ch;
	margin: 16px 0 0;
}
.hub-lede {
	max-width: 58ch;
	margin-top: 14px;
	color: var(--wp--preset--color--fg2);
	font-size: 1.05rem;
	line-height: 1.62;
}

/* Search and topic filters pin under the header so they stay reachable as
   the list gets long. */
.hub-toolbar {
	position: sticky;
	top: var(--sba-header-h);
	z-index: 60;
	background: var(--wp--preset--color--canvas);
	border-bottom: 1px solid var(--wp--preset--color--line);
}
.admin-bar .hub-toolbar { top: calc(var(--sba-header-h) + 32px); }
@media (max-width: 782px) {
	.admin-bar .hub-toolbar { top: calc(var(--sba-header-h) + 46px); }
}

.hub-search { max-width: 460px; }
.hub-search .wp-block-search__label {
	display: block;
	margin-bottom: 6px;
	font-family: Quicksand, sans-serif;
	font-size: 13px;
	font-weight: 700;
	color: var(--wp--preset--color--fg1);
}
.hub-search .wp-block-search__inside-wrapper {
	border: 1px solid var(--wp--preset--color--line);
	border-radius: var(--sba-radius-sm);
	background: #fff;
	padding: 4px 4px 4px 0;
}
.hub-search .wp-block-search__input {
	border: 0;
	background: transparent;
	padding: 10px 16px;
	font-family: Mulish, sans-serif;
	font-size: 15.5px;
	color: var(--wp--preset--color--fg1);
}
.hub-search .wp-block-search__input:focus { outline: none; }
.hub-search .wp-block-search__inside-wrapper:focus-within { border-color: var(--wp--preset--color--brand-teal); }
.hub-search .wp-block-search__input::placeholder { color: var(--wp--preset--color--fg3); }
.hub-search .wp-block-search__button {
	border: 0;
	border-radius: 999px;
	padding: 9px 20px;
	background: var(--wp--preset--color--brand-navy);
	color: #fff;
	font-family: Quicksand, sans-serif;
	font-weight: 700;
	font-size: 14px;
	cursor: pointer;
	transition: background .18s var(--sba-ease);
}
.hub-search .wp-block-search__button:hover { background: var(--wp--preset--color--teal-700); }

.topic-chips {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
	list-style: none;
	margin: 0;
	padding: 0;
}
.topic-chips li { display: flex; }
.topic-chips .cat-item-all a,
.topic-chips .current-cat > a {
	background: var(--wp--preset--color--brand-navy);
	border-color: var(--wp--preset--color--brand-navy);
	color: #fff;
}
.topic-chips .cat-item-all.is-current a,
.topic-chips .current-cat > a:hover {
	background: var(--wp--preset--color--brand-navy);
	border-color: var(--wp--preset--color--brand-navy);
	color: #fff;
}
/* "All topics" only reads as selected on the unfiltered index. */
.topic-chips .cat-item-all:not(.is-current) a {
	background: var(--wp--preset--color--teal-50);
	border-color: var(--wp--preset--color--teal-100);
	color: var(--wp--preset--color--teal-700);
}
.topic-chips-label {
	font-family: Quicksand, sans-serif;
	font-size: 13px;
	font-weight: 700;
	color: var(--wp--preset--color--fg3);
	margin: 0;
}

/* Cornerstone cluster. The internal links we most want crawled and cited,
   so it sits above the feed rather than in a sidebar. */
.start-here {
	display: grid;
	grid-template-columns: .85fr 1.15fr;
	gap: 40px;
	border-radius: var(--sba-radius);
	padding: 38px 40px;
}
.start-here h2 { color: #fff; font-size: 1.55rem; line-height: 1.2; margin: 0; }
.start-here p { color: var(--wp--preset--color--teal-100); font-size: 15.5px; line-height: 1.6; margin-top: 12px; }
.start-list { list-style: none; margin: 0; padding: 0; counter-reset: sh; }
.start-list li { counter-increment: sh; }
.start-list li + li { border-top: 1px solid rgba(255, 255, 255, .14); }
.start-list a {
	display: grid;
	grid-template-columns: 30px 1fr auto;
	gap: 14px;
	align-items: center;
	padding: 15px 12px;
	margin-inline: -12px;
	border-radius: var(--sba-radius-sm);
	color: #fff;
	text-decoration: none;
	font-family: Quicksand, sans-serif;
	font-weight: 600;
	font-size: 16px;
	line-height: 1.35;
	transition: background .16s var(--sba-ease);
}
.start-list a::before {
	content: counter(sh, decimal-leading-zero);
	font-family: 'IBM Plex Mono', monospace;
	font-size: 12.5px;
	font-weight: 400;
	color: var(--wp--preset--color--teal-300);
}
.start-list a::after { content: "\2192"; color: var(--wp--preset--color--teal-300); font-size: 17px; }
.start-list a:hover { background: rgba(255, 255, 255, .08); }

/* Mixed-rhythm feed: two columns of cards, with every sixth entry widening
   into a horizontal feature so a long archive never flattens into a slab. */
.hub-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 20px;
	list-style: none;
	margin: 0;
	padding: 0;
}
.hub-grid > li {
	display: flex;
	flex-direction: column;
	overflow: hidden;
	background: #fff;
	border: 1px solid var(--wp--preset--color--line);
	border-radius: var(--sba-radius);
	transition: transform .2s var(--sba-ease), box-shadow .2s var(--sba-ease), border-color .2s var(--sba-ease);
}
.hub-grid > li:hover {
	transform: translateY(-3px);
	box-shadow: var(--sba-shadow);
	border-color: var(--wp--preset--color--teal-300);
}

.doc-thumb { margin: 0; }
.doc-thumb img {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: 16 / 9;
	object-fit: cover;
}

.doc-body { flex-grow: 1; padding: 26px; }
.doc-topics { display: flex; flex-wrap: wrap; gap: 6px; }
.doc-title { font-size: 1.16rem; line-height: 1.3; margin: 0; }
.doc-title a { color: var(--wp--preset--color--fg1); text-decoration: none; }
.doc-title a:hover { color: var(--wp--preset--color--teal-700); text-decoration: underline; }
.doc-excerpt {
	flex-grow: 1;
	margin: 0;
	font-size: 15px;
	line-height: 1.6;
	color: var(--wp--preset--color--fg2);
}
.doc-excerpt p { margin: 0; }
.card-foot {
	margin-top: auto;
	padding-top: 12px;
	border-top: 1px solid var(--wp--preset--color--line);
}
.card-foot .wp-block-post-author-name a { color: inherit; text-decoration: none; }

/* Feature position: full width, image beside the text. Falls back to a wide
   text card when the post has no featured image. */
.hub-grid > li:nth-child(6n+1) {
	grid-column: 1 / -1;
	flex-direction: row;
	align-items: stretch;
}
.hub-grid > li:nth-child(6n+1) .doc-thumb { flex: 0 0 300px; }
.hub-grid > li:nth-child(6n+1) .doc-thumb img { aspect-ratio: auto; height: 100%; min-height: 210px; }
.hub-grid > li:nth-child(6n+1) .doc-body { padding: 30px 32px; justify-content: center; }
.hub-grid > li:nth-child(6n+1) .doc-title { font-size: 1.42rem; }

.hub-empty {
	text-align: center;
	background: #fff;
	border: 1px dashed var(--wp--preset--color--teal-300);
	border-radius: var(--sba-radius);
	padding: 60px 30px;
}
.hub-empty p { max-width: 42ch; margin-inline: auto; color: var(--wp--preset--color--fg2); }

.hub-pagination { justify-content: center; margin-top: 42px; }
.hub-pagination .wp-block-query-pagination-numbers,
.hub-pagination .page-numbers {
	font-family: 'IBM Plex Mono', monospace;
	font-size: 14px;
}
.hub-pagination a.page-numbers,
.hub-pagination .wp-block-query-pagination-previous,
.hub-pagination .wp-block-query-pagination-next {
	text-decoration: none;
	color: var(--wp--preset--color--teal-700);
}
.hub-pagination .page-numbers.current {
	background: var(--wp--preset--color--brand-navy);
	color: #fff;
	border-radius: 999px;
	padding: 4px 11px;
}

/* ========================================================= Single post ==== */

/* Cover hero. The core cover block supplies the featured image and the navy
   overlay; the gradient below deepens toward the baseline so the headline
   clears 7:1 no matter how bright the photograph is. */
.post-cover { margin-top: 0; }
/* Replaces the cover block's flat dim with a scrim that deepens toward the
   baseline, so the headline clears 7:1 however bright the photograph is
   while the top of the image stays visible. */
.post-cover .wp-block-cover__background.has-background-dim {
	background: linear-gradient(180deg, rgba(0, 58, 76, .55) 0%, rgba(0, 58, 76, .8) 45%, rgba(0, 58, 76, .95) 100%);
	opacity: 1;
}
.post-cover .wp-block-cover__image-background { object-position: center; }
/* Beat core's shrink-to-fit rule on positioned covers so the inner column
   matches the mockup's .wrap (full content width, not a ~540px huddle). */
.post-cover .wp-block-cover__inner-container,
.post-cover.has-custom-content-position .wp-block-cover__inner-container {
	width: 100%;
	max-width: 1180px;
}
.post-cover .cover-inner { width: 100%; }
.post-cover .wp-block-post-title { color: #fff; max-width: 20ch; margin: 20px 0 0; }
.post-cover .sba-breadcrumbs,
.post-cover .sba-breadcrumbs [aria-current="page"] { color: rgba(255, 255, 255, .72); }
.post-cover .sba-breadcrumbs a { color: var(--wp--preset--color--teal-300); }
.post-cover .sba-breadcrumbs li + li::before { color: rgba(255, 255, 255, .4); }
.post-cover .sba-meta { color: var(--wp--preset--color--teal-100); }

.cover-tags { align-items: center; }
.cover-topics { display: flex; flex-wrap: wrap; gap: 8px; }
/* Light chip on the navy cover, matching mockup C. */
.post-cover .cover-topics a {
	background: #fff;
	border-color: #fff;
	color: var(--wp--preset--color--teal-700);
}
.post-cover .cover-topics a:hover {
	background: var(--wp--preset--color--teal-50);
	border-color: var(--wp--preset--color--teal-50);
	color: var(--wp--preset--color--brand-navy);
}
.cover-updated {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 6px 14px;
	border-radius: 999px;
	border: 1px solid rgba(255, 255, 255, .24);
	background: rgba(255, 255, 255, .12);
	font-family: 'IBM Plex Mono', monospace;
	font-size: 12.5px;
	color: var(--wp--preset--color--teal-300);
}
.cover-byline .wp-block-avatar img { display: block; }
.cover-byline__text { gap: 2px; }
.cover-byline .wp-block-post-author-name {
	font-family: Quicksand, sans-serif;
	font-weight: 700;
	font-size: 15px;
	color: #fff;
	line-height: 1.2;
}
.cover-byline .wp-block-post-author-name a { color: inherit; text-decoration: none; }
.cover-byline__role {
	font-size: 13px;
	line-height: 1.3;
	color: var(--wp--preset--color--teal-100);
}
.post-cover .cover-published::before {
	content: "Published ";
}

/* Body plus sticky rail */
.post-layout {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 320px;
	gap: 68px;
	align-items: start;
}
.post-rail { position: sticky; top: calc(var(--sba-header-h) + 16px); display: grid; gap: 22px; }
.admin-bar .post-rail { top: calc(var(--sba-header-h) + 48px); }

.rail-panel {
	border: 1px solid var(--wp--preset--color--line);
	border-radius: var(--sba-radius);
	background: #fff;
	padding: 24px;
}
.rail-panel__title {
	font-family: Quicksand, sans-serif;
	font-size: .72rem;
	font-weight: 700;
	letter-spacing: .09em;
	text-transform: uppercase;
	color: var(--wp--preset--color--teal-700);
	margin: 0 0 14px;
}
.rail-panel ol { margin: 0; padding: 0; list-style: none; display: grid; gap: 2px; counter-reset: r; }
.rail-panel li { counter-increment: r; }
.rail-panel ol a {
	display: grid;
	grid-template-columns: 22px 1fr;
	gap: 8px;
	padding: 8px 10px;
	margin-inline: -10px;
	border-radius: var(--sba-radius-sm);
	font-size: 14px;
	line-height: 1.4;
	color: var(--wp--preset--color--fg2);
	text-decoration: none;
	transition: background .16s var(--sba-ease), color .16s var(--sba-ease);
}
.rail-panel ol a::before {
	content: counter(r, decimal-leading-zero);
	font-family: 'IBM Plex Mono', monospace;
	font-size: 11.5px;
	color: var(--wp--preset--color--teal-300);
	padding-top: 2px;
}
.rail-panel ol a:hover { background: var(--wp--preset--color--teal-50); color: var(--wp--preset--color--teal-700); }
.rail-panel ol a.is-current { background: var(--wp--preset--color--teal-50); color: var(--wp--preset--color--teal-700); font-weight: 700; }

.rail-cta { border-radius: var(--sba-radius); padding: 28px 26px; }
.rail-cta h2 { color: #fff; font-size: 1.16rem; line-height: 1.28; margin: 0; }
.rail-cta p { color: var(--wp--preset--color--teal-100); font-size: 14.5px; line-height: 1.6; margin-top: 10px; }
.rail-cta .wp-block-buttons { margin-top: 18px; }
.rail-cta .wp-block-button { width: 100%; }
.rail-cta .wp-block-button__link { width: 100%; }
.rail-cta .rail-assure {
	display: block;
	text-align: center;
	font-size: 12.5px;
	color: rgba(255, 255, 255, .62);
	margin-top: 12px;
}

/* -------------------------------------------------------- Article content */

.post-prose {
	max-width: 70ch;
	color: var(--wp--preset--color--fg2);
	font-size: 17.5px;
	line-height: 1.72;
}
.post-prose > * + * { margin-top: 1.35em; }
.post-prose h2 { font-size: clamp(1.5rem, 2.6vw, 1.85rem); margin-top: 2.2em; scroll-margin-top: calc(var(--sba-header-h) + 24px); }
.post-prose h3 { font-size: 1.2rem; margin-top: 1.8em; scroll-margin-top: calc(var(--sba-header-h) + 24px); }
.post-prose h2 + p, .post-prose h3 + p { margin-top: .7em; }
.post-prose ul, .post-prose ol { padding-left: 22px; }
.post-prose li + li { margin-top: 9px; }
.post-prose strong { color: var(--wp--preset--color--fg1); font-weight: 700; }
.post-prose figure { margin-block: 2.2em; }
.post-prose figure img { border-radius: var(--sba-radius); width: 100%; height: auto; }
.post-prose figcaption { margin-top: 10px; font-size: 13.5px; color: var(--wp--preset--color--fg3); }

/* Answer-first block. Sits directly under the hero so a search snippet or a
   language model can lift a complete answer without parsing the whole page.
   Named in the speakable cssSelector of the article schema. */
.post-prose .sba-answer {
	background: var(--wp--preset--color--teal-50);
	border: 1px solid var(--wp--preset--color--teal-100);
	border-left: 4px solid var(--wp--preset--color--brand-teal);
	border-radius: var(--sba-radius-sm);
	padding: 20px 24px;
	color: var(--wp--preset--color--fg1);
	font-size: 17.5px;
	line-height: 1.6;
}
.post-prose .sba-answer strong { font-family: Quicksand, sans-serif; }

.post-prose .sba-takeaways {
	background: var(--wp--preset--color--cream);
	border: 1px solid var(--wp--preset--color--line);
	border-radius: var(--sba-radius);
	padding: 26px 28px;
}
.post-prose .sba-takeaways h2,
.post-prose .sba-takeaways h3 { font-size: 1.05rem; margin: 0 0 14px; scroll-margin-top: 0; }
.post-prose .sba-takeaways ul { margin: 0; padding-left: 20px; }
.post-prose .sba-takeaways li { color: var(--wp--preset--color--fg2); }

/* Tables carry the facts that get quoted most often, so they get real
   styling rather than the browser default. */
.post-prose .wp-block-table { overflow-x: auto; }
.post-prose .wp-block-table table {
	width: 100%;
	border-collapse: collapse;
	font-size: 15.5px;
	border: 1px solid var(--wp--preset--color--line);
	border-radius: var(--sba-radius-sm);
	overflow: hidden;
}
.post-prose .wp-block-table caption {
	caption-side: top;
	text-align: left;
	font-family: Quicksand, sans-serif;
	font-weight: 700;
	font-size: 15px;
	color: var(--wp--preset--color--fg1);
	padding-bottom: 10px;
}
.post-prose .wp-block-table th,
.post-prose .wp-block-table td { padding: 13px 16px; text-align: left; border-color: var(--wp--preset--color--line); }
.post-prose .wp-block-table thead th {
	background: var(--wp--preset--color--brand-navy);
	color: #fff;
	font-family: Quicksand, sans-serif;
	font-size: 13.5px;
	letter-spacing: .02em;
}
.post-prose .wp-block-table tbody tr:nth-child(even) { background: var(--wp--preset--color--canvas); }

.post-prose .sba-figure { align-items: baseline; border-radius: var(--sba-radius); padding: 26px 28px; }
.post-prose .sba-figure__value {
	margin: 0;
	font-family: 'IBM Plex Mono', monospace;
	font-size: clamp(1.9rem, 4vw, 2.5rem);
	font-weight: 600;
	line-height: 1;
	color: var(--wp--preset--color--teal-300);
}
.post-prose .sba-figure__note { margin: 0; color: var(--wp--preset--color--teal-100); font-size: 15.5px; }

/* Primary-source citations matter more for tax and compliance writing than
   anywhere else, both for reader trust and for model grounding. */
.post-prose .sba-sources { border-top: 1px solid var(--wp--preset--color--line); padding-top: 22px; }
.post-prose .sba-sources h2 { font-size: 1rem; margin: 0 0 12px; scroll-margin-top: 0; }
.post-prose .sba-sources ol { margin: 0; padding-left: 20px; font-size: 15px; }

.post-prose blockquote.sba-pull {
	margin: 0;
	padding: 0 0 0 24px;
	border-left: 3px solid var(--wp--preset--color--brand-teal);
	font-family: Quicksand, sans-serif;
	font-size: clamp(1.2rem, 2.4vw, 1.45rem);
	font-weight: 600;
	line-height: 1.4;
	color: var(--wp--preset--color--fg1);
}
.post-prose blockquote.sba-pull p { margin: 0; }

/* Native details, so the answers exist in the DOM whether or not the panel
   is open. Collapsed-but-present is what crawlers and models need. */
.post-prose .wp-block-details {
	border: 1px solid var(--wp--preset--color--line);
	border-radius: var(--sba-radius-sm);
	background: #fff;
	padding: 0;
	transition: border-color .2s var(--sba-ease);
}
.post-prose .wp-block-details + .wp-block-details { margin-top: 10px; }
.post-prose .wp-block-details[open] { border-color: var(--wp--preset--color--teal-300); background: var(--wp--preset--color--teal-50); }
.post-prose .wp-block-details summary {
	position: relative;
	cursor: pointer;
	list-style: none;
	padding: 17px 52px 17px 20px;
	font-family: Quicksand, sans-serif;
	font-weight: 700;
	font-size: 16px;
	color: var(--wp--preset--color--fg1);
}
.post-prose .wp-block-details summary::-webkit-details-marker { display: none; }
.post-prose .wp-block-details summary::after {
	content: "";
	position: absolute;
	right: 20px;
	top: 50%;
	width: 9px;
	height: 9px;
	border-right: 2px solid var(--wp--preset--color--teal-600);
	border-bottom: 2px solid var(--wp--preset--color--teal-600);
	transform: translateY(-70%) rotate(45deg);
	transition: transform .22s var(--sba-ease);
}
.post-prose .wp-block-details[open] summary::after { transform: translateY(-30%) rotate(-135deg); }
.post-prose .wp-block-details > *:not(summary) { padding-inline: 20px; }
.post-prose .wp-block-details > *:not(summary):last-child { padding-bottom: 18px; }

.post-prose .sba-disclaimer {
	background: var(--wp--preset--color--canvas);
	border: 1px solid var(--wp--preset--color--line);
	border-radius: var(--sba-radius-sm);
	padding: 18px 22px;
	font-size: 14.5px;
	line-height: 1.6;
	color: var(--wp--preset--color--fg3);
}

/* ------------------------------------------------------------- After body */

.post-after {
	display: grid;
	gap: 32px;
	max-width: 70ch;
	margin-top: 48px;
	padding-top: 42px;
	border-top: 1px solid var(--wp--preset--color--line);
}
.post-author-card { border-radius: var(--sba-radius); padding: 26px 28px; }
.post-author-card .wp-block-avatar img { display: block; }
.post-author-card .wp-block-post-author-name { font-family: Quicksand, sans-serif; font-weight: 600; font-size: 1.05rem; }
.post-author-card .wp-block-post-author-biography { margin-top: 10px; font-size: 15px; line-height: 1.6; color: var(--wp--preset--color--fg2); }

.related-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; list-style: none; margin: 0; padding: 0; }
.related-grid > li {
	display: flex;
	flex-direction: column;
	gap: 10px;
	padding: 22px;
	background: #fff;
	border: 1px solid var(--wp--preset--color--line);
	border-radius: var(--sba-radius);
	transition: transform .2s var(--sba-ease), box-shadow .2s var(--sba-ease), border-color .2s var(--sba-ease);
}
.related-grid > li:hover { transform: translateY(-3px); box-shadow: var(--sba-shadow); border-color: var(--wp--preset--color--teal-300); }
.related-grid .wp-block-post-title { font-size: 1.02rem; line-height: 1.32; margin: 0; }
.related-grid .wp-block-post-title a { color: var(--wp--preset--color--fg1); text-decoration: none; }
.related-grid .wp-block-post-title a:hover { color: var(--wp--preset--color--teal-700); text-decoration: underline; }
.related-grid .wp-block-post-excerpt { font-size: 14.5px; line-height: 1.55; color: var(--wp--preset--color--fg2); margin: 0; }
.related-grid .wp-block-post-excerpt p { margin: 0; }

/* ------------------------------------------------------------- Responsive */

@media (max-width: 1000px) {
	.post-layout { grid-template-columns: 1fr; gap: 44px; }
	.post-prose, .post-after { max-width: none; }

	/* Dissolve the rail so its two panels become siblings of the article. A
	   contents list is only useful ahead of the reading, and the booking
	   prompt only lands once the reading is done. */
	.post-rail { display: contents; }
	.post-rail .rail-panel { order: -1; }
	.post-rail .rail-cta { order: 1; }
}

@media (max-width: 900px) {
	.start-here { grid-template-columns: 1fr; gap: 26px; padding: 30px 26px; }
	.hub-grid > li:nth-child(6n+1) { flex-direction: column; }
	.hub-grid > li:nth-child(6n+1) .doc-thumb { flex: none; }
	.related-grid { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
	.hub-grid { grid-template-columns: 1fr; }
	.hub-grid > li:nth-child(6n+1) .doc-body { padding: 24px; }
	.cover-meta { gap: 16px; }
	.post-author-card { flex-direction: column; }
	.post-prose .sba-figure { flex-direction: column; gap: 8px; }
}

@media (prefers-reduced-motion: reduce) {
	.post-progress { display: none; }
	.hub-grid > li:hover, .related-grid > li:hover { transform: none; }
}

@media print {
	.post-progress, .post-rail, .hub-toolbar { display: none; }
	.post-layout { display: block; }
}
