/**
 * Reading views: article, archive, rail.
 */

.layout--reading {
	display: grid;
	grid-template-columns: minmax(0, 1fr) var(--rail-w);
	gap: 70px;
	align-items: start;
	padding-top: 26px;
}

.back-link {
	display: inline-block;
	margin-bottom: 18px;
	color: var(--c-accent);
	font-size: var(--t-body);
	text-decoration: underline;
}

/* Article card */

.article {
	padding: var(--s-xl) var(--s-xl) var(--s-lg);
	background: var(--c-surface);
	border-radius: var(--r-md);
}

.article__title {
	font-size: var(--t-title);
	font-weight: 600;
	line-height: 1.2;
	letter-spacing: -0.01em;
}

.article__meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
	margin-top: 14px;
	color: var(--c-muted);
	font-family: var(--f-ui);
	font-size: var(--t-meta);
	letter-spacing: 0.04em;
	text-transform: uppercase;
}

.article__meta .meta__date {
	display: inline;
	font-size: inherit;
}

.article__meta a:hover,
.article__meta a:focus {
	color: var(--c-accent);
}

.article__media {
	margin-top: var(--s-md);
	overflow: hidden;
	border-radius: var(--r-sm);
}

.article__media img {
	width: 100%;
	height: auto;
}

.article__caption {
	margin-top: 8px;
	color: var(--c-muted);
	font-size: var(--t-small);
}

.article__body {
	margin-top: 26px;
	color: var(--c-muted);
	font-size: var(--t-body);
	line-height: 1.375;
}

.article__body > * + * {
	margin-top: 22px;
}

.article__body h2,
.article__body h3,
.article__body h4 {
	color: var(--c-ink);
	line-height: 1.2;
}

.article__body h2 {
	font-size: var(--t-card);
	font-weight: 600;
}

.article__body h3 {
	font-size: var(--t-lede);
	font-weight: 600;
}

.article__body a {
	color: var(--c-accent);
	text-decoration: underline;
}

.article__body strong {
	color: var(--c-ink);
}

.article__body ul,
.article__body ol {
	padding-left: 22px;
	list-style: disc;
}

.article__body ol {
	list-style: decimal;
}

.article__body li + li {
	margin-top: 8px;
}

.article__body blockquote {
	padding-left: 18px;
	border-left: 3px solid var(--c-accent);
	color: var(--c-ink);
	font-size: var(--t-lede);
	line-height: 1.35;
}

.article__body img,
.article__body figure {
	max-width: 100%;
	height: auto;
}

.article__body figcaption {
	margin-top: 8px;
	color: var(--c-muted-soft);
	font-size: var(--t-small);
}

.article__body iframe {
	width: 100%;
	aspect-ratio: 16 / 9;
	height: auto;
}

.article__foot {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 20px;
	margin-top: 34px;
	padding-top: 22px;
	border-top: 1px solid var(--c-line-soft);
}

/* Byline */

.byline {
	display: flex;
	align-items: center;
	gap: 12px;
}

.byline__portrait {
	flex: none;
	display: block;
	width: 40px;
	height: 40px;
	overflow: hidden;
	border-radius: 50%;
}

.byline__portrait img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.byline__initials {
	display: grid;
	place-items: center;
	width: 100%;
	height: 100%;
	background: var(--c-ink);
	color: var(--c-surface);
	font-family: var(--f-ui);
	font-size: var(--t-tiny);
	font-weight: 600;
	letter-spacing: 0.02em;
}

.byline__name {
	display: block;
	font-size: var(--t-lede);
	line-height: 1.1;
}

.byline__name:hover,
.byline__name:focus {
	color: var(--c-accent);
}

.byline__role {
	display: block;
	margin-top: 2px;
	color: var(--c-muted-soft);
	font-family: var(--f-ui);
	font-size: var(--t-meta);
}

/* Share row */

.share {
	display: flex;
	align-items: center;
	gap: 22px;
	margin-left: auto;
}

.share__links {
	display: flex;
	align-items: center;
	gap: 14px;
}

.share__label {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	font-size: var(--t-body);
}

.share__link {
	display: grid;
	place-items: center;
	width: 30px;
	height: 30px;
	color: var(--c-ink);
	transition: color 0.15s ease;
}

.share__link:hover,
.share__link:focus {
	color: var(--c-accent);
}

/* Related feed */

.feed--related {
	margin-top: var(--s-md);
	padding: var(--s-xl);
	background: var(--c-surface);
	border-radius: var(--r-md);
}

.feed--related .section-head {
	margin: 0 0 var(--s-lg);
}

.feed--related .card--list:last-child {
	border-bottom: 0;
	padding-bottom: 0;
}

/* Archive heads */

.archive__head {
	margin-bottom: 26px;
}

.archive__title {
	font-size: var(--t-title);
	font-weight: 300;
	line-height: 1.1;
	text-transform: uppercase;
}

.archive__intro {
	margin-top: 12px;
	max-width: 60ch;
	color: var(--c-muted);
}

.trip-grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: var(--s-xl) var(--s-lg);
	padding: var(--s-xl);
	background: var(--c-surface);
	border-radius: var(--r-md);
}

/* Rail */

.rail {
	display: grid;
	gap: 34px;
	align-content: start;
}

.rail__title {
	margin-bottom: 18px;
	font-size: var(--t-lead);
	font-weight: 300;
	line-height: 1.1;
	letter-spacing: 0.01em;
	text-transform: uppercase;
}

.rail__list {
	display: grid;
	gap: 18px;
}

.rail .card--rail {
	grid-template-columns: 62px 1fr;
	gap: 12px;
}

.rail .card--rail .card__title {
	font-size: var(--t-rail);
	line-height: 1.33;
}

.rail__widget + .rail__widget {
	margin-top: 28px;
}

/* Empty state */

.panel--empty {
	padding: var(--s-2xl) var(--s-xl);
	background: var(--c-surface);
	border-radius: var(--r-md);
}

.panel--empty .panel__title {
	margin-bottom: 12px;
	font-size: var(--t-lead);
	font-weight: 300;
	text-transform: uppercase;
}

@media (max-width: 1024px) {
	.layout--reading {
		grid-template-columns: minmax(0, 1fr);
		gap: 40px;
	}

	.rail {
		grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
	}

	.trip-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (max-width: 860px) {
	.article,
	.feed--related {
		padding-inline: 20px;
	}

	.article {
		padding-block: 24px;
	}

	.feed--related {
		padding-bottom: 24px;
	}

	.article__title {
		font-size: 1.75rem;
	}

	.archive__title {
		font-size: 1.75rem;
	}

	.article__foot {
		flex-direction: column;
		align-items: flex-start;
	}

	.share {
		margin-left: 0;
		flex-wrap: wrap;
	}

	.trip-grid {
		grid-template-columns: minmax(0, 1fr);
		padding: 20px;
	}
}
