/* Readfont privacy page. Colours and fonts are the extension's own
 * (extension/shared/theme.css, extension/fonts). No external requests. */
@font-face {
	font-family: 'Lexend';
	src: url('fonts/lexend.woff2') format('woff2');
	font-weight: 100 900;
	font-display: swap;
}
@font-face {
	font-family: 'Atkinson Hyperlegible';
	src: url('fonts/atkinson-regular.woff2') format('woff2');
	font-weight: 400;
	font-display: swap;
}
@font-face {
	font-family: 'Atkinson Hyperlegible';
	src: url('fonts/atkinson-bold.woff2') format('woff2');
	font-weight: 700;
	font-display: swap;
}

:root {
	color-scheme: light dark;
	--bg: #faf6ee;
	--surface: #ffffff;
	--text: #22201c;
	--muted: #5c574e;
	--border: #d9d1c3;
	--accent: #6a3ec2;
	--accent-text: #ffffff;
	--focus: #1f4f7a;
}

@media (prefers-color-scheme: dark) {
	:root {
		--bg: #1d1b18;
		--surface: #282520;
		--text: #f1ece2;
		--muted: #bdb5a7;
		--border: #4a453d;
		--accent: #b9a3f0;
		--accent-text: #1d1b18;
		--focus: #8cc0ee;
	}
}

* {
	box-sizing: border-box;
}

html {
	-webkit-text-size-adjust: 100%;
}

body {
	margin: 0;
	background: var(--bg);
	color: var(--text);
	font: 18px/1.65 'Atkinson Hyperlegible', system-ui, sans-serif;
	letter-spacing: 0.01em;
	overflow-wrap: break-word;
}

.wide {
	max-width: 768px;
	margin: 0 auto;
	padding: 0 24px;
}
.layout {
	display: block;
}
.toc {
	display: none;
}
@media (min-width: 1100px) {
	.wide {
		max-width: 1088px;
	}
	.layout {
		display: grid;
		grid-template-columns: minmax(0, 720px) 230px;
		justify-content: space-between;
		align-items: start;
	}
	.toc {
		display: block;
		position: sticky;
		top: 32px;
		margin-top: 72px;
		padding-left: 20px;
		border-left: 2px solid var(--border);
		font-size: 16px;
	}
	.toc ol {
		margin: 0;
		padding: 0;
		list-style: none;
	}
	.toc li + li {
		margin-top: 8px;
	}
	.toc a {
		color: var(--text);
		font-weight: 400; /* a list of places, not links in a sentence */
		text-decoration: none;
	}
	.toc a:hover {
		color: var(--focus);
	}
}
html {
	scroll-padding-top: 24px;
}

a {
	color: var(--focus); /* links: colour and weight 600, no line, not the accent (design rules 2, 28) */
	font-weight: 600;
	text-decoration: none;
}
:focus-visible {
	outline: 3px solid var(--focus);
	outline-offset: 2px;
	border-radius: 4px;
}

/* top bar */
.bar {
	border-bottom: 1px solid var(--border);
}
.bar-in {
	display: flex;
	align-items: center;
	justify-content: space-between;
	min-height: 68px;
}
.brand {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	font: 600 20px/1 'Lexend', system-ui, sans-serif;
}
/* the real logo, as on the welcome page: not letters in a rounded square (design rule 23) */
.mark {
	display: block;
	width: 32px;
	height: 32px;
}
.by {
	color: var(--muted);
	font-size: 16px;
}

/* hero */
.hero {
	padding: 64px 0 4px;
}
h1,
h2 {
	font-family: 'Lexend', system-ui, sans-serif;
	letter-spacing: -0.01em;
}
h1 {
	margin: 0 0 18px;
	font-size: 32px; /* the one scale: --page-title (design rule 3) */
	font-weight: 600;
	line-height: 1.1;
}
.lead {
	margin: 0 0 24px;
	font-size: 22px;
	line-height: 1.55;
}

/* sections */
main section {
	padding: 28px 0;
}
h2 {
	margin: 0 0 12px;
	font-size: 26px;
	font-weight: 600;
	line-height: 1.3;
}
p {
	margin: 0;
}
ul {
	margin: 0;
	padding-left: 1.2em;
}
li + li {
	margin-top: 10px;
}
li::marker {
	color: var(--muted);
}

/* what we don't do */
main .not {
	margin-bottom: 12px;
	padding: 26px 28px;
	border: 0;
	border-radius: 16px;
	background: var(--surface); /* a neutral surface: the accent is for what is on or chosen (design rule 28) */
}
/* plain lines: each one already starts with "No", so no ✕ in a circle (design rule 25) */
.nots {
	list-style: none;
	padding: 0;
	font: 600 18px/1.5 'Lexend', system-ui, sans-serif; /* weights 400 and 600 only (design rule 6) */
}

/* permissions */
.perms {
	display: grid;
	gap: 12px;
	margin: 4px 0 0;
}
.perms div {
	padding: 16px 20px;
	border: 1px solid var(--border);
	border-radius: 12px;
	background: var(--surface);
}
.perms dt {
	font: 600 22px/1.3 'Lexend', system-ui, sans-serif;
}
.perms dd {
	margin: 4px 0 0;
}

.foot {
	padding-top: 28px;
	padding-bottom: 48px;
	border-top: 1px solid var(--border);
	color: var(--muted);
	font-size: 16px;
}

@media (max-width: 600px) {
	body {
		font-size: 18px;
	}
	.wide {
		padding: 0 18px;
	}
	.hero {
		padding: 40px 0 4px;
	}
	h2 {
		font-size: 22px;
	}
	main .not {
		padding: 20px;
	}
}

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

/* The page Chrome opens when Readfont is removed (bye/, decision 102): quick taps, a box, Send.
 * Text buttons by their fill, no border; a picked one bold with ✓; the box keeps a 3:1 edge
 * (design rules 11, 12). */
.reasons {
	display: grid;
	gap: 10px;
	max-width: 520px;
	margin: 24px 0;
}
.reasons button {
	min-height: 48px;
	padding: 10px 16px;
	border: 0;
	border-radius: 10px;
	background: var(--surface);
	color: var(--text);
	font: inherit;
	text-align: left;
	cursor: pointer;
	transition: transform 100ms;
}
.reasons button:active {
	transform: scale(0.97);
}
.reasons button[aria-pressed='true'] {
	font-weight: 600;
}
.reasons button[aria-pressed='true']::before {
	content: '✓ ' / ''; /* decorative: aria-pressed already says it */
}
.reasons button:disabled {
	color: var(--muted);
	cursor: default;
}
.note-label {
	display: block;
	margin-bottom: 6px;
}
#note {
	display: block;
	box-sizing: border-box;
	width: 100%;
	max-width: 520px;
	padding: 10px 12px;
	border: 1px solid var(--muted);
	border-radius: 10px;
	background: var(--surface);
	color: var(--text);
	font: inherit;
	resize: vertical;
}
.hint {
	margin: 6px 0 20px;
	color: var(--muted);
	font-size: 16px;
}
.send {
	min-height: 48px;
	min-width: 120px;
	padding: 10px 24px;
	border: 0;
	border-radius: 10px;
	background: var(--accent);
	color: var(--accent-text);
	font: inherit;
	font-weight: 600;
	cursor: pointer;
	transition: transform 100ms;
}
#bye {
	margin-bottom: 40px;
}
.bye-msg {
	margin: 8px 0 0;
}
.bye-msg:empty {
	display: none;
}
.send:active {
	transform: scale(0.97);
}
.send:disabled,
#note:disabled {
	opacity: 0.6;
	cursor: default;
}
.thanks {
	margin: 24px 0 40px;
}
.sr-only {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
}
