/**
 * LMS Platform: navigation (header shell, announcement bar, mega-menu,
 * mobile accordion).
 *
 * Loaded after theme.css, so the few base rules this file has to change
 * (.site-header, .nav) win by load order rather than by specificity tricks.
 * Everything else uses prefixed names (.announce-*, .mega-*, .navdrop-*).
 *
 * Two ideas carry the design:
 *
 *   1. The header is SCROLL AWARE. At the top of the page it is tall,
 *      borderless and fully transparent, so the hero starts at the very top of
 *      the viewport. Once past the sentinel it condenses into real glass with a
 *      hairline edge and a brand-tinted shadow. nav.js only toggles a class and
 *      re-points --header-h at the other height token; the transition is CSS.
 *
 *   2. ONE indicator slides between the top-level items instead of each item
 *      owning a static underline. nav.js measures the hovered item and writes
 *      --mk-x / --mk-y / --mk-w; with JS off the indicator never appears and
 *      the items keep their own hover treatment.
 *
 * Colour only ever comes from the tokens in theme.css, so the Customizer's
 * --brand / --brand-2 override re-themes every tint, ring and hairline here.
 */

/* ══ Header shell ══ */
:root {
	/* Deliberately tighter than the usual marketing header, to match the
	   --section-y rhythm theme.css now sets for the rest of the site. */
	--nav-h-top: 70px;    /* resting height, at the top of the page */
	--nav-h-fixed: 58px;  /* condensed height, once scrolled */

	/* theme.css sets a fixed 72px. Re-pointing it at a token means the drawer
	   offset, the sticky height and scroll-padding-top all follow the header
	   instead of each carrying their own copy of the number. */
	--header-h: var(--nav-h-top);
}

/* Watched by nav.js. Absolutely positioned, so it costs no layout, and tall
   enough that the swap happens after a deliberate scroll rather than a twitch. */
.nav-sentinel {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 12px;
	pointer-events: none;
}

.site-header {
	background: transparent;
	backdrop-filter: none;
	-webkit-backdrop-filter: none;
	border-bottom: 1px solid transparent;
	transition: background-color 0.3s var(--ease), border-color 0.3s var(--ease),
		box-shadow 0.3s var(--ease), backdrop-filter 0.3s var(--ease);
}

/* theme.js toggles .is-stuck for the old flat shadow. The scrolled look now
   lives on .is-scrolled below, so this only has to stop the two fighting. */
.site-header.is-stuck {
	border-bottom-color: transparent;
	box-shadow: none;
}

.site-header.is-scrolled,
.site-header.is-stuck.is-scrolled {
	background: color-mix(in srgb, var(--bg) 76%, transparent);
	backdrop-filter: saturate(180%) blur(20px);
	-webkit-backdrop-filter: saturate(180%) blur(20px);
	border-bottom-color: var(--border);
	box-shadow: 0 18px 40px -30px color-mix(in srgb, var(--brand) 60%, transparent),
		0 1px 0 0 color-mix(in srgb, var(--border) 60%, transparent);
}

/* Frosted glass is a progressive enhancement: without it a translucent bar is
   just unreadable text over moving content. */
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
	.site-header.is-scrolled { background: var(--surface); }
}

/* The signature: a hairline of the brand gradient along the bottom edge, only
   once the header has detached from the top of the page. */
.site-header::after {
	content: '';
	position: absolute;
	left: 0;
	right: 0;
	bottom: -1px;
	height: 1px;
	background: var(--brand-grad);
	opacity: 0;
	pointer-events: none;
	transition: opacity 0.3s var(--ease);
}
.site-header.is-scrolled::after { opacity: 0.6; }

/* The height itself. Transitioning the consumer of --header-h (not the custom
   property, which would not animate) keeps the swap smooth. */
.nav { transition: height 0.32s var(--ease); }

/* No animation on first paint: a page restored mid-scroll would otherwise open
   with the header visibly shrinking. nav.js adds .nav-ready one frame in. */
.site-header:not(.nav-ready) .nav { transition: none; }

.brand__mark { transition: transform 0.28s var(--ease), box-shadow 0.28s var(--ease); }
.brand:hover .brand__mark {
	transform: translateY(-1px) rotate(-3deg);
	box-shadow: 0 14px 28px -12px color-mix(in srgb, var(--brand) 75%, transparent);
}

@media (max-width: 980px) {
	:root {
		--nav-h-top: 62px;
		--nav-h-fixed: 56px;
	}
}

/* ══ Announcement bar ══
 * Rendered inside the sticky header rather than above it: a separate bar above
 * a sticky element either scrolls out from under it or has to be measured in
 * JS. Here the header simply gets taller. */
.announce {
	position: relative;
	background: var(--brand-grad);
	color: #fff;
}

/* A soft highlight across the top so the bar reads as a lit surface rather
   than a flat block of colour.
   Painted ABOVE the background and BELOW the content: the previous version
   paired `isolation: isolate` on the parent with `z-index: -1` here, which
   sends the layer behind its own parent's background and made it invisible. */
.announce::before {
	content: '';
	position: absolute;
	inset: 0;
	background: linear-gradient(180deg, rgba(255, 255, 255, 0.16) 0%, transparent 55%);
	pointer-events: none;
	z-index: 0;
}
.announce__inner {
	position: relative;
	z-index: 1;
	display: flex;
	align-items: center;
	gap: 10px;
	min-height: 32px;
	padding-block: 5px;
}

.announce__dot {
	position: relative;
	width: 7px;
	height: 7px;
	border-radius: var(--r-full);
	background: rgba(255, 255, 255, 0.9);
	flex: none;
}

/* One slow, quiet pulse. It is the only looping animation in the header and it
   marks the one thing on the page that changes between visits. */
.announce__dot::after {
	content: '';
	position: absolute;
	inset: -4px;
	border-radius: var(--r-full);
	border: 1px solid rgba(255, 255, 255, 0.6);
	animation: lmsp-announce-pulse 3s var(--ease) infinite;
}

@keyframes lmsp-announce-pulse {
	0% { transform: scale(0.6); opacity: 0.9; }
	70% { transform: scale(1.5); opacity: 0; }
	100% { transform: scale(1.5); opacity: 0; }
}

/**
 * 🔴 THE COLOUR MUST BE DECLARED HERE, NOT INHERITED FROM .announce.
 *
 * This element is a <p>, and theme.css carries `p { color: var(--text-2) }`.
 * An INHERITED value loses to any declaration that matches the element, no
 * matter how low its specificity, so the white on `.announce` never reached
 * this text: it rendered dark slate on the brand gradient, which is what the
 * bar looked wrong as.
 *
 * The same trap applies to anything else that lands inside a coloured bar, so
 * state the colour on every text-bearing element rather than relying on the
 * container.
 */
.announce__text {
	margin: 0;
	color: #fff;
	font-size: 0.85rem;
	font-weight: 700;
	line-height: 1.45;
	flex: 1 1 auto;
	min-width: 0;
}
.announce__text a,
.announce__text strong { color: #fff; font-weight: 700; }

/* Hover dims the BACKGROUND, never the text. Fading white text on a mid-tone
   gradient is the one change here that could drop this below 4.5:1, so the
   colour is pinned at full white in every state. */
.announce__link {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	flex: none;
	padding: 3px 9px;
	border-radius: var(--r-full);
	background: rgba(255, 255, 255, 0.14);
	color: #fff;
	font-size: 0.83rem;
	font-weight: 650;
	text-decoration: underline;
	text-underline-offset: 3px;
	transition: background-color 0.18s var(--ease);
}
.announce__link:hover,
.announce__link:focus-visible { color: #fff; background: rgba(255, 255, 255, 0.28); }
.announce__link svg { width: 14px; height: 14px; transition: transform 0.2s var(--ease); }
.announce__link:hover svg { transform: translateX(3px); }

.announce__close {
	flex: none;
	width: 26px;
	height: 26px;
	display: grid;
	place-items: center;
	border: 0;
	border-radius: var(--r-full);
	background: rgba(255, 255, 255, 0.14);
	color: #fff;
	cursor: pointer;
	transition: background-color 0.18s var(--ease);
}
.announce__close:hover { background: rgba(255, 255, 255, 0.28); }

/* The drawer is fixed at top:var(--header-h); with the bar showing, the header
 * is taller than that. One scoped nudge instead of re-declaring .mobile-nav.
 * --announce-h is measured by nav.js; the fallback covers a single text line. */
body.has-announce .mobile-nav { top: calc(var(--header-h) + var(--announce-h, 52px)); }

@media (max-width: 640px) {
	.announce__text { font-size: 0.8rem; }
	.announce__link { display: none; } /* the bar text still carries the message */
}

/* ══ Desktop mega-menu ══ */
.mega-nav {
	display: flex;
	align-items: center;
	gap: 2px;
	list-style: none;
	margin: 0 auto 0 14px;
	padding: 0;
}

.mega-nav__item { position: static; } /* panels span the header, not the item */

.mega-nav__trigger,
.mega-nav__link {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	padding: 8px 14px;
	border: 0;
	border-radius: var(--r-full);
	background: transparent;
	font: inherit;
	font-size: 0.93rem;
	font-weight: 520;
	color: var(--text-2);
	cursor: pointer;
	transition: background-color 0.18s var(--ease), color 0.18s var(--ease);
}

.mega-nav__trigger:hover,
.mega-nav__link:hover,
.mega-nav__link.is-current,
.mega-nav__trigger[aria-expanded='true'] {
	color: var(--text);
	background: color-mix(in srgb, var(--brand) 7%, transparent);
}

.mega-nav__chev {
	transition: transform 0.22s var(--ease);
	opacity: 0.6;
}
.mega-nav__trigger[aria-expanded='true'] .mega-nav__chev { transform: rotate(180deg); }

/* ── The sliding indicator ──
 * Absolutely positioned against .site-header (the nearest positioned
 * ancestor), which is also what the panels use, so one coordinate space serves
 * both. nav.js writes the three custom properties; until it does, width is 0
 * and opacity is 0, so a blocked script leaves nothing behind. */
.mega-nav__marker {
	position: absolute;
	top: 0;
	left: 0;
	width: var(--mk-w, 0px);
	height: 2px;
	border-radius: var(--r-full);
	background: var(--brand-grad);
	transform: translate3d(var(--mk-x, 0px), var(--mk-y, 0px), 0);
	opacity: 0;
	pointer-events: none;
	transition: transform 0.34s cubic-bezier(0.34, 1.12, 0.42, 1),
		width 0.34s cubic-bezier(0.34, 1.12, 0.42, 1),
		opacity 0.2s var(--ease);
}
.mega-nav__marker.is-on { opacity: 1; }

.mega-panel {
	position: absolute;
	top: 100%;
	left: 0;
	right: 0;
	padding: 10px var(--gutter) 20px;
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.16s var(--ease), visibility 0.16s;
}

/* The panel positions itself; the inner card does the moving. Splitting the two
   keeps the centring transform on narrow panels from fighting the entrance. */

/**
 * 🔴 THE PANEL BACKGROUND IS OPAQUE. DO NOT PUT IT BACK ON GLASS.
 *
 * This used to be `color-mix(--surface 80%, transparent)` over a 20px
 * backdrop blur. Frosted glass works when what is behind it is a flat wash;
 * it fails here because a marketing page is exactly the opposite. The panel
 * hangs over the hero, which carries a ruled grid, an accented headline and
 * coloured app tiles, so 20% of all that bled through the menu and every row
 * of link text was competing with whatever pixel happened to sit under it.
 * That is what "the panel seems transparent" means: not a taste call, a
 * legibility bug.
 *
 * A menu is a reading surface. It gets a solid one. The depth comes from the
 * shadow and the hairline instead, which cost nothing and never interfere
 * with the text sitting on top of them.
 */
.mega-panel__inner {
	position: relative;
	max-width: 1040px;
	margin: 0 auto;
	display: grid;
	grid-template-columns: minmax(0, 1fr) 272px;
	gap: 14px;
	padding: 14px;
	border: 1px solid var(--border);
	border-radius: var(--r-lg);
	background: var(--surface);
	box-shadow: 0 1px 1px rgba(15, 23, 42, 0.04),
		0 12px 20px -12px rgba(15, 23, 42, 0.16),
		0 40px 64px -32px rgba(15, 23, 42, 0.28);
	transform: translateY(-8px) scale(0.99);
	transform-origin: top center;
	opacity: 0;
	transition: transform 0.2s cubic-bezier(0.32, 1.35, 0.5, 1), opacity 0.16s var(--ease);
}

.mega-panel__inner--plain { grid-template-columns: minmax(0, 1fr); }

/* The main column carries the panel's own padding; the side column supplies
   its own, so the two never double up along the seam. */
.mega-panel__main { padding: 6px 6px 2px; }

/* A narrow panel should not stretch to the full container width. */
.mega-panel:not(.mega-panel--wide) .mega-panel__inner { max-width: 620px; margin-inline: 0; }
.mega-panel:not(.mega-panel--wide) {
	left: 50%;
	right: auto;
	transform: translateX(-50%);
	width: min(660px, calc(100vw - 2 * var(--gutter)));
}

/* Open states: click (aria-expanded), hover on a real pointer, and, when JS
 * has not initialised, keyboard focus, so the menu is never JS-only. */
.mega-nav__trigger[aria-expanded='true'] + .mega-panel,
.mega-nav:not(.mega-nav--js) .mega-nav__item:focus-within .mega-panel {
	opacity: 1;
	visibility: visible;
}
.mega-nav__trigger[aria-expanded='true'] + .mega-panel .mega-panel__inner,
.mega-nav:not(.mega-nav--js) .mega-nav__item:focus-within .mega-panel__inner {
	transform: none;
	opacity: 1;
}

@media (hover: hover) and (pointer: fine) {
	.mega-nav__item:hover .mega-panel {
		opacity: 1;
		visibility: visible;
	}
	.mega-nav__item:hover .mega-panel .mega-panel__inner {
		transform: none;
		opacity: 1;
	}
}

/* A ruled label, not a floating uppercase word. The hairline runs from the end
   of the text to the edge of the column, which is what gives the panel a top
   line to hang from now that the gradient bar is gone. */
.mega-panel__eyebrow {
	display: flex;
	align-items: center;
	gap: 10px;
	margin: 0 0 10px;
	font-size: 0.66rem;
	font-weight: 700;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--text-3);
}
.mega-panel__eyebrow::after {
	content: '';
	flex: 1 1 auto;
	height: 1px;
	background: var(--border-soft);
}

/* The side column is its own inset card rather than a hairline divider. Two
   columns of the same white with a 1px line between them read as one wide list
   that happens to have a gap; a tinted panel says "this is a different kind of
   thing" without a single extra word. */
.mega-panel__side {
	display: flex;
	flex-direction: column;
	padding: 12px;
	border-radius: var(--r-md, 14px);
	background: var(--bg-mute);
}
.mega-panel__side .mega-panel__eyebrow { margin-bottom: 8px; }
.mega-panel__side .mega-panel__eyebrow::after { background: var(--border); }

/* Sits on the seam of the tinted panel: a full-width row, hairline above it,
   so it reads as the panel's footer and not a fourth link that lost its icon. */
.mega-panel__all {
	/* auto, not a fixed value: it pins to the bottom of the tinted panel however
	   many links the editor publishes above it. */
	margin-top: auto;
	padding-top: 12px;
	border-top: 1px solid var(--border);
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 6px;
	font-size: 0.84rem;
	font-weight: 650;
	color: var(--brand);
}
.mega-panel__all svg { width: 14px; height: 14px; transition: transform 0.2s var(--ease); }
.mega-panel__all:hover svg { transform: translateX(4px); }

/* ── App grid ── */
.mega-apps {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 8px;
}

/* Each app is a card at rest, not only on hover. Borderless rows made the panel
   read as one long paragraph of product names, and a visitor had to hover every
   one to learn where each entry ended. The hairline is doing information
   architecture, not decoration. */
.mega-app {
	--tile: var(--brand);
	position: relative;
	display: flex;
	align-items: flex-start;
	gap: 11px;
	padding: 11px;
	border: 1px solid var(--border-soft);
	border-radius: var(--r);
	background: var(--surface);
	color: var(--text);
	transition: transform 0.2s var(--ease), border-color 0.2s var(--ease),
		box-shadow 0.2s var(--ease);
}

/* The left edge in the app's own colour: a 2px marker that appears on hover,
   the same device the module register in the hero uses. It ties the menu to the
   page it opens over without repainting anything. */
/* The inset matches the card's corner radius so the bar stays on the straight
   part of the left edge instead of poking out of the curve. */
.mega-app::after {
	content: '';
	position: absolute;
	left: -1px;
	top: 18px;
	bottom: 18px;
	width: 2px;
	border-radius: 2px;
	background: var(--tile);
	opacity: 0;
	transition: opacity 0.2s var(--ease), top 0.2s var(--ease), bottom 0.2s var(--ease);
}
a.mega-app:hover::after { opacity: 1; top: var(--r); bottom: var(--r); }

/* The per-app colour, as a soft wash rather than a block. It is invisible at
   rest and only warms up under the pointer, so ten tiles do not read as ten
   competing colours. */
.mega-app::before {
	content: '';
	position: absolute;
	inset: 0;
	border-radius: inherit;
	background: radial-gradient(130% 110% at 12% 0%,
		color-mix(in srgb, var(--tile) 16%, transparent) 0%, transparent 62%);
	opacity: 0;
	pointer-events: none;
	transition: opacity 0.22s var(--ease);
}

a.mega-app:hover {
	color: var(--text);
	transform: translateY(-1px);
	border-color: color-mix(in srgb, var(--tile) 34%, var(--border));
	box-shadow: 0 10px 22px -16px color-mix(in srgb, var(--tile) 85%, transparent);
}
a.mega-app:hover::before { opacity: 1; }

/* Quieter, not faded to the point of being unreadable: it still has to say
   what is coming. Flat against the panel, because an upcoming app should not
   look like something you can open. */
.mega-app.is-upcoming { cursor: default; background: transparent; border-color: transparent; }
.mega-app.is-upcoming .mega-app__tile { background: var(--bg-mute); color: var(--text-3); }
.mega-app.is-upcoming .mega-app__name { color: var(--text-2); font-weight: 560; }

.mega-app__tile {
	position: relative;
	width: 38px;
	height: 38px;
	flex: none;
	display: grid;
	place-items: center;
	border-radius: var(--r-sm, 10px);
	font-size: 18px;
	line-height: 1;
	background: color-mix(in srgb, var(--tile) 14%, transparent);
	color: var(--tile);
	transition: transform 0.22s var(--ease), background-color 0.22s var(--ease);
}
.mega-app__tile svg { width: 20px; height: 20px; }
a.mega-app:hover .mega-app__tile {
	transform: scale(1.06);
	background: color-mix(in srgb, var(--tile) 22%, transparent);
}

.mega-app__body { display: block; min-width: 0; flex: 1 1 auto; }

.mega-app__name {
	display: flex;
	align-items: center;
	gap: 7px;
	font-size: 0.92rem;
	font-weight: 620;
	color: var(--text);
}

.mega-app__meta {
	display: block;
	margin-top: 2px;
	font-size: 0.79rem;
	line-height: 1.45;
	color: var(--text-3);
}

/* The arrow only exists on hover: at rest it would be ten arrows pointing at
   nothing. */
.mega-app__go {
	flex: none;
	align-self: center;
	display: grid;
	place-items: center;
	color: var(--tile);
	opacity: 0;
	transform: translateX(-6px);
	transition: opacity 0.2s var(--ease), transform 0.2s var(--ease);
}
.mega-app__go svg { width: 15px; height: 15px; }
a.mega-app:hover .mega-app__go { opacity: 1; transform: none; }

.mega-app__chip {
	flex: none;
	padding: 2px 7px;
	border-radius: var(--r-full);
	border: 1px solid var(--border);
	background: var(--bg-mute);
	font-size: 0.63rem;
	font-weight: 700;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: var(--text-3);
}

/* ── Link lists ── */
.mega-links { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.mega-links--cards { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }

.mega-link {
	position: relative;
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 9px 10px;
	border: 1px solid transparent;
	border-radius: var(--r);
	font-size: 0.9rem;
	font-weight: 550;
	color: var(--text-2);
	transition: background-color 0.18s var(--ease), border-color 0.18s var(--ease),
		color 0.18s var(--ease), transform 0.18s var(--ease);
}
.mega-link:hover {
	background: color-mix(in srgb, var(--brand) 6%, transparent);
	border-color: color-mix(in srgb, var(--brand) 16%, transparent);
	color: var(--text);
	transform: translateX(2px);
}

/* Inside the tinted side panel a 6% brand wash is invisible, so the hover state
   there lifts to the panel's own surface instead. Same gesture, opposite
   direction, because the background changed underneath it. */
.mega-panel__side .mega-link:hover {
	background: var(--surface);
	border-color: var(--border);
	box-shadow: var(--shadow-sm);
}

/* Solutions and Resources have no side column, so their links carry the card
   treatment themselves. Stretch keeps the two columns level even when one entry
   has a description and its neighbour does not. */
.mega-link--card {
	align-items: flex-start;
	height: 100%;
	padding: 12px;
	border-color: var(--border-soft);
	background: var(--surface);
}
.mega-link--card:hover {
	transform: translateY(-1px);
	border-color: color-mix(in srgb, var(--brand) 30%, var(--border));
	box-shadow: 0 10px 22px -18px rgba(15, 23, 42, 0.7);
}
.mega-links--cards li { display: flex; }
.mega-links--cards > li > .mega-link { flex: 1 1 auto; }

.mega-link__icon {
	flex: none;
	display: grid;
	place-items: center;
	width: 30px;
	height: 30px;
	border-radius: var(--r-sm, 9px);
	background: color-mix(in srgb, var(--brand) 10%, transparent);
	color: var(--brand);
	transition: background-color 0.18s var(--ease);
}
.mega-link__icon svg { width: 17px; height: 17px; }
.mega-link:hover .mega-link__icon { background: color-mix(in srgb, var(--brand) 18%, transparent); }

.mega-link__body { display: block; min-width: 0; }
.mega-link__name {
	display: flex;
	align-items: center;
	gap: 7px;
	color: var(--text);
	font-weight: 620;
}
.mega-link__desc {
	display: block;
	margin-top: 2px;
	font-size: 0.79rem;
	line-height: 1.45;
	font-weight: 450;
	color: var(--text-3);
}

.mega-link__badge {
	flex: none;
	padding: 2px 7px;
	border-radius: var(--r-full);
	background: color-mix(in srgb, var(--brand) 12%, transparent);
	border: 1px solid color-mix(in srgb, var(--brand) 24%, transparent);
	font-size: 0.62rem;
	font-weight: 700;
	letter-spacing: 0.05em;
	text-transform: uppercase;
	color: var(--brand);
}

@media (max-width: 1100px) {
	.mega-panel__inner { grid-template-columns: minmax(0, 1fr); }
	.mega-panel__main { padding: 6px 4px 0; }
	/* Stacked, the side panel keeps its tint: that is the whole point of it, and
	   it is what separates the two groups now that there is no column seam. */
	.mega-panel__side .mega-links { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 980px) {
	.mega-nav { display: none; } /* theme.css already hides .nav__actions .btn here */
}

/* ══ Mobile drawer accordion ══ */
.navdrop { display: block; }

.navdrop__row { border-bottom: 1px solid var(--border-soft); }

/* Rows arrive one after another. A single short cascade reads as the drawer
   unfolding; anything longer reads as lag. */
@keyframes lmsp-drawer-row {
	from { opacity: 0; transform: translateY(12px); }
	to { opacity: 1; transform: none; }
}

.mobile-nav.is-open .navdrop__row,
.mobile-nav.is-open .navdrop__link,
.mobile-nav.is-open .navdrop__cta {
	animation: lmsp-drawer-row 0.34s var(--ease) both;
	animation-delay: calc(var(--i, 0) * 50ms);
}
.mobile-nav.is-open .navdrop__cta { animation-delay: 180ms; }

.navdrop__trigger {
	width: 100%;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 13px 4px;
	border: 0;
	background: transparent;
	font: inherit;
	font-size: 1.08rem;
	font-weight: 580;
	color: var(--text);
	text-align: left;
	cursor: pointer;
}

.navdrop__chev { transition: transform 0.2s var(--ease); color: var(--text-3); }
.navdrop__trigger[aria-expanded='true'] .navdrop__chev { transform: rotate(180deg); }

.navdrop__panel { padding: 2px 0 12px; }

.mobile-nav .navdrop__sub {
	--tile: var(--brand);
	display: flex;
	align-items: center;
	gap: 11px;
	padding: 10px 10px;
	border: 0;
	border-radius: var(--r);
	font-size: 0.97rem;
	font-weight: 500;
	color: var(--text-2);
}
.mobile-nav .navdrop__sub:hover {
	color: var(--text);
	background: color-mix(in srgb, var(--brand) 7%, transparent);
}
.mobile-nav .navdrop__sub.is-upcoming { color: var(--text-3); }
.mobile-nav .navdrop__sub.is-upcoming .navdrop__dot { background: var(--bg-mute); color: var(--text-3); }

.mobile-nav .navdrop__sub--all {
	justify-content: flex-start;
	gap: 7px;
	color: var(--brand);
	font-weight: 650;
}
.mobile-nav .navdrop__sub--all svg { width: 15px; height: 15px; }

.navdrop__dot {
	flex: none;
	width: 28px;
	height: 28px;
	display: grid;
	place-items: center;
	border-radius: var(--r-sm, 9px);
	background: color-mix(in srgb, var(--tile) 14%, transparent);
	color: var(--tile);
}
.navdrop__dot svg { width: 15px; height: 15px; }

.mobile-nav .navdrop__link {
	display: block;
	padding: 16px 4px;
	font-size: 1.08rem;
	font-weight: 580;
	color: var(--text);
	border-bottom: 1px solid var(--border-soft);
}
.mobile-nav .navdrop__link.is-current { color: var(--brand); }

/* CTAs pinned to the bottom of the drawer; sticky (not fixed) so short
 * viewports can still scroll the list past them. The fade above stops the list
 * from appearing to end abruptly behind them. */
.navdrop__cta {
	position: sticky;
	bottom: 0;
	margin-top: 18px;
	padding-top: 14px;
	background: var(--bg);
	border-top: 1px solid var(--border-soft);
}
.navdrop__cta::before {
	content: '';
	position: absolute;
	left: 0;
	right: 0;
	top: -28px;
	height: 28px;
	background: linear-gradient(180deg, transparent, var(--bg));
	pointer-events: none;
}
.navdrop__cta .btn { margin-bottom: 10px; padding-block: 14px; }

@media (max-width: 360px) {
	.navdrop__trigger, .mobile-nav .navdrop__link { font-size: 1rem; }
	.announce__inner { gap: 8px; }
}

/* ══ Dark ══
 * Glass over a dark page needs more surface and less blur-through, and the
 * brand-tinted shadow has to give way to a real black one or the header looks
 * like it is glowing. */
:root[data-theme='dark'] .site-header.is-scrolled,
:root[data-theme='dark'] .site-header.is-stuck.is-scrolled {
	background: color-mix(in srgb, var(--bg) 82%, transparent);
	box-shadow: 0 18px 40px -28px rgba(0, 0, 0, 0.85);
}
/* Opaque here too. On a dark page the bleed-through was worse, not better: the
   hero's accent colours read straight through the menu text. */
:root[data-theme='dark'] .mega-panel__inner {
	background: var(--surface);
	box-shadow: 0 20px 40px -24px rgba(0, 0, 0, 0.9),
		0 48px 80px -40px rgba(0, 0, 0, 0.8);
}
/* --bg-mute is LIGHTER than --surface in dark mode, so the side panel lifts
   rather than recedes. Same job, and inverting it is what keeps the tint
   visible instead of merging into the card. */
:root[data-theme='dark'] .mega-app { background: color-mix(in srgb, var(--bg-mute) 60%, var(--surface)); }
:root[data-theme='dark'] .mega-app.is-upcoming { background: transparent; }
:root[data-theme='dark'] .mega-link--card { background: color-mix(in srgb, var(--bg-mute) 60%, var(--surface)); }
:root[data-theme='dark'] .mega-panel__side .mega-link:hover { background: color-mix(in srgb, var(--bg-mute) 40%, var(--surface)); }
:root[data-theme='dark'] .mega-app.is-upcoming .mega-app__tile { background: var(--bg-mute); }

@media (prefers-color-scheme: dark) {
	:root:not([data-theme='light']) .site-header.is-scrolled,
	:root:not([data-theme='light']) .site-header.is-stuck.is-scrolled {
		background: color-mix(in srgb, var(--bg) 82%, transparent);
		box-shadow: 0 18px 40px -28px rgba(0, 0, 0, 0.85);
	}
	:root:not([data-theme='light']) .mega-panel__inner {
		background: var(--surface);
		box-shadow: 0 20px 40px -24px rgba(0, 0, 0, 0.9),
			0 48px 80px -40px rgba(0, 0, 0, 0.8);
	}
	:root:not([data-theme='light']) .mega-app { background: color-mix(in srgb, var(--bg-mute) 60%, var(--surface)); }
	:root:not([data-theme='light']) .mega-app.is-upcoming { background: transparent; }
	:root:not([data-theme='light']) .mega-link--card { background: color-mix(in srgb, var(--bg-mute) 60%, var(--surface)); }
	:root:not([data-theme='light']) .mega-panel__side .mega-link:hover { background: color-mix(in srgb, var(--bg-mute) 40%, var(--surface)); }
	:root:not([data-theme='light']) .mega-app.is-upcoming .mega-app__tile { background: var(--bg-mute); }
}

/* ══ Motion ══
 * theme.css already collapses every transition and animation to 0.01ms, but an
 * infinite animation at zero duration still runs forever, so the one looping
 * effect here is switched off outright. */
@media (prefers-reduced-motion: reduce) {
	.announce__dot::after { animation: none; opacity: 0; }

	.mobile-nav.is-open .navdrop__row,
	.mobile-nav.is-open .navdrop__link,
	.mobile-nav.is-open .navdrop__cta {
		animation: none;
	}

	.mega-panel,
	.mega-panel__inner,
	.mega-nav__marker,
	.mega-nav__chev,
	.navdrop__chev,
	.mega-nav__trigger,
	.mega-link,
	.mega-app,
	.mega-app__tile,
	.mega-app__go,
	.brand__mark,
	.nav,
	.site-header,
	.announce__close {
		transition: none;
	}

	.mega-panel__inner { transform: none; }
	.mega-app__go { transform: none; }
}

/* ══════════════════════════════════════════════════════════════════
   Header, second pass
   ══════════════════════════════════════════════════════════════════
   The structure was right; the details were flat. A gradient square
   with a letter in it is what every generated theme ships, and the
   brand mark is the single element a visitor sees on every page of
   the site, so it is worth the extra four rules.
   ────────────────────────────────────────────────────────────────── */

/* Depth on the mark: a lit top edge, a hairline containing it, and a shadow
   tinted with the brand rather than black. Three cheap cues that separate a
   real logo lockup from a coloured box. */
.brand__mark {
	position: relative;
	overflow: hidden;
	border-radius: 12px;
	box-shadow:
		0 8px 18px -8px color-mix(in srgb, var(--brand) 70%, transparent),
		inset 0 1px 0 0 rgba(255, 255, 255, 0.34),
		inset 0 0 0 1px rgba(255, 255, 255, 0.14);
}

/* A soft sheen across the upper half. Pure CSS, no image. */
.brand__mark::after {
	content: '';
	position: absolute;
	inset: 0;
	background: linear-gradient(160deg, rgba(255, 255, 255, 0.32) 0%, transparent 52%);
	pointer-events: none;
}

.brand__name { letter-spacing: -0.025em; }

.brand__tag {
	text-transform: uppercase;
	letter-spacing: 0.1em;
	font-weight: 600;
	font-size: 0.62rem;
	color: var(--text-3);
}

/* The one action the header is actually for. It gets a brand-tinted glow that
   grows on hover, so the primary CTA is never mistaken for the ghost button
   sitting next to it. */
.nav__actions .btn--primary {
	background: var(--brand-grad);
	border-color: transparent;
	box-shadow: 0 8px 20px -10px color-mix(in srgb, var(--brand) 78%, transparent);
	transition: transform 0.18s var(--ease), box-shadow 0.22s var(--ease), filter 0.18s var(--ease);
}
.nav__actions .btn--primary:hover {
	transform: translateY(-1px);
	filter: saturate(1.06);
	box-shadow: 0 14px 28px -10px color-mix(in srgb, var(--brand) 85%, transparent);
}

/* Quieter siblings, so the row reads in one clear order: sign in, talk to
   sales, start free. */
.nav__actions .btn--quiet { color: var(--text-2); font-weight: 600; }
.nav__actions .btn--quiet:hover { color: var(--text); }

.mega-nav__trigger,
.mega-nav__link { letter-spacing: -0.01em; }
