/**
 * RecipeWP Site: layouts and components.
 *
 * theme.json already sets colors, fonts, sizes and button styles.
 * This file adds the parts theme.json can't express: grids, the hero
 * composition, the pricing cards, the comparison table and the forms.
 *
 * Everything is prefixed .rws- (RecipeWP Site) so it can't clash with
 * plugin CSS. Colors always come from the theme.json palette, e.g.
 * var(--wp--preset--color--basil), so changing a color in the Site
 * Editor (Styles → Colors) changes it here too.
 *
 * Sections, top to bottom:
 *   1. Basics (focus ring, icons, check lists)
 *   2. Header and footer
 *   3. Hero (card + pin + the connecting line)
 *   4. Section heads, features, pins
 *   5. Pro modules
 *   6. Pricing, comparison table, FAQ, closing CTA
 *   7. Download / Get Pro pages and the store forms
 *   8. Phones and tablets
 *   9. Reduced motion
 */

/* ---------- 1. Basics ---------- */

:root {
	--rws-ink: var(--wp--preset--color--ink);
	--rws-soft: var(--wp--preset--color--ink-soft);
	--rws-line: var(--wp--preset--color--line);
	--rws-flour: var(--wp--preset--color--flour);
	--rws-basil: var(--wp--preset--color--basil);
	--rws-tomato: var(--wp--preset--color--tomato);
	--rws-radius: 10px;
	/* One shadow, used only where an image sits "on" the page. */
	--rws-lift: 0 1px 2px rgba(29, 41, 34, .08), 0 18px 40px -18px rgba(29, 41, 34, .35);
}

/* A visible keyboard focus ring everywhere (mouse clicks don't show it). */
:where(a, button, input, select, textarea, summary):focus-visible {
	outline: 2px solid var(--rws-basil);
	outline-offset: 2px;
	border-radius: 3px;
}

/* Anchored sections (#features, #pro) stop below the sticky header. */
[id] { scroll-margin-top: 88px; }

.rws-icon {
	width: 26px;
	height: 26px;
	display: block;
}

.rws-lede {
	color: var(--rws-soft);
	max-width: 40em;
}

/* Lists with a basil check mark instead of a bullet. */
ul.rws-checks {
	list-style: none;
	padding: 0;
	margin: 1.25rem 0 0;
}
ul.rws-checks li {
	position: relative;
	padding-left: 1.85rem;
	margin: 0 0 .6rem;
}
ul.rws-checks li::before {
	content: "";
	position: absolute;
	left: 0;
	top: .2em;
	width: 1.15rem;
	height: 1.15rem;
	background: var(--rws-basil);
	/* The check icon from assets/icons/check.svg, used as a stencil. */
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E") center / contain no-repeat;
	mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E") center / contain no-repeat;
}

.rws-also {
	margin-top: var(--wp--preset--spacing--40);
}
p.rws-also { padding-right: max(0px, calc(100% - 46em)); box-sizing: border-box; }

.rws-admin-note {
	padding: 1rem;
	border: 1px dashed var(--rws-tomato);
	border-radius: 6px;
}

/* Sections sit flush against each other and the footer (their own
   padding does the spacing, not the gap WordPress adds between blocks). */
.wp-site-blocks > main,
.wp-site-blocks > footer,
.rws-main > * { margin-block-start: 0; }

/* ---------- 2. Header and footer ---------- */

/* The header stays at the top while scrolling. */
header.wp-block-template-part {
	position: sticky;
	top: 0;
	z-index: 50;
}
.admin-bar header.wp-block-template-part { top: 32px; }
@media (max-width: 782px) {
	.admin-bar header.wp-block-template-part { top: 0; }
}

.rws-mark {
	display: flex;
	line-height: 0;
}
.rws-header .wp-block-site-title { margin: 0; }
.rws-header .wp-block-navigation a:hover { color: var(--rws-basil); }

.rws-footer a {
	color: var(--wp--preset--color--flour);
	text-decoration: none;
}
.rws-footer a:hover { text-decoration: underline; }
.rws-footer .wp-block-site-title a { color: #fff; }
.rws-footer p { color: #c9d1cb; }
.rws-footer h2.rws-footer-h {
	font-family: var(--wp--preset--font-family--text);
	font-size: .9375rem;
	font-weight: 600;
	letter-spacing: 0;
	color: #fff;
	margin: 0 0 .75rem;
}
.rws-footer-list {
	list-style: none;
	padding: 0;
	margin: 0;
	line-height: 2;
}
.rws-footer-small {
	border-top: 1px solid rgba(255, 255, 255, .14);
	padding-top: 1.25rem;
}

/* ---------- 3. Hero ---------- */

.rws-hero-grid {
	display: grid;
	grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
	gap: clamp(2rem, 5vw, 5rem);
	align-items: center;
}
.rws-hero-title {
	margin: 0;
	font-size: clamp(2.5rem, 4.6vw, 3.75rem);
	max-width: 12em;
	text-wrap: balance;
}
.rws-hero-text .rws-lede { margin-top: 1.5rem; }
.rws-hero-proof {
	margin-top: 1.5rem;
	color: var(--rws-soft);
}

/*
 * The card, the pin and the line share one 1000 × 900 grid
 * (the same numbers as the SVG's viewBox), so percentages here and
 * coordinates in the SVG always agree, at any width.
 */
.rws-hero-art {
	position: relative;
	aspect-ratio: 1000 / 900;
	margin: 0;
}
.rws-hero-card,
.rws-hero-pin {
	position: absolute;
	height: auto;
	border-radius: 6px;
	box-shadow: var(--rws-lift);
}
.rws-hero-card { left: 0; top: 0; width: 56%; }            /* 560 × 840 */
.rws-hero-pin { left: 62%; top: 27.78%; width: 38%; }      /* x 620, y 250, 380 × 570 */
.rws-link {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	overflow: visible;
	pointer-events: none;
	z-index: 2;
}
.rws-link path {
	fill: none;
	stroke: var(--rws-tomato);
	stroke-width: 3;
	stroke-linecap: round;
	stroke-linejoin: round;
	/* pathLength="1" in the SVG makes the whole line exactly 1 long,
	   so a dash of 1 offset by 1 hides it and offset 0 shows it. */
	stroke-dasharray: 1;
	stroke-dashoffset: 0;
}
.rws-link circle { fill: var(--rws-tomato); }
.rws-hero-caption {
	position: absolute;
	left: 62%;
	top: 93%;
	width: 38%;
	font-size: var(--wp--preset--font-size--small);
	line-height: 1.45;
	color: var(--rws-soft);
}

/* The page's one bit of motion: the line draws from card to pin once. */
@keyframes rws-draw { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
@keyframes rws-pop { from { opacity: 0; transform: scale(.2); } to { opacity: 1; transform: scale(1); } }
.rws-link path { animation: rws-draw 1.1s cubic-bezier(.6, 0, .25, 1) .5s both; }
.rws-link circle:last-of-type {
	transform-box: fill-box;
	transform-origin: center;
	animation: rws-pop .3s ease-out 1.55s both;
}

/* ---------- 4. Section heads, features, pins ---------- */

.rws-section-head {
	margin-bottom: var(--wp--preset--spacing--40);
}
/* The head spans the full 1200px row (so it lines up with the grid
   below it on the left); only its text is held to a readable width. */
.rws-section-head > * { max-width: 760px; }
.rws-section-head h2 { margin: 0; text-wrap: balance; }
.rws-section-head .rws-lede { margin-top: 1rem; }

.rws-feature-list {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	column-gap: clamp(2rem, 5vw, 4.5rem);
	row-gap: 0;
}
.rws-feature-list > .rws-feature { margin: 0; }
.rws-feature {
	display: grid;
	grid-template-columns: 2.75rem minmax(0, 1fr);
	column-gap: .5rem;
	padding: 1.5rem 0;
	border-top: 1px solid var(--rws-line);
}
.rws-feature > * { margin: 0; }
.rws-feature-icon {
	grid-row: span 2;
	color: var(--rws-basil);
	padding-top: .1rem;
}
.rws-feature h3 { margin: 0; letter-spacing: -.015em; }
.rws-feature p {
	margin: .35rem 0 0;
	color: var(--rws-soft);
}

ul.rws-pin-row {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	grid-template-columns: repeat(5, minmax(0, 1fr));
	gap: clamp(.75rem, 2vw, 1.5rem);
}
.rws-pin img {
	display: block;
	width: 100%;
	height: auto;
	border-radius: 6px;
	box-shadow: var(--rws-lift);
}
.rws-pin-name {
	display: block;
	margin-top: .85rem;
	font-weight: 600;
}
.rws-pin-plan {
	font-size: var(--wp--preset--font-size--small);
	color: var(--rws-soft);
}
.rws-pin.is-free .rws-pin-plan { color: var(--rws-basil); font-weight: 600; }

/* ---------- 5. Pro modules ---------- */

.rws-module {
	display: grid;
	grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
	gap: clamp(2rem, 5vw, 4.5rem);
	align-items: center;
	padding-block: var(--wp--preset--spacing--40);
	border-top: 1px solid var(--rws-line);
}
.rws-section-head + .rws-module { border-top: 0; padding-top: 0; }
.rws-module.is-flipped { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); }
.rws-module.is-flipped .rws-module-text { order: 2; }
.rws-module-text > * { margin-top: 0; }
.rws-module-text h3 { margin: .5rem 0 .75rem; text-wrap: balance; }

.rws-module-name {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: .6rem;
	margin: 0;
	color: var(--rws-basil);
}
.rws-module-name span {
	font-size: var(--wp--preset--font-size--small);
	color: var(--rws-soft);
	border: 1px solid var(--rws-line);
	border-radius: 999px;
	padding: .05rem .6rem;
}

/* Screenshots sit on a flour panel, like a photo on a counter. */
.rws-shot.wp-block-image {
	margin: 0;
	background: var(--rws-flour);
	border-radius: var(--rws-radius);
	padding: clamp(.75rem, 2vw, 1.5rem);
	display: flex;
	justify-content: center;
}
.rws-shot img {
	border-radius: 6px;
	border: 1px solid var(--rws-line);
	box-shadow: var(--rws-lift);
}
.rws-module.is-tall .rws-shot img { max-width: 250px; }

/* ---------- 6. Pricing, comparison, FAQ, CTA ---------- */

.rws-plans {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 1.25rem;
	align-items: stretch;
}
.rws-plans > .rws-plan { margin: 0; }
.rws-plan {
	background: #fff;
	border: 1px solid var(--rws-line);
	border-radius: var(--rws-radius);
	padding: 1.75rem;
}
.rws-plan.is-main { border: 2px solid var(--rws-ink); padding: calc(1.75rem - 1px); }
.rws-plan > * { margin-top: 0; }
.rws-plan h3 { margin: 0; }
.rws-price { margin: .5rem 0 0; display: flex; align-items: baseline; flex-wrap: wrap; gap: .5rem; }
.rws-price strong {
	font-family: var(--wp--preset--font-family--display);
	font-size: 3rem;
	line-height: 1;
	letter-spacing: -.04em;
}
.rws-price span { color: var(--rws-soft); font-size: var(--wp--preset--font-size--small); }
.rws-plan-desc { color: var(--rws-soft); margin: .75rem 0 1.25rem; min-height: 3.2em; }
.rws-plan .rws-checks { border-top: 1px solid var(--rws-line); padding-top: 1.25rem; }

.rws-compare { margin: var(--wp--preset--spacing--30) 0 0; overflow-x: auto; }
.rws-compare table { width: 100%; min-width: 560px; border-collapse: collapse; }
.rws-compare th,
.rws-compare td {
	border: 0;
	border-bottom: 1px solid var(--rws-line);
	padding: .8rem .75rem;
	text-align: center;
	vertical-align: top;
}
.rws-compare th:first-child,
.rws-compare td:first-child { text-align: left; padding-left: 0; }
.rws-compare thead th {
	font-weight: 600;
	border-bottom: 2px solid var(--rws-ink);
}
.rws-compare td:nth-child(n+2) { width: 7.5rem; font-weight: 600; color: var(--rws-basil); }
.rws-compare tr:last-child td,
.rws-compare tr:nth-last-child(2) td { color: var(--rws-ink); font-weight: 500; }
.rws-compare .rws-no { color: #9aa59d; font-weight: 400; }

.rws-faq-grid {
	display: grid;
	grid-template-columns: minmax(0, 4fr) minmax(0, 8fr);
	gap: clamp(1.5rem, 5vw, 4rem);
	align-items: start;
}
.rws-faq-grid > * { margin: 0; }
.rws-faq-list { border-top: 1px solid var(--rws-line); }
.rws-faq-list > .wp-block-details { margin: 0; }
.rws-faq summary {
	cursor: pointer;
	list-style: none;
	font-weight: 600;
	font-size: var(--wp--preset--font-size--medium);
	display: flex;
	justify-content: space-between;
	gap: 1rem;
}
.rws-faq summary::-webkit-details-marker { display: none; }
.rws-faq summary::after {
	content: "+";
	font-weight: 400;
	color: var(--rws-basil);
	flex: none;
}
.rws-faq details[open] summary::after { content: "–"; }
.rws-faq details p { color: var(--rws-soft); margin: .6rem 0 0; max-width: 40em; }

.rws-cta-inner > * { margin-top: 0; max-width: 720px; }
.rws-cta .wp-block-buttons { margin-top: 1.5rem; }
.rws-cta h2 { margin-bottom: .75rem; }
.rws-cta p { color: #e3ece5; }
.rws-cta .rws-btn-light .wp-block-button__link:hover { background: var(--rws-flour) !important; }

/* ---------- 7. Download / Get Pro pages and store forms ---------- */

.rws-download-grid {
	display: grid;
	grid-template-columns: minmax(0, 6fr) minmax(0, 5fr);
	gap: clamp(2rem, 5vw, 5rem);
	align-items: start;
}
.rws-download-grid > * { margin: 0; }
.rws-download-text > *:first-child { margin-top: 0; }
.rws-alt-route { margin-top: 2rem; padding-top: 1.25rem; border-top: 1px solid var(--rws-line); }
.rws-form-panel {
	background: var(--rws-flour);
	border: 1px solid var(--rws-line);
	border-radius: var(--rws-radius);
	padding: clamp(1.25rem, 3vw, 2rem);
}

/* Forms printed by the RecipeWP Store plugin ([rwps_download_form], [rwps_launch_form]). */
.rwps-form { display: grid; gap: 1rem; }
.rwps-form h2 {
	font-size: var(--wp--preset--font-size--large);
	margin: 0;
}
.rwps-field label,
.rwps-choice legend {
	display: block;
	font-weight: 600;
	margin-bottom: .35rem;
}
.rwps-field input[type="text"],
.rwps-field input[type="email"] {
	width: 100%;
	box-sizing: border-box;
	font: inherit;
	padding: .75rem .85rem;
	border: 1.5px solid #b9c2bb;
	border-radius: 6px;
	background: #fff;
	color: var(--rws-ink);
}
.rwps-field input:focus { border-color: var(--rws-basil); outline: 2px solid var(--rws-basil); outline-offset: 0; }
.rwps-choice { border: 0; margin: 0; padding: 0; }
.rwps-choice label {
	display: flex;
	gap: .6rem;
	align-items: flex-start;
	background: #fff;
	border: 1.5px solid var(--rws-line);
	border-radius: 6px;
	padding: .7rem .85rem;
	margin-bottom: .5rem;
	cursor: pointer;
}
.rwps-choice label:has(input:checked) { border-color: var(--rws-basil); }
.rwps-choice input { margin-top: .3rem; accent-color: var(--rws-basil); }
.rwps-consent { font-size: var(--wp--preset--font-size--small); color: var(--rws-soft); margin: 0; }
.rwps-form button[type="submit"] {
	font: inherit;
	font-weight: 600;
	color: #fff;
	background: var(--rws-basil);
	border: 0;
	border-radius: 6px;
	padding: .9rem 1.4rem;
	cursor: pointer;
	justify-self: start;
}
.rwps-form button[type="submit"]:hover { background: var(--wp--preset--color--basil-dark); }
.rwps-msg {
	border-radius: 6px;
	padding: 1rem 1.1rem;
	margin: 0;
	background: #fff;
	border-left: 4px solid var(--rws-basil);
}
.rwps-msg.is-error { border-left-color: var(--rws-tomato); }
.rwps-msg strong { display: block; font-size: var(--wp--preset--font-size--medium); margin-bottom: .25rem; }

/* ---------- 8. Phones and tablets ---------- */

@media (max-width: 1000px) {
	ul.rws-pin-row {
		grid-template-columns: none;
		grid-auto-flow: column;
		grid-auto-columns: 42%;
		overflow-x: auto;
		scroll-snap-type: x mandatory;
		padding-bottom: 1rem;
	}
	.rws-pin { scroll-snap-align: start; }
	.rws-plans { grid-template-columns: 1fr; max-width: 520px; }
	.rws-plan-desc { min-height: 0; }
}

@media (max-width: 860px) {
	.rws-hero-grid,
	.rws-module,
	.rws-module.is-flipped,
	.rws-faq-grid,
	.rws-download-grid { grid-template-columns: minmax(0, 1fr); }
	.rws-module.is-flipped .rws-module-text { order: 0; }
	.rws-feature-list { grid-template-columns: minmax(0, 1fr); }
	/* The caption moves under the whole picture, full width. */
	.rws-hero-art { margin-bottom: 3.5rem; }
	.rws-hero-caption { left: 0; top: 100%; width: 100%; padding-top: .75rem; }
}

@media (max-width: 600px) {
	ul.rws-pin-row { grid-auto-columns: 62%; }
	.rws-header .wp-block-site-title { font-size: 1.125rem; }
}

/* ---------- 9. Reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
	.rws-link path,
	.rws-link circle:last-of-type { animation: none; }
	html { scroll-behavior: auto; }
}
html { scroll-behavior: smooth; }

/* Form rows: the grid gap does the spacing, not paragraph margins. */
.rwps-form p,
.rwps-form fieldset { margin: 0; }

/* Section pages on the normal page template: no white gap above the
   first section or below the last one (the sections pad themselves). */
main.rws-main:has(> .wp-block-post-content > .rws-section:first-child) { padding-top: 0 !important; }
main.rws-main:has(> .wp-block-post-content > .rws-section:last-child) { padding-bottom: 0 !important; }
main.rws-main > .wp-block-post-content:has(> .rws-section) { margin-block-start: 0; }

/* ---------- 10. Help center, Q&A, version history ---------- */

/* Topics on /help/: a grid of short lists, not cards. */
.rwps-help-index {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 2.5rem clamp(1.5rem, 4vw, 3.5rem);
}
.rwps-help-index.is-single { grid-template-columns: minmax(0, 1fr); }
.rwps-help-topic h2 {
	font-size: var(--wp--preset--font-size--medium);
	letter-spacing: -.01em;
	margin: 0 0 .35rem;
	padding-top: 1rem;
	border-top: 2px solid var(--rws-ink);
}
.rwps-help-topic h2 a { color: inherit; text-decoration: none; }
.rwps-help-topic h2 a:hover { color: var(--rws-basil); }
.rwps-help-topic-desc { color: var(--rws-soft); font-size: var(--wp--preset--font-size--small); margin: 0 0 .75rem; }
.rwps-help-topic ul { list-style: none; margin: 0; padding: 0; }
.rwps-help-topic li { padding: .45rem 0; border-bottom: 1px solid var(--rws-line); }
.rwps-help-topic li a { text-decoration: none; font-weight: 500; }
.rwps-help-topic li a:hover { text-decoration: underline; }
.rwps-help-topic li span { display: block; color: var(--rws-soft); font-size: var(--wp--preset--font-size--small); margin-top: .15rem; }
.is-single .rwps-help-topic li { padding: .9rem 0; }

.rws-help-search { max-width: 560px; margin-top: 1.5rem; }
.rws-help-search .wp-block-search__input {
	font: inherit;
	padding: .75rem .9rem;
	border: 1.5px solid #b9c2bb;
	border-radius: 6px;
	background: #fff;
}
.rws-help-search .wp-block-search__button { margin-left: .5rem; }
.rws-help-links { display: flex; gap: 1.5rem; margin-top: 1rem; }

.rwps-help-crumbs { font-size: var(--wp--preset--font-size--small); color: var(--rws-soft); }
.rwps-help-crumbs a { color: var(--rws-soft); }
.rws-article .wp-block-post-content h2 { font-size: var(--wp--preset--font-size--large); margin-top: 2.25rem; }
.rws-article .wp-block-post-content code,
.rwps-changelog code {
	background: var(--rws-flour);
	border: 1px solid var(--rws-line);
	border-radius: 4px;
	padding: .05em .35em;
	font-size: .9em;
}
.rws-article-meta { gap: .35rem; margin-top: 2rem; }
.rws-article-meta p { margin: 0; }
.rwps-help-related { margin-top: 2.5rem; padding-top: 1.25rem; border-top: 1px solid var(--rws-line); }
.rwps-help-related h2 { font-size: var(--wp--preset--font-size--medium); margin: 0 0 .5rem; }
.rwps-help-related ul { margin: 0; padding-left: 1.1rem; }
.rwps-help-related li { margin: .3rem 0; }
.rws-help-ask {
	margin-top: 2.5rem;
	background: var(--rws-flour);
	border: 1px solid var(--rws-line);
	border-radius: var(--rws-radius);
	padding: 1.5rem;
}
.rws-help-ask > * { margin-top: 0; }
.rws-help-ask h2 { margin-bottom: .4rem; }

/* Q&A: the same open/close rows as the FAQ. */
.rwps-questions { border-top: 1px solid var(--rws-line); margin-top: 1.5rem; }
.rwps-question { border-bottom: 1px solid var(--rws-line); padding: 1rem 0; }
.rwps-question summary {
	cursor: pointer;
	list-style: none;
	font-weight: 600;
	display: flex;
	justify-content: space-between;
	gap: 1rem;
}
.rwps-question summary::-webkit-details-marker { display: none; }
.rwps-question summary::after { content: "+"; color: var(--rws-basil); font-weight: 400; flex: none; }
.rwps-question[open] summary::after { content: "–"; }
.rwps-answer { color: var(--rws-soft); }
.rwps-answer > :first-child { margin-top: .6rem; }
.rwps-question-meta { font-size: var(--wp--preset--font-size--small); color: #8a958d; margin: .5rem 0 0; }
.rwps-questions-empty { color: var(--rws-soft); margin-top: 1.5rem; }
.rwps-form select,
.rwps-form textarea {
	width: 100%;
	box-sizing: border-box;
	font: inherit;
	padding: .75rem .85rem;
	border: 1.5px solid #b9c2bb;
	border-radius: 6px;
	background: #fff;
	color: var(--rws-ink);
}
.rwps-form label:has(+ select),
.rwps-form label:has(+ textarea) { display: block; font-weight: 600; margin-bottom: .35rem; }

/* Version history: three columns, newest release marked. */
.rws-version-cols {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: clamp(1.5rem, 4vw, 3rem);
	align-items: start;
}
.rws-version-cols > * { margin: 0; }
.rws-version-col > h2 {
	font-size: var(--wp--preset--font-size--large);
	padding-bottom: .6rem;
	border-bottom: 2px solid var(--rws-ink);
	margin: 0;
}
.rwps-version { border-bottom: 1px solid var(--rws-line); padding: 1rem 0; }
.rwps-version h3 {
	font-family: var(--wp--preset--font-family--text);
	font-size: var(--wp--preset--font-size--base);
	font-weight: 700;
	letter-spacing: 0;
	margin: 0 0 .4rem;
	display: flex;
	align-items: center;
	gap: .5rem;
}
.rwps-version h3 span {
	font-size: .75rem;
	font-weight: 600;
	color: #fff;
	background: var(--rws-basil);
	border-radius: 999px;
	padding: .05rem .55rem;
}
.rwps-version ul { margin: 0; padding-left: 1.1rem; font-size: .9375rem; color: var(--rws-soft); }
.rwps-version li { margin: .3rem 0; }

@media (max-width: 960px) {
	.rwps-help-index { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.rws-version-cols { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 600px) {
	.rwps-help-index { grid-template-columns: minmax(0, 1fr); }
}
/* Inside narrow article/topic columns, the intro keeps the column's width. */
.rws-article .rws-lede { max-width: var(--wp--style--global--content-size, 720px); }
.rws-main .wp-block-term-description.rws-lede { max-width: 760px; } /* = the topic page column */
.rws-article .rws-lede { margin-top: .5rem; }

/* PayPal checkout ([rwps_checkout]) */
.rwps-checkout .rwps-pp-buttons { min-height: 48px; margin-top: .25rem; }
.rwps-checkout .rwps-key {
	display: inline-block;
	font-size: 1.05rem;
	padding: .3rem .55rem;
	background: var(--rws-flour);
	border: 1px solid var(--rws-line);
	border-radius: 6px;
	user-select: all; /* one click selects the whole key */
}

/* Sections inserted from older versions of these patterns (before they
   were marked full width) still go edge to edge on the default page
   template. No need to re-insert them. */
.wp-block-post-content.is-layout-constrained > .rws-section:not(.alignfull) {
	max-width: none !important;
	margin-left: calc(var(--wp--style--root--padding-left) * -1) !important;
	margin-right: calc(var(--wp--style--root--padding-right) * -1) !important;
}

/* [rws_section] output: always full width, even inside a narrow page
   template (it measures from the window, not from the page column). */
.rws-bleed {
	width: 100vw;
	max-width: 100vw !important;
	margin-left: calc(50% - 50vw) !important;
	margin-right: calc(50% - 50vw) !important;
}
.rws-bleed > .rws-section { margin: 0; }
.rws-bleed + .rws-bleed { margin-top: 0 !important; }
/* 100vw includes the scrollbar; this stops a sideways scroll from that. */
html, body { overflow-x: clip; }

/* ---------------------------------------------------------------
 * Blog cards (templates/home.html and archive.html)
 * The Posts page shows posts as a 3-column grid of cards:
 * photo, date, title, short excerpt. 2 columns on tablets, 1 on phones.
 * ------------------------------------------------------------- */
.rws-post-grid .wp-block-post-template { gap: var(--wp--preset--spacing--40); }
.rws-post-card {
	height: 100%;
	background: var(--wp--preset--color--white);
	border: 1px solid var(--wp--preset--color--line);
	border-radius: 6px;
	overflow: hidden;
	transition: border-color .15s;
}
.rws-post-card:hover { border-color: var(--wp--preset--color--ink-soft); }
.rws-post-card .rws-post-card-img { margin: 0; }
.rws-post-card .rws-post-card-img img { display: block; width: 100%; }
.rws-post-card-body { padding: var(--wp--preset--spacing--30); }
.rws-post-card-body > * { margin-block: 0 .5rem; }
.rws-post-card .wp-block-post-title { line-height: 1.2; }
.rws-post-card .wp-block-post-title a { text-decoration: none; color: inherit; }
.rws-post-card .wp-block-post-title a:hover { color: var(--wp--preset--color--basil-dark); }
.rws-post-card .wp-block-post-excerpt__more-link { font-weight: 600; color: var(--wp--preset--color--basil-dark); }
@media (max-width: 900px) { .rws-post-grid .wp-block-post-template.is-layout-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .rws-post-grid .wp-block-post-template.is-layout-grid { grid-template-columns: 1fr; } }
