/* ==========================================================================
   TruckAccidentAid — guide section page (page-guide-section.php)
   Body markup: reference/section.html, prepared by taa_section_prepare().
   Body rules use direct-child selectors (.section-body > ...) so they never
   leak into CTA modules ([taa_cta]).
   ========================================================================== */

:root {
	--icon-plus: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231F45A8' stroke-width='2.2' stroke-linecap='round'%3E%3Cpath d='M12 5v14M5 12h14'/%3E%3C/svg%3E");
	--icon-download: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23FFFFFF' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 4v11M7 10.5l5 5 5-5M5 20h14'/%3E%3C/svg%3E");
	/* Full-width band with the content in the container width. */
	--band-x: max(var(--gutter), calc((100% - var(--container)) / 2 + var(--gutter)));
	--band-y: clamp(40px, 5vw, 64px);
}

/* Header
   ========================================================================== */

.section-head {
	margin-bottom: 0; /* layout.css .section-head (home section headings) has one */
	--c-muted: var(--c-manila-muted);
	--c-text-2: var(--c-manila-text);
	padding: 22px 0 clamp(36px, 5vw, 56px);
	border-bottom: 2px solid var(--c-manila-edge);
	background: var(--c-manila-2);
}

.section-head .breadcrumbs ol {
	margin-bottom: clamp(22px, 3.5vw, 36px);
}

.section-head__grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr));
	gap: clamp(28px, 5vw, 64px);
	align-items: start;
}

.section-head__eyebrow {
	display: flex;
	align-items: center;
	gap: 10px;
	margin-bottom: 14px;
	font-size: 12.5px;
}

.section-head__eyebrow::before {
	display: none;
}

.section-head__title {
	margin-bottom: 18px;
	font-size: clamp(36px, 5vw, 58px);
	line-height: 1.04;
	letter-spacing: -.02em;
}

.section-head__lead {
	margin-bottom: 24px;
	color: var(--c-text);
	font-size: clamp(17px, 1.6vw, 19px);
	line-height: 1.6;
	max-width: 34em; /* ~75 characters; em, not ch: ch follows the width of "0" and varies by font */
}

.section-head__nav {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.section-head__nav a {
	display: inline-flex;
	align-items: center;
	min-height: 38px;
	padding: 8px 14px;
	border: 1px solid var(--c-line);
	border-radius: var(--radius-lg);
	color: var(--c-ink);
	font-size: 14px;
	text-decoration: none;
}

.section-head__nav a:hover {
	border-color: var(--c-green);
	color: var(--c-green);
}

/* At a glance */
.glance {
	overflow: hidden;
	border: 1.5px solid var(--c-ink);
	border-radius: var(--radius-lg);
	background: var(--c-surface);
}

.glance > :not(.glance__label) {
	margin-right: 22px;
	margin-left: 22px;
}

.glance__label {
	display: flex;
	align-items: center;
	gap: 10px;
	margin: 0 0 20px;
	padding: 11px 20px;
	background: var(--c-ink);
	color: var(--c-on-dark);
	font-family: var(--f-sans);
	font-weight: 700;
	font-size: 12px;
	letter-spacing: .05em;
	text-transform: uppercase;
}

.glance__label::before {
	content: "";
	width: 8px;
	height: 8px;
	background: var(--c-orange);
	transform: rotate(45deg);
}

.glance h2 {
	margin-bottom: 12px;
	font-size: 23px;
}

.glance ol {
	margin-bottom: 18px;
	padding: 0;
	list-style: none;
}

.glance li {
	display: flex;
	gap: 14px;
	padding: 10px 0;
	border-top: 1px solid var(--c-line-2);
	font-size: 15px;
	line-height: 1.45;
}

.glance li strong {
	flex: 0 0 58px;
	padding-top: 2px;
	color: var(--c-accent);
	font-family: var(--f-mono);
	font-size: 12.5px;
	font-weight: 400;
}

.glance > p:last-child {
	margin-bottom: 22px;
}

.glance__cta {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	min-height: 50px;
	padding: 8px 16px;
	border-radius: var(--radius);
	background: var(--c-green);
	color: var(--c-on-dark);
	font-size: 15.5px;
	font-weight: 600;
	text-align: center;
	text-decoration: none;
}

.glance__cta::before {
	content: "";
	flex: 0 0 18px;
	height: 18px;
	background: var(--icon-download) center / 18px no-repeat;
}

.glance__cta:hover {
	background: var(--c-green-dark);
	color: var(--c-on-dark);
}

/* Body: every top-level block is a full-width band
   ========================================================================== */

.section-body > section,
.section-body > .pair {
	padding: var(--band-y) var(--band-x);
	border-bottom: 1px solid var(--c-line);
}

.section-body > section > h2,
.section-body > .pair h2 {
	margin-bottom: 16px;
	font-size: clamp(24px, 2.6vw, 30px);
}

/* Small mono heading ("Start with these", "Next topics"). */
.section-body > .featured > h2,
.section-body > .next-topics > h2 {
	margin-bottom: 20px;
	color: var(--c-ink);
	font-family: var(--f-serif);
	font-size: clamp(21px, 2vw, 25px);
	font-weight: 600;
	letter-spacing: -.01em;
	text-transform: none;
}

.section-body ul,
.section-body ol {
	margin: 0;
	padding: 0;
	list-style: none;
}

.section-body li a strong {
	display: block;
}

/* Featured guides */
.featured > ul {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr));
	gap: 24px;
}

.featured li a {
	display: flex;
	flex-direction: column;
	height: 100%;
	min-height: 280px;
	padding: clamp(22px, 3vw, 28px);
	border: 1px solid var(--c-line);
	border-radius: var(--radius-lg);
	background: var(--c-surface);
	color: var(--c-text-2);
	font-size: 15.5px;
	line-height: 1.55;
	text-decoration: none;
}

.featured li a:hover {
	border-color: var(--c-green);
}

.featured .tag {
	display: block;
	margin-bottom: 14px;
	color: var(--c-muted);
	font-family: var(--f-mono);
	font-weight: 600;
	font-size: 13px;
	letter-spacing: 0;
	text-transform: none;
}

.featured li a strong {
	margin-bottom: 10px;
	color: var(--c-ink);
	font-family: var(--f-serif);
	font-size: 24px;
	font-weight: 600;
	line-height: 1.2;
}

.featured .more {
	margin-top: auto;
	padding-top: 18px;
	color: var(--c-green);
	font-size: 15px;
	font-weight: 600;
}

/* First card: the dark file on top */
.featured li:first-child a {
	padding: clamp(22px, 3vw, 32px);
	border-color: var(--c-dark);
	background: var(--c-dark);
	color: var(--c-on-dark-2);
	font-size: 16px;
}

.featured li:first-child a:hover {
	background: var(--c-manila-2);
}

.featured li:first-child .tag {
	color: var(--c-manila-text);
}

.featured li:first-child a strong {
	margin-bottom: 12px;
	color: var(--c-on-dark);
	font-size: clamp(26px, 3vw, 34px);
	line-height: 1.1;
}

.featured li:first-child .more {
	color: var(--c-on-dark);
}

/* Guide groups: consecutive groups form one white band, numbered 01, 02 … */
.section-body {
	counter-reset: section-group;
}

.section-body > .group {
	position: relative;
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: 0 48px;
	padding-top: 28px;
	padding-bottom: 28px;
	border-bottom: 0;
	background: var(--c-surface);
	counter-increment: section-group;
	scroll-margin-top: 24px;
}

/* 2px rule above each group, in the content width. */
.section-body > .group::before {
	content: "";
	position: absolute;
	top: 0;
	right: var(--band-x);
	left: var(--band-x);
	height: 2px;
	background: var(--c-ink);
}

.section-body > .group:not(.group + .group) {
	padding-top: calc(var(--band-y) + 28px);
}

.section-body > .group:not(.group + .group)::before {
	top: var(--band-y);
}

.section-body > .group:not(:has(+ .group)) {
	padding-bottom: var(--band-y);
	border-bottom: 1px solid var(--c-line);
}

.section-body > .group > h2 {
	margin: 0 0 8px;
	font-size: 26px;
}

.section-body > .group > h2::before {
	content: counter(section-group, decimal-leading-zero);
	display: block;
	margin-bottom: 6px;
	color: var(--c-manila-text);
	font-family: var(--f-sans);
	font-size: 13px;
	font-weight: 700;
}

.section-body > .group > p {
	margin-bottom: 12px;
	color: var(--c-text-2);
	font-size: 15px;
	line-height: 1.55;
}

@media (min-width: 900px) {
	.section-body > .group {
		grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
		grid-template-rows: auto 1fr;
		align-content: start;
	}

	.section-body > .group > p {
		align-self: start;
	}

	.section-body > .group > h2,
	.section-body > .group > p {
		grid-column: 1;
	}

	.section-body > .group > ul {
		grid-column: 2;
		grid-row: 1 / span 2;
	}
}

.group li {
	border-bottom: 1px solid var(--c-line-2);
}

.group li a {
	position: relative;
	display: block;
	padding: 16px 64px 16px 0;
	color: var(--c-text-2);
	font-size: 15px;
	line-height: 1.5;
	text-decoration: none;
}

.group li a strong {
	margin-bottom: 4px;
	color: var(--c-ink);
	font-size: 17.5px;
	line-height: 1.35;
}

.group li a:hover strong {
	color: var(--c-green);
}

.group .min {
	position: absolute;
	top: 20px;
	right: 0;
	color: var(--c-muted);
	font-family: var(--f-mono);
	font-size: 12.5px;
}

/* Tools + free guide */
.section-body > .pair {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr));
	gap: 40px;
}

.pair > section {
	min-width: 0;
}

.free-guide {
	scroll-margin-top: 24px;
}

.tools ul {
	border-top: 1px solid var(--c-line);
}

.tools li {
	border-bottom: 1px solid var(--c-line);
}

.tools li a {
	display: grid;
	grid-template-columns: 40px minmax(0, 1fr) auto;
	gap: 0 14px;
	align-items: center;
	padding: 16px 0;
	color: var(--c-text-2);
	font-size: 14px;
	text-decoration: none;
}

.tools li a::after {
	content: "→";
	grid-column: 3;
	grid-row: 1 / span 2;
	color: var(--c-muted);
}

.tools .icon-box {
	display: flex;
	grid-row: 1 / span 2;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	border-radius: var(--radius);
	background: var(--c-green-tint);
	color: var(--c-green);
}

.tools li a strong {
	grid-column: 2;
	color: var(--c-ink);
	font-size: 16px;
}

.tools li a:hover strong {
	color: var(--c-green);
}

/* Modules between bands ([taa_cta] on its own line, e.g. the lawyer block) */
.section-body > .cta-slot {
	padding: var(--band-y) var(--band-x) 0;
}

/* FAQ: title left, questions right */
.section-body > .faq-block {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: 0 clamp(24px, 4vw, 56px);
	border-bottom: 0;
}

.section-body > .faq-block > h2 {
	margin-bottom: 16px;
	font-size: clamp(26px, 3vw, 36px);
	line-height: 1.1;
}

@media (min-width: 900px) {
	.section-body > .faq-block {
		grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
		align-content: start;
	}

	.section-body > .faq-block > h2 {
		grid-row: 1 / span 30;
		grid-column: 1;
	}

	.section-body > .faq-block > details {
		grid-column: 2;
	}
}

.faq-block details {
	border-bottom: 1px solid var(--c-line);
}

.faq-block h2 + details {
	border-top: 1px solid var(--c-line);
}

.faq-block summary {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	padding: 20px 0;
	color: var(--c-ink);
	font-family: var(--f-serif);
	font-size: 19px;
	font-weight: 600;
	line-height: 1.3;
	list-style: none;
	cursor: pointer;
}

/* Questions are <h3> inside <summary> (required for every FAQ). */
.faq-block summary h3 {
	margin: 0;
	color: inherit;
	font: inherit;
	letter-spacing: inherit;
}

.faq-block summary:hover {
	color: var(--c-green);
}

.faq-block summary::after {
	content: "";
	flex: 0 0 30px;
	height: 30px;
	border: 1px solid var(--c-line-strong);
	border-radius: 50%;
	background: var(--icon-plus) center / 14px no-repeat;
	transition: transform .2s;
}

.faq-block details[open] summary::after {
	transform: rotate(45deg);
}

.faq-block details p {
	padding: 0 46px 22px 0;
	color: var(--c-text);
	font-size: 16px;
	line-height: 1.65;
}

/* Next topics */
.section-body > .next-topics {
	border-top: 1px solid var(--c-line);
	border-bottom: 0;
	background: var(--c-surface);
}

.next-topics ul {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr));
	gap: 0 28px;
}

.next-topics li a {
	display: block;
	padding: 14px 0 18px;
	border-top: 2px solid var(--c-ink);
	color: var(--c-text-2);
	font-size: 14px;
	text-decoration: none;
}

.next-topics .num {
	color: var(--c-manila-text);
	font-family: var(--f-mono);
	font-size: 12.5px;
}

.next-topics li a strong {
	margin: 4px 0;
	color: var(--c-ink);
	font-family: var(--f-serif);
	font-size: 20px;
	font-weight: 600;
}

.next-topics li a:hover strong {
	color: var(--c-green);
}
