/* RJ Lab Toolkit — component styles (front end + editor). Colors come from theme.json presets. */

:root {
	--rjl-purple: var(--wp--preset--color--purple, #5A2D82);
	--rjl-purple-dark: var(--wp--preset--color--purple-dark, #3E1D5C);
	--rjl-gold: var(--wp--preset--color--gold, #FFCB6B);
	--rjl-sage: var(--wp--preset--color--sage, #A2C5BE);
	--rjl-lavender: var(--wp--preset--color--lavender, #C9B8DA);
	--rjl-lavender-light: var(--wp--preset--color--lavender-light, #F1ECF6);
	--rjl-cream: var(--wp--preset--color--cream, #FFFCF7);
	--rjl-ink: var(--wp--preset--color--ink, #2A1F38);
	--rjl-body: var(--wp--preset--color--body, #4A3F5C);
	--rjl-muted: var(--wp--preset--color--muted, #5E5470);
	--rjl-border: var(--wp--preset--color--border, #E9E2EF);
	--rjl-input: #c3ccc6;
	--rjl-serif: var(--wp--preset--font-family--serif, Georgia, serif);
	/* Module 1 palette as a fallback; functions.php sets the real one per page */
	--rjl-m-dark: #244538; --rjl-m-deep: #1c362c; --rjl-m-mid: #4c7a64; --rjl-m-accent: #f5d77a; --rjl-m-accent-light: #fdf5dc;
	--rjl-m-pastel: #a9cfc2; --rjl-m-pastel-light: #e7f2ee; --rjl-m-soft: #c3d6b8; --rjl-m-soft-light: #edf3ea; --rjl-m-earth: #7a5a26;
}

/* Eyebrow labels */
.rjl-eyebrow,
.is-style-rjl-eyebrow {
	margin: 0;
	font-family: var(--wp--preset--font-family--sans);
	font-size: 0.875rem !important;
	font-weight: 800;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	line-height: 1.4;
}
.rjl-eyebrow--muted { color: var(--rjl-muted); }
.rjl-eyebrow--gold { color: var(--rjl-gold); }
.rjl-eyebrow--light { color: #fff; opacity: .9; }

/* Header */
.rjl-header { border-bottom: 1px solid var(--rjl-border); }
.rjl-brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--rjl-purple); }
.rjl-brand img { height: 44px; width: auto; }
.rjl-brand__text { display: flex; flex-direction: column; line-height: 1.1; }
.rjl-brand__name { font-family: var(--rjl-serif); font-weight: 700; font-size: 1.25rem; }
.rjl-brand__sub { font-size: 0.75rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--rjl-muted); }
.rjl-header .wp-block-navigation a { color: var(--rjl-ink); text-decoration: none; }
.rjl-header .wp-block-navigation a:hover { color: var(--rjl-purple); text-decoration: underline; }
.rjl-header .wp-block-button__link { min-height: 44px; display: inline-flex; align-items: center; padding-top: 0; padding-bottom: 0; }

/* Footer */
.rjl-footer img { max-width: 380px; width: 100%; height: auto; }
.rjl-footer a { color: var(--wp--preset--color--on-dark, #E4DAEE); }

/* Buttons */
.is-style-rjl-gold .wp-block-button__link { background: var(--rjl-gold); color: var(--rjl-m-dark); }
.is-style-rjl-gold .wp-block-button__link:hover { background: var(--rjl-m-accent); filter: brightness(1.06); color: var(--rjl-m-dark); }
.is-style-outline .wp-block-button__link { border: 2px solid currentColor; }
.wp-block-button__link { min-height: 48px; }

/* Module card grid */
.rjl-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); gap: 24px; }
.rjl-card {
	display: flex; flex-direction: column; gap: 14px; padding: 28px; min-height: 230px; box-sizing: border-box;
	background: var(--rjl-cream); border: 1px solid var(--rjl-border); border-radius: 16px;
	text-decoration: none !important; color: var(--rjl-ink) !important;
	transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}
.rjl-card { border-top: 6px solid var(--rjl-m-dark); }
.rjl-card:hover, .rjl-card:focus-visible { border-color: var(--rjl-m-dark); box-shadow: 0 6px 24px rgba(31, 42, 37, 0.12); transform: translateY(-2px); }
.rjl-card__title { font-family: var(--rjl-serif); font-size: 1.4375rem; font-weight: 700; line-height: 1.25; color: var(--rjl-m-dark); }
.rjl-card__summary { font-size: 1rem; line-height: 1.55; color: var(--rjl-muted); }
.rjl-card__more { margin-top: auto; font-weight: 700; color: var(--rjl-m-dark); }
.rjl-badge {
	width: 48px; height: 48px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
	font-family: var(--rjl-serif); font-weight: 800; font-size: 1.375rem; color: var(--rjl-m-dark); background: var(--rjl-m-accent);
}

/* Audience dots / cards */
.rjl-dot { display: inline-block; width: 14px; height: 14px; border-radius: 50%; flex-shrink: 0; margin-top: 7px; }

/* Module header */
.rjl-module-top { display: flex; flex-direction: column; gap: 10px; }
.rjl-breadcrumb { font-size: 0.9375rem; color: var(--wp--preset--color--on-dark, #E4DAEE); }
.rjl-breadcrumb a { color: inherit; }
.rjl-progress { display: flex; gap: 6px; max-width: 360px; }
.rjl-progress span { flex: 1; height: 6px; border-radius: 3px; background: rgba(255, 255, 255, .28); }
.rjl-progress span.is-done { background: var(--rjl-m-accent); }

/* Sidebar module nav */
.rjl-modnav { background: #fff; border: 1px solid var(--rjl-border); border-radius: 16px; padding: 20px; }
.rjl-modnav h2 { margin: 0 0 12px; font-size: 0.8125rem !important; color: var(--rjl-muted); }
.rjl-modnav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.rjl-modnav li a {
	display: flex; gap: 12px; align-items: center; padding: 10px 12px; min-height: 44px; box-sizing: border-box;
	border-radius: 10px; color: var(--rjl-ink); text-decoration: none; font-size: 0.9375rem; line-height: 1.3; font-weight: 500;
}
.rjl-modnav li a:hover { background: var(--rjl-m-soft-light); }
.rjl-modnav li a.is-current { background: var(--rjl-m-soft-light); color: var(--rjl-m-dark); font-weight: 700; }
.rjl-modnav__num {
	width: 30px; height: 30px; flex-shrink: 0; box-sizing: border-box; border-radius: 50%; border: 2px solid var(--rjl-m-mid);
	display: flex; align-items: center; justify-content: center; font-size: 0.875rem; font-weight: 700; color: var(--rjl-m-dark);
}
.rjl-modnav li a.is-current .rjl-modnav__num { background: var(--rjl-m-dark); border-color: var(--rjl-m-dark); color: #fff; }
.rjl-outline-btn {
	margin-top: 16px; display: flex; align-items: center; justify-content: center; min-height: 44px;
	border: 1.5px solid var(--rjl-purple); border-radius: 8px; font-weight: 700; font-size: 0.9375rem; text-decoration: none; color: var(--rjl-purple);
}
.rjl-outline-btn:hover { background: var(--rjl-purple); color: #fff; }
@media (min-width: 782px) {
	.rjl-sidebar { position: sticky; top: 24px; }
}

/* Prev / next */
.rjl-pager { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; border-top: 1px solid var(--rjl-border); padding-top: 24px; }
.rjl-pager a { flex: 1 1 260px; max-width: 100%; display: flex; flex-direction: column; gap: 2px; padding: 12px 18px; border-radius: 10px; text-decoration: none; line-height: 1.4; }
.rjl-pager a span { font-size: 0.875rem; }
.rjl-pager__prev { border: 1px solid var(--rjl-input); color: var(--rjl-ink) !important; }
.rjl-pager__prev span { color: var(--rjl-muted); }
.rjl-pager__next { margin-left: auto; background: var(--rjl-m-dark); color: #fff !important; text-align: right; }
.rjl-pager__next span { color: rgba(255, 255, 255, .85); }
.rjl-pager__next:hover { filter: brightness(1.12); }

/* Resource download rows: use a Group with class rjl-resources containing paragraphs with links */
.rjl-resource a, a.rjl-resource {
	display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 20px; min-height: 44px;
	background: #fff; border: 1px solid var(--rjl-border); border-radius: 12px; text-decoration: none; color: var(--rjl-ink);
}
.rjl-resource a:hover { border-color: var(--rjl-m-dark); }

/* Forms */
.rjl-form { background: #fff; border: 1px solid var(--rjl-border); border-top: 6px solid var(--rjl-purple); border-radius: 16px; padding: 32px; display: flex; flex-direction: column; gap: 20px; box-sizing: border-box; }
.rjl-form--short { border-top-width: 1px; }
.rjl-form label { display: flex; flex-direction: column; gap: 6px; font-size: 0.9375rem; font-weight: 600; color: var(--rjl-ink); }
.rjl-form input[type="text"], .rjl-form input[type="email"], .rjl-form select, .rjl-form textarea {
	font: inherit; font-weight: 400; color: var(--rjl-ink); min-height: 44px; box-sizing: border-box; width: 100%;
	border: 1px solid var(--rjl-input); border-radius: 8px; padding: 0 12px; background: #fff;
}
.rjl-form textarea { padding: 10px 12px; resize: vertical; }
.rjl-form :focus-visible { outline: 3px solid var(--rjl-gold); outline-offset: 1px; border-color: var(--rjl-purple); }
.rjl-form__row { display: flex; flex-wrap: wrap; gap: 16px; }
.rjl-form__row > label { flex: 1 1 200px; }
.rjl-form__modules { border: 0; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.rjl-form__modules legend { font-size: 0.9375rem; font-weight: 600; padding: 0; margin-bottom: 10px; }
.rjl-form label.rjl-check { flex-direction: row; align-items: center; gap: 12px; min-height: 40px; font-weight: 400; font-size: 1rem; line-height: 1.3; }
.rjl-check input { width: 20px; height: 20px; accent-color: var(--rjl-purple); flex-shrink: 0; }
.rjl-form__foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; }
.rjl-form__req { font-size: 0.875rem; color: var(--rjl-muted); }
.rjl-form button { cursor: pointer; border: 0; }
.rjl-form__error { margin: 0; padding: 12px 16px; border-radius: 8px; background: #FDECEC; color: #8A1C1C; font-weight: 600; }
.rjl-form--done { align-items: flex-start; padding: 48px 32px; }
.rjl-form--done h2 { margin: 0; }
.rjl-form--done img { height: 64px; width: auto; }
.rjl-hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.rjl-admin-hint { padding: 16px; border: 2px dashed var(--rjl-purple); border-radius: 12px; }

/* Placeholder media box */
.rjl-media-placeholder { aspect-ratio: 16 / 9; display: flex; align-items: center; justify-content: center; border-radius: 12px; }

/* Content building blocks used by the patterns */
.rjl-box { background: #fff; border: 1px solid var(--rjl-border); border-radius: 16px; padding: 28px; }
.rjl-callout { border-radius: 16px; padding: 28px; display: flex; flex-direction: column; gap: 10px; }
.rjl-callout > * { margin-top: 0 !important; margin-bottom: 0; margin-inline: 0 !important; max-width: none !important; }
.rjl-hero-logo img { max-width: 360px; width: 100%; height: auto; margin-inline: auto; display: block; }
.rjl-section-white { border-top: 1px solid var(--rjl-border); border-bottom: 1px solid var(--rjl-border); }

/* Audience cards */
.rjl-aud { background: #fff; border: 1px solid var(--rjl-border); border-radius: 14px; padding: 22px 22px 22px 52px; position: relative; }
.rjl-aud::before { content: ""; position: absolute; left: 22px; top: 29px; width: 14px; height: 14px; border-radius: 50%; background: var(--rjl-gold); }
.rjl-aud--sage::before { background: var(--rjl-sage); }
.rjl-aud--lavender::before { background: var(--rjl-lavender); }
.rjl-aud h3 { font-family: var(--wp--preset--font-family--sans); font-size: 1.125rem !important; margin: 0 0 4px; }
.rjl-aud p { margin: 0; color: var(--rjl-muted); font-size: 1rem; line-height: 1.55; }

/* How-to columns */
.rjl-howto > .wp-block-column { border-top: 4px solid var(--rjl-gold); padding-top: 18px; }
.rjl-howto > .wp-block-column:nth-child(2) { border-top-color: var(--rjl-sage); }
.rjl-howto > .wp-block-column:nth-child(3) { border-top-color: var(--rjl-lavender); }
.rjl-howto h3 { font-family: var(--wp--preset--font-family--sans); }

/* Numbered steps */
ol.rjl-steps { list-style: none; padding: 0; margin: 0; counter-reset: rjl; display: flex; flex-direction: column; gap: 16px; }
ol.rjl-steps li { counter-increment: rjl; display: flex; gap: 14px; align-items: flex-start; font-size: 1rem; line-height: 1.55; color: var(--rjl-ink); }
ol.rjl-steps li::before {
	content: counter(rjl); width: 30px; height: 30px; flex-shrink: 0; border-radius: 50%; background: var(--rjl-gold);
	color: var(--rjl-purple-dark); font-weight: 800; font-size: 0.9375rem; display: flex; align-items: center; justify-content: center;
}
ol.rjl-steps li:nth-child(2)::before { background: var(--rjl-sage); }
ol.rjl-steps li:nth-child(3)::before { background: var(--rjl-lavender); }

/* Resource rows: paragraphs with class rjl-resource inside a group */
p.rjl-resource { margin: 0; }
p.rjl-resource a { display: flex; }
p.rjl-resource a::after { content: "Download ↓"; margin-left: auto; font-size: 0.9375rem; font-weight: 700; color: var(--rjl-m-dark); }

/* Mobile header nav */
@media (max-width: 600px) {
	.rjl-brand__name { font-size: 1.0625rem; }
	.rjl-brand img { height: 36px; }
}

@media (min-width: 600px) { .rjl-pager a { max-width: calc(50% - 6px); } }

/* No stray gap between page sections and the footer */
.wp-site-blocks > main, .wp-site-blocks > footer { margin-block-start: 0; }

/* Module palette on page content: callout labels follow the page's colors */
.rjl-callout.has-gold-light-background-color .is-style-rjl-eyebrow { color: var(--rjl-m-earth) !important; }
.rjl-callout.has-sage-light-background-color .is-style-rjl-eyebrow { color: var(--rjl-m-dark) !important; }
.rjl-callout.has-lavender-light-background-color .is-style-rjl-eyebrow { color: var(--rjl-m-dark) !important; }
.rjl-callout.has-lavender-light-background-color .has-purple-dark-color { color: var(--rjl-m-dark) !important; }
/* ---- Module colors: only on module pages and the home page ---- */
.rjl-is-module .rjl-box { border-top: 4px solid var(--rjl-m-mid); }
.rjl-is-module main h2.wp-block-heading, .rjl-is-module main h3.wp-block-heading,
.rjl-site main h2.wp-block-heading, .rjl-site main h3.wp-block-heading { color: var(--rjl-m-dark); }
.rjl-site .rjl-form { border-top-color: var(--rjl-m-dark); }
.rjl-site .rjl-form .wp-element-button { background: var(--rjl-m-dark); }
.rjl-site .rjl-form .wp-element-button:hover { filter: brightness(1.12); }
.rjl-site .rjl-check input { accent-color: var(--rjl-m-dark); }
.rjl-is-module .rjl-outline-btn { border-color: var(--rjl-m-dark); color: var(--rjl-m-dark); }
.rjl-is-module .rjl-outline-btn:hover { background: var(--rjl-m-dark); color: #fff; }

/* ---- Home, Toolkit, Request and other pages: evergreen site palette (set in functions.php) ---- */
body.rjl-site main > .wp-block-post-content > .alignfull.has-purple-background-color:first-child,
.rjl-hero { background: var(--rjl-m-dark) !important; }
body.rjl-site main .has-purple-color { color: var(--rjl-m-dark) !important; }
body.rjl-site main .wp-block-post-content a:not(.wp-block-button__link):not(.rjl-card) { color: var(--rjl-m-dark); }
body.rjl-site .rjl-section-white { border-top: 0; }

/* ---- Module pages: header accents and footer use the module's own colors (no purple) ---- */
.rjl-is-module .rjl-brand { color: var(--rjl-m-dark); }
.rjl-is-module .rjl-header .wp-block-navigation a:hover { color: var(--rjl-m-dark); }
.rjl-is-module .rjl-header .wp-block-button__link { background: var(--rjl-m-dark); color: #fff; }
.rjl-is-module .rjl-header .wp-block-button__link:hover { filter: brightness(1.12); }
.rjl-is-module .rjl-footer { background-color: var(--rjl-m-dark) !important; color: rgba(255, 255, 255, .9) !important; }
.rjl-is-module .rjl-footer a { color: #fff; }
.rjl-is-module .wp-element-button:not(.rjl-header .wp-element-button) { background-color: var(--rjl-m-dark); }
.rjl-is-module main a:not(.wp-element-button):not(.rjl-pager__next):not(.rjl-outline-btn) { color: var(--rjl-m-dark); }
.rjl-is-module .rjl-pager__prev { color: var(--rjl-ink) !important; }
.rjl-is-module .rjl-modnav li a { color: var(--rjl-ink); }
.rjl-is-module .rjl-modnav li a.is-current { color: var(--rjl-m-dark); }
.rjl-is-module ::selection { background: var(--rjl-m-accent); color: var(--rjl-ink); }
.rjl-is-module .rjl-breadcrumb a { color: inherit !important; }

/* ---- Site pages: header button and footer take the site palette ---- */
.rjl-site .rjl-brand { color: var(--rjl-m-dark); }
.rjl-site .rjl-header .wp-block-navigation a:hover { color: var(--rjl-m-dark); }
.rjl-site .rjl-header .wp-block-button__link { background: var(--rjl-m-dark); color: #fff; }
.rjl-site .rjl-header .wp-block-button__link:hover { filter: brightness(1.15); }
.rjl-site .rjl-footer { background-color: var(--rjl-m-dark) !important; color: rgba(255, 255, 255, .9) !important; }
.rjl-site .rjl-footer a { color: #fff; }

/* Introduction card: full width, first in the grid */
.rjl-card--intro { grid-column: 1 / -1; min-height: 0; flex-direction: row; flex-wrap: wrap; align-items: center; gap: 16px 24px; }
.rjl-card--intro .rjl-card__body { display: flex; flex-direction: column; gap: 6px; flex: 1 1 320px; min-width: 0; }
.rjl-card--intro .rjl-card__more { margin-top: 0; }
.rjl-card--intro .rjl-badge { font-style: italic; }
.rjl-modnav__num { font-variant-numeric: lining-nums; }

/* ---------- Module content (patterns/module-1.php ... module-6.php) ---------- */
.rjl-lead { color: var(--rjl-ink); font-weight: 500; line-height: 1.6; }
.rjl-box .is-style-rjl-eyebrow { color: var(--rjl-m-dark); margin-bottom: 4px; }
.rjl-box h3.wp-block-heading { font-family: var(--wp--preset--font-family--sans); font-size: 1.0625rem !important; margin: 18px 0 8px; }
.rjl-box ul, .rjl-box ol { margin-top: 0; padding-left: 1.25em; }
.rjl-box li { margin-bottom: 6px; line-height: 1.5; }
.rjl-box ol li::marker { color: var(--rjl-m-dark); font-weight: 700; }
.rjl-definition { font-family: var(--rjl-serif); font-size: 1.125rem; line-height: 1.6; color: var(--rjl-ink); }
.rjl-definition p { margin: 0; }
.rjl-callout ul, .rjl-callout ol:not(.rjl-steps) { padding-left: 1.25em; }
.rjl-callout li { line-height: 1.55; margin-bottom: 6px; }
.rjl-callout ol.rjl-steps { gap: 12px; }
.rjl-meta { color: var(--rjl-muted); font-weight: 600; }
.rjl-note { color: var(--rjl-muted); font-size: 0.9375rem; border-top: 1px dashed rgba(0,0,0,.15); padding-top: 10px; }
.rjl-callout.has-gold-light-background-color ol.rjl-steps li::before { background: var(--rjl-m-dark); color: #fff; }

.wp-block-quote.rjl-voice {
	border-left: 4px solid var(--rjl-m-mid); padding: 4px 0 4px 24px; margin-block: 28px;
	font-family: var(--rjl-serif); font-size: 1.1875rem; line-height: 1.55; font-style: italic; color: var(--rjl-ink);
}
.wp-block-quote.rjl-voice p { margin: 0 0 8px; }
.wp-block-quote.rjl-voice p::before { content: "\201C"; }
.wp-block-quote.rjl-voice p::after { content: "\201D"; }
.wp-block-quote.rjl-voice cite {
	display: block; font-family: var(--wp--preset--font-family--sans); font-style: normal; font-size: 0.8125rem;
	font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--rjl-muted);
}
.wp-block-quote.rjl-voice cite::before { content: "\2014\00a0"; }

.rjl-recap { margin-block: 40px; }
.rjl-recap .is-style-rjl-eyebrow { color: var(--rjl-m-accent) !important; }
.rjl-recap .rjl-note { color: rgba(255,255,255,.9); border-top-color: rgba(255,255,255,.25); font-weight: 600; font-size: 1rem; }
ul.rjl-checklist { list-style: none; padding: 0 !important; margin: 0; }
ul.rjl-checklist li { position: relative; padding-left: 32px; margin-bottom: 10px; }
ul.rjl-checklist li::before {
	content: "\2713"; position: absolute; left: 0; top: 2px; width: 22px; height: 22px; border-radius: 50%;
	background: var(--rjl-m-accent); color: var(--rjl-m-dark); font-size: 0.75rem; font-weight: 800;
	display: flex; align-items: center; justify-content: center;
}
