/**
 * Answer block + FAQ, front end and editor canvas.
 *
 * Styled against the host theme's own tokens with quiet fallbacks. On the
 * repraesent theme (--ink, --hairline, --font-serif, --accent-sage ...) the
 * two sections read as native: eyebrow in mono, display serif, 1px rules, no
 * fills, no radius. On a theme without those tokens the fallbacks inherit
 * the surrounding type and colour, so nothing looks imported.
 *
 * Rules, never hex: the theme swaps every token under html[data-palette=...].
 * No --rb--preset-- vars: re:secure renames the --rb- prefix in public CSS.
 * No dark-mode media query: the theme is light-only and paints its dark
 * surfaces explicitly, and currentColor follows either.
 */

/* ------------------------------------------------------------------
 * Shared: each section carries its own width
 *
 * A theme may print the content bare, with no container of its own: the
 * repraesent theme does exactly that on pages, so a block at the top level of
 * <main> would otherwise run edge to edge. max-width does nothing inside a
 * narrower theme container, and the gutters below are added only where nothing
 * else supplies them, so a section nested in a container stays aligned with the
 * text around it.
 * --------------------------------------------------------------- */

.re-visible-answer,
.re-visible-faq {
	box-sizing: border-box;
	max-width: var(--content-max, 1280px);
	margin-inline: auto;
}

:is(main, body, .wp-site-blocks, .is-root-container) > .re-visible-answer,
:is(main, body, .wp-site-blocks, .is-root-container) > .re-visible-faq {
	padding-inline: var(--pad-x, 1.5rem);
}

/* ------------------------------------------------------------------
 * Shared: eyebrow label
 * --------------------------------------------------------------- */

.re-visible-answer__label,
.re-visible-faq__label {
	display: block;
	font-family: var(--font-mono, inherit);
	font-size: 0.8125rem;
	font-weight: 400;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	line-height: 1.2;
	color: var(--accent-sage, currentColor);
}

/* ------------------------------------------------------------------
 * Answer block: the one sentence the page exists to say
 * --------------------------------------------------------------- */

.re-visible-answer {
	margin-block: clamp(2rem, 4vw, 3rem);
	padding-block: clamp(1.5rem, 3vw, 2.25rem);
	border-top: 1px solid var(--hairline, color-mix(in srgb, currentColor 15%, transparent));
	border-bottom: 1px solid var(--hairline, color-mix(in srgb, currentColor 15%, transparent));
	border-radius: 0;
	background: transparent;
	box-shadow: none;
}

.re-visible-answer__label {
	margin: 0 0 0.875rem;
}

.re-visible-answer__text {
	margin: 0;
	max-width: 38rem;
	font-family: var(--font-serif, inherit);
	font-size: clamp(1.25rem, 2vw, 1.5rem);
	font-weight: 400;
	line-height: 1.35;
	letter-spacing: -0.015em;
	color: var(--ink, currentColor);
}

/* ------------------------------------------------------------------
 * FAQ: the theme's own FAQ grammar, minus <details>
 * --------------------------------------------------------------- */

.re-visible-faq {
	margin-block: clamp(2.5rem, 5vw, 4rem) 0;
	border: 0;
	border-radius: 0;
	background: transparent;
	box-shadow: none;
}

.re-visible-faq__header {
	margin: 0 0 1.5rem;
}

.re-visible-faq__label {
	margin: 0 0 0.5rem;
}

.re-visible-faq__title {
	margin: 0.5rem 0 0;
	font-family: var(--font-serif, inherit);
	font-weight: 400;
	line-height: 1.1;
	letter-spacing: -0.02em;
	color: var(--ink, currentColor);
}

.re-visible-faq__items {
	margin: 0;
	padding: 0;
}

.re-visible-faq__item {
	margin: 0;
	padding-block: 1rem;
	border-top: 1px solid var(--hairline, color-mix(in srgb, currentColor 15%, transparent));
}

.re-visible-faq__item:last-child {
	border-bottom: 1px solid var(--hairline, color-mix(in srgb, currentColor 15%, transparent));
}

.re-visible-faq__q {
	margin: 0;
	font-family: var(--font-serif, inherit);
	font-size: 1.25rem;
	font-weight: 400;
	line-height: 1.2;
	letter-spacing: -0.015em;
	color: var(--ink, currentColor);
}

.re-visible-faq__a {
	margin: 0.5rem 0 0;
	font-family: var(--font-sans, inherit);
	font-size: 1.0625rem;
	line-height: 1.6;
	color: var(--text-body, inherit);
}

@media (min-width: 900px) {
	.re-visible-faq {
		display: grid;
		grid-template-columns: minmax(14rem, 0.72fr) minmax(0, 1.28fr);
		column-gap: 48px;
		align-items: start;
	}

	.re-visible-faq__header {
		margin: 0;
		padding-top: 1rem;
	}
}

/* ------------------------------------------------------------------
 * Editor chrome (block canvas + inspector), spacing only
 * --------------------------------------------------------------- */

.re-visible-editor-count {
	display: block;
	margin-top: 0.75rem;
	font-family: var(--font-mono, inherit);
	font-size: 0.75rem;
	letter-spacing: 0.04em;
	color: var(--text-muted, inherit);
}

.re-visible-editor-count.is-good {
	color: var(--accent-sage, currentColor);
}

.re-visible-editor-count.is-warn {
	color: var(--accent-sand, currentColor);
}

.re-visible-editor-remove {
	margin-top: 0.5rem;
}

.re-visible-editor-add {
	padding-block: 1rem;
}

.re-visible-editor-suggestion {
	margin-top: 1rem;
	padding-top: 1rem;
	border-top: 1px solid var(--hairline, color-mix(in srgb, currentColor 15%, transparent));
}

.re-visible-editor-suggestion__label {
	margin: 0 0 0.25rem;
	font-size: 0.75rem;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	opacity: 0.7;
}

.re-visible-editor-suggestion ul {
	margin: 0.5rem 0;
	padding-left: 1rem;
}

.re-visible-editor-suggestion li {
	margin-bottom: 0.5rem;
}

/* Placeholders in RichText should not fight the display type. */
.re-visible-answer [data-rich-text-placeholder]::after,
.re-visible-faq [data-rich-text-placeholder]::after {
	opacity: 0.45;
}
