/**
 * Project updates: the home strip, the tag row and the linked-product block.
 *
 * ⚠ Tokens only — a literal hex here would freeze these surfaces in whichever scheme was active
 * when they were written, which is the classic way a bolted-on dark mode breaks. Fallbacks inside
 * var() are the one permitted place for a hex value.
 *
 * ⚠ Everything is scoped under `.ostz`. This sheet loads on pages the theme does not fully own.
 */

/* --------------------------------------------------------------- home strip */

.ostz .ostz-updates {
	margin-block: var(--ostz-space-8, 32px);
}

.ostz .ostz-update-list {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: var(--ostz-space-4, 16px);
	margin: 0;
	padding: 0;
	list-style: none;
}

.ostz .ostz-update-item {
	margin: 0;
}

/*
 * ⚠ The link gets its own class-based colour. `.ostz a { color: inherit }` in the main sheet
 * scores 0-1-1 and would out-specify a 0-1-0 rule here — the recorded specificity trap.
 */
.ostz .ostz-update-link {
	display: flex;
	flex-direction: column;
	block-size: 100%;
	overflow: hidden;
	border: 1px solid var(--ostz-line, #232733);
	border-radius: var(--ostz-radius, 14px);
	background: var(--ostz-bg-raised, #14161c);
	color: var(--ostz-text, #f2f4f8);
	text-decoration: none;
	transition: border-color .18s ease;
}

.ostz .ostz-update-link:hover,
.ostz .ostz-update-link:focus-visible {
	border-color: var(--ostz-accent, #00e0d5);
}

.ostz .ostz-update-img {
	display: block;
	inline-size: 100%;
	block-size: auto;
	aspect-ratio: 1 / 1;
	object-fit: cover;
}

.ostz .ostz-update-body {
	display: flex;
	flex-direction: column;
	gap: 5px;
	padding: var(--ostz-space-4, 16px);
}

.ostz .ostz-update-chapter {
	font-size: 11px;
	color: var(--ostz-accent, #00e0d5);
}

.ostz .ostz-update-title {
	font-size: 15px;
	font-weight: 700;
	line-height: 1.7;
}

.ostz .ostz-update-date {
	font-size: 12px;
	color: var(--ostz-text-faint, #6f7686);
}

/* --------------------------------------------------------------- tags on a single update */

.ostz .ostz-update-tags {
	display: flex;
	flex-wrap: wrap;
	gap: 7px;
	margin: 0 0 var(--ostz-space-3, 12px);
}

.ostz .ostz-update-tag {
	padding: 3px 11px;
	border: 1px solid var(--ostz-line-strong, #333846);
	border-radius: 16px;
	font-size: 12px;
	text-decoration: none;
	color: var(--ostz-text-dim, #9aa2b1);
}

/* The two layers are visibly different, because they answer different questions. */
.ostz .ostz-update-tag--chapter {
	border-color: var(--ostz-accent, #00e0d5);
	color: var(--ostz-accent, #00e0d5);
}

.ostz .ostz-update-tag--module {
	border-color: var(--ostz-accent-2, #c026ff);
	color: var(--ostz-accent-2, #c026ff);
}

.ostz .ostz-update-tag:hover,
.ostz .ostz-update-tag:focus-visible {
	background: var(--ostz-bg-raised-2, #1b1e27);
}

/* --------------------------------------------------------------- linked product */

.ostz .ostz-update-product {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: var(--ostz-space-3, 12px);
	margin-block-start: var(--ostz-space-6, 24px);
	padding: var(--ostz-space-4, 16px);
	border: 1px solid var(--ostz-line, #232733);
	border-radius: var(--ostz-radius, 14px);
	background: var(--ostz-bg-raised, #14161c);
}

.ostz .ostz-update-product-body {
	display: flex;
	flex-direction: column;
	gap: 3px;
}

.ostz .ostz-update-product-kicker {
	font-size: 11px;
	color: var(--ostz-text-faint, #6f7686);
}

.ostz .ostz-update-product-title {
	font-size: 15px;
	font-weight: 700;
}

/* --------------------------------------------------------------- projects page (layer 0) */

.ostz .ostz-projects-head {
	margin-block-end: var(--ostz-space-6, 24px);
}

.ostz .ostz-proj-section {
	margin-block: var(--ostz-space-8, 32px);
}

.ostz .ostz-proj-note {
	margin: 0 0 var(--ostz-space-4, 16px);
	font-size: 13px;
	color: var(--ostz-text-dim, #9aa2b1);
}

.ostz .ostz-mod-list,
.ostz .ostz-chap-list {
	margin: 0;
	padding: 0;
	list-style: none;
}

.ostz .ostz-mod,
.ostz .ostz-chap {
	margin-block-end: var(--ostz-space-4, 16px);
	padding: var(--ostz-space-4, 16px);
	border: 1px solid var(--ostz-line, #232733);
	border-radius: var(--ostz-radius, 14px);
	background: var(--ostz-bg-raised, #14161c);
}

.ostz .ostz-mod-name,
.ostz .ostz-chap-name {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 9px;
	margin: 0 0 var(--ostz-space-2, 8px);
	font-size: 17px;
	font-weight: 800;
}

/* Latin runs are isolated so a Persian heading beside them does not reorder. */
.ostz .ostz-mod-en,
.ostz .ostz-chap-en {
	font-size: 12px;
	font-weight: 500;
	color: var(--ostz-text-faint, #6f7686);
	unicode-bidi: isolate;
}

.ostz .ostz-chap-n {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	inline-size: 26px;
	block-size: 26px;
	border-radius: 50%;
	background: var(--ostz-bg-sunken, #111318);
	color: var(--ostz-accent, #00e0d5);
	font-size: 13px;
}

.ostz .ostz-mod-text,
.ostz .ostz-chap-text {
	margin: 0 0 var(--ostz-space-3, 12px);
	font-size: 14px;
	line-height: 1.9;
	color: var(--ostz-text-dim, #9aa2b1);
}

.ostz .ostz-mod-bar {
	block-size: 7px;
	overflow: hidden;
	border-radius: 4px;
	background: var(--ostz-bg-sunken, #111318);
}

/* The one runtime-computed inline value the house rules allow: a real measured width. */
.ostz .ostz-mod-fill {
	display: block;
	block-size: 100%;
	background: var(--ostz-gradient, linear-gradient(90deg, #00e0d5, #c026ff));
}

.ostz .ostz-mod-pct {
	margin: 6px 0 0;
	font-size: 12px;
	color: var(--ostz-text-faint, #6f7686);
}

.ostz .ostz-mod-updates,
.ostz .ostz-chap-updates {
	margin: var(--ostz-space-3, 12px) 0 0;
	padding-inline-start: 18px;
	font-size: 13px;
	line-height: 2;
}

.ostz .ostz-mod-updates a,
.ostz .ostz-chap-updates a {
	color: var(--ostz-text-dim, #9aa2b1);
	text-decoration: none;
}

.ostz .ostz-mod-updates a:hover,
.ostz .ostz-chap-updates a:hover,
.ostz .ostz-mod-updates a:focus-visible,
.ostz .ostz-chap-updates a:focus-visible {
	color: var(--ostz-accent, #00e0d5);
}

.ostz .ostz-archive-head {
	margin-block-end: var(--ostz-space-5, 20px);
}

.ostz .ostz-archive-intro {
	margin: 0;
	font-size: 14px;
	line-height: 1.9;
	color: var(--ostz-text-dim, #9aa2b1);
}

@media (max-width: 900px) {
	.ostz .ostz-update-list {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media (max-width: 520px) {
	.ostz .ostz-update-list {
		grid-template-columns: 1fr;
	}
}
