/* ==========================================================================
   workfromanywhere.co — remote work visa checker (v1.0.0)
   Upload to: /wp-content/themes/wfa-theme/assets/css/wfa-visa.css
   Loaded on the "WFA visa checker" page template only.

   The same system as the guides: small-capital eyebrows, serif headings,
   square corners, ink and cream. The only colour beyond that is the
   verdict, because the verdict is the point of the page.
   ========================================================================== */

.wfa-visa {
	--v-ink:     var(--wfa-text, #14171a);
	--v-muted:   var(--wfa-muted, #5f6a70);
	--v-paper:   var(--wfa-bg, #faf7f2);
	--v-card:    var(--wfa-surface, #f2ede4);
	--v-line:    var(--wfa-line, #e2dcd2);
	--v-display: var(--wfa-display, "Fraunces", Georgia, "Times New Roman", serif);
	--v-ui:      var(--wfa-ui, "Public Sans", system-ui, sans-serif);

	/* Verdicts. Green is the site's own accent; the other two sit beside
	   it at the same weight so no status shouts louder than another. */
	--v-yes:       var(--wfa-accent, #0f5548);
	--v-yes-soft:  var(--wfa-accent-soft, #e4ece9);
	--v-mid:       #7a5c12;
	--v-mid-soft:  #f1e8d2;
	--v-no:        var(--wfa-flag, #b4562f);
	--v-no-soft:   #f4e3da;

	flex: 1 1 auto;
	width: 100%;
	min-width: 0;
	color: var(--v-ink);
	font-family: var(--v-ui);
	background: var(--v-paper);
}

.wfa-visa *,
.wfa-visa *::before,
.wfa-visa *::after {
	box-sizing: border-box;
}

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

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

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

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

.wfa-visa a {
	color: var(--v-ink);
}

.wfa-visa a:focus-visible,
.wfa-visa button:focus-visible,
.wfa-visa input:focus-visible,
.wfa-visa select:focus-visible {
	outline: 2px solid var(--v-ink);
	outline-offset: 3px;
}

.wfa-visa a.wfa-v-textlink {
	display: inline-flex;
	padding-bottom: .25rem;
	border-bottom: 1px solid currentColor;
	font-size: .75rem;
	font-weight: 600;
	letter-spacing: .1em;
	text-transform: uppercase;
	text-decoration: none;
	white-space: nowrap;
}

/* ---------- head ---------- */

.wfa-visa__head {
	margin-bottom: clamp(2rem, 4vw, 2.75rem);
}

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

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

/* ---------- form ---------- */

.wfa-v-form {
	display: grid;
	gap: 1.75rem;
	padding: clamp(1.5rem, 3vw, 2.25rem);
	border: 1px solid var(--v-line);
	background: var(--v-card);
}

.wfa-v-field {
	display: flex;
	flex-direction: column;
	gap: .55rem;
	min-width: 0;
	margin: 0;
	padding: 0;
	border: 0;
}

.wfa-v-label {
	padding: 0;
	font-size: .6875rem;
	font-weight: 600;
	line-height: 1.3;
	letter-spacing: .14em;
	text-transform: uppercase;
	color: var(--v-ink);
}

.wfa-v-optional {
	margin-left: .35rem;
	font-weight: 500;
	letter-spacing: .08em;
	color: var(--v-muted);
}

.wfa-v-choices {
	display: flex;
	flex-wrap: wrap;
	gap: .5rem;
}

/* The radio itself is hidden but stays focusable and announced; the
   label is what people see and press. */
.wfa-v-radio {
	position: absolute;
	width: 1px;
	height: 1px;
	opacity: 0;
	pointer-events: none;
}

.wfa-v-choice {
	display: inline-flex;
	align-items: center;
	min-height: 2.75rem;
	padding: .6rem 1rem;
	border: 1px solid var(--v-line);
	background: var(--v-paper);
	color: var(--v-ink);
	font-size: .9375rem;
	line-height: 1.2;
	cursor: pointer;
	transition: border-color .15s ease, background-color .15s ease, color .15s ease;
}

.wfa-v-choice:hover {
	border-color: var(--v-ink);
}

.wfa-v-radio:checked + .wfa-v-choice {
	border-color: var(--v-ink);
	background: var(--v-ink);
	color: var(--v-paper);
}

.wfa-v-radio:focus-visible + .wfa-v-choice {
	outline: 2px solid var(--v-ink);
	outline-offset: 3px;
}

.wfa-v-money {
	display: grid;
	grid-template-columns: minmax(0, 1.2fr) 7.5rem minmax(0, 1.2fr);
	gap: 1.25rem;
}

@media (max-width: 720px) {
	.wfa-v-money {
		grid-template-columns: minmax(0, 1fr) 7rem;
	}

	.wfa-v-money > .wfa-v-field:last-child {
		grid-column: 1 / -1;
	}
}

.wfa-visa .wfa-v-input {
	width: 100%;
	min-height: 2.75rem;
	padding: .55rem 0;
	border: 0;
	border-bottom: 1px solid var(--v-ink);
	border-radius: 0;
	background: transparent;
	color: var(--v-ink);
	font-family: var(--v-ui);
	font-size: 1.25rem;
	font-variant-numeric: tabular-nums;
	box-shadow: none;
}

.wfa-visa .wfa-v-input::placeholder {
	color: var(--v-muted);
	opacity: .7;
	font-size: 1rem;
}

.wfa-visa .wfa-v-select {
	appearance: none;
	-webkit-appearance: none;
	padding-right: 1.5rem;
	background-image: linear-gradient(45deg, transparent 50%, currentColor 50%), linear-gradient(135deg, currentColor 50%, transparent 50%);
	background-position: calc(100% - 9px) 55%, calc(100% - 4px) 55%;
	background-size: 5px 5px, 5px 5px;
	background-repeat: no-repeat;
	cursor: pointer;
}

.wfa-visa .wfa-v-submit {
	justify-self: start;
	min-height: 3.25rem;
	padding: .9rem 2rem;
	border: 0;
	border-radius: 0;
	background: var(--v-ink);
	color: var(--v-paper);
	font-family: var(--v-ui);
	font-size: .8125rem;
	font-weight: 600;
	letter-spacing: .16em;
	text-transform: uppercase;
	cursor: pointer;
}

.wfa-visa .wfa-v-submit:hover {
	background: #000;
}

@media (max-width: 600px) {
	.wfa-visa .wfa-v-submit {
		justify-self: stretch;
	}
}

/* ---------- the answer ---------- */

.wfa-v-answer {
	margin-top: clamp(3rem, 6vw, 4rem);
	scroll-margin-top: 6rem;
}

.wfa-v-summary {
	padding-bottom: clamp(1.75rem, 3vw, 2.25rem);
	border-bottom: 1px solid var(--v-ink);
}

.wfa-v-summary__title {
	margin: 0;
	font-family: var(--v-display);
	font-size: clamp(2rem, 4.5vw, 3rem);
	font-weight: 400;
	line-height: 1.1;
	letter-spacing: -.015em;
}

.wfa-v-tally {
	display: flex;
	flex-wrap: wrap;
	gap: .5rem 2rem;
	margin: 1.25rem 0 0;
	padding: 0;
	list-style: none;
	font-size: .9375rem;
	color: var(--v-muted);
}

.wfa-v-tally__item {
	display: inline-flex;
	align-items: baseline;
	gap: .45rem;
	margin: 0;
}

.wfa-v-tally__n {
	font-family: var(--v-display);
	font-size: 1.5rem;
	font-variant-numeric: tabular-nums;
	color: var(--v-ink);
}

.wfa-v-tally__item.is-yes .wfa-v-tally__n { color: var(--v-yes); }
.wfa-v-tally__item.is-depends .wfa-v-tally__n { color: var(--v-mid); }
.wfa-v-tally__item.is-short .wfa-v-tally__n { color: var(--v-no); }

.wfa-v-list {
	margin: 0;
	padding: 0;
	list-style: none;
}

/* One country. Verdict and figures on the left, the facts down the
   right, the catch and the links across the bottom. */
.wfa-v-row {
	display: grid;
	gap: 1.5rem 3rem;
	margin: 0;
	padding: clamp(1.75rem, 3vw, 2.25rem) 0;
	border-bottom: 1px solid var(--v-line);
}

@media (min-width: 900px) {
	.wfa-v-row {
		grid-template-columns: minmax(0, 1fr) 20rem;
	}

	.wfa-v-row__foot {
		grid-column: 1 / -1;
	}
}

.wfa-v-row__main {
	min-width: 0;
}

.wfa-v-row__country {
	margin: 0 0 .35rem;
	font-size: .75rem;
	font-weight: 600;
	letter-spacing: .14em;
	text-transform: uppercase;
	color: var(--v-muted);
}

.wfa-v-row__visa {
	margin: 0;
	font-family: var(--v-display);
	font-size: clamp(1.5rem, 2.6vw, 1.875rem);
	font-weight: 400;
	line-height: 1.15;
	letter-spacing: -.01em;
	text-wrap: balance;
}

.wfa-v-row__verdict {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: .5rem .75rem;
	margin: 1rem 0 0;
}

.wfa-v-row__headline {
	font-size: 1.125rem;
	font-weight: 600;
	line-height: 1.35;
}

.wfa-v-chip {
	display: inline-flex;
	align-items: center;
	padding: .3rem .6rem;
	font-size: .6875rem;
	font-weight: 600;
	line-height: 1.2;
	letter-spacing: .12em;
	text-transform: uppercase;
	white-space: nowrap;
	background: var(--v-card);
	color: var(--v-muted);
}

.wfa-v-chip.is-yes,
.wfa-v-chip.is-free {
	background: var(--v-yes-soft);
	color: var(--v-yes);
}

.wfa-v-chip.is-depends,
.wfa-v-chip.is-unclear,
.wfa-v-chip.is-check {
	background: var(--v-mid-soft);
	color: var(--v-mid);
}

.wfa-v-chip.is-short {
	background: var(--v-no-soft);
	color: var(--v-no);
}

.wfa-v-chip.is-no {
	background: transparent;
	border: 1px solid var(--v-line);
	color: var(--v-muted);
}

.wfa-v-row__detail,
.wfa-v-row__warn {
	max-width: 38rem;
	margin: .75rem 0 0;
	font-size: .9375rem;
	line-height: 1.6;
	color: var(--v-muted);
}

.wfa-v-row__warn {
	color: var(--v-no);
}

/* A greyed-out row reads as "not for you" before a word is read. */
.wfa-v-row.is-no .wfa-v-row__visa,
.wfa-v-row.is-no .wfa-v-row__headline {
	color: var(--v-muted);
}

/* ---------- the meter ---------- */

.wfa-v-meter {
	max-width: 34rem;
	margin: 1.25rem 0 0;
}

.wfa-v-meter__track {
	position: relative;
	height: .5rem;
	background: var(--v-card);
	box-shadow: inset 0 0 0 1px var(--v-line);
}

.wfa-v-meter__you {
	position: absolute;
	top: 0;
	bottom: 0;
	left: 0;
	background: var(--v-muted);
}

.wfa-v-row.is-yes .wfa-v-meter__you { background: var(--v-yes); }
.wfa-v-row.is-depends .wfa-v-meter__you,
.wfa-v-row.is-unclear .wfa-v-meter__you { background: var(--v-mid); }
.wfa-v-row.is-short .wfa-v-meter__you { background: var(--v-no); }

/* Where officials disagree, the disputed stretch is hatched. */
.wfa-v-meter__range {
	position: absolute;
	top: -.25rem;
	bottom: -.25rem;
	background: repeating-linear-gradient(135deg, rgba(20, 23, 26, .28) 0 2px, transparent 2px 6px);
}

.wfa-v-meter__bar {
	position: absolute;
	top: -.45rem;
	bottom: -.45rem;
	width: 2px;
	margin-left: -1px;
	background: var(--v-ink);
}

.wfa-v-meter__scale {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	gap: .25rem 1rem;
	margin-top: .65rem;
	font-size: .75rem;
	font-weight: 600;
	letter-spacing: .06em;
	font-variant-numeric: tabular-nums;
	color: var(--v-muted);
}

/* ---------- figures and facts ---------- */

.wfa-v-figures {
	max-width: 40rem;
	margin: 1.25rem 0 0;
	padding: 0;
	list-style: none;
	font-size: .875rem;
	line-height: 1.55;
	font-variant-numeric: tabular-nums;
	color: var(--v-ink);
}

.wfa-v-figures li {
	margin: 0;
	padding: .45rem 0;
	border-top: 1px solid var(--v-line);
}

.wfa-v-figures li:last-child {
	color: var(--v-muted);
}

.wfa-v-facts {
	display: grid;
	gap: .9rem;
	align-content: start;
	margin: 0;
	min-width: 0;
}

.wfa-v-fact {
	margin: 0;
}

.wfa-v-fact dt {
	margin: 0 0 .2rem;
	font-size: .6875rem;
	font-weight: 600;
	letter-spacing: .14em;
	text-transform: uppercase;
	color: var(--v-muted);
}

.wfa-v-fact dd {
	margin: 0;
	font-size: .9375rem;
	line-height: 1.5;
}

.wfa-v-row__foot {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	justify-content: space-between;
	gap: 1rem 2rem;
	min-width: 0;
}

.wfa-v-row__catch {
	flex: 1 1 28rem;
	max-width: 46rem;
	margin: 0;
	font-size: .9375rem;
	line-height: 1.6;
}

.wfa-v-row__catch-label {
	margin-right: .5rem;
	font-size: .6875rem;
	font-weight: 600;
	letter-spacing: .14em;
	text-transform: uppercase;
	color: var(--v-no);
}

.wfa-v-row__links {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: .75rem 1.5rem;
	margin: 0;
}

.wfa-visa a.wfa-v-source {
	font-size: .8125rem;
	color: var(--v-muted);
	text-decoration: underline;
	text-decoration-thickness: 1px;
	text-underline-offset: 3px;
	overflow-wrap: anywhere;
}

/* ---------- what next ---------- */

.wfa-v-next {
	display: grid;
	gap: 1.5rem 3rem;
	margin-top: clamp(2.5rem, 5vw, 3.5rem);
	padding: clamp(1.75rem, 4vw, 2.75rem);
	background: var(--v-ink);
	color: var(--v-paper);
}

@media (min-width: 900px) {
	.wfa-v-next {
		grid-template-columns: minmax(0, 1fr) auto;
		align-items: end;
	}
}

.wfa-v-next .wfa-v-eyebrow {
	color: rgba(250, 247, 242, .65);
}

.wfa-v-next__title {
	max-width: 30ch;
	margin: 0;
	font-family: var(--v-display);
	font-size: clamp(1.5rem, 3vw, 2rem);
	font-weight: 400;
	line-height: 1.2;
	text-wrap: balance;
}

.wfa-v-next__body {
	max-width: 40rem;
	margin: .9rem 0 0;
	font-size: .9375rem;
	line-height: 1.6;
	color: rgba(250, 247, 242, .78);
}

.wfa-v-next__links {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 1rem 1.75rem;
}

.wfa-visa a.wfa-v-button {
	display: inline-flex;
	align-items: center;
	min-height: 3rem;
	padding: .8rem 1.5rem;
	background: var(--v-paper);
	color: var(--v-ink);
	font-size: .8125rem;
	font-weight: 600;
	letter-spacing: .14em;
	text-transform: uppercase;
	text-decoration: none;
}

.wfa-visa a.wfa-v-button:hover {
	background: var(--v-card);
}

.wfa-visa .wfa-v-next a.wfa-v-textlink {
	color: var(--v-paper);
}

/* ---------- at rest: the ten side by side ---------- */

.wfa-v-overview {
	margin-top: clamp(3rem, 6vw, 4rem);
}

.wfa-v-overview__head {
	margin-bottom: 1.5rem;
}

.wfa-v-overview__title {
	margin: 0;
	font-family: var(--v-display);
	font-size: clamp(1.75rem, 3.4vw, 2.375rem);
	font-weight: 400;
	line-height: 1.15;
}

.wfa-v-overview__text {
	max-width: 40rem;
	margin: .75rem 0 0;
	font-size: 1rem;
	line-height: 1.6;
	color: var(--v-muted);
}

.wfa-v-table-wrap {
	overflow-x: auto;
	border-top: 1px solid var(--v-ink);
}

.wfa-v-table {
	width: 100%;
	min-width: 52rem;
	border-collapse: collapse;
	font-size: .875rem;
	line-height: 1.45;
	font-variant-numeric: tabular-nums;
}

.wfa-v-table th,
.wfa-v-table td {
	padding: .9rem 1rem .9rem 0;
	border: 0;
	border-bottom: 1px solid var(--v-line);
	text-align: left;
	vertical-align: top;
}

.wfa-v-table thead th {
	font-size: .6875rem;
	font-weight: 600;
	letter-spacing: .14em;
	text-transform: uppercase;
	color: var(--v-muted);
	white-space: nowrap;
}

.wfa-v-table tbody th {
	font-weight: 400;
	min-width: 11rem;
}

.wfa-v-table__country {
	display: block;
	font-family: var(--v-display);
	font-size: 1.125rem;
}

.wfa-v-table__visa {
	display: block;
	margin-top: .15rem;
	font-size: .8125rem;
	color: var(--v-muted);
}

.wfa-v-table__need {
	min-width: 14rem;
}

.wfa-v-table__who {
	white-space: nowrap;
}

.wfa-v-mark {
	font-size: .75rem;
	font-weight: 600;
	letter-spacing: .06em;
}

.wfa-v-mark.is-yes { color: var(--v-yes); }
.wfa-v-mark.is-no { color: var(--v-muted); font-weight: 500; }
.wfa-v-mark.is-unclear,
.wfa-v-mark.is-savings { color: var(--v-mid); }

/* ---------- small print ---------- */

.wfa-v-foot {
	max-width: 46rem;
	margin-top: clamp(2.5rem, 5vw, 3.5rem);
	padding-top: 1.5rem;
	border-top: 1px solid var(--v-line);
	font-size: .8125rem;
	line-height: 1.6;
	color: var(--v-muted);
}

.wfa-v-foot p {
	margin: 0 0 .75rem;
}

.wfa-v-foot strong {
	color: var(--v-ink);
}

@media (prefers-reduced-motion: reduce) {
	.wfa-visa * {
		transition: none !important;
	}
}
