/*
 * Arabic / right-to-left.
 *
 * WordPress loads this automatically when the active language is RTL.
 * Two jobs: mirror the layout, and swap the Latin display face for an Arabic
 * one — Bodoni Moda has no Arabic glyphs, so without this every heading would
 * silently fall back to a default sans and the design would flatten.
 */

body,
.prose,
.lede,
.hero-sub,
.tl-body p,
.cap p,
.project p,
.post-row p,
.chips li,
.detail-list dd,
td {
	font-family: "IBM Plex Sans Arabic", "IBM Plex Sans", system-ui, sans-serif;
	font-weight: 400;
}

/* Display face: Amiri, a classical naskh with the contrast Bodoni carries in English. */
.brand,
.hero h1,
h2.section-title,
.entry-title,
.post-row h3,
.monogram {
	font-family: "Amiri", "IBM Plex Sans Arabic", Georgia, serif;
}

/* Amiri sits differently on the line than Bodoni — give headings room. */
.hero h1 {
	line-height: 1.15;
	letter-spacing: 0;
}
h2.section-title {
	line-height: 1.35;
	letter-spacing: 0;
}
.entry-title,
.post-row h3 {
	line-height: 1.5;
}

/* Latin faces stay on anything that is a code, a figure or a label. */
.eyebrow,
.roles li,
.fact .n,
.fact .k,
.tl-when,
.dl-row .yr,
.project .tag,
.project .meta,
.post-row .date,
th,
td.val,
label,
.btn,
input[type="submit"],
button[type="submit"],
.foot-inner,
.pagination,
.lang-switch {
	font-family: "IBM Plex Mono", ui-monospace, monospace;
}

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

.fact {
	border-left: 0;
	border-right: 1px solid var(--line-soft);
	padding-left: 0;
	padding-right: 1.2rem;
}
.fact:first-child {
	border-right: 0;
	padding-right: 0;
}

.cap {
	padding-right: 0;
	padding-left: 1.5rem;
}

.tl-item {
	grid-template-columns: minmax(0, 1fr) 170px;
}
.tl-item .tl-when {
	order: 2;
}
.tl-item .tl-body {
	order: 1;
}
.tl-body ul {
	padding-left: 0;
	padding-right: 1.05rem;
}

.dl-row {
	grid-template-columns: minmax(0, 1fr) 110px;
}
.dl-row .yr {
	order: 2;
	text-align: left;
}
.dl-row .what {
	order: 1;
}

.post-row {
	grid-template-columns: minmax(0, 1fr) 120px;
}

th,
td {
	text-align: right;
	padding: .95rem 0 .95rem 1rem;
}
th.val,
td.val {
	text-align: left;
	padding-left: 0;
}

.prose ul,
.prose ol {
	padding-left: 0;
	padding-right: 1.15rem;
}
.prose blockquote {
	border-left: 0;
	border-right: 2px solid var(--brass-dim);
	padding-left: 0;
	padding-right: 1.2rem;
}

/* Figures and money stay left-to-right inside right-to-left text. */
.fact .n,
td.val,
.tl-when,
.dl-row .yr,
.post-row .date,
.entry-header .eyebrow {
	direction: ltr;
	unicode-bidi: isolate;
	display: inline-block;
}
.fact .n small {
	margin-left: 0;
	margin-right: .15em;
}

@media (max-width: 760px) {
	.tl-item,
	.dl-row,
	.post-row {
		grid-template-columns: 1fr;
	}
	.tl-item .tl-when,
	.dl-row .yr {
		order: 0;
	}
	.tl-item .tl-body,
	.dl-row .what {
		order: 1;
	}
	.fact {
		border-right: 0;
		padding-right: 0;
	}
}
