/**
 * Staged-disclosure rows for the long-form explanatory sections.
 *
 * Replaces the uniform three-column grid these sections used to be. Each item is
 * one row: number, heading, opening sentence, and a disclosure control. The
 * remainder of the paragraph sits inside a native <details> — still in the DOM,
 * still crawlable, still citable by an answer engine. That constraint is the
 * whole reason this is <details> and not a script that swaps text in and out.
 *
 * Scoped to [data-depthlist] so it can be reused by the other renderers that
 * emit the same shape without touching anything else on the page.
 */

[data-depthlist] [data-depthrow] {
	border-bottom: 1px solid rgba(8, 13, 16, 0.1);
}

[data-depthlist] summary[data-depthsum] {
	list-style: none;
	cursor: pointer;
}

/* Safari draws its own triangle without this. */
[data-depthlist] summary[data-depthsum]::-webkit-details-marker {
	display: none;
}

[data-depthlist] [data-depthsum] {
	display: grid;
	grid-template-columns: 56px minmax(0, 1fr) 104px;
	gap: clamp(14px, 2vw, 28px);
	align-items: baseline;
	/* 22px top and bottom puts the row well past the 44px touch minimum. */
	padding: 22px 0;
}

[data-depthlist] summary[data-depthsum]:focus-visible {
	outline: 2px solid #0057FF;
	outline-offset: 4px;
}

[data-depthlist] [data-depthnum] {
	font-family: 'Albert Sans', system-ui, sans-serif;
	font-size: 13px;
	font-weight: 600;
	letter-spacing: 0.14em;
	color: #0057FF;
}

[data-depthlist] [data-depthtext] {
	min-width: 0;
}

/*
 * The heading runs INLINE with the opening sentence, so the row reads as one
 * line of prose rather than a stacked card. It is still an <h3>: the document
 * outline these pages rely on is unchanged.
 */
[data-depthlist] [data-depthhead] {
	display: inline;
	margin: 0;
	font-family: 'Bricolage Grotesque', system-ui, sans-serif;
	font-weight: 440;
	font-size: clamp(18px, 1.5vw, 22px);
	line-height: 1.3;
	letter-spacing: -0.018em;
	color: #080D10;
}

[data-depthlist] [data-depthhead]::after {
	content: ' ';
}

[data-depthlist] [data-depthlede] {
	font-family: 'Albert Sans', system-ui, sans-serif;
	font-size: clamp(15.5px, 1.2vw, 16.5px);
	line-height: 1.6;
	color: #4A5464;
}

[data-depthlist] [data-depthmore] {
	justify-self: end;
	display: inline-flex;
	align-items: center;
	gap: 8px;
	font-family: 'Albert Sans', system-ui, sans-serif;
	font-size: 12.5px;
	font-weight: 600;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: #5B6775;
	white-space: nowrap;
}

[data-depthlist] [data-depthrow][open] [data-depthmore] {
	color: #0057FF;
}

[data-depthlist] [data-depthchev] {
	display: inline-block;
	font-size: 15px;
	transition: transform .3s cubic-bezier(.16, 1, .3, 1);
}

[data-depthlist] [data-depthrow][open] [data-depthchev] {
	transform: rotate(90deg);
}

[data-depthlist] [data-depthrest] {
	margin: 0 104px 24px 70px;
	max-width: 74ch;
	font-family: 'Albert Sans', system-ui, sans-serif;
	font-size: clamp(15.5px, 1.2vw, 16.5px);
	line-height: 1.7;
	color: #4A5464;
}

/*
 * Phones. The number moves above the text rather than holding a column of its
 * own — at 390px a 56px gutter costs a seventh of the line and pushes the copy
 * to a measure that wraps badly.
 */
@media (max-width: 680px) {

	[data-depthlist] [data-depthsum] {
		grid-template-columns: minmax(0, 1fr) auto;
		grid-template-areas:
			"num  more"
			"text text";
		gap: 8px 12px;
		padding: 18px 0;
	}

	[data-depthlist] [data-depthnum] { grid-area: num; }
	[data-depthlist] [data-depthtext] { grid-area: text; }
	[data-depthlist] [data-depthmore] { grid-area: more; }

	[data-depthlist] [data-depthrest] {
		margin: 0 0 20px;
	}
}

@media (prefers-reduced-motion: reduce) {

	[data-depthlist] [data-depthchev] {
		transition: none;
	}
}
