/* Base: page, text, links, headings, lists, images, focus, selection. */

/* Astra writes its own fonts/colours from the Customizer; these rules come after it (R-THEME-7 will empty those). */
body,
button,
input,
select,
textarea {
	font-family: var(--wp--preset--font-family--montserrat, Montserrat, system-ui, sans-serif);
}

body,
.ast-separate-container,
.ast-separate-container .ast-article-post,
.ast-separate-container .ast-article-single:not(.ast-related-post),
.ast-separate-container .comments-area {
	background-color: var(--sc-page);
	background-image: none;
	color: var(--sc-text);
}

/* Astra's page title is the page's H1: give it the app's "page title" look (R-COMP-6). Astra upper-cases it by default. */
body .entry-header .entry-title,
body .page-title {
	border-inline-start: 3px solid var(--sc-primary);
	padding-inline-start: 0.75rem;
	font-size: var(--wp--preset--font-size--page-title);
	font-weight: 800;
	text-transform: none;
}

/* Astra pads top-level groups/covers/columns with a default block padding; spacing here comes from the blocks' own styles. */
.entry-content > .wp-block-group,
.entry-content > .wp-block-cover,
.entry-content > .wp-block-columns {
	padding: 0;
}

::selection {
	background: var(--sc-primary);
	color: var(--sc-text);
}

:focus-visible {
	outline: 2px solid var(--sc-accent);
	outline-offset: 2px;
}

/* Text hierarchy as in the app's widgets: titles and values near-white (--sc-text), body text light gray
   (--sc-text-muted). Zero specificity, so every component that sets its own colour keeps it. */
:where(.entry-content) :where(p, li, dd, figcaption) {
	color: var(--sc-text-muted);
}

:where(.entry-content) :where(strong, b) {
	color: var(--sc-text);
}

a {
	color: var(--sc-accent);
	transition: color var(--sc-transition);
}

a:hover {
	color: var(--sc-text);
}

/* Astra upper-cases headings and sets Raleway on them from the Customizer; the app uses neither. */
body h1, body h2, body h3, body h4, body h5, body h6,
body .entry-content :is(h1, h2, h3, h4, h5, h6),
body .entry-title,
body .wp-block-heading {
	color: var(--sc-text);
	font-family: inherit;
	font-weight: 700;
	line-height: 1.2;
	text-transform: none;
	/* Long Hungarian compounds (Ajándékutalvány) must not overflow a narrow card. */
	-webkit-hyphens: auto;   /* Safari before 17 */
	hyphens: auto;
	overflow-wrap: break-word;
}

/* Lists and quotes */
.entry-content ul,
.entry-content ol,
.wp-block-list {
	padding-inline-start: 1.4em;
}

.wp-block-list li::marker {
	color: var(--sc-accent);
}

.wp-block-quote {
	border-inline-start: 3px solid var(--sc-primary);
	padding-inline-start: 1.25rem;
	color: var(--sc-text);
}

.wp-block-separator {
	border: 0;
	border-top: 1px solid var(--sc-hairline);
	background: none;
	opacity: 1;
}

/* Images are rounded like every card in the app */
.wp-block-image img {
	border-radius: var(--sc-radius);
}

/* app: final-cards H1 pattern — Heading → Styles → Page title */
.wp-block-heading.is-style-page-title {
	border-inline-start: 3px solid var(--sc-primary);
	padding-inline-start: 0.75rem;
	font-size: var(--wp--preset--font-size--page-title);
	font-weight: 800;
}

/* Small uppercase label above a heading — Heading → Styles → Eyebrow */
.wp-block-heading.is-style-eyebrow {
	margin-block-end: 0.25rem;
	color: var(--sc-accent);
	font-size: var(--wp--preset--font-size--label);
	font-weight: 700;
	letter-spacing: 0.12em;
	text-transform: uppercase;
}
