/* =============================================================================
   The member profile.

   Built on the platform's own tokens (--mena-*), so it follows the light/dark
   switch in the navbar without knowing anything about it. Where a token might
   be missing — the profile page could be rendered on a site where the theme
   plugin is off — every var() carries a fallback, because a profile with no
   colours at all is worse than one that is merely not themed.
   ========================================================================== */

.csp {
	--csp-bg: var(--mena-bg, #fff);
	--csp-card: var(--mena-elevated, #fff);
	--csp-soft: var(--mena-surface, #f7f7f9);
	--csp-line: var(--mena-border, #e6e6ec);
	--csp-line-soft: var(--mena-border-soft, #f0f0f4);
	--csp-text: var(--mena-text, #1a1a1a);
	--csp-text-2: var(--mena-text-2, #3f4650);
	--csp-muted: var(--mena-muted, #8898aa);
	--csp-gold: var(--mena-gold, #ffd014);
	--csp-on-gold: var(--mena-on-gold, #1a1a1a);
	--csp-rose: var(--mena-rose, #f5365c);
	--csp-green: var(--mena-green, #17bf63);
	--csp-r: 16px;

	/* One column, the width of a timeline. The profile reads top to bottom —
	   header, tabs, then posts — so the measure is the column's, not a page's. */
	max-width: 680px;
	margin: 0 auto;
	color: var(--csp-text);
	font-family: inherit;
}

/*
 * The same page width as the home page and an article.
 *
 * Both of those set --mena-page and hand it to WordPress's own content-size
 * token, which every constrained block on the page already reads — the theme's
 * files and anything authored in the site editor alike. Copying that here is
 * what makes a profile sit in the same container as the rest of the site
 * instead of in a narrower one of its own; the alternative was overriding
 * .entry-content by hand, which only ever matches the markup you happened to
 * test against.
 */
body.csp-page {
	--mena-page: 1364px;
	--wp--style--global--content-size: var(--mena-page);
}

/*
 * The masthead stays.
 *
 * A profile is a page you scroll — a timeline, then settings — and the way back
 * to the rest of the site should not be a scroll to the top. Sticky rather than
 * fixed, so it takes its own space in the flow and nothing has to be padded
 * down by a magic number that changes with the logo.
 */
/*
 * Named several ways on purpose. A block theme's header is a template part, a
 * classic one calls it .site-header or #masthead, and a child theme may do
 * either — one selector is one guess, and this has to work on the theme that is
 * actually installed.
 */
body.csp-page header.wp-block-template-part,
body.csp-page .wp-site-blocks > header,
body.csp-page > header,
body.csp-page .site-header,
body.csp-page #masthead {
	/* The timeline page's masthead rules come with the mena-timeline class the
	   plugin now puts on the body; this only makes it stay. */
	position: sticky !important;
	top: 0;
	z-index: 60;
	background: var(--mena-bg, #fff);
	box-shadow: 0 1px 0 var(--mena-border, #e6e6ec);
}

/* WordPress's own bar is already fixed at the top for signed-in staff. */
body.csp-page.admin-bar header.wp-block-template-part,
body.csp-page.admin-bar .wp-site-blocks > header,
body.csp-page.admin-bar > header,
body.csp-page.admin-bar .site-header,
body.csp-page.admin-bar #masthead { top: 32px; }

@media (max-width: 782px) {
	body.csp-page.admin-bar header.wp-block-template-part,
	body.csp-page.admin-bar .wp-site-blocks > header,
	body.csp-page.admin-bar > header,
	body.csp-page.admin-bar .site-header,
	body.csp-page.admin-bar #masthead { top: 46px; }
}

/* A sticky ancestor cannot hold a sticky child in place, and block themes wrap
   everything in a couple of groups. These are containers, not scrollers. */
body.csp-page .wp-site-blocks { overflow: visible !important; }

/* "الملف الشخصي" in the masthead, over a card that already says whose profile
   this is. The article masthead does not carry a title either. */
body.csp-page header.wp-block-template-part .wp-block-post-title,
body.csp-page .wp-site-blocks > .wp-block-group:first-child .wp-block-post-title {
	display: none !important;
}

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

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

/*
 * One centred column: header, then tabs, then whatever the tab holds.
 *
 * The card used to sit in a sticky rail beside the content. That put two
 * measures on one page and left the timeline reading narrower than it does
 * anywhere else on the site. Now the card is a header — the same shape a
 * profile has everywhere else — and the column below it is the only column.
 */
.csp-layout {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: 0;
	align-items: start;
}

.csp-side { min-width: 0; }
.csp-main { min-width: 0; }

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

/*
 * The card is set in the reader's own interface font, not the site's.
 *
 * Everything else here is Alexandria, which is right for the site: it is one
 * face across Arabic and Latin and it is the same on every machine. This one
 * block is deliberately not - a profile card is a piece of interface rather
 * than a piece of the publication, and set in whatever the operating system
 * uses for its own windows it reads as part of the device.
 *
 * That was wrong here. The card is not a piece of the operating system, it is
 * a piece of this site, and sitting it in Segoe UI beside a page set in
 * Alexandria made the profile look like a dialog that had wandered in from
 * somewhere else — most visibly on the name, which is the largest text on the
 * page and so the one place a different typeface cannot hide.
 *
 * So it inherits, like everything else here. Everything inside the card
 * inherits in turn, including the standing written across the banner.
 */
.csp-hero {
	font-family: inherit;
	border: 1px solid var(--csp-line);
	border-radius: var(--csp-r);
	background: var(--csp-card);
	overflow: hidden;
}

/* Drawn from the member's own id: two profiles side by side should not look
   like the same empty template. */
.csp-hero__cover {
	position: relative;
	overflow: hidden;
	height: 150px;
	background:
		radial-gradient(120% 150% at 85% 0%, hsl(var(--csp-hue, 45) 42% 36% / .9), transparent 62%),
		radial-gradient(120% 150% at 10% 100%, hsl(calc(var(--csp-hue, 45) + 45) 38% 24% / .95), transparent 58%),
		linear-gradient(120deg, #12141a, #1f222a);
}

/*
 * The standing, written large across the far end of the band.
 *
 * Outline only, so it is texture the eye passes over rather than a label
 * sitting on the banner, and bled past the end edge so it reads as part of the
 * surface. Not past the bottom as well: the face overlaps the lower half of
 * this band, and a figure cropped by both the edge and a 124px circle stops
 * being a number and becomes scaffolding.
 *
 * The end edge, specifically, because the face is the first child of the bar
 * below and therefore always at the inline start — left in English, right in
 * Arabic. Putting this at the inline end keeps the two apart in both languages
 * with one rule, and the em offsets keep the crop at whatever size it is set.
 */
.csp-hero__rank {
	/*
	 * The one thing in this card that does not inherit the site's font.
	 *
	 * Alexandria is right for the text around it and wrong for this: the rank
	 * is a 112px outlined numeral behind everything else, and Alexandria's
	 * digits are narrow, evenly weighted and not built to be blown up and
	 * hollowed out — at that size the stroke reads as a wire rather than as a
	 * number. A UI font's digits are drawn wide and flat-sided, which is what
	 * an outline this large needs to hold its shape.
	 *
	 * It carries no language and no meaning anybody has to read, so nothing is
	 * lost by stepping outside the site's typeface here.
	 */
	font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	position: absolute;
	inset-block-end: -0.14em;
	inset-inline-end: -0.10em;
	font-size: 112px;
	line-height: 1;
	font-weight: 900;
	letter-spacing: -0.02em;
	white-space: nowrap;
	color: transparent;
	-webkit-text-stroke: 1.6px rgba(255, 255, 255, 0.32);
	user-select: none;
	pointer-events: none;
}

/* Where the stroke is not drawn, a very faint solid rather than nothing at
   all: transparent text with no outline is an invisible element. */
@supports not (-webkit-text-stroke: 1px red) {
	.csp-hero__rank { color: rgba(255, 255, 255, 0.12); }
}

/* The face sits half over the banner, the way it does everywhere this pattern
   is used — it is what tells you the picture belongs to the page rather than to
   the band above it.

   Positioned, and for one reason: the cover above became `position: relative`
   so the standing could be bled off its edge, and a positioned element paints
   over the in-flow siblings that follow it. The band was drawn on top of the
   face. Positioning this too puts it back on top — later in the document wins
   at the same z-index — without giving either one a z-index to fight over. */
.csp-hero__bar {
	position: relative;
	display: flex;
	align-items: flex-end;
	justify-content: space-between;
	gap: 12px;
	padding: 0 20px;
	margin-top: -46px;
}

.csp-face {
	display: block;
	width: 116px;
	height: 116px;
	border-radius: 50%;
	overflow: hidden;
	flex: none;
	background: var(--csp-soft);
	border: 4px solid var(--csp-card);
	box-shadow: 0 6px 20px rgba(0, 0, 0, .18);
}

.csp-face img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	border-radius: 50%;
}

.csp-facepick { flex: none; margin: 0; }

/* Your own face is a button. The camera says so on hover and on focus, and the
   whole circle is the target rather than a small icon in a corner. */
.csp-face--mine { position: relative; cursor: pointer; display: block; }

.csp-face__cam {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 50%;
	background: rgba(10, 11, 13, .55);
	color: #fff;
	opacity: 0;
	transition: opacity .15s ease;
}

.csp-face__cam svg { width: 30px; height: 30px; }

.csp-face--mine:hover .csp-face__cam,
.csp-face--mine:focus-within .csp-face__cam { opacity: 1; }

/* While the file is on its way up. */
.csp-facepick.is-sending .csp-face__cam { opacity: 1; }
.csp-facepick.is-sending .csp-face { animation: csp-pulse 1s ease-in-out infinite; }

@keyframes csp-pulse { 50% { opacity: .6; } }

/* A camera on a picture is not obvious on a phone, where there is no hover. */
@media (hover: none) {
	.csp-face--mine .csp-face__cam {
		inset: auto 0 0 auto;
		width: 34px;
		height: 34px;
		border: 3px solid var(--csp-card);
		background: var(--csp-gold);
		color: var(--csp-on-gold);
		opacity: 1;
	}

	.csp-face--mine .csp-face__cam svg { width: 17px; height: 17px; }
}

.csp-hero__bar .csp-btn { margin-bottom: 10px; }

.csp-id { padding: 12px 20px 18px; }

.csp-name {
	display: flex;
	align-items: center;
	gap: 7px;
	margin: 0;
	font-size: 21px;
	font-weight: 800;
	line-height: 1.3;
	color: var(--csp-text);
}

/*
 * The tick on the hero card.
 *
 * It is the platform's mark now — .mw-verified, drawn from the same <symbol>
 * the feed uses, so the badge on this card and the badge on the post below it
 * are one picture rather than two that nearly match.
 *
 * The size is stated here because the name it sits beside is 21px, half again
 * the .82rem the feed rows run at; the feed's 1.1em against that would be 23px.
 * .86em puts it at 18px, which is the same relationship to its text.
 *
 * .csp-badge is the flat fallback, for a site without the platform plugin.
 */
.csp-name .mw-verified,
.csp-badge { width: .86em; height: .86em; flex: none; }

/* Under the name, on the same edge as the name. The handle's own characters
   run the other way; the line does not. */
.csp-at {
	margin: 2px 0 0;
	font-size: 14px;
	color: var(--csp-muted);
}

.csp-bio {
	margin: 12px 0 0;
	font-size: 14.5px;
	line-height: 1.85;
	color: var(--csp-text-2);
	white-space: pre-line;
}

.csp-facts {
	display: flex;
	flex-wrap: wrap;
	gap: 6px 16px;
	margin: 12px 0 0;
	padding: 0;
	list-style: none;
	font-size: 13px;
	color: var(--csp-muted);
}

.csp-facts li { display: inline-flex; align-items: center; gap: 6px; }

/* The flag is a picture rather than the two regional indicator characters:
   phones draw those as a flag, Windows draws them as the two letters, and no
   rule here can put a glyph on a machine that does not have one. Rounded and
   faintly outlined because a flat rectangle of colour against a white card
   reads as a swatch — most of all the ones that end in white. */
img.csp-flag {
	width: 21px;
	height: 16px;
	flex: none;
	object-fit: cover;
	border-radius: 3px;
	box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.08);
}

.csp-facts__hint { color: var(--csp-gold); }

/* The one link on the card, so it looks like one. */
.csp-x {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	color: var(--csp-text-2) !important;
	text-decoration: none !important;
}

.csp-x svg { width: 13px; height: 13px; flex: none; }
.csp-x:hover { color: var(--csp-gold) !important; }

/* The three numbers, in the row where a social profile always puts them. */
.csp-stats {
	display: flex;
	flex-wrap: wrap;
	gap: 18px;
	margin: 14px 0 0;
	padding: 0;
	list-style: none;
	font-size: 13.5px;
	color: var(--csp-muted);
}

.csp-stats b {
	color: var(--csp-text);
	font-weight: 800;
	font-variant-numeric: tabular-nums;
}

/* ------------------------------------------------------------------- tabs */

.csp-tabs {
	display: flex;
	gap: 4px;
	margin: 14px 0 0;
	border-bottom: 1px solid var(--csp-line);
}

.csp-tab {
	position: relative;
	padding: 12px 16px;
	font-size: 14px;
	font-weight: 700;
	color: var(--csp-muted) !important;
	text-decoration: none !important;
	transition: color .15s ease;
}

.csp-tab:hover { color: var(--csp-text) !important; }
.csp-tab.is-on { color: var(--csp-text) !important; }

/* The underline is the tab, so it is drawn on the border the row already has
   rather than added under it — no layout shift when the current tab changes. */
.csp-tab.is-on::after {
	content: "";
	position: absolute;
	inset-inline: 12px;
	bottom: -1px;
	height: 3px;
	border-radius: 3px;
	background: var(--csp-gold);
}

/* ------------------------------------------------------------------- feed */

.csp-feed { display: grid; }

.csp-post {
	display: grid;
	grid-template-columns: 44px minmax(0, 1fr);
	gap: 12px;
	padding: 16px 4px;
	border-bottom: 1px solid var(--csp-line-soft);
}

.csp-post:last-child { border-bottom: 0; }

.csp-post__face {
	width: 44px;
	height: 44px;
	border-radius: 50%;
	overflow: hidden;
	background: var(--csp-soft);
}

.csp-post__face img { width: 100%; height: 100%; object-fit: cover; display: block; border-radius: 50%; }

.csp-post__main { min-width: 0; }

.csp-post__by {
	display: flex;
	align-items: center;
	gap: 6px;
	flex-wrap: wrap;
	font-size: 13.5px;
	color: var(--csp-muted);
}

.csp-post__by b { color: var(--csp-text); font-weight: 700; }
.csp-post__by .csp-badge { width: 1em; height: 1em; }
.csp-post__by em { font-style: normal; margin-inline-start: auto; font-size: 12.5px; }

.csp-post__body {
	margin: 6px 0 0;
	font-size: 15px;
	line-height: 1.85;
	color: var(--csp-text);
	overflow-wrap: anywhere;
}

/* Pictures in the shape the app gives them: one fills, two split, three and
   four make a block. Nothing is cropped to a square it was not taken as. */
.csp-shots {
	display: grid;
	gap: 3px;
	margin-top: 10px;
	border-radius: 14px;
	overflow: hidden;
	max-height: 420px;
}

.csp-shots img { width: 100%; height: 100%; object-fit: cover; display: block; }
.csp-shots--1 { grid-template-columns: 1fr; }
.csp-shots--2 { grid-template-columns: 1fr 1fr; aspect-ratio: 16 / 9; }
.csp-shots--3 { grid-template-columns: 1fr 1fr; aspect-ratio: 16 / 9; }
.csp-shots--3 img:first-child { grid-row: span 2; }
.csp-shots--4 { grid-template-columns: 1fr 1fr; aspect-ratio: 1 / 1; }

.csp-post__counts {
	display: flex;
	gap: 16px;
	margin-top: 10px;
	font-size: 12.5px;
	color: var(--csp-muted);
	font-variant-numeric: tabular-nums;
}

.csp-post__counts a { color: var(--csp-gold) !important; text-decoration: none !important; }

/* ------------------------------------------------------------------- feed */

/*
 * The platform's feed, in the profile's column.
 *
 * mena-timeline already unwraps it from its card and lets the page's own
 * scrollbar drive the endless loading. These two say the same thing again for
 * the profile's own container, so nothing here gets a height it has to scroll
 * inside — the whole point of the ask.
 */
.csp-main .mw-feed,
.csp-main .mw-feed__scroll {
	max-height: none !important;
	overflow: visible !important;
}

/* The composer is a card and the tabs are a rule above it; without this they
   touch and the two read as one control. */
.csp-main .mw-feed,
.csp-main .mw-composer:first-child { margin-top: 18px; }

.csp-main .mw-feed > :first-child { margin-top: 0; }

/* ------------------------------------------------------------------ votes */

.csp-votes { list-style: none; margin: 0; padding: 0; display: grid; }

.csp-vote { padding: 14px 4px; border-bottom: 1px solid var(--csp-line-soft); }
.csp-vote:last-child { border-bottom: 0; }

.csp-vote__q { display: flex; align-items: baseline; gap: 10px; }
.csp-vote__q b { font-size: 14.5px; font-weight: 700; color: var(--csp-text); }
.csp-vote__q em { font-style: normal; margin-inline-start: auto; font-size: 12px; color: var(--csp-muted); }

/* The way back to the poll itself, at the end of the line it belongs to. */
.csp-go {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 30px;
	height: 30px;
	flex: none;
	border-radius: 50%;
	color: var(--csp-muted) !important;
	text-decoration: none !important;
	transition: background .15s ease, color .15s ease;
}

.csp-go svg { width: 18px; height: 18px; }

.csp-go:hover, .csp-go:focus-visible {
	background: color-mix(in srgb, var(--csp-gold) 16%, transparent);
	color: var(--csp-gold) !important;
}

/* The answer given, marked on the reading edge — a list of questions without
   the answers is a list of things you have to open. */
.csp-vote__a {
	margin: 8px 0 0;
	padding: 8px 12px;
	border-inline-start: 3px solid var(--csp-green);
	border-radius: 8px;
	background: var(--csp-soft);
	font-size: 13.5px;
	color: var(--csp-text-2);
}

/* --------------------------------------------------------------- settings */

/*
 * Two columns. The profile form is long and the other three are short, so a
 * single stack puts the password field several screens below the picture. The
 * form used most often takes the wider column.
 */
/* One column. Beside a sticky card the content column is around 680px, and two
   columns of forms in that is two narrow columns rather than one readable one. */
.csp-sets {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	align-items: start;
	gap: 14px;
	padding-top: 16px;
}

.csp-sets__main, .csp-sets__side { display: grid; gap: 14px; align-content: start; min-width: 0; }

.csp-card {
	padding: 18px 20px 20px;
	border: 1px solid var(--csp-line);
	border-radius: var(--csp-r);
	background: var(--csp-card);
}

/* A rule under the title, so a card reads as a thing with a heading rather than
   as a heading that happens to have fields under it. */
.csp-card__head {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 12px;
	margin: 0 0 16px;
	padding-bottom: 12px;
	border-bottom: 1px solid var(--csp-line-soft);
}

.csp-card__head h2 {
	margin: 0;
	font-size: 15.5px;
	font-weight: 800;
	color: var(--csp-text);
	line-height: 1.4;
}

.csp-card__head > span { font-size: 12px; color: var(--csp-muted); }

/* The one change a member gets, said where the change is made. */
.csp-once {
	padding: 3px 9px;
	border-radius: 999px;
	background: color-mix(in srgb, var(--csp-gold) 18%, transparent);
	color: var(--csp-gold);
	font-size: 11px;
	font-weight: 700;
	white-space: nowrap;
}

.csp-card form { display: grid; gap: 14px; }

/* The button belongs to the form, not to the field above it: divided off and
   pushed to the end, the way a card ends everywhere else on the platform. */
.csp-card__foot {
	display: flex;
	justify-content: flex-end;
	gap: 8px;
	margin-top: 2px;
	padding-top: 14px;
	border-top: 1px solid var(--csp-line-soft);
}

.csp-field { display: grid; gap: 7px; }

.csp-field > span {
	font-size: 12.5px;
	font-weight: 700;
	color: var(--csp-muted);
}

/*
 * Sized here rather than inherited. The theme styles inputs for its own forms,
 * and a profile that adopts them gets three different field heights on one
 * card — so these win outright.
 */
.csp .csp-field input,
.csp .csp-field textarea {
	width: 100% !important;
	max-width: none !important;
	min-height: 46px;
	margin: 0 !important;
	padding: 12px 15px !important;
	border: 1px solid var(--mena-control-border, #cfd4dd) !important;
	border-radius: 12px !important;
	background: var(--mena-control-bg, #fff) !important;
	color: var(--csp-text) !important;
	font-family: inherit !important;
	font-size: 14.5px !important;
	line-height: 1.7 !important;
	box-shadow: none !important;
	transition: border-color .15s ease, box-shadow .15s ease;
}

.csp .csp-field textarea { resize: vertical; min-height: 104px; }

.csp .csp-field input:focus,
.csp .csp-field textarea:focus {
	outline: none !important;
	border-color: var(--csp-gold) !important;
	box-shadow: 0 0 0 3px color-mix(in srgb, var(--csp-gold) 26%, transparent) !important;
}

.csp .csp-field input:disabled {
	background: var(--csp-soft) !important;
	color: var(--csp-text-2) !important;
	cursor: not-allowed;
	-webkit-text-fill-color: var(--csp-text-2);
	opacity: 1;
}

.csp-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

@media (max-width: 520px) {
	.csp-pair { grid-template-columns: 1fr; }
}

.csp-note, .csp-field em { font-style: normal; font-size: 12px; line-height: 1.7; color: var(--csp-muted); margin: 0; }

.csp-count { font-size: 11.5px; color: var(--csp-muted); justify-self: start; font-variant-numeric: tabular-nums; }
.csp-count.is-full { color: var(--csp-rose); }

.csp-locked {
	margin: 0 0 8px;
	padding: 12px 15px;
	border: 1px dashed var(--csp-line);
	border-radius: 12px;
	background: var(--csp-soft);
	color: var(--csp-text-2);
	font-size: 15px;
	font-weight: 700;
	unicode-bidi: plaintext;
}

/* --------------------------------------------------------------- controls */

.csp-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	height: 40px;
	padding: 0 20px;
	border: 1px solid transparent;
	border-radius: 999px;
	background: var(--csp-gold);
	color: var(--csp-on-gold) !important;
	font-family: inherit;
	font-size: 14px;
	font-weight: 700;
	text-decoration: none !important;
	cursor: pointer;
	justify-self: start;
	transition: filter .15s ease, background .15s ease;
}

.csp-btn:hover { filter: brightness(1.06); }

.csp-btn--ghost {
	background: transparent;
	border-color: var(--csp-line);
	color: var(--csp-text) !important;
}

.csp-btn--ghost:hover { background: var(--csp-soft); }

.csp-btn--warn { background: var(--csp-rose); color: #fff !important; }

/* Said to a screen reader, not drawn. Themes usually ship this; the profile
   cannot assume it is one of them. */
.csp .screen-reader-text {
	position: absolute !important;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
	border: 0;
}

/* ---------------------------------------------------------------- notices */

.csp-said {
	margin: 0 0 14px;
	padding: 12px 16px;
	border-radius: 12px;
	font-size: 14px;
	font-weight: 600;
	border: 1px solid transparent;
}

.csp-said--ok {
	background: color-mix(in srgb, var(--csp-green) 14%, transparent);
	border-color: color-mix(in srgb, var(--csp-green) 40%, transparent);
	color: var(--csp-green);
}

.csp-said--bad {
	background: color-mix(in srgb, var(--csp-rose) 12%, transparent);
	border-color: color-mix(in srgb, var(--csp-rose) 38%, transparent);
	color: var(--csp-rose);
}

/* ---------------------------------------------- somebody else's latest posts */

/*
 * The same post the timeline draws, drawn again.
 *
 * A person's newest posts are the one thing on their profile that already has
 * a design elsewhere on the site — avatar on the reading edge, the name line,
 * the text, then the counts. Repeating that shape here is not decoration: it
 * is what tells a reader these are posts and that clicking one opens it. What
 * changes is that nothing is a control. The counts are read out, not offered;
 * liking and replying belong on the post, and this row's whole job is to take
 * you there.
 */
.csp-latest { padding: 0 0 8px; }

.csp-latest__title {
	margin: 22px 0 12px !important;
	font-size: 16px !important;
	font-weight: 800 !important;
	line-height: 1.4 !important;
	color: var(--csp-text) !important;
}

/* Hairlines between the rows rather than a border around each: three cards in
   a column read as three separate things, and these are one list. */
.csp-latest__list {
	border: 1px solid var(--csp-line);
	border-radius: var(--csp-r);
	background: var(--csp-card);
	overflow: hidden;
}

.csp-post {
	display: grid;
	grid-template-columns: 44px minmax(0, 1fr);
	gap: 12px;
	padding: 14px 16px;
	color: inherit !important;
	text-decoration: none !important;
	border-top: 1px solid var(--csp-line-soft);
	transition: background-color .12s ease;
}

.csp-post:first-child { border-top: 0; }

/* The whole row is the target, so the whole row answers the pointer. */
a.csp-post:hover,
a.csp-post:focus-visible { background: var(--csp-soft); }
a.csp-post:focus-visible { outline: 2px solid var(--mena-gold-text, var(--csp-gold)); outline-offset: -2px; }

.csp-post__pic { display: block; width: 44px; height: 44px; }

.csp-post__pic img {
	display: block;
	width: 44px;
	height: 44px;
	border-radius: 50%;
	object-fit: cover;
	background: var(--csp-soft);
}

.csp-post__main { min-width: 0; }

/*
 * Name, handle, age — one line that wraps as a whole rather than breaking the
 * name off from the badge beside it.
 */
.csp-post__head {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 0 6px;
	font-size: 14px;
	line-height: 1.6;
}

.csp-post__name {
	font-weight: 800;
	color: var(--csp-text);
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	max-width: 60%;
}

.csp-post__head .mw-verified,
.csp-post__head .csp-badge { width: .9em; height: .9em; flex: none; }

.csp-post__at,
.csp-post__dot,
.csp-post__time {
	font-weight: 500;
	font-size: 13px;
	color: var(--csp-muted);
}

.csp-post__at {
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	max-width: 40%;
}

.csp-post__body {
	margin: 2px 0 0;
	font-size: 14.5px;
	line-height: 1.85;
	color: var(--csp-text);
	overflow-wrap: break-word;
	white-space: pre-wrap;
}

.csp-post__body--empty { color: var(--csp-muted); font-style: italic; }

/* ---------------------------------------------------------- post pictures */

/*
 * One fills the row, two split it, three and four go to a square grid — the
 * arrangement the timeline uses, so a post with pictures is the same picture
 * here as it is there.
 */
.csp-grid {
	display: grid;
	gap: 2px;
	margin-top: 10px;
	border-radius: 14px;
	overflow: hidden;
	background: var(--csp-soft);
}

.csp-grid img { display: block; width: 100%; height: 100%; object-fit: cover; }

.csp-grid--1 { grid-template-columns: 1fr; }
.csp-grid--1 img { max-height: 420px; height: auto; }

.csp-grid--2 { grid-template-columns: 1fr 1fr; }
.csp-grid--2 img { aspect-ratio: 1 / 1; }

.csp-grid--3 { grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr; }
.csp-grid--3 img { aspect-ratio: 1 / 1; }
.csp-grid--3 img:first-child { grid-row: span 2; aspect-ratio: auto; }

.csp-grid--4 { grid-template-columns: 1fr 1fr; }
.csp-grid--4 img { aspect-ratio: 1 / 1; }

/* -------------------------------------------------------------- the counts */

.csp-post__acts {
	display: flex;
	align-items: center;
	gap: 28px;
	margin-top: 10px;
	color: var(--csp-muted);
	font-size: 13px;
}

.csp-post__stat {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	line-height: 1;
}

.csp-post__stat i { font-size: 15px; line-height: 1; }

/* Numbers in a row of numbers should not shuffle sideways as they grow. */
.csp-post__stat b {
	font-weight: 600;
	font-variant-numeric: tabular-nums;
}

@media (max-width: 480px) {
	.csp-post { padding: 12px 12px; gap: 10px; grid-template-columns: 40px minmax(0, 1fr); }
	.csp-post__pic, .csp-post__pic img { width: 40px; height: 40px; }
	.csp-post__acts { gap: 22px; }
}

.csp-empty {
	margin: 0;
	padding: 44px 20px;
	text-align: center;
	color: var(--csp-muted);
	font-size: 14px;
}

.csp--out { padding: 24px; text-align: center; color: var(--csp-muted); }

/* ------------------------------------------------------------------ small */

@media (max-width: 600px) {
	.csp-hero__cover { height: 120px; }
	.csp-hero__rank { font-size: 84px; }
	.csp-face { width: 92px; height: 92px; }
	.csp-hero__bar { margin-top: -38px; padding: 0 14px; }
	.csp-id { padding: 12px 14px 16px; }
	.csp-pair { grid-template-columns: 1fr; }
	.csp-tab { padding: 12px 11px; font-size: 13.5px; }
	.csp-post { grid-template-columns: 38px minmax(0, 1fr); gap: 10px; }
	.csp-post__face { width: 38px; height: 38px; }
}

/* ---------------------------------------------------------------- points */

/*
 * The ledger behind the number on the card.
 *
 * Three columns on one line — what it was for, when, and how much — because a
 * score history is scanned down the amounts rather than read across. The
 * reasons vary in length and the figures do not, so the figure column is the
 * one pinned to the edge and the reason takes whatever is left.
 */
/*
 * Clear of the tab strip.
 *
 * The card was sitting on the rule the tabs are drawn on, so the underline
 * marking the current tab ran straight into the card's own border and the two
 * read as one thick line. The other tabs open onto a feed with its own spacing;
 * this one opens onto a card, which has none of its own.
 */
.csp-points { margin-top: 18px; }

.csp-points__sum {
	font-size: 22px;
	font-weight: 800;
	line-height: 1;
	color: var(--mena-gold-text, #a97d00);
	font-variant-numeric: tabular-nums;
}

.csp-points__sum.is-down { color: var(--mena-rose, #f5365c); }

.csp-points__none {
	margin: 0;
	padding: 26px 0;
	text-align: center;
	font-size: 13.5px;
	color: var(--csp-muted);
}

.csp-ledger {
	list-style: none;
	margin: 0;
	padding: 0;
}

.csp-ledger__row {
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto auto;
	align-items: baseline;
	gap: 12px;
	padding: 11px 0;
}

.csp-ledger__row + .csp-ledger__row { border-top: 1px solid var(--csp-line-soft); }

/* A revoked award keeps its row — the history is the point — but it should not
   read as something still earned. */
.csp-ledger__row.is-void { opacity: .5; }

.csp-ledger__what {
	font-size: 13.5px;
	font-weight: 600;
	color: var(--csp-text);
	min-width: 0;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.csp-ledger__when {
	font-style: normal;
	font-size: 12px;
	color: var(--csp-muted);
	white-space: nowrap;
}

.csp-ledger__n {
	min-width: 58px;
	text-align: end;
	font-size: 13.5px;
	font-weight: 800;
	font-variant-numeric: tabular-nums;
	color: var(--mena-green, #17bf63);
}

.csp-ledger__n.is-down { color: var(--mena-rose, #f5365c); }

@media (max-width: 480px) {
	.csp-ledger__row {
		grid-template-columns: minmax(0, 1fr) auto;
	}

	.csp-ledger__when { grid-column: 1; font-size: 11.5px; }
	.csp-ledger__n { grid-row: 1 / span 2; align-self: center; }
	.csp-ledger__what { white-space: normal; }
}

/* ================================== the profile, on a phone */

/*
 * The camera badge sits ON the edge of the face, not inside it.
 *
 * .csp-face clips to a circle so the avatar is round whatever shape the file
 * is — and that same clip was eating the badge, which is positioned at the
 * corner of the face's box and so lies mostly outside the circle. The picture
 * keeps its own border-radius, so dropping the clip on the label costs nothing
 * and lets the badge out.
 */
@media (hover: none) {
	.csp-face--mine { overflow: visible; }
	.csp-face--mine img { border-radius: 50%; }

	.csp-face--mine .csp-face__cam {
		inset: auto 0 2px auto;
		box-shadow: 0 2px 6px rgba(0, 0, 0, .25);
	}
}

/* A pencil and a word, spaced as one thing. */
.csp-btn--edit {
	display: inline-flex;
	align-items: center;
	gap: 6px;
}

.csp-btn--edit .bi { font-size: .95em; line-height: 1; }

/*
 * More room between the cover and the button.
 *
 * The bar aligns its children to the bottom, so a top margin on the button
 * would do nothing — the face sets the row's height and the button is already
 * as low as the row allows. Taking the bottom margin off is what moves it down
 * and opens the gap above it.
 */
.csp-hero__bar .csp-btn { margin-bottom: 0; }

@media (max-width: 900px) {
	/*
	 * The page gutter goes, rather than every child breaking out of it.
	 *
	 * Everything on this page is meant to be full width, and the first version
	 * of this did it with a negative margin on each piece — a container padding
	 * its children and the children un-padding themselves, two rules cancelling
	 * out and a third to write every time something new is added. Taking the
	 * 5vw off the group once is the same result with nothing to keep in sync.
	 *
	 * :not() so the header keeps its own: that group holds the sticky bar,
	 * whose contents are laid out against that padding.
	 */
	.csp-page .wp-site-blocks > .wp-block-group:not(:has(header.wp-block-template-part)) {
		padding-inline: 0 !important;
	}

	/* No card, no edges — on a phone the profile is the page rather than
	   something sitting on it. */
	.csp-hero {
		border-inline: 0;
		border-radius: 0;
	}

	/*
	 * The tabs stay under the bar.
	 *
	 * --mena-barh is what the site's sticky header actually leaves on screen —
	 * the header's height less the utility strip it hides above the viewport —
	 * measured and published by mena-menu.js. Without it the tabs pin to the
	 * top and the header sits over them.
	 */
	.csp-tabs {
		position: sticky;
		top: var(--mena-barh, 0px);
		z-index: 30;
		margin-top: 0;
		padding-inline: 12px;
		background: var(--csp-card);
	}

	/* Enough that names and text do not sit against the glass, now that the
	   page itself gives them nothing. */
	.csp-post { padding-inline: 14px; }
}

/* -------------------------------------------------------- linked accounts */

/*
 * Nextend's buttons, wearing this site's clothes.
 *
 * The plugin ships each provider as a brand-coloured pill: Google on white, X
 * on black. That is right on a login screen, where the brand is the thing you
 * are looking for, and wrong in a settings list, where two saturated bars stack
 * up next to grey form cards and one of them disappears entirely when the site
 * is dark — black on black.
 *
 * So the row goes neutral and the brand stays on the mark: a chip that keeps
 * each logo on the background it was drawn for — Google's four colours on
 * white, X's white glyph on black — and reads the same in both themes. The
 * markup is the plugin's and the addresses are the plugin's; only the paint is
 * ours, which is why every one of these is an override rather than a rule.
 */

.csp-linked__note { margin: 0 0 14px; }

.csp-linked .nsl-container { text-align: inherit !important; }

/*
 * No panel behind the buttons.
 *
 * Nextend paints its own container — a dark rounded box the buttons sit
 * inside — and where it comes from varies with the provider skin chosen in its
 * settings, so it can appear on one install and not on another. Whatever draws
 * it, it is a second card inside a card: the section around it already has the
 * border, the radius and the padding, and the buttons already read as buttons.
 *
 * Every wrapper between the section and the anchor is cleared, rather than the
 * one that happens to be painted here, because the next version of the plugin
 * may well paint a different one. The buttons themselves are untouched.
 */
.csp-linked__buttons,
.csp-linked .nsl-container,
.csp-linked .nsl-container-block,
.csp-linked .nsl-container-block-fullwidth,
.csp-linked .nsl-container > div:not(.nsl-container-buttons),
.csp-linked .nsl-container .nsl-container-buttons {
	background: none !important;
	background-color: transparent !important;
	border: 0 !important;
	border-radius: 0 !important;
	box-shadow: none !important;
	padding: 0 !important;
}

/*
 * Four classes deep on purpose.
 *
 * The theme narrows this row to `gap: 0 !important` on small screens with a
 * three-class selector of its own, and an equally specific rule of mine would
 * lose to it on source order alone — leaving the buttons touching on exactly
 * the screens where they are stacked.
 */
.csp-linked .nsl-container.nsl-container-block .nsl-container-buttons,
.csp-linked .nsl-container .nsl-container-buttons {
	display: grid !important;
	gap: 10px !important;
	width: 100% !important;
}

/*
 * The plugin's anchor is the row. Its inline style says inline-block, and its
 * stylesheet gives it 5px of vertical margin — which in a grid adds to the gap
 * rather than collapsing into it, so the spacing has to be the grid's alone.
 */
.csp-linked .nsl-container-buttons > a {
	display: block !important;
	width: 100% !important;
	margin: 0 !important;
	box-shadow: none !important;
	text-decoration: none !important;
}

/*
 * The inline background-color the provider writes onto this element is the one
 * thing that has to be beaten by force — it is an attribute, not a stylesheet.
 */
.csp-linked .nsl-button {
	display: grid !important;
	grid-template-columns: 40px minmax(0, 1fr) 16px;
	align-items: center;
	gap: 12px;
	width: 100% !important;
	min-height: 60px;
	padding: 10px 14px !important;
	border: 1px solid var(--csp-line) !important;
	border-radius: 14px !important;
	background: var(--csp-card) !important;
	box-shadow: none !important;
	transition: border-color .15s ease, background-color .15s ease;
}

.csp-linked .nsl-container-buttons > a:hover .nsl-button {
	border-color: var(--mena-gold-text, var(--csp-gold)) !important;
	background: var(--csp-soft) !important;
}

.csp-linked .nsl-container-buttons > a:focus-visible .nsl-button {
	outline: 2px solid var(--mena-gold-text, var(--csp-gold));
	outline-offset: 2px;
}

/* ------------------------------------------------------------- brand chip */

.csp-linked .nsl-button-svg-container {
	display: flex !important;
	align-items: center;
	justify-content: center;
	width: 40px !important;
	height: 40px !important;
	margin: 0 !important;
	padding: 0 !important;
	border-radius: 11px;
	overflow: hidden;
}

.csp-linked .nsl-button-svg-container svg {
	width: 22px !important;
	height: 22px !important;
	display: block;
}

/* Each logo on the ground it was drawn for, so neither depends on the theme. */
.csp-linked .nsl-button-google .nsl-button-svg-container {
	background: #fff;
	border: 1px solid rgba(0, 0, 0, .10);
}

.csp-linked .nsl-button-twitter .nsl-button-svg-container,
.csp-linked .nsl-button-x .nsl-button-svg-container {
	background: #000;
	border: 1px solid rgba(255, 255, 255, .14);
}

.csp-linked .nsl-button-facebook .nsl-button-svg-container { background: #1877f2; }
.csp-linked .nsl-button-apple .nsl-button-svg-container     { background: #000; }
.csp-linked .nsl-button-microsoft .nsl-button-svg-container { background: #fff; border: 1px solid rgba(0, 0, 0, .10); }

/* ----------------------------------------------------------------- label */

.csp-linked .nsl-button-label-container {
	margin: 0 !important;
	padding: 0 !important;
	font-family: inherit !important;
	font-size: 14px !important;
	font-weight: 700 !important;
	line-height: 1.5 !important;
	color: var(--csp-text) !important;
	text-align: start !important;
	overflow-wrap: break-word;
	white-space: normal !important;
}

/*
 * Connected, or not.
 *
 * data-action is the plugin's own answer to that question — it renders a link
 * button for a provider the member has not connected and an unlink button for
 * one they have — so the state is read from the markup rather than guessed at,
 * and it stays correct the moment they connect one.
 */
.csp-linked a[data-action="unlink"] .nsl-button-label-container { color: var(--csp-muted) !important; }

.csp-linked a[data-action="unlink"] .nsl-button {
	background: var(--csp-soft) !important;
	border-color: var(--csp-line-soft) !important;
}

.csp-linked a[data-action="unlink"]:hover .nsl-button {
	border-color: var(--csp-rose) !important;
	background: var(--csp-card) !important;
}

/* ------------------------------------------------------------------ marks */

/*
 * A tick for an account already connected, a chevron for one that can be. Drawn
 * rather than set in a font: the label is the plugin's string in whatever
 * language the site runs in, and this has to be legible next to any of them.
 */
/*
 * A chevron pointing the way the page reads for an account that can still be
 * connected, and a tick for one already connected. Both are the same trick —
 * two borders of an empty box, turned — because the label beside them is the
 * plugin's string in whatever language the site runs in, and a drawn mark is
 * legible next to any of them where an icon font is one more thing to load.
 */
.csp-linked .nsl-button::after {
	content: "";
	display: block;
	justify-self: end;
	width: 9px;
	height: 9px;
	border-right: 2px solid var(--csp-muted);
	border-bottom: 2px solid var(--csp-muted);
	/* 135deg points it left, which is forward on a right-to-left page. */
	transform: rotate(135deg);
	transition: border-color .15s ease;
}

.csp-linked .nsl-container-buttons > a:hover .nsl-button::after {
	border-right-color: var(--mena-gold-text, var(--csp-gold));
	border-bottom-color: var(--mena-gold-text, var(--csp-gold));
}

/* Taller than wide and turned the other way: a tick. */
.csp-linked a[data-action="unlink"] .nsl-button::after {
	width: 7px;
	height: 12px;
	border-right: 2px solid var(--csp-green);
	border-bottom: 2px solid var(--csp-green);
	transform: rotate(45deg);
	margin-bottom: 3px;
}

.csp-linked a[data-action="unlink"]:hover .nsl-button::after {
	border-right-color: var(--csp-rose);
	border-bottom-color: var(--csp-rose);
}

/* The plugin's own notice box, which is a WordPress admin notice on a page
   that has never seen one. */
.csp-linked .nsl-container .nsl-error,
.csp-linked #nsl-notices-fallback > div {
	margin: 0 0 12px !important;
	padding: 10px 14px !important;
	border: 1px solid var(--csp-line) !important;
	border-radius: 12px !important;
	background: var(--csp-soft) !important;
	color: var(--csp-text) !important;
	font-size: 13px !important;
}

/* ---------------------------------------------------- confirm your email */

/*
 * A request, dressed as one.
 *
 * Not an error and not a warning: nothing has gone wrong and nothing is
 * blocked, so it carries the site's gold rather than a red, and it sits under
 * the card as a note rather than across the top as an alert. It has no close
 * button on purpose — the value of it is that it is still here next month.
 */
.csp-verify {
	display: flex;
	gap: 12px;
	margin-top: 14px;
	padding: 14px 16px;
	border: 1px solid var(--csp-line);
	border-inline-start: 3px solid var(--mena-gold, #ffd014);
	border-radius: var(--csp-r);
	background: var(--csp-card);
}

.csp-verify__mark {
	flex: none;
	margin-top: 1px;
	color: var(--mena-gold-text, #c68f00);
	font-size: 1.05rem;
	line-height: 1.3;
}

.csp-verify__main { min-width: 0; }

.csp-verify__title {
	display: block;
	font-size: .88rem;
	font-weight: 700;
}

.csp-verify__body {
	margin: 4px 0 0;
	color: var(--csp-muted);
	font-size: .78rem;
	line-height: 1.75;
}

.csp-verify__act { margin-top: 10px; }

.csp-verify__act .csp-btn[disabled] {
	opacity: .55;
	cursor: default;
}

@media (max-width: 640px) {
	.csp-verify {
		margin-inline: 14px;
		border-radius: 12px;
	}
}
