/* Cookie consent: the banner, the Cookie settings dialog and the notice over blocked embeds. */

.ctw-consent {
	--ctw-c-ink: #242d2f;
	--ctw-c-paper: #f2efea;
	--ctw-c-teal: #73afb6;
	--ctw-c-teal-ui: #4e8b92;
	/* #4e8b92 is 3.4:1 on the off-white, so teal text on light backgrounds uses this (5.1:1). */
	--ctw-c-teal-text: #3b6d73;
	/* Buttons: white on this deeper teal (4.7:1), the same as every other button on the site. */
	--ctw-c-button: #437c83;
	--ctw-c-muted: #5e6669;
	--ctw-c-line: rgb(36 45 47 / 0.14);
	--ctw-c-head: Muli, "Helvetica Neue", Arial, sans-serif;
	--ctw-c-body: Muli, "Helvetica Neue", Arial, sans-serif;
	--ctw-c-focus: var(--ctw-c-paper);
	box-sizing: border-box;
	font: 400 15px/1.6 var(--ctw-c-body);
	letter-spacing: normal;
	text-align: left;
	text-transform: none;
	color: var(--ctw-c-paper);
	-webkit-font-smoothing: antialiased;
}
.ctw-consent *,
.ctw-consent *::before,
.ctw-consent *::after { box-sizing: inherit; }
.ctw-consent p { margin: 0; }
.ctw-consent a {
	color: inherit;
	text-decoration: underline;
	text-decoration-thickness: 1px;
	text-underline-offset: 0.2em;
}
.ctw-consent a:hover { text-decoration-thickness: 2px; }
.ctw-consent :is(a, button, input):focus-visible,
.ctw-consent .ctw-consent-switch input[type="checkbox"]:focus-visible {
	outline: 2px solid var(--ctw-c-focus);
	outline-offset: 3px;
	box-shadow: none;
}
.ctw-consent .ctw-consent-switch input[type="checkbox"]:focus:not(:focus-visible) { outline: 0; }

.ctw-consent__title {
	margin: 0 0 8px;
	padding: 0;
	border: 0;
	font: 300 22px/1.25 var(--ctw-c-head);
	letter-spacing: 0.02em;
	text-transform: none;
	color: inherit;
}
.ctw-consent .ctw-consent__eyebrow {
	margin: 0 0 6px;
	font: 700 11px/1.4 var(--ctw-c-head);
	letter-spacing: 0.18em;
	text-transform: uppercase;
	color: var(--ctw-c-teal);
}

.ctw-consent__btn {
	appearance: none;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: auto;
	height: auto;
	min-height: 48px;
	margin: 0;
	padding: 12px 22px;
	border: 1px solid var(--ctw-c-button);
	border-radius: 2px;
	background: var(--ctw-c-button);
	box-shadow: none;
	color: #fff;
	font: 700 12px/1.2 var(--ctw-c-head);
	letter-spacing: 0.16em;
	text-align: center;
	text-decoration: none;
	text-shadow: none;
	text-transform: uppercase;
	white-space: nowrap;
	cursor: pointer;
	transition: background-color 0.15s, border-color 0.15s, color 0.15s;
}
.ctw-consent__btn:hover {
	border-color: var(--ctw-c-paper);
	background: var(--ctw-c-paper);
	color: var(--ctw-c-ink);
}
.ctw-consent__link {
	appearance: none;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 44px;
	margin: 0;
	padding: 8px 4px;
	border: 0;
	border-radius: 0;
	background: none;
	box-shadow: none;
	color: inherit;
	font: 400 14px/1.3 var(--ctw-c-body);
	letter-spacing: normal;
	text-transform: none;
	text-decoration: underline;
	text-decoration-thickness: 1px;
	text-underline-offset: 0.25em;
	cursor: pointer;
}
.ctw-consent__link:hover { text-decoration-thickness: 2px; }

/* Banner: a card fixed to the foot of the screen, never blocking the page. Phones see only the title
   and the two equal buttons (about 15% of the screen, as Google's guidance asks of a consent bar);
   the explanation, the privacy link and Manage preferences fold behind Details. Otis found it not
   showing properly on his phone (1 December 2026): the card is now capped at the screen's height
   and the script lifts it by --ctw-consent-lift when the browser lays fixed elements out against a
   taller area than the one showing. */
.ctw-consent-banner {
	position: fixed;
	z-index: 9990;
	right: max(12px, env(safe-area-inset-right, 0px));
	bottom: calc(max(12px, env(safe-area-inset-bottom, 0px)) + var(--ctw-consent-lift, 0px));
	left: max(12px, env(safe-area-inset-left, 0px));
	display: grid;
	gap: 8px 40px;
	max-width: 960px;
	max-height: calc(100vh - 24px - var(--ctw-consent-lift, 0px));
	max-height: calc(100dvh - 24px - var(--ctw-consent-lift, 0px));
	margin: 0 auto;
	padding: 6px 12px 12px 18px;
	overflow-y: auto;
	overscroll-behavior: contain;
	border-top: 3px solid var(--ctw-c-teal);
	border-radius: 2px;
	background: var(--ctw-c-ink);
	box-shadow: 0 8px 32px rgb(0 0 0 / 0.3);
}
.ctw-consent-banner[hidden],
.ctw-consent-embed[hidden] { display: none !important; }
.ctw-consent-banner .ctw-consent__title {
	display: flex;
	align-items: center;
	min-height: 44px;
	margin: 0;
	padding-right: 84px;
	font-size: 18px;
}
.ctw-consent-banner__toggle {
	position: absolute;
	top: 6px;
	right: 8px;
	display: inline-flex;
	align-items: center;
	gap: 6px;
	min-height: 44px;
	padding: 0 8px;
	color: var(--ctw-c-teal);
	font: 400 14px/1 var(--ctw-c-body);
	text-decoration: underline;
	text-decoration-thickness: 1px;
	text-underline-offset: 0.25em;
	list-style: none;
	cursor: pointer;
}
.ctw-consent-banner__toggle::-webkit-details-marker { display: none; }
.ctw-consent-banner__toggle::after {
	content: "";
	width: 7px;
	height: 7px;
	margin-top: -4px;
	border-right: 1.5px solid currentColor;
	border-bottom: 1.5px solid currentColor;
	rotate: 45deg;
}
.ctw-consent-banner__more[open] .ctw-consent-banner__toggle::after { margin-top: 3px; rotate: -135deg; }
.ctw-consent-banner__toggle:hover { text-decoration-thickness: 2px; }
.ctw-consent-banner__toggle:focus-visible { outline: 2px solid var(--ctw-c-focus); outline-offset: 2px; }
.ctw-consent-banner p { margin-top: 2px; font-size: 14px; line-height: 1.55; }
.ctw-consent-banner p a { color: var(--ctw-c-teal); }
.ctw-consent-banner__more .ctw-consent-banner__manage { margin-top: 2px; padding-inline: 0; }
.ctw-consent-banner__actions {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 4px 10px;
}
.ctw-consent-banner__actions .ctw-consent__btn { padding-inline: 12px; }
.ctw-consent-banner__actions .ctw-consent-banner__manage { display: none; }
@media (min-width: 768px) {
	.ctw-consent-banner {
		grid-template-columns: 1fr auto;
		align-items: center;
		gap: 14px 40px;
		padding: 24px 28px 24px 32px;
	}
	.ctw-consent-banner .ctw-consent__title {
		display: block;
		min-height: 0;
		margin: 0 0 8px;
		padding: 0;
		font-size: 22px;
	}
	.ctw-consent-banner__toggle,
	.ctw-consent-banner__more .ctw-consent-banner__manage { display: none; }
	.ctw-consent-banner p { margin-top: 0; font-size: 15px; }
	.ctw-consent-banner__actions { grid-template-columns: repeat(2, minmax(10em, auto)); }
	.ctw-consent-banner__actions .ctw-consent__btn { padding-inline: 22px; }
	.ctw-consent-banner__actions .ctw-consent-banner__manage { display: inline-flex; grid-column: 1 / -1; }
}
@media (min-width: 1008px) {
	.ctw-consent-banner { bottom: calc(24px + var(--ctw-consent-lift, 0px)); }
}

/* While the banner shows, the end of the page and anything focused can scroll clear of it. */
.ctw-consent-pending { scroll-padding-bottom: var(--ctw-consent-h, 0px); }
.ctw-consent-pending body { padding-bottom: var(--ctw-consent-h, 0px); }

/* Cookie settings dialog. */
.ctw-consent-dialog {
	--ctw-c-focus: var(--ctw-c-ink);
	width: min(600px, 100% - 24px);
	max-width: none;
	max-height: calc(100vh - 24px);
	max-height: calc(100dvh - 24px);
	margin: auto;
	padding: 0;
	overflow: hidden;
	border: 0;
	border-radius: 2px;
	background: var(--ctw-c-paper);
	box-shadow: 0 24px 70px rgb(0 0 0 / 0.35);
	color: var(--ctw-c-ink);
}
.ctw-consent-dialog[open] {
	display: flex;
	flex-direction: column;
}
.ctw-consent-dialog:modal { overscroll-behavior: contain; }
.ctw-consent-dialog::backdrop {
	overflow: hidden;
	overscroll-behavior: contain;
	background: rgb(36 45 47 / 0.62);
}
.ctw-consent-dialog__form {
	display: flex;
	flex: 1 1 auto;
	flex-direction: column;
	min-height: 0;
	margin: 0;
}
.ctw-consent-dialog__body {
	flex: 1 1 auto;
	min-height: 0;
	padding: 30px 32px 8px;
	overflow-y: auto;
	overscroll-behavior: contain;
}
.ctw-consent-dialog__close {
	position: absolute;
	top: 10px;
	right: 10px;
	display: grid;
	place-items: center;
	width: 44px;
	height: 44px;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 2px;
	background: var(--ctw-c-paper);
	box-shadow: none;
	color: var(--ctw-c-ink);
	cursor: pointer;
}
.ctw-consent-dialog__close:hover { background: #e4e0d9; }
.ctw-consent.ctw-consent-dialog .ctw-consent__eyebrow { color: var(--ctw-c-teal-text); }
.ctw-consent-dialog .ctw-consent__title {
	margin-bottom: 12px;
	padding-right: 40px;
	font-size: 30px;
}
.ctw-consent-dialog__intro { font-size: 14px; }
.ctw-consent-dialog p a { color: var(--ctw-c-teal-text); }

.ctw-consent-cats {
	margin: 20px 0 0;
	padding: 0;
	list-style: none;
}
.ctw-consent-cat {
	margin: 0;
	padding: 10px 0 16px;
	border-top: 1px solid var(--ctw-c-line);
}
.ctw-consent-cat__head {
	display: flex;
	align-items: center;
	gap: 16px;
}
.ctw-consent-cat__name {
	display: flex;
	flex: 1 1 auto;
	align-items: center;
	min-height: 44px;
	margin: 0;
	color: var(--ctw-c-ink);
	font: 700 12px/1.3 var(--ctw-c-head);
	letter-spacing: 0.16em;
	text-transform: uppercase;
	cursor: pointer;
}
.ctw-consent-cat__desc {
	max-width: 46em;
	color: var(--ctw-c-muted);
	font-size: 13.5px;
	line-height: 1.55;
}

/* Switches are checkboxes (role="switch") with a written On or Off, so state isn't colour alone. */
.ctw-consent-switch {
	display: inline-flex;
	flex: none;
	align-items: center;
	gap: 10px;
}
.ctw-consent-switch input[type="checkbox"] {
	appearance: none;
	-webkit-appearance: none;
	flex: none;
	width: 52px;
	height: 28px;
	margin: 0;
	padding: 0;
	border: 2px solid var(--ctw-c-muted);
	border-radius: 2px;
	background: #fff linear-gradient(var(--ctw-c-muted), var(--ctw-c-muted)) no-repeat 3px 50% / 18px 18px;
	cursor: pointer;
	vertical-align: middle;
	transition: background-color 0.15s, border-color 0.15s;
}
.ctw-consent-switch input[type="checkbox"]:checked {
	border-color: var(--ctw-c-teal-text);
	background-color: var(--ctw-c-teal-text);
	background-image: linear-gradient(#fff, #fff);
	background-position: calc(100% - 3px) 50%;
}
.ctw-consent-switch input[type="checkbox"]:disabled {
	border-color: var(--ctw-c-teal-ui);
	background-color: var(--ctw-c-teal-ui);
	cursor: not-allowed;
}
.ctw-consent-switch__state {
	order: -1;
	color: var(--ctw-c-muted);
	font: 700 11px/1 var(--ctw-c-head);
	letter-spacing: 0.14em;
	text-transform: uppercase;
}
.ctw-consent-switch input + [data-off]::after { content: attr(data-off); }
.ctw-consent-switch input:checked + [data-on]::after { content: attr(data-on); }
.ctw-consent-switch input:checked + .ctw-consent-switch__state { color: var(--ctw-c-teal-text); }

.ctw-consent-dialog__actions {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 10px;
	padding: 16px 32px 24px;
	border-top: 1px solid var(--ctw-c-line);
}
/* The dialog's three buttons share the site's button look; on the light dialog they turn charcoal on hover. */
.ctw-consent-dialog .ctw-consent__btn:hover {
	border-color: var(--ctw-c-ink);
	background: var(--ctw-c-ink);
	color: var(--ctw-c-paper);
}
.ctw-consent-dialog .ctw-consent__btn--save { grid-column: 1 / -1; }
@media (min-width: 560px) {
	/* Accept all and Reject all share one fixed width, so neither stands out. */
	.ctw-consent-dialog__actions { grid-template-columns: 10.5em 10.5em 1fr; }
	.ctw-consent-dialog .ctw-consent__btn--save {
		grid-column: auto;
		justify-self: end;
	}
}
@media (max-width: 559px) {
	.ctw-consent-dialog__body { padding: 26px 20px 4px; }
	.ctw-consent-dialog .ctw-consent__title { font-size: 26px; }
	.ctw-consent-dialog__actions { padding: 14px 20px 18px; }
}

/* Notice laid over a blocked embed (positioned by consent.js; the iframe itself is untouched). */
.ctw-consent-layer {
	position: absolute;
	z-index: 50;
	top: 0;
	left: 0;
	width: 0;
	height: 0;
}
.ctw-consent-embed {
	position: absolute;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 16px;
	overflow: auto;
	container-type: size;
	background:
		radial-gradient(circle, transparent 40%, rgb(0 0 0 / 0.28)),
		repeating-radial-gradient(circle, rgb(255 255 255 / 0.04) 0 1px, transparent 1px 7px),
		var(--ctw-c-ink);
	text-align: center;
}
.ctw-consent-embed__inner { max-width: 440px; }
.ctw-consent-embed .ctw-consent-embed__text {
	margin: 0 0 14px;
	font-size: 14px;
	line-height: 1.55;
}
.ctw-consent-embed__actions {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: center;
	gap: 6px 18px;
}
.ctw-consent-embed .ctw-consent__btn {
	min-height: 44px;
	padding: 10px 18px;
}
@container (max-height: 220px) {
	.ctw-consent-embed .ctw-consent-embed__text { margin-bottom: 8px; font-size: 13px; }
	.ctw-consent-embed .ctw-consent__eyebrow { display: none; }
}
@container (max-height: 140px) {
	.ctw-consent-embed .ctw-consent-embed__text { display: none; }
	.ctw-consent-embed .ctw-consent__eyebrow { display: block; }
}

/* The footer's Cookie settings control: a small text button that takes the footer's styling. */
.ctw-cookie-settings {
	appearance: none;
	display: inline-block;
	margin: 0;
	padding: 4px 0;
	border: 0;
	background: none;
	box-shadow: none;
	color: inherit;
	font: inherit;
	letter-spacing: inherit;
	text-transform: inherit;
	text-decoration: underline;
	text-decoration-thickness: 1px;
	text-underline-offset: 0.2em;
	cursor: pointer;
}
.ctw-cookie-settings:hover { text-decoration-thickness: 2px; }
.ctw-cookie-settings:focus-visible {
	outline: 2px solid currentColor;
	outline-offset: 2px;
}

@media (prefers-reduced-motion: no-preference) {
	.ctw-consent-banner { transition: opacity 0.35s ease-out, translate 0.35s ease-out; }
	.ctw-consent-dialog[open] { transition: opacity 0.2s ease-out, translate 0.2s ease-out; }
	.ctw-consent-switch input[type="checkbox"] { transition: background-color 0.15s, border-color 0.15s, background-position 0.15s ease-out; }
	@starting-style {
		.ctw-consent-banner { opacity: 0; translate: 0 16px; }
		.ctw-consent-dialog[open] { opacity: 0; translate: 0 12px; }
	}
}

@media (forced-colors: active) {
	.ctw-consent-switch input[type="checkbox"] {
		appearance: auto;
		-webkit-appearance: auto;
		width: 22px;
		height: 22px;
	}
	.ctw-consent-banner,
	.ctw-consent-dialog,
	.ctw-consent-embed { border: 1px solid CanvasText; }
}

@media print {
	.ctw-consent-banner,
	.ctw-consent-layer { display: none !important; }
}
