/*
Theme Name: Coupon Store
Theme URI: https://coupon-store.com/
Author: Coupon Store
Author URI: https://coupon-store.com/
Description: SEO-first coupon theme built around tested discount codes. Temu-orange marketplace styling, coupon tickets with real checked dates, JSON-LD graph, crawl-budget controls and a seeded guide library.
Version: 1.2.3
Requires at least: 6.0
Tested up to: 6.8
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: coupon-store
Tags: blog, custom-menu, featured-images, translation-ready
*/

/* ==========================================================================
   Coupon Store — Temu marketplace styling, v1.1.0
   Orange #FB7701 is Temu's own logo colour. White text on it measures 2.7:1
   and fails WCAG, so every orange surface carries charcoal text (6.7:1).
   Orange text on white is never used for body copy; the darker --orange-ink
   handles that. Red appears only on a dead code.
   ========================================================================== */

/* --- fonts ------------------------------------------------------------- */

@font-face {
	font-family: 'HerosCn';
	src: url('assets/fonts/heroscn-bold.woff2') format('woff2');
	font-weight: 700;
	font-style: normal;
	font-display: swap;
}

@font-face {
	font-family: 'LatoLocal';
	src: url('assets/fonts/lato-regular.woff2') format('woff2');
	font-weight: 400;
	font-style: normal;
	font-display: swap;
}

@font-face {
	font-family: 'LatoLocal';
	src: url('assets/fonts/lato-bold.woff2') format('woff2');
	font-weight: 700;
	font-style: normal;
	font-display: swap;
}

@font-face {
	font-family: 'LatoLocal';
	src: url('assets/fonts/lato-italic.woff2') format('woff2');
	font-weight: 400;
	font-style: italic;
	font-display: swap;
}

/* --- tokens ------------------------------------------------------------ */

:root {
	color-scheme: light;

	--orange: #fb7701;
	--orange-hover: #e86a00;
	--orange-ink: #b84a00;
	--orange-soft: #fff1e5;
	--orange-wash: #fff8f2;
	--char: #1f1a17;
	--char-2: #2c2420;
	--paper: #f6f4f1;
	--card: #ffffff;
	--ink: #1f1a17;
	--muted: #5e534b;
	--rule: #e9e2db;
	--rule-strong: #d6cbc0;
	/* For boundaries that are the only thing identifying a control, e.g. the
	   search field: 4.7:1 on white, where --rule-strong is 1.6:1. */
	--rule-stronger: #7d7268;
	--dead: #b3261e;
	/* The grey rail on a dead ticket. White text on the old #8a817b was
	   3.8:1, and 3.2:1 once .tag__kind's 0.85 opacity was applied. */
	--dead-rail: #6b635d;

	--display: 'HerosCn', 'Liberation Sans Narrow', 'Arial Narrow', Impact, sans-serif;
	--body: 'LatoLocal', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;

	--measure: 68ch;
	--wide: 1180px;
	--r-sm: 8px;
	--r: 14px;
	--r-lg: 20px;
	--shadow: 0 1px 2px rgba(31, 26, 23, 0.06), 0 6px 18px rgba(31, 26, 23, 0.07);
	--shadow-hi: 0 2px 4px rgba(251, 119, 1, 0.12), 0 10px 28px rgba(251, 119, 1, 0.16);

	--step--1: 0.882rem;
	--step-0: 1rem;
	--step-1: 1.235rem;
	--step-2: 1.588rem;
	--step-3: 1.941rem;
	--step-4: 2.471rem;
	--step-5: 3.059rem;
}

/* --- reset -------------------------------------------------------------- */

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

html {
	font-size: 17px;
	-webkit-text-size-adjust: 100%;
	scroll-behavior: smooth;
	scroll-padding-top: 5.5rem;
}

@media (prefers-reduced-motion: reduce) {
	html {
		scroll-behavior: auto;
	}
	*,
	*::before,
	*::after {
		animation-duration: 0.001ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.001ms !important;
	}
}

body {
	margin: 0;
	background: var(--paper);
	color: var(--ink);
	font-family: var(--body);
	font-size: var(--step-0);
	line-height: 1.65;
	-webkit-font-smoothing: antialiased;
}

img {
	max-width: 100%;
	height: auto;
	display: block;
}

a {
	color: var(--orange-ink);
	text-decoration-thickness: 1px;
	text-underline-offset: 3px;
}

a:hover {
	color: var(--char);
	text-decoration-color: var(--orange);
	text-decoration-thickness: 2px;
}

/* Focus ring: orange alone measures 2.5:1 against the page, under the 3:1
   WCAG 2.2 asks for a focus indicator. The charcoal outline carries the
   contrast and the orange inner ring carries the brand. */
:focus-visible {
	outline: 2px solid var(--char);
	outline-offset: 3px;
	box-shadow: 0 0 0 3px var(--orange);
	border-radius: 4px;
}

.cs-foot :focus-visible,
.cs-strip :focus-visible {
	outline-color: #fff;
}

button {
	font: inherit;
	cursor: pointer;
}

h1,
h2,
h3,
h4 {
	font-family: var(--display);
	font-weight: 700;
	line-height: 1.1;
	letter-spacing: -0.005em;
	color: var(--char);
	margin: 0 0 0.5em;
	text-wrap: balance;
}

h1 {
	font-size: clamp(2rem, 5.4vw, var(--step-5));
}

h2 {
	font-size: var(--step-3);
	margin-top: 2em;
}

h3 {
	font-size: var(--step-2);
	margin-top: 1.5em;
}

p,
ul,
ol,
table,
blockquote,
figure {
	margin: 0 0 1.15em;
}

/* --- furniture ---------------------------------------------------------- */

.cs-skip {
	position: absolute;
	left: -9999px;
	top: 0;
	background: var(--orange);
	color: var(--char);
	padding: 0.6rem 1rem;
	z-index: 99;
	font-weight: 700;
	border-radius: var(--r-sm);
}

.cs-skip:focus {
	left: 0.5rem;
	top: 0.5rem;
}

.cs-wrap {
	width: 100%;
	max-width: var(--wide);
	margin: 0 auto;
	padding: 0 1.1rem;
}

/* announcement strip — states the real test date, nothing promotional */
.cs-strip {
	background: var(--char);
	color: #f3ece6;
	font-size: 0.82rem;
	font-weight: 700;
	text-align: center;
	padding: 0.42rem 1rem;
	line-height: 1.4;
}

.cs-strip b {
	color: var(--orange);
}

/* header: white, like the marketplace it describes */
.cs-bar {
	background: var(--card);
	border-bottom: 1px solid var(--rule);
	position: sticky;
	top: 0;
	z-index: 40;
	box-shadow: 0 1px 0 rgba(31, 26, 23, 0.03);
}

.admin-bar .cs-bar {
	top: 32px;
}

@media (max-width: 782px) {
	.admin-bar .cs-bar {
		top: 46px;
	}
}

@media (max-width: 600px) {
	.admin-bar .cs-bar {
		top: 0;
	}
}

.cs-bar__in {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.6rem 1.6rem;
	padding: 0.7rem 1.1rem;
	max-width: var(--wide);
	margin: 0 auto;
}

.cs-brand {
	display: inline-flex;
	align-items: center;
	gap: 0.55rem;
	text-decoration: none;
	margin-right: auto;
	color: var(--char);
}

.cs-brand:hover {
	color: var(--char);
}

.cs-brand__tile {
	width: 2.2rem;
	height: 2.2rem;
	border-radius: 9px;
	background: var(--orange);
	display: grid;
	place-items: center;
	flex: none;
}

.cs-brand__tile svg {
	width: 1.35rem;
	height: 1.35rem;
	display: block;
}

.cs-brand__name {
	font-family: var(--display);
	font-size: 1.6rem;
	line-height: 1;
	letter-spacing: -0.01em;
	color: var(--char);
}

.cs-brand__name span {
	color: var(--orange-ink);
}

.cs-nav {
	display: flex;
	flex-wrap: wrap;
	gap: 0.3rem 1.4rem;
	align-items: center;
}

.cs-nav a {
	color: var(--char);
	text-decoration: none;
	font-size: 0.94rem;
	font-weight: 700;
	padding: 0.35rem 0;
	border-bottom: 2px solid transparent;
}

.cs-nav a:hover,
.cs-nav a[aria-current='page'] {
	color: var(--char);
	border-bottom-color: var(--orange);
}

.cs-nav__cta {
	background: var(--orange);
	border-radius: 999px;
	padding: 0.45rem 1.05rem !important;
	border-bottom: 0 !important;
	color: var(--char) !important;
}

.cs-nav__cta:hover {
	background: var(--orange-hover);
}

@media (max-width: 40rem) {
	.cs-bar__in {
		padding: 0.55rem 1rem 0.45rem;
		gap: 0.35rem 1rem;
	}

	.cs-brand__tile {
		width: 1.9rem;
		height: 1.9rem;
	}

	.cs-brand__name {
		font-size: 1.35rem;
	}

	.cs-nav {
		flex-wrap: nowrap;
		overflow-x: auto;
		width: 100%;
		gap: 1.2rem;
		scrollbar-width: none;
		-webkit-overflow-scrolling: touch;
		padding-bottom: 0.15rem;
	}

	/* The header's Shop button is dropped on phones. It duplicates the hero
	   button a few hundred pixels below, and at 320-390px it either clipped
	   at the viewport edge or pushed the nav into a second row. */
	.cs-nav__cta {
		display: none;
	}

	.cs-nav::-webkit-scrollbar {
		display: none;
	}

	.cs-nav a {
		white-space: nowrap;
		flex: none;
	}

	.cs-strip {
		font-size: 0.76rem;
	}
}

.cs-crumbs {
	font-size: var(--step--1);
	color: var(--muted);
	padding: 1rem 0 0.4rem;
}

.cs-crumbs a {
	color: var(--muted);
}

.cs-crumbs a:hover {
	color: var(--char);
}

.cs-crumbs span[aria-current] {
	color: var(--ink);
}

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

.cs-main {
	padding: 0 0 3rem;
}

/* Pages without the hero band or a breadcrumb (404, search) would otherwise
   start their H1 hard against the header. */
.cs-main--plain {
	padding-top: 2rem;
}

.cs-cols {
	display: grid;
	gap: 2.4rem;
	grid-template-columns: 1fr;
	align-items: start;
}

/* A grid item defaults to min-width:auto, so a track can never be narrower
   than its content's min-content size. On a 360px phone that pushed the
   article column to 383px and gave every guide page a horizontal scrollbar
   (measured: document scrollWidth 383 against a 345px viewport). min-width:0
   lets the column shrink and the text wrap instead; anything that genuinely
   cannot shrink, like a wide table, scrolls inside its own wrapper. */
.cs-cols > *,
.cs-home-cols > * {
	min-width: 0;
}

@media (min-width: 62rem) {
	.cs-cols {
		grid-template-columns: minmax(0, 1fr) 20rem;
		gap: 2.6rem;
	}

	.cs-side {
		position: sticky;
		top: 5.6rem;
	}
}

.cs-prose {
	max-width: var(--measure);
}

.cs-lede {
	font-size: var(--step-1);
	line-height: 1.5;
	color: var(--muted);
	max-width: 60ch;
	margin-bottom: 1.4rem;
}

/* --- hero band ---------------------------------------------------------- */

.cs-hero-band {
	background:
		radial-gradient(1200px 360px at 85% -40%, rgba(251, 119, 1, 0.18), transparent 70%),
		linear-gradient(180deg, var(--orange-soft), var(--paper) 92%);
	border-bottom: 1px solid var(--rule);
	padding: 2rem 0 2.2rem;
}

.cs-hero-band h1 {
	max-width: 30ch;
	margin-bottom: 0.4rem;
}

.cs-verified {
	display: inline-flex;
	align-items: center;
	gap: 0.45rem;
	background: var(--card);
	border: 1px solid var(--rule-strong);
	border-radius: 999px;
	padding: 0.3rem 0.85rem 0.3rem 0.4rem;
	font-size: 0.86rem;
	font-weight: 700;
	color: var(--char);
	margin: 0 0 1rem;
}

.cs-verified__dot {
	width: 1.25rem;
	height: 1.25rem;
	border-radius: 50%;
	background: var(--orange);
	display: grid;
	place-items: center;
}

.cs-verified__dot svg {
	width: 0.8rem;
	height: 0.8rem;
}

/* --- coupon tickets ----------------------------------------------------- */

/* The query container is a wrapper, not the list: a container query can
   only style descendants, so a grid rule aimed at the container itself
   never matches (that bug left the tickets stacked full-width). */
.tag-wall-wrap {
	container-type: inline-size;
	container-name: wall;
	margin: 0 0 1.4rem;
}

.tag-wall {
	display: grid;
	gap: 1rem;
	margin: 0;
	padding: 0;
	list-style: none;
}

.tag {
	position: relative;
	display: grid;
	grid-template-columns: 7.2rem minmax(0, 1fr);
	background: var(--card);
	border: 1px solid var(--rule);
	border-radius: var(--r);
	box-shadow: var(--shadow);
	overflow: hidden;
}

.tag--lead {
	border-color: var(--orange);
	box-shadow: var(--shadow-hi);
}

/* the stub: orange, with a dashed perforation and half-moon notches */
.tag__rail {
	position: relative;
	background: var(--orange);
	color: var(--char);
	padding: 1rem 0.9rem;
	display: flex;
	flex-direction: column;
	justify-content: center;
	align-items: flex-start;
	gap: 0.15rem;
	border-right: 2px dashed rgba(31, 26, 23, 0.28);
}

.tag__rail::before,
.tag__rail::after {
	content: '';
	position: absolute;
	right: -10px;
	width: 18px;
	height: 18px;
	border-radius: 50%;
	background: var(--paper);
	box-shadow: inset 0 0 0 1px var(--rule);
}

.tag__rail::before {
	top: -9px;
}

.tag__rail::after {
	bottom: -9px;
}

.tag__value {
	font-family: var(--display);
	font-size: 1.55rem;
	line-height: 1;
	color: var(--char);
	overflow-wrap: normal;
	word-break: normal;
	hyphens: none;
	text-wrap: balance;
}

.tag__kind {
	font-size: 0.76rem;
	font-weight: 700;
	color: var(--char);
	opacity: 0.85;
}

.tag__face {
	padding: 1rem 1.1rem 1.05rem 1.3rem;
	min-width: 0;
	display: flex;
	flex-direction: column;
}

.tag__title {
	font-family: var(--body);
	font-weight: 700;
	font-size: var(--step-0);
	line-height: 1.3;
	color: var(--ink);
	margin: 0 0 0.65rem;
}

.tag__row {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.55rem;
}

.tag__code {
	font-family: var(--body);
	font-weight: 700;
	font-size: clamp(1.1rem, 4.6vw, 1.55rem);
	letter-spacing: 0.06em;
	color: var(--char);
	background: var(--orange-wash);
	border: 2px dashed var(--orange);
	border-radius: var(--r-sm);
	padding: 0.22rem 0.65rem;
	white-space: nowrap;
	line-height: 1.25;
	max-width: 100%;
}

.tag__copy {
	background: var(--orange);
	color: var(--char);
	border: 0;
	border-radius: 999px;
	padding: 0.6rem 1.2rem;
	font-weight: 700;
	font-size: 0.92rem;
	transition: background 0.14s ease;
	min-height: 2.6rem;
	/* "Copied" is ~25px narrower than "Copy code"; without a floor the
	   button shrinks under the reader's finger and the row reflows. */
	min-width: 7.2rem;
	text-align: center;
}

.tag__copy:hover {
	background: var(--orange-hover);
}

.tag__copy[data-done='1'] {
	background: var(--char);
	color: #fff;
}

.tag__note {
	font-size: 0.9rem;
	color: var(--muted);
	margin: 0.6rem 0 0;
	line-height: 1.5;
}

.tag__meta {
	display: flex;
	align-items: center;
	gap: 0.4rem;
	font-size: 0.86rem;
	color: var(--muted);
	margin: 0.7rem 0 0;
}

.tag__meta svg {
	width: 1rem;
	height: 1rem;
	flex: none;
}

.tag__date {
	font-weight: 700;
	color: var(--ink);
	white-space: nowrap;
}

.tag__open {
	display: inline-block;
	margin-top: auto;
	padding-top: 0.7rem;
	font-size: 0.9rem;
	font-weight: 700;
	color: var(--orange-ink);
}

/* three tickets side by side when the wall is wide enough */
@container wall (min-width: 860px) {
	.tag-wall {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}

	.tag {
		grid-template-columns: 1fr;
		grid-template-rows: auto 1fr;
	}

	.tag__rail {
		border-right: 0;
		border-bottom: 2px dashed rgba(31, 26, 23, 0.28);
		flex-direction: row;
		flex-wrap: wrap;
		align-items: baseline;
		justify-content: space-between;
		gap: 0.15rem 0.6rem;
		padding: 0.95rem 1.1rem;
	}

	.tag__rail::before,
	.tag__rail::after {
		top: auto;
		bottom: -10px;
		right: auto;
	}

	.tag__rail::before {
		left: -9px;
	}

	.tag__rail::after {
		right: -9px;
	}

	.tag__value {
		font-size: 1.75rem;
	}

	.tag__face {
		padding: 1rem 1.1rem 1.1rem;
	}
}

@media (max-width: 30rem) {
	.tag {
		grid-template-columns: 5.6rem minmax(0, 1fr);
	}

	.tag__rail {
		padding: 0.85rem 0.6rem;
	}

	.tag__value {
		font-size: 1.22rem;
	}

	.tag__face {
		padding: 0.85rem 0.85rem 0.9rem 1.05rem;
	}

	.tag__code {
		letter-spacing: 0.03em;
		padding: 0.2rem 0.5rem;
	}

	.tag__copy {
		padding: 0.5rem 0.95rem;
	}
}

/* dead code: red carries information, nothing else on the page is red */
.tag.is-dead {
	border-color: var(--rule);
	box-shadow: none;
	background: #fbf9f8;
}

.tag.is-dead .tag__rail {
	background: var(--dead-rail);
	color: #fff;
}

.tag.is-dead .tag__value,
.tag.is-dead .tag__kind {
	color: #fff;
}

/* The 0.85 opacity that softens this label on an orange rail would drop it
   to 3.2:1 on the grey one. */
.tag.is-dead .tag__kind {
	opacity: 1;
}

.tag.is-dead .tag__code {
	color: var(--dead);
	border-color: var(--dead);
	border-style: solid;
	background: #fff;
	text-decoration: line-through;
	text-decoration-thickness: 2px;
}

.tag.is-dead .tag__date,
.tag.is-dead .tag__flag {
	color: var(--dead);
	font-weight: 700;
}

/* --- primary button ----------------------------------------------------- */

.cs-cta {
	display: inline-flex;
	align-items: center;
	gap: 0.55rem;
	background: var(--orange);
	color: var(--char);
	font-family: var(--display);
	font-size: 1.45rem;
	/* The label wraps to two lines at 360px; line-height:1 made them touch. */
	line-height: 1.15;
	padding: 0.95rem 1.7rem;
	text-align: center;
	border-radius: 999px;
	text-decoration: none;
	box-shadow: 0 6px 18px rgba(251, 119, 1, 0.32);
	transition: background 0.14s ease, transform 0.14s ease;
}

.cs-cta:hover {
	background: var(--orange-hover);
	color: var(--char);
	text-decoration: none;
	transform: translateY(-1px);
}

.cs-cta__block {
	margin: 1.3rem 0 1.6rem;
}

/* --- disclosure --------------------------------------------------------- */

.cs-disclose {
	font-size: 0.86rem;
	color: var(--muted);
	background: var(--card);
	border: 1px solid var(--rule);
	border-radius: var(--r-sm);
	padding: 0.65rem 0.9rem;
	margin: 0 0 1.5rem;
	max-width: var(--measure);
}

.cs-disclose p {
	margin: 0;
}

/* --- home: two-column body --------------------------------------------- */

.cs-home-cols {
	display: grid;
	gap: 2.4rem;
	grid-template-columns: 1fr;
	align-items: start;
	margin-top: 2.2rem;
}

@media (min-width: 62rem) {
	.cs-home-cols {
		grid-template-columns: minmax(0, 1fr) 20rem;
		gap: 2.6rem;
	}
}

/* --- guide cards -------------------------------------------------------- */

.cs-guides {
	display: grid;
	gap: 1.1rem;
	grid-template-columns: 1fr;
	list-style: none;
	padding: 0;
	margin: 0;
}

@media (min-width: 40rem) {
	.cs-guides {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (min-width: 62rem) {
	.cs-guides--three {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}
}

.gcard {
	background: var(--card);
	border: 1px solid var(--rule);
	border-radius: var(--r);
	box-shadow: var(--shadow);
	overflow: hidden;
	display: flex;
	flex-direction: column;
	transition: border-color 0.15s ease;
}

.gcard:hover {
	border-color: var(--orange);
}

.gcard__thumb {
	aspect-ratio: 16 / 9;
	background: var(--orange-soft);
	overflow: hidden;
	display: block;
}

.gcard__thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.gcard__body {
	padding: 0.9rem 1.05rem 1.15rem;
	display: flex;
	flex-direction: column;
	gap: 0.4rem;
	flex: 1;
}

.gcard__kicker {
	align-self: flex-start;
	font-size: 0.76rem;
	font-weight: 700;
	color: var(--orange-ink);
	background: var(--orange-soft);
	border-radius: 999px;
	padding: 0.12rem 0.6rem;
}

.gcard__title {
	font-family: var(--display);
	font-size: 1.26rem;
	line-height: 1.15;
	margin: 0;
}

.gcard__title a {
	color: var(--char);
	text-decoration: none;
}

.gcard__title a:hover {
	color: var(--orange-ink);
}

.gcard__ex {
	font-size: 0.9rem;
	color: var(--muted);
	margin: 0;
	line-height: 1.55;
}

/* --- topic chips -------------------------------------------------------- */

.cs-chips {
	display: flex;
	flex-wrap: wrap;
	gap: 0.45rem;
	list-style: none;
	padding: 0;
	margin: 0 0 1.4rem;
}

.cs-chips a {
	display: inline-block;
	font-size: 0.9rem;
	font-weight: 700;
	text-decoration: none;
	color: var(--char);
	background: var(--card);
	border: 1px solid var(--rule-strong);
	border-radius: 999px;
	padding: 0.38rem 0.9rem;
}

.cs-chips a:hover,
.cs-chips a[aria-current='page'] {
	border-color: var(--orange);
	background: var(--orange-soft);
	color: var(--char);
}

/* --- guides hub: one section per topic ---------------------------------- */

.cs-hub-topic {
	margin: 2.4rem 0 0;
}

.cs-hub-topic__head {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	justify-content: space-between;
	gap: 0.3rem 1rem;
	border-bottom: 2px solid var(--char);
	padding-bottom: 0.45rem;
	margin-bottom: 1rem;
}

.cs-hub-topic__head h2 {
	margin: 0;
}

.cs-hub-topic__head a {
	font-weight: 700;
	font-size: 0.92rem;
}

.cs-hub-topic__desc {
	color: var(--muted);
	max-width: 70ch;
	margin: -0.3rem 0 1rem;
}

.cs-hub-list {
	list-style: none;
	padding: 0;
	margin: 0;
	display: grid;
	gap: 0.6rem;
	grid-template-columns: 1fr;
}

@media (min-width: 44rem) {
	.cs-hub-list {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

.cs-hub-list a {
	display: flex;
	gap: 0.8rem;
	align-items: center;
	background: var(--card);
	border: 1px solid var(--rule);
	border-radius: var(--r-sm);
	padding: 0.55rem 0.8rem 0.55rem 0.55rem;
	text-decoration: none;
	color: var(--char);
	font-weight: 700;
	line-height: 1.3;
}

.cs-hub-list a:hover {
	border-color: var(--orange);
}

.cs-hub-list img {
	width: 4.6rem;
	height: 2.6rem;
	object-fit: cover;
	border-radius: 5px;
	flex: none;
}

/* --- article prose ------------------------------------------------------ */

.cs-prose h2,
.cs-prose h3 {
	max-width: 36ch;
}

/* Lists inside prose get bullets and indent; the code wall and card grids
   inside prose must not, so they are excluded by class rather than fought
   with !important. */
.cs-prose ul:not([class]),
.cs-prose ol:not([class]) {
	padding-left: 1.3rem;
}

.cs-prose li {
	margin-bottom: 0.45em;
}

.cs-prose ul:not([class]) li::marker {
	color: var(--orange-ink);
}

.cs-prose ol:not([class]) li::marker {
	color: var(--orange-ink);
	font-weight: 700;
}

.cs-prose .tag-wall-wrap {
	margin: 1.4rem 0 1.6rem;
}

.cs-prose .tag-wall li {
	margin: 0;
}

/* The wrapper scrolls; the table itself stays a table.
   `display: block` on the table made its rows form an anonymous table that
   shrink-wrapped to its content, so `width: 100%` applied to the scroll box
   instead and a two-column table sat in a half-empty card with the charcoal
   header stopping mid-row. Most tables here are two or three columns, so that
   was the common case. The widest (six columns) still needs to scroll on a
   phone, which the wrapper handles. */
.cs-table-scroll {
	overflow-x: auto;
	/* Matches the shared p/ul/table rhythm so a wrapped table sits exactly
	   where an unwrapped one did. */
	margin: 0 0 1.15em;
	max-width: var(--measure);
	border: 1px solid var(--rule);
	border-radius: var(--r-sm);
	background: var(--card);
	-webkit-overflow-scrolling: touch;
}

.cs-prose table {
	width: 100%;
	border-collapse: separate;
	border-spacing: 0;
	font-size: 0.92rem;
	white-space: normal;
	/* A table that needs more room than the column scrolls inside the
	   wrapper rather than squeezing its cells into slivers. */
	min-width: min-content;
	/* Frame for a table that is not wrapped (hand-written markup). */
	border: 1px solid var(--rule);
	border-radius: var(--r-sm);
	background: var(--card);
}

/* Same specificity as the rule above and later in the file, so it wins:
   inside the wrapper the wrapper draws the frame. Its overflow clipping
   follows its border-radius, so the charcoal header keeps rounded corners. */
.cs-table-scroll > table {
	border: 0;
	border-radius: 0;
	margin: 0;
}

.cs-prose thead th {
	background: var(--char);
	color: #fff;
	font-family: var(--display);
	font-weight: 700;
	font-size: 1rem;
	text-align: left;
}

.cs-prose thead th:first-child {
	border-top-left-radius: calc(var(--r-sm) - 1px);
}

.cs-prose thead th:last-child {
	border-top-right-radius: calc(var(--r-sm) - 1px);
}

.cs-prose th,
.cs-prose td {
	border-bottom: 1px solid var(--rule);
	border-right: 1px solid var(--rule);
	padding: 0.6rem 0.75rem;
	vertical-align: top;
}

.cs-prose tr > *:last-child {
	border-right: 0;
}

.cs-prose tbody tr:last-child > * {
	border-bottom: 0;
}

.cs-prose tbody tr:nth-child(even) {
	background: var(--orange-wash);
}

.cs-prose blockquote {
	margin: 1.4rem 0;
	padding: 0.6rem 1rem;
	border-left: 4px solid var(--orange);
	background: var(--card);
	border-radius: 0 var(--r-sm) var(--r-sm) 0;
	color: var(--muted);
}

.cs-prose figure img {
	border-radius: var(--r-sm);
}

/* inline code chip inside prose */
.chip {
	display: inline-flex;
	align-items: baseline;
	gap: 0.3rem;
	background: var(--orange-wash);
	border: 1px dashed var(--orange);
	border-radius: 6px;
	padding: 0.02em 0.45em;
	font-weight: 700;
	letter-spacing: 0.03em;
	color: var(--char);
	white-space: nowrap;
}

.chip.is-dead {
	color: var(--dead);
	border-color: var(--dead);
	border-style: solid;
	background: #fff;
	text-decoration: line-through;
}

/* --- table of contents -------------------------------------------------- */

.cs-toc {
	background: var(--card);
	border: 1px solid var(--rule);
	border-radius: var(--r);
	padding: 0.9rem 1.1rem;
	margin: 0 0 1.6rem;
	max-width: var(--measure);
}

.cs-toc summary,
.cs-toc__title {
	font-family: var(--display);
	font-size: 1.2rem;
	color: var(--char);
}

.cs-toc summary {
	cursor: pointer;
}

.cs-toc__title {
	margin: 0;
}

/* Two copies are printed; exactly one is ever displayed (display:none also
   removes the other from the accessibility tree). Phones get the closed
   <details>, wider screens the always-open list. */
.cs-toc--wide {
	display: none;
}

@media (min-width: 40rem) {
	.cs-toc--narrow {
		display: none;
	}

	.cs-toc--wide {
		display: block;
	}
}

.cs-toc ol {
	margin: 0.6rem 0 0;
	padding-left: 1.3rem;
	columns: 2 16rem;
	column-gap: 2rem;
	font-size: 0.94rem;
}

.cs-toc li {
	margin-bottom: 0.3rem;
	break-inside: avoid;
}

.cs-toc li::marker {
	color: var(--orange-ink);
	font-weight: 700;
}

/* --- single header ------------------------------------------------------ */

.cs-head {
	margin: 0 0 1.3rem;
	max-width: var(--measure);
}

.cs-byline {
	font-size: 0.88rem;
	color: var(--muted);
	display: flex;
	flex-wrap: wrap;
	gap: 0.3rem 1.1rem;
	border-top: 1px solid var(--rule);
	padding-top: 0.6rem;
	margin-top: 0.9rem;
}

.cs-byline time {
	color: var(--ink);
	font-weight: 700;
}

/* --- FAQ ---------------------------------------------------------------- */

.cs-faq {
	max-width: var(--measure);
	margin: 2.4rem 0 0;
}

.cs-faq > h2 {
	margin-top: 0;
}

.cs-faq details {
	background: var(--card);
	border: 1px solid var(--rule);
	border-radius: var(--r-sm);
	padding: 0.8rem 1rem;
	margin-bottom: 0.6rem;
}

.cs-faq details[open] {
	border-color: var(--orange);
}

.cs-faq summary {
	font-family: var(--display);
	font-size: 1.18rem;
	color: var(--char);
	cursor: pointer;
	list-style: none;
	display: flex;
	gap: 0.7rem;
	align-items: baseline;
}

.cs-faq summary::-webkit-details-marker {
	display: none;
}

.cs-faq summary::before {
	content: '+';
	flex: none;
	width: 1.3rem;
	height: 1.3rem;
	border-radius: 50%;
	background: var(--orange);
	color: var(--char);
	font-family: var(--body);
	font-weight: 700;
	font-size: 1rem;
	line-height: 1.3rem;
	text-align: center;
	transform: translateY(0.12rem);
}

.cs-faq details[open] summary::before {
	content: '\2212';
}

.cs-faq details p {
	margin: 0.6rem 0 0 2rem;
}

/* --- sidebar ------------------------------------------------------------ */

.cs-side > * + * {
	margin-top: 1.2rem;
}

.cs-box {
	background: var(--card);
	border: 1px solid var(--rule);
	border-radius: var(--r);
	box-shadow: var(--shadow);
	padding: 1.05rem 1.1rem;
}

.cs-box h2 {
	font-size: 1.24rem;
	margin: 0 0 0.75rem;
}

.cs-box ul {
	list-style: none;
	padding: 0;
	margin: 0;
	font-size: 0.92rem;
}

.cs-box li + li {
	margin-top: 0.55rem;
	border-top: 1px solid var(--rule);
	padding-top: 0.55rem;
}

.cs-box a {
	font-weight: 700;
}

.cs-box--codes {
	border: 2px solid var(--orange);
}

.cs-minicode {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 0.5rem;
}

.cs-minicode__v {
	font-weight: 700;
	color: var(--char);
}

.cs-minicode b {
	font-family: var(--body);
	letter-spacing: 0.05em;
	color: var(--char);
	background: var(--orange-wash);
	border: 1px dashed var(--orange);
	border-radius: 6px;
	padding: 0.05rem 0.45rem;
}

.cs-box small {
	display: block;
	color: var(--muted);
	font-size: 0.8rem;
	margin-top: 0.2rem;
}

.cs-box__foot {
	margin: 1rem 0 0;
}

.cs-box__btn {
	display: block;
	text-align: center;
	background: var(--orange);
	color: var(--char);
	border-radius: 999px;
	padding: 0.65rem 1rem;
	text-decoration: none;
	font-weight: 700;
}

.cs-box__btn:hover {
	background: var(--orange-hover);
	color: var(--char);
}

.cs-box--trust p {
	font-size: 0.9rem;
	color: var(--muted);
	margin: 0 0 0.6rem;
}

.cs-box--trust p:last-child {
	margin: 0;
}

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

.cs-related {
	margin-top: 2.6rem;
}

.cs-related > h2 {
	margin-top: 0;
}

/* --- pagination --------------------------------------------------------- */

.cs-pager {
	display: flex;
	flex-wrap: wrap;
	gap: 0.4rem;
	margin: 2.2rem 0 0;
	font-weight: 700;
}

.cs-pager .page-numbers {
	display: inline-block;
	padding: 0.45rem 0.85rem;
	border: 1px solid var(--rule-strong);
	border-radius: 999px;
	background: var(--card);
	text-decoration: none;
	color: var(--char);
}

.cs-pager .page-numbers.current {
	background: var(--orange);
	border-color: var(--orange);
	color: var(--char);
}

/* --- search form -------------------------------------------------------- */

.cs-search {
	display: flex;
	gap: 0.4rem;
	max-width: 28rem;
}

.cs-search input[type='search'] {
	flex: 1;
	font: inherit;
	padding: 0.55rem 0.95rem;
	border: 1px solid var(--rule-stronger);
	border-radius: 999px;
	background: #fff;
	color: var(--ink);
	min-width: 0;
}

/* Keeps the global charcoal focus outline (17.2:1) and adds the orange
   border on top. Replacing the outline with the orange border alone gave a
   2.71:1 indicator, and WCAG 2.2 asks for 3:1. */
.cs-search input[type='search']:focus-visible {
	border-color: var(--orange);
}

.cs-search button {
	background: var(--char);
	color: #fff;
	border: 0;
	border-radius: 999px;
	padding: 0.55rem 1.1rem;
	font-weight: 700;
}

.cs-search button:hover {
	background: var(--char-2);
}

/* --- footer ------------------------------------------------------------- */

.cs-foot {
	background: var(--char);
	color: #d9cfc7;
	margin-top: 3rem;
	padding: 2.4rem 0 2.6rem;
	font-size: 0.92rem;
	border-top: 4px solid var(--orange);
}

.cs-foot a {
	color: #fff;
	text-decoration-color: rgba(255, 255, 255, 0.35);
}

.cs-foot a:hover {
	color: var(--orange);
	text-decoration-color: var(--orange);
}

.cs-foot__grid {
	display: grid;
	gap: 1.6rem;
	grid-template-columns: 1fr;
}

@media (min-width: 44rem) {
	.cs-foot__grid {
		grid-template-columns: 1.4fr 1fr 1fr;
	}
}

.cs-foot h2 {
	color: #fff;
	font-size: 1.1rem;
	margin: 0 0 0.7rem;
}

.cs-foot ul {
	list-style: none;
	padding: 0;
	margin: 0;
}

.cs-foot li + li {
	margin-top: 0.4rem;
}

.cs-foot__legal {
	border-top: 1px solid rgba(255, 255, 255, 0.14);
	margin-top: 1.8rem;
	padding-top: 1rem;
	color: #b9aca2;
}

/* --- copy toast --------------------------------------------------------- */

.cs-toast {
	position: fixed;
	left: 50%;
	bottom: 1.2rem;
	transform: translate(-50%, 160%);
	background: var(--char);
	color: #fff;
	font-weight: 700;
	font-size: 0.92rem;
	padding: 0.65rem 1.2rem;
	border-radius: 999px;
	box-shadow: 0 8px 24px rgba(31, 26, 23, 0.3);
	z-index: 60;
	transition: transform 0.22s cubic-bezier(0.2, 0.8, 0.3, 1);
	pointer-events: none;
	max-width: calc(100vw - 2rem);
}

.cs-toast::before {
	content: '';
	display: inline-block;
	width: 0.6rem;
	height: 0.6rem;
	border-radius: 50%;
	background: var(--orange);
	margin-right: 0.55rem;
	vertical-align: 0.05rem;
}

.cs-toast.is-up {
	transform: translate(-50%, 0);
}

/* --- utility ------------------------------------------------------------ */

.screen-reader-text {
	border: 0;
	clip: rect(1px, 1px, 1px, 1px);
	clip-path: inset(50%);
	height: 1px;
	width: 1px;
	margin: -1px;
	overflow: hidden;
	padding: 0;
	position: absolute;
	word-wrap: normal !important;
}

.cs-section {
	margin: 2.6rem 0 0;
}

.cs-section > h2:first-child {
	margin-top: 0;
}

.cs-more {
	margin: 1.4rem 0 0;
	font-weight: 700;
}

.alignleft {
	float: left;
	margin: 0 1.2rem 0.8rem 0;
}

.alignright {
	float: right;
	margin: 0 0 0.8rem 1.2rem;
}

.aligncenter {
	margin-left: auto;
	margin-right: auto;
}

.wp-caption {
	max-width: 100%;
}
