/* ==========================================================================
   LEGAL PAGES (templates/legal/*), on top of account.css.
   Long-form reading: narrower measure, numbered sections, a highlighted
   "quick summary for humans" card.
   ========================================================================== */

.faMain--legal { max-width: 50rem; }

.faLegalNav {
	display: flex;
	flex-wrap: wrap;
	gap: 0.4rem;
	margin-bottom: 1.75rem;
}

.faLegalNav a {
	padding: 0.35rem 0.8rem;
	font-size: 0.75rem;
	font-weight: 700;
	letter-spacing: 0.02em;
	text-transform: uppercase;
	text-decoration: none;
	color: var(--highlight-color);
	border-radius: var(--border-radius-plus);
	box-shadow: inset 0 0 0 2px var(--highlightminusminus-color);
}

.faLegalNav a:hover { box-shadow: inset 0 0 0 2px var(--highlightminus-color); }

.faLegalNav a[aria-current="page"] {
	background: var(--highlight-color);
	color: var(--on-highlight-color);
	box-shadow: none;
}

/* the summary: the part most people read */
.faLegalSummary {
	box-shadow: inset 0 0 0 3px var(--highlight-color);
	filter: none;
}

.faLegalSummary ul {
	margin: 0;
	padding: 0;
	list-style: none;
	display: flex;
	flex-direction: column;
	gap: 0.75rem;
}

.faLegalSummary li {
	position: relative;
	padding-left: 1.6rem;
	line-height: 1.45;
	max-width: 68ch;
}

.faLegalSummary li::before {
	content: "→";
	position: absolute;
	left: 0;
	font-weight: 700;
	color: var(--highlight-color);
}

.faLegalSummary li strong { color: var(--highlightplus-color); }
@media (prefers-color-scheme: dark) { .faLegalSummary li strong { color: var(--highlight-color); } }

.faLegalSummaryNote { margin-top: 1.25rem; }

/* full text */
.faLegalText { line-height: 1.6; counter-reset: legalSection; }
.faLegalText p, .faLegalText li { max-width: 72ch; }
.faLegalText section { counter-increment: legalSection; margin-top: 2rem; }
.faLegalText section > h2 {
	margin: 0 0 0.6rem;
	font-size: 1rem;
	font-weight: 700;
	letter-spacing: 0.02em;
	text-transform: uppercase;
	color: var(--highlight-color);
}
.faLegalText section > h2::before { content: counter(legalSection) ". "; }
.faLegalText h3 { margin: 1.25rem 0 0.4rem; font-size: 0.9rem; }
.faLegalText ul, .faLegalText ol { padding-left: 1.3rem; }
.faLegalText li { margin-bottom: 0.35rem; }
.faLegalText a { color: var(--highlight-color); }

.faLegalToc {
	margin: 0 0 1rem;
	padding: 1rem 1.25rem;
	background: var(--bg-color);
	border-radius: var(--border-radius);
	font-size: 0.85rem;
}
.faLegalToc ol { margin: 0; padding-left: 1.3rem; columns: 2 16rem; }
.faLegalToc a { text-decoration: none; }
.faLegalToc a:hover { text-decoration: underline; }

/* the privacy promise box */
.faLegalPromise {
	margin: 1rem 0;
	padding: 1rem 1.25rem;
	background: var(--highlightminusminus-color);
	border-radius: var(--border-radius);
}
.faLegalPromise > :first-child { margin-top: 0; }
.faLegalPromise > :last-child { margin-bottom: 0; }

/* tables (cookies, retention, processors) scroll inside, never the page */
.faLegalTableWrap { overflow-x: auto; margin: 1rem 0; }
.faLegalTable { width: 100%; border-collapse: collapse; font-size: 0.85rem; }
.faLegalTable th, .faLegalTable td {
	padding: 0.55rem 0.6rem;
	text-align: left;
	vertical-align: top;
	border-bottom: 1px solid var(--bg-color-line);
}
.faLegalTable th {
	font-size: 0.7rem;
	letter-spacing: 0.02em;
	text-transform: uppercase;
	color: var(--highlight-color);
}
.faLegalTable code { font-size: 0.8rem; }

.faLegalForm {
	padding: 1rem 1.25rem;
	border: 2px dashed var(--bg-color-line);
	border-radius: var(--border-radius);
	white-space: pre-line;
	font-size: 0.9rem;
}

.faLegalIndex { list-style: none; margin: 0; padding: 0; display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(14rem, 1fr)); }
.faLegalIndex a { display: block; height: 100%; padding: 1.25rem; text-decoration: none; color: inherit; background: var(--bgminus-color); border-radius: var(--border-radius); filter: var(--card-shadow); }
.faLegalIndex a:hover { box-shadow: inset 0 0 0 2px var(--highlightminus-color); }
.faLegalIndex strong { display: block; margin-bottom: 0.35rem; color: var(--highlight-color); text-transform: uppercase; font-size: 0.85rem; letter-spacing: 0.02em; }
.faLegalIndex span { font-size: 0.85rem; color: var(--muted-text-color); }

@media (max-width: 40rem) {
	.faLegalToc ol { columns: 1; }
}
