/* ==========================================================================
   The Journal — the section table (reference 5B)
   Serves category, tag, search, the archive index and 404.
   ========================================================================== */

/* --------------------------------------------------------------------------
   The header above the grid
   -------------------------------------------------------------------------- */

.journal-head {
	padding-top: 32px;
}

.table-head {
	display: flex;
	align-items: flex-end;
	justify-content: space-between;
	gap: 30px;
	padding: 22px 0 26px;
}

.table-head__text {
	display: flex;
	flex-direction: column;
	gap: 9px;
	max-width: 66ch;
}

.table-head__desc {
	font-size: 17px;
	line-height: 1.65;
	color: var(--ink-soft);
}

.table-head__path {
	font-family: var(--font-courier);
	font-size: 12px;
	letter-spacing: 0.06em;
	color: var(--ink-soft);
	overflow-wrap: anywhere;
}

/* --------------------------------------------------------------------------
   The table frame
   -------------------------------------------------------------------------- */

.section-table {
	border: 2px solid var(--ink);
	background: var(--card);
}

.section-table__band {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 20px;
	flex-wrap: wrap;
	background: var(--band);
	padding: 11px 18px;
	font-family: var(--font-courier);
	font-size: 11px;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	font-weight: 700;
}

.section-table__band--head {
	border-bottom: 2px solid var(--ink);
}

.section-table__band--foot {
	border-top: 2px solid var(--ink);
}

.section-table__band-left {
	color: var(--ink);
}

.section-table__band--foot .section-table__band-left {
	color: var(--ink-soft);
}

.section-table__showing {
	color: var(--stamp);
}

.section-table__pager {
	display: flex;
	gap: 18px;
}

.section-table__pager a {
	color: var(--magenta);
}

/* --------------------------------------------------------------------------
   Rows
   -------------------------------------------------------------------------- */

.section-table__rows {
	list-style: none;
	margin: 0;
	padding: 0;
}

.result-row {
	display: grid;
	grid-template-columns: 56px minmax(0, 1fr) 96px;
	align-items: start;
	row-gap: 5px;
	padding: 16px 18px;
	border-bottom: 1px solid var(--rule);
}

.result-row:last-child {
	border-bottom: 0;
}

.result-row__key {
	grid-area: 1 / 1 / span 2 / 2;
	padding-top: 3px;
}

.result-row__title {
	grid-area: 1 / 2 / 2 / 3;
	padding-right: 20px;
	min-width: 0;
	font-size: 20px;
	font-weight: 700;
	line-height: 1.3;
}

.result-row__summary {
	grid-area: 2 / 2 / 3 / 3;
	padding-right: 20px;
	min-width: 0;
}

.result-row__title a {
	color: var(--ink);
}

.result-row__title a:hover,
.result-row__title a:focus-visible {
	color: var(--ink);
	text-underline-offset: 3px;
}

.result-row__meta {
	grid-area: 1 / 3 / span 2 / 4;
	font-family: var(--font-courier);
	font-size: 11px;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--ink-soft);
	text-align: right;
	padding-top: 5px;
}

.section-table__empty {
	padding: 20px 18px;
	font-family: var(--font-courier);
	font-size: 13px;
	line-height: 1.8;
	color: var(--ink-soft);
}

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */

@media (max-width: 1080px) {
	/* Two lines: key and title, then summary and read time. */
	.result-row {
		grid-template-columns: 44px minmax(0, 1fr) 76px;
		row-gap: 6px;
	}

	.result-row__key {
		grid-area: 1 / 1 / 2 / 2;
	}

	.result-row__title {
		grid-area: 1 / 2 / 2 / 4;
		padding-right: 0;
	}

	.result-row__summary {
		grid-area: 2 / 2 / 3 / 3;
		padding-right: 16px;
	}

	.result-row__meta {
		grid-area: 2 / 3 / 3 / 4;
		padding-top: 1px;
	}
}

@media (max-width: 640px) {
	.journal-head {
		padding-top: 22px;
	}

	.table-head {
		flex-direction: column;
		align-items: flex-start;
		gap: 18px;
		padding: 18px 0 22px;
	}

	/* Below 640 a read-time column would leave the summary four words wide,
	   so it drops to a line of its own and the summary keeps its measure. */
	.result-row {
		grid-template-columns: 30px minmax(0, 1fr);
		padding: 14px;
	}

	.result-row__title {
		grid-area: 1 / 2 / 2 / 3;
	}

	.result-row__summary {
		grid-area: 2 / 2 / 3 / 3;
		padding-right: 0;
	}

	.result-row__meta {
		grid-area: 3 / 2 / 4 / 3;
		text-align: left;
		padding-top: 0;
	}

	.result-row__title {
		font-size: 18px;
	}

	.section-table__band {
		font-size: 10px;
		letter-spacing: 0.1em;
	}
}
