/* Blog: reading pages on the same ember-on-black canvas as the landing page.
   Tokens, fonts, buttons, header and footer come from styles.css. */

.blog {
	--body: #d8ccbf;
	--glass: linear-gradient(180deg, rgba(66, 66, 72, 0.42), rgba(28, 28, 32, 0.58));
	--glass-ring: inset 0 0 0 1px rgba(255, 255, 255, 0.09), inset 0 1px 0 rgba(255, 255, 255, 0.16), inset 0 -1px 0 rgba(0, 0, 0, 0.25);
	--glass-shadow: 0 1px 1px rgba(0, 0, 0, 0.3), 0 22px 50px -10px rgba(0, 0, 0, 0.5);
	--measure: 720px;
	position: relative;
	isolation: isolate;
}

/* One pool of ember light behind the title, the same hue as the hero plate */
.blog::before {
	content: "";
	position: absolute;
	z-index: -1;
	top: -120px;
	right: 0;
	width: min(900px, 100%);
	height: 640px;
	background: radial-gradient(closest-side, rgba(184, 64, 31, 0.3), rgba(184, 64, 31, 0));
	pointer-events: none;
}

.blog .top {
	position: relative;
}

.top-link[aria-current="page"] {
	color: var(--text);
}

.blog main {
	padding: clamp(24px, 5vw, 56px) var(--gutter) clamp(64px, 9vw, 120px);
}

.post,
.hub {
	max-width: var(--measure);
	margin: 0 auto;
}

.hub {
	max-width: 880px;
}

/* Title block */

.crumbs {
	margin: 0 0 22px;
	font: 500 12px/1 var(--mono);
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--dim);
}

.crumbs a {
	color: var(--muted);
	text-decoration: none;
}

.crumbs a:hover {
	color: var(--text);
}

.post-title {
	margin: 0 0 20px;
	font-family: var(--display);
	font-weight: 600;
	font-size: clamp(34px, 5.2vw, 60px);
	line-height: 1;
	letter-spacing: -0.022em;
	text-wrap: balance;
	color: var(--text);
}

.post-title em {
	font-style: normal;
	color: var(--rec);
}

.dek {
	margin: 0 0 22px;
	font-size: clamp(17px, 1.6vw, 19px);
	line-height: 1.5;
	color: var(--muted);
}

.byline {
	display: flex;
	flex-wrap: wrap;
	gap: 6px 18px;
	margin: 0 0 36px;
	padding: 0;
	list-style: none;
	font: 400 13px/1.4 var(--mono);
	color: var(--dim);
}

.byline b {
	font-weight: 500;
	color: var(--muted);
}

/* The short answer: the one glass object on the page */

.tldr {
	position: relative;
	margin: 0 0 48px;
	padding: 22px 24px 20px;
	border-radius: 18px;
	background: var(--glass);
	box-shadow: var(--glass-ring), var(--glass-shadow);
	-webkit-backdrop-filter: blur(20px) saturate(1.4);
	backdrop-filter: blur(20px) saturate(1.4);
}

.tldr::before {
	content: "";
	position: absolute;
	left: 0;
	top: 22px;
	bottom: 22px;
	width: 3px;
	border-radius: 0 3px 3px 0;
	background: var(--rec);
}

.tldr-label {
	margin: 0 0 10px;
	font: 500 11px/1 var(--mono);
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--amber);
}

.post .tldr p {
	margin: 0 0 10px;
	font-size: 17px;
	line-height: 1.55;
	color: var(--text);
}

.tldr ul {
	margin: 0;
	padding: 0 0 0 18px;
	color: var(--text);
}

.tldr li {
	margin: 0 0 6px;
	line-height: 1.5;
}

/* Running text */

.post h2 {
	margin: 56px 0 16px;
	font-family: var(--display);
	font-weight: 600;
	font-size: clamp(26px, 3vw, 34px);
	line-height: 1.08;
	letter-spacing: -0.015em;
	text-wrap: balance;
	color: var(--text);
	scroll-margin-top: 24px;
}

.post h3 {
	margin: 32px 0 10px;
	font-family: var(--display);
	font-weight: 600;
	font-size: 20px;
	line-height: 1.2;
	color: var(--text);
}

.post p,
.post li {
	font-size: 16.5px;
	line-height: 1.68;
	color: var(--body);
}

.post p {
	margin: 0 0 16px;
}

.post ul,
.post ol {
	margin: 0 0 18px;
	padding-left: 22px;
}

.post li {
	margin: 0 0 8px;
}

.post strong {
	font-weight: 600;
	color: var(--text);
}

.post a,
.hub a.inline {
	color: var(--text);
	text-decoration: underline;
	text-decoration-color: rgba(232, 87, 79, 0.55);
	text-decoration-thickness: 1px;
	text-underline-offset: 3px;
	transition: text-decoration-color var(--fast) ease;
}

.post a:hover {
	text-decoration-color: var(--rec);
}

.post code {
	font: 400 0.9em/1 var(--mono);
	padding: 2px 5px;
	border-radius: 5px;
	background: var(--raised);
	color: var(--text);
}

.checked {
	font: 400 12px/1 var(--mono);
	color: var(--dim);
	white-space: nowrap;
}

/* Comparison tables */

.table-wrap {
	margin: 8px 0 12px;
	overflow-x: auto;
	border: 1px solid var(--line);
	border-radius: 14px;
	background: rgba(19, 15, 13, 0.7);
	-webkit-overflow-scrolling: touch;
}

.table-wrap:focus-visible {
	outline-offset: 4px;
}

.compare {
	width: 100%;
	min-width: 640px;
	border-collapse: collapse;
	font-size: 14px;
	line-height: 1.45;
}

.compare caption {
	padding: 14px 16px 0;
	text-align: left;
	font: 500 11px/1.4 var(--mono);
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--dim);
}

.compare th,
.compare td {
	padding: 12px 16px;
	text-align: left;
	vertical-align: top;
	border-bottom: 1px solid var(--line);
}

.compare tr:last-child > * {
	border-bottom: 0;
}

.compare thead th {
	font: 500 12px/1.3 var(--mono);
	letter-spacing: 0.04em;
	color: var(--muted);
	white-space: nowrap;
}

.compare tbody th {
	font-weight: 500;
	color: var(--text);
	min-width: 132px;
}

.compare td {
	color: var(--body);
}

.compare .us {
	background: rgba(184, 64, 31, 0.1);
	color: var(--text);
}

.compare thead .us {
	color: var(--text);
}

.table-note {
	margin: 0 0 24px !important;
	font-size: 13px !important;
	line-height: 1.5 !important;
	color: var(--dim) !important;
}

/* Who should pick what */

.picks {
	display: grid;
	gap: 10px;
	margin: 8px 0 24px;
	padding: 0;
	list-style: none;
}

.picks li {
	display: grid;
	grid-template-columns: minmax(0, 168px) minmax(0, 1fr);
	gap: 4px 20px;
	margin: 0;
	padding: 14px 16px;
	border: 1px solid var(--line);
	border-radius: 12px;
	background: rgba(19, 15, 13, 0.6);
	font-size: 15px;
	line-height: 1.5;
}

.picks li.is-us {
	border-color: rgba(232, 87, 79, 0.35);
	background: rgba(184, 64, 31, 0.1);
}

.picks b {
	font-family: var(--display);
	font-size: 17px;
	font-weight: 600;
	color: var(--text);
}

@media (max-width: 560px) {
	.picks li {
		grid-template-columns: minmax(0, 1fr);
	}
}

/* Steps in the how-to */

.steps {
	counter-reset: step;
	list-style: none;
	padding: 0 !important;
}

.steps > li {
	position: relative;
	padding-left: 44px;
	counter-increment: step;
}

.steps > li::before {
	content: counter(step);
	position: absolute;
	left: 0;
	top: 1px;
	display: grid;
	place-items: center;
	width: 28px;
	height: 28px;
	border-radius: 999px;
	background: var(--raised);
	border: 1px solid var(--line-strong);
	font: 500 13px/1 var(--mono);
	color: var(--text);
}

/* FAQ */

.faq h3 {
	margin-top: 26px;
	font-size: 18px;
}

/* Sources */

.sources {
	margin-top: 8px;
	padding-left: 22px;
}

.post .sources li {
	font-size: 14px;
	line-height: 1.55;
	color: var(--muted);
	overflow-wrap: anywhere;
}

/* Call to action at the end of each article */

.cta {
	display: grid;
	gap: 14px;
	justify-items: start;
	margin: 56px 0 0;
	padding: 26px 24px;
	border-radius: 18px;
	background: var(--glass);
	box-shadow: var(--glass-ring), var(--glass-shadow);
}

.cta h2 {
	margin: 0 !important;
	font-size: clamp(24px, 2.6vw, 30px) !important;
}

.post .cta p {
	margin: 0;
	color: var(--muted);
}

.post .cta .button {
	text-decoration: none;
	color: var(--canvas);
}

/* Blog hub */

.hub-title {
	margin: 0 0 18px;
	font-family: var(--display);
	font-weight: 600;
	font-size: clamp(40px, 6vw, 76px);
	line-height: 0.98;
	letter-spacing: -0.022em;
	color: var(--text);
}

.hub-title em {
	font-style: normal;
	color: var(--rec);
}

.hub-lede {
	max-width: 600px;
	margin: 0 0 44px;
	font-size: 18px;
	line-height: 1.55;
	color: var(--muted);
}

.cards {
	display: grid;
	gap: 14px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.card {
	position: relative;
	display: grid;
	gap: 10px;
	padding: 24px 24px 22px;
	border: 1px solid var(--line);
	border-radius: 18px;
	background: rgba(19, 15, 13, 0.72);
	transition:
		border-color var(--fast) ease,
		background-color var(--fast) ease;
}

.card:hover {
	border-color: var(--line-strong);
	background: rgba(28, 22, 19, 0.85);
}

.card-kind {
	margin: 0;
	font: 500 11px/1 var(--mono);
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--amber);
}

.card h2 {
	margin: 0;
	font-family: var(--display);
	font-weight: 600;
	font-size: clamp(22px, 2.6vw, 28px);
	line-height: 1.1;
	letter-spacing: -0.012em;
	text-wrap: balance;
}

.card h2 a {
	color: var(--text);
	text-decoration: none;
}

/* The whole card is the link target */
.card h2 a::after {
	content: "";
	position: absolute;
	inset: 0;
	border-radius: inherit;
}

.card p {
	margin: 0;
	font-size: 15.5px;
	line-height: 1.55;
	color: var(--muted);
}

.card-meta {
	font: 400 12px/1.4 var(--mono) !important;
	color: var(--dim) !important;
}

/* Footer links */

.foot-links {
	display: flex;
	flex-wrap: wrap;
	gap: 6px 18px;
}

.foot-links a {
	color: var(--muted);
	text-decoration: none;
}

.foot-links a:hover {
	color: var(--text);
}

/* Author note on the hub */

.author {
	margin: 56px 0 0;
	padding-top: 28px;
	border-top: 1px solid var(--line);
	scroll-margin-top: 24px;
}

.author-title {
	margin: 0 0 10px;
	font-family: var(--display);
	font-weight: 600;
	font-size: 20px;
	color: var(--text);
}

.author p {
	max-width: 640px;
	margin: 0;
	font-size: 15.5px;
	line-height: 1.6;
	color: var(--muted);
}

/* Article-scoped overrides: lists and links that are not running text */

.post .byline {
	padding: 0;
	margin-bottom: 36px;
}

.post .byline li {
	margin: 0;
	font: 400 13px/1.4 var(--mono);
	color: var(--dim);
}

.post .byline a,
.post .crumbs a {
	color: var(--muted);
	text-decoration: none;
}

.post .byline a:hover,
.post .crumbs a:hover {
	color: var(--text);
}

.post .picks {
	padding: 0;
}

.post .picks li {
	margin: 0;
	font-size: 15px;
	line-height: 1.5;
}

.post .tldr ul {
	padding-left: 18px;
	margin: 4px 0 0;
}

.post .tldr li {
	font-size: 16px;
	color: var(--text);
}

/* A wide table breaks out of the reading column on large screens */

.post .table-wrap.wide {
	width: min(1080px, calc(100vw - 2 * var(--gutter)));
	margin-left: calc(50% - min(540px, 50vw - var(--gutter)));
}

.wide .compare {
	min-width: 960px;
}

@media (max-width: 600px) {
	.compare,
	.wide .compare {
		min-width: 0;
	}
	.compare thead {
		position: absolute;
		width: 1px;
		height: 1px;
		overflow: hidden;
		clip-path: inset(50%);
	}
	.compare tbody,
	.compare tr,
	.compare tbody th,
	.compare td {
		display: block;
	}
	.compare tbody th,
	.compare td {
		border: 0;
	}
	.compare tbody tr + tr {
		border-top: 1px solid var(--line);
	}
	.compare td::before {
		content: attr(data-label);
		display: block;
		margin-bottom: 4px;
		font: 500 12px/1.3 var(--mono);
		color: var(--muted);
	}
}
