/*
 * AEE Portal styles.
 * Values come from the live site: navy #1c3f94 (JOIN AEE button, headings), title band
 * #dce3ec, dropdowns white with a 10px radius and a soft shadow, Nunito Sans throughout.
 * Everything is scoped to .aee-portal, .aee-account, or the account slot so it can't
 * leak into other parts of the site.
 */

:root {
	--aee-portal-navy: #1c3f94;
	--aee-portal-navy-dark: #152f70;
	--aee-portal-band: #dce3ec;
	--aee-portal-band-soft: #eef2f7;
	--aee-portal-border: #dce3ec;
	--aee-portal-text: #222;
	--aee-portal-muted: #6b7380;
	--aee-portal-radius: 10px;
	--aee-portal-shadow: 0 0 5px rgba(0, 0, 0, 0.1);
	--aee-portal-focus: 0 0 0 3px rgba(28, 63, 148, 0.35);
}

/*
 * Altai form text renders too small with the theme's root font size. On any page with an
 * Altai form, set the root to 16px. This replaces the Customizer > Additional CSS line
 * used on staging, so live needs no Customizer change.
 */
html:has(#altai-ebusiness) {
	font-size: 16px !important;
}

/* -------------------------------------------------------------------------
 * Banner (inside the standard header's title band)
 * ----------------------------------------------------------------------- */

.aee-portal__breadcrumb ol {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	margin: 0 0 12px;
	padding: 0;
	list-style: none;
	color: var(--aee-portal-navy);
	font-size: 14px;
	font-weight: 600;
	line-height: 1.4;
}

.aee-portal__breadcrumb li {
	margin: 0;
}

.aee-portal__breadcrumb li + li::before {
	content: "/";
	margin-right: 6px;
	opacity: 0.6;
}

.aee-portal__breadcrumb a {
	color: inherit;
	text-decoration: none;
}

.aee-portal__breadcrumb a:hover,
.aee-portal__breadcrumb a:focus-visible {
	text-decoration: underline;
}

/* Altai sign-in pages: the header band carries the title, so hide the theme's page title. */
.aee-ebusiness-page .fl-post-header {
	display: none;
}

/* Fallback banner, only when the Themer header isn't available. */
.aee-portal__hero {
	padding: 48px 0 40px;
	background: var(--aee-portal-band);
}

.aee-portal__hero .aee-portal__title {
	margin: 0;
	color: var(--aee-portal-navy);
	font-size: clamp(36px, 5vw, 60px);
	font-weight: 300;
	line-height: 1.1;
}

/* -------------------------------------------------------------------------
 * Layout
 * ----------------------------------------------------------------------- */

.aee-portal__container {
	box-sizing: border-box;
	max-width: 1200px;
	margin: 0 auto;
	padding: 0 20px;
}

.aee-portal__body {
	/*
	 * Positioned without a z-index: it then paints after (above) the title band's decorative
	 * bottom shape, which is lowered to z-index 0 on portal pages (inline style in
	 * AEE_Portal::enqueue_assets). A z-index here would also lift it over the header menus.
	 */
	position: relative;
	display: grid;
	grid-template-columns: 280px minmax(0, 1fr);
	gap: 32px;
	align-items: start;
	padding-top: 24px;
	padding-bottom: 64px;
}

.aee-portal--signed-out .aee-portal__body {
	grid-template-columns: minmax(0, 1fr);
}

.aee-portal__sidebar {
	position: sticky;
	top: 24px;
}

/* Wide Altai tables already scroll inside their cards; this keeps anything else from widening the page. */
.aee-portal__content {
	min-width: 0;
}

@media (max-width: 900px) {
	.aee-portal__body {
		grid-template-columns: minmax(0, 1fr);
		gap: 20px;
	}

	.aee-portal__sidebar {
		position: static;
	}
}

/* -------------------------------------------------------------------------
 * Notices (signing in, no access)
 * ----------------------------------------------------------------------- */

.aee-portal__notice {
	padding: 24px 28px;
	border-radius: var(--aee-portal-radius);
	background: #fff;
	box-shadow: var(--aee-portal-shadow);
	color: var(--aee-portal-text);
}

/* Pixel sizes: Altai's stylesheet sets html { font-size: 10px }, which would shrink rem/em text on its pages. */
.aee-portal__notice p {
	margin: 0 0 8px;
	font-size: 16px;
	line-height: 1.5;
}

.aee-portal__notice p:last-child {
	margin-bottom: 0;
}

.aee-portal__notice .aee-portal__notice-title {
	color: var(--aee-portal-navy);
	font-size: 20px;
	font-weight: 700;
}

.aee-portal__notice .aee-portal__notice-small {
	color: var(--aee-portal-muted);
	font-size: 14px;
}

.aee-portal__notice a {
	color: var(--aee-portal-navy);
	text-decoration: underline;
}

.aee-portal__button,
.aee-portal__notice a.aee-portal__button {
	display: inline-block;
	margin-top: 8px;
	padding: 10px 16px;
	border-radius: 8px;
	background: var(--aee-portal-navy);
	color: #fff;
	font-size: 14px;
	font-weight: 700;
	text-decoration: none;
	text-transform: uppercase;
}

.aee-portal__button:hover,
.aee-portal__button:focus-visible {
	background: var(--aee-portal-navy-dark);
	color: #fff;
}

/* Shown on Altai's sign-in pages if the return to the saved page times out. */
.aee-portal-return-notice {
	margin: 0 0 16px;
	font-size: 15px;
	font-weight: 700;
}

.aee-portal-return-notice a {
	color: var(--aee-portal-navy);
	text-decoration: underline;
}

/* While signed out, the Altai form only runs to start sign-in. Keep its loading shell out of view. */
.aee-portal--signed-out #altai-ebusiness {
	display: none;
}

/* -------------------------------------------------------------------------
 * Sidebar menu
 * ----------------------------------------------------------------------- */

.aee-portal-nav,
.aee-portal-nav .sub-menu {
	margin: 0;
	padding: 0;
	list-style: none;
}

.aee-portal-nav {
	overflow: hidden;
	border-radius: var(--aee-portal-radius);
	background: #fff;
	box-shadow: var(--aee-portal-shadow);
}

.aee-portal-nav li {
	margin: 0;
	border-top: 1px solid var(--aee-portal-border);
}

.aee-portal-nav > li:first-child {
	border-top: 0;
}

.aee-portal-nav a {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 13px 18px;
	color: var(--aee-portal-navy);
	font-size: 15px;
	font-weight: 600;
	line-height: 1.3;
	text-decoration: none;
}

.aee-portal-nav a:hover {
	background: var(--aee-portal-band-soft);
}

.aee-portal-nav a:focus-visible {
	outline: none;
	box-shadow: inset var(--aee-portal-focus);
}

/* Scoped to #aee-portal: the site's own link colours are more specific than a class selector. */
#aee-portal .aee-portal-nav .aee-menu-highlight > a {
	background: var(--aee-portal-band);
	font-weight: 700;
}

#aee-portal .aee-portal-nav .current-menu-item > a,
#aee-portal .aee-portal-nav .current-menu-item > a:hover,
#aee-portal .aee-portal-nav .current-menu-item > a:focus {
	background: var(--aee-portal-navy);
	color: #fff;
	font-weight: 700;
}

/* The site sets .page .current-menu-item a { border-bottom: 3px solid; color: navy !important }. */
#aee-portal .aee-portal-nav .current-menu-item > a {
	border-bottom: 0;
}

#aee-portal .aee-portal-nav .current-menu-item > a .aee-menu-icon,
#aee-portal .aee-portal-nav .current-menu-item > a .aee-menu-label {
	color: #fff;
}

.aee-portal-nav .aee-menu-heading {
	background: var(--aee-portal-band-soft);
}

.aee-portal-nav .aee-menu-heading > .sub-menu {
	background: #fff;
}

.aee-menu-heading__label {
	display: block;
	padding: 12px 18px 10px;
	color: var(--aee-portal-muted);
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
}

.aee-menu-icon {
	flex: 0 0 20px;
	width: 20px;
	font-size: 16px;
	text-align: center;
}

/* -------------------------------------------------------------------------
 * Header account menu (Top Bar)
 * ----------------------------------------------------------------------- */

.aee-account {
	position: relative;
	display: inline-block;
}

/* Signed out, the link sits directly in the menu item and keeps the Top Bar link styles. */
/*
 * The Top Bar menu column is a fixed 240px in the header layouts. Keep the toggle about as
 * wide as the old "Log In" link so Contact, the account toggle, and search stay on one line.
 */
.aee-account__toggle {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	margin: 0;
	padding: 4px 6px 4px 8px;
	border: 0;
	border-radius: 0;
	background: none;
	box-shadow: none;
	color: var(--aee-portal-navy);
	font-family: inherit;
	font-size: 14px;
	font-weight: 600;
	line-height: 20px;
	text-transform: none;
	cursor: pointer;
}

.aee-account__toggle:hover,
.aee-account__toggle:focus {
	background: none;
	color: var(--aee-portal-navy);
}

/* No focus ring after a mouse click; keyboard focus still gets one below. */
.aee-account__toggle:focus:not(:focus-visible) {
	outline: none;
	box-shadow: none;
}

.aee-account__toggle:focus-visible {
	outline: none;
	border-radius: 6px;
	box-shadow: var(--aee-portal-focus);
}

.aee-account__icon {
	font-size: 16px;
}

.aee-account__name {
	overflow: hidden;
	max-width: 8.5ch;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.aee-account__caret {
	width: 6px;
	height: 6px;
	margin-left: 2px;
	border-right: 2px solid currentColor;
	border-bottom: 2px solid currentColor;
	transform: translateY(-2px) rotate(45deg);
	transition: transform 0.15s ease;
}

.aee-account__toggle[aria-expanded="true"] .aee-account__caret {
	transform: translateY(1px) rotate(-135deg);
}

.aee-account__panel {
	position: absolute;
	top: calc(100% + 8px);
	right: 0;
	z-index: 10000;
	box-sizing: border-box;
	width: 280px;
	max-width: calc(100vw - 32px);
	padding: 8px 0;
	border-radius: var(--aee-portal-radius);
	background: #fff;
	box-shadow: 0 6px 24px rgba(0, 0, 0, 0.12);
	line-height: 1.4; /* The Top Bar sets #menu-top-bar li { line-height: 0 }, which the panel would inherit. */
	text-align: left;
	white-space: normal;
}

.aee-account__panel[hidden] {
	display: none;
}

.aee-account__identity {
	display: flex;
	flex-direction: column;
	gap: 2px;
	padding: 8px 18px 12px;
	border-bottom: 1px solid var(--aee-portal-border);
	overflow-wrap: anywhere;
}

.aee-account__identity strong {
	color: var(--aee-portal-navy);
	font-size: 15px;
	font-weight: 700;
}

.aee-account__identity span {
	color: var(--aee-portal-muted);
	font-size: 13px;
}

/* Reset the Top Bar menu styles that would otherwise reach into the panel. */
.aee-account .aee-account__menu,
.aee-account .aee-account__menu .sub-menu {
	position: static;
	display: block;
	float: none;
	width: auto;
	margin: 0;
	padding: 0;
	border: 0;
	background: none;
	box-shadow: none;
	list-style: none;
	visibility: visible;
	opacity: 1;
}

/*
 * The BB Menu module styles nested items with node-specific selectors such as
 * .fl-node-615618996c717 .menu.fl-menu-horizontal li li, and the node differs in each of the
 * eight header layouts, so the border and line-height resets need !important here.
 */
.aee-account .aee-account__menu li {
	display: block;
	float: none;
	margin: 0;
	padding: 0;
	border: 0 !important;
	line-height: 1.4 !important;
}

.aee-account .aee-account__menu a,
.aee-account .aee-account__logout {
	display: block;
	padding: 9px 18px;
	color: var(--aee-portal-navy);
	font-size: 14px;
	font-weight: 700;
	line-height: 1.4;
	text-decoration: none;
	text-transform: none;
}

.aee-account .aee-account__menu a:hover,
.aee-account .aee-account__logout:hover {
	background: var(--aee-portal-band-soft);
}

.aee-account .aee-account__menu a:focus-visible,
.aee-account .aee-account__logout:focus-visible {
	outline: none;
	box-shadow: inset var(--aee-portal-focus);
}

.aee-account .aee-account__menu .aee-menu-highlight > a {
	margin: 8px 12px;
	border-radius: 8px;
	background: var(--aee-portal-band);
	text-align: center;
}

.aee-account .aee-account__menu .current-menu-item > a {
	border-bottom: 0;
	background: var(--aee-portal-band-soft);
}

/* The BB Menu module gives nested lists a dropdown background and shadow. */
.aee-account .aee-account__menu .sub-menu {
	background: none !important;
	box-shadow: none !important;
}

/* The Top Bar row has z-index: 1, which would put the open panel under the main navigation. */
.fl-row.aee-account-open {
	z-index: 1000 !important;
}

.aee-account .aee-account__menu .aee-menu-heading {
	margin-top: 4px;
	border-top: 1px solid var(--aee-portal-border) !important;
}

.aee-account .aee-account__menu .aee-menu-heading__label {
	padding: 12px 18px 4px;
}

.aee-account .aee-account__logout {
	margin-top: 4px;
	border-top: 1px solid var(--aee-portal-border);
}

/* The panel stays text only, like the site's dropdowns. */
.aee-account .aee-menu-icon {
	display: none;
}

/* -------------------------------------------------------------------------
 * Mobile menu (Max Mega Menu)
 * The site hides the mobile Login item from 601px up, but the Top Bar only appears
 * above 768px, so there was no sign-in link between 601 and 768px. Show the account
 * item up to the Mega Menu breakpoint. Only applies once the item has the slot class.
 * ----------------------------------------------------------------------- */

@media (min-width: 601px) and (max-width: 768px) {
	#mega-menu-wrap-header #mega-menu-header > li.aee-account-slot {
		display: list-item !important; /* Overrides the site's .mobile-login { display: none !important } */

		/* Same look the site gives .mobile-login at 600px and below. */
		border-radius: 10px !important;
		background: #fff !important;
	}

	#mega-menu-wrap-header #mega-menu-header > li.aee-account-slot > a {
		margin: 10px !important;
		color: var(--aee-portal-navy) !important;
		text-align: center !important;
	}
}

/*
 * Signed in on phones, the account item holds the same toggle and panel as desktop. The
 * panel opens in place (not as a floating dropdown), so it pushes the menu content down.
 */
#mega-menu-wrap-header #mega-menu-header > li.aee-account-slot > a.mega-menu-link,
#mega-menu-wrap-header #mega-menu-header > li.aee-account-slot > a.mega-menu-link:hover,
#mega-menu-wrap-header #mega-menu-header > li.aee-account-slot > a.mega-menu-link:focus {
	background: transparent !important;
	color: var(--aee-portal-navy) !important;
}

#mega-menu-wrap-header .aee-account--mobile {
	display: block;
	width: 100%;
	text-align: left;
}

#mega-menu-wrap-header .aee-account--mobile .aee-account__toggle {
	justify-content: center;
	width: 100%;
	min-height: 44px;
	padding: 10px 12px;
	font-size: 14px;
	font-weight: 700;
	text-transform: uppercase;
}

#mega-menu-wrap-header .aee-account--mobile .aee-account__name {
	max-width: none;
}

#mega-menu-wrap-header .aee-account--mobile .aee-account__panel {
	position: static;
	width: auto;
	max-width: none;
	margin: 0 10px 12px;
	border: 1px solid var(--aee-portal-border);
	box-shadow: none;
}

/* The site styles everything inside the old mobile Login item (.mobile-login a) up to 600px: centred, 10px margins, !important. Undo that inside the panel so it matches desktop. */
#mega-menu-wrap-header .aee-account--mobile .aee-account__panel a {
	margin: 0 !important;
	text-align: left !important;
}

#mega-menu-wrap-header .aee-account--mobile .aee-account__menu .aee-menu-highlight > a {
	margin: 8px 12px !important;
	text-align: center !important;
}

/* Room at the bottom of the open phone menu, so the last items can scroll clear of the fixed Ask Lu button and language switcher. */
@media (max-width: 768px) {
	#mega-menu-wrap-header #mega-menu-header.mega-menu-open,
	#mega-menu-wrap-header .mega-menu-toggle.mega-menu-open + #mega-menu-header {
		padding-bottom: 96px !important;
	}
}

/* Standalone pages with an Altai form (for example /corporate-join/): the Themer header band
   already shows the page title, so hide the theme's second title above the form. */
.aee-altai-page .fl-post-header {
	display: none;
}

/* -------------------------------------------------------------------------
 * Member Benefits page (/my-aee/member-benefits/)
 * Built from core blocks in the page editor; these classes go on the blocks
 * (Advanced > Additional CSS class). Grids use auto-fit, so they need no breakpoints:
 * the content column is narrow beside the sidebar and full width under 900px.
 * ----------------------------------------------------------------------- */

/* The theme wraps each Group block's content in .wp-block-group__inner-container. Let the
   blocks inside act as direct children of the group, so the grids and flex cards work. */
.aee-benefits .wp-block-group__inner-container {
	display: contents;
}

.aee-benefits {
	color: var(--aee-portal-text);
	font-size: 16px;
	line-height: 1.6;
}

.aee-benefits .aee-benefits__title {
	margin: 0 0 8px;
	color: var(--aee-portal-navy);
	font-size: clamp(26px, 3vw, 32px);
	line-height: 1.2;
}

.aee-benefits .aee-benefits__intro {
	margin: 0 0 28px;
	color: var(--aee-portal-muted);
	font-size: 17px;
}

.aee-benefits p {
	margin: 0 0 12px;
}

.aee-benefits a:not(.wp-block-button__link) {
	color: var(--aee-portal-navy);
	text-decoration: underline;
}

/* One card per benefit */
.aee-benefit {
	margin: 0 0 24px;
	padding: 28px;
	border: 1px solid var(--aee-portal-border);
	border-radius: var(--aee-portal-radius);
	background: #fff;
}

.aee-benefits .aee-benefit h3 {
	display: flex;
	align-items: center;
	gap: 14px;
	margin: 0 0 14px;
	color: var(--aee-portal-navy);
	font-size: 22px;
	line-height: 1.25;
}

/* Font Awesome 6 (loaded site-wide) icon badge before each card heading. */
.aee-benefit h3::before {
	flex: 0 0 44px;
	width: 44px;
	height: 44px;
	border-radius: 50%;
	background: var(--aee-portal-band-soft);
	color: var(--aee-portal-navy);
	font-family: "Font Awesome 6 Free";
	font-size: 18px;
	font-weight: 900;
	line-height: 44px;
	text-align: center;
	content: "\f005";
}

.aee-benefit--current h3::before {
	content: "\f086"; /* comments */
}

.aee-benefit--journals h3::before {
	content: "\f518"; /* book-open */
}

.aee-benefit--proceedings h3::before {
	content: "\f56d"; /* file-arrow-down */
}

.aee-benefit--affinity h3::before {
	content: "\f02c"; /* tags */
}

.aee-benefit--career h3::before {
	content: "\f0b1"; /* briefcase */
}

/* Buttons: same look as the portal's other buttons. */
.aee-benefits .wp-block-buttons {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin: 18px 0 0;
}

.aee-benefits .wp-block-button {
	margin: 0;
}

.aee-benefits .wp-block-button__link {
	display: inline-block;
	padding: 10px 18px;
	border: 2px solid var(--aee-portal-navy);
	border-radius: 8px;
	background: var(--aee-portal-navy);
	color: #fff;
	font-size: 14px;
	font-weight: 700;
	line-height: 1.3;
	text-decoration: none;
	text-transform: uppercase;
}

.aee-benefits .wp-block-button__link:hover,
.aee-benefits .wp-block-button__link:focus-visible {
	border-color: var(--aee-portal-navy-dark);
	background: var(--aee-portal-navy-dark);
	color: #fff;
}

.aee-benefits .is-style-outline .wp-block-button__link {
	background: #fff;
	color: var(--aee-portal-navy);
}

.aee-benefits .is-style-outline .wp-block-button__link:hover,
.aee-benefits .is-style-outline .wp-block-button__link:focus-visible {
	border-color: var(--aee-portal-navy);
	background: var(--aee-portal-band-soft);
	color: var(--aee-portal-navy);
}

/* Text link with an arrow, for a lighter call to action above a card's content
   (the matching button sits at the bottom of the card). */
.aee-benefits .aee-benefit__cta {
	margin: 4px 0 0;
	font-size: 15px;
	font-weight: 700;
}

.aee-benefits .aee-benefit__cta a {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	color: var(--aee-portal-navy);
	text-decoration: none;
}

.aee-benefits .aee-benefit__cta a::after {
	font-family: "Font Awesome 6 Free";
	font-size: 13px;
	font-weight: 900;
	content: "\f061"; /* arrow-right */
	transition: transform 0.15s ease;
}

.aee-benefits .aee-benefit__cta a:hover,
.aee-benefits .aee-benefit__cta a:focus-visible {
	text-decoration: underline;
}

.aee-benefits .aee-benefit__cta a:hover::after,
.aee-benefits .aee-benefit__cta a:focus-visible::after {
	transform: translateX(3px);
}

/* Grids inside a card: journals (3 across) and conference proceedings (2 across). */
.aee-benefit__grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
	gap: 20px;
	margin: 22px 0 0;
}

.aee-benefit__grid--two {
	grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

/* Item card: a header panel (cover or logo), then the text. */
.aee-benefit__item {
	display: flex;
	flex-direction: column;
	min-width: 0;
	overflow: hidden;
	border: 1px solid var(--aee-portal-border);
	border-radius: var(--aee-portal-radius);
	background: #fff;
}

.aee-benefits .aee-benefit__item figure {
	display: flex;
	align-items: center;
	justify-content: center;
	margin: 0;
	border-bottom: 1px solid var(--aee-portal-border);
}

.aee-benefits .aee-benefit__item figure a {
	display: block;
}

.aee-benefits .aee-benefit__item img {
	display: block;
	height: auto;
}

/* Journals: centered cover on a tinted panel, title, button, guidelines link. */
.aee-benefit__item--journal {
	text-align: center;
}

.aee-benefits .aee-benefit__item--journal figure {
	padding: 24px 16px;
	background: var(--aee-portal-band-soft);
}

.aee-benefits .aee-benefit__cover img {
	width: 120px;
	max-width: 100%;
	aspect-ratio: 2 / 3;
	border-radius: 3px;
	box-shadow: 0 6px 16px rgba(14, 22, 62, 0.22);
	object-fit: cover;
	transition: transform 0.15s ease;
}

.aee-benefits .aee-benefit__cover a:hover img,
.aee-benefits .aee-benefit__cover a:focus-visible img {
	transform: translateY(-3px);
}

.aee-benefits .aee-benefit__item--journal h4 {
	margin: 18px 18px 0;
	color: var(--aee-portal-navy);
	font-size: 16px;
	font-weight: 700;
	line-height: 1.35;
}

.aee-benefits .aee-benefit__item--journal h4 a {
	color: inherit;
	text-decoration: none;
}

.aee-benefits .aee-benefit__item--journal h4 a:hover,
.aee-benefits .aee-benefit__item--journal h4 a:focus-visible {
	text-decoration: underline;
}

/* Button sits at the bottom so the three cards line up whatever the title length. */
.aee-benefits .aee-benefit__item--journal .wp-block-buttons {
	justify-content: center;
	margin: auto 18px 0;
	padding-top: 16px;
}

.aee-benefits .aee-benefit__item--journal .wp-block-button {
	width: 100%;
}

.aee-benefits .aee-benefit__item--journal .wp-block-button__link {
	display: block;
	width: 100%;
	box-sizing: border-box;
	padding: 8px 12px;
	background: #fff;
	color: var(--aee-portal-navy);
	font-size: 13px;
}

/* Secondary look, so "Browse all journals" stays the main button in this card. */
.aee-benefits .aee-benefit__item--journal .wp-block-button__link:hover,
.aee-benefits .aee-benefit__item--journal .wp-block-button__link:focus-visible {
	border-color: var(--aee-portal-navy);
	background: var(--aee-portal-navy);
	color: #fff;
}

.aee-benefits .aee-benefit__item--journal .aee-benefit__meta {
	margin: 10px 18px 18px;
	font-size: 13px;
}

.aee-benefits .aee-benefit__item--journal .aee-benefit__meta a {
	color: var(--aee-portal-muted);
	text-decoration: underline;
}

.aee-benefits .aee-benefit__item--journal .aee-benefit__meta a:hover,
.aee-benefits .aee-benefit__item--journal .aee-benefit__meta a:focus-visible {
	color: var(--aee-portal-navy);
}

/* Conferences: each card takes its accent from that conference's website (--aee-conf),
   as a top bar and a light tint behind the passwords. Logos sit on white at one size. */
.aee-benefit__item--conference {
	--aee-conf: var(--aee-portal-navy);
	border-top: 5px solid var(--aee-conf);
}

.aee-benefit__item--east {
	--aee-conf: #65d6f2; /* aeeeast.org */
}

.aee-benefit__item--west {
	--aee-conf: #f8a389; /* aeewest.org */
}

.aee-benefit__item--world {
	--aee-conf: #11e2ab; /* aeeworld.org */
}

.aee-benefit__item--europe {
	--aee-conf: #82a7ff; /* aeeeurope.org */
}

.aee-benefits .aee-benefit__item--conference figure {
	height: 88px;
	padding: 0 20px;
	background: #fff;
}

/* A conference without a logo in the media library shows its name instead. */
.aee-benefits .aee-benefit__logo--text h4 {
	margin: 0;
	color: var(--aee-portal-navy);
	font-size: 20px;
	font-weight: 800;
	text-align: center;
}

.aee-benefits .aee-benefit__logo img {
	width: 190px;
	max-width: 100%;
	max-height: 50px;
	object-fit: contain;
}

.aee-benefits .aee-benefit__passwords {
	margin: 0;
	padding: 6px 18px 12px;
	background: var(--aee-portal-band-soft);
	background: color-mix(in srgb, var(--aee-conf, #dce3ec) 12%, #fff);
	list-style: none;
	font-size: 14px;
	flex-grow: 1;
}

.aee-benefits .aee-benefit__passwords li {
	display: flex;
	align-items: center;
	gap: 10px;
	margin: 0;
	padding: 8px 0;
	border-top: 1px solid var(--aee-portal-border);
	border-top-color: color-mix(in srgb, var(--aee-conf, #dce3ec) 35%, #fff);
}

.aee-benefits .aee-benefit__passwords li:first-child {
	border-top: 0;
}

.aee-benefits .aee-benefit__passwords strong {
	flex: 0 0 64px;
	color: var(--aee-portal-navy);
	font-size: 13px;
	font-weight: 800;
	line-height: 1.25;
}

/* Set by assets/benefits.js: the password in a code box and a copy button. */
.aee-benefits .aee-benefit__pw {
	flex: 1 1 auto;
	min-width: 0;
	padding: 4px 8px;
	border: 1px solid var(--aee-portal-border);
	border-radius: 6px;
	background: #fff;
	color: var(--aee-portal-text);
	font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
	font-size: 13px;
	line-height: 1.4;
	overflow-wrap: anywhere;
	user-select: all;
}

.aee-benefits .aee-benefit__copy {
	display: inline-flex;
	flex: 0 0 auto;
	align-items: center;
	gap: 5px;
	margin: 0;
	padding: 5px 9px;
	border: 1px solid var(--aee-portal-navy);
	border-radius: 6px;
	background: #fff;
	color: var(--aee-portal-navy);
	font: inherit;
	font-size: 12px;
	font-weight: 700;
	line-height: 1.2;
	cursor: pointer;
}

.aee-benefits .aee-benefit__copy:hover {
	background: var(--aee-portal-navy);
	color: #fff;
}

.aee-benefits .aee-benefit__copy:focus-visible {
	outline: none;
	box-shadow: var(--aee-portal-focus);
}

.aee-benefits .aee-benefit__copy svg {
	width: 13px;
	height: 13px;
	fill: currentColor;
}

.aee-benefits .aee-benefit__copy.is-copied {
	border-color: #2e7d32;
	background: #2e7d32;
	color: #fff;
}

/* Two small cards side by side (Affinity Programs, Career Hub). */
.aee-benefits__pair {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
	gap: 24px;
	margin: 0 0 24px;
}

.aee-benefits__pair .aee-benefit {
	display: flex;
	flex-direction: column;
	margin: 0;
}

.aee-benefits__pair .aee-benefit .wp-block-buttons {
	margin-top: auto;
	padding-top: 6px;
}

/* Member Benefits on phones: tighter cards, journal cards side by side (cover, then text),
   and icon-only Copy buttons so each password stays on one line. */
@media (max-width: 600px) {
	.aee-benefit {
		padding: 20px 18px;
	}

	.aee-benefits .aee-benefit h3 {
		font-size: 20px;
	}

	.aee-benefit__item--journal {
		display: grid;
		grid-template-columns: 96px minmax(0, 1fr);
		grid-template-rows: auto auto 1fr;
		text-align: left;
	}

	.aee-benefits .aee-benefit__item--journal figure {
		grid-row: 1 / span 3;
		padding: 14px 12px;
		border-right: 1px solid var(--aee-portal-border);
		border-bottom: 0;
	}

	.aee-benefits .aee-benefit__cover img {
		width: 72px;
	}

	.aee-benefits .aee-benefit__item--journal h4 {
		margin: 14px 14px 0;
		font-size: 15px;
	}

	.aee-benefits .aee-benefit__item--journal .wp-block-buttons {
		justify-content: flex-start;
		margin: 10px 14px 0;
		padding-top: 0;
	}

	.aee-benefits .aee-benefit__item--journal .aee-benefit__meta {
		margin: 8px 14px 14px;
	}

	.aee-benefits .aee-benefit__passwords {
		padding: 4px 12px 8px;
	}

	.aee-benefits .aee-benefit__passwords li {
		gap: 8px;
	}

	.aee-benefits .aee-benefit__passwords strong {
		flex-basis: 44px;
		font-size: 12px;
	}

	.aee-benefits .aee-benefit__pw {
		padding: 4px 6px;
		overflow-wrap: normal;
		white-space: nowrap;
		overflow-x: auto;
	}

	/* The button keeps its "Copy password for …" label for screen readers. */
	.aee-benefits .aee-benefit__copy {
		padding: 7px 9px;
	}

	.aee-benefits .aee-benefit__copy span {
		position: absolute;
		width: 1px;
		height: 1px;
		overflow: hidden;
		clip: rect(0, 0, 0, 0);
		white-space: nowrap;
	}
}
