/**
 * Gymnastics Plus - Legal document, WEBSITE door (page-legal-web.php)
 * ---------------------------------------------------------------------------
 * The Privacy Policy and Terms as a public page: the homepage's own header and
 * footer, with the document centred between them in one readable column.
 *
 * JP's reference (2026-09-05) measures a 768px centred column, a large title
 * and small bold section heads. The column below is 760px on OUR type ramp, so
 * it is the same shape in our own voice rather than a copy of someone else's
 * numbers.
 *
 * Tier-2/3 semantics only. No raw hex, no :root (CI enforces both), no fork of
 * a frozen component. The chrome's own colours come from gp-homepage.css,
 * which is already in the cascade for this template.
 */

.gp-legalw {
	background: var(--gp-color-bg);
	padding: 56px 0 72px;
}

/* The centred column. .wrap (gp-homepage.css) gives the page gutter; this
   gives the measure, and it is the whole point of the ask. */
.gp-legalw__doc {
	max-width: 760px;
	margin: 0 auto;
	background: var(--gp-color-surface);
	border: 1px solid var(--gp-color-border);
	border-radius: var(--gp-r-lg, 16px);
	padding: 48px 56px 56px;
	color: var(--gp-color-text);
	font-size: var(--gp-t-sub);
	line-height: 1.65;
	overflow-wrap: anywhere;
}

.gp-legalw__title {
	margin: 0 0 28px;
	font-size: var(--gp-t-xl);
	line-height: 1.15;
	font-weight: 700;
	letter-spacing: -0.02em;
	color: var(--gp-color-text);
}

/* ==========================================================================
   DOCUMENT TYPOGRAPHY. Scoped to __body so it styles the CONTENT and never
   the chrome above or below it.
   ========================================================================== */

.gp-legalw__body h1 {
	margin: 0 0 10px;
	font-size: var(--gp-t-lg);
	line-height: 1.2;
	font-weight: 700;
	color: var(--gp-color-text);
}

.gp-legalw__body h2 {
	margin: 34px 0 10px;
	font-size: var(--gp-t-md);
	line-height: 1.3;
	font-weight: 600;
	letter-spacing: -0.01em;
	color: var(--gp-color-text);
}

.gp-legalw__body h3,
.gp-legalw__body h4 {
	margin: 22px 0 8px;
	font-size: var(--gp-t-body);
	line-height: 1.35;
	font-weight: 600;
	color: var(--gp-color-text);
}

.gp-legalw__body h1:first-child,
.gp-legalw__body h2:first-child,
.gp-legalw__body h3:first-child {
	margin-top: 0;
}

.gp-legalw__body p {
	margin: 0 0 14px;
}

.gp-legalw__body p:last-child,
.gp-legalw__body ul:last-child,
.gp-legalw__body ol:last-child {
	margin-bottom: 0;
}

/* Bold runs keep their weight and take the text ink even where older content
   carried an inline colour. */
.gp-legalw__body strong,
.gp-legalw__body b {
	font-weight: 600;
	color: var(--gp-color-text-strong, var(--gp-color-text)) !important;
}

.gp-legalw__body em {
	font-style: italic;
}

.gp-legalw__body ul,
.gp-legalw__body ol {
	margin: 0 0 16px;
	padding-left: 1.4em;
}

.gp-legalw__body li {
	margin: 0 0 8px;
	padding-left: 2px;
}

.gp-legalw__body li:last-child {
	margin-bottom: 0;
}

.gp-legalw__body li > ul,
.gp-legalw__body li > ol {
	margin-top: 8px;
	margin-bottom: 0;
}

.gp-legalw__body a {
	color: var(--gp-color-accent-text);
	text-decoration: underline;
	text-underline-offset: 2px;
}

.gp-legalw__body hr {
	border: 0;
	border-top: 1px solid var(--gp-color-border);
	margin: 26px 0;
}

.gp-legalw__body blockquote {
	margin: 0 0 16px;
	padding: 2px 0 2px 16px;
	border-left: 3px solid var(--gp-color-border);
	color: var(--gp-color-text-secondary, var(--gp-color-text));
}

/* A table wider than the column scrolls inside itself, never the page. */
.gp-legalw__body table {
	display: block;
	width: 100%;
	max-width: 100%;
	overflow-x: auto;
	border-collapse: collapse;
	font-size: var(--gp-t-foot);
	margin: 0 0 16px;
}

.gp-legalw__body th,
.gp-legalw__body td {
	padding: 8px 10px;
	border-bottom: 1px solid var(--gp-color-border);
	text-align: left;
	vertical-align: top;
}

.gp-legalw__body img {
	max-width: 100%;
	height: auto;
}

/* Draft-only marker, shared with the app screen's handling. */
.gp-legalw__body .gp-gal__confirm {
	background: var(--gp-color-highlight-bg);
	color: var(--gp-color-text);
	border-radius: var(--gp-r-xs);
	padding: 0 4px;
	font-weight: 600;
}

/* ==========================================================================
   PHONE. The card loses its frame and runs to the gutter, so the measure is
   the screen rather than a narrow box inside it.
   ========================================================================== */

@media (max-width: 767px) {
	.gp-legalw {
		padding: 28px 0 40px;
	}

	.gp-legalw__doc {
		padding: 28px 20px 32px;
		border-left: 0;
		border-right: 0;
		border-radius: 0;
	}

	.gp-legalw__title {
		font-size: var(--gp-t-lg);
		margin-bottom: 20px;
	}

	.gp-legalw__body h2 {
		font-size: var(--gp-t-body);
	}
}
