/* Chrome shared by every page on localform.dev: design tokens, the header, the
   footer, buttons, and the prose styling the legal pages use. Page-specific
   layout (the hero, the showcase, the pricing grid) stays inline in the page
   that needs it. */

:root {
	--primary: #6264a7;
	--primary-dark: #4f5192;
	--bg: #f3f2f1;
	--surface: #ffffff;
	--text: #242424;
	--text-secondary: #616161;
	--border: #e1dfdd;
	--radius: 10px;
	--shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
	background: var(--bg);
	color: var(--text);
	line-height: 1.6;
}

.container { max-width: 1040px; margin: 0 auto; padding: 0 24px; }

header.site-header {
	background: var(--surface);
	border-bottom: 1px solid var(--border);
	position: sticky;
	top: 0;
}

.site-header .container {
	display: flex;
	align-items: center;
	justify-content: space-between;
	height: 64px;
}

.logo { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 1.15rem; color: var(--text); text-decoration: none; }

nav a { color: var(--text-secondary); text-decoration: none; margin-left: 24px; font-size: 0.95rem; }
nav a:hover { color: var(--primary); }

/* The nav no longer fits on one line on a phone, so let the bar grow. */
@media (max-width: 640px) {
	.site-header .container { height: auto; flex-wrap: wrap; gap: 4px 16px; padding-top: 12px; padding-bottom: 12px; }
	nav { display: flex; flex-wrap: wrap; gap: 4px 18px; }
	nav a { margin-left: 0; }
}

.btn {
	display: inline-block;
	padding: 12px 28px;
	border-radius: 6px;
	font-weight: 600;
	text-decoration: none;
	font-size: 1rem;
}
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); }
.btn-secondary { background: var(--surface); color: var(--primary); border: 1px solid var(--border); margin-left: 12px; }
.btn-secondary:hover { border-color: var(--primary); }

footer {
	border-top: 1px solid var(--border);
	padding: 32px 0;
	text-align: center;
	color: var(--text-secondary);
	font-size: 0.9rem;
}
footer a { color: var(--primary); text-decoration: none; }
footer a:hover { text-decoration: underline; }
footer .legal-links { margin-top: 8px; }

/* ---------------------------------------------------------------------------
   Legal pages (/privacy, /terms): one narrow column of prose with a table of
   contents at the top. Deep-linked headings need scroll-margin because the
   header is sticky.
   --------------------------------------------------------------------------- */

.legal {
	background: var(--surface);
	padding: 56px 0 72px;
}

.legal .container { max-width: 780px; }

.legal h1 { font-size: clamp(1.8rem, 4vw, 2.4rem); line-height: 1.2; margin-bottom: 12px; }

.legal .updated {
	color: var(--text-secondary);
	font-size: 0.9rem;
	margin-bottom: 28px;
}

.legal .lead {
	font-size: 1.08rem;
	color: var(--text-secondary);
	margin-bottom: 32px;
}

.legal h2 {
	font-size: 1.3rem;
	margin: 40px 0 12px;
	scroll-margin-top: 88px;
}

.legal h3 {
	font-size: 1.05rem;
	margin: 24px 0 8px;
}

.legal p, .legal ul, .legal ol, .legal table { margin-bottom: 16px; }

.legal ul, .legal ol { padding-left: 22px; }
.legal li { margin-bottom: 6px; }

.legal a { color: var(--primary); }

.legal address {
	font-style: normal;
	background: var(--bg);
	border-radius: var(--radius);
	padding: 16px 20px;
	margin-bottom: 16px;
}

/* Table of contents */
.toc {
	background: var(--bg);
	border: 1px solid var(--border);
	border-radius: var(--radius);
	padding: 20px 24px;
	margin-bottom: 40px;
}
.toc h2 {
	font-size: 0.75rem;
	font-weight: 700;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--primary);
	margin: 0 0 10px;
}
.toc ol { margin: 0; padding-left: 20px; }
.toc li { margin-bottom: 4px; }
.toc a { color: var(--text); text-decoration: none; }
.toc a:hover { color: var(--primary); text-decoration: underline; }

/* Retention / data tables */
.legal table {
	width: 100%;
	border-collapse: collapse;
	font-size: 0.95rem;
}
.legal th, .legal td {
	text-align: left;
	vertical-align: top;
	padding: 10px 12px;
	border-bottom: 1px solid var(--border);
}
.legal th { font-weight: 600; }
.legal thead th { border-bottom-width: 2px; }

/* Wide tables must scroll inside their own box, never the page. */
.table-scroll { overflow-x: auto; margin-bottom: 16px; }
.table-scroll table { margin-bottom: 0; min-width: 520px; }

/* Callout for the "it is your site, so you are the controller" note. */
.note {
	border-left: 3px solid var(--primary);
	background: var(--bg);
	border-radius: 0 var(--radius) var(--radius) 0;
	padding: 16px 20px;
	margin-bottom: 16px;
}
.note p:last-child { margin-bottom: 0; }
