/* Legal pages of the web apps (terms, privacy): same palette and type as apps/messages and apps/coach. */
:root {
	--rose: #ed5c6d;
	--crimson: #c52233;
	--wine: #a51c30;
	--deep: #5f021f;
	--blush: #ffe4e3;
	--cream: #fff7f3;
	--ink: #2b0d15;
	--muted: #8b6770;
	--line: rgba(95, 2, 31, .12);
	--card: #fff;
	--shadow: 0 1px 2px rgba(95, 2, 31, .08), 0 12px 32px -12px rgba(95, 2, 31, .28);
	--spring: cubic-bezier(.34, 1.56, .64, 1);
	--out: cubic-bezier(.16, 1, .3, 1);
	--serif: "Fraunces", Georgia, "Times New Roman", serif;
	--sans: "Manrope", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
	--bar-h: 64px;
	--gutter: clamp(16px, 4vw, 40px);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--bar-h) + 24px); }
body {
	margin: 0;
	min-height: 100vh;
	font: 500 16px/1.65 var(--sans);
	color: var(--ink);
	background:
		radial-gradient(1200px 700px at 110% -10%, rgba(237, 92, 109, .22), transparent 60%),
		radial-gradient(900px 600px at -20% 110%, rgba(165, 28, 48, .14), transparent 60%),
		var(--cream);
	background-attachment: fixed;
	overflow-x: hidden;
}
img { max-width: 100%; }
a { color: var(--crimson); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: var(--deep); }
::selection { background: var(--rose); color: #fff; }
:focus-visible { outline: 3px solid var(--rose); outline-offset: 3px; border-radius: 12px; }

.skip { position: absolute; left: 16px; top: -60px; z-index: 50; padding: 10px 16px; border-radius: 999px; background: var(--deep); color: #fff; font-weight: 700; text-decoration: none; }
.skip:focus { top: 12px; color: #fff; }

/* ---------- top bar ---------- */
.bar {
	position: fixed; z-index: 40; left: 0; right: 0; top: 0;
	height: calc(var(--bar-h) + env(safe-area-inset-top, 0px));
	padding: env(safe-area-inset-top, 0px) var(--gutter) 0;
	display: flex; align-items: center; justify-content: space-between; gap: 12px;
	background: linear-gradient(to bottom, rgba(255, 247, 243, .92), rgba(255, 247, 243, .6));
	backdrop-filter: blur(14px) saturate(1.3);
	-webkit-backdrop-filter: blur(14px) saturate(1.3);
	border-bottom: 1px solid var(--line);
}
.bar__brand { display: flex; align-items: center; gap: 10px; min-width: 0; color: var(--ink); text-decoration: none; }
.bar__brand:hover { color: var(--ink); }
.bar__icon { flex: none; width: 40px; height: 40px; border-radius: 11px; box-shadow: 0 6px 16px -6px rgba(197, 34, 51, .6); transition: transform .5s var(--spring); }
.bar__brand:hover .bar__icon { transform: rotate(-10deg) scale(1.08); }
.bar__title { font: 600 1.15rem/1.1 var(--serif); letter-spacing: -.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bar__actions { display: flex; align-items: center; gap: 8px; }

.chip {
	display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 14px;
	border: 1.5px solid var(--line); border-radius: 999px; background: #fff;
	color: var(--wine); font: 700 .88rem/1 var(--sans); text-decoration: none; white-space: nowrap;
	transition: transform .35s var(--spring), background-color .25s, color .25s, border-color .25s;
}
.chip:hover { transform: translateY(-2px); color: var(--wine); background: var(--blush); }
.chip img { width: 20px; height: 14px; border-radius: 3px; object-fit: cover; }
.chip--solid { background: var(--crimson); border-color: var(--crimson); color: #fff; }
.chip--solid:hover { background: var(--deep); border-color: var(--deep); color: #fff; }

/* ---------- hero ---------- */
.page { position: relative; padding: calc(var(--bar-h) + env(safe-area-inset-top, 0px) + clamp(28px, 6vw, 64px)) var(--gutter) 0; }
.hero, .facts, .layout { max-width: 1120px; margin-left: auto; margin-right: auto; }
.hero { display: grid; gap: 18px; margin-bottom: clamp(28px, 5vw, 44px); animation: enter .8s var(--out) both; }
.eyebrow { font: 800 .72rem/1 var(--sans); letter-spacing: .16em; text-transform: uppercase; color: var(--rose); }
.breadcrumb { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.breadcrumb li + li::before { content: "/"; margin-right: 8px; color: var(--muted); }
.breadcrumb a { color: var(--rose); text-decoration: none; }
.breadcrumb a:hover { text-decoration: underline; }
.hero h1 { max-width: 16ch; margin: 0; font: 400 clamp(2.4rem, 7.5vw, 4.8rem)/.98 var(--serif); letter-spacing: -.03em; }
.hero h1 em { font-style: italic; color: var(--crimson); }
.lead { max-width: 62ch; margin: 0; font-size: clamp(1.02rem, 2.2vw, 1.18rem); color: var(--muted); }
.meta { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 0; padding: 0; list-style: none; }
.meta li { display: inline-flex; align-items: center; gap: 8px; min-height: 34px; padding: 0 14px; border-radius: 999px; background: rgba(255, 255, 255, .7); box-shadow: inset 0 0 0 1px var(--line); font-size: .85rem; font-weight: 700; color: var(--wine); }
.meta svg { width: 16px; height: 16px; fill: none; stroke: var(--rose); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
@keyframes enter { from { opacity: 0; transform: translateY(28px); } }

/* key facts */
.facts { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); margin-bottom: clamp(28px, 5vw, 48px); padding: 0; list-style: none; }
.fact { display: grid; gap: 6px; align-content: start; padding: 20px 22px; border-radius: 24px; background: var(--card); box-shadow: var(--shadow); animation: enter .8s var(--out) both; animation-delay: calc(var(--i, 0) * 70ms + 150ms); }
.fact svg { width: 38px; height: 38px; padding: 8px; margin-bottom: 4px; border-radius: 12px; background: var(--blush); fill: none; stroke: var(--crimson); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.fact strong { font: 600 1.12rem/1.2 var(--serif); }
.fact span { font-size: .9rem; line-height: 1.5; color: var(--muted); }

/* ---------- document ---------- */
.layout { display: grid; gap: clamp(20px, 3vw, 36px); grid-template-columns: minmax(0, 1fr); align-items: start; }
@media (min-width: 960px) { .layout { grid-template-columns: 260px minmax(0, 1fr); } }

.toc { padding: 20px 14px 20px 20px; border-radius: 24px; background: rgba(255, 255, 255, .7); box-shadow: inset 0 0 0 1px var(--line); }
@media (min-width: 960px) {
	.toc { position: sticky; top: calc(var(--bar-h) + 24px); max-height: calc(100vh - var(--bar-h) - 48px); overflow-y: auto; }
}
.toc h2 { margin: 0 0 10px; }
.toc ol { margin: 0; padding: 0; list-style: none; counter-reset: toc; }
.toc li { counter-increment: toc; }
.toc a { display: flex; gap: 10px; padding: 7px 10px; border-radius: 12px; color: var(--ink); font-size: .9rem; line-height: 1.35; text-decoration: none; transition: background-color .25s, padding-left .35s var(--spring); }
.toc a::before { content: counter(toc, decimal-leading-zero); flex: none; min-width: 1.7em; font-variant-numeric: tabular-nums; font: 800 .72rem/1.9 var(--sans); color: var(--rose); }
.toc a:hover { background: var(--blush); padding-left: 16px; color: var(--ink); }
@media (max-width: 959px) {
	.toc details > summary { cursor: pointer; list-style: none; display: flex; justify-content: space-between; align-items: center; }
	.toc details > summary::-webkit-details-marker { display: none; }
	.toc details > summary::after { content: "+"; font: 400 1.6rem/1 var(--serif); color: var(--rose); transition: transform .35s var(--spring); }
	.toc details[open] > summary::after { transform: rotate(45deg); }
	.toc details[open] > summary { margin-bottom: 8px; }
	.toc summary h2 { margin: 0; }
}
@media (min-width: 960px) { .toc summary { pointer-events: none; list-style: none; } .toc summary::-webkit-details-marker { display: none; } }

.doc { min-width: 0; padding: clamp(22px, 5vw, 56px); border-radius: 32px; background: var(--card); box-shadow: var(--shadow); counter-reset: sec; }
.doc section { counter-increment: sec; }
.doc section + section { margin-top: clamp(32px, 5vw, 48px); padding-top: clamp(32px, 5vw, 48px); border-top: 1px solid var(--line); }
.doc h2 { display: flex; align-items: baseline; gap: 14px; margin: 0 0 16px; font: 600 clamp(1.4rem, 3.6vw, 1.9rem)/1.15 var(--serif); letter-spacing: -.02em; }
.doc h2::before {
	content: counter(sec); flex: none; display: inline-grid; place-items: center; min-width: 34px; height: 34px; padding: 0 8px;
	border-radius: 999px; background: linear-gradient(135deg, var(--rose), var(--crimson)); color: #fff;
	font: 800 .85rem/1 var(--sans); transform: translateY(-4px);
}
.doc h3 { margin: 24px 0 8px; font: 800 .8rem/1.3 var(--sans); letter-spacing: .12em; text-transform: uppercase; color: var(--wine); }
.doc p, .doc li, .doc dd { max-width: 72ch; overflow-wrap: anywhere; }
.doc p { margin: 0 0 12px; }
.doc ul { margin: 0 0 14px; padding: 0; list-style: none; }
.doc ul li { position: relative; margin: 0 0 8px; padding-left: 24px; }
.doc ul li::before { content: ""; position: absolute; left: 4px; top: .62em; width: 8px; height: 8px; border-radius: 50%; background: var(--rose); }
.doc strong { color: var(--deep); }
.doc section:target h2 { color: var(--crimson); }

.note { margin: 18px 0; padding: 16px 20px; border-radius: 20px 20px 20px 6px; background: var(--blush); color: var(--deep); }
.note p:last-child { margin-bottom: 0; }

.id { display: grid; grid-template-columns: minmax(0, 1fr); gap: 2px 20px; margin: 0 0 14px; padding: 18px 20px; border-radius: 20px; background: var(--cream); }
.id dt { font: 800 .72rem/1.3 var(--sans); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.id dd { margin: 0 0 10px; }
@media (min-width: 640px) { .id { grid-template-columns: 180px minmax(0, 1fr); } .id dt { padding-top: .35em; } .id dd { margin: 0 0 8px; } }

.table { margin: 8px 0 16px; overflow-x: auto; border-radius: 20px; box-shadow: inset 0 0 0 1px var(--line); }
.table table { width: 100%; min-width: 560px; border-collapse: collapse; font-size: .92rem; }
.table th, .table td { padding: 12px 16px; text-align: left; vertical-align: top; }
.table th { background: var(--cream); font: 800 .72rem/1.3 var(--sans); letter-spacing: .1em; text-transform: uppercase; color: var(--wine); }
.table tr + tr td { border-top: 1px solid var(--line); }

/* ---------- footer ---------- */
.foot { margin-top: clamp(48px, 8vw, 96px); padding: clamp(36px, 6vw, 56px) var(--gutter) calc(32px + env(safe-area-inset-bottom, 0px)); background: linear-gradient(135deg, var(--rose), var(--wine) 60%, var(--deep)); color: #fff; }
.foot__in { max-width: 1120px; margin: 0 auto; display: grid; gap: 28px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); }
.foot__logo { width: min(100%, 240px); height: auto; }
.foot h2 { margin: 0 0 10px; font: 800 .72rem/1 var(--sans); letter-spacing: .16em; text-transform: uppercase; color: rgba(255, 255, 255, .7); }
.foot ul { margin: 0; padding: 0; list-style: none; }
.foot li { margin: 0 0 6px; }
.foot a { color: #fff; text-decoration: none; }
.foot a:hover { color: #fff; text-decoration: underline; }
.foot a[aria-current="page"] { text-decoration: underline; text-decoration-color: rgba(255, 255, 255, .5); }
.foot p { margin: 0; font-size: .9rem; color: rgba(255, 255, 255, .78); }
.foot .foot__small { max-width: 1120px; margin: 32px auto 0; padding-top: 20px; border-top: 1px solid rgba(255, 255, 255, .2); font-size: .82rem; color: rgba(255, 255, 255, .7); }

@media (max-width: 560px) {
	:root { --bar-h: 58px; }
	.bar__title { font-size: 1rem; }
	.bar__icon { width: 34px; height: 34px; }
	.chip { min-height: 36px; padding: 0 11px; }
}
@media (max-width: 440px) {
	.bar__title { display: none; }
}

@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	*, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

@media print {
	body { background: #fff; }
	.bar, .toc, .facts, .skip, .foot { display: none; }
	.page { padding-top: 0; }
	.doc { box-shadow: none; padding: 0; }
	.layout { display: block; }
}
