/* ==========================================================================
   Yazan (Astra Child) — Rewards page (/rewards/)
   Scoped, self-contained. Enqueued only on this page (inc/page-rewards.php).

   COLOUR: semantic tokens only (--yz-bg / --yz-surface / --yz-text* / --yz-border* / --yz-primary /
   --yz-on-dark / --yz-gold), plus --yz-ink as the hero SURFACE — the one legacy token whose Burgundy
   remap is surface-correct (a deeper burgundy). No colour literal appears in this file, so both
   themes read correctly without a line in theme-burgundy.css. Translucent shades are derived from a
   token with color-mix(), never typed in.

   LAYOUT: logical properties throughout (inline/block), so the page mirrors under RTL untouched.

   SPECIFICITY — the two global rules this page has to out-rank, both learned on /authentication/:
     • Astra colours headings on the ELEMENT and main.css sizes them with `.yazan h1/h2` (0,1,1),
       so every heading rule here is written one class deeper: `.yz-rw .x` (0,2,0).
     • theme-burgundy.css forces `html[data-yz-theme] .entry-content p { color: var(--yz-text) }`
       (0,2,2) — so every muted PARAGRAPH rule is written three classes deep (0,3,0).
   ========================================================================== */

.yz-rw {
	overflow-x: clip;
	background: var(--yz-bg);
	color: var(--yz-text);
}

/* Author `display` on a class beats the UA's `[hidden] { display: none }`, which would un-hide the
   copy button before rewards.js has decided it can work. */
.yz-rw [hidden] { display: none !important; }

/* ------------------------------------------------------------ Sections -- */
.yz-rw-sec {
	padding-block: clamp(56px, 8vw, 104px);
	background: var(--yz-bg);
}
.yz-rw-sec + .yz-rw-sec { border-block-start: 1px solid var(--yz-border); }
.yz-rw-sec--alt { background: var(--yz-surface); }

.yz-rw-head { margin-block-end: clamp(24px, 3.4vw, 40px); }
.yz-rw-head--row {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-end;
	justify-content: space-between;
	gap: 16px 32px;
}
.yz-rw .yz-rw-head__title {
	margin: 12px 0 0;
	font-family: var(--yz-font-display);
	font-weight: 500;
	font-size: clamp(28px, 3.6vw, 40px);
	line-height: 1.1;
	letter-spacing: -0.005em;
	color: var(--yz-text);
}

/* Eyebrow: a hairline of aged gold, then the label. The line is decoration; the words carry the
   meaning, so the text keeps the muted token (≥ 4.5:1 in both themes) rather than the gold. */
.yz-rw .yz-eyebrow.yz-rw-eyebrow {
	display: inline-flex;
	align-items: center;
	gap: 12px;
	margin: 0;
	color: var(--yz-text-muted);
}
.yz-rw .yz-rw-eyebrow::before {
	content: "";
	flex: none;
	inline-size: 28px;
	block-size: 1px;
	background: var(--yz-gold);
}

/* ---------------------------------------------------------------- Hero -- */
.yz-rw-hero {
	padding-block: clamp(56px, 8vw, 112px) clamp(48px, 7vw, 96px);
	background: var(--yz-ink);
	color: var(--yz-on-dark);
}
.yz-rw-hero__inner {
	display: grid;
	gap: clamp(36px, 5vw, 64px);
}
.yz-rw-hero__inner--center {
	max-width: 820px;
	justify-items: center;
	gap: 0;
	text-align: center;
}

.yz-rw .yz-rw-hero .yz-rw-eyebrow { color: color-mix(in srgb, var(--yz-on-dark) 70%, transparent); }
.yz-rw .yz-rw-hero__inner--center .yz-rw-eyebrow::after {
	content: "";
	flex: none;
	inline-size: 28px;
	block-size: 1px;
	background: var(--yz-gold);
}

.yz-rw .yz-rw-hero__title {
	margin: 0.32em 0 0;
	font-family: var(--yz-font-display);
	font-weight: 500;
	font-size: clamp(36px, 5.4vw, 64px);
	line-height: 1.05;
	letter-spacing: -0.012em;
	color: var(--yz-on-dark);
	text-wrap: balance;
}
.yz-rw .yz-rw-hero .yz-rw-hero__lede {
	max-width: 54ch;
	margin: clamp(14px, 2vw, 22px) 0 0;
	font-size: clamp(15px, 1.9vw, 18px);
	line-height: 1.7;
	color: color-mix(in srgb, var(--yz-on-dark) 74%, transparent);
}
.yz-rw .yz-rw-hero__inner--center .yz-rw-hero__lede { margin-inline: auto; }
.yz-rw .yz-rw-hero .yz-rw-hero__note {
	margin: 18px 0 0;
	font-size: 13px;
	line-height: 1.6;
	color: color-mix(in srgb, var(--yz-on-dark) 64%, transparent);
}

/* The ledger: two figures on a hairline rule, like a page from a jeweller's book. */
.yz-rw-ledger {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	border-block: 1px solid color-mix(in srgb, var(--yz-on-dark) 20%, transparent);
}
.yz-rw-ledger--single { grid-template-columns: minmax(0, 1fr); }

.yz-rw-stat {
	display: flex;
	flex-direction: column;
	gap: 6px;
	min-width: 0;
	padding-block: clamp(24px, 3.4vw, 40px);
	padding-inline: 0 clamp(20px, 4vw, 56px);
}
.yz-rw-stat + .yz-rw-stat {
	padding-inline: clamp(20px, 4vw, 56px) 0;
	border-inline-start: 1px solid color-mix(in srgb, var(--yz-on-dark) 20%, transparent);
}
.yz-rw-stat__label {
	font-size: 11px;
	font-weight: 500;
	letter-spacing: 0.18em;
	text-transform: uppercase;
	color: color-mix(in srgb, var(--yz-on-dark) 68%, transparent);
}
.yz-rw-stat__value {
	font-family: var(--yz-font-display);
	font-weight: 400;
	font-size: clamp(56px, 8vw, 104px);
	line-height: 0.95;
	letter-spacing: -0.02em;
	font-variant-numeric: lining-nums tabular-nums;
	color: var(--yz-on-dark);
	overflow-wrap: anywhere;
}
.yz-rw-stat__value--name {
	font-size: clamp(40px, 5.6vw, 72px);
	line-height: 1;
	letter-spacing: -0.01em;
}
.yz-rw-stat__unit {
	font-size: 12px;
	font-weight: 500;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	color: var(--yz-gold);
}
.yz-rw-stat__note {
	margin-block-start: 10px;
	font-size: 14px;
	line-height: 1.55;
	color: color-mix(in srgb, var(--yz-on-dark) 74%, transparent);
}
.yz-rw-stat__credit {
	margin-inline-start: 6px;
	font-weight: 500;
	color: var(--yz-on-dark);
}

/* Progress to the next level — a single gold thread. */
.yz-rw-progress {
	position: relative;
	display: block;
	block-size: 2px;
	margin-block-start: 22px;
	overflow: hidden;
	background: color-mix(in srgb, var(--yz-on-dark) 18%, transparent);
}
.yz-rw-progress__fill {
	position: absolute;
	inset-block: 0;
	inset-inline-start: 0;
	inline-size: var(--yz-rw-p, 0%);
	background: var(--yz-gold);
	animation: yz-rw-thread 1.4s var(--mo-ease-out, cubic-bezier(0.22, 1, 0.36, 1)) 0.2s both;
}
@keyframes yz-rw-thread {
	from { inline-size: 0; }
}

/* -------------------------------------------------- Buttons + links ------ */
.yz-rw .yz-rw-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 14px;
	margin-block-start: clamp(28px, 3.6vw, 40px);
}
.yz-rw .yz-rw-actions--center { justify-content: center; }

.yazan .yz-rw .yz-rw-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-block-size: 48px;
	padding: 14px 32px;
	font-family: var(--yz-font-body);
	font-size: 12px;
	font-weight: 500;
	line-height: 1.2;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	text-decoration: none;
	border: 1px solid transparent;
	border-radius: var(--yz-radius);
	cursor: pointer;
	transition:
		background-color 280ms var(--mo-ease-out, ease),
		color 280ms var(--mo-ease-out, ease),
		border-color 280ms var(--mo-ease-out, ease);
}

/* Solid — on the light bands. */
.yazan .yz-rw .yz-rw-btn--solid {
	background: var(--yz-primary);
	border-color: var(--yz-primary);
	color: var(--yz-on-primary);
}
.yazan .yz-rw .yz-rw-btn--solid:hover {
	background: transparent;
	border-color: var(--yz-text);
	color: var(--yz-text);
}

/* Light — the one solid call to action on the dark hero. */
.yazan .yz-rw .yz-rw-btn--light {
	background: var(--yz-on-dark);
	border-color: var(--yz-on-dark);
	color: var(--yz-ink);
}
.yazan .yz-rw .yz-rw-btn--light:hover {
	background: transparent;
	color: var(--yz-on-dark);
}

/* Ghost — a quiet alternative on the dark hero. */
.yazan .yz-rw .yz-rw-btn--ghost-dark {
	background: transparent;
	border-color: color-mix(in srgb, var(--yz-on-dark) 55%, transparent);
	color: var(--yz-on-dark);
}
.yazan .yz-rw .yz-rw-btn--ghost-dark:hover {
	background: var(--yz-on-dark);
	border-color: var(--yz-on-dark);
	color: var(--yz-ink);
}

/* Text link — tracked label on a hairline. `a.` + three classes out-ranks Astra's
   `.ast-single-post .entry-content a { text-decoration: underline }` (0,2,1). */
.yazan .yz-rw a.yz-rw-link {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	padding-block: 6px;
	font-size: 12px;
	font-weight: 500;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	text-decoration: none;
	color: var(--yz-text);
	border-block-end: 1px solid var(--yz-border-strong);
	transition: border-color 250ms var(--mo-ease-out, ease);
}
.yazan .yz-rw a.yz-rw-link::after { content: "\2192"; letter-spacing: 0; }
[dir="rtl"] .yazan .yz-rw a.yz-rw-link::after { content: "\2190"; }
.yazan .yz-rw a.yz-rw-link:hover { border-color: var(--yz-text); }

/* ------------------------------------------------------ Empty states ----- */
.yz-rw-empty {
	padding: clamp(28px, 4vw, 44px) clamp(24px, 4vw, 40px);
	border: 1px solid var(--yz-border);
	background: var(--yz-surface);
}
.yz-rw-sec--alt .yz-rw-empty { background: var(--yz-bg); }
.yz-rw .yz-rw-empty .yz-rw-empty__title {
	margin: 0;
	font-family: var(--yz-font-display);
	font-size: clamp(21px, 2.4vw, 25px);
	font-weight: 500;
	line-height: 1.3;
	color: var(--yz-text);
}
.yz-rw .yz-rw-empty .yz-rw-empty__text {
	max-width: 52ch;
	margin: 8px 0 0;
	font-size: 15px;
	line-height: 1.65;
	color: var(--yz-text-muted);
}
.yz-rw-empty .yz-rw-link { margin-block-start: 20px; }

/* ------------------------------------------ Activity + aside (split) ----- */
.yz-rw-split {
	display: grid;
	grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
	gap: clamp(40px, 6vw, 96px);
	align-items: start;
}
.yz-rw-split--single {
	grid-template-columns: minmax(0, 1fr);
	max-width: 860px;
}
.yz-rw-split__aside {
	display: grid;
	gap: 24px;
}

.yz-rw .yz-rw-entries {
	margin: 0;
	padding: 0;
	list-style: none;
	border-block-start: 1px solid var(--yz-border);
}
.yz-rw .yz-rw-entry {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 16px;
	margin: 0;
	padding-block: 18px;
	border-block-end: 1px solid var(--yz-border);
}
.yz-rw-entry__what {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 4px 14px;
	min-width: 0;
}
.yz-rw-entry__label {
	font-size: 15px;
	line-height: 1.5;
	color: var(--yz-text);
	overflow-wrap: anywhere;
}
.yz-rw-entry__date {
	font-size: 11px;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--yz-text-muted);
}
.yz-rw-entry__pts {
	flex: none;
	font-family: var(--yz-font-display);
	font-size: 22px;
	line-height: 1;
	font-variant-numeric: lining-nums tabular-nums;
	color: var(--yz-text);
}
.yz-rw-entry.is-debit .yz-rw-entry__pts { color: var(--yz-text-muted); }

.yz-rw-tag {
	display: inline-block;
	padding: 2px 8px;
	font-size: 10.5px;
	font-weight: 500;
	line-height: 1.6;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--yz-text-2);
	border: 1px solid var(--yz-border-strong);
}
.yz-rw-tag--approved { color: var(--yz-text); border-color: var(--yz-gold); }

/* Cards in the aside. */
.yz-rw-card {
	padding: clamp(24px, 3.2vw, 36px);
	border: 1px solid var(--yz-border);
	background: var(--yz-surface);
}
.yz-rw-card--quiet { background: transparent; }
.yz-rw .yz-rw-card__title {
	margin: 14px 0 0;
	font-family: var(--yz-font-display);
	font-weight: 500;
	font-size: clamp(22px, 2.4vw, 28px);
	line-height: 1.2;
	color: var(--yz-text);
}
.yz-rw .yz-rw-card .yz-rw-card__text {
	margin: 10px 0 0;
	font-size: 15px;
	line-height: 1.65;
	color: var(--yz-text-muted);
}

/* Referral. */
.yz-rw-refer__label {
	display: block;
	margin-block: 24px 8px;
	font-size: 11px;
	font-weight: 500;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	color: var(--yz-text-muted);
}
.yz-rw-refer__row {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}
.yazan .yz-rw .yz-rw-refer__input {
	flex: 1 1 220px;
	min-width: 0;
	min-block-size: 48px;
	margin: 0;
	padding: 12px 14px;
	font-family: var(--yz-font-body);
	font-size: 14px;
	letter-spacing: 0.01em;
	color: var(--yz-text);
	background: var(--yz-bg);
	border: 1px solid var(--yz-border-strong);
	border-radius: var(--yz-radius);
	text-overflow: ellipsis;
}
.yz-rw-refer__copy { flex: 0 0 auto; }
.yz-rw .yz-rw-refer .yz-rw-refer__status {
	min-block-size: 1.5em;
	margin: 10px 0 0;
	font-size: 13px;
	line-height: 1.5;
	color: var(--yz-text-2);
}
.yz-rw .yz-rw-refer .yz-rw-refer__code {
	margin: 2px 0 0;
	font-size: 11px;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--yz-text-muted);
}
.yz-rw-refer__code-value {
	margin-inline-start: 8px;
	letter-spacing: 0.2em;
	font-variant-numeric: tabular-nums;
	color: var(--yz-text);
}

/* Membership privileges. */
.yz-rw .yz-rw-benefits {
	display: grid;
	gap: 12px;
	margin: 18px 0 0;
	padding: 0;
	list-style: none;
}
.yz-rw .yz-rw-benefits li {
	position: relative;
	margin: 0;
	padding-inline-start: 24px;
	font-size: 15px;
	line-height: 1.55;
	color: var(--yz-text-2);
}
.yz-rw .yz-rw-benefits li::before {
	content: "";
	position: absolute;
	inset-inline-start: 0;
	inset-block-start: 0.78em;
	inline-size: 12px;
	block-size: 1px;
	background: var(--yz-gold);
}

/* ------------------------------------------------------ Rewards teaser --- */
.yz-rw .yz-rw-rewards {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: clamp(16px, 2.4vw, 28px);
	margin: 0;
	padding: 0;
	list-style: none;
}
.yz-rw .yz-rw-reward {
	display: flex;
	flex-direction: column;
	gap: 10px;
	min-width: 0;
	margin: 0;
	padding: clamp(24px, 3vw, 32px);
	background: var(--yz-bg);
	border: 1px solid var(--yz-border);
	transition: border-color 300ms var(--mo-ease-out, ease);
}
.yz-rw .yz-rw-reward:hover { border-color: var(--yz-border-strong); }
.yz-rw-reward__cost {
	font-size: 11px;
	font-weight: 500;
	letter-spacing: 0.18em;
	text-transform: uppercase;
	color: var(--yz-text-muted);
}
.yz-rw .yz-rw-reward__title {
	margin: 0;
	font-family: var(--yz-font-display);
	font-weight: 500;
	font-size: clamp(22px, 2.2vw, 26px);
	line-height: 1.2;
	color: var(--yz-text);
}
.yz-rw .yz-rw-reward .yz-rw-reward__desc {
	margin: 0;
	font-size: 14.5px;
	line-height: 1.6;
	color: var(--yz-text-muted);
}
.yz-rw-reward__state {
	margin-block-start: auto;
	padding-block-start: 16px;
	font-size: 11px;
	font-weight: 500;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--yz-text-muted);
	border-block-start: 1px solid var(--yz-border);
}
.yz-rw-reward.is-ready .yz-rw-reward__state { color: var(--yz-text); }
.yz-rw-reward.is-ready .yz-rw-reward__state::before {
	content: "";
	display: inline-block;
	inline-size: 6px;
	block-size: 6px;
	margin-inline-end: 10px;
	vertical-align: 0.15em;
	border-radius: var(--yz-radius-pill);
	background: var(--yz-gold);
}
/* A level-locked reward stays visible but reads as out of reach, not as nearly-earned. */
.yz-rw .yz-rw-reward.is-locked { border-style: dashed; }
.yz-rw .yz-rw-reward.is-locked .yz-rw-reward__title,
.yz-rw .yz-rw-reward.is-locked .yz-rw-reward__cost { color: var(--yz-text-muted); }

/* ------------------------------------------------------------ Campaigns -- */
.yz-rw-campaigns {
	display: grid;
	gap: 20px;
}
.yz-rw-campaign {
	padding: clamp(24px, 3vw, 36px);
	border: 1px solid var(--yz-border);
	background: var(--yz-surface);
}
.yz-rw-campaign__head {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	justify-content: space-between;
	gap: 6px 20px;
}
.yz-rw .yz-rw-campaign__title {
	margin: 0;
	font-family: var(--yz-font-display);
	font-weight: 500;
	font-size: clamp(22px, 2.4vw, 28px);
	line-height: 1.2;
	color: var(--yz-text);
}
.yz-rw-campaign__ends {
	font-size: 11px;
	font-weight: 500;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	color: var(--yz-text-muted);
}
.yz-rw .yz-rw-campaign .yz-rw-campaign__desc {
	max-width: 68ch;
	margin: 10px 0 0;
	font-size: 15px;
	line-height: 1.65;
	color: var(--yz-text-muted);
}
.yz-rw .yz-rw-tasks {
	margin: 20px 0 0;
	padding: 0;
	list-style: none;
	border-block-start: 1px solid var(--yz-border);
}
.yz-rw .yz-rw-task {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px 16px;
	margin: 0;
	padding-block: 14px;
	border-block-end: 1px solid var(--yz-border);
}
.yz-rw-task__name {
	flex: 1 1 200px;
	min-width: 0;
	font-size: 15px;
	color: var(--yz-text);
}
.yz-rw-task__pts {
	font-family: var(--yz-font-display);
	font-size: 20px;
	line-height: 1;
	font-variant-numeric: lining-nums tabular-nums;
	color: var(--yz-text);
}

/* ------------------------------------------------------ Guest pillars ---- */
.yz-rw .yz-rw-pillars {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: clamp(28px, 4vw, 56px);
	margin: 0;
	padding: 0;
	list-style: none;
}
.yz-rw .yz-rw-pillar {
	margin: 0;
	padding-block-start: 22px;
	border-block-start: 1px solid var(--yz-border);
}
.yz-rw-pillar__icon { display: block; color: var(--yz-gold); }
.yz-rw-pillar__icon svg { inline-size: 30px; block-size: 30px; }
.yz-rw .yz-rw-pillar__title {
	margin: 16px 0 8px;
	font-family: var(--yz-font-display);
	font-weight: 500;
	font-size: 22px;
	line-height: 1.2;
	color: var(--yz-text);
}
.yz-rw .yz-rw-pillar .yz-rw-pillar__text {
	margin: 0;
	font-size: 15px;
	line-height: 1.65;
	color: var(--yz-text-muted);
}

/* ---------------------------------------------------------- Responsive --- */
@media (max-width: 991px) {
	.yz-rw-split { grid-template-columns: minmax(0, 1fr); }
	.yz-rw .yz-rw-rewards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 767px) {
	.yz-rw-ledger { grid-template-columns: minmax(0, 1fr); }
	.yz-rw-stat,
	.yz-rw-stat + .yz-rw-stat { padding-inline: 0; }
	.yz-rw-stat + .yz-rw-stat {
		border-inline-start: 0;
		border-block-start: 1px solid color-mix(in srgb, var(--yz-on-dark) 20%, transparent);
	}
	.yz-rw .yz-rw-rewards,
	.yz-rw .yz-rw-pillars { grid-template-columns: minmax(0, 1fr); }
	.yz-rw-refer__copy { flex: 1 1 100%; }
}

@media (prefers-reduced-motion: reduce) {
	.yz-rw-progress__fill { animation: none; }
}

/* ---------------------------------------------------------------- RTL ---- */
/* The Arabic pairing replaces the Latin faces for everything on this page, and tracked-uppercase
   labels do not apply to Arabic script — the same correction rtl.css §1 makes for the shared
   utilities, extended to this page's own labels. */
[dir="rtl"] .yz-rw {
	--yz-font-display: var(--yz-font-ar-display);
	--yz-font-body: var(--yz-font-ar-body);
}
[dir="rtl"] .yz-rw .yz-rw-stat__label,
[dir="rtl"] .yz-rw .yz-rw-stat__unit,
[dir="rtl"] .yz-rw .yz-rw-stat__value,
[dir="rtl"] .yz-rw .yz-rw-hero__title,
[dir="rtl"] .yz-rw .yz-rw-head__title,
[dir="rtl"] .yazan .yz-rw .yz-rw-btn,
[dir="rtl"] .yazan .yz-rw a.yz-rw-link,
[dir="rtl"] .yz-rw .yz-rw-entry__date,
[dir="rtl"] .yz-rw .yz-rw-tag,
[dir="rtl"] .yz-rw .yz-rw-refer__label,
[dir="rtl"] .yz-rw .yz-rw-refer .yz-rw-refer__code,
[dir="rtl"] .yz-rw .yz-rw-reward__cost,
[dir="rtl"] .yz-rw .yz-rw-reward__state,
[dir="rtl"] .yz-rw .yz-rw-campaign__ends {
	letter-spacing: 0;
	text-transform: none;
}
