/* ==========================================================================
   Retire Asia — component layer
   Only what theme.json can't express. Keep this file small (< 20KB).
   ========================================================================== */

/* ---------- Base ---------- */
html { -webkit-text-size-adjust: 100%; }
body { text-rendering: optimizeLegibility; -webkit-font-smoothing: antialiased; }
h1, h2, h3, h4, h5, h6 { text-wrap: balance; }
/* Bebas is display-only: small card titles (h3 set to Medium) switch to Montserrat Bold for legibility */
:is(h2, h3).has-medium-font-size {
	font-family: var(--wp--preset--font-family--body);
	font-weight: 700;
	letter-spacing: 0;
	line-height: 1.3;
}
p { text-wrap: pretty; }

a { text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }

/* ---------- Focus: sky-blue ring + dark inner ring so it is visible on light AND dark sections ---------- */
:where(a, button, input, select, textarea, summary, [tabindex]):focus-visible,
.wp-element-button:focus-visible,
.wp-block-button__link:focus-visible {
	outline: 3px solid var(--wp--preset--color--highlight);
	outline-offset: 2px;
	box-shadow: 0 0 0 2px var(--wp--preset--color--contrast);
	border-radius: 4px;
}
.wp-element-button:focus-visible,
.wp-block-button__link:focus-visible { border-radius: 10px; }

/* ---------- Buttons ---------- */
.wp-element-button,
.wp-block-button__link {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: .5em;
	min-height: 48px;
	text-decoration: none;
	transition: background-color .15s ease, color .15s ease, border-color .15s ease;
}
.wp-block-button.is-style-secondary .wp-block-button__link:hover {
	background-color: var(--wp--preset--color--accent);
	border-color: var(--wp--preset--color--accent);
	color: var(--wp--preset--color--surface);
}
.wp-block-button.is-style-text-arrow .wp-block-button__link {
	min-height: 44px;
	text-decoration: underline;
	text-underline-offset: 3px;
}
.wp-block-button.is-style-text-arrow .wp-block-button__link::after {
	content: "→";
	display: inline-block;
	transition: transform .15s ease;
}
.wp-block-button.is-style-text-arrow .wp-block-button__link:hover {
	background: transparent;
	color: var(--wp--preset--color--accent-dark);
}
.wp-block-button.is-style-text-arrow .wp-block-button__link:hover::after { transform: translateX(3px); }

/* Buttons on dark sections: green primary stays as-is; outline buttons switch to white for contrast */
.is-style-section-dark .wp-block-button.is-style-secondary .wp-block-button__link {
	color: var(--wp--preset--color--surface);
	border-color: var(--wp--preset--color--surface);
}
.is-style-section-dark .wp-block-button.is-style-secondary .wp-block-button__link:hover {
	background: var(--wp--preset--color--surface);
	color: var(--wp--preset--color--primary-dark);
}

/* ---------- Cards ---------- */
.is-style-card {
	transition: transform .2s ease, box-shadow .2s ease;
}
.is-style-card:hover,
.is-style-card:focus-within {
	transform: translateY(-2px);
	box-shadow: var(--wp--preset--shadow--lifted);
}
.is-style-card > .wp-block-post-featured-image:first-child,
.is-style-card > .wp-block-image:first-child { margin-top: 0; }

/* ---------- Badge (inline pill) ---------- */
p.is-style-badge { display: inline-block; width: fit-content; }

/* ---------- Callouts ---------- */
[class*="is-style-callout-"] > :first-child { margin-top: 0; }
[class*="is-style-callout-"] > :last-child { margin-bottom: 0; }
[class*="is-style-callout-"] strong:first-child { color: var(--wp--preset--color--primary-dark); }

/* ---------- Page rhythm: sections butt together; spacing comes from section padding ---------- */
.wp-site-blocks > * { margin-block-start: 0; }
body .ra-section,
body .ra-hero { margin-block: 0; }

/* ---------- Header ---------- */
.ra-header {
	position: relative;
	z-index: 50;
	background-color: var(--wp--preset--color--base);
	border-bottom: 1px solid var(--wp--preset--color--line);
}

/* Landing page: header sits transparent over the hero, turns solid as you scroll.
   CSS scroll-driven animation; browsers without support just get the normal solid header. */
@supports (animation-timeline: scroll()) {
	.ra-overlay-header {
		position: sticky;
		top: var(--wp-admin--admin-bar--height, 0px);
		z-index: 100;
		height: 0;
	}
	.ra-overlay-header .ra-header {
		background-color: transparent;
		border-bottom-color: transparent;
		color: var(--wp--preset--color--surface);
		animation: ra-header-solid linear both;
		animation-timeline: scroll(root);
		animation-range: 0 160px;
	}
	.ra-overlay-header .ra-header :is(.wp-block-site-title a, .wp-block-navigation-item__content, .wp-block-navigation__responsive-container-open) {
		color: inherit;
	}
	body:has(.ra-overlay-header) .ra-hero {
		padding-top: calc(var(--wp--preset--spacing--60) + 84px) !important;
	}
}
@keyframes ra-header-solid {
	to {
		background-color: var(--wp--preset--color--base);
		border-bottom-color: var(--wp--preset--color--line);
		color: var(--wp--preset--color--contrast);
		box-shadow: var(--wp--preset--shadow--soft);
	}
}
.ra-header .wp-block-navigation-item__content { min-height: 44px; display: inline-flex; align-items: center; }
.ra-header .wp-block-navigation .wp-block-loginout { font-size: inherit; font-weight: inherit; }
.ra-header .wp-block-loginout a { min-height: 44px; display: inline-flex; align-items: center; color: inherit; text-decoration: none; }
.ra-header .wp-block-loginout a:hover { text-decoration: underline; }
.ra-header .wp-block-navigation__responsive-container-open,
.ra-header .wp-block-navigation__responsive-container-close {
	min-width: 44px; min-height: 44px; justify-content: center; align-items: center;
}
.ra-header .wp-block-navigation__responsive-container-open::after {
	content: "Menu"; margin-left: .4em; font-weight: 600;
}
/* Core switches to the menu button below 600px; our 5-item menu needs it up to 1024px. */
@media (min-width: 600px) and (max-width: 1023px) {
	.ra-header .wp-block-navigation__responsive-container-open:not(.always-shown) { display: flex; }
	.ra-header .wp-block-navigation__responsive-container-close:not(.always-shown) { display: flex; }
	.ra-header .wp-block-navigation__responsive-container:not(.hidden-by-default):not(.is-menu-open) { display: none; }
}
.ra-header .wp-block-navigation__responsive-container.is-menu-open :is(.wp-block-navigation__responsive-container-content, .wp-block-navigation__container) {
	align-items: flex-start;
}
.ra-header .wp-block-navigation__responsive-container.is-menu-open {
	padding: var(--wp--preset--spacing--50);
	font-size: var(--wp--preset--font-size--medium);
}
.ra-header .wp-block-navigation .current-menu-item > a,
.ra-header .wp-block-navigation [aria-current="page"] {
	text-decoration: underline;
	text-decoration-color: var(--wp--preset--color--highlight);
	text-decoration-thickness: 3px;
	text-underline-offset: 8px;
}

/* ---------- Footer ---------- */
.ra-footer .wp-block-navigation-item__content { min-height: 44px; display: inline-flex; align-items: center; }
.ra-footer a:hover { color: var(--wp--preset--color--highlight); }

/* ---------- Landing components ---------- */
.ra-hero h1 { font-size: clamp(3rem, 5.8vw, 5.25rem); }
.ra-hero .ra-hero-photo img {
	width: 100%;
	max-height: min(68vh, 560px);
	border-radius: 16px;
	box-shadow: 0 20px 50px rgba(0, 0, 0, .25);
}
.ra-trust-line { font-weight: 600; }
.ra-header .wp-block-site-title,
.ra-header .wp-block-button__link { white-space: nowrap; }
@media (max-width: 600px) {
	.ra-header .wp-block-site-title { font-size: 1.6rem; }
	.ra-header .wp-block-button__link { padding: .6em 1em; }
	.ra-header .wp-block-group { gap: .75rem; }
	.ra-hero .ra-hero-photo img { aspect-ratio: 4 / 3 !important; }
}
.is-style-section-dark .is-style-eyebrow { color: var(--wp--preset--color--accent-soft); }

.is-style-card.ra-card-flush { padding: 0 0 var(--wp--preset--spacing--50); overflow: hidden; }
.ra-card-flush .ra-card-media { margin: 0; }
.ra-card-flush .ra-card-media img { border-radius: 0; }
/* No image (e.g. featured image not set yet): give the text its normal top padding */
.ra-card-flush > .wp-block-group:first-child { padding-top: var(--wp--preset--spacing--50); }
.ra-flag { margin: 0; flex: none; }
/* Country cards: 3 per row on desktop, last row centred; 2 on tablet; 1 on phones */
.ra-country-grid > * { flex: 0 1 calc((100% - 2 * var(--wp--preset--spacing--50)) / 3); }
@media (max-width: 1023px) { .ra-country-grid > * { flex-basis: calc((100% - var(--wp--preset--spacing--50)) / 2); } }
@media (max-width: 640px) { .ra-country-grid > * { flex-basis: 100%; } }
.ra-flag img { border-radius: 3px; box-shadow: 0 0 0 1px var(--wp--preset--color--line); }
.ra-icon { margin: 0; flex: none; }
.is-style-card .wp-block-buttons:last-child { margin-top: auto; }

.ra-price {
	font-family: var(--wp--preset--font-family--heading);
	font-weight: 400;
	letter-spacing: .02em;
	line-height: 1;
	color: var(--wp--preset--color--primary-dark);
}
.ra-tier.is-featured { box-shadow: var(--wp--preset--shadow--lifted); }
.ra-quote { font-style: italic; line-height: 1.6; color: var(--wp--preset--color--primary-dark); }
.ra-signature { font-family: var(--wp--preset--font-family--heading); letter-spacing: .04em; color: var(--wp--preset--color--primary); }

/* ---------- Course & lesson layout (outline left, content right) ---------- */
@media (min-width: 1024px) {
	.ra-course-sidebar {
		position: sticky;
		top: calc(var(--wp-admin--admin-bar--height, 0px) + 1.5rem);
		align-self: flex-start;
		max-height: calc(100vh - var(--wp-admin--admin-bar--height, 0px) - 3rem);
		overflow-y: auto;
		scrollbar-width: thin;
	}
	.ra-outline__summary { pointer-events: none; } /* acts as a heading on desktop */
	.ra-outline__summary .ra-outline__count { pointer-events: none; }
}
@media (max-width: 1023px) {
	.wp-block-columns.ra-course-layout { flex-wrap: wrap !important; }
	.wp-block-columns.ra-course-layout > .wp-block-column { flex-basis: 100% !important; }
}
.ra-course-main { min-width: 0; }
.ra-course-main .wp-block-post-content > * { max-width: 720px; }

/* ---------- Page banner (members pages) ---------- */
.ra-page-hero .ra-crumbs { margin: 0; color: var(--wp--preset--color--accent-soft); }
.ra-page-hero .ra-crumbs a { color: var(--wp--preset--color--surface); }
.ra-page-hero h1 { margin: 0; }

/* Country cards: whole title is the link */
.ra-country-card h2 a { color: inherit; text-decoration: none; }
.ra-country-card h2 a:hover { text-decoration: underline; }
.ra-country-card .ra-card-media a { display: block; }

/* ---------- Guide covers (country pages + guide pages) ---------- */
.ra-guide-cover { margin: 0; }
.ra-guide-cover img {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: 512 / 800;
	object-fit: cover;
	border-radius: 6px 10px 10px 6px;
	box-shadow: 0 2px 4px rgba(37, 39, 77, .12), 0 10px 24px rgba(37, 39, 77, .18);
	transition: transform .2s ease, box-shadow .2s ease;
}
.ra-guide-card a:hover img,
.ra-guide-card a:focus-visible img { transform: translateY(-4px); box-shadow: 0 4px 8px rgba(37, 39, 77, .15), 0 18px 36px rgba(37, 39, 77, .25); }
.ra-guide-card h3 { margin: 0; }
.ra-guide-card h3 a { color: inherit; text-decoration: none; }
.ra-guide-card h3 a:hover { text-decoration: underline; }
.ra-guide-card p { margin: 0; }
.ra-guide-intro .ra-guide-cover { max-width: 320px; }
@media (prefers-reduced-motion: reduce) { .ra-guide-card a:hover img { transform: none; } }

/* ---------- Account pages (login, lost password, register) ---------- */
.ra-account-welcome,
.ra-account-card { border-radius: 16px; padding: var(--wp--preset--spacing--60) !important; }
.ra-account-welcome { background-image: var(--wp--preset--gradient--hero); }
.ra-account-welcome h1 { margin: 0; }
.ra-account-welcome a { color: var(--wp--preset--color--surface); }
.ra-account-welcome .is-style-checklist li::before { filter: brightness(0) invert(1); opacity: .9; }
.ra-account-card h2 { margin: 0; }
@media (max-width: 640px) {
	.ra-account-welcome, .ra-account-card { padding: var(--wp--preset--spacing--50) !important; }
}

/* ---------- Member dashboard ---------- */
.ra-dashboard-main, .ra-dashboard-side { display: flex; flex-direction: column; gap: var(--wp--preset--spacing--50); }
.ra-dashboard-main > *, .ra-dashboard-side > * { margin-block: 0 !important; }
.ra-welcome { margin: 0; font-size: var(--wp--preset--font-size--x-large); }
.ra-continue h2 a { color: inherit; text-decoration: none; }
.ra-continue h2 a:hover { text-decoration: underline; }
.ra-continue .wp-block-buttons { margin-top: var(--wp--preset--spacing--30); }
.ra-continue__image { width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 12px; }
.ra-quick-links { list-style: none; padding: 0; margin: 0; align-self: stretch; }
.ra-quick-links li { border-bottom: 1px solid var(--wp--preset--color--line); }
.ra-quick-links a { display: flex; min-height: 44px; align-items: center; text-decoration: none; font-weight: 600; }
.ra-quick-links a::after { content: "→"; margin-left: auto; padding-left: 1rem; color: var(--wp--preset--color--primary); }
.ra-quick-links a:hover { text-decoration: underline; }
.ra-side-card .wp-block-loginout a { display: inline-flex; min-height: 44px; align-items: center; color: var(--wp--preset--color--muted); }
@media (max-width: 1023px) {
	.wp-block-columns.ra-dashboard { flex-wrap: wrap !important; }
	.wp-block-columns.ra-dashboard > .wp-block-column { flex-basis: 100% !important; }
}

/* ---------- Check / cross lists ---------- */
:is(.is-style-checklist, .is-style-crosslist) { list-style: none; }
:is(.is-style-checklist, .is-style-crosslist) li { position: relative; padding-left: 2.1em; margin-block: .55em; }
:is(.is-style-checklist, .is-style-crosslist) li::before {
	content: "";
	position: absolute;
	left: 0;
	top: .15em;
	width: 1.4em;
	height: 1.4em;
	background: url(../icons/check.svg) center / contain no-repeat;
}
.is-style-crosslist li::before { background-image: url(../icons/cross.svg); }

/* ---------- Details / FAQ ---------- */
.wp-block-details summary {
	cursor: pointer;
	position: relative;
	display: block;
	min-height: 44px;
	padding: .35em 2.5em .35em 0;
	font-weight: 600;
	font-size: var(--wp--preset--font-size--medium);
	line-height: 1.4;
	list-style: none;
}
.wp-block-details summary::-webkit-details-marker { display: none; }
.wp-block-details summary::after {
	content: "+";
	position: absolute;
	right: .25em;
	top: 50%;
	transform: translateY(-50%);
	font-size: 1.4em;
	line-height: 1;
	color: var(--wp--preset--color--primary);
}
/* Second line of a summary (after <br>) reads as a subtitle */
.wp-block-details summary strong { color: var(--wp--preset--color--primary-dark); }
.wp-block-details summary:has(strong) { font-weight: 400; font-size: var(--wp--preset--font-size--base); }
.wp-block-details summary:has(strong) strong { font-size: var(--wp--preset--font-size--medium); }
.wp-block-details[open] summary::after { content: "–"; }

/* ---------- Forms (base; UMP-specific overrides go in ump.css) ---------- */
input:not([type="checkbox"]):not([type="radio"]):not([type="submit"]),
select,
textarea {
	font: inherit;
	min-height: 48px;
	padding: .6em .8em;
	border: 1px solid var(--wp--preset--color--muted);
	border-radius: 10px;
	background: var(--wp--preset--color--surface);
	color: var(--wp--preset--color--contrast);
}

/* ---------- Tables ---------- */
.wp-block-table table { border-collapse: collapse; width: 100%; }
.wp-block-table th, .wp-block-table td { border: 1px solid var(--wp--preset--color--line); padding: .6em .8em; }
.wp-block-table thead { background: var(--wp--preset--color--info-bg); border-bottom: 0; }

/* ---------- Style guide helpers ---------- */
.ra-swatch { aspect-ratio: 3 / 2; border-radius: 12px; border: 1px solid var(--wp--preset--color--line); }

/* ---------- Motion ---------- */
@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after {
		animation-duration: .01ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: .01ms !important;
		scroll-behavior: auto !important;
	}
	.is-style-card:hover, .is-style-card:focus-within { transform: none; }
	.ra-overlay-header .ra-header { animation-duration: auto !important; } /* scroll-linked, not motion */
}

/* ---------- Print ---------- */
@media print {
	.ra-header, .ra-footer nav, .wp-block-buttons { display: none !important; }
	body { background: #fff; color: #000; font-size: 12pt; }
	a { color: #000; }
}

/* ---------- Sales page: full-width bonus sections ---------- */
.is-style-section-dark .is-style-card :is(h2, h3, h4) { color: var(--wp--preset--color--contrast); }

.ra-bonus-covers { gap: var(--wp--preset--spacing--40); padding-block: var(--wp--preset--spacing--30); }
.ra-bonus-covers figure { margin: 0; flex: 0 1 170px; }
.ra-bonus-covers img { display: block; width: 100%; height: auto; border-radius: 6px; box-shadow: 0 18px 40px rgba(0, 0, 0, .45); transition: transform .2s ease; }
.ra-bonus-covers figure:nth-child(1) img { transform: rotate(-4deg) translateY(10px); }
.ra-bonus-covers figure:nth-child(2) img { transform: rotate(-2deg) translateY(2px); }
.ra-bonus-covers figure:nth-child(4) img { transform: rotate(2deg) translateY(2px); }
.ra-bonus-covers figure:nth-child(5) img { transform: rotate(4deg) translateY(10px); }
.ra-bonus-covers figure img:hover { transform: translateY(-6px); }
@media (max-width: 640px) {
	.ra-bonus-covers { gap: .5rem; }
	.ra-bonus-covers figure:nth-child(n+4) { display: none; }
}
.ra-stats .ra-stat { border-top: 2px solid var(--wp--preset--color--accent); padding-top: var(--wp--preset--spacing--40); }
.ra-stats .ra-stat p { margin: 0; }
.ra-stat-number { font-family: var(--wp--preset--font-family--heading); font-size: clamp(2.75rem, 5vw, 3.75rem); line-height: 1; color: var(--wp--preset--color--surface); }
.ra-bonus-towns .ra-count { font-family: var(--wp--preset--font-family--body); font-size: .8em; opacity: .7; }
.ra-town-list .ra-town { white-space: nowrap; }
.ra-town-list { font-size: var(--wp--preset--font-size--small); line-height: 1.8; opacity: .9; }
.ra-bonus-card .is-style-checklist { margin: 0; }
@media (max-width: 781px) {
	.ra-bonus-cols.is-reversed { flex-direction: column-reverse; }
}

/* Bonus intro banner + big "BONUS n" labels */
.ra-bonus-intro :is(h2, p) { color: var(--wp--preset--color--surface); }
.ra-bonus-intro .ra-bonus-intro-kicker { font-family: var(--wp--preset--font-family--heading); font-size: clamp(2.25rem, 5.5vw, 4rem); line-height: 1; letter-spacing: .02em; margin: 0; }
.ra-bonus-intro .ra-bonus-intro-title { font-size: clamp(3.5rem, 11vw, 8.5rem); line-height: .95; margin-top: 0; }
.ra-bonus-intro .ra-pop { color: #F5C542; }
.ra-bonus p.is-style-badge { font-family: var(--wp--preset--font-family--heading); font-size: clamp(2.25rem, 5vw, 3.5rem); font-weight: 400; line-height: 1; letter-spacing: .03em; padding: .12em .5em .05em; border-radius: 10px; background: #F5C542; color: var(--wp--preset--color--contrast); box-shadow: 0 6px 18px rgba(0, 0, 0, .18); }
.ra-bonus .ra-icon { width: 56px !important; }
.ra-bonus .ra-icon img { width: 56px !important; }

/* Sales page: course banner, benefits and module cards */
.ra-course p.is-style-badge { font-family: var(--wp--preset--font-family--heading); font-size: clamp(2rem, 4.5vw, 3rem); font-weight: 400; line-height: 1; letter-spacing: .03em; padding: .12em .5em .05em; border-radius: 10px; background: #F5C542; color: var(--wp--preset--color--contrast); box-shadow: 0 6px 18px rgba(0, 0, 0, .14); }
.ra-course-intro .ra-stats { margin-top: var(--wp--preset--spacing--50); }
.ra-course-intro .ra-stat { border-top-color: #F5C542; }
.ra-course-features .ra-feature-title { font-size: clamp(1.75rem, 3vw, 2.25rem); }
.ra-course-why .is-style-card .ra-icon, .ra-course-why .is-style-card .ra-icon img { width: 56px !important; }
.ra-module { padding: var(--wp--preset--spacing--60) !important; border-left: 8px solid #F5C542 !important; }
.ra-module-cols { margin: 0; align-items: center; }
.ra-module-title { margin: 0; line-height: 1; }
.ra-module-tagline { color: var(--wp--preset--color--muted); margin: 0; }
.ra-module .is-style-checklist { margin: 0; font-size: var(--wp--preset--font-size--medium); }
.ra-module .is-style-checklist li + li { margin-top: .6em; }
@media (max-width: 781px) { .ra-module { padding: var(--wp--preset--spacing--50) !important; } }
.ra-course-features { display: flex !important; flex-wrap: wrap; justify-content: center; }
.ra-course-features > * { flex: 0 1 calc((100% - 2 * var(--wp--preset--spacing--50)) / 3); }
@media (max-width: 1023px) { .ra-course-features > * { flex-basis: calc((100% - var(--wp--preset--spacing--50)) / 2); } }
@media (max-width: 640px) { .ra-course-features > * { flex-basis: 100%; } }

/* Free Guides cards without a featured image: give the text room at the top. */
.wp-block-post > .is-style-card:not(:has(.wp-block-post-featured-image)) { padding-top: var(--wp--preset--spacing--50) !important; }

/* Support form */
.ra-support-form { max-width: 100%; margin-left: 0 !important; }
.ra-support-form > p { margin-left: 0 !important; margin-right: 0 !important; max-width: none !important; }
.ra-support-form label { font-weight: 600; }
.ra-support-form select, .ra-support-form input[type=text], .ra-support-form textarea { box-sizing: border-box; width: 100%; padding: .7em .8em; border: 1px solid var(--wp--preset--color--line); border-radius: 10px; font: inherit; background: #fff; }
.ra-support-form textarea { resize: vertical; }
.ra-support-form .ra-optional { font-weight: 400; color: var(--wp--preset--color--muted); }
.ra-support-form .ra-hp { position: absolute; left: -9999px; }
.ra-support-from { color: var(--wp--preset--color--muted); }
.ra-support-notice { margin-bottom: 1.5rem; }

/* ---------- Course workbooks ---------- */
.ra-workbook { margin-top: var(--wp--preset--spacing--60); padding: var(--wp--preset--spacing--60); background: #fff; border: 1px solid var(--wp--preset--color--line); border-top: 6px solid #F5C542; border-radius: 16px; }
.ra-wb-eyebrow { margin: 0; font-size: var(--wp--preset--font-size--small); font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--wp--preset--color--accent-dark); }
.ra-wb-title { margin: .2em 0 .4em; }
.ra-wb-private { font-size: var(--wp--preset--font-size--small); background: var(--wp--preset--color--info-bg); padding: .7em 1em; border-radius: 10px; }
.ra-wb-tools { display: flex; flex-wrap: wrap; gap: .6rem; margin: 1rem 0 .4rem; }
.ra-wb-btn { font: inherit; font-weight: 600; cursor: pointer; padding: .6em 1.1em; border-radius: 10px; border: 2px solid var(--wp--preset--color--accent); background: var(--wp--preset--color--accent); color: #fff; }
.ra-wb-btn:hover { background: var(--wp--preset--color--accent-hover); border-color: var(--wp--preset--color--accent-hover); }
.ra-wb-btn-quiet { background: transparent; color: var(--wp--preset--color--contrast); border-color: var(--wp--preset--color--line); }
.ra-wb-btn-quiet:hover { background: var(--wp--preset--color--base); color: var(--wp--preset--color--contrast); border-color: var(--wp--preset--color--muted); }
.ra-wb-status { min-height: 1.4em; font-size: var(--wp--preset--font-size--small); color: var(--wp--preset--color--success); margin: 0; }
.ra-wb-questions { padding-left: 1.4em; }
.ra-wb-q { margin: 0 0 1.4rem; }
.ra-wb-q fieldset { border: 0; padding: 0; margin: 0; }
.ra-wb-q legend { font-weight: 700; margin-bottom: .5em; padding: 0; }
.ra-wb-opts { display: grid; grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr)); gap: .35rem .9rem; }
.ra-wb-opt { display: flex; gap: .5em; align-items: flex-start; padding: .45em .6em; border-radius: 8px; cursor: pointer; line-height: 1.4; }
.ra-wb-opt:hover { background: var(--wp--preset--color--base); }
.ra-wb-opt input[type=checkbox] { width: 1.15em; height: 1.15em; margin-top: .15em; flex: none; accent-color: var(--wp--preset--color--accent); }
.ra-wb-opt.is-checked { background: #E8F5EC; }
.ra-wb-other { grid-column: 1 / -1; align-items: center; }
.ra-wb-other input, .ra-wb-places input, .ra-wb-notes textarea, .ra-wb-table input, .ra-wb-table select { box-sizing: border-box; font: inherit; padding: .45em .6em; border: 1px solid var(--wp--preset--color--line); border-radius: 8px; background: #fff; }
.ra-wb-other input { flex: 1; }
.ra-wb-table { width: 100%; border-collapse: collapse; margin: 0 0 1.5rem; font-size: var(--wp--preset--font-size--small); }
.ra-wb-table caption { text-align: left; font-weight: 700; font-size: var(--wp--preset--font-size--medium); padding: .3em 0; }
.ra-wb-table th, .ra-wb-table td { border-bottom: 1px solid var(--wp--preset--color--line); padding: .4em .5em; text-align: left; vertical-align: middle; }
.ra-wb-table thead th { color: var(--wp--preset--color--muted); font-weight: 600; }
.ra-wb-table tbody th { font-weight: 400; }
.ra-wb-table input { width: 100%; max-width: 9rem; }
.ra-wb-table tfoot th, .ra-wb-table tfoot td { font-weight: 700; border-bottom: 0; }
.ra-wb-budget tr.is-filled th { font-weight: 600; }
.ra-wb-summary { display: grid; grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr)); gap: .8rem; margin: 1rem 0; }
.ra-wb-summary > div { background: var(--wp--preset--color--primary-dark); color: #fff; border-radius: 12px; padding: .9em 1em; display: flex; flex-direction: column; gap: .2em; }
.ra-wb-summary span { font-size: var(--wp--preset--font-size--small); opacity: .85; }
.ra-wb-summary strong { font-family: var(--wp--preset--font-family--heading); font-size: 2rem; font-weight: 400; line-height: 1; }
.ra-wb-compare-summary > div.is-best { background: var(--wp--preset--color--accent); }
.ra-wb-places { display: grid; grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr)); gap: .8rem; margin-bottom: 1.2rem; }
.ra-wb-places label { font-weight: 600; display: flex; flex-direction: column; gap: .3em; }
.ra-wb-note { font-size: var(--wp--preset--font-size--small); color: var(--wp--preset--color--muted); }
.ra-wb-notes textarea { width: 100%; margin-top: .4em; }
@media (max-width: 640px) {
	.ra-workbook { padding: var(--wp--preset--spacing--50); }
	.ra-wb-compare-table { display: block; overflow-x: auto; }
}
/* Print / Save as PDF: only the workbook, only what was answered. */
@media print {
	body.ra-wb-print * { visibility: hidden; }
	body.ra-wb-print .ra-wb-printing, body.ra-wb-print .ra-wb-printing * { visibility: visible; }
	body.ra-wb-print .ra-wb-printing { position: absolute; inset: 0 auto auto 0; width: 100%; border: 0; padding: 0; margin: 0; }
	.ra-wb-printing .ra-wb-tools, .ra-wb-printing .ra-wb-status, .ra-wb-printing .ra-wb-private { display: none !important; }
	.ra-wb-printing .ra-wb-opt:not(.is-checked) { display: none; }
	.ra-wb-printing .ra-wb-opt.is-checked { background: none; padding: 0; }
	.ra-wb-printing .ra-wb-q { break-inside: avoid; margin-bottom: .8rem; }
	.ra-wb-printing .ra-wb-summary > div { background: none !important; color: #000; border: 1px solid #999; }
}
.ra-wb-questions { list-style: none; padding-left: 0; counter-reset: wbq; }
.ra-wb-q { counter-increment: wbq; }
.ra-wb-q legend::before { content: counter(wbq) ". "; color: var(--wp--preset--color--accent-dark); }

/* ---------- General guides hub (/guides/) ---------- */
.ra-hub-intro > * + * { margin-top: var(--wp--preset--spacing--30); }
.ra-hub-features { display: grid; gap: var(--wp--preset--spacing--50); }
.ra-hub-feature.ra-hub-feature { margin: 0; padding: var(--wp--preset--spacing--50); }
.ra-hub-cover { margin: 0; }
.ra-hub-cover img { display: block; width: 100%; max-width: 200px; height: auto; border-radius: 6px; box-shadow: 0 14px 30px rgba(0, 0, 0, .25); }
.ra-hub-feature h3 a, .ra-hub-card h3 a { color: inherit; text-decoration: none; }
.ra-hub-feature h3 a:hover, .ra-hub-card h3 a:hover { text-decoration: underline; }
p.ra-hub-badge { display: inline-block; margin: 0; padding: .1em .55em .02em; border-radius: 8px; background: #F5C542; color: var(--wp--preset--color--contrast); font-family: var(--wp--preset--font-family--heading); font-size: clamp(1.4rem, 3vw, 1.9rem); line-height: 1.1; letter-spacing: .03em; box-shadow: 0 4px 12px rgba(0, 0, 0, .12); }
.ra-hub-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: var(--wp--preset--spacing--50); }
.ra-hub-grid > .ra-hub-card { margin: 0; height: 100%; }
.ra-hub-card .wp-block-buttons { margin-top: auto; }
@media (max-width: 781px) {
	.ra-hub-feature .wp-block-column:first-child { flex-basis: auto !important; }
	.ra-hub-cover img { max-width: 160px; }
}
.ra-hub-feature.ra-hub-feature { background: var(--wp--preset--color--surface); border: 1px solid var(--wp--preset--color--line); border-radius: 16px; box-shadow: var(--wp--preset--shadow--soft); }
.ra-hub-icon { margin: 0; }
.ra-hub-icon a { display: grid; place-items: center; width: 100%; max-width: 200px; aspect-ratio: 512 / 800; border-radius: 6px; background: var(--wp--preset--color--primary-dark); box-shadow: 0 14px 30px rgba(0, 0, 0, .25); }
.ra-hub-icon img { width: 45%; height: auto; filter: brightness(0) invert(1); }
@media (max-width: 781px) { .ra-hub-icon a { max-width: 160px; aspect-ratio: 1; } }
.ra-wb-buffer { display: flex; align-items: center; gap: .75em; margin-top: 1rem; font-weight: 600; }
.ra-wb-buffer select { min-height: 44px; padding: .3em .6em; border: 1.5px solid var(--wp--preset--color--lavender); border-radius: 10px; font: inherit; background: var(--wp--preset--color--surface); }

/* ---------- Partner (affiliate) programme ---------- */
.ra-aff-form { display: grid; gap: .25rem; }
.ra-aff-form label { display: block; font-weight: 600; margin-bottom: .3em; }
.ra-aff-form input[type="text"], .ra-aff-form input[type="email"], .ra-aff-form input[type="url"], .ra-aff-form input[type="password"], .ra-aff-form select, .ra-aff-form textarea {
	width: 100%; min-height: 48px; padding: .6em .8em; border: 1.5px solid var(--wp--preset--color--lavender); border-radius: 10px; background: var(--wp--preset--color--surface); font: inherit; color: var(--wp--preset--color--contrast); box-sizing: border-box;
}
.ra-aff-form textarea { min-height: 120px; }
.ra-aff-payout { border: 0; padding: 0; margin: .5rem 0; display: flex; flex-wrap: wrap; gap: 1.25rem; align-items: center; }
.ra-aff-payout legend { font-weight: 600; margin-bottom: .4em; padding: 0; width: 100%; }
.ra-aff-payout label, .ra-aff-check label { display: inline-flex; align-items: flex-start; gap: .5em; font-weight: 400; min-height: 44px; }
.ra-aff-payout input, .ra-aff-check input { width: 22px; height: 22px; margin-top: .1em; accent-color: var(--wp--preset--color--accent); flex: none; }
.ra-aff-small { font-size: var(--wp--preset--font-size--small); color: var(--wp--preset--color--muted); }
.ra-aff-msg { padding: .8rem 1rem; border-radius: 10px; border-left: 5px solid #B7791F; background: var(--wp--preset--color--warning-bg); }
.ra-aff-msg.is-ok { border-left-color: var(--wp--preset--color--accent); background: #E8F5EC; }
.ra-aff-link { display: flex; gap: .5rem; flex-wrap: wrap; }
.ra-aff-link input { flex: 1 1 260px; min-height: 48px; padding: .6em .8em; border: 1.5px solid var(--wp--preset--color--lavender); border-radius: 10px; font: inherit; background: var(--wp--preset--color--surface); }
.ra-aff-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(9.5rem, 1fr)); gap: .8rem; margin: 1.5rem 0 .5rem; }
.ra-aff-tiles > div { background: var(--wp--preset--color--primary-dark); color: #fff; border-radius: 12px; padding: .9em 1em; display: flex; flex-direction: column; gap: .2em; }
.ra-aff-tiles span { font-size: var(--wp--preset--font-size--small); opacity: .85; }
.ra-aff-tiles strong { font-size: 1.5rem; line-height: 1.15; }
.ra-aff-dash h2 { margin-top: var(--wp--preset--spacing--60); }

/* Small phones (≤ 420px): keep logo, Menu and "Join now" on one line without sideways scrolling. */
@media (max-width: 420px) {
	.ra-menu.ra-menu { gap: .5rem !important; }
	.ra-menu .wp-block-button__link { padding: .55em .85em !important; font-size: 15px !important; }
	.wp-site-blocks > header .wp-block-site-title { font-size: clamp(1.1rem, 5.2vw, 1.4rem) !important; }
}
@media (max-width: 380px) {
	.ra-menu .wp-block-button__link { padding: .5em .7em !important; font-size: 14px !important; }
	.wp-site-blocks > header .wp-block-site-title { font-size: 1.05rem !important; }
	.wp-site-blocks > header .wp-block-navigation__responsive-container-open { gap: .25em; }
}
.ra-aff-kit { display: grid; gap: .4rem; margin: 1rem 0 1.5rem; }
.ra-aff-kit label { font-weight: 600; }
.ra-aff-kit textarea { width: 100%; padding: .7em .8em; border: 1.5px solid var(--wp--preset--color--lavender); border-radius: 10px; font: inherit; font-size: 16px; line-height: 1.5; background: var(--wp--preset--color--surface); box-sizing: border-box; resize: vertical; }
.ra-aff-kit .wp-element-button { justify-self: start; }
.ra-aff-images { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: .8rem; }
.ra-aff-images a { display: flex; flex-direction: column; gap: .3rem; text-decoration: none; color: var(--wp--preset--color--contrast); font-size: var(--wp--preset--font-size--small); }
.ra-aff-images img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 8px; border: 1px solid var(--wp--preset--color--line); }
.ra-aff-images a:hover span { text-decoration: underline; }
.ra-partner-covers { flex-wrap: wrap !important; }
.ra-partner-covers figure { flex: 0 1 140px !important; }
.ra-earn-table td:not(:first-child), .ra-earn-table th:not(:first-child) { text-align: right; font-variant-numeric: tabular-nums; }
.ra-faq { border-bottom: 1px solid var(--wp--preset--color--line); padding: .9rem 0; }
.ra-faq summary { font-weight: 600; cursor: pointer; min-height: 44px; display: flex; align-items: center; }
/* Partner application form: line up with the rest of the page (the shared support-form style forces full width). */
.is-layout-constrained > .ra-aff-form.ra-support-form { max-width: 860px; width: 100%; margin-left: auto !important; margin-right: auto !important; }

/* Spam-trap fields: hidden from people on every form (also in ump.css, which only loads on UMP pages). */
.ra-hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }

/* ---------- Help centre ---------- */
.ra-help-search { margin-top: var(--wp--preset--spacing--40); max-width: 640px; }
.ra-help-search input[type="search"] {
	width: 100%; min-height: 58px; padding: .7em 1em .7em 2.8em; box-sizing: border-box; border: 0; border-radius: 12px;
	font: inherit; font-size: 18px; color: var(--wp--preset--color--contrast); background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%23464866' stroke-width='2.2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m20 20-3.5-3.5'/%3E%3C/svg%3E") no-repeat 1em 50%;
	box-shadow: 0 8px 24px rgba(0, 0, 0, .18);
}
.ra-help-search input[type="search"]:focus-visible { outline: 3px solid var(--wp--preset--color--highlight); outline-offset: 2px; }
.ra-help-count { margin: .6rem 0 0; min-height: 1.4em; font-size: var(--wp--preset--font-size--small); opacity: .9; }
.ra-help-none { margin: .6rem 0 0; padding: .7rem 1rem; border-radius: 10px; background: rgba(255, 255, 255, .12); }
.ra-help-none a { color: inherit; }
.ra-help-section[hidden], .ra-help-item[hidden] { display: none !important; }
.ra-help .ra-faq > p { margin-top: .6rem; }
.ra-account-pw-box { display: flex; flex-wrap: wrap; gap: .75rem 1.25rem; align-items: center; justify-content: space-between; padding: 1rem 1.25rem; margin-bottom: var(--wp--preset--spacing--50); border: 1px solid var(--wp--preset--color--line); border-radius: 14px; background: var(--wp--preset--color--surface); }
.ra-account-pw-box p { margin: 0; }
.ra-help-jump { margin-top: .4rem !important; opacity: .9; }
.ra-help-jump a { color: inherit; }
.ra-help-contact-box { padding: var(--wp--preset--spacing--50); border-radius: 16px; background: var(--wp--preset--color--surface); border: 1px solid var(--wp--preset--color--line); box-shadow: var(--wp--preset--shadow--soft); scroll-margin-top: 90px; }
.ra-help-contact p { margin: 0 0 1rem; font-size: var(--wp--preset--font-size--medium); }
.ra-mini-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: var(--wp--preset--spacing--40); }
.ra-mini-card.ra-mini-card { margin: 0; gap: 1rem !important; align-items: flex-start; padding: 1rem; }
.ra-mini-thumb { flex: 0 0 76px; margin: 0; }
.ra-mini-thumb img { display: block; width: 76px; height: auto; border-radius: 4px; box-shadow: 0 6px 14px rgba(0, 0, 0, .18); }
.ra-mini-icon a { display: grid; place-items: center; width: 76px; aspect-ratio: 512 / 800; border-radius: 4px; background: var(--wp--preset--color--primary-dark); }
.ra-mini-icon img { width: 36px; box-shadow: none; filter: brightness(0) invert(1); }
.ra-mini-body h3 { margin: 0 0 .3rem; font-size: 1.15rem; line-height: 1.25; }
.ra-mini-body h3 a { color: inherit; text-decoration: none; }
.ra-mini-body h3 a:hover { text-decoration: underline; }
.ra-mini-body p { margin: 0 0 .4rem; font-size: var(--wp--preset--font-size--small); }
.ra-mini-link a { font-weight: 600; }
@media (max-width: 420px) { .ra-mini-grid { grid-template-columns: 1fr; } }

/* Support form: land on the form/confirmation below any sticky header after sending. */
#ra-support { scroll-margin-top: 110px; }
.ra-support-sent { padding: 1.25rem 1.5rem; }
.ra-support-sent .ra-support-sent-title { font-size: 1.25rem; margin-top: 0; }
