/* ==========================================================================
   Category rooms
   Five entrances, five shelf arrangements. Same paper, ink, rule and signal
   red as the rest of the site; the difference is structure, not colour.
   Loaded only on category archives.
   ========================================================================== */

/* ---------- Leaderboard under the masthead -------------------------------- */
/* The band itself is shared with single posts, so its rules live in
   emyshub.css; only the room-specific styling belongs in this file. */

/* ---------- The entrance ------------------------------------------------- */

.eh-hero {
	border-bottom: 1px solid var(--eh-rule);
}

.eh-hero__inner {
	width: 100%;
	max-width: var(--eh-max);
	margin-inline: auto;
	padding-inline: var(--eh-gutter);
	padding-block: clamp(26px, 3.6vw, 52px) clamp(26px, 3.2vw, 46px);
	display: grid;
	grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr);
	gap: clamp(24px, 3.6vw, 54px);
	align-items: center;
}

.eh-hero__body {
	min-width: 0;
}

.eh-hero__crumb {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
	margin: 0;
	font-family: var(--eh-sans);
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--eh-muted);
}

.eh-hero__crumb a {
	color: inherit;
	text-decoration: none;
	transition: color 0.16s var(--eh-ease);
}

.eh-hero__crumb a:hover {
	color: var(--eh-accent);
}

.eh-hero__sep {
	color: var(--eh-rule-strong);
}

.eh-hero__title {
	margin: 12px 0 0;
	font-family: var(--eh-serif);
	font-size: clamp(38px, 5.4vw, 72px);
	font-weight: 600;
	line-height: 0.96;
	letter-spacing: -0.035em;
	color: var(--eh-ink);
	overflow-wrap: break-word;
}

.eh-hero__dek {
	margin: 14px 0 0;
	max-width: 50ch;
	font-size: clamp(15.5px, 1.05vw, 18px);
	line-height: 1.55;
	color: var(--eh-ink-soft);
}

.eh-hero__meta {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	margin: 16px 0 0;
	font-family: var(--eh-sans);
	font-size: 12.5px;
	letter-spacing: 0.02em;
	color: var(--eh-muted);
}

.eh-hero__meta span + span::before {
	content: "\00b7";
	margin-right: 6px;
	color: var(--eh-rule-strong);
}

.eh-hero__routes {
	display: flex;
	flex-wrap: wrap;
	gap: 10px 24px;
	margin: 22px 0 0;
	padding: 0;
	list-style: none;
}

.eh-hero__routes a {
	display: inline-flex;
	align-items: baseline;
	gap: 8px;
	padding-bottom: 3px;
	border-bottom: 1px solid var(--eh-rule-strong);
	font-family: var(--eh-sans);
	font-size: 13px;
	font-weight: 700;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--eh-ink);
	text-decoration: none;
	transition: color 0.16s var(--eh-ease), border-color 0.16s var(--eh-ease);
}

.eh-hero__routes a:hover {
	color: var(--eh-accent);
	border-bottom-color: var(--eh-accent);
}

.eh-hero__count {
	font-size: 11px;
	font-weight: 600;
	letter-spacing: 0.04em;
	color: var(--eh-muted);
	font-variant-numeric: tabular-nums;
}

.eh-hero__media {
	margin: 0;
	min-width: 0;
}

.eh-hero__img,
.eh-hero__video {
	display: block;
	width: 100%;
	aspect-ratio: 4 / 3;
	object-fit: cover;
	background: var(--eh-tint);
}

.eh-hero__credit {
	margin-top: 8px;
	font-family: var(--eh-sans);
	font-size: 11px;
	letter-spacing: 0.02em;
	color: var(--eh-muted);
	text-align: right;
}

.eh-hero__plate {
	position: relative;
	display: grid;
	place-items: center;
	aspect-ratio: 4 / 3;
	overflow: hidden;
	background: var(--eh-tint);
	border: 1px solid var(--eh-rule);
}

.eh-hero__plate::before {
	content: "";
	position: absolute;
	inset: 12px;
	border: 1px solid var(--eh-rule);
}

.eh-hero__plate span {
	font-family: var(--eh-serif);
	font-size: clamp(72px, 9vw, 128px);
	line-height: 1;
	color: var(--eh-rule-strong);
}

/* ---------- Entrance variants -------------------------------------------- */

/* Migration: a board, underlined by the rule of the road. */
.eh-hero--migration .eh-hero__media {
	border-bottom: 3px solid var(--eh-ink);
}

/* Money: a dark ledger cover. */
.eh-hero--finance {
	background: var(--eh-solid);
	border-bottom: 0;
}

.eh-hero--finance .eh-hero__crumb,
.eh-hero--finance .eh-hero__meta,
.eh-hero--finance .eh-hero__credit {
	color: rgba(255, 255, 255, 0.56);
}

.eh-hero--finance .eh-hero__crumb a:hover {
	color: #fff;
}

.eh-hero--finance .eh-hero__sep,
.eh-hero--finance .eh-hero__meta span + span::before {
	color: rgba(255, 255, 255, 0.3);
}

.eh-hero--finance .eh-hero__title {
	color: #fff;
}

.eh-hero--finance .eh-hero__dek {
	color: rgba(255, 255, 255, 0.74);
}

.eh-hero--finance .eh-hero__routes a {
	color: #fff;
	border-bottom-color: rgba(255, 255, 255, 0.35);
}

.eh-hero--finance .eh-hero__routes a:hover {
	color: #fff;
	border-bottom-color: #fff;
}

.eh-hero--finance .eh-hero__count {
	color: rgba(255, 255, 255, 0.55);
}

.eh-hero--finance .eh-hero__img,
.eh-hero--finance .eh-hero__video {
	aspect-ratio: 5 / 4;
}

.eh-hero--finance .eh-hero__plate {
	background: #1f1f1e;
	border-color: rgba(255, 255, 255, 0.18);
}

.eh-hero--finance .eh-hero__plate::before {
	border-color: rgba(255, 255, 255, 0.1);
}

.eh-hero--finance .eh-hero__plate span {
	color: rgba(255, 255, 255, 0.16);
}

/* Careers: pinned to the board, in a frame. */
.eh-hero--employment .eh-hero__media {
	padding: 10px;
	border: 1px solid var(--eh-rule);
	background: var(--eh-paper);
}

.eh-hero--employment .eh-hero__img,
.eh-hero--employment .eh-hero__video {
	aspect-ratio: 3 / 2;
}

/* Education: the reading room, centred. */
.eh-hero--education .eh-hero__inner {
	grid-template-columns: minmax(0, 1fr);
	justify-items: center;
	text-align: center;
}

.eh-hero--education .eh-hero__body {
	max-width: 760px;
}

.eh-hero--education .eh-hero__title {
	font-size: clamp(40px, 5.8vw, 80px);
}

.eh-hero--education .eh-hero__dek {
	margin-inline: auto;
}

.eh-hero--education .eh-hero__meta,
.eh-hero--education .eh-hero__routes {
	justify-content: center;
}

.eh-hero--education .eh-hero__media {
	width: 100%;
	margin-top: clamp(22px, 3vw, 36px);
}

.eh-hero--education .eh-hero__img,
.eh-hero--education .eh-hero__video,
.eh-hero--education .eh-hero__plate {
	aspect-ratio: 21 / 8;
}

/* Tech: an index card on tinted stock. */
.eh-hero--technology {
	background: var(--eh-tint);
}

.eh-hero--technology .eh-hero__img,
.eh-hero--technology .eh-hero__video,
.eh-hero--technology .eh-hero__plate {
	aspect-ratio: 1 / 1;
}

/* ---------- Shelf chrome ------------------------------------------------- */

.eh-cat {
	min-width: 0;
}

.eh-cat__head {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 16px;
	padding-bottom: 10px;
	border-bottom: 2px solid var(--eh-ink);
}

.eh-cat__head p {
	margin: 0;
}

.eh-cat__label {
	font-family: var(--eh-sans);
	font-size: 12.5px;
	font-weight: 800;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--eh-ink);
}

.eh-cat__note {
	font-family: var(--eh-sans);
	font-size: 12.5px;
	color: var(--eh-muted);
	text-align: right;
}

/* ---------- Rows, shared ------------------------------------------------- */

.eh-cat-list .wp-block-post-template {
	display: block;
	margin: 0;
	padding: 0;
	list-style: none;
}

.eh-cat-list .wp-block-post {
	min-width: 0;
}

.eh-cat-list .wp-block-post-excerpt {
	margin: 0;
}

.eh-cat-list .eh-row__title {
	margin: 0;
	font-family: var(--eh-serif);
	font-size: 21px;
	font-weight: 600;
	line-height: 1.22;
	letter-spacing: -0.012em;
}

.eh-cat-list .eh-row__title a {
	color: var(--eh-ink);
	text-decoration: none;
	transition: color 0.16s var(--eh-ease);
}

.eh-cat-list .wp-block-post:hover .eh-row__title a {
	color: var(--eh-accent);
}

.eh-cat-list .eh-row__kicker {
	margin: 0;
	padding: 0;
	list-style: none;
	font-family: var(--eh-sans);
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.11em;
	text-transform: uppercase;
	line-height: 1.2;
	color: var(--eh-accent);
}

.eh-cat-list .eh-row__kicker a {
	color: inherit;
	text-decoration: none;
}

.eh-cat-list .eh-row__dek {
	margin: 6px 0 0;
	font-size: var(--eh-fs-dek);
	line-height: 1.55;
	color: var(--eh-muted);
}

.eh-cat-list .eh-row__dek .wp-block-post-excerpt__excerpt {
	margin: 0;
}

.eh-cat-list .eh-row__date {
	margin: 8px 0 0;
	font-family: var(--eh-sans);
	font-size: var(--eh-fs-date);
	line-height: 1.4;
	color: var(--eh-muted);
	white-space: nowrap;
}

.eh-cat-list .eh-row__date time {
	color: inherit;
}

/* ---------- Migration: departures ---------------------------------------- */

.eh-cat-list--departures {
	counter-reset: departure;
}

.eh-cat-list--departures .wp-block-post {
	counter-increment: departure;
	border-bottom: 1px solid var(--eh-rule);
}

.eh-cat-list--departures .eh-row {
	display: grid;
	grid-template-columns: 52px minmax(0, 1fr) 112px;
	column-gap: 18px;
	align-items: start;
	padding-block: 20px;
}

.eh-cat-list--departures .eh-row::before {
	content: counter(departure, decimal-leading-zero);
	grid-column: 1;
	grid-row: 1 / span 3;
	padding-top: 3px;
	font-family: var(--eh-sans);
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.08em;
	color: var(--eh-rule-strong);
	font-variant-numeric: tabular-nums;
}

.eh-cat-list--departures .eh-row__kicker {
	grid-column: 2;
	grid-row: 1;
}

.eh-cat-list--departures .eh-row__title {
	grid-column: 2;
	grid-row: 2;
	margin-top: 6px;
}

.eh-cat-list--departures .eh-row__dek {
	grid-column: 2;
	grid-row: 3;
}

.eh-cat-list--departures .eh-row__date {
	grid-column: 3;
	grid-row: 1 / span 2;
	margin-top: 4px;
	justify-self: end;
}

.eh-cat-list--departures .wp-block-post:first-child {
	border-bottom: 1px solid var(--eh-ink);
}

.eh-cat-list--departures .wp-block-post:first-child .eh-row {
	grid-template-columns: 52px minmax(0, 1fr);
	padding-block: 0 28px;
}

.eh-cat-list--departures .wp-block-post:first-child .eh-row__title {
	margin-top: 8px;
	font-size: clamp(27px, 3.2vw, 40px);
	line-height: 1.04;
	letter-spacing: -0.028em;
}

.eh-cat-list--departures .wp-block-post:first-child .eh-row__dek {
	font-size: 16px;
}

.eh-cat-list--departures .wp-block-post:first-child .eh-row__dek .wp-block-post-excerpt__excerpt {
	-webkit-line-clamp: 3;
}

.eh-cat-list--departures .wp-block-post:first-child .eh-row__date {
	grid-column: 2;
	grid-row: 4;
	justify-self: start;
	margin-top: 10px;
}

/* ---------- Money: the ledger -------------------------------------------- */

.eh-ledger__head {
	display: grid;
	grid-template-columns: 44px minmax(0, 1fr) 110px;
	column-gap: 18px;
	padding: 16px 0 8px;
	border-bottom: 1px solid var(--eh-ink);
	font-family: var(--eh-sans);
	font-size: 10.5px;
	font-weight: 800;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--eh-muted);
}

.eh-ledger__head span:last-child {
	text-align: right;
}

.eh-cat-list--ledger {
	counter-reset: ledger;
}

.eh-cat-list--ledger .wp-block-post {
	counter-increment: ledger;
	border-bottom: 1px solid var(--eh-rule);
}

.eh-cat-list--ledger .eh-row {
	display: grid;
	grid-template-columns: 44px minmax(0, 1fr) 110px;
	column-gap: 18px;
	align-items: start;
	padding-block: 18px;
}

.eh-cat-list--ledger .eh-row::before {
	content: counter(ledger, decimal-leading-zero);
	grid-column: 1;
	grid-row: 1 / span 3;
	padding-top: 4px;
	font-family: var(--eh-sans);
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.08em;
	color: var(--eh-muted);
	font-variant-numeric: tabular-nums;
}

.eh-cat-list--ledger .eh-row__title {
	grid-column: 2;
	grid-row: 1;
	font-size: clamp(19px, 0.9vw + 15px, 24px);
	line-height: 1.2;
}

.eh-cat-list--ledger .eh-row__dek {
	grid-column: 2;
	grid-row: 2;
	margin-top: 7px;
}

.eh-cat-list--ledger .eh-row__kicker {
	grid-column: 2;
	grid-row: 3;
	margin-top: 9px;
}

.eh-cat-list--ledger .eh-row__date {
	grid-column: 3;
	grid-row: 1;
	margin-top: 3px;
	justify-self: end;
	font-variant-numeric: tabular-nums;
}

/* ---------- Careers: the board ------------------------------------------- */

.eh-cat-list--roster .wp-block-post-template {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 30px 36px;
	padding-top: 26px;
}

.eh-cat-list--roster .wp-block-post {
	padding-left: 18px;
	border-left: 3px solid var(--eh-ink);
	transition: border-color 0.16s var(--eh-ease);
}

.eh-cat-list--roster .wp-block-post:hover {
	border-left-color: var(--eh-accent);
}

.eh-cat-list--roster .wp-block-post:first-child {
	grid-column: 1 / -1;
	padding: 22px 0 0;
	border-left: 0;
	border-top: 3px solid var(--eh-accent);
}

.eh-cat-list--roster .wp-block-post:first-child .eh-row__title {
	font-size: clamp(24px, 2.6vw, 34px);
	line-height: 1.08;
	letter-spacing: -0.022em;
	max-width: 26ch;
}

.eh-cat-list--roster .wp-block-post:first-child .eh-row__dek {
	max-width: 62ch;
}

/* ---------- Education: mosaic -------------------------------------------- */

.eh-cat-list--mosaic .wp-block-post-template {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 34px 34px;
	padding-top: 26px;
}

.eh-cat-list--mosaic .wp-block-post:first-child {
	grid-column: span 2;
	padding: 26px 28px 28px;
	background: var(--eh-tint);
	border-top: 2px solid var(--eh-ink);
}

.eh-cat-list--mosaic .wp-block-post:first-child .eh-row__title {
	font-size: clamp(26px, 2.6vw, 36px);
	line-height: 1.06;
	letter-spacing: -0.024em;
	max-width: 24ch;
}



/* ---------- Tech: the index ---------------------------------------------- */

.eh-cat-list--index {
	counter-reset: idx;
}

.eh-cat-list--index .wp-block-post-template {
	display: block;
}

.eh-cat-list--index .wp-block-post {
	counter-increment: idx;
	border-bottom: 1px solid var(--eh-rule);
}

.eh-cat-list--index .eh-row {
	display: grid;
	grid-template-columns: 40px minmax(0, 1fr) auto;
	column-gap: 16px;
	align-items: baseline;
	padding-block: 15px;
}

.eh-cat-list--index .eh-row::before {
	content: counter(idx, decimal-leading-zero);
	grid-column: 1;
	grid-row: 1 / span 2;
	font-family: var(--eh-sans);
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.08em;
	color: var(--eh-rule-strong);
	font-variant-numeric: tabular-nums;
}

.eh-cat-list--index .eh-row__title {
	grid-column: 2;
	grid-row: 1;
	font-family: var(--eh-sans);
	font-size: 17.5px;
	font-weight: 600;
	line-height: 1.3;
	letter-spacing: 0;
}

.eh-cat-list--index .eh-row__kicker {
	grid-column: 2;
	grid-row: 2;
	margin-top: 5px;
	font-size: 10.5px;
}

.eh-cat-list--index .eh-row__date {
	grid-column: 3;
	grid-row: 1;
	margin-top: 0;
	font-variant-numeric: tabular-nums;
	justify-self: end;
}

.eh-cat-list--index .wp-block-post:hover .eh-row__title a {
	color: var(--eh-accent);
}
/* ---------- Responsive --------------------------------------------------- */

@media (max-width: 900px) {
	.eh-hero__inner {
		grid-template-columns: minmax(0, 1fr);
		gap: 22px;
	}

	.eh-hero__title {
		font-size: clamp(34px, 8vw, 48px);
	}

	.eh-hero__img,
	.eh-hero__video,
	.eh-hero__plate,
	.eh-hero--education .eh-hero__img,
	.eh-hero--education .eh-hero__video,
	.eh-hero--education .eh-hero__plate,
	.eh-hero--technology .eh-hero__img,
	.eh-hero--technology .eh-hero__video,
	.eh-hero--technology .eh-hero__plate {
		aspect-ratio: 16 / 9;
	}

	.eh-hero--employment .eh-hero__img,
	.eh-hero--employment .eh-hero__video {
		aspect-ratio: 16 / 9;
	}

	/* The placeholder is a plate, not a poster: keep the wait short. */
	.eh-hero__plate {
		max-height: 260px;
	}

	.eh-cat-list--mosaic .wp-block-post-template {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 28px 28px;
	}

	.eh-cat-list--mosaic .wp-block-post:first-child {
		grid-column: 1 / -1;
	}
}

@media (max-width: 700px) {
	.eh-cat__head {
		flex-direction: column;
		align-items: flex-start;
		gap: 4px;
	}

	.eh-cat__note {
		text-align: left;
	}

	.eh-cat-list--departures .eh-row {
		grid-template-columns: 34px minmax(0, 1fr);
		column-gap: 12px;
	}

	.eh-cat-list--departures .eh-row__date {
		grid-column: 2;
		grid-row: 4;
		justify-self: start;
		margin-top: 8px;
	}

	.eh-cat-list--departures .eh-row::before {
		font-size: 11px;
	}

	.eh-cat-list--ledger .eh-row,
	.eh-ledger__head {
		grid-template-columns: 34px minmax(0, 1fr);
		column-gap: 12px;
	}

	.eh-cat-list--ledger .eh-row__date {
		grid-column: 2;
		grid-row: 4;
		justify-self: start;
		margin-top: 8px;
	}

	.eh-ledger__head span:last-child {
		display: none;
	}

	.eh-cat-list--roster .wp-block-post-template,
	.eh-cat-list--index .wp-block-post-template,
	.eh-cat-list--mosaic .wp-block-post-template {
		grid-template-columns: minmax(0, 1fr);
	}

	.eh-cat-list--mosaic .wp-block-post:first-child {
		padding: 22px 20px 24px;
	}

	.eh-cat-list--roster .wp-block-post:first-child .eh-row__title {
		font-size: clamp(22px, 6vw, 28px);
	}
}
