/* ============================================================================
   Legal pages — Terms of Service, Privacy Policy, Community Guidelines,
   Acknowledgements (2026-10-02). Loaded after site.css + company.css by the
   four pages build-content.mjs generates from content/legal/*.md; behaviour
   in legal.js. These are HeyU-section pages (no body.company), so the
   components run on the ink + indigo tokens.

     .lg-hero      the company subpages' cover (.c-page-hero) in indigo smoke,
                   a little shorter; its foot carries the document switcher
                   and the summary + meta line
     .lg-layout    the document beside a sticky contents rail; the rail marks
                   the section in view and fills a hairline with reading
                   progress (legal.js). Phones: one column, the rail folds
                   into a Contents button above the text
     .lg-article   the text itself, on the shared .doc typography; every
                   section opens on a hairline with its number as a mono
                   kicker; Privacy's "short version" sits in a summary panel
     .lg-next      the other three documents as large link rows
   ========================================================================== */

/* ---------------------------------------------------------------- hero */
.hero.c-page-hero.lg-hero { min-height: min(72svh, 760px); }
/* sized by the title's longest word (--lg-word, from the builder) against
   the container, so a long single word never runs off a phone */
.lg-hero .container { container-type: inline-size; }
.lg-hero .display {
	font-size: min(8.6rem, 13vw, calc(100cqw / (var(--lg-word, 10) * 0.6)));
	max-width: 13ch;
}
.lg-switch {
	display: grid;
	justify-items: start;
	gap: 0.15rem;
}
.lg-switch a {
	display: inline-flex;
	align-items: center;
	gap: 0.6rem;
	padding-block: 0.2rem;
	font-family: var(--font-mono);
	font-size: 0.74rem;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--text-mute);
	transition: color 0.25s var(--ease);
}
.lg-switch a::before {
	content: '';
	width: 7px; height: 7px;
	border-radius: 50%;
	border: 1px solid currentColor;
	flex: none;
	opacity: 0.6;
}
.lg-switch a:hover,
.lg-switch a:focus-visible { color: var(--text); }
.lg-switch a[aria-current="page"] { color: var(--text); }
.lg-switch a[aria-current="page"]::before {
	background: var(--accent-2);
	border-color: var(--accent-2);
	opacity: 1;
}
.lg-hero-copy { display: grid; gap: 1.1rem; }

/* -------------------------------------------------------------- layout */
.section.lg-body { padding-top: clamp(3rem, 6vw, 5.5rem); }
.lg-layout {
	display: grid;
	grid-template-columns: minmax(15rem, 0.38fr) minmax(0, 1fr);
	gap: clamp(2rem, 5vw, 5.5rem);
	align-items: start;
}
.lg-layout.no-rail { grid-template-columns: minmax(0, 1fr); }

/* ---------------------------------------------------------- the rail */
.lg-rail {
	position: sticky;
	top: 6.5rem;
	max-height: calc(100svh - 8rem);
	overflow-y: auto;
	overscroll-behavior: contain;
	scrollbar-width: none;
	padding-bottom: 1rem;
}
.lg-rail::-webkit-scrollbar { display: none; }
.lg-toc-label { display: flex; margin-bottom: 1.2rem; }
.lg-toc-toggle,
.lg-toc-toggle[hidden],
.lg-print[hidden] { display: none; }
.lg-toc-list {
	list-style: none;
	margin: 0;
	padding: 0;
	position: relative;
}
/* the reading-progress hairline: a faint track, filled by legal.js section
   by section, so its end sits beside the entry being read */
.lg-toc-list::before,
.lg-toc-list::after {
	content: '';
	position: absolute;
	left: 0; top: 0;
	width: 1px;
}
.lg-toc-list::before { bottom: 0; background: var(--hairline); }
.lg-toc-list::after {
	height: var(--lg-fill, 0);
	background: var(--accent-2);
	transition: height 0.15s linear;
}
.lg-toc-list a {
	display: grid;
	grid-template-columns: 2rem minmax(0, 1fr);
	align-items: baseline;
	padding: 0.34rem 0 0.34rem 1.1rem;
	font-size: 0.92rem;
	line-height: 1.35;
	color: var(--text-mute);
	transition: color 0.25s var(--ease);
}
.lg-toc-num {
	font-family: var(--font-mono);
	font-size: 0.7rem;
	letter-spacing: 0.04em;
	font-variant-numeric: tabular-nums;
	color: var(--text-faint);
	transition: color 0.25s var(--ease);
}
.lg-toc-list a:hover,
.lg-toc-list a:focus-visible { color: var(--text); }
.lg-toc-list a.is-active { color: var(--text); }
.lg-toc-list a.is-active .lg-toc-num { color: var(--accent-2); }
.lg-print {
	margin-top: 1.8rem;
	padding: 0;
	background: none;
	border: 0;
	cursor: pointer;
	transition: color 0.25s var(--ease);
}
.lg-print:hover,
.lg-print:focus-visible { color: var(--text); }

/* -------------------------------------------------------- the article */
.doc.lg-article {
	max-width: 44rem;
	margin: 0;
	padding: 0;
	font-size: 1.04rem;
	line-height: 1.72;
}
.lg-intro p {
	font-size: clamp(1.14rem, 1.5vw, 1.32rem);
	line-height: 1.55;
	letter-spacing: -0.01em;
	color: var(--text);
	margin-bottom: 1.1rem;
}
.lg-intro p:last-child { margin-bottom: 0; }

.lg-sec {
	margin-top: clamp(2.6rem, 4.6vw, 3.8rem);
	padding-top: clamp(1.2rem, 2vw, 1.6rem);
	border-top: 1px solid var(--hairline-2);
}
.lg-article > .lg-sec:first-child { margin-top: 0; }
.doc .lg-sec h2 {
	margin: 0 0 1.2rem;
	font-size: clamp(1.65rem, 2.6vw, 2.35rem);
	font-weight: 600;
	letter-spacing: -0.035em;
	line-height: 1.08;
	text-wrap: balance;
	scroll-margin-top: 7.5rem;
}
.lg-num {
	display: block;
	margin-bottom: 0.9rem;
	font-family: var(--font-mono);
	font-size: 0.72rem;
	font-weight: 500;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--accent-2);
}
.doc .lg-sec h3 {
	margin: 2.1rem 0 0.6rem;
	font-size: 1.16rem;
	font-weight: 600;
	letter-spacing: -0.015em;
	line-height: 1.3;
}
.doc .lg-sec h2 + h3 { margin-top: 0.4rem; }
/* a contents jump focuses the heading (for screen readers); no ring for
   pointer users */
.lg-sec h2:focus:not(:focus-visible) { outline: none; }
.doc.lg-article ul,
.doc.lg-article ol { margin-bottom: 1.3rem; }
.doc.lg-article li { line-height: 1.62; }
.doc.lg-article strong { color: var(--text); font-weight: 600; }

/* Privacy's "The short version": a summary panel, its points as rows */
.lg-sec.lg-sec-lead {
	padding: clamp(1.4rem, 3vw, 2.4rem);
	border-top: 0;
	border-radius: var(--radius-lg);
	background:
		radial-gradient(70% 90% at 100% 0%, rgba(107, 94, 246, 0.22), transparent 70%),
		var(--bg-1);
}
.doc .lg-sec-lead ul { gap: 0; margin-bottom: 0; }
.doc .lg-sec-lead ul li {
	padding: 0.8rem 0 0.8rem 1.6rem;
	border-top: 1px solid var(--hairline);
	font-size: clamp(1.02rem, 1.3vw, 1.12rem);
	color: var(--text);
}
.doc .lg-sec-lead ul li::before { top: calc(0.8rem + 0.6em); }

/* A quoted rule (the Guidelines' zero-tolerance clause): a statement
   panel, its bold opening line set as the panel's heading */
.doc.lg-article blockquote {
	position: relative;
	margin: 2rem 0;
	padding: clamp(1.3rem, 2.6vw, 1.9rem) clamp(1.3rem, 2.6vw, 2rem) clamp(1.3rem, 2.6vw, 1.9rem) calc(clamp(1.3rem, 2.6vw, 2rem) + 4px);
	border: 0;
	border-radius: var(--radius-lg);
	background: rgba(255, 90, 80, 0.08);
	color: var(--text-soft);
	font-size: 1.04rem;
	line-height: 1.65;
	overflow: hidden;
}
.doc.lg-article blockquote::before {
	content: '';
	position: absolute;
	left: 0; top: 0; bottom: 0;
	width: 4px;
	background: #ff6a5f;
}
.doc.lg-article blockquote > strong:first-child {
	display: block;
	margin-bottom: 0.55rem;
	font-family: var(--font-display);
	font-size: clamp(1.25rem, 2vw, 1.55rem);
	font-weight: 600;
	letter-spacing: -0.025em;
	line-height: 1.2;
	color: var(--text);
}

/* --------------------------------------------------------- also read */
.lg-next-rows { border-top: 1px solid var(--hairline-2); }
.lg-next-row {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 26rem) 3rem;
	gap: 1rem clamp(1.5rem, 4vw, 4rem);
	align-items: center;
	padding-block: clamp(1.3rem, 2.6vw, 2.1rem);
	border-bottom: 1px solid var(--hairline);
}
.lg-next-title {
	font-family: var(--font-display);
	font-size: clamp(1.9rem, 4.4vw, 4.2rem);
	font-weight: 600;
	letter-spacing: -0.045em;
	line-height: 1;
	transition: color 0.3s var(--ease);
}
.lg-next-desc { font-size: 0.95rem; line-height: 1.5; color: var(--text-mute); }
.lg-next-arrow {
	justify-self: end;
	font-family: var(--font-display);
	font-size: clamp(1.6rem, 2.6vw, 2.4rem);
	line-height: 1;
	color: var(--text-mute);
	transition: transform 0.35s var(--ease), color 0.3s var(--ease);
}
.lg-next-row:hover .lg-next-title,
.lg-next-row:focus-visible .lg-next-title { color: var(--accent-2); }
.lg-next-row:hover .lg-next-arrow,
.lg-next-row:focus-visible .lg-next-arrow { color: var(--accent-2); transform: translateX(6px); }
.lg-ask { margin-top: clamp(1.6rem, 3vw, 2.4rem); }
.lg-ask a.inline { color: var(--text); border-bottom: 1px solid var(--hairline-2); }
.lg-ask a.inline:hover { color: var(--accent-2); }

/* ------------------------------------------------------------- tablet */
@media (max-width: 900px) {
	.lg-layout { grid-template-columns: minmax(0, 1fr); gap: 0; }
	.lg-rail {
		position: static;
		max-height: none;
		overflow: visible;
		padding-bottom: 0;
		margin-bottom: clamp(2.4rem, 6vw, 3.2rem);
	}
	.doc.lg-article { max-width: 46rem; }
	/* with legal.js, the contents fold into a button */
	html[data-ljs] .lg-toc-toggle:not([hidden]) {
		display: flex;
		justify-content: space-between;
		align-items: center;
		width: 100%;
		padding: 1rem 0;
		background: none;
		border: 0;
		border-top: 1px solid var(--hairline-2);
		border-bottom: 1px solid var(--hairline);
		color: var(--text);
		font-family: var(--font-mono);
		font-size: 0.76rem;
		letter-spacing: 0.14em;
		text-transform: uppercase;
		cursor: pointer;
	}
	.lg-toc-toggle span {
		display: inline-flex;
		align-items: center;
		gap: 0.9rem;
		color: var(--text-mute);
	}
	.lg-toc-toggle span::after {
		content: '+';
		font-family: var(--font-display);
		font-size: 1.3rem;
		letter-spacing: 0;
		line-height: 1;
		color: var(--text);
		transition: transform 0.3s var(--ease);
	}
	.lg-toc.is-open .lg-toc-toggle span::after { transform: rotate(45deg); }
	html[data-ljs] .lg-toc-label { display: none; }
	html[data-ljs] .lg-toc:not(.is-open) .lg-toc-list { display: none; }
	/* open, the list is a panel OVER the text: folding it again can't move
	   the page under a jump (legal.js) */
	html[data-ljs] .lg-toc { position: relative; z-index: 30; }
	html[data-ljs] .lg-toc.is-open .lg-toc-list {
		position: absolute;
		top: 100%;
		left: 0;
		right: 0;
		max-height: min(calc(100svh - 10rem), 34rem);
		overflow-y: auto;
		overscroll-behavior: contain;
		padding: 0.6rem 0.4rem 0.8rem;
		background: var(--bg-1);
		border: 1px solid var(--hairline-2);
		border-top: 0;
		border-radius: 0 0 var(--radius-lg) var(--radius-lg);
		box-shadow: 0 28px 60px rgba(0, 0, 0, 0.55);
	}
	/* the progress hairline belongs to the desktop rail; inside a scrolling
	   panel it would scroll away with the entries */
	html[data-ljs] .lg-toc-list::before,
	html[data-ljs] .lg-toc-list::after { display: none; }
	html[data-ljs] .lg-toc.is-open .lg-toc-list a { padding-left: 0.7rem; border-radius: 8px; }
	.lg-print { margin-top: 1.2rem; }
}

/* -------------------------------------------------------------- phone */
@media (max-width: 720px) {
	.lg-next-row {
		grid-template-columns: minmax(0, 1fr) auto;
		gap: 0.6rem 1rem;
	}
	.lg-next-desc { grid-column: 1; grid-row: 2; }
	.lg-print { display: none !important; }
	.lg-next-arrow { grid-column: 2; grid-row: 1; }
}

/* -------------------------------------------------------------- print */
@media print {
	.lg-hero .c-smoke, .lg-rail, .lg-next, .lg-switch { display: none !important; }
	html, .c-smoke-host.lg-hero, .section.lg-body { background: #fff !important; }
	.hero.c-page-hero.lg-hero { min-height: 0; padding: 0 0 1rem; }
	.lg-hero .display { font-size: 2.4rem; color: #000; max-width: none; }
	.lg-hero .m-label, .lg-hero .lede, .lg-hero .m-meta { color: #333; }
	.c-page-hero-foot { grid-template-columns: 1fr; border-color: #bbb; }
	.section.lg-body { padding-top: 1rem; border: 0; }
	.lg-layout { display: block; }
	.doc.lg-article { max-width: 100%; }
	.lg-intro p, .doc.lg-article strong { color: #000; }
	.lg-sec { border-color: #bbb; break-inside: auto; }
	.doc .lg-sec h2 { break-after: avoid; }
	.lg-num { color: #555; }
	.lg-sec.lg-sec-lead { background: #fff; border: 1px solid #bbb; }
	.doc .lg-sec-lead ul li { color: #000; border-color: #ddd; }
	.doc.lg-article blockquote { color: #000; background: #fff; border: 1px solid #999; }
	.doc.lg-article blockquote > strong:first-child { color: #000; }
	.doc.lg-article blockquote::before { background: #000; }
	.doc.lg-article a.inline { color: #000; border-bottom-color: #999; }
	.lg-hero .m-label.dot::before { background: #000; }
}
