.directory-page {
	position: relative;
	height: 100vh;
	height: 100dvh;
	overflow: hidden;
	/* Gold (#f3ce7e), as the merchants' faded edges show the page through. */
	background: var(--justco-gold);
	color: #000;
}

body.admin-bar .directory-page {
	height: calc(100vh - 32px);
	height: calc(100dvh - 32px);
}

/* Solid, so list view's scrolling cards pass under the links rather than behind them. */
.directory-nav {
	background: var(--justco-gold);
}

/* Directory only: walnut links and logo. */
.directory-nav .site-nav__list > a,
.directory-nav .site-nav__logo {
	color: var(--color-walnut-brown);
}

.directory-nav .site-nav__list > a[aria-current="page"] {
	opacity: .5;
}

/* Get in touch: the brand guide's sand on its walnut, as over the homepage's hero. */
.directory-nav .site-nav__cta {
	color: #d3bca7;
}

/*
 * The merchants scroll inside the page, in a box that starts under the navbar,
 * so its scrollbar sits below the header at the window's edge, and end in the
 * site footer. The top edge fades out (gone by 40px), so cards dissolve near
 * the navbar instead of being cut off against it.
 */
.directory-main {
	--directory-pad-x: 0px;
	display: flex;
	flex-wrap: wrap;
	/* The list at the top, the footer at the foot: with few merchants showing,
	   the footer still meets the bottom of the window instead of leaving a gap
	   under it. (With more, there's no spare room and they simply stack.) */
	align-content: space-between;
	align-items: flex-start;
	justify-content: flex-start;
	height: calc(100% - var(--site-nav-height));
	margin-top: var(--site-nav-height);
	padding: 48px var(--directory-pad-x) 0;
	overflow-y: auto;
	overscroll-behavior: contain;
	background: var(--justco-gold);
	--directory-fade-top: 0px;
	--directory-fade-solid: 40px;
	-webkit-mask-image: linear-gradient(to bottom, transparent var(--directory-fade-top), #000 var(--directory-fade-solid));
	mask-image: linear-gradient(to bottom, transparent var(--directory-fade-top), #000 var(--directory-fade-solid));
}

/* The footer closes the list, full width whatever the list's side padding. */
.directory-main > .home-footer {
	flex: none;
	width: calc(100% + 2 * var(--directory-pad-x));
	margin: 96px calc(-1 * var(--directory-pad-x)) 0;
}

/* A quiet scrollbar: a slim walnut handle on no track, over the page's yellow. */
.directory-main {
	scrollbar-width: thin;
	scrollbar-color: color-mix(in srgb, var(--color-walnut-brown) 30%, transparent) transparent;
}

/* Only the list scrolls here, so don't reserve a page scrollbar beside its own. */
html:has(.directory-page) {
	scrollbar-gutter: auto;
}

/* Keep the navbar's and toggles' right edges where a reserved page scrollbar
   would put them, so nothing shifts between pages (set in directory.js). */
.directory-nav {
	padding-right: var(--directory-scrollbar, 0px);
}

/* Three 320px columns (1008px) centred on the page, but at least 240px in
   to clear the filters, or as far in as fits where the screen is narrower. */
.directory-list {
	display: flex;
	flex: none;
	align-items: flex-start;
	gap: 24px;
	margin-left: max(calc((100% + var(--directory-scrollbar, 0px) - 1008px) / 2), min(240px, max(0px, 100% - 1032px)));
}

.directory-column {
	display: flex;
	flex: 0 0 320px;
	flex-direction: column;
	gap: 24px;
	width: 320px;
}

/*
 * Grid view: the columns share one set of rows (subgrid), so cards side by side
 * match the tallest in their row. directory.js sets --directory-rows to the
 * longest column's visible cards.
 */
.directory-page:not([data-view="list"]) .directory-list {
	display: grid;
	grid-auto-flow: column;
	grid-auto-columns: 320px;
	grid-template-rows: repeat(var(--directory-rows, 1), auto);
	align-items: stretch;
}

.directory-page:not([data-view="list"]) .directory-column {
	display: grid;
	grid-row: 1 / span var(--directory-rows, 1);
	grid-template-rows: subgrid;
	gap: inherit;
}

/* Taller cards keep the category and unit on their bottom edge. */
.directory-page:not([data-view="list"]) .directory-card__body {
	flex: 1;
	justify-content: space-between;
}

.directory-column[hidden],
.directory-card[hidden],
.directory-empty[hidden],
/* Outranks the grid view's display: grid above, so a column left empty (one or
   two columns on phones and tablets, directory.js) doesn't keep its grid track
   and squeeze the cards into a third of the width. */
.directory-page:is([data-view], :not([data-view])) .directory-column[hidden] {
	display: none;
}

.directory-empty {
	flex: 0 0 100%;
	margin: 0;
	text-align: center;
	color: var(--justco-tertiary);
	font-family: "EB Garamond", serif;
	font-size: 22px;
}

.directory-card {
	display: flex;
	flex-direction: column;
	gap: 8px;
	width: 320px;
	padding: 8px;
	border-radius: 20px;
	background: #fcf3df;
	overflow: hidden;
	cursor: pointer;
	transition: background-color 200ms ease, transform 400ms cubic-bezier(0.22, 1, 0.36, 1);
}

.directory-card:hover,
.directory-card[aria-expanded="true"] {
	background: #fff;
}

.directory-card:focus-visible {
	outline: 2px solid var(--color-brick-red);
	outline-offset: 2px;
}

/* Grid view only: across a full-width list row, the same lean swings too far. */
.directory-page:not([data-view="list"]) .directory-card {
	transform: perspective(900px) rotateX(var(--directory-card-lean-y, 0deg)) rotateY(var(--directory-card-lean-x, 0deg)) scale(var(--directory-card-scale, 1));
}

.directory-page:not([data-view="list"]) .directory-card:hover {
	--directory-card-scale: 1.03;
}

.directory-card[hidden] {
	display: none;
}

.directory-card__thumb {
	position: relative;
	aspect-ratio: 374 / 249.33;
	border-radius: 8px;
	/* Walnut at 6%: the placeholder's wash, and what shows while a photo loads. */
	background: color-mix(in srgb, var(--color-walnut-brown) 6%, transparent);
	overflow: hidden;
}

/* WP Admin's Opening soon: a tag on the photo's corner, in the chosen
   filter's sunlit yellow and walnut, set like the cards' category line. */
.directory-card__soon {
	position: absolute;
	z-index: 1;
	top: 8px;
	left: 8px;
	display: flex;
	align-items: center;
	height: 24px;
	padding: 0 10px 0 calc(10px + 0.15em);
	border-radius: 1000px;
	background: var(--color-sunlit-yellow);
	color: var(--color-walnut-brown);
	font-family: "Sweet Sans Pro", sans-serif;
	font-size: 0.6875rem;
	font-weight: 700;
	line-height: 1;
	letter-spacing: 0.15em;
	text-transform: uppercase;
	white-space: nowrap;
	pointer-events: none;
}

.directory-card__thumb img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	max-width: none;
	object-fit: cover;
}

.directory-card__thumb--starbucks img {
	inset: auto;
	top: -25%;
	left: -2.2%;
	width: 104.41%;
	height: 156.62%;
}

.directory-card__body {
	display: flex;
	flex-direction: column;
	gap: 16px;
	padding: 8px;
}

.directory-card__copy {
	display: flex;
	flex-direction: column;
	gap: 3px;
}

/* Sans names over serif descriptions, as on the homepage: tracked capitals,
   so 16px reads as large as the 17px serif beneath. */
.directory-card__copy h2 {
	margin: 0;
	color: var(--color-walnut-brown);
	font-family: "Sweet Sans Pro", sans-serif;
	font-size: 1rem;
	font-style: normal;
	font-weight: 700;
	line-height: 1.3;
	letter-spacing: 0.15em;
	text-transform: uppercase;
	/* Long names, such as KARVE Transformer Pilates, wrap in even lines. */
	text-wrap: balance;
}

/* Café&Meal MUJI's ampersand: upright in the sans, with no italic to match. */
.directory-card__copy h2 em {
	font-style: normal;
}

/* Serif, as the descriptions are elsewhere on the site (EB Garamond Medium,
   a size up to match the sans it replaces). */
.directory-card__copy p {
	margin: 0;
	max-width: 300px;
	/* Walnut at the same 70% the near-black secondary text used. */
	color: color-mix(in srgb, var(--color-walnut-brown) 70%, transparent);
	font-family: "EB Garamond", serif;
	font-size: 18px;
	font-weight: 500;
	line-height: 1.3;
}

.directory-card__meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 4px 12px;
	/* The unit in the category's type and colour (the client's note, after
	   Figma): 12px bold tracked capitals in walnut. */
	color: var(--color-walnut-brown);
	font-size: 0.75rem;
	font-weight: 700;
	line-height: 16px;
	letter-spacing: 0.15em;
	text-transform: uppercase;
	white-space: nowrap;
}

.directory-card__category {
	display: flex;
	align-items: center;
	gap: 6px;
	/* Tracked capitals read larger than lowercase, so smaller than the unit. */
	font-size: 0.75rem;
	line-height: 16px;
	font-weight: 700;
	letter-spacing: 0.15em;
	text-transform: uppercase;
	color: var(--color-walnut-brown);
}

/* Category icons on the cards and filters: a mask filled with the text colour
   (walnut), so they follow the token instead of the SVG files' own brick. */
.directory-icon {
	flex: none;
	width: var(--directory-icon-size, 16px);
	height: var(--directory-icon-size, 16px);
	background: currentColor;
	-webkit-mask: var(--directory-icon) center / contain no-repeat;
	mask: var(--directory-icon) center / contain no-repeat;
}

/* Only its controls take clicks, so the footer beneath stays usable. */
.directory-aside > * {
	pointer-events: auto;
}

.directory-aside {
	pointer-events: none;
	position: absolute;
	z-index: 2;
	top: 0;
	left: 0;
	display: flex;
	flex-direction: column;
	gap: 20px;
	width: 280px;
	height: 100%;
	padding: 120px 28px 0;
}

.directory-back {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	border-radius: 1000px;
	background: var(--color-walnut-brown);
	transition: transform 200ms ease;
}

.directory-back:hover {
	transform: scale(1.06);
}

/* Laid out as What's On's category rail (whats-on.css .whats-on-rail): a column
   of full-width rows, each icon in a 36px disc, in the Directory's own colours. */
.directory-filters {
	display: flex;
	flex-direction: column;
	align-items: stretch;
	/* 48px from one filter to the next, as before: 44px pills 4px apart in the
	   sidebar; 4px between the pills below 1280px. Pulled left by the pill's
	   4px inset, so the discs stay in line with the back button. */
	gap: 4px;
	margin-left: -4px;
}

.directory-filter {
	display: flex;
	align-items: center;
	gap: 8px;
	width: fit-content;
	height: fit-content;
	margin: 0;
	/* Room for the chosen filter's pill (NEU-453), on every filter so none shifts. */
	padding: 4px 16px 4px 4px;
	border: 0;
	border-radius: 1000px;
	background: transparent;
	color: var(--color-walnut-brown);
	font-family: "Sweet Sans Pro", sans-serif;
	/* 13px in the sidebar (text-[0.8125rem]); the pills below 1280px keep 12px. */
	font-size: 0.8125rem;
	font-weight: 700;
	line-height: 16px;
	letter-spacing: 0.15em;
	text-align: left;
	text-transform: uppercase;
	white-space: nowrap;
	/* Grow from the left, so the column of pills keeps its edge. */
	transform-origin: left center;
	cursor: var(--justco-cursor-interactive, pointer);
	transition: background-color 200ms ease, color 200ms ease;
}

/* The site's hover: the label rolls up as its copy pushes in from below, as the
   navbar's links do (.site-nav__roll, style.css). Not on the chosen filter, as
   the navbar skips the page you're on. */
.directory-filter:not([aria-pressed="true"]):focus-visible .site-nav__roll > span,
.directory-filter:not([aria-pressed="true"]):focus-visible .site-nav__roll::after {
	transform: translateY(-100%);
}

@media (hover: hover) {
	.directory-filter:not([aria-pressed="true"]):hover .site-nav__roll > span,
	.directory-filter:not([aria-pressed="true"]):hover .site-nav__roll::after {
		transform: translateY(-100%);
	}
}

.directory-filter__disc {
	display: flex;
	flex: 0 0 36px;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.8);
	transition: background-color 200ms ease;
}

/* Icons a step back from their labels, on the cards. */
.directory-card__category .directory-icon {
	opacity: 0.8;
}

/* The chosen filter is a walnut pill with a cream label, its icon on a
   sunlit-yellow disc, as the current grid/list view is (NEU-453). With none
   chosen, every filter rests the same, on its white disc. */
.directory-filter[aria-pressed="true"] {
	background: var(--color-walnut-brown);
	color: #fcf3df;
}

.directory-filter[aria-pressed="true"] .directory-filter__disc {
	background: var(--color-sunlit-yellow);
	color: var(--color-walnut-brown);
}

/* Stepped aside while the footer is in view (directory.js). */
.directory-view.is-over-footer {
	opacity: 0;
	visibility: hidden;
}

.directory-view {
	transition: opacity 250ms ease, visibility 0s 0s;
	position: absolute;
	z-index: 3;
	right: calc(28px + var(--directory-scrollbar, 0px));
	bottom: 28px;
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.directory-view__option {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	margin: 0;
	padding: 0;
	border: 1px solid transparent;
	border-radius: 1000px;
	background: rgba(255, 255, 255, 0.8);
	transition: background-color 200ms ease;
}

.directory-view__option[aria-pressed="false"] {
	border-color: color-mix(in srgb, var(--color-walnut-brown) 30%, transparent);
	background: transparent;
}

.directory-view__option:hover {
	background: rgba(255, 255, 255, 0.8);
}

/* The current view, after :hover so it keeps its colour under the pointer. */
.directory-view__option[aria-pressed="true"] {
	background: var(--color-sunlit-yellow);
}

/* Phones show the grid only (directory.js), so there's no toggle to float
   over the cards, as on What's On. */
@media (max-width: 600px), (max-width: 760px) and (max-height: 520px) {
	.directory-view {
		display: none;
	}
}

/* After every hover rule it overrides, so it wins on source order. */
@media (prefers-reduced-motion: reduce) {
	.directory-back,
	.directory-filter,
	.directory-view__option,
	.directory-card,
	.directory-sheet__action,
	.directory-sheet__chevron,
	.directory-sheet__week,
	.directory-sheet__week.is-open,
	.directory-sheet__listing,
	.directory-sheet__listing::after,
	.directory-sheet__listings-list {
		transition: none;
	}

	.directory-back:hover {
		transform: none;
	}

	.directory-page:not([data-view="list"]) .directory-card:hover {
		--directory-card-scale: 1;
	}
}

.directory-back img,
.directory-view__option img {
	flex: 0 0 auto;
	max-width: none;
}

.directory-back:focus-visible,
.directory-filter:focus-visible,
.directory-view__option:focus-visible {
	outline: 2px solid var(--color-brick-red);
	outline-offset: 2px;
}

.directory-page[data-view="list"] .directory-main {
	align-items: flex-start;
	/* Equal sides, so the list centres on the page and still clears the filters. */
	--directory-pad-x: 300px;
	padding-top: 38px;
	overflow-y: auto;
	overscroll-behavior: contain;
}

.directory-page[data-view="list"] .directory-list {
	flex-direction: column;
	align-items: stretch;
	gap: 16px;
	flex: 0 1 auto;
	width: 100%;
	max-width: 640px;
	margin: 0 auto;
	padding: 0;
}

.directory-page[data-view="list"] .directory-column {
	display: contents;
}

.directory-page[data-view="list"] .directory-card {
	flex-direction: row;
	align-items: stretch;
	gap: 16px;
	width: 100%;
}

.directory-page[data-view="list"] .directory-card__thumb {
	flex: 0 0 220px;
	align-self: flex-start;
}

.directory-page[data-view="list"] .directory-card__body {
	flex: 1;
	min-width: 0;
	justify-content: space-between;
}

.directory-page[data-view="list"] .directory-card__copy h2 {
	white-space: normal;
}

.directory-page[data-view="list"] .directory-card__meta {
	flex-wrap: wrap;
	gap: 8px 16px;
	white-space: normal;
}

@media (max-width: 1000px) {
	.directory-page[data-view="list"] .directory-main {
		--directory-pad-x: 240px;
	}

	.directory-page[data-view="list"] .directory-aside {
		width: 230px;
		padding-right: 12px;
		padding-left: 16px;
	}

	.directory-page[data-view="list"] .directory-card__thumb {
		flex-basis: 140px;
	}
}

@media (max-width: 640px) {
	.directory-page[data-view="list"] .directory-main {
		/* The filter chips sit in the list's top 40px, so the fade runs under them. */
		--directory-fade-top: 24px;
		--directory-fade-solid: 56px;
		--directory-pad-x: 16px;
		padding-top: 56px;
	}

	.directory-page[data-view="list"] .directory-aside {
		top: var(--site-nav-height);
		flex-direction: row;
		align-items: center;
		gap: 12px;
		width: 100%;
		height: 40px;
		padding: 0 16px;
	}

	.directory-page[data-view="list"] .directory-back {
		flex-shrink: 0;
	}

	.directory-page[data-view="list"] .directory-filters {
		margin-left: 0;
		flex-direction: row;
		min-width: 0;
		overflow-x: auto;
	}

	.directory-page[data-view="list"] .directory-filter {
		flex-shrink: 0;
		width: auto;
		min-height: 0;
		height: 40px;
		padding: 4px 14px 4px 4px;
	}

	.directory-page[data-view="list"] .directory-filter__disc {
		flex-basis: 32px;
		width: 32px;
		height: 32px;
	}

	.directory-page[data-view="list"] .directory-card {
		gap: 8px;
	}

	.directory-page[data-view="list"] .directory-card__thumb {
		flex-basis: 104px;
		aspect-ratio: 1;
	}

	.directory-page[data-view="list"] .directory-card__body {
		gap: 8px;
		padding: 4px;
	}


	.directory-page[data-view="list"] .directory-card__copy h2 {
		font-size: 15px;
	}

	.directory-page[data-view="list"] .directory-card__copy p {
		font-size: 15px;
	}
}

@media (max-width: 782px) {
	body.admin-bar .directory-page {
		height: calc(100vh - 46px);
		height: calc(100dvh - 46px);
	}
}

/*
 * Merchant sheet (Figma 279:951): opening a card slides this in over the
 * right-hand edge, above the navbar, whose links step aside while it's open.
 */
.directory-sheet {
	position: absolute;
	z-index: 30;
	top: 0;
	right: 0;
	bottom: 0;
	display: flex;
	flex-direction: column;
	/* Figma's 300px left the copy cramped; 390px (w-97.5) per review. */
	width: 390px;
	border-left: 1px solid var(--justco-border);
	background: #fcf3df;
	box-shadow: -12px 0 32px rgba(0, 0, 0, 0.1);
	overflow-y: auto;
	overscroll-behavior: contain;
	transform: translateX(100%);
	visibility: hidden;
	transition: transform 500ms cubic-bezier(0.22, 1, 0.36, 1), visibility 0s 500ms;
}

/* Dims the page behind the sheet, so the near-white cards don't run into it.
   It also takes clicks while open, so clicking anywhere outside just closes. */
.directory-page::after {
	content: "";
	position: absolute;
	z-index: 25;
	inset: 0;
	background: rgba(11, 37, 58, 0.25);
	opacity: 0;
	pointer-events: none;
	transition: opacity 400ms ease;
}

.directory-page.has-sheet::after {
	opacity: 1;
	pointer-events: auto;
}

.directory-page.has-sheet .directory-sheet {
	transform: none;
	visibility: visible;
	transition: transform 500ms cubic-bezier(0.22, 1, 0.36, 1), visibility 0s;
}

/* The sheet covers the right of the navbar, so only those links step aside. */
.directory-nav .site-nav__links--end {
	transition: opacity 250ms ease, visibility 0s;
}

.directory-page.has-sheet .directory-nav .site-nav__links--end {
	opacity: 0;
	visibility: hidden;
	transition: opacity 250ms ease, visibility 0s 250ms;
}

.directory-sheet__close {
	position: absolute;
	z-index: 1;
	top: 10px;
	right: 10px;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 28px;
	height: 28px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	/* Frosted glass over the photo. */
	background: rgba(255, 255, 255, 0.2);
	-webkit-backdrop-filter: blur(12px);
	backdrop-filter: blur(12px);
	color: #fff;
	cursor: var(--justco-cursor-interactive, pointer);
	transition: background-color 200ms ease;
}

/* A drawn cross, 12px square, rather than the font's narrower × glyph. */
.directory-sheet__close svg {
	display: block;
	width: 12px;
	height: 12px;
}

.directory-sheet__close:hover {
	background: rgba(255, 255, 255, 0.35);
}

.directory-sheet__image {
	flex: 0 0 auto;
	/* 3:2, like the cards, so the photo crops match. */
	aspect-ratio: 3 / 2;
	background: color-mix(in srgb, var(--color-walnut-brown) 6%, transparent);
	overflow: hidden;
}

.directory-sheet__image img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

/* No photo yet (directory.js): the panel shows its faint wash alone. */
.directory-sheet__image img[hidden] {
	display: none;
}

/* A merchant without a photo yet: the JustCo Place logo in walnut, centred on
   the tile's faint wash (the card's thumb and the details panel). */
.directory-sheet__image {
	position: relative;
}

.directory-placeholder {
	position: absolute;
	inset: 0;
	margin: auto;
	width: 34%;
	max-width: 132px;
	aspect-ratio: 1417 / 456;
	background: var(--color-walnut-brown);
	-webkit-mask: url("../images/justco-place-logo.svg") center / contain no-repeat;
	mask: url("../images/justco-place-logo.svg") center / contain no-repeat;
}

.directory-placeholder[hidden] {
	display: none;
}

/* Over the light placeholder, the close is walnut: its white cross is made
   for photos. */
.directory-sheet:has([data-sheet-placeholder]:not([hidden])) .directory-sheet__close {
	background: color-mix(in srgb, var(--color-walnut-brown) 10%, transparent);
	color: var(--color-walnut-brown);
}

.directory-sheet:has([data-sheet-placeholder]:not([hidden])) .directory-sheet__close:hover {
	background: color-mix(in srgb, var(--color-walnut-brown) 18%, transparent);
}

.directory-sheet__info {
	display: flex;
	flex-direction: column;
	gap: 28px;
	padding: 20px;
}

.directory-sheet__intro {
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.directory-sheet__copy {
	display: flex;
	flex-direction: column;
	gap: 6px;
	font-size: 17px;
}

/* Set like the cards' titles, so the sheet reads as the same merchant. */
.directory-sheet__copy h2 {
	margin: 0;
	color: var(--color-walnut-brown);
	font-family: "Sweet Sans Pro", sans-serif;
	font-size: 1rem;
	font-weight: 700;
	line-height: 1.3;
	letter-spacing: 0.15em;
	text-transform: uppercase;
	text-wrap: balance;
	outline: none;
}

.directory-sheet__copy p,
.directory-sheet__meta {
	margin: 0;
	color: var(--justco-secondary);
	font-family: "EB Garamond", serif;
	font-size: 17px;
	font-weight: 500;
	line-height: 1.4;
}

/* The description is set like the cards' (18px, 1.3, walnut at 70%), a step
   above the details below. */
.directory-sheet__copy p {
	color: color-mix(in srgb, var(--color-walnut-brown) 70%, transparent);
	font-size: 18px;
	line-height: 1.3;
}

.directory-sheet__action {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 7px;
	width: 100%;
	height: 2.5rem;
	padding: 0 10px;
	border: 0;
	border-radius: 1000px;
	/* The brand guide's sand on walnut, as the homepage navbar's Get in touch. */
	background: var(--color-walnut-brown);
	color: #d3bca7;
	font-family: "Sweet Sans Pro", sans-serif;
	font-size: 13px;
	font-weight: 700;
	line-height: normal;
	letter-spacing: 0.15em;
	text-decoration: none;
	text-transform: uppercase;
	cursor: var(--justco-cursor-interactive, pointer);
	transition: background-color 200ms ease, color 200ms ease;
}

/* Hover and keyboard focus, as Contact's Send: the walnut deepens and the
   sand (text and icon) lightens a touch, to #e5d7ca. Hover only where a pointer
   hovers, so a tap doesn't leave it changed. */
.directory-sheet__action:focus-visible {
	background: color-mix(in srgb, var(--color-walnut-brown) 85%, #000);
	color: color-mix(in srgb, #d3bca7 60%, #fff);
}

@media (hover: hover) {
	.directory-sheet__action:hover {
		background: color-mix(in srgb, var(--color-walnut-brown) 85%, #000);
		color: color-mix(in srgb, #d3bca7 60%, #fff);
	}
}

.directory-sheet__action-icon {
	flex: none;
	width: 14px;
	height: 14px;
	background: currentColor;
	-webkit-mask: var(--directory-action-icon) center / contain no-repeat;
	mask: var(--directory-action-icon) center / contain no-repeat;
}

/* Sweet Sans’s caps sit about 1px above the line box’s middle, so nudge
   the label down to centre it optically against the button and icon. The
   tracking, as on the filters, also trails the last letter, so the label
   gives that space back to stay centred. */
.directory-sheet__action span[data-sheet-action-label] {
	margin-right: -0.15em;
	transform: translateY(1px);
}

.directory-sheet__action[hidden],
.directory-sheet__meta [hidden] {
	display: none;
}

.directory-sheet__meta {
	display: flex;
	flex-direction: column;
	padding: 0;
	border-top: 1px solid var(--justco-border);
	border-bottom: 1px solid var(--justco-border);
	list-style: none;
}

/* Each detail is its own row, ruled off from the next. */
.directory-sheet__meta li {
	display: flex;
	align-items: flex-start;
	gap: 6px;
	padding: 10px 0;
}

.directory-sheet__meta li + li {
	border-top: 1px solid var(--justco-border);
}

.directory-sheet__icon {
	display: flex;
	flex: 0 0 19px;
	justify-content: center;
	padding-top: 4px;
}

.directory-sheet__icon img {
	display: block;
}

/* One line each for street, unit and building, and postcode. */
.directory-sheet__address {
	/* The description's walnut at 70%, rather than the details' grey. */
	color: color-mix(in srgb, var(--color-walnut-brown) 70%, transparent);
	white-space: pre-line;
}

/* Phone, website and Instagram links read in brick red, deepening to walnut brown. */
/* Walnut, set apart from the grey details by colour. On hover the label rolls
   up as its copy pushes in from below, as the navbar's links and the filters
   do (.site-nav__roll, style.css; directory.js wraps the label). */
.directory-sheet__meta a {
	display: inline-block;
	color: var(--color-walnut-brown);
	text-decoration: none;
}

/* The serif's descenders need the details' own line height in the window. */
.directory-sheet__meta a .site-nav__roll {
	line-height: inherit;
}

.directory-sheet__meta a:focus-visible .site-nav__roll > span,
.directory-sheet__meta a:focus-visible .site-nav__roll::after {
	transform: translateY(-100%);
}

@media (hover: hover) {
	.directory-sheet__meta a:hover .site-nav__roll > span,
	.directory-sheet__meta a:hover .site-nav__roll::after {
		transform: translateY(-100%);
	}
}

.directory-sheet__hours {
	display: flex;
	flex-wrap: wrap;
	gap: 5px;
}

/* Closed: same walnut mix as Opening soon (NEU-446). */
[data-sheet-state] {
	color: color-mix(in srgb, var(--color-walnut-brown) 70%, transparent);
}

[data-sheet-state].is-open {
	color: var(--color-olive);
}

/* Not open yet (WP Admin's Opening soon): neither open nor closed, in the
   description's walnut at 70%. */
[data-sheet-state].is-soon {
	color: color-mix(in srgb, var(--color-walnut-brown) 70%, transparent);
}

.directory-sheet__dot {
	color: rgba(20, 20, 20, 0.3);
}

/* Hours: today's summary opens the week below it, like What's On's accordions. */
.directory-sheet__meta .directory-sheet__hours-row {
	display: block;
}

.directory-sheet__hours-toggle {
	display: flex;
	align-items: flex-start;
	gap: 6px;
	width: 100%;
	padding: 0;
	border: 0;
	background: none;
	color: inherit;
	font: inherit;
	text-align: left;
	cursor: var(--justco-cursor-interactive, pointer);
}

.directory-sheet__hours-toggle:focus-visible,
.directory-sheet__listing:focus-visible {
	outline: 2px solid var(--color-brick-red);
	outline-offset: 2px;
	border-radius: 4px;
}

/* The same tone as the row's text, so it reads as part of it. */
.directory-sheet__chevron {
	flex: 0 0 16px;
	align-self: center;
	margin-left: auto;
	transition: transform 300ms cubic-bezier(0.22, 1, 0.36, 1);
}

.directory-sheet__hours-toggle[aria-expanded="true"] .directory-sheet__chevron {
	transform: rotate(180deg);
}

.directory-sheet__week {
	display: grid;
	grid-template-rows: 0fr;
	visibility: hidden;
	transition: grid-template-rows 300ms cubic-bezier(0.22, 1, 0.36, 1), visibility 0s 300ms;
}

.directory-sheet__week.is-open {
	grid-template-rows: 1fr;
	visibility: visible;
	transition: grid-template-rows 300ms cubic-bezier(0.22, 1, 0.36, 1), visibility 0s;
}

.directory-sheet__week-inner {
	min-height: 0;
	overflow: hidden;
}

/* Lined up under the summary's text, past the icon. */
.directory-sheet__days {
	display: flex;
	flex-direction: column;
	gap: 4px;
	margin: 0;
	padding: 10px 0 0 25px;
	font-size: 17px;
	list-style: none;
}

/* Not ruled off like the sheet's rows: the week reads as one block. */
.directory-sheet__meta .directory-sheet__days li {
	display: flex;
	justify-content: space-between;
	gap: 12px;
	padding: 0;
	border: 0;
}

.directory-sheet__meta .directory-sheet__days li.is-today {
	color: #181818;
}

.directory-sheet__week-note {
	margin: 10px 0 2px 25px;
	color: rgba(20, 20, 20, 0.5);
	font-family: "Sweet Sans Pro", sans-serif;
	font-size: 13px;
	line-height: 1.4;
}

/* The merchant's events and offers, styled as What's On's related listings. */
.directory-sheet__listings[hidden] {
	display: none;
}

.directory-sheet__listings h3 {
	margin: 0 0 8px;
	color: var(--justco-secondary);
	font-family: "Sweet Sans Pro", sans-serif;
	font-size: 11px;
	font-weight: 700;
	line-height: 1.4;
	letter-spacing: 0.2em;
	text-transform: uppercase;
}

.directory-sheet__listings-list {
	border: 1px solid var(--justco-border);
	border-radius: 12px;
	overflow: hidden;
	transition: border-color 200ms ease;
}

/* Hovering a listing darkens the box's border a touch. */
.directory-sheet__listings-list:has(.directory-sheet__listing:hover) {
	border-color: rgba(0, 0, 0, 0.28);
}

.directory-sheet__listing {
	display: flex;
	align-items: flex-start;
	gap: 12px;
	padding: 8px 10px 8px 8px;
	color: inherit;
	text-decoration: none;
}

.directory-sheet__listing + .directory-sheet__listing {
	border-top: 1px solid var(--justco-border);
}

/* A quiet chevron says the row leads elsewhere. */
.directory-sheet__listing::after {
	content: "";
	/* The chevron stays centred on the row. */
	align-self: center;
	flex: 0 0 16px;
	height: 16px;
	background: url("../icons/directory-sheet-chevron.svg") center / 16px 16px no-repeat;
	opacity: 0.8;
	transform: rotate(-90deg);
	transition: transform 200ms ease;
}

.directory-sheet__listing:hover::after {
	transform: rotate(-90deg) translateY(2px);
}

.directory-sheet__listing-thumb {
	flex: 0 0 60px;
	/* Top-aligned, level with the title's first capitals. */
	margin-top: 3px;
	width: 60px;
	height: 40px;
	border-radius: 8px;
	background: rgba(0, 0, 0, 0.04);
	overflow: hidden;
}

.directory-sheet__listing-thumb img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.directory-sheet__listing-copy {
	display: flex;
	flex: 1;
	flex-direction: column;
	gap: 2px;
	min-width: 0;
}

.directory-sheet__listing-title {
	color: var(--justco-secondary);
	font-family: "Sweet Sans Pro", sans-serif;
	font-size: 13px;
	/* Semibold asked for; the theme has no 600 face, so this draws the Bold. */
	font-weight: 600;
	line-height: 1.35;
	letter-spacing: 0.1em;
	text-transform: uppercase;
}

.directory-sheet__listing-meta {
	color: rgba(20, 20, 20, 0.5);
	font-family: "EB Garamond", serif;
	font-size: 15px;
	font-weight: 500;
	line-height: 1.3;
}

/* Phones: the sheet covers the page. */
@media (max-width: 640px) {
	.directory-sheet {
		width: 100%;
		border-left: 0;
	}

	/* A full 44px tap target for thumbs, with a larger cross to match. */
	.directory-sheet__close {
		top: 12px;
		right: 12px;
		width: 44px;
		height: 44px;
	}

	.directory-sheet__close svg {
		width: 16px;
		height: 16px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.directory-sheet,
	.directory-page.has-sheet .directory-sheet,
	.directory-page::after {
		transition: none;
	}
}

/* Tablets and phones: the navbar is already a yellow bar (style.css). */
@media (max-width: 1024px) {
	.directory-nav {
		--site-nav-bar: var(--justco-gold);
		--site-nav-bar-ink: var(--color-walnut-brown);
	--site-nav-bar-cta: var(--color-walnut-brown);
	--site-nav-bar-cta-ink: var(--justco-gold);
	}
}

/*
 * Tablets and phones (≤1279px): below this the filters would sit over the
 * cards, so they become a row of chips under the navbar, and the cards fill the
 * width in three, two or one columns (dealt out by directory.js).
 */
@media (max-width: 1279px) {
	.directory-page .directory-main,
	.directory-page[data-view="list"] .directory-main {
		--directory-pad-x: 28px;
		/* The chips sit in the list's top 56px, so the fade runs under them. */
		--directory-fade-top: 40px;
		--directory-fade-solid: 76px;
		padding-top: 84px;
	}

	.directory-page .directory-aside,
	.directory-page[data-view="list"] .directory-aside {
		top: var(--site-nav-height);
		flex-direction: row;
		align-items: center;
		gap: 12px;
		width: 100%;
		height: 64px;
		padding: 0 28px;
	}

	.directory-back {
		flex-shrink: 0;
		width: 40px;
		height: 40px;
	}

	.directory-page .directory-filters {
		gap: 4px;
		margin-left: 0;
		flex-direction: row;
		min-width: 0;
		overflow-x: auto;
		scrollbar-width: none;
		/* Chips fade out at whichever edge has more to scroll to, a hint that the
		   row scrolls: the right at rest, the left too once scrolled, so they
		   soften beside the back button instead of being cut off at it
		   (directory.js sets the two flags). */
		--directory-chips-fade-left: 0px;
		--directory-chips-fade-right: 24px;
		-webkit-mask-image: linear-gradient(to right, transparent, #000 var(--directory-chips-fade-left), #000 calc(100% - var(--directory-chips-fade-right)), transparent);
		mask-image: linear-gradient(to right, transparent, #000 var(--directory-chips-fade-left), #000 calc(100% - var(--directory-chips-fade-right)), transparent);
	}

	.directory-page .directory-filters.is-scrolled {
		--directory-chips-fade-left: 24px;
	}

	.directory-page .directory-filters.is-at-end {
		--directory-chips-fade-right: 0px;
	}

	.directory-page .directory-filters::-webkit-scrollbar {
		display: none;
	}

	.directory-page .directory-filter {
		font-size: 12px;
		flex-shrink: 0;
		width: auto;
		min-height: 0;
		height: 40px;
		padding: 4px 14px 4px 4px;
	}

	.directory-page .directory-filter__disc {
		flex-basis: 32px;
		width: 32px;
		height: 32px;
	}

	.directory-page:not([data-view="list"]) .directory-list {
		grid-auto-columns: minmax(0, 1fr);
		width: 100%;
		max-width: 1100px;
		margin: 0 auto;
	}

	.directory-page:not([data-view="list"]) .directory-column {
		flex: 1 1 0;
		width: auto;
		min-width: 0;
	}

	.directory-page:not([data-view="list"]) .directory-card {
		width: 100%;
	}

	.directory-card__copy h2 {
		white-space: normal;
	}

	.directory-card__copy p {
		max-width: none;
	}

	/* Touch screens have no pointer to lean towards, and no hover to grow on. */
	.directory-page:not([data-view="list"]) .directory-card {
		transform: none;
	}
}

@media (max-width: 600px), (max-width: 760px) and (max-height: 520px) {
	.directory-page .directory-main,
	.directory-page[data-view="list"] .directory-main {
		--directory-pad-x: 16px;
	}

	.directory-page .directory-aside,
	.directory-page[data-view="list"] .directory-aside {
		padding: 0 16px;
	}

	.directory-page:not([data-view="list"]) .directory-list,
	.directory-page:not([data-view="list"]) .directory-column {
		gap: 16px;
	}

	.directory-view {
		right: 16px;
		bottom: 16px;
	}
}

/* One column (directory.js, below 600px): the cards keep their desktop width,
   centred, rather than stretching across the phone, so more fits on screen. */
@media (max-width: 599px) {
	.directory-page:not([data-view="list"]) .directory-list {
		max-width: 320px;
	}
}

