/**
 * Desktop header bar + sticky header + mega panel + dropdowns + mobile drawer.
 * KDL-token based. The mobile bar itself lives in style.css.
 */

/* ============================================================
 * Sticky header (desktop). The bar keeps a fixed height when it
 * condenses so the page below never shifts; only the logo scales.
 * ========================================================= */
@media screen and (min-width: 992px) {
	.has-sticky-nav #masthead {
		position: sticky;
		top: 0;
		z-index: 50;
		box-shadow: 0 1px 0 rgba(10, 13, 17, 0.08);
		transition: box-shadow 200ms ease;
	}

	.admin-bar.has-sticky-nav #masthead {
		top: 32px;
	}

	.has-sticky-nav.is-condensed #masthead {
		box-shadow: 0 6px 20px rgba(10, 13, 17, 0.08);
	}

	/* The thermocouple: once the header condenses, its bottom edge is a 3px
	 * heat bar that fills along the ramp as you read (scroll-driven where
	 * supported, otherwise simply full) and blooms white once when the
	 * footer arrives (chrome.js adds .is-footer-reached). */
	.has-sticky-nav #masthead::after {
		content: "";
		position: absolute;
		left: 0;
		right: 0;
		bottom: 0;
		height: 3px;
		background: var(--upton-heat-bar, #CE2029);
		opacity: 0;
		pointer-events: none;
		transform-origin: left center;
		transition: opacity 200ms ease;
	}

	.has-sticky-nav.is-condensed #masthead::after {
		opacity: 1;
	}
}

@keyframes upton-thermocouple {
	from { transform: scaleX(0); }
	to { transform: scaleX(1); }
}

@keyframes upton-thermocouple-bloom {
	0%, 100% { box-shadow: 0 0 0 transparent; filter: none; }
	30% { box-shadow: 0 0 14px 3px rgba(255, 217, 138, 0.85); filter: brightness(1.7) saturate(0.55); }
}

@supports (animation-timeline: scroll()) {
	@media screen and (min-width: 992px) and (prefers-reduced-motion: no-preference) {
		.has-sticky-nav #masthead::after {
			animation: upton-thermocouple linear both;
			animation-timeline: scroll(root);
		}

		.has-sticky-nav.is-footer-reached #masthead::after {
			animation: upton-thermocouple linear both, upton-thermocouple-bloom 1.4s ease-out 1;
			animation-timeline: scroll(root), auto;
		}
	}
}

/* ============================================================
 * Desktop header bar layout
 * ========================================================= */
#masthead .site-header-bar {
	position: relative;
	display: flex;
	align-items: center;
	gap: var(--kdl-space-5, 24px);
	justify-content: space-between;
	height: 120px;
	padding: 0 24px;
	max-width: 1320px;
	margin: 0 auto;
}

#masthead .site-header-bar .site-branding {
	flex: 0 0 auto;
}

#masthead .site-header-bar .custom-logo-link {
	display: block;
	width: auto;
	max-width: none;
	padding: 0;
}

#masthead .site-header-bar .custom-logo,
#masthead .site-header-bar .custom-logo-link img {
	height: 88px;
	max-height: 88px;
	width: auto;
	display: block;
	transform-origin: left center;
	transition: transform 200ms ease;
}

.has-sticky-nav.is-condensed #masthead .site-header-bar .custom-logo,
.has-sticky-nav.is-condensed #masthead .site-header-bar .custom-logo-link img {
	transform: scale(0.75);
}

/* Nav items fill the bar height so the pointer can move straight from a
 * top-level link into its panel or dropdown without leaving the item. */
#masthead .site-header-bar .main-navigation {
	flex: 1 1 auto;
	align-self: stretch;
	display: flex;
	justify-content: flex-end;
}

#masthead .site-header-bar .menu.primary-menu {
	display: flex;
	align-items: stretch;
	gap: var(--kdl-space-4, 16px);
	justify-content: flex-end;
	list-style: none;
	margin: 0;
	padding: 0;
}

#masthead .site-header-bar .menu.primary-menu > li {
	display: flex;
	align-items: center;
	position: relative;
}

/* The mega panel anchors to the header bar, not to its trigger. */
#masthead .site-header-bar .menu.primary-menu > li.mega-menu {
	position: static;
}

/* "You are here" is KDL's solid copper underline (3px); hover draws a
 * thinner copper bar out from the centre, so the two never look alike. The
 * text stays ink: red is for actions and the mark. (::after is the chevron,
 * so the bar is a background image.) */
#masthead .site-header-bar .menu.primary-menu > li > a {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	font-family: var(--kdl-font-sans, "IBM Plex Sans", system-ui, sans-serif);
	font-size: 15px;
	font-weight: 500;
	color: var(--kdl-gray-900, #0a0d11);
	padding: 10px 4px;
	text-decoration: none;
	white-space: nowrap;
	background: linear-gradient(var(--kdl-copper-500, #c2632a), var(--kdl-copper-500, #c2632a)) 50% 100% / 0% 2px no-repeat;
	transition: color 150ms ease, background-size 220ms var(--kdl-ease-emphasized, ease);
}

#masthead .site-header-bar .menu.primary-menu > li > a:hover,
#masthead .site-header-bar .menu.primary-menu > li.mega-open > a {
	background-size: 100% 2px;
}

#masthead .site-header-bar .menu.primary-menu > li:is(.current-menu-item, .current-menu-ancestor, .current-page-ancestor, .current-menu-parent) > a {
	color: var(--kdl-gray-900, #0a0d11);
	font-weight: 600;
	background-size: 100% 3px;
}

@media (forced-colors: active) {
	#masthead .site-header-bar .menu.primary-menu > li:is(.current-menu-item, .current-menu-ancestor, .current-page-ancestor) > a {
		text-decoration: underline 3px;
		text-underline-offset: 6px;
	}
}

#masthead .site-header-bar .menu.primary-menu > li.mega-menu > a::after,
#masthead .site-header-bar .menu.primary-menu > li.menu-item-has-children > a::after {
	content: "";
	display: inline-block;
	width: 8px;
	height: 8px;
	border-right: 2px solid currentColor;
	border-bottom: 2px solid currentColor;
	transform: rotate(45deg) translateY(-2px);
	margin-left: 6px;
	transition: transform 200ms ease;
}

#masthead .site-header-bar .menu.primary-menu > li.mega-open > a::after,
#masthead .site-header-bar .menu.primary-menu > li.menu-item-has-children:not(.mega-menu):hover > a::after,
#masthead .site-header-bar .menu.primary-menu > li.menu-item-has-children:not(.mega-menu):focus-within > a::after {
	transform: rotate(225deg) translateY(-2px);
}

/* ============================================================
 * Header actions: search (with its "/" key), Roseville phone,
 * a compact Request Quote and the Night Shift switch. They give
 * way from the right edge as the bar narrows: the phone becomes
 * an icon near 1180px, Home leaves the menu (the logo is home).
 * ========================================================= */
.site-header-actions {
	display: flex;
	flex: none;
	align-items: center;
	gap: var(--kdl-space-3, 12px);
	padding-left: var(--kdl-space-3, 12px);
}

.site-header-actions__search {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	min-height: 40px;
	padding: 0 8px 0 10px;
	background: var(--kdl-surface-base, #fff);
	border: 1px solid var(--kdl-border-default, #cfd6dd);
	border-radius: var(--kdl-radius-sm, 4px);
	color: var(--kdl-gray-600, #2f353d);
	cursor: pointer;
	transition: border-color 150ms ease, color 150ms ease;
}

.site-header-actions__search:hover {
	border-color: var(--kdl-copper-500, #c2632a);
	color: var(--kdl-gray-900, #0a0d11);
}

.site-header-actions__kbd {
	display: inline-grid;
	place-items: center;
	min-width: 20px;
	height: 20px;
	padding: 0 4px;
	border: 1px solid var(--kdl-border-default, #cfd6dd);
	border-radius: 3px;
	background: var(--kdl-gray-50, #f4f6f8);
	font: 500 11px/1 var(--kdl-font-mono, Lilex, monospace);
	color: var(--kdl-gray-500, #444c56);
}

.site-header-actions__phone {
	display: grid;
	gap: 1px;
	color: var(--kdl-gray-900, #0a0d11);
	text-decoration: none;
	white-space: nowrap;
}

.site-header-actions__place {
	font: 500 11px/1.2 var(--kdl-font-mono, Lilex, monospace);
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--kdl-gray-500, #444c56);
}

.site-header-actions__number {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	font: 600 15px/1.2 var(--kdl-font-sans, "IBM Plex Sans", sans-serif);
	font-variant-numeric: tabular-nums;
}

.site-header-actions__number .fa {
	color: var(--kdl-copper-500, #c2632a);
	font-size: 14px;
}

.site-header-actions__phone:hover .site-header-actions__number {
	text-decoration: underline;
	text-decoration-color: var(--kdl-copper-500, #c2632a);
	text-decoration-thickness: 2px;
	text-underline-offset: 4px;
}

.kdl-btn.site-header-actions__quote {
	min-height: 40px;
	padding: 10px 16px;
	white-space: nowrap;
}

.kdl-btn.site-header-actions__quote::after {
	left: 16px;
	right: 16px;
	bottom: 6px;
}

@media screen and (max-width: 1239px) {
	.site-header-actions__kbd {
		display: none;
	}
}

@media screen and (max-width: 1269px) {
	.site-header-actions__place {
		display: none;
	}

	.site-header-actions__number {
		font-size: 0;
		gap: 0;
	}

	.site-header-actions__phone {
		display: inline-grid;
		place-items: center;
		width: 40px;
		height: 40px;
		border: 1px solid var(--kdl-border-default, #cfd6dd);
		border-radius: var(--kdl-radius-sm, 4px);
	}

	.site-header-actions__number .fa {
		font-size: 16px;
	}

	#masthead .site-header-bar .menu.primary-menu {
		gap: 12px;
	}
}

@media screen and (max-width: 1139px) {
	#masthead .site-header-bar .menu.primary-menu > li.menu-item-home {
		display: none;
	}

	#masthead .site-header-bar {
		gap: var(--kdl-space-4, 16px);
	}

	.site-header-actions {
		gap: var(--kdl-space-2, 8px);
		padding-left: 0;
	}

	.menu-item-salt .menu-salt__tag {
		display: none;
	}
}

@media screen and (max-width: 1049px) {
	#masthead .site-header-bar .custom-logo,
	#masthead .site-header-bar .custom-logo-link img {
		height: 72px;
	}

	#masthead .site-header-bar .menu.primary-menu > li > a {
		font-size: 14px;
	}
}

/* ============================================================
 * Night Shift switch (header, drawer). aria-pressed carries the
 * state; the label is visible in the drawer, a tooltip-free
 * accessible name in the header.
 * ========================================================= */
.shift-toggle {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	min-height: 40px;
	padding: 0 4px;
	background: none;
	border: 0;
	color: var(--kdl-gray-600, #2f353d);
	cursor: pointer;
	font: 500 12px/1 var(--kdl-font-mono, Lilex, monospace);
	letter-spacing: 0.08em;
	text-transform: uppercase;
}

.site-header-actions .shift-toggle__label {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	clip-path: inset(50%);
	white-space: nowrap;
}

.shift-toggle__track {
	position: relative;
	display: inline-block;
	width: 34px;
	height: 20px;
	border: 1px solid var(--kdl-border-strong, #6c7682);
	border-radius: 999px;
	background: var(--kdl-gray-50, #f4f6f8);
	transition: background 200ms ease, border-color 200ms ease;
}

.shift-toggle__knob {
	position: absolute;
	top: 2px;
	left: 2px;
	display: grid;
	place-items: center;
	width: 14px;
	height: 14px;
	border-radius: 50%;
	color: var(--kdl-gray-50, #f4f6f8);
	background: var(--kdl-gray-600, #2f353d);
	transition: transform 200ms var(--kdl-ease-emphasized, ease), background 200ms ease, box-shadow 200ms ease;
}

.shift-toggle[aria-pressed="true"] .shift-toggle__track {
	background: var(--upton-furnace-900, #120d0b);
	border-color: var(--kdl-copper-300, #f0a370);
}

.shift-toggle[aria-pressed="true"] .shift-toggle__knob {
	transform: translateX(14px);
	color: var(--upton-furnace-900, #120d0b);
	background: var(--kdl-copper-300, #f0a370);
	box-shadow: 0 0 8px rgba(240, 163, 112, 0.6);
}

@media (prefers-reduced-motion: reduce) {
	.shift-toggle__track,
	.shift-toggle__knob {
		transition: none;
	}
}

/* ============================================================
 * "Need Salt?" — the Kolene doorway. Behind a hairline, in
 * Kolene blue (its one job on this site), with a KOLENE tag and
 * an external-link mark. Hover (with a short intent delay) or
 * focus drops a card; Escape dismisses it (chrome.js).
 * ========================================================= */
#masthead .site-header-bar .menu.primary-menu > li.menu-item-salt {
	padding-left: var(--kdl-space-4, 16px);
}

#masthead .site-header-bar .menu.primary-menu > li.menu-item-salt::before {
	content: "";
	position: absolute;
	left: 0;
	top: 50%;
	width: 1px;
	height: 24px;
	background: var(--kdl-border-default, #cfd6dd);
	transform: translateY(-50%);
}

#masthead .site-header-bar .menu.primary-menu > li.menu-item-salt > a {
	color: var(--kdl-blue-600, #015e92);
	background-image: linear-gradient(var(--kdl-blue-600, #015e92), var(--kdl-blue-600, #015e92));
}

.menu-salt__tag {
	display: inline-block;
	margin-left: 2px;
	padding: 3px 4px 2px;
	border-radius: 2px;
	background: var(--kdl-blue-600, #015e92);
	color: #fff;
	font: 500 9px/1 var(--kdl-font-mono, Lilex, monospace);
	letter-spacing: 0.1em;
	text-transform: uppercase;
}

.menu-salt__arrow {
	font-family: var(--kdl-font-sans, "IBM Plex Sans", sans-serif);
	font-size: 13px;
}

.menu-salt-card {
	position: absolute;
	top: 100%;
	right: 0;
	z-index: 11;
	width: 290px;
	padding: var(--kdl-space-4, 16px) var(--kdl-space-5, 24px) var(--kdl-space-5, 24px);
	background: var(--kdl-surface-base, #fff);
	border: 1px solid var(--kdl-border-subtle, #e7ebef);
	border-top: 3px solid var(--kdl-blue-500, #0078b9);
	border-radius: 0 0 var(--kdl-radius-md, 6px) var(--kdl-radius-md, 6px);
	box-shadow: var(--kdl-elev-4, 0 12px 32px rgba(10, 13, 17, 0.12));
	opacity: 0;
	visibility: hidden;
	transform: translateY(-4px);
	transition: opacity 150ms ease, transform 150ms ease, visibility 0s linear 150ms;
}

.menu-item-salt:hover > .menu-salt-card {
	opacity: 1;
	visibility: visible;
	transform: none;
	/* 150ms of hover intent before it drops. */
	transition: opacity 150ms ease 150ms, transform 150ms ease 150ms, visibility 0s linear 150ms;
}

.menu-item-salt:focus-within > .menu-salt-card {
	opacity: 1;
	visibility: visible;
	transform: none;
	transition: opacity 150ms ease, transform 150ms ease, visibility 0s;
}

.menu-item-salt.is-dismissed > .menu-salt-card {
	opacity: 0;
	visibility: hidden;
	transition: none;
}

.menu-salt-card__maker {
	margin: 0 0 6px;
	font: 500 11px/1.3 var(--kdl-font-mono, Lilex, monospace);
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--kdl-blue-600, #015e92);
}

.menu-salt-card__text {
	margin: 0;
	font-size: 14px;
	line-height: 1.5;
	color: var(--kdl-text-default, #2f353d);
}

.menu-salt-card__call {
	margin: 10px 0 0;
	font-size: 13px;
	color: var(--kdl-gray-500, #444c56);
}

.menu-salt-card__call a {
	color: var(--kdl-blue-600, #015e92);
	font-family: var(--kdl-font-mono, Lilex, monospace);
	font-weight: 500;
	font-variant-numeric: tabular-nums;
}

@media (prefers-reduced-motion: reduce) {
	.menu-salt-card,
	.menu-item-salt:hover > .menu-salt-card,
	.menu-item-salt:focus-within > .menu-salt-card {
		transform: none;
		transition: visibility 0s linear 150ms;
	}
}

/* ============================================================
 * Simple dropdowns for primary-menu parents without a mega panel.
 * Shown on hover and while focus is inside (keyboard reachable).
 * ========================================================= */
.main-navigation .menu > li.menu-item-has-children:not(.mega-menu) > .sub-menu {
	position: absolute;
	top: 100%;
	left: 0;
	z-index: 10;
	width: max-content;
	min-width: 220px;
	max-width: min(280px, calc(100vw - 2 * var(--kdl-space-5, 24px)));
	padding: var(--kdl-space-2, 8px) 0;
	background: var(--kdl-surface-base, #fff);
	border: 1px solid var(--kdl-border-subtle, #e7ebef);
	border-radius: var(--kdl-radius-md, 6px);
	box-shadow: var(--kdl-elev-4, 0 12px 32px rgba(10, 13, 17, 0.12));
}

/* The menu is right-aligned, so dropdowns under the last three items open
 * leftwards from the item's right edge and stay inside the viewport. */
.main-navigation .menu > li.menu-item-has-children:not(.mega-menu):nth-last-child(-n+3) > .sub-menu {
	left: auto;
	right: 0;
}

.main-navigation .menu > li.menu-item-has-children:not(.mega-menu):hover > .sub-menu,
.main-navigation .menu > li.menu-item-has-children:not(.mega-menu):focus-within > .sub-menu {
	display: block;
}

.main-navigation .menu > li:not(.mega-menu) > .sub-menu .menu-item {
	display: block;
}

.main-navigation .menu > li:not(.mega-menu) > .sub-menu a {
	display: block;
	padding: var(--kdl-space-2, 8px) var(--kdl-space-4, 16px);
	font-size: 14px;
	font-weight: 500;
	line-height: 1.4;
	color: var(--kdl-text-strong, #14181d);
	text-decoration: none;
}

.main-navigation .menu > li:not(.mega-menu) > .sub-menu a:hover,
.main-navigation .menu > li:not(.mega-menu) > .sub-menu .current-menu-item > a {
	background: var(--kdl-surface-raised, #f4f6f8);
	color: var(--kdl-accent-500, #CE2029);
}

/* ============================================================
 * Mega panel — spans the header container, so it never runs
 * past the viewport whatever the trigger's position.
 * JS removes [hidden], then adds .is-open on the next frame.
 * ========================================================= */
.mega-panel {
	position: absolute;
	top: 100%;
	left: var(--kdl-space-5, 24px);
	right: var(--kdl-space-5, 24px);
	z-index: 10;
	background: var(--kdl-gray-0, #fff);
	border: 1px solid var(--kdl-gray-100, #e5e9ee);
	border-top: 0;
	border-radius: 0 0 8px 8px;
	box-shadow: var(--kdl-elev-4, 0 12px 32px rgba(10, 13, 17, 0.16));
	opacity: 0;
	visibility: hidden;
	pointer-events: none; /* a panel fading out doesn't take clicks */
	transform: translateY(-8px);
	/* Reveal downwards like a door lifting. clip-path is the longest
	 * transition on purpose: mega-menu.js's afterTransition() waits on the
	 * longest one before re-hiding the panel. Negative side and bottom
	 * insets leave room for the shadow. */
	clip-path: inset(0 -40px 100% -40px);
	transition: opacity 180ms ease, transform 180ms ease, visibility 260ms, clip-path 260ms var(--kdl-ease-emphasized, ease);
	/* The panel rides in the sticky header, so scrolling the page never
	 * brings its lower links into view: on short viewports (1366x657
	 * laptops) it scrolls itself instead. 136px = the 120px header bar
	 * plus 16px clearance above the viewport's bottom edge. */
	max-height: calc(100vh - 136px);
	max-height: calc(100dvh - 136px);
	overflow-y: auto;
	overscroll-behavior: contain;
}

.admin-bar .mega-panel {
	max-height: calc(100vh - 168px);
	max-height: calc(100dvh - 168px);
}

/* Visible, so its links are focusable, as soon as JS un-hides it (a Tab
 * pressed before .is-open lands next frame still reaches them). A closing
 * panel is [inert] at once; the base rule's visibility transition keeps it
 * on screen while it fades out. */
.mega-panel:not([inert]) {
	visibility: visible;
}

.mega-panel.is-open {
	opacity: 1;
	visibility: visible;
	pointer-events: auto;
	transform: translateY(0);
	clip-path: inset(0 -40px -60px -40px);
	transition: opacity 180ms ease, transform 180ms ease, visibility 0s, clip-path 260ms var(--kdl-ease-emphasized, ease);
}

/* The copper seal line along the panel's top edge, drawn from the centre. */
.mega-panel::before {
	content: "";
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	height: 2px;
	background: var(--kdl-copper-500, #c2632a);
	transform: scaleX(0);
	transition: transform 320ms var(--kdl-ease-emphasized, ease) 60ms;
}

.mega-panel.is-open::before {
	transform: scaleX(1);
}

@media (prefers-reduced-motion: reduce) {
	.mega-panel,
	.mega-panel.is-open { transition: none; }
	.mega-panel::before { transition: none; }
}

.mega-panel__inner {
	display: grid;
	grid-template-columns: minmax(0, 1.55fr) minmax(0, 1.2fr) minmax(0, 0.8fr);
	gap: var(--kdl-space-6, 32px);
	padding: var(--kdl-space-6, 32px);
}

/* All eight families, two columns of thumbnail rows. */
.mega-panel__list--products {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 4px var(--kdl-space-3, 12px);
}

.mega-panel__list--products li + li { margin-top: 0; }

/* The homepage finder's four process clusters, two by two. */
.mega-panel__clusters {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: var(--kdl-space-4, 16px) var(--kdl-space-5, 24px);
}

.mega-panel__cluster-title {
	margin: 0 0 4px;
	padding: 0 8px;
	font-family: var(--kdl-font-mono, Lilex, ui-monospace, monospace);
	font-size: 11px;
	font-weight: 500;
	letter-spacing: 0.08em;
	line-height: 1.4;
	text-transform: uppercase;
	color: var(--kdl-gray-400, #6c7682);
}

.mega-panel__cluster .mega-panel__list { margin: 0; }

.mega-panel__eyebrow {
	font-family: var(--kdl-font-mono, Lilex, ui-monospace, monospace);
	font-size: 12px;
	font-weight: 500;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--kdl-gray-600, #5a6470);
	margin: 0 0 var(--kdl-space-3, 12px);
}

.mega-panel__list {
	list-style: none;
	margin: 0 0 var(--kdl-space-3, 12px);
	padding: 0;
}

.mega-panel__list--products li + li { margin-top: 4px; }

.mega-panel__product {
	display: flex;
	align-items: center;
	gap: var(--kdl-space-3, 12px);
	padding: 8px;
	border-radius: 6px;
	text-decoration: none;
	color: inherit;
	transition: background 150ms ease;
}

.mega-panel__product:hover,
.mega-panel__product:focus-visible {
	background: var(--kdl-gray-50, #f4f6f8);
	box-shadow: inset 3px 0 0 var(--kdl-copper-500, #c2632a);
}

.mega-panel__product[aria-current="page"] {
	box-shadow: inset 3px 0 0 var(--kdl-copper-500, #c2632a);
}

.mega-panel__product-thumb {
	flex: 0 0 56px;
	height: 56px;
	border-radius: 4px;
	overflow: hidden;
	background: var(--kdl-gray-100, #e5e9ee);
}

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

.mega-panel__product-thumb-placeholder {
	display: block;
	width: 100%;
	height: 100%;
	background: linear-gradient(135deg, var(--kdl-gray-100, #e5e9ee), var(--kdl-gray-200, #ced3da));
}

.mega-panel__product-text {
	display: flex;
	flex-direction: column;
	gap: 2px;
}

.mega-panel__product-title {
	font-weight: 600;
	font-size: 14px;
	color: var(--kdl-gray-900, #0a0d11);
	line-height: 1.3;
}

.mega-panel__product-excerpt {
	font-size: 12px;
	color: var(--kdl-gray-600, #5a6470);
	line-height: 1.4;
}

.mega-panel__list--apps li + li { margin-top: 0; }

.mega-panel__list--apps a {
	display: block;
	padding: 5px 8px;
	border-radius: 4px;
	font-size: 14px;
	color: var(--kdl-gray-900, #0a0d11);
	text-decoration: none;
	transition: background 150ms ease, box-shadow 150ms ease;
}

.mega-panel__list--apps a:hover,
.mega-panel__list--apps a:focus-visible {
	background: var(--kdl-gray-50, #f4f6f8);
	box-shadow: inset 3px 0 0 var(--kdl-copper-500, #c2632a);
}

.mega-panel__viewall {
	margin: var(--kdl-space-3, 12px) 0 0;
	font-size: 13px;
	font-weight: 500;
}

.mega-panel__viewall a {
	color: var(--kdl-text-accent, #B51B23);
	text-decoration: none;
}

.mega-panel__viewall a:hover {
	text-decoration: underline;
	text-decoration-color: var(--kdl-copper-500, #c2632a);
	text-decoration-thickness: 2px;
	text-underline-offset: 4px;
}

.mega-panel__col--callout {
	background: var(--kdl-gray-50, #f4f6f8);
	padding: var(--kdl-space-5, 24px);
	border-radius: 6px;
	margin: calc(-1 * var(--kdl-space-6, 32px)) calc(-1 * var(--kdl-space-6, 32px)) calc(-1 * var(--kdl-space-6, 32px)) 0;
	display: flex;
	flex-direction: column;
	gap: var(--kdl-space-3, 12px);
}

.mega-panel__callout-image {
	width: 100%;
	height: 140px;
	object-fit: cover;
	border-radius: 4px;
}

.mega-panel__callout-heading {
	margin: 0;
	font-size: 18px;
	font-weight: 600;
	color: var(--kdl-gray-900, #0a0d11);
}

.mega-panel__callout-body {
	margin: 0;
	font-size: 14px;
	color: var(--kdl-gray-600, #5a6470);
	line-height: 1.5;
}

.mega-panel__callout-btn {
	margin-top: auto;
	align-self: flex-start;
}

/* ============================================================
 * Below desktop the bar and panel are replaced by the mobile
 * bar (style.css) and the drawer.
 * ========================================================= */
@media screen and (max-width: 991px) {
	#masthead .site-header-bar,
	.mega-panel {
		display: none;
	}
}

/* ============================================================
 * Mobile drawer + backdrop (modal dialog, driven by mega-menu.js)
 * ========================================================= */
.mobile-drawer {
	position: fixed;
	top: 0;
	right: 0;
	/* Leave a strip of backdrop visible on phones so a tap outside closes it. */
	width: min(380px, calc(100% - 48px));
	height: 100vh;
	height: 100dvh;
	background: var(--kdl-gray-0, #fff);
	z-index: 100;
	overflow-y: auto;
	overscroll-behavior: contain;
	transform: translateX(100%);
	transition: transform 250ms cubic-bezier(0.4, 0, 0.2, 1);
	box-shadow: -8px 0 24px rgba(0, 0, 0, 0.16);
	/* While it slides out, taps go to the page (e.g. the Menu button). */
	pointer-events: none;
}

.mobile-drawer.is-open {
	transform: translateX(0);
	pointer-events: auto;
}

.admin-bar .mobile-drawer {
	top: 32px;
	height: calc(100vh - 32px);
	height: calc(100dvh - 32px);
}

@media screen and (max-width: 782px) {
	.admin-bar .mobile-drawer {
		top: 46px;
		height: calc(100vh - 46px);
		height: calc(100dvh - 46px);
	}
}

.mobile-drawer-backdrop {
	position: fixed;
	inset: 0;
	z-index: 99;
	background: rgba(10, 13, 17, 0.4);
	opacity: 0;
	pointer-events: none;
	transition: opacity 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

.mobile-drawer-backdrop.is-visible {
	opacity: 1;
	pointer-events: auto;
}

@media (prefers-reduced-motion: reduce) {
	.mobile-drawer,
	.mobile-drawer-backdrop {
		transition: none;
	}
}

html.drawer-open { overflow: hidden; }

.mobile-drawer__header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 16px 20px;
	border-bottom: 1px solid var(--kdl-gray-100, #e5e9ee);
}

.mobile-drawer__title {
	margin: 0;
	font-size: 14px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	color: var(--kdl-gray-600, #5a6470);
}

.mobile-drawer__close {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 44px;
	min-height: 44px;
	margin: -6px -8px -6px 0;
	background: none;
	border: 0;
	cursor: pointer;
	font-size: 24px;
	line-height: 1;
	color: var(--kdl-gray-900, #0a0d11);
	padding: 4px 8px;
}

.mobile-drawer__nav {
	padding: 8px 0;
}

.mobile-drawer__nav .menu {
	list-style: none;
	margin: 0;
	padding: 0;
}

.mobile-drawer__nav .menu .menu-item {
	display: block;
	position: relative;
}

.mobile-drawer__nav .menu .sub-menu {
	display: block;
	list-style: none;
	margin: 0;
	padding: 0;
	position: static;
}

.mobile-drawer__nav .menu a {
	display: block;
	padding: 14px 20px;
	font-size: 16px;
	font-weight: 500;
	color: var(--kdl-gray-900, #0a0d11);
	text-decoration: none;
	border-bottom: 1px solid var(--kdl-gray-100, #e5e9ee);
}

.mobile-drawer__nav .menu a:hover,
.mobile-drawer__nav .menu a:focus {
	background: var(--kdl-gray-50, #f4f6f8);
	color: var(--kdl-gray-900, #0a0d11);
}

/* You are here: a copper inset, the drawer's version of the underline. */
.mobile-drawer__nav .menu :is(.current-menu-item, .current-menu-ancestor, .current-page-ancestor) > a {
	box-shadow: inset 4px 0 0 var(--kdl-copper-500, #c2632a);
	color: var(--kdl-gray-900, #0a0d11);
	font-weight: 600;
}

/* Products: the link, a disclosure button beside it, then the families. */
.mobile-drawer__nav .menu > li:has(> .mobile-drawer__disclosure) {
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto;
}

.mobile-drawer__nav .menu > li:has(> .mobile-drawer__disclosure) > .sub-menu {
	grid-column: 1 / -1;
}

.mobile-drawer__disclosure {
	display: inline-grid;
	place-items: center;
	width: 52px;
	background: none;
	border: 0;
	border-bottom: 1px solid var(--kdl-gray-100, #e5e9ee);
	border-left: 1px solid var(--kdl-gray-100, #e5e9ee);
	color: var(--kdl-gray-900, #0a0d11);
	cursor: pointer;
}

.mobile-drawer__disclosure::before {
	content: "";
	width: 9px;
	height: 9px;
	border-right: 2px solid currentColor;
	border-bottom: 2px solid currentColor;
	transform: translateY(-2px) rotate(45deg);
	transition: transform 200ms ease;
}

.mobile-drawer__disclosure[aria-expanded="true"]::before {
	transform: translateY(2px) rotate(225deg);
}

.mobile-drawer__families {
	background: var(--kdl-gray-50, #f4f6f8);
}

.mobile-drawer__families a {
	padding-top: 12px;
	padding-bottom: 12px;
}

.mobile-drawer__nav .menu-item-salt > a {
	color: var(--kdl-blue-600, #015e92);
}

.mobile-drawer__nav .menu-item-salt .menu-salt__tag {
	vertical-align: 2px;
}

.mobile-drawer__nav .menu .sub-menu a {
	padding-left: 36px;
	font-size: 14px;
	color: var(--kdl-gray-700, #3f4751);
}

.mobile-drawer__footer {
	padding: 20px;
	border-top: 1px solid var(--kdl-gray-100, #e5e9ee);
	display: flex;
	flex-direction: column;
	gap: var(--kdl-space-3, 12px);
}

.mobile-drawer__footer .kdl-btn {
	justify-content: center;
}

.mobile-drawer__phone {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	color: var(--kdl-gray-900, #0a0d11);
	text-decoration: none;
	font-weight: 500;
}

.mobile-drawer__phone .fa { color: var(--kdl-copper-500, #c2632a); }

.mobile-drawer__phone {
	min-height: 44px;
	font-variant-numeric: tabular-nums;
}

.shift-toggle--drawer {
	justify-content: center;
	min-height: 44px;
}
