/**
 * Cleaning Tips article - Factory Fresh, editorial.
 *
 * SCOPE: every rule is nested under .cwpr-article, with two deliberate
 * exceptions that are shared with the index and defined here under their own
 * page scope: the product tray (.cwpr-tray / .cwpr-prod) and the meta/pill bits.
 * Only these two pages use them, so a third shared file would be one more thing
 * to keep in sync for no benefit.
 *
 * THE .cwpr-artbody RESETS ARE LOAD-BEARING, NOT TIDYING. 55 of the 113 posts carry
 * inline styles and 10 are wrapped in a hardcoded
 *   <div style="font-family:'Open Sans'; font-size:21px; color:#333;
 *               max-width:1000px; margin:0 auto">
 * with <h3 style="font-size:26px; margin-top:40px"> headings and
 * <a style="color:#0a1f8f"> links - #0a1f8f being the rogue POS Gen-1 blue, not
 * a brand colour and not the rewards blue either. Inline styles beat normal
 * stylesheet rules, so without the !important declarations below that wrapper
 * imposes its own font, measure, colour and link colour on the article.
 *
 * includes/blog.php ALSO strips style attributes on output, so these resets are
 * the second of two lines of defence rather than the only one. Both are kept: the
 * stripper handles shapes we have not seen, the resets keep the page correct if
 * the stripper is ever disabled or bypassed by a plugin filtering the_content
 * after us. Verified against the real legacy wrapper by measurement.
 *
 * PALETTE: brand lime #80BC00; the dark is #1A2332, the design system's own
 * --bg-dark / --text-heading token (it replaced a near-black #16210A). Measured:
 * #1A2332 on lime 6.85:1, white on #1A2332 15.78:1. Never white on lime (2.3:1),
 * never logo grey #52575A on lime (3.17:1). NO REWARDS BLUE: prices are plain ink.
 *
 * @package cw-page-rebuild
 */

.cwpr-article {
	--cwpr-b-lime: var(--cw-lime, #80bc00);
	--cwpr-b-lime-deep: var(--cw-lime-deep, #5f8c00);
	--cwpr-b-lime-dark: var(--cw-lime-dark, #4c7000);
	--cwpr-b-lime-wash: var(--cw-lime-wash, #f3f9e4);
	--cwpr-b-lime-row: var(--cw-lime-row, #f9fcf0);
	--cwpr-b-dark: var(--cw-ink, #263238);
	--cwpr-b-ink: var(--cw-ink, #263238);
	--cwpr-b-ink-2: var(--cw-ink-2, #52575a);
	--cwpr-b-grey: var(--cw-grey, #6b6b6b);
	--cwpr-b-faint: var(--cw-faint, #9a9a94);
	--cwpr-b-ground: var(--cw-ground, #f7f7f5);
	--cwpr-b-card: #fff;
	--cwpr-b-line: var(--cw-line, #e7e5df);
	--cwpr-b-line-2: var(--cw-line-2, #d6d3ca);
	/*
	 * ONE TYPEFACE: Plus Jakarta Sans, the face CW_Design_System_v1.0 actually
	 * specifies (--font-primary). Loaded as a single variable font by
	 * cwpr_blog_enqueue_font(). The headline serif that concept B proposed was
	 * dropped by decision - there is no --cwpr-b-serif any more, and headings
	 * use this same stack at a heavier weight.
	 */
	--cwpr-b-sans: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

	background: var(--cwpr-b-ground);
	color: var(--cwpr-b-ink);
	font-family: var(--cwpr-b-sans);
	font-size: 15px;
	line-height: 1.55;
	-webkit-font-smoothing: antialiased;
}

.cwpr-article *,
.cwpr-article *::before,
.cwpr-article *::after {
	box-sizing: border-box;
}

/*
 * ZERO-SPECIFICITY BASELINES - LOAD-BEARING.
 *
 * These are wrapped in :where() so they sit at specificity (0,0,1) instead of
 * (0,1,1). Written the obvious way, `.cwpr-article a { color: inherit }` OUT-RANKS every
 * single-class component rule like `.cwpr-tray-addall { color: ... }` (0,1,0) - and
 * it did: the "Add all" button rendered its dark text on its own dark background,
 * about 1.2:1 contrast and unreadable. Same class of bug as the footer's
 * `#cwpr-footer a { color: inherit }`. Do not unwrap the :where().
 */
:where(.cwpr-article h1, .cwpr-article h2, .cwpr-article h3) {
	margin: 0;
	line-height: 1.2;
	text-wrap: balance;
}

:where(.cwpr-article a) {
	color: inherit;
	text-decoration: none;
}

:where(.cwpr-article img) {
	max-width: 100%;
	height: auto;
	display: block;
}

.cwpr-article :focus-visible {
	outline: 3px solid rgba(128, 188, 0, 0.5);
	outline-offset: 2px;
	border-radius: 4px;
}

.cwpr-article-wrap {
	max-width: 1180px;
	margin: 0 auto;
	padding: 0 20px;
}

/* ------------------------------------------------------------ article head */

.cwpr-article-head {
	background: var(--cwpr-b-card);
	border-bottom: 1px solid var(--cwpr-b-line);
	padding: 22px 0 34px;
}

.cwpr-article-crumb {
	font-size: 12.5px;
	color: var(--cwpr-b-grey);
	margin-bottom: 20px;
}

.cwpr-article-crumb a:hover {
	color: var(--cwpr-b-lime-dark);
	text-decoration: underline;
}

.cwpr-article-headinner {
	max-width: 780px;
}

.cwpr-article-kicker {
	font-size: 11.5px;
	font-weight: 800;
	text-transform: uppercase;
	letter-spacing: 0.11em;
	color: var(--cwpr-b-lime-dark);
}

.cwpr-article-head h1 {
	font-family: var(--cwpr-b-sans);
	font-size: 38px;
	font-weight: 700;
	letter-spacing: -0.022em;
	color: var(--cwpr-b-dark);
	margin: 12px 0 0;
}

.cwpr-article-stand {
	font-family: var(--cwpr-b-sans);
	font-size: 19px;
	line-height: 1.5;
	color: var(--cwpr-b-ink-2);
	margin: 16px 0 0;
	font-weight: 400;
}

.cwpr-article-byline {
	display: flex;
	align-items: center;
	gap: 10px;
	flex-wrap: wrap;
	margin: 22px 0 0;
	padding-top: 18px;
	border-top: 1px solid var(--cwpr-b-line);
	font-size: 13px;
	color: var(--cwpr-b-grey);
}

.cwpr-article-who {
	font-weight: 700;
	color: var(--cwpr-b-ink-2);
}

/* ------------------------------------------------------------ shared meta */

.cwpr-blog-meta {
	display: flex;
	align-items: center;
	gap: 9px;
	flex-wrap: wrap;
	font-size: 12px;
	color: var(--cwpr-b-grey);
}

.cwpr-blog-pill {
	font-size: 10.5px;
	font-weight: 800;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	padding: 3px 9px;
	border-radius: 999px;
	background: var(--cw-ground, #f7f7f5);
	color: var(--cwpr-b-ink-2);
}

.cwpr-blog-pill.is-howto,
.cwpr-blog-pill.is-checklist {
	background: var(--cwpr-b-lime-wash);
	color: var(--cwpr-b-lime-dark);
}

.cwpr-blog-dot {
	color: var(--cwpr-b-line-2);
}

/* ----------------------------------------------------------------- layout */

.cwpr-article-cols {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 320px;
	gap: 52px;
	padding: 34px 0 20px;
	align-items: start;
}

/* LOAD-BEARING. Grid items default to min-width:auto, so the column grows to its
   widest descendant's min-content - and the tray's nowrap product names measure
   ~254px. Measured: without this the single-column mobile layout renders 382px
   wide inside a 375px viewport and the whole page scrolls sideways. */
.cwpr-article-cols > * {
	min-width: 0;
}

.cwpr-article-heroimg {
	border-radius: 14px;
	overflow: hidden;
	border: 1px solid var(--cwpr-b-line);
	margin: 0 0 30px;
}

.cwpr-article-heroimg img {
	width: 100%;
}

/* ----------------------------------------------------------- article body */

.cwpr-artbody {
	font-family: var(--cwpr-b-sans);
	font-size: 17px;
	line-height: 1.72;
	color: var(--cwpr-b-ink);
	max-width: 68ch;
}

/* The legacy wrapper div - see the file header. */
.cwpr-artbody > div {
	max-width: none !important;
	font-family: inherit !important;
	font-size: inherit !important;
	line-height: inherit !important;
	color: inherit !important;
	margin: 0 !important;
	padding: 0 !important;
}

.cwpr-artbody p {
	margin: 0 0 20px;
}

.cwpr-artbody h2,
.cwpr-artbody h3,
.cwpr-artbody h4 {
	font-family: var(--cwpr-b-sans) !important;
	color: var(--cwpr-b-dark) !important;
	font-size: 23px !important;
	font-weight: 700 !important;
	letter-spacing: -0.015em;
	line-height: 1.25;
	margin: 38px 0 14px !important;
	scroll-margin-top: 90px;
}

.cwpr-artbody h3 {
	font-size: 21px !important;
}

.cwpr-artbody h4 {
	font-size: 19px !important;
}

.cwpr-artbody ul,
.cwpr-artbody ol {
	margin: 0 0 22px;
	padding-left: 26px;
}

.cwpr-artbody li {
	margin-bottom: 9px;
}

.cwpr-artbody li::marker {
	color: var(--cwpr-b-lime-deep);
}

.cwpr-artbody a {
	color: var(--cwpr-b-lime-dark) !important;
	text-decoration: underline;
	text-decoration-color: rgba(128, 188, 0, 0.55);
	text-underline-offset: 2px;
	font-weight: 600;
}

.cwpr-artbody a:hover,
.cwpr-artbody a:focus-visible {
	text-decoration-color: var(--cwpr-b-lime);
	background: var(--cwpr-b-lime-wash);
}

.cwpr-artbody strong,
.cwpr-artbody b {
	font-weight: 700;
	color: var(--cwpr-b-dark);
}

.cwpr-artbody blockquote {
	margin: 28px 0;
	padding: 4px 0 4px 20px;
	border-left: 4px solid var(--cwpr-b-lime);
	color: var(--cwpr-b-ink-2);
	font-style: italic;
}

.cwpr-artbody img {
	border-radius: 10px;
	margin: 0 0 22px;
}

/* Content shapes that genuinely exist in this archive: 2 posts contain tables
   and 2 contain iframe embeds. (Zero contain in-body images - every image in the
   library is the featured image - but img is covered above for future posts.) */
.cwpr-artbody table {
	width: 100% !important;
	border-collapse: collapse;
	font-family: var(--cwpr-b-sans);
	font-size: 14px;
	margin: 0 0 24px;
	display: block;
	overflow-x: auto;
}

.cwpr-artbody th,
.cwpr-artbody td {
	border: 1px solid var(--cwpr-b-line);
	padding: 9px 12px;
	text-align: left;
}

.cwpr-artbody th {
	background: var(--cwpr-b-lime-wash);
	color: var(--cwpr-b-lime-dark);
	font-weight: 800;
	font-size: 12.5px;
	text-transform: uppercase;
	letter-spacing: 0.05em;
}

.cwpr-artbody iframe {
	width: 100%;
	max-width: 100%;
	aspect-ratio: 16 / 9;
	height: auto;
	border: 0;
	border-radius: 10px;
	margin: 0 0 24px;
}

/* --------------------------------------------------- product tray (shared) */

.cwpr-tray {
	border-top: 1px dashed var(--cwpr-b-line-2);
	background: var(--cwpr-b-lime-row);
	padding: 13px 18px 14px;
}

.cwpr-tray-lab {
	display: flex;
	align-items: baseline;
	gap: 8px;
	flex-wrap: wrap;
	font-size: 10.5px;
	font-weight: 800;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	color: var(--cwpr-b-lime-dark);
	margin-bottom: 8px;
}

.cwpr-tray-lab s {
	text-decoration: none;
	font-weight: 700;
	color: var(--cwpr-b-faint);
	letter-spacing: 0;
	text-transform: none;
	font-size: 11.5px;
}

.cwpr-prod {
	display: flex;
	align-items: center;
	gap: 11px;
	padding: 9px 0;
}

.cwpr-prod + .cwpr-prod {
	border-top: 1px solid var(--cwpr-b-line);
}

.cwpr-prod-img {
	width: 36px;
	height: 36px;
	border-radius: 7px;
	background: var(--cwpr-b-ground);
	border: 1px solid var(--cwpr-b-line);
	flex: 0 0 auto;
	object-fit: cover;
}

.cwpr-prod-name {
	flex: 1 1 auto;
	min-width: 0;
	font-size: 13.5px;
	font-weight: 700;
	letter-spacing: -0.005em;
}

.cwpr-prod-name:hover {
	color: var(--cwpr-b-lime-dark);
}

.cwpr-prod.is-compact .cwpr-prod-name {
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.cwpr-prod-price {
	font-size: 13.5px;
	font-weight: 800;
	flex: 0 0 auto;
	font-variant-numeric: tabular-nums;
}

.cwpr-prod-price .amount,
.cwpr-prod-price bdi {
	color: inherit;
	font-size: inherit;
	font-weight: inherit;
}

.cwpr-prod-price del {
	display: none;
}

.cwpr-prod-add {
	flex: 0 0 auto;
	background: var(--cwpr-b-card);
	border: 1.5px solid var(--cwpr-b-line-2);
	border-radius: 999px;
	width: 30px;
	height: 30px;
	font-size: 17px;
	font-weight: 800;
	color: var(--cwpr-b-lime-dark);
	line-height: 1;
	display: grid;
	place-items: center;
	transition: background 0.14s ease, border-color 0.14s ease, color 0.14s ease;
}

.cwpr-prod-add:hover {
	background: var(--cwpr-b-lime);
	border-color: var(--cwpr-b-lime);
	color: var(--cwpr-b-dark);
}

.cwpr-tray-foot {
	display: flex;
	align-items: center;
	gap: 12px;
	flex-wrap: wrap;
	margin-top: 10px;
	padding-top: 11px;
	border-top: 1px solid var(--cwpr-b-line);
}

.cwpr-tray-rest {
	font-size: 12px;
	color: var(--cwpr-b-grey);
}

.cwpr-tray-addall {
	margin-left: auto;
	background: var(--cwpr-b-dark);
	color: var(--cw-ground, #f7f7f5);
	border-radius: 999px;
	font-size: 12.5px;
	font-weight: 800;
	padding: 9px 16px;
	transition: background 0.15s ease;
}

.cwpr-tray-addall:hover {
	background: var(--cw-ink, #263238);
	color: #fff;
}

/* --------------------------------------------------- end-of-article band */

.cwpr-article-allband {
	background: var(--cwpr-b-dark);
	border-radius: 14px;
	padding: 26px 28px;
	margin: 40px 0 0;
	max-width: 68ch;
}

.cwpr-article-allband h2 {
	font-family: var(--cwpr-b-sans);
	font-size: 22px;
	font-weight: 700;
	color: #fff;
}

.cwpr-article-allband p {
	font-size: 14px;
	color: var(--cw-line-2, #d6d3ca);
	margin: 9px 0 18px;
}

.cwpr-article-lines {
	background: rgba(255, 255, 255, 0.06);
	border-radius: 10px;
	padding: 4px 14px;
	margin-bottom: 18px;
}

.cwpr-article-ln {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 11px 0;
	font-size: 14px;
	color: var(--cw-ground, #f7f7f5);
}

.cwpr-article-ln + .cwpr-article-ln {
	border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.cwpr-article-ln-n {
	flex: 1 1 auto;
	min-width: 0;
	font-weight: 700;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.cwpr-article-ln-n:hover {
	color: #fff;
	text-decoration: underline;
}

.cwpr-article-ln-p {
	flex: 0 0 auto;
	font-weight: 800;
	font-variant-numeric: tabular-nums;
}

.cwpr-article-ln-p .amount,
.cwpr-article-ln-p bdi {
	color: inherit;
	font-size: inherit;
	font-weight: inherit;
}

.cwpr-article-act {
	display: flex;
	align-items: center;
	gap: 14px;
	flex-wrap: wrap;
}

.cwpr-article-go {
	background: var(--cwpr-b-lime);
	color: var(--cwpr-b-dark);
	border-radius: 999px;
	font-size: 14.5px;
	font-weight: 800;
	padding: 14px 26px;
	transition: background 0.15s ease;
}

.cwpr-article-go:hover {
	background: var(--cw-lime, #80bc00);
}

.cwpr-article-tot {
	font-size: 13.5px;
	color: var(--cw-line-2, #d6d3ca);
}

.cwpr-article-tot b {
	color: #fff;
	font-size: 16px;
	font-variant-numeric: tabular-nums;
}

.cwpr-article-tot .amount,
.cwpr-article-tot bdi {
	color: inherit;
	font-size: inherit;
	font-weight: inherit;
}

/* ------------------------------------------------------------------- rail */

.cwpr-article-rail {
	position: sticky;
	top: 78px;
}

.cwpr-article-panel {
	background: var(--cwpr-b-card);
	border: 1px solid var(--cwpr-b-line);
	border-radius: 12px;
	padding: 17px 18px;
	margin-bottom: 16px;
}

.cwpr-article-panel h3 {
	font-family: var(--cwpr-b-sans);
	font-size: 13px;
	font-weight: 800;
	text-transform: uppercase;
	letter-spacing: 0.07em;
	color: var(--cwpr-b-grey);
	margin-bottom: 3px;
}

.cwpr-article-panel-sub {
	font-size: 12.5px;
	color: var(--cwpr-b-faint);
	margin: 0 0 13px;
}

.cwpr-article-addall {
	display: block;
	text-align: center;
	width: 100%;
	margin-top: 13px;
	background: var(--cwpr-b-dark);
	color: var(--cw-ground, #f7f7f5);
	border-radius: 999px;
	font-size: 13.5px;
	font-weight: 800;
	padding: 12px;
	transition: background 0.15s ease;
}

.cwpr-article-addall:hover {
	background: var(--cw-ink, #263238);
	color: #fff;
}

.cwpr-article-toc ol {
	list-style: none;
	margin: 0;
	padding: 0;
	counter-reset: cwprtoc;
}

.cwpr-article-toc li {
	counter-increment: cwprtoc;
	border-top: 1px solid var(--cwpr-b-line);
}

.cwpr-article-toc li:first-child {
	border-top: 0;
}

.cwpr-article-toc a {
	display: grid;
	grid-template-columns: 20px minmax(0, 1fr);
	gap: 10px;
	padding: 9px 0;
	font-size: 13.5px;
	font-weight: 700;
	color: var(--cwpr-b-ink-2);
}

.cwpr-article-toc a::before {
	content: counter(cwprtoc);
	color: var(--cwpr-b-lime);
	font-weight: 800;
}

.cwpr-article-toc a:hover {
	color: var(--cwpr-b-lime-dark);
}

/* ---------------------------------------------------------------- related */

.cwpr-article-related {
	border-top: 1px solid var(--cwpr-b-line);
	margin-top: 50px;
	padding: 34px 0 60px;
}

.cwpr-article-rh {
	display: flex;
	align-items: baseline;
	gap: 14px;
	margin-bottom: 20px;
	flex-wrap: wrap;
}

.cwpr-article-related h2 {
	font-family: var(--cwpr-b-sans);
	font-size: 22px;
	font-weight: 700;
	color: var(--cwpr-b-dark);
}

.cwpr-blog-all {
	margin-left: auto;
	font-size: 13.5px;
	font-weight: 800;
	color: var(--cwpr-b-lime-dark);
}

.cwpr-blog-all:hover {
	text-decoration: underline;
}

.cwpr-article-rgrid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 24px;
}

.cwpr-article-rc {
	background: var(--cwpr-b-card);
	border: 1px solid var(--cwpr-b-line);
	border-radius: 12px;
	overflow: hidden;
	min-width: 0;
	transition: border-color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

.cwpr-article-rc:hover {
	border-color: var(--cwpr-b-line-2);
	box-shadow: 0 8px 22px rgba(38, 50, 56, 0.07);
	transform: translateY(-2px);
}

.cwpr-blog-cimg {
	aspect-ratio: 5 / 3;
	overflow: hidden;
	background: var(--cwpr-b-line);
	display: block;
}

.cwpr-blog-cimg img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.4s ease;
}

.cwpr-article-rc:hover .cwpr-blog-cimg img {
	transform: scale(1.04);
}

.cwpr-article-rb {
	padding: 16px 17px 18px;
}

.cwpr-article-rb h3 {
	font-family: var(--cwpr-b-sans);
	font-size: 17.5px;
	font-weight: 700;
	letter-spacing: -0.012em;
	margin: 10px 0 0;
	color: var(--cwpr-b-dark);
	transition: color 0.15s ease;
}

.cwpr-article-rc:hover .cwpr-article-rb h3 {
	color: var(--cwpr-b-lime-dark);
}

/* --------------------------------------------------------------- responsive */

@media (max-width: 1000px) {
	.cwpr-article-cols {
		grid-template-columns: 1fr;
		gap: 30px;
	}

	.cwpr-article-rail {
		position: static;
	}

	.cwpr-article-head h1 {
		font-size: 32px;
	}

	.cwpr-article-rgrid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (max-width: 620px) {
	.cwpr-article-head h1 {
		font-size: 26px;
	}

	.cwpr-article-stand {
		font-size: 17px;
	}

	.cwpr-artbody {
		font-size: 16.5px;
	}

	.cwpr-artbody h2 {
		font-size: 21px !important;
	}

	.cwpr-article-rgrid {
		grid-template-columns: 1fr;
	}

	.cwpr-article-allband {
		padding: 22px 20px;
	}

	/* A truncated product name is useless to someone deciding whether to buy it. */
	.cwpr-article-ln-n,
	.cwpr-prod.is-compact .cwpr-prod-name {
		white-space: normal;
		overflow: visible;
		text-overflow: clip;
	}

	.cwpr-article-ln {
		align-items: flex-start;
	}
}

/*
 * The tray button. Kept as a two-class selector and with min-width pinned, both
 * defensively: this site carries an inline `.add_to_cart_button { min-width:90px;
 * color:#fff !important; background:linear-gradient(#28a745,#218838) }` rule that
 * used to capture these buttons and render them as wide green slabs. The
 * WooCommerce classes are gone from the markup (see blog.php) so that rule no
 * longer matches - these declarations make sure a future site-wide button rule
 * cannot reach in either.
 */
.cwpr-tray .cwpr-prod-add,
.cwpr-article-panel .cwpr-prod-add {
	box-sizing: border-box;
	width: 30px;
	min-width: 30px;
	max-width: 30px;
	height: 30px;
	min-height: 0;
	padding: 0;
	margin: 0;
	background: var(--cwpr-b-card);
	background-image: none;
	border: 1.5px solid var(--cwpr-b-line-2);
	border-radius: 999px;
	box-shadow: none;
	color: var(--cwpr-b-lime-dark);
	font-size: 17px;
	font-weight: 800;
	line-height: 1;
	text-align: center;
	text-transform: none;
	letter-spacing: 0;
}

.cwpr-tray .cwpr-prod-add:hover,
.cwpr-article-panel .cwpr-prod-add:hover {
	background: var(--cwpr-b-lime);
	background-image: none;
	border-color: var(--cwpr-b-lime);
	color: var(--cwpr-b-dark);
}

/* States driven by assets/blog-cart.js. */
.cwpr-prod-add.is-busy {
	opacity: 0.55;
	pointer-events: none;
}

.cwpr-tray .cwpr-prod-add.is-added,
.cwpr-article-panel .cwpr-prod-add.is-added {
	background: var(--cwpr-b-lime);
	border-color: var(--cwpr-b-lime);
	color: var(--cwpr-b-dark);
}
