/* ============================================================================
   LDR_Legal — premium policy / terms / refund layout.
   Reuses .ldr-blog-toc styles from blog-single.css.
   ========================================================================== */

.ldr-legal {
	padding: 0 0 96px;
	background: var(--ldr-bg);
}

.ldr-legal__layout {
	padding: 56px 0 0;
	display: grid;
	grid-template-columns: 1fr;
	gap: 48px;
	align-items: start;
}
@media (min-width: 1024px) {
	.ldr-legal.has-toc .ldr-legal__layout {
		grid-template-columns: 280px minmax(0, 760px);
		justify-content: center;
		gap: 64px;
	}
}

/* ---------- Last-updated badge ----------------------------------------- */

.ldr-legal__updated {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 8px 16px;
	background: var(--ldr-lake-light);
	color: var(--ldr-lake-dark);
	border-radius: var(--ldr-radius-pill);
	font-family: var(--ldr-font-heading);
	font-weight: 600;
	font-size: 0.8125rem;
	letter-spacing: 0.02em;
	margin: 0 0 32px;
}
.ldr-legal__updated svg { color: var(--ldr-lake-dark); }
.ldr-legal__updated strong { color: var(--ldr-navy); margin-left: 2px; font-weight: 700; }

/* ---------- Main column ------------------------------------------------- */

.ldr-legal__main {
	min-width: 0;
	max-width: 100%;
	color: var(--ldr-fg);
}

/* ---------- TOC (reuse blog-single styles, add legal-specific spacing) -- */

.ldr-legal__toc { order: 2; }
@media (min-width: 1024px) {
	.ldr-legal__toc { order: 0; }
}
@media (max-width: 1023px) {
	.ldr-legal.has-toc .ldr-legal__toc { order: 1; }
	.ldr-legal.has-toc .ldr-legal__main { order: 2; }
}

/* ---------- Long-form legal typography --------------------------------- */

.ldr-legal__content {
	color: var(--ldr-muted-fg);
	line-height: 1.75;
	font-size: 1rem;
}

/* Lead paragraph — first p inside content */
.ldr-legal__content > p:first-child,
.ldr-legal__content > p:first-of-type {
	font-size: 1.125rem;
	line-height: 1.7;
	color: var(--ldr-navy);
	margin: 0 0 32px;
}

.ldr-legal__content h2 {
	font-family: var(--ldr-font-heading);
	font-weight: 800;
	font-size: 1.5rem;
	line-height: 1.3;
	color: var(--ldr-navy);
	letter-spacing: -0.005em;
	margin-top: 48px;
	margin-bottom: 16px;
	scroll-margin-top: 96px;
	padding-top: 8px;
	position: relative;
}
.ldr-legal__content h2::before {
	content: '';
	display: block;
	width: 32px;
	height: 3px;
	background: linear-gradient(90deg, var(--ldr-lake), var(--ldr-gold));
	border-radius: 2px;
	margin-bottom: 12px;
}

.ldr-legal__content h3 {
	font-family: var(--ldr-font-heading);
	font-weight: 700;
	font-size: 1.125rem;
	line-height: 1.4;
	color: var(--ldr-navy);
	margin-top: 28px;
	margin-bottom: 10px;
	scroll-margin-top: 96px;
}

.ldr-legal__content p {
	margin: 0 0 16px;
}

.ldr-legal__content a {
	color: var(--ldr-lake);
	text-decoration: underline;
	text-underline-offset: 3px;
	text-decoration-thickness: 1px;
	font-weight: 500;
}
.ldr-legal__content a:hover {
	color: var(--ldr-lake-dark);
	text-decoration-thickness: 2px;
}

.ldr-legal__content strong {
	color: var(--ldr-navy);
	font-weight: 700;
}

.ldr-legal__content ul,
.ldr-legal__content ol {
	padding-left: 1.5em;
	margin: 0 0 18px;
}
.ldr-legal__content li { margin: 0 0 6px; }
.ldr-legal__content li::marker { color: var(--ldr-lake); }

/* Special treatment for paragraphs that lead with <span> — they're list-like
   key/value rows in the legal copy. Group them visually. */
.ldr-legal__content p > span:first-child {
	display: inline-block;
	font-family: var(--ldr-font-heading);
	font-weight: 700;
	color: var(--ldr-navy);
	margin-right: 4px;
}

/* Highlighted card: any <p> that starts with <span> followed by another <p> with same pattern
   — wrap them in a soft card. We do this via :has() if available; gracefully degrade otherwise. */
.ldr-legal__content p:has(> span:first-child) {
	background: oklch(0.96 0.01 230 / 0.55);
	border-left: 3px solid var(--ldr-lake);
	border-radius: var(--ldr-radius-md);
	padding: 14px 18px;
	margin-bottom: 12px;
}

.ldr-legal__content blockquote {
	background: var(--ldr-lake-light);
	border-radius: var(--ldr-radius-xl);
	padding: 18px 24px;
	margin: 24px 0;
	color: var(--ldr-navy);
	font-style: italic;
}

.ldr-legal__content hr {
	margin: 36px 0;
	border: 0;
	border-top: 1px solid var(--ldr-border);
}

/* Empty <div> closers in legacy content — collapse padding */
.ldr-legal__content div:empty { display: none; }

/* ---------- "Need Help?" footer callout -------------------------------- */

.ldr-legal__help {
	margin-top: 56px;
	padding: 32px 28px;
	background: linear-gradient(135deg, var(--ldr-navy) 0%, oklch(0.30 0.07 250) 100%);
	color: #fff;
	border-radius: var(--ldr-radius-xl);
	box-shadow: var(--ldr-shadow-lg);
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 18px;
	position: relative;
	overflow: hidden;
	isolation: isolate;
}
.ldr-legal__help::before {
	content: '';
	position: absolute;
	top: -40%;
	right: -20%;
	width: 320px;
	height: 320px;
	background: var(--ldr-gold);
	opacity: 0.12;
	border-radius: 9999px;
	filter: blur(60px);
	z-index: -1;
}
@media (min-width: 768px) {
	.ldr-legal__help { flex-direction: row; align-items: center; padding: 36px 40px; gap: 28px; }
}

.ldr-legal__help-icon {
	width: 56px;
	height: 56px;
	border-radius: var(--ldr-radius-pill);
	background: oklch(0.72 0.14 75 / 0.18);
	border: 1px solid oklch(0.72 0.14 75 / 0.4);
	display: inline-flex;
	align-items: center;
	justify-content: center;
	color: var(--ldr-gold);
	flex-shrink: 0;
}

.ldr-legal__help-body { flex: 1; min-width: 0; }
.ldr-legal__help-heading {
	font-family: var(--ldr-font-heading);
	font-weight: 700;
	font-size: 1.25rem;
	line-height: 1.3;
	color: #fff;
	margin: 0 0 6px;
}
.ldr-legal__help-text {
	color: rgb(255 255 255 / 0.75);
	margin: 0 0 16px;
	font-size: 0.9375rem;
	line-height: 1.55;
}

.ldr-legal__help-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
}

.ldr-legal__help-btn {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 10px 18px;
	border-radius: var(--ldr-radius-pill);
	background: oklch(1 0 0 / 0.08);
	color: #fff;
	border: 1px solid rgb(255 255 255 / 0.18);
	font-family: var(--ldr-font-heading);
	font-weight: 600;
	font-size: 0.875rem;
	text-decoration: none;
	transition: all var(--ldr-dur-fast) var(--ldr-ease);
}
.ldr-legal__help-btn:hover {
	background: oklch(1 0 0 / 0.16);
	border-color: rgb(255 255 255 / 0.35);
	transform: translateY(-1px);
	color: #fff;
}
.ldr-legal__help-btn--primary {
	background: var(--ldr-gold);
	color: #fff;
	border-color: var(--ldr-gold);
}
.ldr-legal__help-btn--primary:hover {
	background: oklch(0.65 0.14 65);
	border-color: oklch(0.65 0.14 65);
	color: #fff;
}
