/*
 * Field Guide Forms. Uses the Field Guide theme's colours and type when it's active,
 * with plain fallbacks otherwise.
 */
.fgf,
.fgf-submit {
	--fgf-ink: #0b0b0b;
	--fgf-paper: #fbfaf6;
	--fgf-line: #0b0b0b;
	--fgf-muted: #55514a;
	--fgf-accent: var(--fg-accent, #e7d6a8);
	--fgf-error: #b3201a;
	--fgf-type: var(--fg-jost, system-ui, sans-serif);
	box-sizing: border-box;
	max-width: 760px;
	margin-top: 40px;
}
.fgf *,
.fgf *::before,
.fgf *::after { box-sizing: inherit; }
.fgf__hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.fgf__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px 24px; }
.fgf__field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.fgf__field.is-wide { grid-column: 1 / -1; }
.fgf__label { font-family: var(--fgf-type); font-size: 13px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--fgf-ink); }
.fgf__optional { margin-left: 6px; font-weight: 500; letter-spacing: .08em; text-transform: lowercase; color: var(--fgf-muted); }
.fgf__help { margin-top: -2px; font-size: 14px; line-height: 1.4; color: var(--fgf-muted); }
.fgf input,
.fgf textarea,
.fgf select {
	width: 100%; margin: 0; padding: 13px 14px;
	border: 2px solid var(--fgf-line); border-radius: 0; background: var(--fgf-paper); color: var(--fgf-ink);
	font: inherit; font-size: 17px; line-height: 1.4;
	box-shadow: none; transition: box-shadow .2s ease, border-color .2s ease;
	-webkit-appearance: none; appearance: none;
}
.fgf textarea { min-height: 150px; resize: vertical; }
.fgf input:focus,
.fgf textarea:focus,
.fgf select:focus { outline: none; box-shadow: 6px 6px 0 var(--fgf-accent); }
.fgf input:focus-visible,
.fgf textarea:focus-visible,
.fgf select:focus-visible { outline: 2px solid var(--fgf-ink); outline-offset: 2px; }
.fgf__select { position: relative; display: block; }
.fgf__select::after { content: ""; position: absolute; right: 16px; top: 50%; width: 10px; height: 10px; margin-top: -7px; border-right: 2px solid var(--fgf-ink); border-bottom: 2px solid var(--fgf-ink); transform: rotate(45deg); pointer-events: none; }
.fgf select { padding-right: 44px; cursor: pointer; }
.fgf__field.has-error input,
.fgf__field.has-error textarea,
.fgf__field.has-error select { border-color: var(--fgf-error); box-shadow: 6px 6px 0 rgba(179, 32, 26, .18); }
.fgf__error { min-height: 0; font-size: 14px; font-weight: 600; color: var(--fgf-error); }
.fgf__error:empty { display: none; }
.fgf__about { margin: 0; font-family: var(--fgf-type); font-weight: 800; font-size: 26px; line-height: 1.1; text-transform: uppercase; color: var(--fgf-ink); }
.fgf__summary { margin: 0 0 22px; padding: 12px 16px; border-left: 6px solid var(--fgf-error); background: rgba(179, 32, 26, .08); font-weight: 600; color: var(--fgf-error); }
.fgf__summary:focus { outline: none; }
.fgf__turnstile { margin-top: 22px; }
.fgf__foot { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 28px; margin-top: 28px; }
.fgf__submit {
	position: relative; display: inline-flex; align-items: center; justify-content: center; min-height: 54px; padding: 0 30px;
	border: 2px solid var(--fgf-ink); border-radius: 0; background: var(--fgf-ink); color: #ffffff; cursor: pointer;
	font-family: var(--fgf-type); font-size: 15px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase;
	box-shadow: 6px 6px 0 var(--fgf-accent); transition: transform .2s ease, box-shadow .2s ease;
}
.fgf__submit:hover { transform: translate(-2px, -2px); box-shadow: 8px 8px 0 var(--fgf-accent); }
.fgf__submit:active { transform: translate(2px, 2px); box-shadow: 2px 2px 0 var(--fgf-accent); }
.fgf__submit:focus-visible { outline: 3px solid var(--fgf-accent); outline-offset: 4px; }
.fgf__submit[disabled] { cursor: progress; opacity: .75; transform: none; }
.fgf.is-sending .fgf__submit span::after,
.fgf__form.is-sending .fgf__submit span::after { content: ""; display: inline-block; width: 12px; height: 12px; margin-left: 10px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; vertical-align: -1px; animation: fgf-spin .7s linear infinite; }
@keyframes fgf-spin { to { transform: rotate(360deg); } }
.fgf__privacy { flex: 1 1 220px; margin: 0; font-size: 14px; line-height: 1.5; color: var(--fgf-muted); }

/* Tick boxes */
.fgf__field--checkboxes { margin: 0; padding: 0; border: 0; min-width: 0; }
.fgf__field--checkboxes legend { padding: 0; margin-bottom: 6px; }
.fgf__checks { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr)); gap: 8px; margin-top: 6px; }
.fgf__check { position: relative; display: flex; align-items: center; gap: 12px; min-height: 48px; padding: 10px 14px; border: 2px solid var(--fgf-line); background: var(--fgf-paper); cursor: pointer; font-size: 16px; line-height: 1.3; transition: box-shadow .2s ease, background-color .2s ease; }
.fgf__check input { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; }
.fgf__check span { display: flex; align-items: center; gap: 12px; }
.fgf__check span::before { content: ""; display: block; flex: none; width: 18px; height: 18px; border: 2px solid var(--fgf-ink); background: transparent; transform: rotate(45deg) scale(.85); transition: background-color .15s ease, transform .2s ease; }
.fgf__check:has(input:checked) { background: var(--fgf-ink); color: var(--fgf-paper); box-shadow: 4px 4px 0 var(--fgf-accent); }
.fgf__check input:checked + span::before { background: var(--fgf-accent); border-color: var(--fgf-accent); transform: rotate(45deg) scale(1); }
.fgf__check:has(input:focus-visible) { outline: 2px solid var(--fgf-ink); outline-offset: 2px; }
.fgf__field--checkboxes.has-error .fgf__check { border-color: var(--fgf-error); }

/* Thank you */
.fgf__done { position: relative; padding: 32px 32px 32px 96px; background: #0b0b0b; color: #ece8df; clip-path: polygon(0 0, 100% 0, 100% calc(100% - 22px), calc(100% - 22px) 100%, 0 100%); }
.fgf__done:focus { outline: none; }
.fgf__done-mark { position: absolute; left: 30px; top: 30px; width: 42px; height: 42px; background: var(--fgf-accent); clip-path: polygon(14% 0, 100% 0, 86% 100%, 0 100%); }
.fgf__done-mark::after { content: ""; position: absolute; left: 13px; top: 9px; width: 10px; height: 19px; border-right: 4px solid #0b0b0b; border-bottom: 4px solid #0b0b0b; transform: rotate(40deg); }
.fgf__done-text { margin: 0; font-size: 20px; line-height: 1.5; }
.fgf__again { display: inline-block; margin-top: 16px; font-family: var(--fgf-type); font-size: 13px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--fgf-accent); }

/* On a black slab */
.fg-dark .fgf { --fgf-ink: #ece8df; --fgf-paper: #141312; --fgf-line: #4a463e; --fgf-muted: #b4afa4; }
.fg-dark .fgf__submit { background: var(--fgf-accent); border-color: var(--fgf-accent); color: #0b0b0b; box-shadow: 6px 6px 0 #ffffff; }
.fg-dark .fgf__select::after { border-color: #ece8df; }

@media (max-width: 600px) {
	.fgf__grid { grid-template-columns: minmax(0, 1fr); gap: 18px; }
	.fgf__done { padding: 84px 22px 28px; }
	.fgf__done-mark { left: 22px; top: 24px; }
	.fgf__submit { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
	.fgf * { transition: none !important; animation: none !important; }
}

/* Contributor forms */
.fgf__cover { display: flex; align-items: center; gap: 12px; margin-top: 4px; font-weight: 700; }
.fgf__cover[hidden] { display: none; }
.fgf__cover img { width: 72px; height: 72px; object-fit: cover; border: 2px solid var(--fgf-ink); box-shadow: 4px 4px 0 var(--fgf-accent); }
.fgf__restored { margin: 0 0 22px; padding: 12px 16px; border-left: 6px solid var(--fgf-ink); background: rgba(11, 11, 11, .05); font-weight: 600; }
.fgf__restored[hidden] { display: none; }
.fgf--sub_review textarea[name="fgf[review]"] { font-size: 18px; line-height: 1.6; }

/* Send in your writing */
.fgf-submit__hello { margin: 0 0 8px; font-family: var(--fgf-type); font-size: clamp(22px, 3vw, 30px); font-weight: 800; line-height: 1.15; }
.fgf-submit__lead { margin: 0 0 28px; max-width: 60ch; color: var(--fgf-muted); }
.fgf-submit__lead a, .fgf-submit__msg a { color: inherit; font-weight: 700; }
.fgf-submit__tabs { display: flex; flex-wrap: wrap; gap: 0; margin: 0 0 32px; border-bottom: 2px solid var(--fgf-ink); }
.fgf-submit__tab { display: inline-block; padding: 12px 20px; margin-bottom: -2px; border: 2px solid transparent; font-family: var(--fgf-type); font-size: 13px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; text-decoration: none; color: var(--fgf-muted); }
.fgf-submit__tab:hover { color: var(--fgf-ink); }
.fgf-submit__tab[aria-current="page"] { border-color: var(--fgf-ink); border-bottom-color: var(--fgf-paper); background: var(--fgf-paper); color: var(--fgf-ink); }
.fgf-submit__msg { padding: 20px 24px; border: 2px solid var(--fgf-ink); box-shadow: 6px 6px 0 var(--fgf-accent); background: var(--fgf-paper); max-width: 62ch; }
.fgf-submit__msg p { margin: 0 0 10px; }
.fgf-submit__msg p:last-child { margin-bottom: 0; }
.fgf-submit__foot { margin-top: 36px; font-size: 14px; color: var(--fgf-muted); }
.fgf-submit__foot a { color: inherit; }
.fgf-submit__mine { margin: 0 0 32px; padding: 0; list-style: none; border-top: 1px solid rgba(11, 11, 11, .2); }
.fgf-submit__mine li { display: flex; justify-content: space-between; gap: 16px; padding: 10px 0; border-bottom: 1px solid rgba(11, 11, 11, .2); }
.fgf-submit__mine em { font-style: normal; font-size: 12px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--fgf-muted); white-space: nowrap; }
.fgf-submit__mine em.is-live { color: var(--fgf-ink); }
.fgf-submit__mine a { color: inherit; font-weight: 700; text-decoration-thickness: 2px; text-underline-offset: 3px; }
