body.single .ca-entry__content, body.page .ca-entry__content { font-family: "Source Serif 4", Georgia, serif; }

/* Queenslanders — article & page design (single/page/archive). */

.ca-entry { background: #fff; }

.ca-entry__hero {
	background: linear-gradient(160deg, var(--ca-sea, #2E6E64) 0%, var(--ca-sea-deep, #2E2A4F) 90%);
	color: #fff;
	padding-block: 64px 56px;
}
.ca-entry__hero-inner { max-width: 780px; }
.ca-entry__cat {
	display: inline-block;
	font-family: "Space Grotesk", system-ui, sans-serif;
		font-size: 0.75rem;
	font-weight: 800;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--ca-sea-deep, #2E2A4F);
	background: var(--ca-gold, #E7B368);
	padding: 6px 14px;
	border-radius: 999px;
	text-decoration: none;
	margin-bottom: 18px;
}
.ca-entry__title {
	font-family: "Space Grotesk", system-ui, sans-serif;
		font-weight: 800;
	font-size: clamp(1.8rem, 4vw, 2.8rem);
	line-height: 1.12;
	letter-spacing: -0.015em;
	color: #fff;
	margin: 0 0 18px;
}
.ca-entry__meta {
	display: flex;
	flex-wrap: wrap;
	gap: 18px;
	font-size: 0.9rem;
	color: rgba(255, 255, 255, 0.8);
}
.ca-entry__updated { color: var(--ca-gold, #E7B368); font-weight: 700; }

.ca-entry__media { margin-top: -28px; }
.ca-entry__media img {
	display: block;
	width: 100%;
	height: auto;
	border-radius: 14px;
	box-shadow: 0 24px 60px rgba(31, 28, 56, 0.3);
}

.ca-entry__content {
	max-width: 780px;
	padding-block: 48px 8px;
	font-size: 1.1rem;
	line-height: 1.75;
	color: #2B2838;
}
.ca-entry__content h2 {
	font-family: "Space Grotesk", system-ui, sans-serif;
		font-weight: 750;
	font-size: 1.55rem;
	margin: 44px 0 16px;
	color: #2E2A4F;
}
.ca-entry__content h3 { font-family: "Space Grotesk", sans-serif; font-stretch: 118%; font-weight: 700; font-size: 1.25rem; margin: 34px 0 12px; }
.ca-entry__content p { margin: 0 0 20px; }
.ca-entry__content a { color: var(--ca-teal-dark, #2C6657); font-weight: 600; }
.ca-entry__content ul, .ca-entry__content ol { margin: 0 0 22px; padding-left: 26px; }
.ca-entry__content li { margin-bottom: 8px; }
.ca-entry__content blockquote {
	margin: 28px 0;
	padding: 18px 24px;
	border-left: 4px solid var(--ca-gold, #E7B368);
	background: var(--ca-warm, #EEF4F0);
	border-radius: 0 10px 10px 0;
	font-style: normal;
}
.ca-entry__content table { width: 100%; border-collapse: collapse; margin: 26px 0; font-size: 0.98rem; }
.ca-entry__content th { background: var(--ca-sea-deep, #2E2A4F); color: #fff; text-align: left; padding: 12px 14px; font-family: "Space Grotesk", sans-serif; }
.ca-entry__content td { padding: 12px 14px; border-bottom: 1px solid #ddd8ef; }
.ca-entry__content tr:nth-child(even) td { background: #f7f5fc; }
.ca-entry__content img { max-width: 100%; height: auto; border-radius: 10px; }

.ca-entry__reviewed {
	display: flex;
	gap: 14px;
	align-items: flex-start;
	max-width: 780px;
	margin: 36px auto 0;
	padding: 18px 22px;
	background: var(--ca-warm, #EEF4F0);
	border: 1px solid #ddd8ef;
	border-radius: 12px;
	font-size: 0.94rem;
	color: #4a4560;
}
.ca-entry__reviewed p { margin: 0; }
.ca-entry__reviewed-dot {
	flex: none;
	width: 10px; height: 10px;
	margin-top: 6px;
	border-radius: 50%;
	background: #5FCFAD;
	box-shadow: 0 0 0 4px rgba(95, 207, 173, 0.2);
}

.ca-entry__nav {
	display: flex;
	justify-content: space-between;
	gap: 20px;
	max-width: 780px;
	margin: 32px auto 64px;
	font-family: "Space Grotesk", sans-serif;
	font-weight: 700;
}
.ca-entry__nav a { color: var(--ca-teal-dark, #2C6657); text-decoration: none; }
.ca-entry__nav a:hover { text-decoration: underline; }
.ca-entry__next { margin-left: auto; text-align: right; }

/* Archive / blog listing reuse card grid */
.ca-archive { padding-block: 56px 72px; background: #fff; }
.ca-archive__head { max-width: 1160px; margin: 0 auto 34px; padding-inline: 24px; }
.ca-archive__title {
	font-family: "Space Grotesk", system-ui, sans-serif;
		font-weight: 800;
	font-size: clamp(1.7rem, 3.4vw, 2.4rem);
	color: #2E2A4F;
	margin: 0;
}

@media (max-width: 700px) {
	.ca-entry__hero { padding-block: 48px 40px; }
	.ca-entry__content { font-size: 1.04rem; }
}

/* ==== Cooperate with the pipeline article layout (reference: benefitsfreeq) ====
   Single posts render inside the pipeline's content+rail grid. The hero and
   media live in the content column as boxed cards — designed for column
   width, not full-bleed. */
.single .ca-entry__hero,
.page .ca-entry__hero {
	border-radius: 16px;
	margin: 28px auto 0;
	max-width: 1160px;
}
.single .ca-entry__hero-inner { max-width: 100%; padding-inline: 8px; }
.single .ca-entry__media { margin-top: 20px; }
.single .ca-entry__media img { box-shadow: 0 16px 44px rgba(0, 0, 0, 0.18); }

/* ==== Single-post geometry: match the working reference exactly ====
   The pipeline's article content box is ~760-820px and fills its
   container (it never self-centers). The scrollspy rail is fixed to the
   viewport edge and takes no layout space. So the single-post container
   must BE the content column: one narrow centered column, everything
   inside it. */
body.single .site-main,
body.page .site-main {
	max-width: 820px !important;
	margin-left: auto !important;
	margin-right: auto !important;
	padding-inline: 20px;
}
body.single .ca-entry__hero,
body.page .ca-entry__hero {
	max-width: 100%;
	margin-top: 24px;
	padding: 40px 32px;
}
body.single .ca-entry__title { font-size: clamp(1.6rem, 3.2vw, 2.2rem); }
body.single .ca-entry__hero-inner { padding-inline: 0; }
body.single .ca-wrap,
body.page .ca-wrap { padding-inline: 0; }
body.single .ca-entry__media img { max-width: 100%; height: auto; }
body.single .ca-entry__content { padding-inline: 0; }

/* ==== v1.2.2 THE FIX: constrain OUR OWN main element ====
   Previous fix targeted GP's .site-main — which our templates never
   render (single.php outputs its own <main>). This targets the element
   that actually exists. */
body.single main.ca-entry,
body.page main.ca-entry {
	display: block;
	max-width: 860px !important;
	margin-left: auto !important;
	margin-right: auto !important;
	padding: 0 20px !important;
	overflow-x: clip;
}
body.single main.ca-entry .ca-entry__hero { max-width: 100%; }

/* byline */
.ca-entry__byline{font-weight:600}
.ca-entry__meta{display:flex;flex-wrap:wrap;gap:14px;align-items:center}


/* ==================== Mobile overflow hardening ====================
   Sideways scroll on a phone is almost never the visible element's fault —
   it comes from boxes that refuse to shrink. The four real causes, fixed:
     1. grid/flex children default to min-width:auto, so a `1fr` track will
        not go narrower than its widest child (a table, embed, or long URL);
     2. tables ignore `width: 100%` and expand to their min-content width;
     3. unbreakable strings (citation URLs) cannot wrap;
     4. embeds arrive with hardcoded width attributes. */

/* 1. Let every layout child shrink. :where() holds specificity at zero, so
      any deliberate min-width declared elsewhere still wins. */
:where([class*="ca-"]) > * { min-width: 0; }

/* 2. Wide tables scroll inside their own box instead of widening the page.
      The wrapper element is added by ca_wrap_content_tables(). */
.ca-tablewrap {
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
	margin: 26px 0;
	max-width: 100%;
}
.ca-tablewrap > table { margin: 0; }
.ca-tablewrap:focus-visible { outline: 3px solid var(--ca-peri); outline-offset: 3px; }
@media (max-width: 700px) {
	/* Squeezing a data table this narrow makes it unreadable — give it room
	   and let the wrapper scroll instead. */
	.ca-tablewrap > table { min-width: 520px; }
}

/* 3. Long unbroken strings break instead of pushing the page wide.
      `anywhere` is required, not `break-word`: only `anywhere` also reduces
      the element's intrinsic min-content width, which is what overflows. */
.ca-entry__content { overflow-wrap: anywhere; }

/* 4. Embeds and preformatted blocks stay inside the column. */
.ca-entry__content :is(iframe, video, embed, object, canvas, svg) { max-width: 100%; }
.ca-entry__content pre { overflow-x: auto; max-width: 100%; }

/* Safety net, deliberately last: catches anything still stray. `clip` is used
   instead of `hidden` on purpose — `hidden` creates a scroll container and
   would break the sticky header and the sticky article rail. */
html, body { overflow-x: clip; }
