/**
 * Legal / policy pages — readable document layout.
 *
 * Scoped to .autonomo-legal-page-template so other pages are unaffected.
 */

body.autonomo-legal-page-template #primary {
	background-color: #f8fafc;
}

.autonomo-legal-page {
	width: 100%;
	flex-grow: 1;
	padding: 2.5rem 1rem 3.5rem;
}

.autonomo-legal-page__container {
	box-sizing: border-box;
	width: 100%;
	max-width: 50rem; /* ~800px */
	margin: 0 auto;
}

.autonomo-legal-page__card {
	box-sizing: border-box;
	width: 100%;
	padding: 2rem 1.5rem;
	background-color: #fff;
	border: 1px solid #e2e8f0;
	border-radius: 1rem;
	box-shadow: 0 1px 2px 0 rgb(15 23 42 / 0.04);
}

.autonomo-legal-page__header {
	margin-bottom: 2rem;
	padding-bottom: 1.5rem;
	border-bottom: 1px solid #e2e8f0;
}

.autonomo-legal-page__title {
	margin: 0;
	font-size: clamp(1.75rem, 4vw, 2.25rem);
	font-weight: 800;
	line-height: 1.2;
	letter-spacing: -0.025em;
	color: #0f172a;
}

/* Content typography */
.autonomo-legal-content {
	color: #334155;
	font-size: 1rem;
	line-height: 1.75;
}

.autonomo-legal-content > :first-child {
	margin-top: 0;
}

.autonomo-legal-content > :last-child {
	margin-bottom: 0;
}

.autonomo-legal-content p {
	margin: 0 0 1.25rem;
}

.autonomo-legal-content > p:first-child {
	color: #64748b;
	font-size: 0.9375rem;
}

.autonomo-legal-content h2 {
	margin: 2.5rem 0 1rem;
	padding-top: 2rem;
	border-top: 1px solid #e2e8f0;
	font-size: 1.375rem;
	font-weight: 700;
	line-height: 1.35;
	letter-spacing: -0.015em;
	color: #0f172a;
}

.autonomo-legal-content > h2:first-child,
.autonomo-legal-content > p:first-child + h2 {
	margin-top: 0;
	padding-top: 0;
	border-top: 0;
}

.autonomo-legal-content h3 {
	margin: 1.75rem 0 0.75rem;
	font-size: 1.125rem;
	font-weight: 600;
	line-height: 1.4;
	color: #1e293b;
}

.autonomo-legal-content h4 {
	margin: 1.25rem 0 0.5rem;
	font-size: 1rem;
	font-weight: 600;
	line-height: 1.45;
	color: #1e293b;
}

.autonomo-legal-content ul,
.autonomo-legal-content ol {
	margin: 0 0 1.25rem;
	padding-left: 1.5rem;
}

.autonomo-legal-content ul {
	list-style-type: disc;
}

.autonomo-legal-content ol {
	list-style-type: decimal;
}

.autonomo-legal-content li {
	margin-bottom: 0.625rem;
	padding-left: 0.25rem;
}

.autonomo-legal-content li:last-child {
	margin-bottom: 0;
}

.autonomo-legal-content li > ul,
.autonomo-legal-content li > ol {
	margin-top: 0.625rem;
	margin-bottom: 0;
}

.autonomo-legal-content a {
	color: #0d9488;
	font-weight: 500;
	text-decoration: underline;
	text-decoration-thickness: 1px;
	text-underline-offset: 3px;
	transition: color 0.15s ease;
}

.autonomo-legal-content a:hover {
	color: #0f766e;
}

.autonomo-legal-content a:focus-visible {
	outline: 2px solid #14b8a6;
	outline-offset: 2px;
	border-radius: 2px;
}

.autonomo-legal-content strong,
.autonomo-legal-content b {
	font-weight: 600;
	color: #1e293b;
}

.autonomo-legal-content em,
.autonomo-legal-content i {
	font-style: italic;
}

.autonomo-legal-content blockquote {
	margin: 1.5rem 0;
	padding: 1rem 1.25rem;
	border-left: 3px solid #99f6e4;
	border-radius: 0 0.5rem 0.5rem 0;
	background-color: #f8fafc;
	color: #475569;
}

.autonomo-legal-content hr {
	margin: 2rem 0;
	border: 0;
	border-top: 1px solid #e2e8f0;
}

.autonomo-legal-content table {
	width: 100%;
	margin: 0 0 1.25rem;
	border-collapse: collapse;
	font-size: 0.9375rem;
	line-height: 1.5;
}

.autonomo-legal-content th,
.autonomo-legal-content td {
	padding: 0.75rem;
	border: 1px solid #e2e8f0;
	text-align: left;
	vertical-align: top;
}

.autonomo-legal-content th {
	background-color: #f8fafc;
	font-weight: 600;
	color: #0f172a;
}

.autonomo-legal-content .wp-block-table {
	margin-bottom: 1.25rem;
	overflow-x: auto;
}

/* WordPress block editor wrappers */
.autonomo-legal-content .wp-block-group,
.autonomo-legal-content .wp-block-columns {
	margin-bottom: 1.25rem;
}

@media (min-width: 640px) {
	.autonomo-legal-page {
		padding: 3rem 1.5rem 4rem;
	}

	.autonomo-legal-page__card {
		padding: 2.5rem 2.5rem 3rem;
	}

	.autonomo-legal-page__header {
		margin-bottom: 2.25rem;
	}

	.autonomo-legal-content {
		font-size: 1.0625rem;
		line-height: 1.8;
	}

	.autonomo-legal-content h2 {
		font-size: 1.5rem;
	}
}

@media (min-width: 1024px) {
	.autonomo-legal-page__container {
		max-width: 51.25rem; /* ~820px */
	}
}
