/**
 * ResourcePort - resource library.
 *
 * Mobile first: the base rules describe a phone, wider screens are added on
 * top. Everything is scoped to .resourceport so a theme's styles cannot leak in
 * and ours cannot leak out.
 *
 * Tokens can be overridden by a theme on .resourceport. They are declared on
 * :where(), which has no specificity, so any theme rule wins without a fight.
 * The accent color chosen in the settings arrives the same way, after this file.
 */

/* --------------------------------------------------------------- Tokens */

:where(.resourceport) {
	--resourceport-tap: 44px;
	--resourceport-font-small: 0.875rem;
}


/* ----------------------------------------------------------------- Base */

/* The shell measures the space a library has; layouts query it, not the viewport. */
.resourceport-shell {
	container-type: inline-size;
}

.resourceport {
	box-sizing: border-box;
	line-height: 1.5;
}

.resourceport *,
.resourceport *::before,
.resourceport *::after {
	box-sizing: inherit;
}

/*
 * Themes color paragraphs through Global Styles, which would override the
 * color these elements should inherit. Setting it explicitly here is what
 * keeps text readable in every theme.
 */
.resourceport p,
.resourceport li,
.resourceport strong {
	color: inherit;
}

.resourceport p {
	margin: 0;
}

.resourceport ul,
.resourceport ol {
	margin: 0;
	padding: 0;
	list-style: none;
}

/* The hidden attribute must win over any display value set below. */
.resourceport [hidden] {
	display: none !important;
}

/* Only needed without the script, which adds .resourceport--js. A noscript
   element would not do: the output allowlist does not keep it. */
.resourceport.resourceport--js .resourceport-nojs {
	display: none !important;
}

.resourceport .resourceport-visually-hidden {
	position: absolute !important;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

.resourceport .resourceport-icon {
	flex: none;
	width: 20px;
	height: 20px;
}

/* -------------------------------------------------------------- Buttons */

.resourceport .resourceport-button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	min-height: var(--resourceport-tap);
	margin: 0;
	padding: 10px 16px;
	border: 1px solid transparent;
	border-radius: var(--resourceport-radius-small);
	font: inherit;
	font-size: 0.9375rem;
	font-weight: 600;
	line-height: 1.2;
	text-decoration: none;
	white-space: nowrap;
	cursor: pointer;
	transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.resourceport .resourceport-button--primary {
	background: var(--resourceport-color-accent);
	color: var(--resourceport-color-accent-contrast);
}

.resourceport .resourceport-button--primary:hover {
	background: color-mix(in srgb, var(--resourceport-color-accent) 86%, #000000);
	color: var(--resourceport-color-accent-contrast);
}

.resourceport .resourceport-button--secondary {
	background: transparent;
	border-color: var(--resourceport-color-border);
	color: inherit;
}

.resourceport .resourceport-button--secondary:hover {
	background: var(--resourceport-color-hover);
	color: inherit;
}

.resourceport .resourceport-icon-button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: var(--resourceport-tap);
	height: var(--resourceport-tap);
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: var(--resourceport-radius-small);
	background: transparent;
	color: inherit;
	cursor: pointer;
}

.resourceport .resourceport-icon-button:hover {
	background: var(--resourceport-color-hover);
}

.resourceport a:focus-visible,
.resourceport button:focus-visible,
.resourceport input:focus-visible,
.resourceport select:focus-visible,
.resourceport [tabindex]:focus-visible {
	outline: 2px solid var(--resourceport-color-focus);
	outline-offset: 2px;
}

/* -------------------------------------------------------------- Results */

.resourceport .resourceport-results-region {
	transition: opacity 0.2s ease;
}

.resourceport[aria-busy="true"] .resourceport-results-region {
	opacity: 0.5;
}

/* --------------------------------------------------------- Empty state */

.resourceport .resourceport-empty {
	display: grid;
	justify-items: center;
	gap: 8px;
	padding: 40px 16px;
	border: 1px dashed var(--resourceport-color-border);
	border-radius: var(--resourceport-radius);
	text-align: center;
}

.resourceport .resourceport-empty__title {
	font-weight: 600;
}

.resourceport .resourceport-empty__text {
	color: var(--resourceport-color-muted);
}

/* ---------------------------------------------------------- Pagination */

.resourceport .resourceport-pagination {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
	margin-top: 20px;
}

.resourceport .resourceport-pagination__step,
.resourceport .resourceport-pagination__page {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 4px;
	min-width: var(--resourceport-tap);
	min-height: var(--resourceport-tap);
	padding: 0 10px;
	border-radius: var(--resourceport-radius-small);
	color: inherit;
	text-decoration: none;
}

.resourceport a.resourceport-pagination__step:hover,
.resourceport a.resourceport-pagination__page:hover {
	background: var(--resourceport-color-hover);
}

.resourceport .resourceport-pagination__page[aria-current="page"] {
	background: var(--resourceport-color-accent);
	color: var(--resourceport-color-accent-contrast);
	font-weight: 600;
}

.resourceport .resourceport-pagination__pages {
	display: none;
}

.resourceport .resourceport-pagination__status {
	color: var(--resourceport-color-muted);
	font-size: var(--resourceport-font-small);
}

.resourceport .resourceport-pagination__gap {
	display: inline-flex;
	align-items: center;
	padding: 0 4px;
	color: var(--resourceport-color-muted);
}

@media (min-width: 640px) {
	.resourceport .resourceport-pagination {
		justify-content: center;
	}

	.resourceport .resourceport-pagination__pages {
		display: flex;
		gap: 4px;
	}

	.resourceport .resourceport-pagination__status {
		display: none;
	}
}

.resourceport .resourceport-load-more {
	display: flex;
	justify-content: center;
	margin-top: 20px;
}

/* -------------------------------------------------------------- Preview */

.resourceport .resourceport-lightbox {
	width: min(1100px, 94vw);
	max-width: none;
	max-height: 92vh;
	margin: auto;
	padding: 0;
	border: 0;
	border-radius: var(--resourceport-radius);
	background: var(--resourceport-color-panel);
	color: var(--resourceport-color-panel-text);
	overflow: hidden;
}

.resourceport .resourceport-lightbox::backdrop {
	background: rgba(0, 0, 0, 0.72);
}

.resourceport .resourceport-lightbox__bar {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 8px 8px 8px 16px;
	border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.resourceport .resourceport-lightbox__title {
	flex: 1;
	min-width: 0;
	margin: 0;
	overflow: hidden;
	color: inherit;
	font-size: 1rem;
	font-weight: 600;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.resourceport .resourceport-lightbox__stage {
	display: grid;
	place-items: center;
	height: min(80vh, 900px);
	background: #111111;
}

.resourceport .resourceport-lightbox__stage img {
	display: block;
	max-width: 100%;
	max-height: min(80vh, 900px);
	object-fit: contain;
}

.resourceport .resourceport-lightbox__stage object {
	width: 100%;
	height: 100%;
	border: 0;
	background: #ffffff;
}

@media (max-width: 767px) {
	.resourceport .resourceport-lightbox {
		width: 100vw;
		max-height: 100dvh;
		height: 100dvh;
		border-radius: 0;
	}

	.resourceport .resourceport-lightbox__stage {
		height: calc(100dvh - 61px - env(safe-area-inset-bottom));
	}

	/* Visually hidden, not display:none: the button keeps its accessible name. */
	.resourceport .resourceport-lightbox__download .resourceport-button__label {
		position: absolute;
		width: 1px;
		height: 1px;
		margin: -1px;
		padding: 0;
		overflow: hidden;
		clip: rect(0, 0, 0, 0);
		white-space: nowrap;
		border: 0;
	}
}

/* Scrolling the page behind an open preview feels broken. */
html:has(.resourceport-lightbox[open]) {
	overflow: hidden;
}

/* ------------------------------------------------------ Reduced motion */

@media (prefers-reduced-motion: reduce) {
	.resourceport *,
	.resourceport *::before,
	.resourceport *::after {
		transition: none !important;
		animation: none !important;
		scroll-behavior: auto !important;
	}
}

/* ===================================================================== */
/* The index                                                              */
/*                                                                        */
/* Collections are tabs above a calm list - one row per document, grouped */
/* by month - with covers set in type as the grid view, and a details     */
/* panel for every document: on the right on wide screens, a sheet from   */
/* the bottom on phones. On narrow screens the tabs become chips.         */
/*                                                                        */
/* Lines, muted text and soft surfaces are mixed from currentColor, so    */
/* the index follows the theme's text color. The primary action is a     */
/* dark ink; a dark theme sets --resourceport-color-accent and -contrast. */
/* The rules below carry .resourceport--look-modern, which every library, */
/* resource page and sign-in page has, so they build on the shared rules  */
/* above and win over them.                                               */
/* ===================================================================== */

:where(.resourceport--look-modern) {
	--resourceport-color-accent: #111111;
	--resourceport-color-accent-contrast: #ffffff;
	--resourceport-color-highlight: #ffee58;
	--resourceport-color-highlight-ink: #111111;
	--resourceport-color-focus: currentColor;
	--resourceport-color-muted: color-mix(in srgb, currentColor 66%, transparent);
	--resourceport-color-quiet: color-mix(in srgb, currentColor 80%, transparent);
	--resourceport-color-border: color-mix(in srgb, currentColor 18%, transparent);
	--resourceport-color-code: color-mix(in srgb, currentColor 22%, transparent);
	--resourceport-color-line: color-mix(in srgb, currentColor 11%, transparent);
	--resourceport-color-line-soft: color-mix(in srgb, currentColor 8%, transparent);
	--resourceport-color-surface: color-mix(in srgb, #8a7f5c 9%, transparent);
	--resourceport-color-hover: color-mix(in srgb, #8a7f5c 4%, transparent);
	--resourceport-color-press: color-mix(in srgb, #8a7f5c 10%, transparent);
	--resourceport-color-panel: #ffffff;
	--resourceport-color-panel-text: #111111;
	--resourceport-radius: 12px;
	--resourceport-radius-small: 8px;
}

@supports not (color: color-mix(in srgb, red, blue)) {
	:where(.resourceport--look-modern) {
		--resourceport-color-muted: #5f5f5a;
		--resourceport-color-quiet: #3d3d39;
		--resourceport-color-border: #d6d6d0;
		--resourceport-color-code: #cfcfc8;
		--resourceport-color-line: #e4e4df;
		--resourceport-color-line-soft: #ecece8;
		--resourceport-color-surface: #f4f3ef;
		--resourceport-color-hover: #fafaf7;
		--resourceport-color-press: #f2f2ee;
	}
}

/* ----------------------------------------------------- Buttons */

.resourceport--look-modern .resourceport-button {
	min-height: 44px;
	padding: 10px 18px;
	border-radius: var(--resourceport-radius-small);
	font-size: 1rem;
	font-weight: 700;
}

.resourceport--look-modern .resourceport-button .resourceport-icon {
	width: 18px;
	height: 18px;
	stroke-width: 2;
}

.resourceport--look-modern .resourceport-button--primary:hover {
	background: color-mix(in srgb, var(--resourceport-color-accent) 82%, #ffffff);
	color: var(--resourceport-color-accent-contrast);
}

.resourceport--look-modern .resourceport-button--outline {
	border-color: currentColor;
	background: transparent;
	color: inherit;
}

.resourceport--look-modern .resourceport-button--secondary {
	border-color: var(--resourceport-color-border);
}

.resourceport--look-modern .resourceport-button--outline:hover,
.resourceport--look-modern .resourceport-button--secondary:hover {
	background: var(--resourceport-color-press);
	color: inherit;
}

.resourceport--look-modern .resourceport-icon-button {
	width: 44px;
	height: 44px;
	border: 1px solid transparent;
	border-radius: var(--resourceport-radius-small);
	color: inherit;
}

.resourceport--look-modern .resourceport-icon-button:hover {
	background: var(--resourceport-color-press);
}

.resourceport--look-modern .resourceport-icon-button .resourceport-icon {
	width: 18px;
	height: 18px;
	stroke-width: 2;
}

.resourceport--look-modern .resourceport-row__actions .resourceport-icon-button,
.resourceport--look-modern .resourceport-cover__actions .resourceport-icon-button,
.resourceport--look-modern .resourceport-details__actions .resourceport-icon-button {
	border-color: var(--resourceport-color-border);
}

/* A quiet action: a word and an arrow, no frame. */
.resourceport--look-modern .resourceport-text-button {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	min-height: 44px;
	padding: 0 12px;
	border-radius: var(--resourceport-radius-small);
	color: inherit;
	font-size: 1rem;
	font-weight: 700;
	line-height: 1.2;
	text-decoration: none;
	white-space: nowrap;
}

.resourceport--look-modern .resourceport-text-button:hover {
	background: var(--resourceport-color-press);
	color: inherit;
}

.resourceport--look-modern .resourceport-text-button .resourceport-icon {
	width: 16px;
	height: 16px;
	stroke-width: 2.2;
}

.resourceport--look-modern .resourceport-text-link {
	display: inline-flex;
	align-items: center;
	min-height: 44px;
	padding: 0 12px;
	border-radius: var(--resourceport-radius-small);
	color: inherit;
	font-size: 1rem;
	font-weight: 600;
	text-decoration: underline;
	text-underline-offset: 4px;
	white-space: nowrap;
}

.resourceport--look-modern .resourceport-text-link:hover {
	background: var(--resourceport-color-press);
	color: inherit;
}

/* "Link copied" for the eye; screen readers hear the status line. */
.resourceport--look-modern [data-resourceport-copy] {
	position: relative;
}

.resourceport--look-modern [data-resourceport-copy].is-done::after {
	content: attr(data-done);
	position: absolute;
	right: 0;
	bottom: calc(100% + 8px);
	padding: 4px 10px;
	border-radius: 6px;
	background: var(--resourceport-color-accent);
	color: var(--resourceport-color-accent-contrast);
	font-size: 0.8125rem;
	font-weight: 600;
	line-height: 1.4;
	white-space: nowrap;
	pointer-events: none;
}

/* ------------------------------------------------ Small labels */

.resourceport--look-modern .resourceport-chip-code {
	display: inline-block;
	padding: 1px 7px;
	border: 1px solid var(--resourceport-color-code);
	border-radius: 4px;
	font-size: 0.8125rem;
	font-weight: 700;
	line-height: 1.4;
	white-space: nowrap;
}

.resourceport--look-modern .resourceport-flag {
	display: inline-block;
	flex: none;
	padding: 1px 9px;
	border: 1px solid var(--resourceport-color-code);
	border-radius: 999px;
	font-size: 0.75rem;
	font-weight: 800;
	letter-spacing: 0.02em;
	line-height: 1.4;
	white-space: nowrap;
}

.resourceport--look-modern .resourceport-flag--new {
	border-color: var(--resourceport-color-highlight);
	background: var(--resourceport-color-highlight);
	color: var(--resourceport-color-highlight-ink);
}

/* ------------------------------------------------------ Search */

.resourceport--look-modern .resourceport-searchbar {
	margin: 0;
}

.resourceport--look-modern .resourceport-searchbar__field {
	position: relative;
	display: flex;
	align-items: center;
	gap: 10px;
	min-height: 52px;
	padding: 0 6px 0 14px;
	border: 1px solid var(--resourceport-color-border);
	border-radius: var(--resourceport-radius);
}

.resourceport--look-modern .resourceport-searchbar__field:focus-within {
	border-color: currentColor;
	box-shadow: 0 0 0 1px currentColor;
}

.resourceport--look-modern .resourceport-searchbar__icon {
	width: 20px;
	height: 20px;
	stroke-width: 2;
}

.resourceport--look-modern .resourceport-searchbar__input {
	flex: 1 1 auto;
	min-width: 0;
	height: 50px;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 0;
	outline: none;
	background: transparent;
	box-shadow: none;
	color: inherit;
	font: inherit;
	/* 16px or more stops iOS Safari from zooming into the field. */
	font-size: max(1rem, 16px);
	-webkit-appearance: none;
	appearance: none;
}

/* The field as a whole shows the focus. */
.resourceport--look-modern .resourceport-searchbar__input:focus-visible {
	outline: none;
}

.resourceport--look-modern .resourceport-searchbar__input::placeholder {
	color: var(--resourceport-color-muted);
	opacity: 1;
}

.resourceport--look-modern .resourceport-searchbar .resourceport-count {
	order: 0;
	flex: none;
	color: var(--resourceport-color-muted);
	font-size: 1rem;
	white-space: nowrap;
}

/* The "/" shortcut needs the script and a keyboard. */
.resourceport--look-modern .resourceport-searchbar__key {
	display: none;
	flex: none;
	place-items: center;
	min-width: 26px;
	height: 26px;
	margin-right: 8px;
	padding: 0 6px;
	border: 1px solid var(--resourceport-color-border);
	border-radius: 6px;
	background: none;
	box-shadow: none;
	color: var(--resourceport-color-muted);
	font: inherit;
	font-size: 0.875rem;
	line-height: 1;
}

.resourceport--look-modern .resourceport-searchbar__submit {
	flex: none;
	min-height: 40px;
	padding: 8px 16px;
}

/* Search runs as you type once the script is there; the button stays in
   reach for the keyboard and appears when it gets focus. */
.resourceport--look-modern.resourceport--js .resourceport-searchbar__submit:not(:focus) {
	position: absolute;
	width: 1px;
	min-height: 0;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

/* -------------------------------------------------- Collections */

/* -------------------------------------------- Header: text and signing in */

/* Phones first: the text, then the button over the whole width. */
.resourceport--look-modern .resourceport-lead {
	display: flex;
	flex-direction: column;
	gap: 16px;
	margin-bottom: 24px;
}

/* Reads like the theme's paragraphs: their size, their color. */
.resourceport--look-modern .resourceport-lead__text {
	max-width: 46em;
	line-height: 1.55;
}

.resourceport--look-modern .resourceport-account {
	display: flex;
	flex-direction: column;
	min-width: 0;
}

.resourceport--look-modern .resourceport-account__button {
	width: 100%;
}

/* Signed in: the person and the way out share a row. */
.resourceport--look-modern .resourceport-account--signed-in {
	flex-direction: row;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 8px 8px 8px 10px;
	border: 1px solid var(--resourceport-color-line);
	border-radius: var(--resourceport-radius);
	background: var(--resourceport-color-hover);
}

.resourceport--look-modern .resourceport-account--signed-in .resourceport-account__button {
	flex: none;
	width: auto;
	border-color: var(--resourceport-color-border);
	background: var(--resourceport-color-panel);
	color: var(--resourceport-color-panel-text);
}

.resourceport--look-modern .resourceport-account__person {
	display: flex;
	align-items: center;
	gap: 10px;
	min-width: 0;
}

.resourceport--look-modern .resourceport-account__who {
	display: flex;
	flex-direction: column;
	min-width: 0;
	line-height: 1.3;
}

.resourceport--look-modern .resourceport-account__name {
	overflow: hidden;
	font-size: 0.9375rem;
	font-weight: 700;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.resourceport--look-modern .resourceport-account__role {
	color: var(--resourceport-color-muted);
	font-size: 0.8125rem;
}

/* Initials in the accent color. */
.resourceport--look-modern .resourceport-avatar {
	display: inline-grid;
	flex: none;
	place-items: center;
	width: 40px;
	height: 40px;
	border-radius: 50%;
	background: var(--resourceport-color-highlight);
	color: var(--resourceport-color-highlight-ink);
	font-size: 0.875rem;
	font-weight: 800;
	letter-spacing: 0.02em;
	line-height: 1;
}

/* The bar: the note and the button, below the text. */
.resourceport--look-modern .resourceport-signbar {
	display: grid;
	grid-template-columns: auto minmax(0, 1fr);
	align-items: center;
	gap: 12px;
	padding: 12px;
	border: 1px solid var(--resourceport-color-line);
	border-radius: var(--resourceport-radius);
	background: var(--resourceport-color-hover);
}

.resourceport--look-modern .resourceport-signbar--signed-in {
	grid-template-columns: auto minmax(0, 1fr) auto;
	padding: 8px 8px 8px 12px;
}

.resourceport--look-modern .resourceport-signbar__icon {
	display: inline-grid;
	place-items: center;
	width: 36px;
	height: 36px;
	border-radius: 50%;
	background: var(--resourceport-color-highlight);
	color: var(--resourceport-color-highlight-ink);
}

.resourceport--look-modern .resourceport-signbar__icon .resourceport-icon {
	width: 17px;
	height: 17px;
	stroke-width: 2;
}

.resourceport--look-modern .resourceport-signbar__avatar {
	width: 36px;
	height: 36px;
	font-size: 0.8125rem;
}

.resourceport--look-modern .resourceport-signbar__note {
	display: flex;
	flex-direction: column;
	min-width: 0;
	font-size: 1rem;
	line-height: 1.4;
}

.resourceport--look-modern .resourceport-signbar__name {
	overflow: hidden;
	font-weight: 700;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.resourceport--look-modern .resourceport-signbar__sub {
	color: var(--resourceport-color-quiet);
	font-size: 0.875rem;
}

.resourceport--look-modern .resourceport-signbar__button {
	grid-column: 1 / -1;
	width: 100%;
}

.resourceport--look-modern .resourceport-signbar--signed-in .resourceport-signbar__button {
	grid-column: auto;
	width: auto;
}

.resourceport--look-modern .resourceport-tabs-region:not(:empty) {
	margin-top: 16px;
}

/* Positioned, so the visually hidden text inside is clipped by the row
   instead of widening the page. */
.resourceport--look-modern .resourceport-tabs__list,
.resourceport--look-modern .resourceport-subtabs__list {
	position: relative;
	display: flex;
	gap: 8px;
	overflow-x: auto;
	padding: 2px;
	margin: -2px;
	scrollbar-width: none;
}

.resourceport--look-modern .resourceport-tabs__list::-webkit-scrollbar,
.resourceport--look-modern .resourceport-subtabs__list::-webkit-scrollbar {
	display: none;
}

.resourceport--look-modern .resourceport-tabs__list > li,
.resourceport--look-modern .resourceport-subtabs__list > li {
	flex: none;
}

/* Narrow: every collection is a chip in one row that scrolls sideways. */
.resourceport--look-modern .resourceport-tab,
.resourceport--look-modern .resourceport-subtab {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	min-height: 44px;
	padding: 0 16px;
	border: 1px solid var(--resourceport-color-border);
	border-radius: 999px;
	color: inherit;
	font-size: 0.9375rem;
	font-weight: 600;
	line-height: 1.2;
	text-decoration: none;
	white-space: nowrap;
}

.resourceport--look-modern .resourceport-subtab {
	min-height: 40px;
	padding: 0 14px;
	font-size: 0.875rem;
}

.resourceport--look-modern .resourceport-tab:hover,
.resourceport--look-modern .resourceport-subtab:hover {
	border-color: currentColor;
	color: inherit;
}

.resourceport--look-modern .resourceport-tab[aria-current="page"],
.resourceport--look-modern .resourceport-subtab[aria-current="page"] {
	border-color: var(--resourceport-color-accent);
	background: var(--resourceport-color-accent);
	color: var(--resourceport-color-accent-contrast);
}

.resourceport--look-modern .resourceport-tab__count,
.resourceport--look-modern .resourceport-subtab__count {
	font-weight: 500;
	opacity: 0.7;
}

.resourceport--look-modern .resourceport-tab__icon {
	width: 14px;
	height: 14px;
	stroke-width: 2.2;
}

.resourceport--look-modern .resourceport-subtabs {
	margin-top: 10px;
}

/* --------------------------------------------------- Filter row */

.resourceport--look-modern .resourceport-filterbar {
	display: flex;
	flex-direction: column;
	gap: 14px;
	margin-top: 12px;
}

.resourceport--look-modern .resourceport-filterbar__picks {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
}

.resourceport--look-modern .resourceport-filterbar__picks:empty,
.resourceport--look-modern .resourceport-clear-region:empty {
	display: none;
}

.resourceport--look-modern .resourceport-filterbar__tools {
	display: flex;
	align-items: center;
	gap: 8px;
}

.resourceport--look-modern .resourceport-pick {
	position: relative;
	display: flex;
	flex: 1 1 140px;
	min-width: 0;
}

.resourceport--look-modern .resourceport-pick__select,
.resourceport--look-modern .resourceport-field--sort .resourceport-field__select {
	width: 100%;
	min-height: 44px;
	margin: 0;
	padding: 0 36px 0 12px;
	border: 1px solid var(--resourceport-color-border);
	border-radius: var(--resourceport-radius-small);
	background: transparent;
	box-shadow: none;
	color: inherit;
	font: inherit;
	font-size: max(1rem, 16px);
	font-weight: 600;
	line-height: 1.2;
	text-overflow: ellipsis;
	-webkit-appearance: none;
	appearance: none;
	cursor: pointer;
}

.resourceport--look-modern .resourceport-pick__select:hover,
.resourceport--look-modern .resourceport-field--sort .resourceport-field__select:hover {
	border-color: currentColor;
}

.resourceport--look-modern .resourceport-pick__icon {
	position: absolute;
	top: 50%;
	right: 12px;
	width: 16px;
	height: 16px;
	stroke-width: 2;
	transform: translateY(-50%);
	pointer-events: none;
}

/* The sort control shows only its select; the label stays for screen readers. */
.resourceport--look-modern .resourceport-field--sort {
	position: relative;
	display: flex;
	flex: 0 1 auto;
	min-width: 0;
}

.resourceport--look-modern .resourceport-field--sort .resourceport-field__label {
	position: absolute;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

.resourceport--look-modern .resourceport-field--sort::after {
	content: "";
	position: absolute;
	top: 50%;
	right: 16px;
	width: 7px;
	height: 7px;
	border-right: 2px solid currentColor;
	border-bottom: 2px solid currentColor;
	transform: translateY(-70%) rotate(45deg);
	pointer-events: none;
}

.resourceport--look-modern .resourceport-count-compact,
.resourceport--look-modern .resourceport-filterbar__tools > .resourceport-count {
	order: 0;
	margin-right: auto;
	color: var(--resourceport-color-muted);
	font-size: 0.9375rem;
	white-space: nowrap;
}

.resourceport--look-modern .resourceport-view-toggle {
	display: flex;
	flex: none;
	gap: 0;
	overflow: hidden;
	border: 1px solid var(--resourceport-color-border);
	border-radius: var(--resourceport-radius-small);
}

.resourceport--look-modern .resourceport-view-toggle .resourceport-icon-button {
	width: 44px;
	height: 42px;
	border: 0;
	border-radius: 0;
}

/* List first, as in the order of the views. */
.resourceport--look-modern .resourceport-view-toggle [data-view="list"] {
	order: -1;
}

.resourceport--look-modern .resourceport-view-toggle [data-view="grid"] {
	border-left: 1px solid var(--resourceport-color-border);
}

.resourceport--look-modern .resourceport-view-toggle [aria-current="true"],
.resourceport--look-modern .resourceport-view-toggle [aria-current="true"]:hover {
	background: var(--resourceport-color-accent);
	color: var(--resourceport-color-accent-contrast);
}

/* A locked collection shows its panel, not an empty list with filters. */
.resourceport--look-modern.resourceport--locked .resourceport-filterbar,
.resourceport--look-modern.resourceport--locked .resourceport-searchbar .resourceport-count {
	display: none;
}

/* ------------------------------------------------------ Results */

.resourceport--look-modern .resourceport-results-region {
	margin-top: 6px;
}

.resourceport--look-modern .resourceport-index__head {
	display: none;
}

/* Titles, heads and rows sit 8px in from the lines, so the hover of a row
   has room around the file icon and the download button. */
.resourceport--look-modern .resourceport-group__title {
	margin: 0;
	padding: 22px 8px 8px;
	border-bottom: 1px solid var(--resourceport-color-line);
	color: var(--resourceport-color-muted);
	font-family: inherit;
	font-size: 0.75rem;
	font-weight: 700;
	letter-spacing: 0.08em;
	line-height: 1.4;
	text-transform: uppercase;
}

.resourceport--look-modern .resourceport-results--list {
	display: block;
}

.resourceport--look-modern .resourceport-row {
	display: flex;
	align-items: center;
	gap: 12px;
	margin: 0;
	padding: 12px 8px;
	border-bottom: 1px solid var(--resourceport-color-line-soft);
	transition: background-color 0.15s ease;
}

.resourceport--look-modern .resourceport-row:hover {
	background: var(--resourceport-color-hover);
}

/* A page with the file format on it. */
.resourceport--look-modern .resourceport-filetile {
	position: relative;
	display: block;
	flex: none;
	width: 32px;
	height: 40px;
}

.resourceport--look-modern .resourceport-filetile__shape {
	display: block;
	width: 100%;
	height: 100%;
}

.resourceport--look-modern .resourceport-filetile__label {
	position: absolute;
	right: 0;
	bottom: 5px;
	left: 0;
	font-size: 8px;
	font-weight: 800;
	letter-spacing: 0.04em;
	line-height: 1;
	text-align: center;
}

.resourceport--look-modern .resourceport-row__main {
	display: grid;
	flex: 1 1 auto;
	gap: 3px;
	min-width: 0;
}

.resourceport--look-modern .resourceport-row__heading {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 4px 10px;
	margin: 0;
	padding: 0;
	color: inherit;
	font-family: inherit;
	font-size: 1.0625rem;
	font-weight: 700;
	letter-spacing: normal;
	line-height: 1.3;
	text-transform: none;
}

.resourceport--look-modern .resourceport-row__title {
	color: inherit;
	text-decoration: none;
	overflow-wrap: anywhere;
}

.resourceport--look-modern .resourceport-row__title:hover {
	color: inherit;
	text-decoration: underline;
	text-underline-offset: 4px;
}

.resourceport--look-modern .resourceport-row__context {
	display: none;
	color: var(--resourceport-color-muted);
	font-size: 0.9375rem;
}

.resourceport--look-modern .resourceport-row__desc {
	display: none;
	overflow: hidden;
	color: var(--resourceport-color-quiet);
	font-size: 0.9375rem;
	text-overflow: ellipsis;
	white-space: nowrap;
}

/* Phones: collection, type and language fold into one line; the language
   is the part people scan for. Each part carries the dot before it and is
   pulled left by the dot's width, so a dot that would start a line lies
   outside the clipped box: no line starts or ends with a lone dot. */
.resourceport--look-modern .resourceport-row__compact {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	row-gap: 2px;
	overflow: hidden;
	font-size: 0.875rem;
}

.resourceport--look-modern .resourceport-row__part {
	margin-left: -19px;
	padding-right: 19px;
	color: var(--resourceport-color-muted);
}

.resourceport--look-modern .resourceport-row__part::before {
	content: "";
	display: inline-block;
	width: 3px;
	height: 3px;
	margin: 0 8px;
	border-radius: 50%;
	background: currentColor;
	vertical-align: middle;
	opacity: 0.7;
}

.resourceport--look-modern .resourceport-row__part--lang {
	color: inherit;
	font-weight: 700;
}

.resourceport--look-modern .resourceport-row__part--lang::before {
	opacity: 0.45;
}

.resourceport--look-modern .resourceport-row__compact .resourceport-flag {
	margin-right: 8px;
	padding: 0 8px;
	font-size: 0.6875rem;
}

.resourceport--look-modern .resourceport-row__compact .resourceport-flag + .resourceport-row__part {
	margin-left: 0;
}

.resourceport--look-modern .resourceport-row__compact .resourceport-flag + .resourceport-row__part::before {
	display: none;
}

.resourceport--look-modern .resourceport-row__heading .resourceport-flag {
	display: none;
}

.resourceport--look-modern .resourceport-cell {
	display: none;
	flex: none;
	font-size: 1rem;
}

.resourceport--look-modern .resourceport-cell--language {
	width: 80px;
}

.resourceport--look-modern .resourceport-cell--version {
	width: 90px;
}

.resourceport--look-modern .resourceport-cell--file {
	width: 104px;
	color: var(--resourceport-color-quiet);
}

.resourceport--look-modern .resourceport-cell--updated {
	width: 120px;
}

.resourceport--look-modern .resourceport-row__actions {
	display: flex;
	flex: none;
	align-items: center;
	justify-content: flex-end;
	gap: 8px;
}

.resourceport--look-modern .resourceport-row__actions > * {
	flex: none;
}

/* On phones the title opens the details; the row keeps its download. */
.resourceport--look-modern .resourceport-row__actions .resourceport-text-button {
	display: none;
}

/* ------------------------------------------------------- Covers */

.resourceport--look-modern .resourceport-results--covers {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 28px 14px;
	margin-top: 20px;
}

.resourceport--look-modern .resourceport-cover {
	display: flex;
	flex-direction: column;
	gap: 12px;
	min-width: 0;
	margin: 0;
}

.resourceport--look-modern .resourceport-cover__face {
	position: relative;
	display: flex;
	flex-direction: column;
	justify-content: space-between;
	gap: 12px;
	aspect-ratio: 4 / 5;
	padding: 14px;
	border: 1px solid var(--resourceport-color-line);
	border-radius: 10px;
	background: var(--resourceport-color-surface);
	color: inherit;
	text-decoration: none;
	overflow: hidden;
	transition: border-color 0.15s ease;
}

.resourceport--look-modern .resourceport-cover__face:hover {
	border-color: currentColor;
	color: inherit;
}

.resourceport--look-modern .resourceport-cover__top {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 6px;
}

.resourceport--look-modern .resourceport-cover__type {
	font-size: 0.6875rem;
	font-weight: 800;
	letter-spacing: 0.1em;
	text-transform: uppercase;
}

.resourceport--look-modern .resourceport-cover__title {
	display: -webkit-box;
	flex: none;
	overflow: hidden;
	font-size: 0.9375rem;
	font-weight: 600;
	letter-spacing: -0.01em;
	line-height: 1.15;
	text-wrap: pretty;
	/* Long compound words ("Montageanleitung") on narrow covers. */
	hyphens: auto;
	overflow-wrap: anywhere;
	-webkit-line-clamp: 6;
	-webkit-box-orient: vertical;
}

.resourceport--look-modern .resourceport-cover__foot {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 6px;
	font-size: 0.8125rem;
	font-weight: 700;
}

/* With a preview image: the picture on top, the words below it. */
.resourceport--look-modern .resourceport-cover--image .resourceport-cover__face {
	justify-content: flex-start;
	gap: 10px;
	padding: 0 0 14px;
}

.resourceport--look-modern .resourceport-cover__image {
	display: block;
	flex: 1 1 0;
	width: 100%;
	min-height: 48px;
	height: auto;
	object-fit: cover;
}

.resourceport--look-modern .resourceport-cover__top,
.resourceport--look-modern .resourceport-cover__foot {
	flex: none;
}

.resourceport--look-modern .resourceport-cover--image .resourceport-cover__top,
.resourceport--look-modern .resourceport-cover--image .resourceport-cover__title,
.resourceport--look-modern .resourceport-cover--image .resourceport-cover__foot {
	padding: 0 14px;
}

.resourceport--look-modern .resourceport-cover--image .resourceport-cover__title {
	font-size: 0.875rem;
	-webkit-line-clamp: 3;
}

.resourceport--look-modern .resourceport-cover--image .resourceport-cover__foot {
	margin-top: auto;
}

.resourceport--look-modern .resourceport-cover__meta {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-start;
	justify-content: space-between;
	gap: 10px 12px;
}

.resourceport--look-modern .resourceport-cover__where {
	display: grid;
	flex: 1 1 140px;
	gap: 2px;
	min-width: 0;
	font-size: 0.875rem;
}

.resourceport--look-modern .resourceport-cover__context {
	color: var(--resourceport-color-muted);
}

.resourceport--look-modern .resourceport-cover__actions {
	display: flex;
	flex: none;
	gap: 6px;
}

/* ------------------------------------------------ Details panel */

.resourceport--look-modern .resourceport-drawer {
	position: fixed;
	inset: auto 0 0 0;
	width: 100%;
	max-width: none;
	height: auto;
	max-height: calc(100% - 56px);
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 18px 18px 0 0;
	background: var(--resourceport-color-panel);
	color: var(--resourceport-color-panel-text);
	overflow: hidden;
}

/* Only an open dialog gets a display value, or it would show while closed. */
.resourceport--look-modern .resourceport-drawer[open] {
	display: flex;
	flex-direction: column;
	animation: resourceport-sheet-in 0.2s ease-out;
}

.resourceport--look-modern .resourceport-drawer::backdrop {
	background: rgba(17, 17, 17, 0.36);
}

.resourceport--look-modern .resourceport-drawer__bar {
	position: relative;
	display: flex;
	flex: none;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 14px 8px 0 20px;
}

/* The grabber of a sheet. */
.resourceport--look-modern .resourceport-drawer__bar::before {
	content: "";
	position: absolute;
	top: 8px;
	left: 50%;
	width: 40px;
	height: 4px;
	margin-left: -20px;
	border-radius: 2px;
	background: var(--resourceport-color-code);
}

.resourceport--look-modern .resourceport-drawer__type {
	min-width: 0;
	overflow: hidden;
	color: var(--resourceport-color-muted);
	font-size: 0.75rem;
	font-weight: 800;
	letter-spacing: 0.1em;
	text-overflow: ellipsis;
	text-transform: uppercase;
	white-space: nowrap;
}

.resourceport--look-modern .resourceport-drawer__close {
	flex: none;
	margin-left: auto;
}

.resourceport--look-modern .resourceport-drawer__close .resourceport-icon {
	width: 20px;
	height: 20px;
}

.resourceport--look-modern .resourceport-drawer__body {
	display: flex;
	flex: 1 1 auto;
	flex-direction: column;
	min-height: 0;
}

.resourceport--look-modern .resourceport-drawer .resourceport-details {
	display: flex;
	flex: 1 1 auto;
	flex-direction: column;
	min-height: 0;
}

.resourceport--look-modern .resourceport-drawer .resourceport-details__type {
	display: none;
}

.resourceport--look-modern .resourceport-drawer .resourceport-details__content {
	display: grid;
	flex: 1 1 auto;
	grid-template-columns: 78px minmax(0, 1fr);
	align-content: start;
	gap: 16px;
	min-height: 0;
	padding: 4px 20px 20px;
	overflow-y: auto;
	overscroll-behavior: contain;
}

.resourceport--look-modern .resourceport-drawer .resourceport-details__content > * {
	grid-column: 1 / -1;
}

.resourceport--look-modern .resourceport-drawer .resourceport-details__preview {
	grid-row: span 2;
	grid-column: 1;
	align-self: start;
}

.resourceport--look-modern .resourceport-drawer .resourceport-details__content > .resourceport-flag {
	grid-column: 2;
	align-self: end;
	justify-self: start;
}

.resourceport--look-modern .resourceport-drawer .resourceport-details__title {
	grid-column: 2;
	align-self: start;
}

.resourceport--look-modern .resourceport-details__title {
	margin: 0;
	padding: 0;
	color: inherit;
	font-family: inherit;
	font-size: 1.4375rem;
	font-weight: 700;
	letter-spacing: -0.01em;
	line-height: 1.2;
	text-transform: none;
	overflow-wrap: anywhere;
}

.resourceport--look-modern .resourceport-details__title:focus {
	outline: none;
}

.resourceport--look-modern .resourceport-details__desc {
	color: var(--resourceport-color-quiet);
	font-size: 1rem;
	line-height: 1.55;
}

.resourceport--look-modern .resourceport-details__type {
	color: var(--resourceport-color-muted);
	font-size: 0.75rem;
	font-weight: 800;
	letter-spacing: 0.1em;
	text-transform: uppercase;
}

/* The preview: a picture, or a page drawn in type. */
.resourceport--look-modern .resourceport-details__preview {
	margin: 0;
}

.resourceport--look-modern .resourceport-details__image {
	display: block;
	width: 100%;
	height: auto;
	border-radius: 4px;
	object-fit: contain;
}

.resourceport--look-modern .resourceport-paper {
	position: relative;
	display: flex;
	flex-direction: column;
	gap: 5px;
	width: 78px;
	aspect-ratio: 78 / 102;
	padding: 10px 9px;
	border: 1px solid var(--resourceport-color-border);
	border-radius: 2px;
	background: var(--resourceport-color-panel);
	color: var(--resourceport-color-panel-text);
	overflow: hidden;
}

/* Small, the title is a bar; large, it is set in type. */
.resourceport--look-modern .resourceport-paper__title {
	flex: none;
	width: 80%;
	height: 4px;
	overflow: hidden;
	background: currentColor;
	font-size: 0;
	line-height: 0;
}

.resourceport--look-modern .resourceport-paper__mark {
	flex: none;
	width: 40%;
	height: 3px;
	margin-bottom: 4px;
	background: var(--resourceport-color-highlight);
}

.resourceport--look-modern .resourceport-paper__line {
	flex: none;
	width: 90%;
	height: 3px;
	background: color-mix(in srgb, currentColor 11%, transparent);
}

.resourceport--look-modern .resourceport-paper__line:nth-of-type(odd) {
	width: 84%;
}

.resourceport--look-modern .resourceport-paper__line:nth-of-type(4n) {
	width: 62%;
}

.resourceport--look-modern .resourceport-paper__format {
	position: absolute;
	right: 8px;
	bottom: 6px;
	font-size: 0.5rem;
	font-weight: 800;
	letter-spacing: 0.04em;
}

.resourceport--look-modern .resourceport-details__also {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px 12px;
	padding: 8px 8px 8px 14px;
	border: 1px solid var(--resourceport-color-line);
	border-radius: 10px;
	font-size: 0.9375rem;
}

.resourceport--look-modern .resourceport-details__also > span {
	color: var(--resourceport-color-muted);
}

.resourceport--look-modern .resourceport-details__also a {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	min-height: 40px;
	padding: 4px 12px;
	border: 1px solid var(--resourceport-color-border);
	border-radius: var(--resourceport-radius-small);
	color: inherit;
	font-weight: 700;
	text-decoration: none;
}

.resourceport--look-modern .resourceport-details__also a:hover {
	background: var(--resourceport-color-press);
	color: inherit;
}

.resourceport--look-modern .resourceport-details__also .resourceport-chip-code {
	font-size: 0.75rem;
	font-weight: 800;
}

.resourceport--look-modern .resourceport-details__facts {
	display: grid;
	grid-template-columns: 96px minmax(0, 1fr);
	gap: 10px 12px;
	margin: 0;
	padding: 0;
	font-size: 0.9375rem;
}

.resourceport--look-modern .resourceport-details__fact {
	display: contents;
}

.resourceport--look-modern .resourceport-details__fact dt {
	margin: 0;
	color: var(--resourceport-color-muted);
	font-weight: 400;
}

.resourceport--look-modern .resourceport-details__fact dd {
	margin: 0;
	font-weight: 600;
	overflow-wrap: anywhere;
}

.resourceport--look-modern .resourceport-details__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
}

.resourceport--look-modern .resourceport-drawer .resourceport-details__actions {
	flex: none;
	padding: 14px 20px calc(20px + env(safe-area-inset-bottom));
	border-top: 1px solid var(--resourceport-color-line);
}

.resourceport--look-modern .resourceport-details__actions .resourceport-button--primary {
	flex: 1 1 100%;
	min-height: 52px;
	font-size: 1.0625rem;
}

.resourceport--look-modern .resourceport-details__actions .resourceport-button--outline,
.resourceport--look-modern .resourceport-details__actions [data-resourceport-copy] {
	flex: 1 1 0;
	min-height: 48px;
}

/* On phones "Copy link" says what it does; on wide screens it is an icon. */
.resourceport--look-modern .resourceport-details__actions [data-resourceport-copy] {
	gap: 8px;
	width: auto;
	height: auto;
	padding: 0 16px;
	font: inherit;
	font-size: 1rem;
	font-weight: 700;
}

.resourceport--look-modern .resourceport-details__actions [data-resourceport-copy] .resourceport-visually-hidden {
	position: static !important;
	width: auto;
	height: auto;
	margin: 0;
	overflow: visible;
	clip: auto;
}

.resourceport--look-modern .resourceport-details__actions [data-kind="pdf"] {
	flex: none;
	width: 48px;
	height: 48px;
}

@keyframes resourceport-sheet-in {
	from {
		transform: translateY(24px);
		opacity: 0;
	}

	to {
		transform: none;
		opacity: 1;
	}
}

@keyframes resourceport-drawer-in {
	from {
		transform: translateX(24px);
		opacity: 0;
	}

	to {
		transform: none;
		opacity: 1;
	}
}

/* Wide screens: a panel on the right, full height. */
@media (min-width: 700px) {
	.resourceport--look-modern .resourceport-drawer {
		inset: 0 0 0 auto;
		width: min(540px, 100%);
		height: 100%;
		max-height: none;
		border-left: 1px solid var(--resourceport-color-code);
		border-radius: 0;
	}

	.resourceport--look-modern .resourceport-drawer[open] {
		animation-name: resourceport-drawer-in;
	}

	.resourceport--look-modern .resourceport-drawer__bar {
		padding: 20px 20px 20px 32px;
		border-bottom: 1px solid var(--resourceport-color-line);
	}

	.resourceport--look-modern .resourceport-drawer__bar::before {
		content: none;
	}

	.resourceport--look-modern .resourceport-drawer__type {
		font-size: 0.8125rem;
	}

	.resourceport--look-modern .resourceport-drawer .resourceport-details__content {
		display: flex;
		flex-direction: column;
		gap: 24px;
		padding: 28px 32px;
	}

	.resourceport--look-modern .resourceport-drawer .resourceport-details__content > .resourceport-flag {
		align-self: flex-start;
		margin-bottom: -12px;
	}

	.resourceport--look-modern .resourceport-drawer .resourceport-details__preview {
		display: grid;
		align-self: stretch;
		place-items: center;
		min-height: 300px;
		padding: 22px;
		border-radius: var(--resourceport-radius);
		background: var(--resourceport-color-surface);
	}

	.resourceport--look-modern .resourceport-drawer .resourceport-details__image {
		max-height: 300px;
		width: auto;
		max-width: 100%;
	}

	.resourceport--look-modern .resourceport-drawer .resourceport-paper {
		width: 196px;
		gap: 9px;
		padding: 22px 20px;
	}

	.resourceport--look-modern .resourceport-drawer .resourceport-paper__title {
		width: auto;
		height: auto;
		margin-bottom: 2px;
		overflow: visible;
		background: none;
		font-size: 0.875rem;
		font-weight: 800;
		line-height: 1.25;
		overflow-wrap: anywhere;
	}

	.resourceport--look-modern .resourceport-drawer .resourceport-paper__mark {
		height: 5px;
		margin-bottom: 8px;
	}

	.resourceport--look-modern .resourceport-drawer .resourceport-paper__line {
		height: 5px;
	}

	.resourceport--look-modern .resourceport-drawer .resourceport-paper__format {
		right: 14px;
		bottom: 12px;
		font-size: 0.6875rem;
	}

	.resourceport--look-modern .resourceport-drawer .resourceport-details__title {
		font-size: 1.875rem;
		font-weight: 600;
	}

	.resourceport--look-modern .resourceport-drawer .resourceport-details__desc {
		margin-top: -12px;
		font-size: 1.125rem;
	}

	.resourceport--look-modern .resourceport-drawer .resourceport-details__facts {
		grid-template-columns: 120px minmax(0, 1fr);
		gap: 12px 16px;
		font-size: 1rem;
	}

	.resourceport--look-modern .resourceport-drawer .resourceport-details__actions {
		flex-wrap: nowrap;
		gap: 12px;
		padding: 20px 32px 28px;
	}

	.resourceport--look-modern .resourceport-drawer .resourceport-details__actions .resourceport-button--primary {
		flex: 1 1 auto;
	}

	.resourceport--look-modern .resourceport-drawer .resourceport-details__actions .resourceport-button--outline {
		flex: none;
		min-height: 52px;
		padding: 10px 20px;
		font-size: 1.0625rem;
	}

	.resourceport--look-modern .resourceport-drawer .resourceport-details__actions [data-resourceport-copy],
	.resourceport--look-modern .resourceport-drawer .resourceport-details__actions [data-kind="pdf"] {
		flex: none;
		width: 52px;
		min-height: 0;
		height: 52px;
		padding: 0;
	}

	.resourceport--look-modern .resourceport-drawer .resourceport-details__actions [data-resourceport-copy] .resourceport-visually-hidden {
		position: absolute !important;
		width: 1px;
		height: 1px;
		margin: -1px;
		overflow: hidden;
		clip: rect(0, 0, 0, 0);
	}
}

/* Scrolling the page behind the open panel feels broken. */
html:has(.resourceport-drawer[open]) {
	overflow: hidden;
}

/* ------------------------------------------ Signed-in collections */

.resourceport--look-modern .resourceport-locked {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 14px;
	padding: 28px 22px;
	border: 1px solid var(--resourceport-color-line);
	border-radius: 14px;
}

.resourceport--look-modern .resourceport-locked__icon {
	display: grid;
	flex: none;
	place-items: center;
	width: 48px;
	height: 48px;
	border-radius: 50%;
	background: var(--resourceport-color-highlight);
	color: var(--resourceport-color-highlight-ink);
}

.resourceport--look-modern .resourceport-locked__icon .resourceport-icon {
	width: 21px;
	height: 21px;
	stroke-width: 2;
}

.resourceport--look-modern .resourceport-locked__text {
	display: grid;
	gap: 8px;
}

.resourceport--look-modern .resourceport-locked__title {
	margin: 0;
	padding: 0;
	color: inherit;
	font-family: inherit;
	font-size: 1.5rem;
	font-weight: 500;
	letter-spacing: normal;
	line-height: 1.25;
	text-transform: none;
}

.resourceport--look-modern .resourceport-locked__text p {
	color: var(--resourceport-color-quiet);
	font-size: 1rem;
	line-height: 1.55;
}

.resourceport--look-modern .resourceport-locked--panel {
	margin-top: 16px;
}

.resourceport--look-modern .resourceport-locked--panel .resourceport-button {
	width: 100%;
	min-height: 52px;
	font-size: 1.0625rem;
}

/* The teaser below the list: icon and title on one line, text below. */
.resourceport--look-modern .resourceport-teaser-region:not(:empty) {
	margin-top: 32px;
}

.resourceport--look-modern .resourceport-locked--teaser {
	display: grid;
	grid-template-columns: 40px minmax(0, 1fr);
	align-items: center;
	gap: 10px 12px;
	padding: 22px;
}

.resourceport--look-modern .resourceport-locked--teaser .resourceport-locked__icon {
	width: 40px;
	height: 40px;
}

.resourceport--look-modern .resourceport-locked--teaser .resourceport-locked__icon .resourceport-icon {
	width: 18px;
	height: 18px;
}

.resourceport--look-modern .resourceport-locked--teaser .resourceport-locked__text {
	display: contents;
}

.resourceport--look-modern .resourceport-locked--teaser .resourceport-locked__title {
	font-size: 1.125rem;
	font-weight: 700;
}

.resourceport--look-modern .resourceport-locked--teaser .resourceport-locked__text p {
	grid-column: 1 / -1;
	font-size: 0.9375rem;
	line-height: 1.5;
}

.resourceport--look-modern .resourceport-locked--teaser .resourceport-button {
	grid-column: 1 / -1;
	justify-self: start;
}

/* ------------------------------------------ Single Resource block */

/* The block measures its own width; the card follows it, not the viewport. */
.wp-block-resourceport-resource,
.resourceport-document-block {
	container-type: inline-size;
}

/* One document in a post or page: tile, then title and facts, then the
   buttons below the text - or beside it where there is room. */
.resourceport--look-modern.resourceport-document {
	display: grid;
	grid-template-columns: auto minmax(0, 1fr);
	align-items: start;
	gap: 14px 18px;
	padding: 20px 22px;
	border: 1px solid var(--resourceport-color-line);
	border-radius: var(--resourceport-radius);
}

.resourceport--look-modern .resourceport-document__tile {
	width: 40px;
	height: 50px;
}

.resourceport--look-modern .resourceport-document__tile .resourceport-filetile__label {
	bottom: 7px;
	font-size: 10px;
}

.resourceport--look-modern .resourceport-document__main {
	display: grid;
	gap: 4px;
	min-width: 0;
}

.resourceport--look-modern .resourceport-document__title {
	font-size: 1.1875rem;
	font-weight: 600;
	line-height: 1.3;
	overflow-wrap: anywhere;
}

.resourceport--look-modern .resourceport-document__meta {
	color: var(--resourceport-color-muted);
	font-size: 0.9375rem;
}

.resourceport--look-modern .resourceport-document__desc {
	color: var(--resourceport-color-quiet);
	font-size: 0.9375rem;
	line-height: 1.5;
}

.resourceport--look-modern .resourceport-document__actions {
	display: flex;
	grid-column: 2;
	flex-wrap: wrap;
	gap: 8px;
}

.resourceport--look-modern.resourceport-document--locked .resourceport-locked__icon {
	width: 44px;
	height: 44px;
}

.resourceport--look-modern.resourceport-document--locked .resourceport-locked__icon .resourceport-icon {
	width: 19px;
	height: 19px;
}

@container (min-width: 720px) {
	.resourceport--look-modern.resourceport-document {
		grid-template-columns: auto minmax(0, 1fr) auto;
		align-items: center;
		gap: 16px 24px;
		padding: 22px 26px;
	}

	.resourceport--look-modern .resourceport-document__actions {
		grid-column: 3;
		flex-wrap: nowrap;
	}
}

/* A single button: no frame, and a long title may wrap. */
.resourceport--look-modern.resourceport-document--button {
	display: block;
	padding: 0;
	border: 0;
	border-radius: 0;
}

.resourceport--look-modern.resourceport-document--button .resourceport-button {
	max-width: 100%;
	white-space: normal;
	text-align: left;
}

/* --------------------------------------- Empty state, pagination */

.resourceport--look-modern .resourceport-empty {
	justify-items: start;
	gap: 12px;
	margin-top: 12px;
	padding: 24px 0;
	border: 0;
	border-top: 1px solid currentColor;
	border-radius: 0;
	text-align: left;
}

.resourceport--look-modern .resourceport-empty__title {
	font-size: 1.125rem;
	font-weight: 400;
}

.resourceport--look-modern .resourceport-pagination,
.resourceport--look-modern .resourceport-load-more {
	margin-top: 28px;
}

.resourceport--look-modern .resourceport-pagination__step,
.resourceport--look-modern .resourceport-pagination__page {
	border: 1px solid var(--resourceport-color-border);
	font-weight: 600;
}

.resourceport--look-modern a.resourceport-pagination__step:hover,
.resourceport--look-modern a.resourceport-pagination__page:hover {
	border-color: currentColor;
	background: transparent;
}

.resourceport--look-modern .resourceport-pagination__page[aria-current="page"] {
	border-color: var(--resourceport-color-accent);
}

.resourceport--look-modern .resourceport-pagination__gap {
	border: 0;
}

/* ------------------------------------------------------ Preview */

.resourceport--look-modern .resourceport-lightbox {
	border-radius: var(--resourceport-radius);
}

@media (max-width: 767px) {
	.resourceport--look-modern .resourceport-lightbox {
		border-radius: 0;
	}
}

/* --------------------------------------------- Resource page panel */

.resourceport.resourceport-page-details {
	container-type: inline-size;
	margin-top: 32px;
}

.resourceport--look-modern .resourceport-details--page {
	display: grid;
	gap: 20px;
	padding: 22px;
	border: 1px solid var(--resourceport-color-line);
	border-radius: 14px;
}

.resourceport--look-modern .resourceport-details--page .resourceport-details__content {
	display: grid;
	gap: 18px;
}

.resourceport--look-modern .resourceport-details--page .resourceport-details__preview {
	justify-self: start;
}

/* ================================================= Wider layouts */

@container (min-width: 600px) {
	.resourceport--look-modern .resourceport-results--covers {
		grid-template-columns: repeat(3, minmax(0, 1fr));
		gap: 36px 20px;
	}

	.resourceport--look-modern .resourceport-cover__face {
		padding: 18px;
	}

	.resourceport--look-modern .resourceport-cover__title {
		font-size: 1.375rem;
	}

	.resourceport--look-modern .resourceport-cover--image .resourceport-cover__title {
		font-size: 1rem;
	}

	.resourceport--look-modern .resourceport-details--page {
		grid-template-columns: 200px minmax(0, 1fr);
		align-items: start;
		gap: 20px 32px;
		padding: 28px;
	}

	.resourceport--look-modern .resourceport-details--page .resourceport-details__content {
		display: contents;
	}

	.resourceport--look-modern .resourceport-details--page .resourceport-details__preview {
		grid-row: 1 / span 5;
		grid-column: 1;
		display: grid;
		place-items: center;
		width: 100%;
		padding: 18px;
		border-radius: var(--resourceport-radius);
		background: var(--resourceport-color-surface);
	}

	.resourceport--look-modern .resourceport-details--page .resourceport-paper {
		width: 140px;
		gap: 7px;
		padding: 16px 14px;
	}

	.resourceport--look-modern .resourceport-details--page .resourceport-details__content > :not(.resourceport-details__preview),
	.resourceport--look-modern .resourceport-details--page .resourceport-details__actions {
		grid-column: 2;
	}

	.resourceport--look-modern .resourceport-details--page .resourceport-details__actions .resourceport-button--primary {
		flex: 0 1 auto;
	}

	.resourceport--look-modern .resourceport-details--page .resourceport-details__actions .resourceport-button--outline {
		flex: none;
	}

	.resourceport--look-modern .resourceport-details--page .resourceport-details__actions [data-resourceport-copy] {
		flex: none;
		width: 48px;
		height: 48px;
		padding: 0;
	}

	.resourceport--look-modern .resourceport-details--page .resourceport-details__actions [data-resourceport-copy] .resourceport-visually-hidden {
		position: absolute !important;
		width: 1px;
		height: 1px;
		margin: -1px;
		overflow: hidden;
		clip: rect(0, 0, 0, 0);
	}
}

/* Tablets and up: tabs, one filter row, the index with its columns. */
@container (min-width: 760px) {
	.resourceport--look-modern .resourceport-searchbar__field {
		gap: 14px;
		min-height: 64px;
		padding: 0 8px 0 20px;
	}

	.resourceport--look-modern .resourceport-searchbar__icon {
		width: 22px;
		height: 22px;
	}

	.resourceport--look-modern .resourceport-searchbar__input {
		height: 62px;
		font-size: 1.25rem;
	}

	.resourceport--look-modern .resourceport-searchbar .resourceport-count {
		margin-right: 12px;
	}

	.resourceport--look-modern .resourceport-tabs-region:not(:empty) {
		margin-top: 36px;
	}

	/* The line under the tabs is drawn by the list, so the open tab's
	   underline can sit on it while the list still scrolls sideways. */
	.resourceport--look-modern .resourceport-tabs__list {
		gap: 36px;
		padding: 0;
		margin: 0;
		box-shadow: inset 0 -1px 0 var(--resourceport-color-line);
	}

	.resourceport--look-modern .resourceport-tab {
		min-height: 54px;
		padding: 0;
		border: 0;
		border-bottom: 2px solid transparent;
		border-radius: 0;
		background: none;
		font-size: 1.125rem;
		font-weight: 500;
	}

	.resourceport--look-modern .resourceport-tab:hover {
		border-color: var(--resourceport-color-code);
	}

	.resourceport--look-modern .resourceport-tab[aria-current="page"] {
		border-color: currentColor;
		background: none;
		color: inherit;
		font-weight: 700;
	}

	.resourceport--look-modern .resourceport-tab__icon {
		width: 16px;
		height: 16px;
		stroke-width: 2;
	}

	.resourceport--look-modern .resourceport-tab__count {
		color: var(--resourceport-color-muted);
		font-size: 0.9375rem;
		opacity: 1;
	}

	.resourceport--look-modern .resourceport-subtabs {
		margin-top: 20px;
	}

	.resourceport--look-modern .resourceport-subtabs__list {
		gap: 10px;
	}

	.resourceport--look-modern .resourceport-subtab {
		font-size: 0.9375rem;
		padding: 0 16px;
	}

	.resourceport--look-modern .resourceport-filterbar {
		flex-direction: row;
		align-items: center;
		justify-content: space-between;
		gap: 12px 16px;
		margin-top: 24px;
	}

	.resourceport--look-modern .resourceport-filterbar__picks {
		gap: 12px;
	}

	.resourceport--look-modern .resourceport-pick {
		flex: 0 1 auto;
	}

	.resourceport--look-modern .resourceport-pick__select {
		width: auto;
		max-width: 240px;
		padding-right: 40px;
		font-weight: 500;
	}

	.resourceport--look-modern .resourceport-field--sort .resourceport-field__select {
		padding-right: 40px;
		font-weight: 500;
	}

	.resourceport--look-modern .resourceport-filterbar__tools {
		gap: 12px;
		margin-left: auto;
	}

	.resourceport--look-modern .resourceport-count-compact {
		display: none;
	}

	.resourceport--look-modern .resourceport-results-region {
		margin-top: 28px;
	}

	.resourceport--look-modern .resourceport-index__head {
		display: flex;
		align-items: flex-end;
		gap: 16px;
		padding: 0 8px 12px;
		border-bottom: 1px solid currentColor;
		color: var(--resourceport-color-muted);
		font-size: 0.875rem;
		font-weight: 600;
	}

	.resourceport--look-modern .resourceport-index__head-doc {
		flex: 1 1 auto;
		min-width: 0;
		padding-left: 68px;
	}

	.resourceport--look-modern .resourceport-index__head .resourceport-cell {
		color: inherit;
		font-size: inherit;
	}

	.resourceport--look-modern .resourceport-index__head-actions {
		flex: none;
		width: 164px;
	}

	.resourceport--look-modern .resourceport-group__title {
		padding: 30px 8px 10px;
		font-size: 0.8125rem;
	}

	.resourceport--look-modern .resourceport-row {
		gap: 16px;
		padding: 18px 8px;
	}

	.resourceport--look-modern .resourceport-row__tile {
		width: 40px;
		height: 50px;
		margin-right: 12px;
	}

	.resourceport--look-modern .resourceport-row__tile .resourceport-filetile__label {
		bottom: 7px;
		font-size: 10px;
	}

	.resourceport--look-modern .resourceport-row__main {
		gap: 4px;
	}

	.resourceport--look-modern .resourceport-row__heading {
		font-size: 1.1875rem;
		font-weight: 600;
	}

	.resourceport--look-modern .resourceport-row__context,
	.resourceport--look-modern .resourceport-row__desc {
		display: block;
	}

	.resourceport--look-modern .resourceport-row__compact {
		display: none;
	}

	.resourceport--look-modern .resourceport-row__heading .resourceport-flag {
		display: inline-block;
	}

	.resourceport--look-modern .resourceport-cell--language,
	.resourceport--look-modern .resourceport-cell--updated {
		display: block;
	}

	.resourceport--look-modern .resourceport-row__actions {
		width: 164px;
	}

	.resourceport--look-modern .resourceport-row__actions .resourceport-text-button {
		display: inline-flex;
	}

	.resourceport--look-modern .resourceport-empty {
		margin-top: 28px;
		padding: 40px 0;
	}

	.resourceport--look-modern .resourceport-empty__title {
		font-size: 1.375rem;
	}

	/* As wide as the list it stands in for; the text keeps a readable measure. */
	.resourceport--look-modern .resourceport-locked--panel {
		margin-top: 40px;
		gap: 16px;
		padding: 48px;
	}

	.resourceport--look-modern .resourceport-locked--panel .resourceport-locked__text {
		max-width: 44em;
	}

	.resourceport--look-modern .resourceport-locked--panel .resourceport-locked__icon {
		width: 56px;
		height: 56px;
	}

	.resourceport--look-modern .resourceport-locked--panel .resourceport-locked__icon .resourceport-icon {
		width: 24px;
		height: 24px;
	}

	.resourceport--look-modern .resourceport-locked--panel .resourceport-locked__title {
		font-size: 1.875rem;
	}

	.resourceport--look-modern .resourceport-locked--panel .resourceport-locked__text p {
		font-size: 1.1875rem;
	}

	.resourceport--look-modern .resourceport-locked--panel .resourceport-button {
		width: auto;
		min-height: 48px;
		padding: 10px 22px;
	}

	.resourceport--look-modern .resourceport-teaser-region:not(:empty) {
		margin-top: 56px;
	}

	.resourceport--look-modern .resourceport-locked--teaser {
		display: flex;
		flex-direction: row;
		align-items: center;
		gap: 24px;
		padding: 28px 32px;
	}

	.resourceport--look-modern .resourceport-locked--teaser .resourceport-locked__icon {
		width: 52px;
		height: 52px;
	}

	.resourceport--look-modern .resourceport-locked--teaser .resourceport-locked__icon .resourceport-icon {
		width: 22px;
		height: 22px;
	}

	.resourceport--look-modern .resourceport-locked--teaser .resourceport-locked__text {
		display: grid;
		flex: 1 1 auto;
		gap: 4px;
	}

	.resourceport--look-modern .resourceport-locked--teaser .resourceport-locked__title {
		font-size: 1.25rem;
		font-weight: 600;
	}

	.resourceport--look-modern .resourceport-locked--teaser .resourceport-locked__text p {
		font-size: 1.0625rem;
	}

	.resourceport--look-modern .resourceport-locked--teaser .resourceport-button {
		flex: none;
		min-height: 46px;
		padding: 10px 20px;
	}
}

/* Narrow: the count below the filters is the one people see. */
@container (max-width: 759px) {
	.resourceport--look-modern .resourceport-searchbar .resourceport-count {
		position: absolute;
		width: 1px;
		height: 1px;
		margin: -1px;
		padding: 0;
		overflow: hidden;
		clip: rect(0, 0, 0, 0);
		white-space: nowrap;
		border: 0;
	}

	/* Covers without their buttons, when the site asks for it: a row less
	   under each cover. A tap on a cover opens its details, which hold
	   Open and Download. The list keeps its buttons. */
	.resourceport--look-modern.resourceport--no-phone-cover-actions .resourceport-cover__actions {
		display: none;
	}
}

@container (min-width: 760px) {
	/* The button sits beside the text, level with its last line. */
	.resourceport--look-modern .resourceport-lead--side {
		flex-direction: row;
		align-items: flex-end;
		justify-content: space-between;
		gap: 40px;
	}

	.resourceport--look-modern .resourceport-lead--side .resourceport-account {
		flex: none;
		flex-direction: row;
		align-items: center;
		gap: 16px;
		margin-inline-start: auto;
	}

	.resourceport--look-modern .resourceport-account__button {
		width: auto;
		padding-inline: 20px;
	}

	.resourceport--look-modern .resourceport-lead--side .resourceport-account--signed-in {
		padding: 0;
		border: 0;
		background: none;
	}

	.resourceport--look-modern .resourceport-lead--side .resourceport-account--signed-in .resourceport-account__button {
		background: transparent;
		color: inherit;
	}

	.resourceport--look-modern .resourceport-signbar {
		grid-template-columns: auto minmax(0, 1fr) auto;
		min-height: 60px;
		padding: 8px 8px 8px 12px;
	}

	.resourceport--look-modern .resourceport-signbar__button {
		grid-column: auto;
		width: auto;
	}
}

@container (min-width: 760px) {
	@media (pointer: fine) {
		.resourceport--look-modern.resourceport--js .resourceport-searchbar__key {
			display: inline-grid;
		}
	}
}

/* Wide: every column of the index. */
@container (min-width: 1000px) {
	.resourceport--look-modern .resourceport-cell {
		display: block;
	}

	.resourceport--look-modern .resourceport-results--covers {
		grid-template-columns: repeat(4, minmax(0, 1fr));
		gap: 40px 24px;
	}

	.resourceport--look-modern .resourceport-cover__face {
		padding: 24px;
	}

	.resourceport--look-modern .resourceport-cover__title {
		font-size: 1.75rem;
		letter-spacing: -0.015em;
	}

	.resourceport--look-modern .resourceport-cover__type {
		font-size: 0.75rem;
	}

	.resourceport--look-modern .resourceport-cover__foot {
		font-size: 0.875rem;
	}

	.resourceport--look-modern .resourceport-cover--image .resourceport-cover__title {
		font-size: 1.125rem;
	}

	.resourceport--look-modern .resourceport-cover__where {
		font-size: 0.9375rem;
	}
}
