/*
 * Shared styling for the legal pages (/privacy, /terms).
 *
 * The home page keeps its CSS inline because it is one document doing one job.
 * These two share a layout, so they link one stylesheet instead of carrying two
 * copies that would drift apart. Tokens are duplicated from index.html: keep
 * them in step if the palette moves.
 *
 * Prose is capped narrower than the home page --max. Legal text is read in long
 * runs, and 19px/1.75 across 1240px is a wall.
 */

@font-face {
	font-family: 'Poppins';
	font-style: normal;
	font-weight: 400;
	font-display: swap;
	src: url('/fonts/poppins-400.woff2') format('woff2');
}
@font-face {
	font-family: 'Poppins';
	font-style: normal;
	font-weight: 500;
	font-display: swap;
	src: url('/fonts/poppins-500.woff2') format('woff2');
}
@font-face {
	font-family: 'Poppins';
	font-style: normal;
	font-weight: 700;
	font-display: swap;
	src: url('/fonts/poppins-700.woff2') format('woff2');
}

:root {
	--brand: #40d69a;
	--brand-deep: #2fbd85;
	--paper: #0b100f;
	--paper-2: #101615;
	--surface: #151d1b;
	--ink: #f0f4f2;
	--ink-2: #bcc7c3;
	--ink-dim: #8b9894;
	--rule: #273230;
	--rule-soft: #1d2624;
	--max: 820px;
	--gutter: clamp(22px, 5vw, 48px);
	--sans: 'Poppins', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}

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

html {
	scroll-behavior: smooth;
}

body {
	margin: 0;
	background: var(--paper);
	color: var(--ink-2);
	font-family: var(--sans);
	font-size: 19px;
	line-height: 1.75;
	-webkit-font-smoothing: antialiased;
	text-rendering: optimizeLegibility;
}

.wrap {
	width: 100%;
	max-width: var(--max);
	margin-inline: auto;
	padding-inline: var(--gutter);
}

/* Masthead: deliberately simpler than the home page. Someone reading the terms
   is not being sold to, so the nav is a way back rather than a funnel. */
.legal-top {
	border-bottom: 1px solid var(--rule-soft);
	background: var(--paper-2);
	padding: 20px 0;
}

.legal-top .wrap {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 18px;
}

.brand {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	color: var(--ink);
	font-weight: 700;
	font-size: 1.05rem;
	letter-spacing: -0.01em;
	text-decoration: none;
}

.brand svg {
	width: 26px;
	height: 26px;
	fill: var(--brand);
}

.legal-top nav {
	display: flex;
	gap: 20px;
	font-size: 0.95rem;
}

.legal-top nav a {
	color: var(--ink-dim);
	text-decoration: none;
}

.legal-top nav a:hover,
.legal-top nav a[aria-current='page'] {
	color: var(--brand);
}

main {
	padding: clamp(48px, 8vw, 96px) 0 clamp(56px, 9vw, 110px);
}

h1 {
	margin: 0 0 12px;
	color: var(--ink);
	font-size: clamp(2.1rem, 5.4vw, 3.1rem);
	font-weight: 700;
	line-height: 1.1;
	letter-spacing: -0.025em;
}

.updated {
	margin: 0 0 8px;
	color: var(--ink-dim);
	font-size: 0.95rem;
}

.lede {
	margin: 0 0 40px;
	padding-bottom: 32px;
	border-bottom: 1px solid var(--rule-soft);
	color: var(--ink-2);
	font-size: 1.14rem;
}

h2 {
	margin: 48px 0 14px;
	color: var(--ink);
	font-size: clamp(1.32rem, 3vw, 1.6rem);
	font-weight: 700;
	line-height: 1.25;
	letter-spacing: -0.015em;
	scroll-margin-top: 24px;
}

h3 {
	margin: 32px 0 10px;
	color: var(--ink);
	font-size: 1.1rem;
	font-weight: 600;
}

p,
li {
	margin: 0 0 18px;
}

ul {
	margin: 0 0 22px;
	padding-left: 22px;
}

li::marker {
	color: var(--brand-deep);
}

strong {
	color: var(--ink);
	font-weight: 600;
}

a {
	color: var(--brand);
	text-decoration-thickness: 1px;
	text-underline-offset: 3px;
}

/* Pulled-out box for the things people actually want to find: what they are
   charged, and how to stop being charged. */
.callout {
	margin: 28px 0;
	padding: 22px 26px;
	border: 1px solid var(--rule);
	border-left: 3px solid var(--brand);
	border-radius: 14px;
	background: var(--surface);
}

.callout p:last-child,
.callout ul:last-child {
	margin-bottom: 0;
}

.toc {
	margin: 0 0 8px;
	padding: 24px 26px;
	border: 1px solid var(--rule);
	border-radius: 14px;
	background: var(--paper-2);
}

.toc h2 {
	margin: 0 0 12px;
	font-size: 1rem;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	color: var(--ink-dim);
}

.toc ol {
	margin: 0;
	padding-left: 20px;
	columns: 2;
	column-gap: 32px;
	font-size: 0.97rem;
}

.toc li {
	margin: 0 0 7px;
	break-inside: avoid;
}

.toc a {
	color: var(--ink-2);
	text-decoration: none;
}

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

@media (max-width: 600px) {
	.toc ol {
		columns: 1;
	}
}

dl.contact {
	margin: 0;
}

dl.contact dt {
	color: var(--ink-dim);
	font-size: 0.86rem;
	text-transform: uppercase;
	letter-spacing: 0.07em;
}

dl.contact dd {
	margin: 2px 0 16px;
	color: var(--ink);
}

footer {
	border-top: 1px solid var(--rule-soft);
	padding: 30px 0 40px;
	color: var(--ink-dim);
	font-size: 0.93rem;
}

footer .wrap {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 14px;
}

footer a {
	color: var(--ink-dim);
	margin-left: 20px;
	text-decoration: none;
}

footer a:first-child {
	margin-left: 0;
}

footer a:hover {
	color: var(--brand);
}

.foot-links {
	display: flex;
	gap: 20px;
}

.foot-links a {
	margin-left: 0;
}

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

@media (prefers-reduced-motion: reduce) {
	html {
		scroll-behavior: auto;
	}
}
