/**
 * Giving guidelines content.
 *
 * The guidelines sit in ordinary page content, outside the form, so they
 * inherit whatever the theme does with headings and body text. On a theme with
 * a large display scale that leaves 40px headings above 14px body copy, and the
 * page stops looking like it belongs with the form underneath it.
 *
 * Wrapping the content in .superc-guidelines gives it a type scale that matches
 * the form, so the page reads as one piece.
 *
 * The !important flags are deliberate and scoped to this container. Theme rules
 * like `.entry-content h2 { font-size: 2.5rem }` out-specify anything sensible
 * we can write here, and inheritance loses to any direct rule on the element —
 * the same problem the form's font had. This is the only thing that reliably
 * wins against CSS we cannot see.
 */

.superc-guidelines {
	--superc-g-ink: #1c1f23;
	--superc-g-body: #2b323b;
	--superc-g-muted: #5f6b7a;
	--superc-g-line: #e8ecf1;
	--superc-g-accent: #c8102e;
	--superc-g-font: "Open Sans", -apple-system, BlinkMacSystemFont, "Segoe UI",
		Roboto, "Helvetica Neue", "Noto Sans", Arial, sans-serif;

	max-width: 780px;
	margin-left: auto;
	margin-right: auto;
	color: var(--superc-g-body);
	text-align: left;
}

.superc-guidelines,
.superc-guidelines * {
	font-family: var(--superc-g-font) !important;
}

.superc-guidelines p,
.superc-guidelines li {
	font-size: 1rem !important;
	line-height: 1.65 !important;
	color: var(--superc-g-body);
}

.superc-guidelines p {
	margin: 0 0 16px !important;
}

/* ---------- Headings ---------- */

.superc-guidelines h2 {
	font-size: 1.5rem !important;
	line-height: 1.25 !important;
	font-weight: 650 !important;
	letter-spacing: -0.012em !important;
	color: var(--superc-g-ink) !important;
	margin: 40px 0 12px !important;
	padding: 0 !important;
	border: 0 !important;
	text-transform: none !important;
}

.superc-guidelines h2:first-child {
	margin-top: 0 !important;
}

.superc-guidelines h3 {
	font-size: 1.1rem !important;
	line-height: 1.3 !important;
	font-weight: 650 !important;
	color: var(--superc-g-ink) !important;
	margin: 28px 0 10px !important;
	padding: 0 !important;
	border: 0 !important;
	text-transform: none !important;
}

/* ---------- Lists ---------- */

.superc-guidelines ul,
.superc-guidelines ol {
	margin: 0 0 18px !important;
	padding-left: 22px !important;
}

.superc-guidelines li {
	margin-bottom: 7px !important;
}

.superc-guidelines li::marker {
	color: var(--superc-g-muted);
}

.superc-guidelines strong {
	font-weight: 650;
	color: var(--superc-g-ink);
}

/* ---------- The rule before the form ---------- */

.superc-guidelines hr {
	height: 1px;
	border: 0;
	background: var(--superc-g-line);
	margin: 36px 0 !important;
}

@media (max-width: 640px) {
	.superc-guidelines h2 {
		font-size: 1.32rem !important;
		margin-top: 32px !important;
	}

	.superc-guidelines h3 {
		font-size: 1.05rem !important;
	}
}

/* ------------------------------------------------------------------ */
/* A separator sitting directly above the form                          */
/* ------------------------------------------------------------------ */

/*
 * This is page content, not the plugin's markup — a theme or page-builder
 * separator somebody put between the guidelines and the form. Reaching out
 * of the widget to style the page around it is normally the wrong instinct,
 * so the selector is deliberately narrow: :has(+ .superc-form-wrap) matches
 * ONLY a rule whose very next sibling is this form. Any other separator on
 * the site, on this page or elsewhere, is untouched.
 *
 * What it fixes: the theme draws it at full column width in mid grey, above
 * a 780px card, so it reads as a line belonging to something else. Matching
 * the form's width and softening the colour makes it a divider rather than
 * a rule across the page.
 *
 * Browsers without :has() (Safari under 15.4, Firefox under 121) simply keep
 * the theme's version. It looks slightly heavy there; nothing breaks.
 */
hr:has(+ .superc-form-wrap) {
	max-width: 780px;
	margin: 3rem auto 0;
	height: 0;
	border: 0;
	border-top: 1px solid #e8ecf1;
	background: none;
	opacity: 1;
}


/* ------------------------------------------------------------------ */
/* The way in                                                          */
/* ------------------------------------------------------------------ */

/*
 * The whole point of the page is the form, and until now the form was the
 * last thing on it. This is the shortcut for anyone who already knows what
 * they are asking for; the guidelines stay for anyone who does not.
 */
.superc-guidelines__cta {
	margin: 1.75rem 0 0;
}

.superc-cta {
	display: inline-block;
	padding: 14px 26px;
	border-radius: 8px;
	background: var(--superc-accent, #c8102e);
	color: #fff;
	font-size: 1rem;
	font-weight: 650;
	line-height: 1.2;
	text-decoration: none;
}

.superc-cta:hover,
.superc-cta:focus {
	background: #a60d26;
	color: #fff;
	text-decoration: none;
}
