/* ==========================================================================
   BSA artist profile — the profile page template (Theme Builder layout 238)
   Mockup: Profile.dc.html on the design canvas.
   Markup reference: docs/shortcodes.md sections 6.2 and 8.6 to 8.17.
   Needs tokens.css, typography.css and buttons.css first.

   Divi classes this file relies on (set in each section's, row's or
   module's CSS Class field):
     bsa-profile-top       section: notice and breadcrumbs (left alone here)
     bsa-profile-hero      section: headshot, tier, name, media, links
       bsa-profile-hero-row   its row (1/4 + 3/4 columns)
       bsa-hero-memorial      the Text module holding [bsa_profile_memorial]
       bsa-hero-media         the Code module holding [bsa_profile_media]
       bsa-hero-links         the Code module holding contact + social
     bsa-profile-work      section: gallery and videos
       bsa-portfolio          the Code module holding [bsa_profile_gallery]
     bsa-profile-about     section: About, Education/Awards/Publications,
                           then the edit link in a second row
     bsa-profile-explore   section: Explore more heading and featured grid

   Section and row spacing is set here, overriding Divi's. Leave padding
   at Divi's defaults in those sections' settings.

   Specificity, as in events.css:
   - Divi's structure: on a CPT page Divi prefixes its section, row,
     column and module rules (its defaults and each module's own
     settings) with ".et-db #et-boc .et-l". Rules here for sections,
     rows, columns and modules carry "body.et-db #et-boc .et-l" too,
     plus a class of ours, so they win. Media-query versions need the
     same prefix, or the desktop rule beats them.
   - Headings: Divi prints CPT headings as ".et-db #et-boc .et-l h2", and
     typography.css section 7 answers with "body.et-db #et-boc .et-l h2".
     Heading rules here use that same prefix plus a class, so they win.
   - Links and lists: ":not(#bsa)" (no element has that ID) adds an ID's
     weight, so these rules beat Divi's link colours and its
     ".et-l--body ul" bullets and padding.

   Uses :has() to drop parts that printed nothing (supported in every
   current browser; older ones just show the empty space).

   Breakpoints follow Divi: 980px (tablet) and 767px (phone).
   ========================================================================== */


/* --------------------------------------------------------------------------
   1. Tier label — shared with the directory card (.bsa-card-tier)
   The design system's .bsa-tier: uppercase eyebrow with a square marker.
   -------------------------------------------------------------------------- */

.bsa-profile-tier:not(#bsa),
.bsa-card-tier:not(#bsa) {
	display: inline-flex;
	align-items: center;
	gap: var(--space-2);
	margin: 0;
	padding: 0;
	font-family: var(--font-sans);
	font-size: 0.8125rem;                  /* 13/16 eyebrow */
	line-height: 1.23;
	font-weight: 600;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--ink-muted);
}

.bsa-profile-tier::before,
.bsa-card-tier::before {
	content: "";
	flex: none;
	width: 8px;
	height: 12px;
	background: var(--border-strong);
}

.bsa-tier-exhibiting:not(#bsa)          { color: var(--Blue); }
.bsa-tier-exhibiting::before            { background: var(--Blue); }
.bsa-tier-distinguished:not(#bsa)       { color: var(--orange-700); }
.bsa-tier-distinguished::before         { background: var(--Orange); }
.bsa-tier-associate:not(#bsa)           { color: var(--green-700); }
.bsa-tier-associate::before             { background: var(--Green); }
.bsa-tier-student:not(#bsa)             { color: var(--ink-muted); }
.bsa-tier-student::before               { background: var(--border-strong); }
.bsa-profile-tier-memorial:not(#bsa)    { color: var(--ink); }
.bsa-profile-tier-memorial::before      { background: var(--ink); }


/* --------------------------------------------------------------------------
   2. Section and row spacing
   -------------------------------------------------------------------------- */

body.et-db #et-boc .et-l :is(.bsa-profile-hero, .bsa-profile-work, .bsa-profile-about, .bsa-profile-explore).et_pb_section:not(#bsa) {
	padding: var(--space-12) 0;                         /* hero: 48 */
}

body.et-db #et-boc .et-l .bsa-profile-work.et_pb_section:not(#bsa) {
	padding: var(--space-16) 0 0;                       /* 64 top, About adds the gap below */
}

body.et-db #et-boc .et-l .bsa-profile-about.et_pb_section:not(#bsa) {
	padding: var(--space-16) 0 var(--space-24);         /* 64 / 96 */
}

body.et-db #et-boc .et-l .bsa-profile-explore.et_pb_section:not(#bsa) {
	padding: var(--space-24) 0;                         /* 96 / 96 */
}

body.et-db #et-boc .et-l :is(.bsa-profile-hero, .bsa-profile-work, .bsa-profile-about, .bsa-profile-explore) .et_pb_row:not(#bsa) {
	padding: 0;
}

body.et-db #et-boc .et-l :is(.bsa-profile-hero, .bsa-profile-work, .bsa-profile-about, .bsa-profile-explore) .et_pb_module:not(#bsa) {
	margin-bottom: 0;
}

/* A Code module whose shortcode printed nothing takes no space. */
body.et-db #et-boc .et-l :is(.bsa-profile-hero, .bsa-profile-work, .bsa-profile-about, .bsa-profile-explore)
	.et_pb_code:not(:has(.et_pb_code_inner > *)) {
	display: none;
}


/* --------------------------------------------------------------------------
   3. Hero: headshot | tier, name, memorial text, media, contact + social
   -------------------------------------------------------------------------- */

body.et-db #et-boc .et-l .bsa-profile-hero-row:not(#bsa) {
	display: grid;
	grid-template-columns: 240px minmax(0, 1fr);
	column-gap: var(--space-12);
	align-items: center;
}

/* Divi's clearfix would become a grid cell. */
body.et-db #et-boc .et-l .bsa-profile-hero-row::after {
	content: none;
}

body.et-db #et-boc .et-l .bsa-profile-hero-row > .et_pb_column:not(#bsa) {
	float: none;
	width: auto;
	margin: 0;
}

body.et-db #et-boc .et-l .bsa-profile-hero-row > .et_pb_column:last-child:not(#bsa) {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: var(--space-3);
}

/* No headshot: drop its column, the text takes the full width. */
body.et-db #et-boc .et-l .bsa-profile-hero-row:not(#bsa):not(:has(.bsa-profile-headshot)) {
	grid-template-columns: minmax(0, 1fr);
}

body.et-db #et-boc .et-l .bsa-profile-hero-row:not(:has(.bsa-profile-headshot)) > .et_pb_column:first-child {
	display: none;
}

.bsa-profile-headshot {
	display: block;
	width: 240px;
	max-width: 100%;
	height: auto;
	border-radius: var(--radius-none);
}

/* Name (Post Title module) */
body.et-db #et-boc .et-l .bsa-profile-hero h1:not(#bsa) {
	margin: 0;
	padding: 0;
	line-height: 1.19;                     /* 42/50 */
}

body.et-db #et-boc .et-l .bsa-profile-hero .et_pb_title_container:not(#bsa) {
	padding: 0;
}

/* Memorial wording: hidden unless the shortcode printed it. */
body.et-db #et-boc .et-l .bsa-hero-memorial:not(:has(.bsa-profile-memorial)) {
	display: none;
}

/* Anything the Text module leaves around the wrapper (an empty paragraph,
   a line break) would add space under the wording. */
.bsa-hero-memorial .et_pb_text_inner > :not(.bsa-profile-memorial) {
	display: none;
}

.bsa-profile-memorial {
	max-width: 68ch;
	font-family: var(--font-serif);
	font-style: italic;
	font-size: 1.1875rem;                  /* body-lg 19/30 */
	line-height: 1.58;
	color: var(--ink-muted);
}

.bsa-profile-memorial p:not(#bsa) {
	margin: 0;
	padding: 0 0 0.5em;
}

.bsa-profile-memorial p:last-child:not(#bsa) {
	padding-bottom: 0;
}

/* Art media: small label, then outlined chips, in one wrapping row. */
.bsa-hero-media .et_pb_code_inner {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: var(--space-2);
}

body.et-db #et-boc .et-l .bsa-hero-media h2 {
	margin: 0 var(--space-1) 0 0;
	font-family: var(--font-sans);
	font-size: 0.9375rem;                  /* small 15/22 */
	line-height: 1.47;
	font-weight: 400;
	color: var(--ink-muted);
}

.bsa-hero-media .bsa-profile-media:not(#bsa) {
	display: flex;
	flex-wrap: wrap;
	gap: var(--space-2);
	margin: 0;
	padding: 0;
	list-style: none;
}

.bsa-hero-media .bsa-profile-media li:not(#bsa) {
	margin: 0;
	padding: 0;
}

body .bsa-hero-media .bsa-profile-media a:not(#bsa) {
	display: inline-flex;
	align-items: center;
	min-height: 32px;
	padding: 0 var(--space-3);
	border: 1px solid var(--border-strong);
	border-radius: var(--radius-sm);
	background: var(--surface);
	font-size: 0.9375rem;
	line-height: 1.2;
	font-weight: 600;
	color: var(--ink);
	text-decoration: none;
}

body .bsa-hero-media .bsa-profile-media a:not(#bsa):hover {
	border-color: var(--Blue);
	color: var(--Blue);
	text-decoration: underline;
	text-underline-offset: 0.15em;
}

/* Contact (labelled buttons) and social (square icon buttons), one row.
   Same look as the secondary button in buttons.css. */
body.et-db #et-boc .et-l .bsa-hero-links:not(#bsa) {
	margin-top: var(--space-1);            /* a little extra above the buttons */
}

.bsa-hero-links .et_pb_code_inner {
	display: flex;
	flex-wrap: wrap;
	gap: var(--space-3);
}

.bsa-hero-links :is(.bsa-profile-contact, .bsa-profile-social):not(#bsa) {
	display: flex;
	flex-wrap: wrap;
	gap: var(--space-3);
	margin: 0;
	padding: 0;
	list-style: none;
}

.bsa-hero-links :is(.bsa-profile-contact, .bsa-profile-social) li:not(#bsa) {
	margin: 0;
	padding: 0;
}

body .bsa-hero-links :is(.bsa-profile-contact, .bsa-profile-social) a:not(#bsa) {
	box-sizing: border-box;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: var(--space-2);
	min-height: 40px;
	padding: var(--space-2) var(--space-4);
	border: 2px solid var(--Blue);
	border-radius: var(--radius-sm);
	background: var(--surface);
	color: var(--Blue);
	font-family: var(--font-sans);
	font-size: 0.9375rem;                  /* 15px, like the chips */
	line-height: 20px;
	font-weight: 600;
	letter-spacing: 0.02em;
	text-decoration: none;
	transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

body .bsa-hero-links :is(.bsa-profile-contact, .bsa-profile-social) a:not(#bsa):hover {
	background: var(--blue-50);
	border-color: var(--blue-700);
	color: var(--blue-700);
}

/* Social: icon only, a 40px square. */
body .bsa-hero-links .bsa-profile-social a:not(#bsa) {
	width: 40px;
	padding: 0;
}

.bsa-hero-links :is(.bsa-profile-contact, .bsa-profile-social) svg {
	flex: none;
	width: 18px;
	height: 18px;
}

/* A phone number too old to link (not 10 digits): icon and text, no box. */
.bsa-hero-links .bsa-contact-phone:not(:has(a)):not(#bsa) {
	display: inline-flex;
	align-items: center;
	gap: var(--space-2);
	min-height: 40px;
	color: var(--ink-muted);
}


/* --------------------------------------------------------------------------
   4. Work: Portfolio (gallery) and Videos
   -------------------------------------------------------------------------- */

/* No gallery (a tier without one, or none uploaded): the module goes,
   static note and all. */
body.et-db #et-boc .et-l .bsa-portfolio:not(:has(.bsa-gallery)) {
	display: none;
}

/* Space between the gallery and the videos, when there are both. */
body.et-db #et-boc .et-l .bsa-portfolio:has(.bsa-gallery) + .et_pb_module:not(#bsa) {
	margin-top: var(--space-16);
}

body.et-db #et-boc .et-l .bsa-profile-work h2 {
	margin: 0 0 var(--space-8);
}

/* Signature accent over "Portfolio" only: one per section. */
body.et-db #et-boc .et-l .bsa-portfolio h2::before {
	content: "";
	display: block;
	width: 48px;
	height: 6px;
	margin-bottom: var(--space-4);
	background: var(--Green);
}

/* Plugin CSS lays the gallery out; this sets its spacing and beats
   Divi's bullets. Never set display on .bsa-gallery or its items. */
.bsa-portfolio .bsa-gallery:not(#bsa) {
	--bsa-gallery-gap: var(--space-4);     /* 16 between works */
	--bsa-gallery-row: 180px;              /* target row height: about 4 to 5 works a row at 1280px */
	row-gap: var(--space-6);               /* 24 between rows, captions included */
	margin: 0;
	padding: 0;
	list-style: none;
}

.bsa-portfolio .bsa-gallery-item:not(#bsa) {
	margin: 0;
	padding: 0;
}

.bsa-portfolio .bsa-gallery-item a {
	cursor: zoom-in;
}

.bsa-portfolio .bsa-gallery-item img {
	border-radius: var(--radius-none);
}

.bsa-portfolio .bsa-gallery-item figcaption {
	margin-top: var(--space-2);
	font-size: 0.875rem;                   /* caption 14/20 */
	line-height: 1.43;
	font-style: italic;
	color: var(--ink-muted);
}

.bsa-gallery-note:not(#bsa) {
	margin: var(--space-8) 0 0;
	padding: 0;
	font-size: 0.875rem;
	line-height: 1.43;
	color: var(--ink-muted);
}

.bsa-profile-work .bsa-videos {
	--bsa-videos-columns: 3;
	--bsa-videos-gap: var(--space-4);
}


/* --------------------------------------------------------------------------
   5. About (7 of 12 columns) | Education, Awards, Publications (4 of 12)
   Row 1 is the two columns; row 2 is the edit link.
   -------------------------------------------------------------------------- */

body.et-db #et-boc .et-l .bsa-profile-about .et_pb_row:first-child:not(#bsa) {
	display: grid;
	grid-template-columns: repeat(12, minmax(0, 1fr));
	column-gap: var(--space-6);
}

body.et-db #et-boc .et-l .bsa-profile-about .et_pb_row:first-child::after {
	content: none;
}

body.et-db #et-boc .et-l .bsa-profile-about .et_pb_row:first-child > .et_pb_column:not(#bsa) {
	float: none;
	width: auto;
	margin: 0;
}

body.et-db #et-boc .et-l .bsa-profile-about .et_pb_row:first-child > .et_pb_column:first-child:not(#bsa) {
	grid-column: 1 / span 7;
}

body.et-db #et-boc .et-l .bsa-profile-about .et_pb_row:first-child > .et_pb_column:last-child:not(#bsa) {
	grid-column: 9 / span 4;
	display: flex;
	flex-direction: column;
	gap: var(--space-8);
	padding-top: 30px;                     /* lines the first rule up with the heading, as in the mockup */
}

/* "About {name}": the first module in the left column. */
body.et-db #et-boc .et-l .bsa-profile-about .et_pb_column:first-child > .et_pb_module:first-child h2 {
	margin: 0 0 var(--space-6);
}

body.et-db #et-boc .et-l .bsa-profile-about .et_pb_column:first-child > .et_pb_module:first-child h2::before {
	content: "";
	display: block;
	width: 48px;
	height: 6px;
	margin-bottom: 20px;
	background: var(--Orange);
}

/* Education, Awards, Publications */
.bsa-profile-about .bsa-profile-section {
	padding-top: 20px;
	border-top: 1px solid var(--border);
	font-size: 0.9375rem;                  /* 15/24 */
	line-height: 1.6;
}

/* .bsa-profile-section is also the profile EDITOR's section class
   ([bsa_profile_editor], whose sections sit directly in its form). The
   rules below are for the public profile's text sections only, so they
   skip sections inside the editor's form (profile-editor.css). */
body.et-db #et-boc .et-l :not(.bsa-profile-editor-form) > .bsa-profile-section h3 {
	margin: 0 0 var(--space-2);
	font-family: var(--font-sans);         /* the h4 style: Figtree 600, 20/28 */
	font-size: 1.25rem;
	line-height: 1.4;
	font-weight: 600;
}

:not(.bsa-profile-editor-form) > .bsa-profile-section :is(p, li):not(#bsa) {
	font-size: inherit;
	line-height: inherit;
}

:not(.bsa-profile-editor-form) > .bsa-profile-section p:not(#bsa) {
	margin: 0;
	padding: 0 0 0.75em;
}

:not(.bsa-profile-editor-form) > .bsa-profile-section :is(ul, ol):not(#bsa) {
	margin: 0 0 0.75em;
	padding: 0 0 0 1.25em;
}

:not(.bsa-profile-editor-form) > .bsa-profile-section > :last-child:not(#bsa) {
	margin-bottom: 0;
	padding-bottom: 0;
}

/* Links a member wrote: underlined, since they sit in running text. */
body :not(.bsa-profile-editor-form) > .bsa-profile-section a:not(#bsa) {
	text-decoration: underline;
	text-decoration-thickness: 1px;
	text-underline-offset: 0.15em;
}

/* Edit link: small and quiet, under a hairline. */
.bsa-profile-edit-link:not(#bsa) {
	margin: var(--space-12) 0 0;
	padding: var(--space-6) 0 0;
	border-top: 1px solid var(--border);
	font-size: 0.9375rem;
	line-height: 1.47;
	color: var(--ink-muted);
}

body .bsa-profile-edit-link a:not(#bsa) {
	text-decoration: underline;
	text-decoration-thickness: 1px;
	text-underline-offset: 0.15em;
}


/* --------------------------------------------------------------------------
   6. Explore more
   -------------------------------------------------------------------------- */

/* Nobody else in the tier group: no heading printed, so no band at all. */
body.et-db #et-boc .et-l .bsa-profile-explore:not(:has(.bsa-explore-heading)) {
	display: none;
}

.bsa-explore-heading {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-end;
	justify-content: space-between;
	gap: var(--space-4) var(--space-8);
	margin-bottom: var(--space-8);
}

body.et-db #et-boc .et-l .bsa-explore-heading h2 {
	margin: 0;
}

body.et-db #et-boc .et-l .bsa-explore-heading h2::before {
	content: "";
	display: block;
	width: 48px;
	height: 6px;
	margin-bottom: var(--space-4);
	background: var(--Green);
}

.bsa-explore-heading p:not(#bsa) {
	margin: 0;
	padding: 0;
	font-size: 1rem;
	line-height: 1.5;
	font-weight: 600;
}


/* --------------------------------------------------------------------------
   7. Notices: the draft notice, and the staff "Sample" note
   -------------------------------------------------------------------------- */

.bsa-profile-notice {
	margin: 0 0 var(--space-6);
	padding: var(--space-4) var(--space-6);
	border-radius: var(--radius-md);
	background: var(--blue-50);
	color: var(--ink);
}

.bsa-profile-notice :is(p, ul):not(#bsa) {
	margin: 0;
	padding: 0 0 0.5em;
}

.bsa-profile-notice ul:not(#bsa) {
	padding-left: 1.25em;
}

.bsa-profile-notice > :last-child:not(#bsa) {
	padding-bottom: 0;
}

body .bsa-profile-notice a:not(#bsa) {
	font-weight: 600;
	text-decoration: underline;
	text-decoration-thickness: 1px;
	text-underline-offset: 0.15em;
}

/* Only staff see this, off a profile (Theme Builder, test pages). */
.bsa-directory-sample:not(#bsa) {
	margin: 0 0 var(--space-2);
	padding: 0;
	font-size: 0.875rem;
	line-height: 1.43;
	font-style: italic;
	color: var(--orange-700);
}


/* --------------------------------------------------------------------------
   8. Lightbox (the gallery's dialog; docs/shortcodes.md 8.16)
   The plugin's CSS lays it out: Previous | picture | Next. Never set
   display on its buttons or caption: the script hides them with the
   hidden attribute (a gallery of one, an untitled work).
   -------------------------------------------------------------------------- */

.bsa-lightbox {
	padding: var(--space-6);
	font-family: var(--font-sans);
}

.bsa-lightbox[open]::backdrop {
	background: rgba(29, 32, 51, 0.97);    /* --ink */
}

/* Close, Previous, Next: outline buttons, light on dark. */
.bsa-lightbox :is(.bsa-lightbox-close, .bsa-lightbox-prev, .bsa-lightbox-next) {
	box-sizing: border-box;
	min-height: 44px;
	margin: 0;
	padding: var(--space-2) var(--space-4);
	border: 2px solid rgba(255, 255, 255, 0.6);
	border-radius: var(--radius-sm);
	background: transparent;
	color: #fff;
	font-family: var(--font-sans);
	font-size: 0.9375rem;
	line-height: 20px;
	font-weight: 600;
	letter-spacing: 0.02em;
	cursor: pointer;
	transition: background-color 0.15s ease, border-color 0.15s ease;
}

.bsa-lightbox :is(.bsa-lightbox-close, .bsa-lightbox-prev, .bsa-lightbox-next):hover {
	border-color: #fff;
	background: rgba(255, 255, 255, 0.12);
}

/* The Blue ring doesn't show on the dark backdrop: white instead. */
.bsa-lightbox :is(.bsa-lightbox-close, .bsa-lightbox-prev, .bsa-lightbox-next):focus-visible {
	outline: 3px solid #fff;
	outline-offset: 2px;
}

/* Picture and caption sit together in the middle of the screen; Close
   stays in the top corner, out of the way. */
.bsa-lightbox[open]:not(#bsa) {
	justify-content: center;
}

.bsa-lightbox-bar:not(#bsa) {
	position: absolute;
	top: var(--space-6);
	right: var(--space-6);
	z-index: 1;
	margin: 0;
}

.bsa-lightbox-stage:not(#bsa) {
	flex: 0 1 auto;
}

/* Room above for Close and below for the caption, so neither can
   overlap the tallest picture. */
.bsa-lightbox-image:not(#bsa) {
	max-height: calc(100vh - 11rem);
	max-height: calc(100dvh - 11rem);
}

.bsa-lightbox-image {
	border-radius: var(--radius-none);
}

.bsa-lightbox-caption {
	max-width: 68ch;
	font-size: 0.9375rem;
	line-height: 1.47;
	font-style: italic;
	color: rgba(255, 255, 255, 0.85);
}


/* --------------------------------------------------------------------------
   9. Tablet (980px and narrower)
   -------------------------------------------------------------------------- */

@media (max-width: 980px) {

	body.et-db #et-boc .et-l .bsa-profile-hero-row:not(#bsa) {
		grid-template-columns: 180px minmax(0, 1fr);
		column-gap: var(--space-8);
	}

	.bsa-profile-headshot {
		width: 180px;
	}

	.bsa-profile-work .bsa-videos {
		--bsa-videos-columns: 2;
	}

	body.et-db #et-boc .et-l .bsa-profile-work.et_pb_section:not(#bsa) {
		padding-top: var(--space-12);
	}

	body.et-db #et-boc .et-l .bsa-profile-about.et_pb_section:not(#bsa),
	body.et-db #et-boc .et-l .bsa-profile-explore.et_pb_section:not(#bsa) {
		padding: var(--space-12) 0 var(--space-16);
	}

	/* About and the side sections stack. */
	body.et-db #et-boc .et-l .bsa-profile-about .et_pb_row:first-child > .et_pb_column:first-child:not(#bsa),
	body.et-db #et-boc .et-l .bsa-profile-about .et_pb_row:first-child > .et_pb_column:last-child:not(#bsa) {
		grid-column: 1 / -1;
	}

	body.et-db #et-boc .et-l .bsa-profile-about .et_pb_row:first-child > .et_pb_column:last-child:not(#bsa) {
		padding-top: var(--space-12);
	}
}


/* --------------------------------------------------------------------------
   10. Phone (767px and narrower)
   -------------------------------------------------------------------------- */

@media (max-width: 767px) {

	body.et-db #et-boc .et-l .bsa-profile-hero.et_pb_section:not(#bsa) {
		padding: var(--space-8) 0;
	}

	/* Headshot above the text. */
	body.et-db #et-boc .et-l .bsa-profile-hero-row:not(#bsa) {
		grid-template-columns: minmax(0, 1fr);
		row-gap: var(--space-6);
	}

	.bsa-profile-headshot {
		width: 160px;
	}

	/* Short rows, so two or three works share a line. At a taller target
	   most works sit alone and stretch to the full width. */
	.bsa-portfolio .bsa-gallery:not(#bsa) {
		--bsa-gallery-gap: var(--space-2);
		--bsa-gallery-row: 120px;
		row-gap: var(--space-4);
	}

	/* Narrower contact buttons, so more fit on a line. */
	body .bsa-hero-links .bsa-profile-contact a:not(#bsa) {
		padding-left: var(--space-3);
		padding-right: var(--space-3);
	}

	/* Lightbox: Previous and Next move under the picture, so a narrow
	   screen gives the artwork the full width. */
	.bsa-lightbox:not(#bsa) {
		padding: var(--space-4);
	}

	.bsa-lightbox-bar:not(#bsa) {
		top: var(--space-4);
		right: var(--space-4);
	}

	.bsa-lightbox-stage:not(#bsa) {
		grid-template-columns: auto minmax(0, 1fr) auto;
		grid-template-rows: minmax(0, 1fr) auto;
		row-gap: var(--space-4);
	}

	.bsa-lightbox-image:not(#bsa) {
		grid-column: 1 / -1;
		grid-row: 1;
		max-height: calc(100vh - 15rem);
		max-height: calc(100dvh - 15rem);
	}

	.bsa-lightbox-prev:not(#bsa) {
		grid-column: 1;
		grid-row: 2;
	}

	.bsa-lightbox-next:not(#bsa) {
		grid-column: 3;
		grid-row: 2;
	}
}
