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

:root {
	--icon-check: 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' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7'/%3E%3C/svg%3E");
	--icon-cross: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23C42B1C' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 6l12 12M18 6L6 18'/%3E%3C/svg%3E");
	--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");
}

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

/* The folder's front: manila band with the title, stamped with the verified date. */
.guide-head {
	padding: 22px 0 clamp(32px, 4vw, 48px);
	border-bottom: 2px solid var(--c-manila-edge);
	background: var(--c-manila-2);
}

.guide-head__main {
	max-width: 820px;
}

.guide-head__title {
	margin-bottom: 18px;
	font-size: clamp(34px, 4.6vw, 54px);
	font-weight: 600;
	line-height: 1.06;
	letter-spacing: -.02em;
}

.guide-head__dek {
	margin-bottom: 22px;
	color: var(--c-ink);
	font-size: clamp(17px, 1.6vw, 20px);
	line-height: 1.55;
}

.guide-meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 10px 22px;
	color: var(--c-manila-text);
	font-size: 14px;
}

.guide-meta__read {
	display: flex;
	align-items: center;
	gap: 6px;
}

.guide-meta a {
	display: inline-block;
	padding-block: 4px;
	color: var(--c-manila-text);
}

/* Layout: guide + sidebar
   ========================================================================== */

.guide-layout {
	display: flex;
	align-items: flex-start;
	gap: 56px;
	padding-top: clamp(28px, 4vw, 48px);
}

/* The reading sheet: plain white paper laid in the open folder. */
.guide {
	flex: 1 1 600px;
	min-width: 0;
	max-width: 760px; /* body measure ~75 characters */
	padding: clamp(20px, 4vw, 52px) clamp(18px, 4vw, 56px) clamp(28px, 4vw, 48px);
	border: 1px solid var(--c-line);
	background: var(--c-surface);
	box-shadow: var(--shadow-paper);
}

/* Phones: the sheet is the whole page width, so the boxes inside are not cards in a card. */
@media (max-width: 999.98px) {
	.guide {
		margin-inline: calc(-1 * var(--gutter));
		padding-inline: var(--gutter);
		border: 0;
		box-shadow: none;
	}
}

/* Sticks at the vertical center of the screen: --side-top is set by single.js
   ((viewport − sidebar height) / 2, at least 24px when the sidebar is taller).
   Never taller than the screen: a long table of contents scrolls inside itself
   (.toc ol), the sidebar card stays in view. */
.guide-side {
	position: sticky;
	top: var(--side-top, calc(var(--header-h, 70px) + 24px));
	display: flex;
	flex: 0 1 300px;
	flex-direction: column;
	gap: 28px;
	min-width: 260px;
	max-height: calc(100vh - var(--header-h, 70px) - 48px);
	padding-bottom: 40px;
}

.guide-side > * {
	flex-shrink: 0;
}

@media (max-width: 999.98px) {
	.guide-side {
		display: none;
	}
}

@media (min-width: 1000px) {
	.toc-mobile {
		display: none;
	}
}

/* Table of contents */
.toc-mobile {
	margin-bottom: 28px;
	border: 1px solid var(--c-line);
	border-radius: var(--radius-lg);
	background: var(--c-surface);
}

.toc-mobile summary {
	display: flex;
	align-items: center;
	justify-content: space-between;
	min-height: 48px;
	padding: 14px 18px;
	font-size: 15px;
	font-weight: 600;
	list-style: none;
	cursor: pointer;
}

.toc-mobile[open] summary .icon {
	transform: rotate(180deg);
}

.toc-mobile ol {
	margin: 0;
	padding: 0 18px 14px;
	list-style: none;
}

.toc-mobile li {
	border-top: 1px solid var(--c-line-2);
}

.toc-mobile a {
	display: block;
	padding: 10px 0;
	color: var(--c-ink);
	font-size: 15px;
	text-decoration: none;
}

.toc {
	display: flex;
	flex-direction: column;
	flex-shrink: 1;
	min-height: 160px; /* very short screens: the sidebar may overflow rather than squeeze the list away */
	padding-top: 14px;
	border-top: 2px solid var(--c-manila-edge);
}

.toc__title {
	margin-bottom: 10px;
	color: var(--c-ink);
	font-family: var(--f-sans);
	font-size: 12px;
	font-weight: 700;
	letter-spacing: .06em;
	text-transform: uppercase;
}

.toc ol {
	min-height: 0;
	margin: 0;
	padding: 0;
	overflow-y: auto;
	padding-bottom: 20px;
	overscroll-behavior: contain;
	scrollbar-color: var(--c-line) transparent;
	/* A long list fades out at the bottom edge instead of cutting a line in half
	   (mask uses alpha only; the 20px padding lets the last item scroll clear of it). */
	-webkit-mask-image: linear-gradient(to bottom, var(--c-ink) calc(100% - 28px), transparent);
	mask-image: linear-gradient(to bottom, var(--c-ink) calc(100% - 28px), transparent);
	scrollbar-width: thin;
	list-style: none;
}

.toc a {
	display: block;
	padding: 7px 0;
	color: var(--c-text-2);
	font-size: 14.5px;
	line-height: 1.35;
	text-decoration: none;
}

.toc a:hover {
	color: var(--c-green);
}

/* Where you are = a highlighter stroke through the text lines, not a fill or a side bar. */
.toc a.is-active {
	color: var(--c-ink);
	font-weight: 700;
	text-decoration: underline;
	text-decoration-color: var(--c-green-focus);
	text-decoration-thickness: .5em;
	text-decoration-skip-ink: none;
	text-underline-offset: -.3em;
}

/* Sidebar card */
.side-card {
	position: relative;
	margin-top: calc(var(--tab-h) + 6px);
	padding: 20px;
	border: 1px solid var(--c-line);
	border-top: 2px solid var(--c-manila-edge);
	border-radius: 0 var(--radius-lg) var(--radius-lg);
	background: var(--c-surface);
}

/* Same as every module: the label is the tab on the card's top edge. */
.side-card__eyebrow {
	position: absolute;
	top: -2px;
	left: 20px;
	max-width: calc(100% - 40px);
	margin: 0;
	transform: translateY(-100%);
}

.side-card__icon {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	margin-bottom: 14px;
	border-radius: var(--radius);
	background: var(--c-green-tint);
	color: var(--c-green);
}

.side-card__icon .icon {
	stroke-width: 1.8;
}



.side-card__title {
	margin-bottom: 6px;
	font-size: 20px;
	line-height: 1.2;
}

.side-card__text {
	margin-bottom: 16px;
	color: var(--c-text-2);
	font-size: 14.5px;
	line-height: 1.5;
}

.side-card__button {
	min-height: 48px;
	padding: 8px 14px;
	font-size: 14.5px;
	line-height: 1.25;
}

.side-card__note {
	margin-top: 10px;
	color: var(--c-muted);
	font-size: 12px;
	text-align: center;
}

/* Body: text
   ========================================================================== */

.guide-body > h2 {
	margin: 44px 0 14px;
	font-size: clamp(25px, 2.6vw, 31px);
	letter-spacing: -.01em;
	scroll-margin-top: 24px;
}

.guide-body > h2:first-child {
	margin-top: 0;
}

.guide-body > h3 {
	margin: 28px 0 10px;
	font-family: var(--f-sans);
	font-size: 19px;
}

.guide-body > p,
.guide-body > ol:not(.steps) {
	margin: 0 0 16px;
	color: var(--c-text-strong);
	font-size: 18px;
	line-height: 1.7;
}

.guide-body > ol:not(.steps) {
	padding-left: 1.4em;
}

.guide-body > ol:not(.steps) li + li {
	margin-top: 6px;
}

/* Check list (default ul) and red-flags list */
.guide-body > ul,
.takeaways ul {
	display: flex;
	flex-direction: column;
	gap: 10px;
	margin: 4px 0 20px;
	padding: 0;
	list-style: none;
}

.guide-body > ul > li,
.takeaways li {
	position: relative;
	padding-left: 32px;
	color: var(--c-text-strong);
	font-size: 17px;
	line-height: 1.6;
}

.guide-body > ul > li::before,
.takeaways li::before {
	content: "";
	position: absolute;
	top: .62em;
	left: 5px;
	width: 7px;
	height: 7px;
	background: var(--c-ink);
}

.guide-body li,
.takeaways li,
.page-body li {
	text-wrap: pretty;
}

.guide-body > ul.list--warn > li::before {
	background-image: var(--icon-cross);
}

/* Links to the state pages: compact grid, no check marks */
.guide-body > ul.state-links {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
	gap: 0 20px;
	margin: 8px 0 28px;
	padding: 0;
	border-top: 1px solid var(--c-line-2);
}

.guide-body > ul.state-links > li {
	padding: 0;
	border-bottom: 1px solid var(--c-line-2);
	font-size: 15px;
}

.guide-body > ul.state-links > li::before {
	content: none;
}

.guide-body > ul.state-links a {
	display: block;
	padding: 9px 0;
	color: var(--c-ink);
	text-decoration: none;
}

.guide-body > ul.state-links a:hover {
	color: var(--c-green);
}

.guide-body > blockquote {
	margin: 24px 0;
	padding-left: 18px;
	border-left: 3px solid var(--c-green);
	color: var(--c-ink);
	font-family: var(--f-serif);
	font-size: 20px;
	font-style: italic;
	line-height: 1.45;
}

/* Numbered steps */
.guide-body > ol.steps {
	margin: 8px 0 20px;
	padding: 0;
	border-top: 1px solid var(--c-line);
	counter-reset: step;
	list-style: none;
}

.guide-body > ol.steps > li {
	position: relative;
	padding: 18px 0 18px 40px;
	border-bottom: 1px solid var(--c-line);
	counter-increment: step;
}

.guide-body > ol.steps > li::before {
	content: counter(step, decimal-leading-zero);
	position: absolute;
	top: 21px;
	left: 0;
	color: var(--c-green);
	font-family: var(--f-mono);
	font-size: 14px;
}

.guide-body > ol.steps h3 {
	margin-bottom: 4px;
	font-family: var(--f-sans);
	font-size: 18px;
}

.guide-body > ol.steps p {
	color: var(--c-text);
	font-size: 16.5px;
	line-height: 1.6;
}

/* Table */
.guide-body > .table-wrap {
	margin: 8px 0 20px;
	overflow-x: auto;
	border: 1px solid var(--c-line);
	border-radius: var(--radius-lg);
	background: var(--c-surface);
}

.guide-body table {
	width: 100%;
	min-width: 480px;
	border-collapse: collapse;
	font-size: 15.5px;
	line-height: 1.45;
}

.guide-body th {
	padding: 12px 16px;
	border-bottom: 1px solid var(--c-line);
	background: var(--c-hover-bg);
	color: var(--c-text-2);
	font-family: var(--f-sans);
	font-size: 12px;
	font-weight: 700;
	letter-spacing: .05em;
	text-align: left;
	text-transform: uppercase;
}

.guide-body td {
	padding: 12px 16px;
	border-top: 1px solid var(--c-line-2);
	color: var(--c-ink);
	vertical-align: top;
}

.guide-body tr.is-total {
	background: var(--c-green-tint);
	font-weight: 600;
}

/* Note */
.guide-body > p.note {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	margin: 0 0 20px;
	padding: 12px 14px;
	border: 1px dashed var(--c-sand-line-dashed);
	border-radius: var(--radius);
	background: var(--c-sand);
	color: var(--c-sand-text);
	font-size: 14px;
	line-height: 1.5;
}

.note__label {
	flex: 0 0 auto;
	padding: 2px 6px;
	border-radius: 3px;
	background: var(--c-surface);
	font-family: var(--f-sans);
	font-weight: 700;
	font-size: 12px;
	letter-spacing: .05em;
	text-transform: uppercase;
}

/* CTA modules inside the body */
.guide-body > .cta-slot {
	margin: 28px 0 36px;
}

/* Body: boxes
   ========================================================================== */

/* Key takeaways */
/* Key takeaways = the highlighted lines of the file: a folder note. */
.takeaways {
	margin-bottom: 40px;
	padding: 22px 24px 20px;
	border: 1px solid var(--c-manila-edge);
	border-radius: var(--radius);
	background: var(--c-manila-2);
}

.takeaways h2,
.sources h2 {
	margin-bottom: 12px;
	color: var(--c-green);
	font-family: var(--f-sans);
	font-size: 12.5px;
	font-weight: 700;
	letter-spacing: .05em;
	text-transform: uppercase;
}

.takeaways ul {
	margin: 0;
}

.takeaways li {
	padding-left: 28px;
	color: var(--c-ink);
	font-size: 16px;
	line-height: 1.55;
}

.takeaways li::before {
	width: 18px;
	height: 18px;
}

/* What to do now */
.next-steps {
	margin: 8px 0 40px;
	overflow: hidden;
	border: 1.5px solid var(--c-ink);
	border-radius: var(--radius-lg);
	background: var(--c-surface);
	counter-reset: next;
}

.next-steps__label {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 11px 22px;
	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;
}

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

.next-steps h2 {
	margin: 22px 24px 6px;
	font-size: 25px;
	line-height: 1.2;
}

.next-steps ol {
	margin: 0 24px 10px;
	padding: 0;
	list-style: none;
}

.next-steps li {
	position: relative;
	padding: 14px 0 14px 44px;
	border-top: 1px solid var(--c-line-2);
	color: var(--c-text);
	font-size: 15.5px;
	line-height: 1.55;
	counter-increment: next;
}

.next-steps li::before {
	content: counter(next);
	position: absolute;
	top: 14px;
	left: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 28px;
	height: 28px;
	border: 1.5px solid var(--c-green);
	border-radius: 50%;
	color: var(--c-green);
	font-family: var(--f-mono);
	font-size: 13px;
}

.next-steps strong {
	display: block;
	margin-bottom: 2px;
	color: var(--c-ink);
	font-size: 16.5px;
	font-weight: 600;
}

/* FAQ (native details) */
.faq-block {
	margin-bottom: 44px;
}

.faq-block h2 {
	margin-bottom: 8px;
	font-size: clamp(25px, 2.6vw, 31px);
}

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

.faq-block details:first-of-type {
	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;
}

/* Sources */
.sources {
	margin-bottom: 28px;
	scroll-margin-top: 24px;
}

.sources h2 {
	color: var(--c-text-2);
}

.sources ol {
	display: flex;
	flex-direction: column;
	gap: 6px;
	margin: 0;
	padding: 0 0 0 22px;
	color: var(--c-text);
	font-size: 14.5px;
	line-height: 1.5;
}

/* Disclaimer + related
   ========================================================================== */

.guide-disclaimer {
	margin-bottom: 56px;
	padding: 16px 18px;
	border: 1px dashed var(--c-line-strong);
	border-radius: var(--radius-lg);
	color: var(--c-text-2);
	font-size: 13.5px;
	line-height: 1.6;
}

.guide-disclaimer strong {
	color: var(--c-ink);
}

.related {
	padding: clamp(40px, 5vw, 64px) 0;
	border-top: 1px solid var(--c-line);
	border-bottom: 0;
}

.related__title {
	margin-bottom: 24px;
	font-size: clamp(26px, 3vw, 34px);
	line-height: 1.1;
}

.related__grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
	gap: 0 36px;
}

.related-card {
	display: block;
	padding: 18px 0 24px;
	border-top: 2px solid var(--c-ink);
	color: var(--c-ink);
	text-decoration: none;
}

.related-card:hover {
	color: var(--c-green);
}

.related-card__title {
	display: block;
	margin-bottom: 8px;
	font-family: var(--f-serif);
	font-size: 21px;
	font-weight: 600;
	line-height: 1.25;
}

.related-card__text {
	display: block;
	color: var(--c-text-2);
	font-size: 15px;
	line-height: 1.55;
}
