/**
 * 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 ARCHIVE variant. The home strip shows three of the newest updates and is a taster; the
 * archive is the whole list, so it goes four across on a wide screen and drops the strip's top
 * margin, which exists to separate it from the section above it on the front page.
 *
 * ⚠ The class was in the markup with no rule at all, so the archive rendered as the three-column
 * taster — the one page whose job is «show me all of them» was the narrowest listing on the site.
 */
.ostz .ostz-update-list--archive {
	grid-template-columns: repeat(4, 1fr);
	margin-block-start: var(--ostz-space-6);
}

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

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

/*
 * ⚠ 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: var(--ostz-text-xs);
	color: var(--ostz-accent, #00e0d5);
}

.ostz .ostz-update-title {
	font-size: var(--ostz-text-md);
	font-weight: var(--ostz-weight-bold);
	line-height: var(--ostz-leading-snug);
}

.ostz .ostz-update-date {
	font-size: var(--ostz-text-xs);
	color: var(--ostz-text-faint, #828a9c);
}

/* --------------------------------------------------------------- tags on a single update
 * ⚠ Moved to modules/ostadeez-m-tag.css on 2026-09-03. They were the site's THIRD pill shape —
 * radius 16px against the chip's 22px and the tag row's pill, gap 7px against everyone else's
 * token, and a hardcoded `#9aa2b1` fallback that belongs to no palette. Nothing was wrong with any
 * one of them; the problem was that three files each answered «what does a pill look like here».
 * The `.ostz .ostz-update-tag` spelling also had to go: at 0-2-0 it out-specified the component's
 * own 0-1-0 rules, so deleting it is what lets the module actually apply.
 * Nothing about a tag may be declared here again.
 */

/* --------------------------------------------------------------- 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: var(--ostz-text-xs);
	color: var(--ostz-text-faint, #828a9c);
}

.ostz .ostz-update-product-title {
	font-size: var(--ostz-text-md);
	font-weight: var(--ostz-weight-bold);
}

/* --------------------------------------------------------------- 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: var(--ostz-text-sm);
	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: var(--ostz-text-lg);
	font-weight: var(--ostz-weight-bold);
}

/* Latin runs are isolated so a Persian heading beside them does not reorder. */
.ostz .ostz-mod-en,
.ostz .ostz-chap-en {
	font-size: var(--ostz-text-xs);
	font-weight: var(--ostz-weight-medium);
	color: var(--ostz-text-faint, #828a9c);
	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: var(--ostz-text-sm);
}

.ostz .ostz-mod-text,
.ostz .ostz-chap-text {
	margin: 0 0 var(--ostz-space-3, 12px);
	font-size: var(--ostz-text-base);
	line-height: var(--ostz-leading-body);
	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-accent, #00e0d5);
}

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

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

/* Measured 20px tall on the projects page — the whole update list was under the tap floor, and
   that list is the only navigation the page has. */
.ostz .ostz-mod-updates a,
.ostz .ostz-chap-updates a {
	display: inline-flex;
	align-items: center;
	min-block-size: 24px;
	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: var(--ostz-text-base);
	line-height: var(--ostz-leading-body);
	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;
	}
}
