/* =========================================================================
   Prose — styling for the_content() output.

   The theme has no other long-form styles: main.css's reset kills list markers
   globally (ul { list-style: none }) and leaves h3+ with no size at all, so
   every element a post or a legal page can contain is set here.

   Loaded on single posts and on the Privacy / Terms templates (inc/setup.php).
   Split out of single.css when those pages needed it.

   ponytail: belongs in main.css; separate only while that file is being
   written concurrently by another agent.
   ========================================================================= */

:root {
	/* The reading measure. Figma sets the article column to 780px with an 80px
	   right gutter, leaving 700px of text. */
	--prose: 700px;
}

/* ---- Prose: the_content() output ---------------------------------------- */
/* .prose spans the full measure and each child is held to the reading width,
   so a block marked "wide" in the editor widens instead of needing negative
   margins. Figma's article column is left-aligned only because the case-report
   sidebar sits to its right; with no sidebar the measure is centred.

   Every rule uses margin-top alone, never the margin shorthand, so the
   margin-inline: auto that centres each child survives. */
.prose {
	font-size: clamp(1rem, 1.042vw, 1.125rem);       /* 18px @1728 */
	line-height: 1.56;                                /* 28.08px @18px */
	font-weight: 500;
	color: var(--c-body);
}

.prose > * {
	max-width: var(--prose);
	margin-inline: auto;
}

/* Editor width controls. `alignfull` keeps the container gutters — nothing in
   this template is edge-to-edge. */
.prose > .alignwide { max-width: var(--container); }
.prose > .alignfull { max-width: none; }

.prose > :first-child { margin-top: 0; }

.prose h2,
.prose h3,
.prose h4 {
	margin-bottom: 0;
	font-weight: 700;
	color: var(--c-ink);
}

.prose h2 {
	margin-top: 40px;
	font-size: clamp(1.5rem, 1.852vw, 2rem);         /* 32px @1728 */
	line-height: 1.24;                                /* 39.68px @32px */
	letter-spacing: -0.015em;
}

.prose h3 {
	margin-top: var(--s-32);
	font-size: clamp(1.125rem, 1.157vw, 1.25rem);    /* 20px @1728 */
	line-height: 1.42;                                /* 28.4px @20px */
	letter-spacing: -0.015em;
}

.prose h4 {
	margin-top: var(--s-24);
	font-size: clamp(1rem, 1.042vw, 1.125rem);
	line-height: 1.56;
	letter-spacing: -0.01em;
}

.prose p { margin-top: 12px; }

/* Figma opens a section with 16px under the h2 and 12px under an h3. */
.prose h2 + p { margin-top: var(--s-16); }

.prose ul,
.prose ol {
	margin-top: var(--s-24);
	padding-left: 25px;
}

/* main.css strips list markers globally (ul { list-style: none }), so prose
   has to put them back — and give ol the same treatment for consistency. */
.prose ul { list-style: disc; }
.prose ol { list-style: decimal; }

.prose li + li { margin-top: 12px; }
.prose li > ul,
.prose li > ol { margin-top: 12px; }

.prose blockquote {
	margin-top: 46px;
	padding-inline: var(--s-24) 0;
	border-left: 4px solid var(--c-blue-bright);
	font-size: clamp(1.25rem, 1.273vw, 1.375rem);    /* 22px @1728 */
	line-height: 1.64;                                /* 36.08px @22px */
	font-weight: 700;
	color: var(--c-ink);
}

.prose blockquote > * { margin-top: 0; }
.prose blockquote > * + * { margin-top: 12px; }
.prose blockquote cite {
	display: block;
	font-size: var(--fs-body);
	font-weight: 500;
	font-style: normal;
	color: var(--c-body);
}

/* main.css sets a { text-decoration: none } for nav and buttons; inside body
   copy a link has to be visible without relying on colour alone. */
.prose a {
	color: var(--c-accent);
	text-decoration: underline;
	text-underline-offset: 2px;
}

.prose a:hover { color: var(--c-accent-ink); }

.prose strong,
.prose b { font-weight: 700; color: var(--c-ink); }

.prose figure,
.prose img,
.prose .wp-block-image,
.prose .wp-block-embed { margin-top: var(--s-32); }

.prose figure > * { margin-top: 0; }
.prose img { border-radius: 20px; }

.prose figcaption {
	margin-top: 12px;
	font-size: var(--fs-small);
	line-height: 1.5;
	font-weight: 500;
	color: var(--c-muted);
	text-align: center;
}

.prose hr {
	margin-top: var(--s-48);
	border: 0;
	border-top: 1px solid var(--c-line);
}

/* Wide tables scroll inside their own box rather than widening the page. */
.prose .wp-block-table,
.prose figure.wp-block-table { overflow-x: auto; }

.prose table {
	width: 100%;
	margin-top: var(--s-32);
	border-collapse: collapse;
	font-size: var(--fs-body);
	line-height: 1.5;
}

.prose th,
.prose td {
	padding: 12px 16px;
	border: 1px solid var(--c-line);
	text-align: left;
	vertical-align: top;
}

.prose th {
	font-weight: 700;
	color: var(--c-ink);
	background: var(--c-ice);
}

.prose code {
	padding: 2px 6px;
	font-size: 0.9em;
	border-radius: 4px;
	background: var(--c-ice);
	color: var(--c-ink);
}

.prose pre {
	margin-top: var(--s-24);
	padding: var(--s-24);
	overflow-x: auto;
	border-radius: var(--radius-2);
	background: var(--c-ice);
}

.prose pre code { padding: 0; background: none; }

/* ---- Responsive --------------------------------------------------------- */
@media (max-width: 900px) {
	.prose blockquote { padding-inline: var(--s-16) 0; }
}
