/*
 * The Hive (la Ruche): library, resource and collection pages.
 * Built on the united theme: Poppins, its palette, buttons, breadcrumbs, hero and anchor nav.
 */

:root {
	--ruche-navy: #1b1e43;
	--ruche-navy-soft: #4a4d6b;
	--ruche-line: #c9cbd8;
	--ruche-lime: #c0ed7c;
	--ruche-lime-pale: #e2edbb;
	--ruche-mint: #a0ffee;
	--ruche-plum: #682b7f;
	--ruche-green: #0d6746;
	--ruche-heart: #e0393e;
	--ruche-heart-pale: #fde4e5;
	--ruche-alert: #ffa8ab;
	--ruche-ease: cubic-bezier(.16, 1, .3, 1);
	--ruche-radius: 16px;
}

.ruche-page ::selection {
	background: var(--ruche-lime);
	color: var(--ruche-navy);
}

.ruche-icon {
	width: 20px;
	height: 20px;
	flex-shrink: 0;
}

/* Hero */

.ruche-hero__grid {
	display: grid;
	grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
	gap: 32px 60px;
	align-items: start;
}

.ruche-hero__title {
	text-wrap: balance;
}

.ruche-hero__intro {
	max-width: 68ch;
	font-size: 18px;
	line-height: 1.6;
}

.ruche-hero__intro a,
.ruche-section__text a,
.ruche-details__description a {
	color: var(--ruche-plum);
	font-weight: 500;
	text-decoration: underline;
	text-underline-offset: 3px;
	overflow-wrap: anywhere;
}

.ruche-hero__funding {
	display: flex;
	align-items: center;
	gap: 16px;
	margin-top: 24px;
	font-size: 14px;
	line-height: 1.45;
}

.ruche-hero__funding img {
	width: 96px;
	height: auto;
	flex-shrink: 0;
}

/* Format tile: decorative icon on a tinted square */

.ruche-tile {
	display: grid;
	place-items: center;
	width: 48px;
	height: 48px;
	border-radius: 12px;
	background: var(--ruche-lime-pale);
	color: var(--ruche-navy);
}

.ruche-tile .ruche-icon {
	width: 22px;
	height: 22px;
}

.ruche-row--collection .ruche-tile {
	background: var(--ruche-lime);
}

.ruche-section--tinted .ruche-tile {
	background: #fff;
}

/* Tags */

.ruche-tags {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
}

.ruche-tag {
	padding: 2px 10px;
	border: 1px solid var(--ruche-line);
	border-radius: 50px;
	font-size: 13px;
	font-weight: 500;
	line-height: 1.6;
}

.ruche-tag--subject {
	border-color: var(--ruche-lime-pale);
	background: var(--ruche-lime-pale);
}

.ruche-tag--format {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding-left: 0;
	border-color: transparent;
	font-weight: 700;
}

.ruche-tag--format .ruche-icon {
	width: 16px;
	height: 16px;
}

.ruche-tag__count {
	font-weight: 400;
	color: var(--ruche-navy-soft);
}

.ruche-tag__count::before {
	content: "·";
	content: "·" / "";
	margin-right: 6px;
}

/* Library layout */

.ruche-library__layout {
	display: grid;
	grid-template-columns: 320px minmax(0, 1fr);
	gap: 48px;
	align-items: start;
}

/* Filters */

.ruche-filters {
	color: #fff;
}

.ruche-filters__toggle {
	display: none;
}

.ruche-filters__body {
	display: flex;
	flex-direction: column;
	gap: 28px;
}

.ruche-group {
	margin: 0;
	padding: 28px 0 0;
	border: 0;
	border-top: 1px solid rgba(255, 255, 255, .22);
	min-width: 0;
}

.ruche-label {
	display: block;
	float: left;
	width: 100%;
	margin: 0 0 12px;
	padding: 0;
	font-size: 16px;
	font-weight: 700;
	line-height: 1.4;
}

.ruche-label + * {
	clear: both;
}

.ruche-search {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 4px 4px 4px 20px;
	border-radius: 50px;
	background: #fff;
	color: var(--ruche-navy);
}

.ruche-search:focus-within {
	outline: 3px solid var(--ruche-lime);
	outline-offset: 3px;
}

.ruche-search input {
	flex: 1;
	min-width: 0;
	padding: 8px 0;
	border: 0;
	background: transparent;
	color: inherit;
	font-size: 16px;
	line-height: 1.5;
	caret-color: var(--ruche-plum);
}

.ruche-search input:focus-visible {
	outline: none;
	box-shadow: none;
}

.ruche-search input::-webkit-search-cancel-button {
	cursor: pointer;
}

.ruche-search__submit {
	display: grid;
	place-items: center;
	width: 44px;
	height: 44px;
	flex-shrink: 0;
	border: 0;
	border-radius: 50%;
	background: var(--ruche-lime);
	color: var(--ruche-navy);
	cursor: pointer;
	transition: background-color 140ms ease-in-out;
}

.ruche-search__submit:hover {
	background: var(--ruche-mint);
}

.ruche-segment {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.ruche-segment__option {
	position: relative;
}

.ruche-segment__option input {
	position: absolute;
	inset: 0;
	opacity: 0;
	margin: 0;
	cursor: pointer;
}

.ruche-segment__option > span {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	min-height: 44px;
	padding: 8px 16px;
	border: 1px solid rgba(255, 255, 255, .7);
	border-radius: 50px;
	font-size: 15px;
	font-weight: 600;
	line-height: 1.3;
	transition: background-color 140ms ease-in-out, color 140ms ease-in-out, border-color 140ms ease-in-out;
}

.ruche-segment__option:hover > span {
	border-color: var(--ruche-mint);
}

.ruche-segment__option input:checked + span {
	border-color: #fff;
	background: #fff;
	color: var(--ruche-navy);
}

.ruche-segment__option input:focus-visible + span {
	outline: 3px solid var(--ruche-lime);
	outline-offset: 3px;
}

.ruche-count {
	display: inline-block;
	min-width: 2.2em;
	padding: 3px 7px;
	border-radius: 50px;
	background: rgba(255, 255, 255, .14);
	font-size: 13px;
	font-weight: 500;
	line-height: 1.2;
	text-align: center;
	font-variant-numeric: tabular-nums;
}

.ruche-segment__option input:checked + span .ruche-count {
	background: var(--ruche-lime-pale);
}

.ruche-checks {
	display: grid;
	gap: 2px;
}

.ruche-checks--level {
	grid-template-columns: repeat(2, minmax(0, 1fr));
	column-gap: 8px;
}

.ruche-check {
	display: flex;
	align-items: center;
	gap: 12px;
	min-height: 44px;
	padding: 6px 10px;
	border-radius: 10px;
	font-size: 16px;
	line-height: 1.3;
	cursor: pointer;
	transition: background-color 140ms ease-in-out;
}

.ruche-check:hover {
	background: rgba(255, 255, 255, .08);
}

.ruche-check input {
	appearance: none;
	display: grid;
	place-items: center;
	width: 22px;
	height: 22px;
	flex-shrink: 0;
	margin: 0;
	border: 2px solid #fff;
	border-radius: 6px;
	background: transparent;
	cursor: pointer;
	transition: background-color 140ms ease-in-out, border-color 140ms ease-in-out;
}

.ruche-check input:checked {
	border-color: var(--ruche-lime);
	background: var(--ruche-lime) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231b1e43' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center / 16px no-repeat;
}

.ruche-check input:focus-visible {
	outline: 3px solid var(--ruche-lime);
	outline-offset: 3px;
	box-shadow: none;
}

.ruche-check__name {
	flex: 1;
	min-width: 0;
}

.ruche-check.is-empty .ruche-check__name,
.ruche-check.is-empty .ruche-count {
	color: #a9abc0;
}

.ruche-filters__actions {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 16px 24px;
	padding-top: 28px;
	border-top: 1px solid rgba(255, 255, 255, .22);
}

.ruche-filters__clear {
	color: #fff;
	font-size: 16px;
	font-weight: 600;
	text-decoration: underline;
	text-underline-offset: 4px;
}

.ruche-filters__clear:hover {
	color: var(--ruche-mint);
}

/* Results */

.ruche-results {
	min-width: 0;
}

.ruche-results__head {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 14px 24px;
	margin-bottom: 24px;
	color: #fff;
}

.ruche-results__count {
	scroll-margin-top: 130px;
}

.ruche-results__count:focus {
	outline: none;
	box-shadow: none;
}

.ruche-chips {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.ruche-chip {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	min-height: 36px;
	padding: 4px 10px 4px 14px;
	border-radius: 50px;
	background: var(--ruche-mint);
	color: var(--ruche-navy);
	font-size: 14px;
	font-weight: 600;
	line-height: 1.4;
}

.ruche-chip .ruche-icon {
	width: 16px;
	height: 16px;
}

.ruche-chip:hover {
	background: var(--ruche-lime);
}

.ruche-list {
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.ruche-row {
	display: grid;
	grid-template-columns: 48px minmax(0, 1fr) auto;
	gap: 12px 24px;
	align-items: start;
	padding: 24px 28px;
	border-radius: var(--ruche-radius);
	background: #fff;
	color: var(--ruche-navy);
}

.ruche-row__main {
	display: flex;
	flex-direction: column;
	gap: 10px;
	min-width: 0;
}

.ruche-row__title {
	font-size: 20px;
	font-weight: 700;
	line-height: 1.3;
	text-wrap: pretty;
	overflow-wrap: anywhere;
}

.ruche-row__title a {
	text-decoration: underline;
	text-decoration-color: transparent;
	text-underline-offset: 4px;
	text-decoration-thickness: 2px;
}

.ruche-row__title a:hover {
	color: var(--ruche-plum);
	text-decoration-color: currentColor;
}

.ruche-row__excerpt {
	display: -webkit-box;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 2;
	overflow: hidden;
	max-width: 75ch;
	font-size: 15px;
	line-height: 1.55;
	color: var(--ruche-navy-soft);
}

.ruche-row__actions {
	display: flex;
	align-items: center;
	gap: 10px;
}

.ruche-row__details {
	padding: 10px 6px;
	color: var(--ruche-plum);
	font-size: 15px;
	font-weight: 600;
	text-decoration: underline;
	text-underline-offset: 3px;
	white-space: nowrap;
}

.ruche-row__details:hover {
	color: var(--ruche-navy);
}

.ruche-open {
	white-space: nowrap;
}

.ruche-open .ruche-icon {
	width: 18px;
	height: 18px;
}

.ruche-button-outline {
	border-color: var(--ruche-navy);
	background: transparent;
	color: var(--ruche-navy);
	white-space: nowrap;
}

.ruche-button-outline:hover {
	background: var(--ruche-navy);
	color: #fff;
}

.ruche-button-outline .ruche-icon {
	width: 18px;
	height: 18px;
}

/* Favourite */

.ruche-fav {
	margin: 0;
}

.ruche-fav__button {
	display: grid;
	place-items: center;
	width: 48px;
	height: 48px;
	padding: 0;
	border: 1px solid var(--ruche-line);
	border-radius: 50%;
	background: #fff;
	color: var(--ruche-navy);
	cursor: pointer;
	transition: border-color 140ms ease-in-out, background-color 140ms ease-in-out;
}

.ruche-fav__button:hover {
	border-color: var(--ruche-heart);
	color: var(--ruche-heart);
}

.ruche-fav__icon {
	width: 22px;
	height: 22px;
	transition: fill 140ms ease-in-out;
}

.ruche-fav__button[aria-pressed="true"] {
	border-color: var(--ruche-heart);
	color: var(--ruche-heart);
}

.ruche-fav__button[aria-pressed="true"] .ruche-fav__icon {
	fill: var(--ruche-heart);
}

.ruche-fav__button.is-toggled .ruche-fav__icon {
	animation: ruche-pop 320ms var(--ruche-ease);
}

.ruche-fav--labelled .ruche-fav__button {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	width: auto;
	height: auto;
	min-height: 52px;
	padding: 12px 22px 12px 18px;
	border-radius: 50px;
	font-size: 16px;
	font-weight: 600;
	letter-spacing: 1px;
	line-height: 1.5;
}

/* The heart red is 4.35:1 on white: fine for the icon, too pale for the label text */
.ruche-fav--labelled .ruche-fav__button:hover,
.ruche-fav--labelled .ruche-fav__button[aria-pressed="true"] {
	color: var(--ruche-navy);
}

.ruche-fav--labelled .ruche-fav__button:hover .ruche-fav__icon,
.ruche-fav--labelled .ruche-fav__button[aria-pressed="true"] .ruche-fav__icon {
	color: var(--ruche-heart);
}

.ruche-fav__button[aria-busy="true"] {
	cursor: progress;
}

@keyframes ruche-pop {
	40% {
		transform: scale(1.3);
	}
}

/* Empty state and pagination */

.ruche-empty {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 12px;
	padding: 40px;
	border: 1px dashed rgba(255, 255, 255, .4);
	border-radius: var(--ruche-radius);
	color: #fff;
	font-size: 18px;
}

.ruche-empty .button {
	margin-top: 8px;
}

.ruche-pagination {
	margin-top: 40px;
}

.ruche-pagination .ruche-icon {
	width: 18px;
	height: 18px;
}

/* Details sheet */

.ruche-sheet {
	inset: 0 0 0 auto;
	width: min(560px, 100vw);
	max-width: 100vw;
	height: 100dvh;
	max-height: 100dvh;
	margin: 0 0 0 auto;
	padding: 0;
	border: 0;
	border-radius: 25px 0 0 25px;
	background: #fff;
	color: var(--ruche-navy);
	box-shadow: -30px 0 60px -30px rgba(0, 0, 0, .55);
}

.ruche-sheet[open] {
	animation: ruche-sheet-in 360ms var(--ruche-ease);
}

.ruche-sheet::backdrop {
	background: rgba(27, 30, 67, .6);
	backdrop-filter: blur(3px);
}

.ruche-sheet[open]::backdrop {
	animation: ruche-fade-in 360ms var(--ruche-ease);
}

@keyframes ruche-sheet-in {
	from {
		transform: translateX(48px);
		opacity: 0;
	}
}

@keyframes ruche-fade-in {
	from {
		opacity: 0;
	}
}

.ruche-sheet__panel {
	position: relative;
	height: 100%;
	overflow-y: auto;
	overscroll-behavior: contain;
	padding: 32px 40px 48px;
}

.ruche-sheet__close {
	position: sticky;
	top: 0;
	float: right;
	display: grid;
	place-items: center;
	width: 44px;
	height: 44px;
	margin: 0 -12px 0 16px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: var(--ruche-navy);
	color: #fff;
	cursor: pointer;
	transition: background-color 140ms ease-in-out, color 140ms ease-in-out;
}

.ruche-sheet__close:hover {
	background: var(--ruche-lime);
	color: var(--ruche-navy);
}

.ruche-sheet__body {
	display: flex;
	flex-direction: column;
	gap: 20px;
	padding-top: 8px;
}

.ruche-details__title {
	text-wrap: balance;
	overflow-wrap: anywhere;
}

.ruche-details__description {
	font-size: 18px;
	line-height: 1.6;
}

.ruche-details__description > * {
	margin-bottom: 16px;
}

.ruche-details__actions {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 12px;
	padding-top: 4px;
}

.ruche-open--large {
	padding: 14px 26px;
}

/* Resource page */

.ruche-details {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 24px;
	max-width: 880px;
	margin-top: 8px;
}

/* Collection page */

.ruche-collection__head {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 20px;
	max-width: 960px;
}

.ruche-collection__title {
	text-wrap: balance;
	overflow-wrap: anywhere;
}

.ruche-collection__intro {
	font-size: 18px;
	line-height: 1.6;
}

.ruche-collection__intro > * {
	margin-bottom: 16px;
}

.ruche-section__inner {
	max-width: 1080px;
}

.ruche-section__title {
	margin-bottom: 20px;
}

.ruche-section__text {
	max-width: 75ch;
	margin-bottom: 28px;
	font-size: 18px;
	line-height: 1.6;
}

.ruche-links {
	border-top: 1px solid rgba(27, 30, 67, .2);
}

.ruche-link {
	display: grid;
	grid-template-columns: 44px minmax(0, 1fr) auto;
	gap: 12px 24px;
	align-items: start;
	padding: 20px 0;
	border-bottom: 1px solid rgba(27, 30, 67, .2);
}

.ruche-link .ruche-tile {
	width: 44px;
	height: 44px;
}

.ruche-link__main {
	min-width: 0;
}

.ruche-link__title {
	font-size: 18px;
	font-weight: 600;
	line-height: 1.4;
	overflow-wrap: anywhere;
}

.ruche-link__meta {
	margin-top: 2px;
	font-size: 14px;
	line-height: 1.4;
	color: var(--ruche-navy-soft);
}

.ruche-link__more {
	margin-top: 6px;
	font-size: 16px;
	line-height: 1.55;
}

.ruche-link__more summary,
.ruche-hero__about-toggle {
	display: inline-flex;
	align-items: center;
	min-height: 24px;
	gap: 6px;
	color: var(--ruche-plum);
	font-size: 14px;
	font-weight: 600;
	text-decoration: underline;
	text-underline-offset: 3px;
	cursor: pointer;
	list-style: none;
}

.ruche-link__more summary::-webkit-details-marker,
.ruche-hero__about-toggle::-webkit-details-marker {
	display: none;
}

.ruche-link__more summary::after,
.ruche-hero__about-toggle::after {
	content: '';
	width: 7px;
	height: 7px;
	margin-top: -3px;
	border-right: 2px solid currentColor;
	border-bottom: 2px solid currentColor;
	transform: rotate(45deg);
	transition: transform 140ms ease-in-out;
}

.ruche-link__more[open] summary::after,
.ruche-hero__about[open] .ruche-hero__about-toggle::after {
	margin-top: 3px;
	transform: rotate(225deg);
}

.ruche-link__more .the-content {
	max-width: 75ch;
	padding-top: 8px;
}

/* Imported Kentico text carries long bare addresses */
.ruche-page .the-content {
	overflow-wrap: anywhere;
}

.ruche-link .ruche-open {
	margin-top: 4px;
}

/* Member bar: the member's pages, in the light panel of every Hive page */

.ruche-hero__top {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 16px 32px;
	margin-bottom: 40px;
}

.ruche-hero__top .breadcrumbs {
	margin-bottom: 0;
}

.ruche-member ul {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.ruche-member__link {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	min-height: 44px;
	padding: 8px 16px 8px 14px;
	border: 1.5px solid var(--ruche-navy);
	border-radius: 50px;
	color: var(--ruche-navy);
	font-size: 15px;
	font-weight: 600;
	line-height: 1.3;
	text-decoration: none;
	transition: background-color 140ms ease-in-out, color 140ms ease-in-out;
}

.ruche-member__link .ruche-icon {
	width: 18px;
	height: 18px;
}

.ruche-member__link:hover {
	background: #fff;
}

.ruche-member__link[aria-current="page"] {
	background: var(--ruche-navy);
	color: #fff;
}

.ruche-member__link:focus-visible {
	outline: 3px solid var(--ruche-navy);
	outline-offset: 3px;
}

.ruche-member__count {
	min-width: 2.2em;
	padding: 1px 7px;
	border-radius: 50px;
	background: #fff;
	font-size: 13px;
	font-variant-numeric: tabular-nums;
	text-align: center;
}

.ruche-member__link:hover .ruche-member__count {
	background: var(--ruche-lime-pale);
}

.ruche-member__link[aria-current="page"] .ruche-member__count {
	background: rgba(255, 255, 255, .16);
}

/* Account pages: the form sits on navy in the columns of the light panel above */

.ruche-account {
	display: grid;
	grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
	gap: 40px 60px;
	align-items: start;
	color: #fff;
}

.ruche-hero__text > p + p {
	margin-top: 16px;
}

.ruche-hero__text > p + .ruche-steps__title {
	margin-top: 24px;
}

.ruche-account__main {
	display: flex;
	flex-direction: column;
	gap: 32px;
	min-width: 0;
}

.ruche-form {
	display: flex;
	flex-direction: column;
	gap: 24px;
	max-width: 520px;
}

.ruche-form__title {
	margin: 0;
	color: #fff;
}

.ruche-form__pair {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 24px 16px;
}

.ruche-form .ruche-label {
	float: none;
	margin-bottom: 10px;
}

.ruche-label__optional {
	font-weight: 400;
	color: rgba(255, 255, 255, .8);
}

.ruche-input,
.ruche-select select,
.ruche-textarea {
	display: block;
	width: 100%;
	min-height: 52px;
	margin: 0;
	padding: 12px 20px;
	border: 0;
	border-radius: 50px;
	background: #fff;
	color: var(--ruche-navy);
	font: inherit;
	font-size: 16px;
	line-height: 1.5;
	caret-color: var(--ruche-plum);
	box-shadow: none;
}

.ruche-textarea {
	min-height: 120px;
	border-radius: var(--ruche-radius);
	resize: vertical;
}

.ruche-input:focus-visible,
.ruche-select select:focus-visible,
.ruche-textarea:focus-visible,
.ruche-password:focus-within {
	outline: 3px solid var(--ruche-lime);
	outline-offset: 3px;
	box-shadow: none;
}

/* Browser autofill keeps the white pill instead of its tinted fill */
.ruche-input:-webkit-autofill,
.ruche-input:-webkit-autofill:focus {
	-webkit-text-fill-color: var(--ruche-navy);
	box-shadow: 0 0 0 100px #fff inset;
}

.ruche-select {
	position: relative;
}

.ruche-select select {
	appearance: none;
	padding-right: 52px;
	cursor: pointer;
}

.ruche-select::after {
	content: '';
	position: absolute;
	top: 50%;
	right: 24px;
	width: 8px;
	height: 8px;
	margin-top: -6px;
	border-right: 2px solid var(--ruche-navy);
	border-bottom: 2px solid var(--ruche-navy);
	transform: rotate(45deg);
	pointer-events: none;
}

.ruche-password {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 4px 4px 4px 20px;
	border-radius: 50px;
	background: #fff;
}

.ruche-password .ruche-input {
	flex: 1;
	min-width: 0;
	min-height: 44px;
	padding: 8px 0;
	border-radius: 0;
	background: transparent;
}

.ruche-password .ruche-input:focus-visible {
	outline: none;
}

.ruche-password__toggle {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	min-height: 44px;
	padding: 0 16px 0 12px;
	border: 0;
	border-radius: 50px;
	background: var(--ruche-lime-pale);
	color: var(--ruche-navy);
	font: inherit;
	font-size: 15px;
	font-weight: 600;
	cursor: pointer;
	transition: background-color 140ms ease-in-out;
}

.ruche-password__toggle[hidden] {
	display: none;
}

.ruche-password__toggle:hover {
	background: var(--ruche-mint);
}

.ruche-password__toggle:focus-visible {
	outline: 3px solid var(--ruche-navy);
	outline-offset: -3px;
}

.ruche-password__toggle .ruche-icon {
	width: 18px;
	height: 18px;
}

.ruche-hint {
	margin: 10px 0 0;
	color: rgba(255, 255, 255, .8);
	font-size: 14px;
	line-height: 1.5;
}

.ruche-error {
	display: flex;
	align-items: flex-start;
	gap: 8px;
	margin: 10px 0 0;
	color: var(--ruche-alert);
	font-size: 15px;
	font-weight: 600;
	line-height: 1.45;
}

.ruche-error .ruche-icon {
	width: 18px;
	height: 18px;
	margin-top: 1px;
}

.ruche-field.has-error .ruche-input:not(:focus-visible),
.ruche-field.has-error .ruche-select select:not(:focus-visible),
.ruche-field.has-error .ruche-textarea:not(:focus-visible),
.ruche-field.has-error .ruche-password:not(:focus-within) {
	outline: 2px solid var(--ruche-alert);
	outline-offset: 3px;
}

.ruche-field.has-error .ruche-password .ruche-input {
	outline: none;
}

.ruche-form .ruche-check {
	align-self: flex-start;
	margin: -8px 0 0 -10px;
}

.ruche-form__actions {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 16px 28px;
	margin-top: 4px;
}

.ruche-form__actions .button {
	margin: 0;
}

.ruche-form__actions .ruche-link-light {
	display: inline-flex;
	align-items: center;
	min-height: 24px;
}

/* Phones: the door sits below the fold, so the login form carries a short way to it */
.ruche-account__shortcut {
	display: none;
}

.ruche-link-light {
	color: #fff;
	font-size: 16px;
	font-weight: 600;
	text-decoration: underline;
	text-underline-offset: 4px;
	overflow-wrap: anywhere;
}

.ruche-link-light:hover {
	color: var(--ruche-mint);
}

.ruche-legal {
	margin: 0;
	color: rgba(255, 255, 255, .8);
	font-size: 14px;
	line-height: 1.55;
}

.ruche-trap {
	position: absolute;
	left: -9999px;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

/* The other door: request access from the login, log in from the request */

.ruche-door {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 16px;
	max-width: 560px;
	padding: 32px 36px;
	border-radius: var(--ruche-radius);
	background: rgba(255, 255, 255, .07);
	font-size: 16px;
	line-height: 1.6;
}

.ruche-door__title {
	margin: 0;
	color: #fff;
}

.ruche-door p {
	margin: 0;
}

.ruche-door .button {
	margin: 4px 0 0;
}

.ruche-door__help {
	align-self: stretch;
	margin-top: 8px !important;
	padding-top: 20px;
	border-top: 1px solid rgba(255, 255, 255, .22);
	color: rgba(255, 255, 255, .8);
	font-size: 15px;
}

.ruche-button-outline--light {
	border-color: #fff;
	color: #fff;
}

.ruche-button-outline--light:hover {
	background: #fff;
	color: var(--ruche-navy);
}

/* Messages: a register line with its icon tile */

.ruche-notice {
	display: grid;
	grid-template-columns: 48px minmax(0, 1fr);
	gap: 16px;
	align-items: start;
	max-width: 640px;
	padding: 20px 24px;
	border-radius: var(--ruche-radius);
	background: #fff;
	color: var(--ruche-navy);
	font-size: 16px;
	line-height: 1.55;
}

.ruche-notice:focus {
	outline: none;
	box-shadow: none;
}

.ruche-notice__body {
	align-self: center;
}

.ruche-notice__body > * + * {
	margin-top: 8px;
}

.ruche-notice__title {
	font-weight: 700;
}

.ruche-notice__list {
	margin: 8px 0 0;
	padding-left: 20px;
	list-style: disc;
}

.ruche-notice a {
	color: var(--ruche-plum);
	font-weight: 600;
	text-decoration: underline;
	text-underline-offset: 3px;
}

.ruche-notice--error .ruche-tile {
	background: var(--ruche-heart-pale);
	color: var(--ruche-heart);
}

.ruche-notice--success .ruche-tile {
	color: var(--ruche-green);
}

/* Next steps after a request */

.ruche-steps {
	display: flex;
	flex-direction: column;
	gap: 12px;
	margin: 0;
	padding: 0;
	list-style: none;
	counter-reset: ruche-step;
}

.ruche-steps li {
	display: grid;
	grid-template-columns: 32px minmax(0, 1fr);
	gap: 14px;
	align-items: center;
	counter-increment: ruche-step;
}

.ruche-steps li::before {
	content: counter(ruche-step);
	display: grid;
	place-items: center;
	width: 32px;
	height: 32px;
	border-radius: 50%;
	background: var(--ruche-navy);
	color: #fff;
	font-size: 15px;
	font-weight: 700;
}

.ruche-steps__title {
	margin-bottom: 12px;
	font-size: 16px;
	font-weight: 700;
}

/* Favourites */

.ruche-favorites__count {
	margin: 0 0 24px;
	color: #fff;
}

/* Desktop: the filters stay in view while the results scroll */

@media (min-width: 1180px) {
	.ruche-filters {
		position: sticky;
		top: 124px;
		max-height: calc(100dvh - 148px);
		margin: -6px;
		padding: 6px;
		overflow-y: auto;
		overscroll-behavior: contain;
		scrollbar-width: thin;
		scrollbar-color: rgba(255, 255, 255, .35) transparent;
	}

	.ruche-filters__actions {
		position: sticky;
		bottom: -6px;
		padding-bottom: 12px;
		background: var(--ruche-navy);
	}

	.ruche-filters__actions::before {
		content: "";
		position: absolute;
		inset: auto 0 100%;
		height: 64px;
		background: linear-gradient(rgba(27, 30, 67, 0), var(--ruche-navy));
		opacity: 0;
		transition: opacity 140ms ease-in-out;
		pointer-events: none;
	}

	.ruche-filters.has-more .ruche-filters__actions::before {
		opacity: 1;
	}
}

@media (min-width: 768px) {
	.ruche-hero__about-toggle {
		display: none;
	}
}

/* Tablet and phone */

@media (max-width: 1179px) {
	.ruche-hero__grid {
		grid-template-columns: 1fr;
	}

	.ruche-library__layout {
		grid-template-columns: 1fr;
		gap: 24px;
	}

	.ruche-filters__panel {
		border-radius: var(--ruche-radius);
		background: rgba(255, 255, 255, .07);
	}

	.ruche-filters__toggle {
		display: flex;
		align-items: center;
		gap: 10px;
		min-height: 52px;
		padding: 10px 20px;
		font-size: 16px;
		font-weight: 700;
		cursor: pointer;
		list-style: none;
	}

	.ruche-filters__toggle::-webkit-details-marker {
		display: none;
	}

	.ruche-filters__toggle::after {
		content: '';
		width: 8px;
		height: 8px;
		margin: -4px 4px 0 auto;
		border-right: 2px solid currentColor;
		border-bottom: 2px solid currentColor;
		transform: rotate(45deg);
		transition: transform 140ms ease-in-out;
	}

	.ruche-filters__panel[open] .ruche-filters__toggle::after {
		margin-top: 4px;
		transform: rotate(225deg);
	}

	.ruche-filters__badge {
		display: grid;
		place-items: center;
		min-width: 24px;
		height: 24px;
		padding: 0 6px;
		border-radius: 50px;
		background: var(--ruche-lime);
		color: var(--ruche-navy);
		font-size: 13px;
	}

	.ruche-filters__body {
		padding: 4px 20px 24px;
	}

	.ruche-checks--subject {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		column-gap: 8px;
	}

	.ruche-checks--level {
		grid-template-columns: repeat(4, minmax(0, 1fr));
	}

	.ruche-results__count {
		scroll-margin-top: 90px;
	}

	.ruche-account {
		grid-template-columns: 1fr;
	}
}

@media (max-width: 767px) {
	.ruche-hero__intro {
		font-size: 16px;
	}

	.ruche-hero__top {
		margin-bottom: 24px;
	}

	.ruche-hero__about-toggle {
		font-size: 16px;
	}

	.ruche-hero__about[open] .ruche-hero__text {
		padding-top: 14px;
	}

	.ruche-row,
	.ruche-link {
		grid-template-columns: 40px minmax(0, 1fr);
		gap: 14px;
	}

	.ruche-row {
		padding: 20px;
	}

	.ruche-tile,
	.ruche-link .ruche-tile {
		width: 40px;
		height: 40px;
		border-radius: 10px;
	}

	.ruche-tile .ruche-icon {
		width: 18px;
		height: 18px;
	}

	.ruche-row__actions {
		grid-column: 1 / -1;
	}

	.ruche-row__actions .ruche-fav {
		margin-left: auto;
	}

	.ruche-link .ruche-open {
		grid-column: 2;
		justify-self: start;
		margin-top: 0;
	}

	.ruche-checks--subject,
	.ruche-checks--level {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.ruche-sheet {
		width: 100vw;
		border-radius: 0;
	}

	.ruche-sheet__panel {
		padding: 20px 20px 40px;
	}

	.ruche-empty {
		padding: 28px 20px;
	}

	.ruche-form__pair {
		grid-template-columns: 1fr;
	}

	.ruche-form__actions .button {
		width: 100%;
		justify-content: center;
	}

	.ruche-door {
		padding: 24px 20px;
	}

	.ruche-account__shortcut {
		display: block;
		margin: 0;
	}

	.ruche-notice {
		grid-template-columns: 40px minmax(0, 1fr);
		gap: 14px;
		padding: 18px 20px;
	}

	.ruche-notice .ruche-tile {
		width: 40px;
		height: 40px;
		border-radius: 10px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.ruche-sheet[open],
	.ruche-sheet[open]::backdrop,
	.ruche-fav__button.is-toggled .ruche-fav__icon {
		animation: none;
	}
}

@media (forced-colors: active) {
	.ruche-check input:checked {
		background: Highlight;
		forced-color-adjust: none;
	}

	.ruche-segment__option input:checked + span {
		border-color: Highlight;
		background: Highlight;
		color: HighlightText;
		forced-color-adjust: none;
	}

	.ruche-segment__option input:checked + span .ruche-count {
		background: transparent;
	}

	.ruche-member__link[aria-current="page"] {
		border-color: Highlight;
		background: Highlight;
		color: HighlightText;
		forced-color-adjust: none;
	}

	.ruche-input,
	.ruche-select select,
	.ruche-textarea,
	.ruche-password {
		border: 1px solid CanvasText;
	}

	.ruche-password .ruche-input {
		border: 0;
	}

	.ruche-notice,
	.ruche-door {
		border: 1px solid CanvasText;
	}
}
