/* Styles for /privacy and /terms. Colours from brand/tokens.css, surfaces and type from docs/design.md. */

@font-face {
	font-family: "Outfit Variable";
	font-style: normal;
	font-display: swap;
	font-weight: 100 900;
	src: url("/legal/fonts/outfit-latin-wght-normal.woff2") format("woff2-variations");
}

@font-face {
	font-family: "Inter Variable";
	font-style: normal;
	font-display: swap;
	font-weight: 100 900;
	src: url("/legal/fonts/inter-latin-wght-normal.woff2") format("woff2-variations");
}

:root {
	color-scheme: light dark;
	--background: #fbf7f0; /* cream */
	--card: #ffffff;
	--muted: #f3eee5;
	--foreground: #1d1a26; /* ink */
	--muted-foreground: #615c69;
	--primary: #ffd23f; /* sun */
	--border: rgb(29 26 38 / 9%);
	--border-strong: rgb(29 26 38 / 14%);
	--ring: #1d1a26;
	--header: rgb(251 247 240 / 80%);
	--ease: cubic-bezier(0.165, 0.84, 0.44, 1);
}

@media (prefers-color-scheme: dark) {
	:root {
		--background: #131118;
		--card: #1d1a26;
		--muted: #26232f;
		--foreground: #f7f4ee;
		--muted-foreground: #a6a1ae;
		--border: rgb(255 255 255 / 8%);
		--border-strong: rgb(255 255 255 / 12%);
		--ring: #ffd23f;
		--header: rgb(19 17 24 / 80%);
	}
}

/* Show only the article for the page's language. legal.js sets <html lang>; without it, Spanish shows. */
html:not([lang="en-US"]) [data-locale="en-US"],
html:not([lang="es"]) [data-locale="es"],
html:not([lang="pt-BR"]) [data-locale="pt-BR"] {
	display: none;
}

*,
*::before,
*::after {
	box-sizing: border-box;
}

html {
	-webkit-text-size-adjust: 100%;
	text-size-adjust: 100%;
	scroll-padding-top: 5rem;
}

body {
	margin: 0;
	background: var(--background);
	color: var(--foreground);
	font-family: "Inter Variable", ui-sans-serif, system-ui, sans-serif;
	font-feature-settings: "cv01", "ss03";
	font-size: 15px;
	line-height: 1.6;
	letter-spacing: -0.011em;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}

a {
	color: inherit;
	text-decoration-line: underline;
	text-decoration-thickness: 1px;
	text-decoration-color: var(--border-strong);
	text-underline-offset: 3px;
	transition: text-decoration-color 100ms var(--ease);
}

a:hover {
	text-decoration-color: currentColor;
}

:focus-visible {
	outline: 2px solid var(--ring);
	outline-offset: 2px;
	border-radius: 4px;
}

.skip-link {
	position: absolute;
	left: 1rem;
	top: -3rem;
	z-index: 20;
	padding: 0.5rem 0.75rem;
	border-radius: 8px;
	background: var(--card);
	color: var(--foreground);
	font-weight: 510;
	text-decoration: none;
}

.skip-link:focus {
	top: 0.75rem;
}

.visually-hidden {
	position: absolute;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip-path: inset(50%);
	white-space: nowrap;
	border: 0;
}

/* Header */

.site-header {
	position: sticky;
	top: 0;
	z-index: 10;
	background: var(--header);
	-webkit-backdrop-filter: blur(20px);
	backdrop-filter: blur(20px);
	border-bottom: 1px solid var(--border);
}

.site-header-inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	max-width: 72rem;
	margin: 0 auto;
	padding: 0.75rem max(1.25rem, env(safe-area-inset-right)) 0.75rem max(1.25rem, env(safe-area-inset-left));
}

.logo {
	display: inline-flex;
	padding: 7px 0; /* clear space around the 28 px lockup */
	border-radius: 6px;
}

.logo img {
	display: block;
	height: 28px;
	width: auto;
}

.language {
	position: relative;
	display: inline-flex;
	align-items: center;
}

.language svg {
	position: absolute;
	left: 0.75rem;
	width: 16px;
	height: 16px;
	pointer-events: none;
	color: var(--muted-foreground);
}

.language select {
	appearance: none;
	height: 36px;
	min-width: 0;
	padding: 0 2.25rem 0 2.25rem;
	border: 1px solid var(--border-strong);
	border-radius: 8px;
	background-color: var(--card);
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23615c69' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 0.75rem center;
	color: var(--foreground);
	font: inherit;
	font-size: 14px;
	font-weight: 510;
	letter-spacing: -0.01em;
	cursor: pointer;
	transition: background-color 100ms var(--ease), border-color 100ms var(--ease);
}

.language select:hover {
	background-color: var(--muted);
}

.language select:focus-visible {
	border-radius: 8px;
}

@media (prefers-color-scheme: dark) {
	.language select {
		background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23a6a1ae' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
	}
}

/* Document */

main {
	max-width: 46rem;
	margin: 0 auto;
	padding: 3.5rem max(1.25rem, env(safe-area-inset-right)) 4rem max(1.25rem, env(safe-area-inset-left));
}

h1,
h2,
h3 {
	font-family: "Outfit Variable", ui-sans-serif, system-ui, sans-serif;
	font-weight: 590;
	letter-spacing: -0.01em;
	line-height: 1.2;
	text-wrap: balance;
}

h1 {
	margin: 0 0 0.5rem;
	font-size: clamp(2rem, 1.5rem + 2.5vw, 2.75rem);
	letter-spacing: -0.02em;
}

h2 {
	margin: 2.75rem 0 0.75rem;
	font-size: 1.375rem;
}

h3 {
	margin: 1.75rem 0 0.5rem;
	font-size: 1.0625rem;
}

p,
ul {
	margin: 0 0 1rem;
	text-wrap: pretty;
}

ul {
	padding-left: 1.25rem;
}

li {
	margin-bottom: 0.375rem;
}

li::marker {
	color: var(--muted-foreground);
}

strong {
	font-weight: 590;
}

.updated {
	margin-bottom: 2rem;
	color: var(--muted-foreground);
	font-size: 14px;
}

.summary {
	margin: 0 0 2.5rem;
	padding: 1.25rem 1.5rem;
	border: 1px solid var(--border);
	border-radius: 12px;
	background: var(--card);
}

.summary h2 {
	margin-top: 0;
	font-size: 1.0625rem;
}

.summary ul {
	margin-bottom: 0;
}

.toc {
	margin: 0 0 2.5rem;
	font-size: 14px;
}

.toc h2 {
	margin: 0 0 0.5rem;
	font-size: 1.0625rem;
}

.toc ol {
	margin: 0;
	padding-left: 1.5rem;
	columns: 2 16rem;
	column-gap: 2rem;
}

.toc li {
	break-inside: avoid;
	margin-bottom: 0.25rem;
}

.toc li::marker {
	font-variant-numeric: tabular-nums;
}

.table-wrap {
	overflow-x: auto;
	margin: 0 0 1rem;
	border: 1px solid var(--border);
	border-radius: 12px;
	background: var(--card);
}

table {
	width: 100%;
	border-collapse: collapse;
	font-size: 14px;
	letter-spacing: -0.01em;
}

th,
td {
	padding: 0.625rem 0.875rem;
	text-align: left;
	vertical-align: top;
}

th {
	font-weight: 590;
	border-bottom: 1px solid var(--border-strong);
}

tbody tr + tr td {
	border-top: 1px solid var(--border);
}

/* Footer */

.site-footer {
	border-top: 1px solid var(--border);
	color: var(--muted-foreground);
	font-size: 14px;
}

.site-footer-inner {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 0.75rem 1.5rem;
	max-width: 72rem;
	margin: 0 auto;
	padding: 1.5rem max(1.25rem, env(safe-area-inset-right)) calc(1.5rem + env(safe-area-inset-bottom)) max(1.25rem, env(safe-area-inset-left));
}

.site-footer nav {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem 1.25rem;
}

.site-footer a {
	text-decoration: none;
}

.site-footer a:hover,
.site-footer a[aria-current="page"] {
	color: var(--foreground);
}

@media (prefers-reduced-motion: reduce) {
	* {
		transition: none !important;
	}
}

@media print {
	.site-header,
	.site-footer,
	.skip-link {
		display: none;
	}

	main {
		padding: 0;
	}
}
