/* ==========================================================================
   workfromanywhere.co — guides (v1.0.0)
   Upload to: /wp-content/themes/wfa-theme/assets/css/wfa-guides.css
   Loaded by archive-wfa_guide.php and single-wfa_guide.php only.

   Same system as the rest of the site: small-capital eyebrows, serif
   headings, thin line icons, square corners, ink and cream only.
   ========================================================================== */

.wfa-guides {
	--g-ink:     var(--wfa-text, #14171a);
	--g-muted:   var(--wfa-muted, #5f6a70);
	--g-paper:   var(--wfa-bg, #faf7f2);
	--g-card:    var(--wfa-surface, #f2ede4);
	--g-line:    var(--wfa-line, #e2dcd2);
	--g-display: var(--wfa-display, "Fraunces", Georgia, "Times New Roman", serif);

	flex: 1 1 auto;
	width: 100%;
	min-width: 0;
	color: var(--g-ink);
	font-family: var(--wfa-ui, "Public Sans", system-ui, sans-serif);
}

/* Lines up with the logo: 40px gutter, 30px on phones. */
.wfa-guides__wrap {
	padding: clamp(3rem, 7vw, 5rem) 40px clamp(4rem, 9vw, 6rem);
}

@media (max-width: 768px) {
	.wfa-guides__wrap {
		padding-left: 30px;
		padding-right: 30px;
	}
}

/* ---------- shared ---------- */

.wfa-g-eyebrow {
	margin: 0 0 .9rem;
	font-size: .75rem;
	font-weight: 600;
	line-height: 1.2;
	letter-spacing: .14em;
	text-transform: uppercase;
	color: var(--g-muted);
}

.wfa-guides__title {
	margin: 0;
	max-width: 22ch;
	font-family: var(--g-display);
	font-size: clamp(2.5rem, 6vw, 3.75rem);
	font-weight: 400;
	line-height: 1.05;
	letter-spacing: -.02em;
	text-wrap: balance;
}

.wfa-guides__standfirst {
	max-width: 40rem;
	margin: 1.25rem 0 0;
	font-size: clamp(1.0625rem, 1.6vw, 1.1875rem);
	line-height: 1.65;
	color: var(--g-muted);
}

.wfa-g-textlink,
.wfa-guides a.wfa-g-textlink {
	display: inline-flex;
	align-self: flex-start;
	padding-bottom: .25rem;
	border-bottom: 1px solid currentColor;
	color: var(--g-ink);
	font-size: .75rem;
	font-weight: 600;
	letter-spacing: .1em;
	text-transform: uppercase;
	text-decoration: none;
	white-space: nowrap;
}

.wfa-guides a:focus-visible {
	outline: 2px solid var(--g-ink);
	outline-offset: 3px;
}

.wfa-guides .wfa-svc-caticon {
	display: block;
}

/* ---------- archive head and topics ---------- */

.wfa-guides__head {
	margin-bottom: clamp(2.5rem, 5vw, 3.5rem);
	padding-bottom: clamp(2rem, 4vw, 2.5rem);
	border-bottom: 1px solid var(--g-line);
}

.wfa-g-topics {
	display: flex;
	flex-wrap: wrap;
	gap: .5rem;
	margin-top: 2rem;
}

.wfa-guides a.wfa-g-chip {
	display: inline-flex;
	padding: .45rem .75rem;
	border: 1px solid var(--g-line);
	color: var(--g-ink);
	font-size: .6875rem;
	font-weight: 600;
	line-height: 1.2;
	letter-spacing: .12em;
	text-transform: uppercase;
	text-decoration: none;
	transition: background-color .2s ease, color .2s ease, border-color .2s ease;
}

.wfa-guides a.wfa-g-chip:hover {
	border-color: var(--g-ink);
}

.wfa-guides a.wfa-g-chip.is-current {
	border-color: var(--g-ink);
	background: var(--g-ink);
	color: var(--g-paper);
}

/* ---------- cards ---------- */

.wfa-g-card {
	position: relative;
	display: flex;
	flex-direction: column;
	height: 100%;
}

.wfa-g-card__media {
	display: flex;
	align-items: center;
	justify-content: center;
	aspect-ratio: 16 / 10;
	overflow: hidden;
	background: var(--g-line);
	color: var(--g-ink);
}

.wfa-g-card__media img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform .6s ease;
}

.wfa-g-card:hover .wfa-g-card__media img {
	transform: scale(1.03);
}

.wfa-g-card__icon .wfa-svc-caticon {
	width: 4rem;
	height: 4rem;
}

.wfa-g-card__body {
	display: flex;
	flex: 1 1 auto;
	flex-direction: column;
	padding-top: 1.25rem;
}

.wfa-g-card__topic {
	margin-bottom: .6rem;
}

.wfa-g-card__title {
	margin: 0;
	font-family: var(--g-display);
	font-size: 1.5rem;
	font-weight: 400;
	line-height: 1.2;
	letter-spacing: -.01em;
	text-wrap: balance;
}

.wfa-guides .wfa-g-card__title a {
	color: var(--g-ink);
	text-decoration: none;
}

/* Whole card clickable through the title. */
.wfa-guides .wfa-g-card__title a::after {
	content: "";
	position: absolute;
	inset: 0;
}

.wfa-guides .wfa-g-card:hover .wfa-g-card__title a {
	text-decoration: underline;
	text-decoration-thickness: 1px;
	text-underline-offset: 4px;
}

.wfa-g-card__text {
	margin: .75rem 0 0;
	font-size: .9375rem;
	line-height: 1.6;
	color: var(--g-muted);
}

.wfa-g-card__meta {
	margin: .9rem 0 0;
	font-size: .6875rem;
	font-weight: 600;
	letter-spacing: .12em;
	text-transform: uppercase;
	color: var(--g-muted);
}

/* Lead: image left, text right on wide screens. */
.wfa-g-card--lead {
	display: grid;
	gap: 2rem;
	margin-bottom: clamp(3rem, 6vw, 4rem);
	padding-bottom: clamp(3rem, 6vw, 4rem);
	border-bottom: 1px solid var(--g-line);
}

@media (min-width: 900px) {
	.wfa-g-card--lead {
		grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
		align-items: center;
		gap: clamp(2.5rem, 5vw, 4rem);
	}
}

.wfa-g-card--lead .wfa-g-card__body {
	padding-top: 0;
}

.wfa-g-card--lead .wfa-g-card__title {
	font-size: clamp(1.875rem, 3.4vw, 2.5rem);
	line-height: 1.12;
}

.wfa-g-card--lead .wfa-g-card__text {
	font-size: 1.0625rem;
}

.wfa-g-card--lead .wfa-g-textlink {
	margin-top: 1.5rem;
}

.wfa-g-card--lead .wfa-g-card__icon .wfa-svc-caticon {
	width: 5.5rem;
	height: 5.5rem;
}

.wfa-g-grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 3rem 1.5rem;
	margin: 0;
	padding: 0;
	list-style: none;
}

.wfa-g-grid > li {
	margin: 0;
}

@media (max-width: 1000px) {
	.wfa-g-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (max-width: 600px) {
	.wfa-g-grid {
		grid-template-columns: minmax(0, 1fr);
	}
}

/* ---------- pagination ---------- */

.wfa-g-pages {
	display: flex;
	flex-wrap: wrap;
	gap: .5rem;
	margin-top: clamp(3rem, 6vw, 4rem);
	padding-top: 2rem;
	border-top: 1px solid var(--g-line);
}

.wfa-g-pages .page-numbers {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 2.75rem;
	min-height: 2.75rem;
	padding: 0 .9rem;
	border: 1px solid var(--g-line);
	color: var(--g-ink);
	font-size: .8125rem;
	font-weight: 600;
	letter-spacing: .06em;
	text-decoration: none;
}

.wfa-g-pages a.page-numbers:hover {
	border-color: var(--g-ink);
}

.wfa-g-pages .page-numbers.current {
	border-color: var(--g-ink);
	background: var(--g-ink);
	color: var(--g-paper);
}

/* ---------- empty state ---------- */

.wfa-g-soon {
	padding: clamp(2.5rem, 6vw, 4.5rem) clamp(1.5rem, 5vw, 4rem);
	background: var(--g-card);
	text-align: center;
}

.wfa-g-soon__title {
	max-width: 24ch;
	margin: 0 auto 1rem;
	font-family: var(--g-display);
	font-size: clamp(1.75rem, 3.2vw, 2.375rem);
	font-weight: 400;
	line-height: 1.15;
	text-wrap: balance;
}

.wfa-g-soon__text {
	max-width: 36rem;
	margin: 0 auto 2.5rem;
	font-size: 1rem;
	line-height: 1.65;
	color: var(--g-muted);
}

.wfa-g-tiles {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 1px;
	max-width: 48rem;
	margin: 0 auto;
	border: 1px solid var(--g-line);
	background: var(--g-line);
}

@media (max-width: 600px) {
	.wfa-g-tiles {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

.wfa-guides a.wfa-g-tile {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: .9rem;
	padding: 1.75rem 1rem;
	background: var(--g-paper);
	color: var(--g-ink);
	text-decoration: none;
	transition: background-color .2s ease;
}

.wfa-guides a.wfa-g-tile:hover {
	background: var(--g-card);
}

.wfa-g-tile .wfa-svc-caticon {
	width: 2.5rem;
	height: 2.5rem;
}

.wfa-g-tile__title {
	font-size: .75rem;
	font-weight: 600;
	line-height: 1.3;
	letter-spacing: .1em;
	text-transform: uppercase;
}

.wfa-guides a.wfa-g-tile:hover .wfa-g-tile__title {
	text-decoration: underline;
	text-underline-offset: 4px;
}

/* ---------- single guide ---------- */

.wfa-g-crumbs {
	display: flex;
	flex-wrap: wrap;
	gap: .5rem;
	margin-bottom: 2rem;
	font-size: .75rem;
	font-weight: 600;
	letter-spacing: .12em;
	text-transform: uppercase;
	color: var(--g-muted);
}

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

.wfa-g-crumbs a:hover {
	color: var(--g-ink);
	text-decoration: underline;
	text-underline-offset: 3px;
}

.wfa-g-article-head {
	max-width: 52rem;
	margin-bottom: clamp(2.5rem, 5vw, 3.5rem);
}

.wfa-g-byline {
	display: flex;
	flex-wrap: wrap;
	gap: .5rem 1.5rem;
	margin: 1.5rem 0 0;
	font-size: .75rem;
	font-weight: 600;
	letter-spacing: .14em;
	text-transform: uppercase;
	color: var(--g-muted);
}

.wfa-g-hero {
	margin: 0 0 clamp(2.5rem, 5vw, 3.5rem);
	aspect-ratio: 16 / 7;
	overflow: hidden;
	background: var(--g-card);
}

.wfa-g-hero img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.wfa-g-cols {
	display: grid;
	gap: 3rem;
	padding-top: clamp(2.5rem, 5vw, 3rem);
	border-top: 1px solid var(--g-line);
}

@media (min-width: 960px) {
	.wfa-g-cols {
		grid-template-columns: minmax(0, 1fr) 17rem;
		gap: clamp(3rem, 6vw, 5rem);
	}

	.wfa-g-side {
		position: sticky;
		top: 1.5rem;
		align-self: start;
	}
}

.wfa-g-notice {
	margin: 0 0 2rem;
	padding: 1rem 1.25rem;
	border-left: 3px solid var(--g-ink);
	background: var(--g-card);
	font-size: .9375rem;
	line-height: 1.6;
}

/* Article body: the How We Recommend reading style. */
.wfa-g-body {
	max-width: 44rem;
	font-size: clamp(1.0625rem, 1.6vw, 1.125rem);
	line-height: 1.75;
}

.wfa-g-body > *:first-child { margin-top: 0; }

.wfa-g-body p {
	margin: 0 0 1.1em;
}

.wfa-g-body h2 {
	margin: 2.4em 0 .7em;
	font-family: var(--g-display);
	font-size: clamp(1.625rem, 3vw, 2rem);
	font-weight: 400;
	line-height: 1.15;
	letter-spacing: -.01em;
	scroll-margin-top: 2rem;
}

.wfa-g-body h3 {
	margin: 2em 0 .6em;
	font-family: var(--g-display);
	font-size: 1.375rem;
	font-weight: 400;
	line-height: 1.3;
}

.wfa-g-body strong,
.wfa-g-body b {
	font-weight: 600;
}

.wfa-g-body ul {
	margin: .5em 0 1.4em;
	padding: 0;
	list-style: none;
}

.wfa-g-body ul > li {
	position: relative;
	margin: 0 0 .5em;
	padding-left: 1.9rem;
	line-height: 1.6;
}

.wfa-g-body ul > li::before {
	content: "";
	position: absolute;
	top: .3em;
	left: 0;
	width: 1.1rem;
	height: 1.1rem;
	background-color: var(--g-ink);
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.6' stroke-linecap='round'%3E%3Cpath d='M5 12.5l4.2 4.2L19 7'/%3E%3C/svg%3E") center / contain no-repeat;
	mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.6' stroke-linecap='round'%3E%3Cpath d='M5 12.5l4.2 4.2L19 7'/%3E%3C/svg%3E") center / contain no-repeat;
}

.wfa-g-body ol {
	margin: .5em 0 1.4em;
	padding-left: 1.4em;
}

.wfa-g-body ol > li {
	margin-bottom: .5em;
	padding-left: .25em;
}

.wfa-g-body a {
	color: var(--g-ink);
	text-decoration: underline;
	text-decoration-thickness: 1px;
	text-underline-offset: .2em;
}

.wfa-g-body blockquote {
	margin: 1.75em 0;
	padding: 1.25rem 1.5rem;
	border-left: 3px solid var(--g-ink);
	background: var(--g-card);
}

.wfa-g-body img {
	max-width: 100%;
	height: auto;
}

.wfa-g-body table {
	width: 100%;
	margin: 1.5em 0;
	border-collapse: collapse;
	font-size: .9375rem;
}

.wfa-g-body th,
.wfa-g-body td {
	padding: .7rem .75rem;
	border-bottom: 1px solid var(--g-line);
	text-align: left;
	vertical-align: top;
}

.wfa-g-body th {
	font-size: .75rem;
	font-weight: 600;
	letter-spacing: .1em;
	text-transform: uppercase;
	color: var(--g-muted);
}

.wfa-g-sources {
	max-width: 44rem;
	margin-top: 3rem;
	padding-top: 2rem;
	border-top: 1px solid var(--g-line);
}

.wfa-g-sources ol {
	margin: 0;
	padding-left: 1.4em;
	font-size: .9375rem;
	line-height: 1.8;
}

.wfa-g-sources a {
	color: var(--g-ink);
	text-underline-offset: .2em;
}

/* Side panel */
.wfa-g-toc ol {
	counter-reset: wfa-toc;
	margin: 0 0 2rem;
	padding: 0;
	list-style: none;
}

.wfa-g-toc li {
	counter-increment: wfa-toc;
	margin: 0;
	border-top: 1px solid var(--g-line);
}

.wfa-g-toc li:last-child {
	border-bottom: 1px solid var(--g-line);
}

.wfa-guides .wfa-g-toc a {
	display: flex;
	gap: .75rem;
	padding: .7rem 0;
	color: var(--g-ink);
	font-size: .9375rem;
	line-height: 1.4;
	text-decoration: none;
}

.wfa-guides .wfa-g-toc a::before {
	content: counter(wfa-toc, decimal-leading-zero);
	flex: 0 0 auto;
	font-size: .75rem;
	font-weight: 600;
	letter-spacing: .08em;
	line-height: 1.9;
	color: var(--g-muted);
}

.wfa-guides .wfa-g-toc a:hover {
	text-decoration: underline;
	text-underline-offset: 4px;
}

.wfa-g-slots {
	margin-bottom: 2rem;
}

.wfa-guides a.wfa-g-sidelink {
	display: flex;
	align-items: center;
	gap: 1rem;
	padding: 1.25rem;
	background: var(--g-card);
	color: var(--g-ink);
	font-size: .75rem;
	font-weight: 600;
	line-height: 1.35;
	letter-spacing: .1em;
	text-transform: uppercase;
	text-decoration: none;
}

.wfa-g-sidelink .wfa-svc-caticon {
	flex: 0 0 auto;
	width: 2.25rem;
	height: 2.25rem;
}

.wfa-guides a.wfa-g-sidelink:hover span {
	text-decoration: underline;
	text-underline-offset: 4px;
}

/* Related */
.wfa-g-related {
	margin-top: clamp(4rem, 8vw, 5.5rem);
	padding-top: clamp(2.5rem, 5vw, 3.5rem);
	border-top: 1px solid var(--g-line);
}

.wfa-g-related__head {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-end;
	justify-content: space-between;
	gap: 1rem 2rem;
	margin-bottom: 2rem;
}

.wfa-g-related__title {
	margin: 0;
	font-family: var(--g-display);
	font-size: clamp(1.75rem, 3.2vw, 2.25rem);
	font-weight: 400;
	line-height: 1.12;
}

@media (prefers-reduced-motion: reduce) {
	.wfa-g-card__media img,
	.wfa-guides a.wfa-g-chip,
	.wfa-guides a.wfa-g-tile {
		transition: none;
	}

	.wfa-g-card:hover .wfa-g-card__media img {
		transform: none;
	}
}
