/*
 * OmniResponse legal pages (privacy policy, terms) – stage D, 2026-10-02.
 * Loaded by mu-plugins/omni-legal-styles.php only on pages whose content has the wrapper class "omni-legal"
 * (core blocks: group > heading / paragraph / list / table). Builds on omni-brand.css (palette roles, --omni-* tokens).
 * Long-text typography on the dark theme: one column of ~72ch, line-height 1.7, left aligned, hanging clause numbers.
 */

/* The page uses Kadence's transparent header over a full-width content area: the top padding clears the header
   (--omni-header-h) and the side padding keeps the text off the screen edges on mobile. */
:is(.entry-content, .editor-styles-wrapper) .omni-legal {
	box-sizing: border-box;
	max-width: calc(72ch + 48px);
	margin: 0 auto;
	padding: calc(var(--omni-header-h, 80px) + 48px) 24px 104px;
	color: var(--global-palette4);
	font-size: 17px;
	line-height: 1.7;
}
.editor-styles-wrapper .omni-legal { padding-top: 24px; }
:is(.entry-content, .editor-styles-wrapper) .omni-legal p,
:is(.entry-content, .editor-styles-wrapper) .omni-legal li { max-width: none; text-align: left; }

/* Title block */
:is(.entry-content, .editor-styles-wrapper) .omni-legal .omni-legal-title {
	margin: 0 0 0.35em;
	font-size: clamp(34px, 2vw + 22px, 46px);
	line-height: 1.15;
	color: var(--global-palette3);
}
:is(.entry-content, .editor-styles-wrapper) .omni-legal .omni-legal-doctitle {
	margin: 0 0 0.2em;
	font-size: 18px;
	letter-spacing: 0.02em;
	color: var(--global-palette3);
}
:is(.entry-content, .editor-styles-wrapper) .omni-legal .omni-legal-meta { margin: 0; color: var(--global-palette5); font-size: 16px; }

/* Table of contents (documents with more than 8 sections) */
:is(.entry-content, .editor-styles-wrapper) .omni-legal .omni-legal-toc-label {
	margin: 2.2em 0 0;
	padding: 20px 24px 0;
	background: var(--global-palette7);
	border: 1px solid var(--omni-card-line, #2A4A73);
	border-bottom: 0;
	border-radius: var(--omni-radius, 12px) var(--omni-radius, 12px) 0 0;
	color: var(--global-palette3);
	font-size: 16px;
}
:is(.entry-content, .editor-styles-wrapper) .omni-legal ul.omni-legal-toc {
	margin: 0;
	padding: 10px 24px 20px;
	list-style: none;
	background: var(--global-palette7);
	border: 1px solid var(--omni-card-line, #2A4A73);
	border-top: 0;
	border-radius: 0 0 var(--omni-radius, 12px) var(--omni-radius, 12px);
	columns: 2;
	column-gap: 32px;
	font-size: 15px;
	line-height: 1.45;
}
:is(.entry-content, .editor-styles-wrapper) .omni-legal ul.omni-legal-toc li { margin: 0 0 0.55em; break-inside: avoid; }
:is(.entry-content, .editor-styles-wrapper) .omni-legal ul.omni-legal-toc a { color: var(--global-palette2); text-decoration: none; }
:is(.entry-content, .editor-styles-wrapper) .omni-legal ul.omni-legal-toc a:hover { text-decoration: underline; text-underline-offset: 0.2em; }

/* Section headings (document sections 1., 2., ...) */
:is(.entry-content, .editor-styles-wrapper) .omni-legal h2 {
	margin: 2.4em 0 0.75em;
	font-size: clamp(20px, 0.5vw + 17px, 23px);
	line-height: 1.3;
	letter-spacing: 0.01em;
	color: var(--global-palette3);
	scroll-margin-top: calc(var(--omni-header-h, 80px) + 16px);
}

/* FAQ (stage SEO, 2026-10-03): the same long-text column; questions are h3, the answer follows directly. */
:is(.entry-content, .editor-styles-wrapper) .omni-legal .omni-eyebrow { margin: 0 0 0.6em; }
:is(.entry-content, .editor-styles-wrapper) .omni-legal .omni-lead { margin: 0 0 0.5em; }
:is(.entry-content, .editor-styles-wrapper) .omni-legal h3 {
	margin: 1.7em 0 0.35em;
	font-size: clamp(18px, 0.3vw + 16px, 20px);
	line-height: 1.35;
	color: var(--global-palette3);
}
:is(.entry-content, .editor-styles-wrapper) .omni-legal h2 + h3 { margin-top: 0.6em; }
:is(.entry-content, .editor-styles-wrapper) .omni-legal h3 + p { margin-top: 0; }
:is(.entry-content, .editor-styles-wrapper) .omni-legal .omni-faq-next {
	margin-top: 2.6em;
	padding-top: 1.4em;
	border-top: 1px solid var(--omni-card-line, #2A4A73);
	color: var(--global-palette5);
}

/* Numbered clauses: the number from the document is part of the text (span), browser numbering is off */
:is(.entry-content, .editor-styles-wrapper) .omni-legal ol.omni-legal-list,
:is(.entry-content, .editor-styles-wrapper) .omni-legal ol.omni-legal-list ol {
	list-style: none;
	margin: 0 0 1em;
	padding: 0;
}
:is(.entry-content, .editor-styles-wrapper) .omni-legal ol.omni-legal-list ol { margin: 0.5em 0 0; }
:is(.entry-content, .editor-styles-wrapper) .omni-legal ol.omni-legal-list > li {
	position: relative;
	margin: 0 0 0.75em;
	padding-left: 3.4em;
}
:is(.entry-content, .editor-styles-wrapper) .omni-legal ol.omni-legal-list ol > li {
	position: relative;
	margin: 0 0 0.45em;
	padding-left: 3.6em;
}
:is(.entry-content, .editor-styles-wrapper) .omni-legal .omni-legal-num {
	position: absolute;
	left: 0;
	top: 0;
	color: var(--global-palette5);
	font-weight: 600;
	font-variant-numeric: tabular-nums;
}

/* Links, emphasis */
:is(.entry-content, .editor-styles-wrapper) .omni-legal a { color: var(--global-palette2); text-decoration: underline; text-underline-offset: 0.18em; overflow-wrap: anywhere; }
:is(.entry-content, .editor-styles-wrapper) .omni-legal a:hover { color: var(--global-palette3); }
:is(.entry-content, .editor-styles-wrapper) .omni-legal em { font-style: italic; }
:is(.entry-content, .editor-styles-wrapper) .omni-legal sup { font-size: 0.72em; line-height: 0; }
:is(.entry-content, .editor-styles-wrapper) .omni-legal sup a { text-decoration: none; padding: 0 0.1em; }

/* Table */
:is(.entry-content, .editor-styles-wrapper) .omni-legal .omni-legal-table { margin: 0.5em 0 1.4em 3.4em; overflow-x: auto; }
:is(.entry-content, .editor-styles-wrapper) .omni-legal .omni-legal-table table { width: 100%; border-collapse: collapse; font-size: 16px; line-height: 1.5; }
:is(.entry-content, .editor-styles-wrapper) .omni-legal .omni-legal-table th,
:is(.entry-content, .editor-styles-wrapper) .omni-legal .omni-legal-table td {
	border: 1px solid var(--omni-card-line, #2A4A73);
	padding: 10px 14px;
	text-align: left;
	vertical-align: top;
}
:is(.entry-content, .editor-styles-wrapper) .omni-legal .omni-legal-table th { background: var(--global-palette7); color: var(--global-palette3); }
:is(.entry-content, .editor-styles-wrapper) .omni-legal .omni-legal-table thead { border-bottom: 2px solid var(--global-palette6); }

/* Footnotes */
:is(.entry-content, .editor-styles-wrapper) .omni-legal .omni-legal-fn-sep { width: 120px; margin: 2.5em 0 1em; border: 0; border-top: 1px solid var(--omni-card-line, #2A4A73); opacity: 1; }
:is(.entry-content, .editor-styles-wrapper) .omni-legal .omni-legal-footnote { color: var(--global-palette5); font-size: 15px; line-height: 1.55; }
:is(.entry-content, .editor-styles-wrapper) .omni-legal .omni-legal-footnote sup { margin-right: 0.2em; }

@media (max-width: 767px) {
	:is(.entry-content, .editor-styles-wrapper) .omni-legal { padding: calc(var(--omni-header-h, 80px) + 24px) 20px 64px; font-size: 16.5px; line-height: 1.65; }
	:is(.entry-content, .editor-styles-wrapper) .omni-legal ul.omni-legal-toc { columns: 1; }
	:is(.entry-content, .editor-styles-wrapper) .omni-legal ol.omni-legal-list > li { padding-left: 2.5em; }
	:is(.entry-content, .editor-styles-wrapper) .omni-legal ol.omni-legal-list ol > li { padding-left: 3.3em; }
	:is(.entry-content, .editor-styles-wrapper) .omni-legal .omni-legal-table { margin-left: 0; }
}
