/*
 * Foundency Magazine — frontend styles.
 *
 * Every selector is scoped under .foundency-mag so the host theme can't bleed in
 * and our styles can't bleed out. All visual tokens read from CSS custom
 * properties injected from settings.
 */

.foundency-mag {
	--mag-color-primary: #0f172a;
	--mag-color-accent:  #2563eb;
	--mag-color-bg:      #ffffff;
	--mag-color-text:    #0f172a;
	--mag-color-muted:   #64748b;
	--mag-color-border:  #e5e7eb;
	--mag-font-heading:  system-ui, -apple-system, sans-serif;
	--mag-font-body:     system-ui, -apple-system, sans-serif;
	--mag-radius:        12px;
	--mag-measure:       70ch;
	--mag-content-max:   760px;

	box-sizing: border-box;
	background: var(--mag-color-bg);
	color: var(--mag-color-text);
	font-family: var(--mag-font-body);
	line-height: 1.6;

	/* In inherit mode the section is dropped into the theme's content area,
	   which is frequently a float- or flex-based main column. Neutralise the
	   float case here; the flex case is handled by the explicit width on the
	   layout wrappers below. */
	float: none;
}
.foundency-mag *, .foundency-mag *::before, .foundency-mag *::after { box-sizing: border-box; }

.foundency-mag a { color: var(--mag-color-accent); }

.foundency-mag h1, .foundency-mag h2, .foundency-mag h3, .foundency-mag h4 {
	font-family: var(--mag-font-heading);
	color: var(--mag-color-primary);
	line-height: 1.2;
	margin: 1.5em 0 0.5em;
}

/* Standalone chrome */
.foundency-mag__chrome,
.foundency-mag__chrome-foot {
	background: var(--mag-color-bg);
	border-bottom: 1px solid var(--mag-color-border);
}
.foundency-mag__chrome-foot { border-top: 1px solid var(--mag-color-border); border-bottom: 0; }
.foundency-mag__chrome-inner {
	max-width: 1100px;
	margin: 0 auto;
	padding: 1rem 1.25rem;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 2rem;
}
.foundency-mag__brand { font-weight: 600; text-decoration: none; color: var(--mag-color-primary); display: inline-flex; align-items: center; }
.foundency-mag__logo { max-height: 36px; width: auto; }
.foundency-mag__nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 1.25rem; }
.foundency-mag__nav a { color: var(--mag-color-text); text-decoration: none; }
.foundency-mag__nav a:hover { color: var(--mag-color-accent); }

/* Archive layout */
.foundency-mag--archive {
	/* width is explicit, not left to `auto`, so the box measures the same
	   whether the theme's content area is a block container (auto fills it) or
	   a flex container (auto would shrink-to-fit the text instead). max-width
	   still caps it, and the auto inline margins still centre it. */
	width: 100%;
	max-width: 1100px;
	margin: 0 auto;
	padding: 2rem 1.25rem 4rem;
}
.foundency-mag__archive-head { margin-bottom: 2rem; }
.foundency-mag__archive-title { font-size: clamp(1.8rem, 1.2rem + 2vw, 2.6rem); margin: 0 0 .5rem; }
.foundency-mag__archive-desc { color: var(--mag-color-muted); max-width: var(--mag-measure); }
.foundency-mag__search { display: flex; gap: .5rem; margin: 1rem 0; }
.foundency-mag__search input[type="search"] {
	flex: 1; padding: .65rem .85rem;
	border: 1px solid var(--mag-color-border);
	border-radius: var(--mag-radius);
	font-family: inherit;
	background: var(--mag-color-bg);
	color: var(--mag-color-text);
}
.foundency-mag__search-submit {
	border: 0; padding: .65rem 1rem;
	background: var(--mag-color-primary); color: var(--mag-color-bg);
	border-radius: var(--mag-radius);
	cursor: pointer;
}
.foundency-mag__filters { margin-top: .5rem; }
.foundency-mag__filter-list { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: .5rem; }
.foundency-mag__filter-list a {
	display: inline-block; padding: .35rem .75rem;
	border: 1px solid var(--mag-color-border);
	border-radius: 999px; text-decoration: none;
	color: var(--mag-color-text);
	font-size: .9rem;
}
.foundency-mag__filter-list a.is-active { background: var(--mag-color-primary); color: var(--mag-color-bg); border-color: var(--mag-color-primary); }

.foundency-mag__grid {
	list-style: none;
	padding: 0; margin: 0;
	display: grid;
	gap: 1.5rem;
	grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}
.foundency-mag__card { background: var(--mag-color-bg); }
.foundency-mag__card-link { display: block; text-decoration: none; color: inherit; border: 1px solid var(--mag-color-border); border-radius: var(--mag-radius); overflow: hidden; transition: transform .15s ease, box-shadow .15s ease; }
.foundency-mag__card-link:hover { transform: translateY(-2px); box-shadow: 0 6px 24px rgba(0,0,0,.06); }
.foundency-mag__card-thumb img { width: 100%; height: auto; display: block; aspect-ratio: 16 / 10; object-fit: cover; }
.foundency-mag__card-body { padding: 1rem 1.1rem 1.2rem; }
.foundency-mag__card-eyebrow { font-size: .75rem; text-transform: uppercase; letter-spacing: .08em; color: var(--mag-color-accent); }
.foundency-mag__card-title { font-size: 1.2rem; margin: .25rem 0 .5rem; }
.foundency-mag__card-deck { color: var(--mag-color-muted); margin: 0 0 .5rem; }
.foundency-mag__card-meta { color: var(--mag-color-muted); font-size: .85rem; margin: 0; }

.foundency-mag__pagination { margin-top: 2rem; }
.foundency-mag__pagination .page-numbers {
	display: inline-block; padding: .4rem .75rem; margin: 0 .15rem;
	border: 1px solid var(--mag-color-border); border-radius: var(--mag-radius);
	text-decoration: none; color: var(--mag-color-text);
}
.foundency-mag__pagination .page-numbers.current { background: var(--mag-color-primary); color: var(--mag-color-bg); border-color: var(--mag-color-primary); }

.foundency-mag__empty { color: var(--mag-color-muted); }

/* Single article */
.foundency-mag--single {
	width: 100%; /* see the note on .foundency-mag--archive */
	max-width: var(--mag-content-max);
	margin: 0 auto;
	padding: 2rem 1.25rem 4rem;
}

/* Breadcrumbs — visible mirror of the BreadcrumbList JSON-LD */
.foundency-mag__breadcrumbs {
	margin: 0 0 1rem;
	font-size: 0.85rem;
	color: var(--mag-color-muted);
}
.foundency-mag__breadcrumbs ol {
	list-style: none;
	padding: 0;
	margin: 0;
	display: flex;
	flex-wrap: wrap;
	gap: 0.25rem;
}
.foundency-mag__breadcrumbs li {
	display: inline-flex;
	align-items: center;
}
.foundency-mag__breadcrumbs a {
	color: var(--mag-color-muted);
	text-decoration: none;
}
.foundency-mag__breadcrumbs a:hover { color: var(--mag-color-accent); text-decoration: underline; }
.foundency-mag__breadcrumb-sep {
	margin: 0 0.4rem;
	color: var(--mag-color-border);
}
.foundency-mag__breadcrumbs [aria-current="page"] {
	color: var(--mag-color-text);
	font-weight: 500;
}

/* Table of contents */
.foundency-mag__toc {
	margin: 1.5rem 0 2rem;
	padding: 1rem 1.25rem 1.25rem;
	background: rgba(0, 0, 0, 0.02);
	border-inline-start: 3px solid var(--mag-color-accent);
	border-radius: var(--mag-radius);
}
.foundency-mag__toc-title {
	font-size: 0.85rem;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	color: var(--mag-color-muted);
	margin: 0 0 0.5rem;
	font-weight: 600;
}
.foundency-mag__toc-list,
.foundency-mag__toc-sublist {
	list-style-position: inside;
	padding: 0;
	margin: 0;
}
.foundency-mag__toc-list { counter-reset: toc; }
.foundency-mag__toc-item {
	list-style: none;
	margin: 0.35em 0;
}
.foundency-mag__toc-item::before {
	counter-increment: toc;
	/* NBSP, not a plain space: a trailing space collapses at the start of a line
	   box, which jams the number against the heading in both directions. */
	content: counter(toc) ".\00a0";
	color: var(--mag-color-muted);
	font-variant-numeric: tabular-nums;
}
.foundency-mag__toc a {
	color: var(--mag-color-text);
	text-decoration: none;
	border-bottom: 1px solid transparent;
}
.foundency-mag__toc a:hover {
	color: var(--mag-color-accent);
	border-bottom-color: currentColor;
}
.foundency-mag__toc-sublist {
	list-style: none;
	margin: 0.25em 0 0.5em;
	margin-inline-start: 1.25em;
}
.foundency-mag__toc-sublist li {
	margin: 0.2em 0;
	font-size: 0.92em;
	color: var(--mag-color-muted);
}
.foundency-mag__toc-sublist a {
	color: var(--mag-color-muted);
}
.foundency-mag__toc-sublist a:hover { color: var(--mag-color-accent); }

/* Scroll-margin so anchor jumps don't disappear under a sticky header */
.foundency-mag h2[id],
.foundency-mag h3[id],
.foundency-mag h4[id],
.foundency-mag__listicle-item[id],
.foundency-mag__faq-q[id] {
	scroll-margin-top: 1.5rem;
}
.foundency-mag__eyebrow {
	display: inline-block;
	text-decoration: none;
	color: var(--mag-color-accent);
	text-transform: uppercase;
	letter-spacing: .08em;
	font-size: .8rem;
	font-weight: 600;
	margin-bottom: .5rem;
}
.foundency-mag__title { font-size: clamp(2rem, 1.3rem + 2vw, 3rem); margin: .25rem 0 .75rem; }
.foundency-mag__deck { font-size: 1.2rem; color: var(--mag-color-muted); margin: 0 0 1rem; max-width: var(--mag-measure); }
.foundency-mag__byline { color: var(--mag-color-muted); font-size: .9rem; display: flex; gap: 1rem; flex-wrap: wrap; }
.foundency-mag__byline time { font-variant-numeric: tabular-nums; }
.foundency-mag__hero { margin: 1.5rem 0; }
.foundency-mag__hero img { width: 100%; height: auto; display: block; border-radius: var(--mag-radius); }
.foundency-mag__hero figcaption { color: var(--mag-color-muted); font-size: .85rem; margin-top: .35rem; }

.foundency-mag__content { font-size: 1.07rem; max-width: var(--mag-measure); }
.foundency-mag__content p { margin: 0 0 1em; }
.foundency-mag__content img { max-width: 100%; height: auto; border-radius: var(--mag-radius); }
.foundency-mag__content blockquote {
	border-inline-start: 4px solid var(--mag-color-accent);
	margin: 1.5em 0;
	padding-block: .2em;
	padding-inline: 1.2em 0;
	font-style: italic;
	color: var(--mag-color-primary);
}
.foundency-mag__content code, .foundency-mag__content pre {
	background: #f5f5f7;
	border-radius: 6px;
}
.foundency-mag__content pre { padding: 1em; overflow-x: auto; }
.foundency-mag__content code { padding: .15em .35em; font-size: .92em; }

/* Read next — related articles */
.foundency-mag__readnext {
	max-width: var(--mag-content-max);
	margin: 3rem auto 0;
	padding-top: 2rem;
	border-top: 2px solid var(--mag-color-border);
}
.foundency-mag__readnext-title {
	font-size: 1.4rem;
	margin: 0 0 1.25rem;
}
.foundency-mag__readnext-grid {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	gap: 1.25rem;
	grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
}
.foundency-mag__readnext-card a {
	display: flex;
	flex-direction: column;
	height: 100%;
	text-decoration: none;
	color: inherit;
	border: 1px solid var(--mag-color-border);
	border-radius: var(--mag-radius);
	overflow: hidden;
	transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}
.foundency-mag__readnext-card a:hover {
	transform: translateY(-2px);
	box-shadow: 0 6px 20px rgba(0,0,0,.07);
	border-color: color-mix(in srgb, var(--mag-color-accent) 35%, var(--mag-color-border));
}
.foundency-mag__readnext-thumb img {
	width: 100%;
	height: auto;
	display: block;
	aspect-ratio: 16 / 10;
	object-fit: cover;
}
.foundency-mag__readnext-body {
	display: block;
	padding: .9rem 1rem 1.1rem;
}
.foundency-mag__readnext-eyebrow {
	display: block;
	font-size: .72rem;
	text-transform: uppercase;
	letter-spacing: .08em;
	color: var(--mag-color-accent);
	margin-bottom: .25rem;
}
.foundency-mag__readnext-cardtitle {
	display: block;
	font-family: var(--mag-font-heading);
	font-weight: 700;
	font-size: 1.05rem;
	line-height: 1.3;
	color: var(--mag-color-primary);
}
.foundency-mag__readnext-card.is-textonly a {
	background: color-mix(in srgb, var(--mag-color-primary) 3%, var(--mag-color-bg));
}

.foundency-mag__tags { list-style: none; padding: 0; margin: 2rem 0 0; display: flex; flex-wrap: wrap; gap: .5rem; }
.foundency-mag__tags a {
	font-size: .85rem; color: var(--mag-color-muted);
	border: 1px solid var(--mag-color-border);
	border-radius: 999px; padding: .25rem .65rem;
	text-decoration: none;
}

/* ==========================================================================
 * STRUCTURED BLOCKS — designed for human reading + AI entity extraction
 * ========================================================================== */

/* ----- Listicle: numbered cards with large outlined numerals --------------- */

.foundency-mag__listicle {
	margin: 2.5rem 0;
	counter-reset: fdm-listicle;
}
.foundency-mag__listicle-items {
	padding: 0;
	margin: 0;
	list-style: none;
}
.foundency-mag__listicle-item {
	position: relative;
	margin: 0 0 1.5rem;
	padding-block: 1.5rem;
	padding-inline: 5.5rem 1.75rem;
	border: 1px solid var(--mag-color-border);
	border-radius: var(--mag-radius);
	background: var(--mag-color-bg);
	transition: border-color .2s ease, transform .2s ease, box-shadow .2s ease;
}
.foundency-mag__listicle-item:hover {
	border-color: color-mix(in srgb, var(--mag-color-accent) 35%, var(--mag-color-border));
	box-shadow: 0 6px 18px rgba(0,0,0,.04);
}
.foundency-mag__listicle-item::before {
	counter-increment: fdm-listicle;
	content: counter(fdm-listicle, decimal-leading-zero);
	position: absolute;
	inset-inline-start: 1.25rem;
	top: 1rem;
	font-family: var(--mag-font-heading);
	font-size: 2.6rem;
	font-weight: 800;
	line-height: 1;
	color: transparent;
	-webkit-text-stroke: 1.5px color-mix(in srgb, var(--mag-color-accent) 55%, transparent);
	letter-spacing: -.02em;
	font-variant-numeric: tabular-nums;
}
.foundency-mag__listicle-title {
	margin: 0 0 .5rem;
	font-size: 1.3rem;
	line-height: 1.3;
	font-weight: 700;
	color: var(--mag-color-primary);
}
.foundency-mag__listicle-body {
	color: var(--mag-color-text);
	font-size: 1rem;
	line-height: 1.6;
}
.foundency-mag__listicle-body strong {
	color: var(--mag-color-primary);
	font-weight: 600;
}

/* Unordered variant — small bullet rules, same card */
ul.foundency-mag__listicle-items { counter-reset: none; }
ul.foundency-mag__listicle-items .foundency-mag__listicle-item::before {
	content: "•";
	font-size: 3rem;
	color: color-mix(in srgb, var(--mag-color-accent) 55%, transparent);
	-webkit-text-stroke: 0;
	top: -.25rem;
}

/* ----- Review box: visual stars + 2-column pros/cons ---------------------- */

.foundency-mag__review {
	margin: 2.5rem 0;
	padding: 1.75rem 2rem;
	border: 1px solid var(--mag-color-border);
	border-radius: var(--mag-radius);
	background: linear-gradient(180deg, color-mix(in srgb, var(--mag-color-accent) 4%, var(--mag-color-bg)) 0%, var(--mag-color-bg) 100%);
}
.foundency-mag__review-item {
	margin: 0 0 .25rem;
	font-size: 1.4rem;
	color: var(--mag-color-primary);
}
.foundency-mag__review-rating {
	display: flex;
	align-items: baseline;
	gap: .75rem;
	margin: .5rem 0 1rem;
	font-size: 1rem;
}
.foundency-mag__review-rating-value {
	font-size: 2.4rem;
	font-weight: 800;
	color: var(--mag-color-primary);
	line-height: 1;
	font-variant-numeric: tabular-nums;
}
.foundency-mag__review-rating-best {
	color: var(--mag-color-muted);
	font-weight: 500;
}

/* CSS-only star rendering. Uses --rating-percent set inline by the renderer.
   Works by stacking a gold gradient over a muted-gray base across 5 unicode
   stars — no images, no fonts needed. */
.foundency-mag__review-stars {
	--rating-percent: 100%;
	display: inline-block;
	position: relative;
	font-size: 1.5rem;
	line-height: 1;
	letter-spacing: 2px;
	color: var(--mag-color-border);
}
.foundency-mag__review-stars::before {
	content: "★★★★★";
}
.foundency-mag__review-stars::after {
	content: "★★★★★";
	position: absolute;
	inset-inline-start: 0;
	top: 0;
	width: var(--rating-percent);
	overflow: hidden;
	color: #f59e0b;
	white-space: nowrap;
}

.foundency-mag__review-summary {
	margin-bottom: 1rem;
	color: var(--mag-color-text);
	font-size: 1.05rem;
}
.foundency-mag__review-cols {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 1.5rem;
	margin-top: 1rem;
}
@media (max-width: 580px) {
	.foundency-mag__review-cols { grid-template-columns: 1fr; }
}
.foundency-mag__review-pros,
.foundency-mag__review-cons {
	padding: 1rem 1.25rem;
	border-radius: 8px;
	background: var(--mag-color-bg);
	border: 1px solid var(--mag-color-border);
}
.foundency-mag__review-pros { border-inline-start: 3px solid #16a34a; }
.foundency-mag__review-cons { border-inline-start: 3px solid #b45309; }
.foundency-mag__review-pros h4,
.foundency-mag__review-cons h4 {
	margin: 0 0 .5rem;
	font-size: .78rem;
	text-transform: uppercase;
	letter-spacing: .12em;
}
.foundency-mag__review-pros h4 { color: #16a34a; }
.foundency-mag__review-cons h4 { color: #b45309; }
.foundency-mag__review-pros ul,
.foundency-mag__review-cons ul {
	margin: 0;
	padding-inline-start: 1.25em;
}
.foundency-mag__review-pros li,
.foundency-mag__review-cons li {
	margin-bottom: .35em;
	font-size: .95rem;
	line-height: 1.5;
}

/* ----- FAQ: each Q/A as a bordered card --------------------------------- */

.foundency-mag__faq {
	margin: 2rem 0;
}
.foundency-mag__faq dl {
	display: grid;
	gap: .75rem;
}
.foundency-mag__faq dt {
	margin: 0;
	padding: 1rem 1.25rem 0;
	font-weight: 700;
	font-size: 1.05rem;
	color: var(--mag-color-primary);
	border: 1px solid var(--mag-color-border);
	border-bottom: 0;
	border-radius: var(--mag-radius) var(--mag-radius) 0 0;
	background: var(--mag-color-bg);
}
.foundency-mag__faq dd {
	margin: 0 0 0;
	padding: .5rem 1.25rem 1.1rem;
	color: var(--mag-color-text);
	font-size: 1rem;
	line-height: 1.6;
	border: 1px solid var(--mag-color-border);
	border-top: 0;
	border-radius: 0 0 var(--mag-radius) var(--mag-radius);
	background: var(--mag-color-bg);
}

/* ----- Takeaways: keep position, slightly stronger emphasis -------------- */

.foundency-mag__takeaways {
	margin: 1.5rem 0 2.5rem;
	padding: 1.25rem 1.5rem;
	background: color-mix(in srgb, var(--mag-color-accent) 6%, var(--mag-color-bg));
	border-inline-start: 4px solid var(--mag-color-accent);
	border-radius: var(--mag-radius);
}
.foundency-mag__takeaways-title {
	margin: 0 0 .6rem;
	font-size: .78rem;
	text-transform: uppercase;
	letter-spacing: .12em;
	color: var(--mag-color-accent);
	font-weight: 700;
}
.foundency-mag__takeaways ul {
	margin: 0;
	padding-inline-start: 1.25em;
}
.foundency-mag__takeaways li {
	margin-bottom: .4em;
	font-size: 1rem;
	line-height: 1.55;
	color: var(--mag-color-text);
}
.foundency-mag__takeaways li::marker {
	color: var(--mag-color-accent);
}

/* ==========================================================================
 * READING POLISH — section dividers, lead paragraph, data tables, byline
 * ========================================================================== */

/* H2 inside the content gets a subtle top divider so sections feel separated */
.foundency-mag__content > h2 {
	font-size: 1.85rem;
	margin-top: 3rem;
	padding-top: 2rem;
	border-top: 1px solid var(--mag-color-border);
	line-height: 1.25;
}
.foundency-mag__content > h2:first-child {
	border-top: 0;
	padding-top: 0;
	margin-top: 0;
}
.foundency-mag__content > h3 {
	font-size: 1.25rem;
	margin-top: 2rem;
}

/* Lead paragraph — the first paragraph after the takeaways gets a touch more
   weight. Subtle, not a full drop cap (which doesn't help SEO either way). */
.foundency-mag__content > p:first-of-type {
	font-size: 1.18rem;
	line-height: 1.6;
	color: var(--mag-color-text);
}

/* Data tables — striped rows, header fill, numeric right-alignment */
.foundency-mag__content .wp-block-table,
.foundency-mag__content figure.wp-block-table {
	margin: 1.75rem 0;
	overflow-x: auto;
}
.foundency-mag__content table {
	width: 100%;
	border-collapse: separate;
	border-spacing: 0;
	border: 1px solid var(--mag-color-border);
	border-radius: var(--mag-radius);
	overflow: hidden;
	font-size: .95rem;
}
.foundency-mag__content thead th {
	background: color-mix(in srgb, var(--mag-color-primary) 92%, white);
	color: var(--mag-color-bg);
	text-align: start;
	font-weight: 600;
	padding: .75rem 1rem;
	font-size: .9rem;
	letter-spacing: .02em;
}
.foundency-mag__content tbody td {
	padding: .75rem 1rem;
	border-top: 1px solid var(--mag-color-border);
	vertical-align: top;
}
.foundency-mag__content tbody tr:nth-child(even) td {
	background: color-mix(in srgb, var(--mag-color-primary) 3%, var(--mag-color-bg));
}
.foundency-mag__content tbody tr:hover td {
	background: color-mix(in srgb, var(--mag-color-accent) 6%, var(--mag-color-bg));
}
/* Right-align cells that look numeric — heuristic via :nth-child won't catch
   everything, but covers cost tables (last 3 columns are always prices). */
.foundency-mag__content table.has-numeric-cols td:not(:first-child),
.foundency-mag__content table.has-numeric-cols th:not(:first-child) {
	text-align: end;
	font-variant-numeric: tabular-nums;
}

/* Byline polish — reading-time pill */
.foundency-mag__reading-time {
	display: inline-flex;
	align-items: center;
	gap: .35rem;
	padding: .15rem .55rem;
	border-radius: 999px;
	background: color-mix(in srgb, var(--mag-color-accent) 10%, var(--mag-color-bg));
	color: var(--mag-color-accent);
	font-size: .8rem;
	font-weight: 600;
	letter-spacing: .02em;
}
.foundency-mag__reading-time::before {
	content: "⏱";
	font-size: .85em;
}

@media (max-width: 640px) {
	.foundency-mag__chrome-inner { flex-direction: column; align-items: flex-start; gap: 1rem; }
	.foundency-mag__nav ul { gap: 1rem; }
}

/* ==========================================================================
 * RTL / non-Latin scripts
 *
 * Layout itself needs no mirroring rules: every directional property above is
 * logical (inline-start/end), so it flips automatically from the `dir`
 * attribute the templates set on .foundency-mag.
 *
 * What does NOT flip automatically is Latin typographic convention. Hebrew and
 * Arabic have no letter case, so text-transform is a no-op at best, and added
 * tracking pulls apart letterforms that are meant to sit tight. The small-caps
 * eyebrow treatment used for labels therefore has to be neutralised by hand.
 * We drop only those two properties, keeping size, weight, and colour so the
 * labels still read as labels.
 * ========================================================================== */

[dir="rtl"].foundency-mag .foundency-mag__eyebrow,
[dir="rtl"].foundency-mag .foundency-mag__card-eyebrow,
[dir="rtl"].foundency-mag .foundency-mag__readnext-eyebrow,
[dir="rtl"].foundency-mag .foundency-mag__toc-title,
[dir="rtl"].foundency-mag .foundency-mag__takeaways-title,
[dir="rtl"].foundency-mag .foundency-mag__review-pros h4,
[dir="rtl"].foundency-mag .foundency-mag__review-cons h4,
[dir="rtl"].foundency-mag .foundency-mag__content thead th {
	text-transform: none;
	letter-spacing: normal;
}

/* Hebrew has no ascender/descender rhythm to hang on and reads denser than
   Latin at the same size, so give body copy a little more air. */
[dir="rtl"].foundency-mag .foundency-mag__content {
	line-height: 1.75;
}

/* Keep numerals, latin brand names, and units running LTR inside RTL prose. */
[dir="rtl"].foundency-mag .foundency-mag__byline time,
[dir="rtl"].foundency-mag .foundency-mag__review-rating-value,
[dir="rtl"].foundency-mag .foundency-mag__reading-time {
	direction: ltr;
	unicode-bidi: isolate;
}

/* Counters are digit-only, so Unicode already runs them left-to-right inside RTL
   text; they need isolation from the surrounding run, nothing more.
   Do NOT add `direction: ltr` here. These pseudo-elements are positioned with
   inset-inline-start, which resolves against the element's OWN direction —
   forcing ltr silently pins the listicle numeral to the left edge while the
   card's padding stays reserved on the right. */
[dir="rtl"].foundency-mag .foundency-mag__listicle-item::before,
[dir="rtl"].foundency-mag .foundency-mag__toc-item::before {
	unicode-bidi: isolate;
}
