﻿/* ==========================================================================
   celebrus-portal.css
   The Celebrus-branded component layer for the portal front end.
   --------------------------------------------------------------------------
   Written 3 September 2026, front-end redesign workstream.
   Requires celebrus-tokens.css. Loads LAST, after the legacy sheets.

   HOW THIS FITS WITH THE OLD CSS - read before adding to it
   ---------------------------------------------------------
   The end state is this file plus celebrus-tokens.css, and nothing else.
   stylesheet.css and stylesheet_v1.css get deleted. They are still loaded
   today for exactly one reason: five of the eight screens have not been
   restyled yet, and deleting the old sheets now would leave them unstyled.
   When the last screen lands, deleting them is deleting two <link> lines
   from Master.cshtml and one from ErrorMaster.cshtml.

   Until then every rule here is prefixed "body.cel-theme". That is not
   decoration - the class is already on <body> in Master.cshtml, so it costs
   no markup change, and it adds one type plus one class to every selector,
   which is enough to win against the legacy sheet without a single
   !important. There are 35 !important declarations in stylesheet.css and
   none of them fall inside the areas this file touches; that was checked,
   not assumed. Keep it that way: if a rule here ever seems to need
   !important, the real problem is that the legacy rule should be deleted.

   WHAT IS IN SCOPE, AND WHAT IS DELIBERATELY NOT
   ----------------------------------------------
   IN   the login screen, both steps (comp screens 01 and 02)
        the header, the top navigation and the footer, which Master.cshtml
        renders on every page, so they move all eight screens at once
   OUT  screens 03 to 08. Their shared patterns - .form-grid, .form-cta,
        cards, tables - are restyled here ONLY inside the login containers,
        so that an unverified screen cannot change appearance and make the
        next defect ambiguous. Feedback and the documentation reader are
        still untested since the Umbraco 13 to 17 upgrade.
        MainMenu.cshtml (.support-home-tabs) belongs to screen 03 and is
        untouched.
   When a screen is migrated, lift its patterns out of the login scope
   marked "SCOPED - de-scope on migration" below. Do not copy them.

   BREAKPOINTS  576 / 768 / 992 / 1200 / 1400 only. Bootstrap 5's, which the
   portal already carries. The derivation is in
   upgrade\REDESIGN-BREAKPOINTS-AND-CONTRAST.md. The legacy 767/1279 pair is
   retired with the legacy sheet - do not add new rules at those widths.

   COLOUR  no raw hex in this file. Everything comes from the token layer,
   and where a token differs from the comp it is because the comp's value was
   measured against WCAG AA and failed. Those cases are commented in place.
   ========================================================================== */


/* ==========================================================================
   1. LEGACY VARIABLE BRIDGE
   --------------------------------------------------------------------------
   stylesheet.css and stylesheet_v1.css both declare their own --cel-* set in
   :root, and stylesheet.css carries a second copy merged in from
   celebrus-section.css. Three copies, three chances to drift.

   Repointing them at the token layer here - this file is later in source
   order, so these win - means the CDP and Celebrus section pages, the
   documentation index and the Entra ghost button all inherit the new font
   and the corrected colours without being touched. It also means the Nexa
   swap, when it comes, reaches them too.
   ========================================================================== */

:root {
	--cel-font: var(--font-sans); /* was Source Sans Pro, loaded by @import */
	/* The Ask Celebrus drawer has its OWN font variable, declared in BOTH
	   stylesheet.css and d4t4portal.css. Missing it meant the whole drawer -
	   header, chat bubbles, buttons, modals - stayed on Source Sans Pro while
	   the rest of the portal moved to Nexa. Found on 4 Sep when the Google
	   Fonts links came out and the claim "no third-party font host" turned
	   out not to be true yet. */
	--acd-font: var(--font-sans);
	--cel-navy: var(--c-regal-navy);
	--cel-blue: var(--c-blue-bell);
	--cel-blue-press: var(--c-blue-aa-hover);
	--cel-fuchsia: var(--c-fuchsia-plum);
	--cel-ink-900: var(--c-ink-900);
	--cel-ink: var(--c-ink-700);
	--cel-meta: var(--fg-3); /* corrected: mist-400 was 3.04:1 as text */
	--cel-mist-300: var(--c-mist-300);
	--cel-line: var(--c-mist-200);
	--cel-line-soft: var(--c-mist-100);
	--cel-paper: var(--c-paper);
	--cel-hover: var(--c-mist-100);
	--cel-white: var(--c-white);
	--cel-gradient-blue-fuchsia: var(--gradient-blue-fuchsia);
	--cel-gradient-navy-blue: var(--gradient-navy-blue);
	--cel-radius-sm: var(--radius-sm);
	--cel-radius-md: var(--radius-md);
	--cel-radius-lg: var(--radius-lg);
	--cel-radius-pill: var(--radius-pill);
	--cel-shadow-xs: var(--shadow-xs);
	--cel-shadow-sm: var(--shadow-sm);
	--cel-shadow-md: var(--shadow-md);
	--cel-glow-blue: var(--shadow-glow-blue);
	--cel-ease: var(--ease-out);
	--cel-fast: var(--duration-fast);
	--cel-tracking-caps: var(--tracking-caps);
	--cel-tracking-tight: var(--tracking-tight-2);
}


/* ==========================================================================
   2. BASE
   ========================================================================== */

body.cel-theme {
	font-family: var(--font-sans);
	font-size: var(--fs-body);
	line-height: var(--lh-body);
	font-weight: var(--fw-book);
	color: var(--fg-2);
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}

/* main stays white on purpose. The comp puts login content on Paper, but
   screens 03-08 are still legacy-styled and expect a white content area, so
   the Paper band is painted by the login containers themselves rather than
   by main. Move it here when the last screen is migrated. */


/* ==========================================================================
   3. FOCUS VISIBILITY
   --------------------------------------------------------------------------
   The comp shows no focus states anywhere. The portal is a logged-in
   application, so this would be the single worst regression in the restyle.
   Handled first, globally, before any component.

   :focus-visible rather than :focus, so mouse users do not see rings on
   click but keyboard and assistive-tech users always do. The ring colour is
   --focus-ring (4.57:1 on white, 4.34:1 on Paper) and flips to white on the
   navy hero and footer, where the blue would be 2.44:1.
   ========================================================================== */

body.cel-theme a:focus-visible,
body.cel-theme button:focus-visible,
body.cel-theme input:focus-visible,
body.cel-theme select:focus-visible,
body.cel-theme textarea:focus-visible,
body.cel-theme summary:focus-visible,
body.cel-theme [tabindex]:focus-visible {
	outline: var(--focus-ring-width) solid var(--focus-ring);
	outline-offset: var(--focus-ring-offset);
}

body.cel-theme footer a:focus-visible,
body.cel-theme .generic-banner a:focus-visible {
	outline-color: var(--focus-ring-on-dark);
}

/* Skip-link-free page, so make sure nothing suppresses the ring later. */
body.cel-theme *:focus-visible {
	outline-style: solid;
}

/* ---------------------------------------------------------------------------
   REDUCED MOTION - narrowed 4 September 2026, and this was a real bug.

   This block used to be the copy-paste "reduced motion reset": every
   transition and animation on every element forced to 0.01ms !important. It
   is a widely-circulated snippet and it is disproportionate.

   WHAT IT ACTUALLY DID. Anton has reduced motion enabled in Windows, so for
   him it silently killed EVERY animation in the portal - the nav underline,
   the sparkle spin, the search expand, every colour fade - and it did so
   invisibly, because the CSS was otherwise correct. Several rounds of "the
   hover is not working" were this rule, not the rules being debugged.
   Diagnosed from a console dump: transitionProperty was 'background-size,
   color' as intended, transitionDuration was 1e-05s.

   WHAT THE PREFERENCE IS ACTUALLY FOR. prefers-reduced-motion exists for
   vestibular disorders - spinning, sliding, zooming, parallax, large
   translation. A colour fade is not that. A 2px rule being drawn is not
   that. Suppressing them buys no accessibility benefit and makes the whole
   interface feel dead.

   SO: keyframe animation is cancelled outright, because the two in this
   sheet are rotation and scale. Motion-bearing TRANSITIONS are made instant
   individually, by name. Colour, border, shadow and opacity transitions are
   deliberately left alone.
   -------------------------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {

	/* The sparkle spin, and the legacy infinite Ask Celebrus pulse in
	   stylesheet.css. Rotation and scale - exactly what the preference is
	   for. Cancelled, not shortened. */
	body.cel-theme *,
	body.cel-theme *::before,
	body.cel-theme *::after {
		animation: none !important;
	}

	/* The underline is drawn immediately at full width instead of growing.
	   The colour change is kept, so the hover is still unmistakable - it just
	   does not travel. */
	body.cel-theme header .header-buttons > a,
	body.cel-theme header .header-ask-celebrus,
	body.cel-theme nav .nav-item > a {
		transition: color var(--duration-base) var(--ease-out);
	}

	/* The search field appears at full width rather than sliding open. */
	body.cel-theme header .header-search-collapsible .search-widget {
		transition: none;
	}

	/* Everything else keeps its transition. They are colour, border-colour
	   and box-shadow - no motion in any of them. */
}


/* ==========================================================================
   4. HEADER
   --------------------------------------------------------------------------
   Comp: PortalHeaderApp.dc.html. 72px, white, one hairline underneath, and
   left to right - logo, pill search, spacer, uppercase ghost pills, the Ask
   Celebrus CTA, then a divider and the account block.

   The legacy header is a six-column CSS grid with hardcoded 230px and 270px
   tracks. That is what the comp draws as a flex row, and flex is what lets
   the pills wrap sensibly on the way down to 375px, so it is replaced rather
   than re-tracked. The legacy grid-template-columns rules at max-width 1279
   and 767 become inert once display is flex.
   ========================================================================== */

body.cel-theme header {
	display: flex;
	align-items: center;
	gap: var(--space-5);
	min-height: var(--header-h);
	padding: 0 var(--space-6);
	background: var(--bg-1);
	/* No hairline here on purpose. celebrus.com is one white header block;
	   the portal renders Header and TopNavigation as two partials from
	   Master.cshtml, so the border under the nav becomes the only rule and
	   the two bars read as a single unit. Merging them for real means moving
	   a partial, which is a Razor change and has not been made. */
	border-bottom: 0;
}

/* ---- Source order vs visual order -----------------------------------------
   Header.cshtml emits: logo, search, spacer, pills, Ask Celebrus AI, account.
   celebrus.com puts the search LAST of the tools, and Anton asked for it
   after Ask Celebrus AI and before the user block. Reordered with flex
   `order` rather than by moving markup, so this stays a CSS-only change.

   Note this makes DOM order and visual order disagree, which matters for
   keyboard users: Tab will reach the search field before the pills. That is
   accepted rather than ignored - the search input opens itself on focus (see
   initHeaderSearch in script.js), so a keyboard user tabbing into it sees it
   expand rather than landing on something invisible. The real fix is to
   reorder the markup, which is a one-line Razor move.
   -------------------------------------------------------------------------- */

body.cel-theme header .header-logo {
	flex: none;
	order: 1;
}

body.cel-theme header .header-mid-spacer {
	order: 2;
}

body.cel-theme header .header-buttons {
	order: 3;
}

body.cel-theme header .header-ask-celebrus-slot {
	order: 4;
}

body.cel-theme header .header-search {
	order: 5;
}

body.cel-theme header .header-account {
	order: 6;
}

body.cel-theme header .header-logo img {
	display: block;
	width: 142px;
	height: auto;
}

body.cel-theme header .header-mid-spacer {
	flex: 1 1 auto;
}

/* ---- Header search ---------------------------------------------------- */

/* ---- Header search: collapse to an icon, expand on click ------------------
   celebrus.com shows a magnifier and swaps in a full field when it is
   clicked, with an X to close. Reproduced here, with the state driven by
   .search-open on .header-search - see initHeaderSearch in script.js.

   THE OPT-IN IS THE IMPORTANT PART. Nothing collapses unless
   .header-search-collapsible is present, and that class is added by the
   script AFTER it has confirmed the field and the input both exist. So if
   the script fails to load or throws, the search simply stays open - its
   pre-redesign behaviour - and can never be left hidden with no way to
   reveal it. A CSS-first collapse would have had the opposite failure mode.

   The field is collapsed with width:0 and overflow:hidden, NOT with
   display:none or visibility:hidden, so the input stays in the accessibility
   tree and stays reachable by Tab. The script opens the field on focus, so
   tabbing to it reveals it.
   -------------------------------------------------------------------------- */

body.cel-theme header .header-search {
	flex: none;
	display: flex;
	align-items: center;
	gap: var(--space-2);
	width: var(--search-w);
}

/* Only once the script has vouched for the markup. */
body.cel-theme header .header-search.header-search-collapsible {
	width: auto;
}

/* Bare glyphs, no chrome. celebrus.com's collapsed search is a plain
   magnifier and its close is a plain X - no ring, no fill. */
body.cel-theme header .header-search-toggle,
body.cel-theme header .header-search-close {
	flex: none;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 32px;
	height: 32px;
	padding: 0;
	border: 0;
	background: none;
	color: var(--c-regal-navy); /* 11.16:1 on white */
	font-size: var(--fs-body);
	cursor: pointer;
	transition: color var(--duration-fast) var(--ease-out);
}

body.cel-theme header .header-search-toggle:hover,
body.cel-theme header .header-search-close:hover {
	color: var(--c-blue-aa);
}

/* The toggle disappears while the field is open - the field's own magnifier
   is the submit control at that point, exactly as it always was. */
body.cel-theme header .header-search.search-open .header-search-toggle {
	display: none;
}

/* The close button only exists while there is something to close. */
body.cel-theme header .header-search-close {
	display: none;
	border-color: transparent;
}

body.cel-theme header .header-search.search-open .header-search-close {
	display: inline-flex;
}

body.cel-theme header .header-search-collapsible .search-widget {
	width: 0;
	overflow: hidden;
	transition: width var(--duration-slow) var(--ease-out);
}

body.cel-theme header .header-search-collapsible.search-open .search-widget {
	width: var(--search-w);
	overflow: visible;
}

body.cel-theme .search-widget .search-field {
	position: relative;
}

body.cel-theme .search-widget .search-field input[type=text] {
	width: 100%;
	height: 38px;
	padding: 0 38px 0 14px;
	background: var(--bg-2);
	border: var(--border-w-1) solid var(--border-control);
	border-radius: var(--radius-pill);
	font-family: var(--font-sans);
	font-size: var(--fs-small);
	font-weight: var(--fw-book);
	color: var(--fg-1);
	outline: none;
}

body.cel-theme .search-widget .search-field input[type=text]::placeholder {
	color: var(--fg-3);
	opacity: 1;
}

body.cel-theme .search-widget .search-field input[type=text]:focus-visible {
	border-color: var(--c-blue-aa);
	box-shadow: var(--shadow-glow-blue);
	outline: var(--focus-ring-width) solid var(--focus-ring);
	outline-offset: var(--focus-ring-offset);
}

/* Once the field is open, celebrus.com puts a filled blue circle NEXT TO the
   input as the submit control, not an icon inside it. The markup already has
   the <a> as a sibling of the input, so making .search-field a flex row is
   enough - no markup change.

   THE FILL IS THE SAME TOKEN AS EVERY OTHER BUTTON. Changed 4 Sep: it was on
   --c-blue-aa, which made it visibly darker than the Continue / Sign in /
   Sign up pills sitting on --c-cta-bg. Two blues for "the button colour" is
   the kind of inconsistency this whole pass exists to remove, and live draws
   this disc in the bright brand blue too. One token now governs every filled
   button in the portal - change --c-cta-bg and they all move together.

   THIS EXTENDS THE ACCEPTED EXCEPTION, and not on identical grounds - see
   AE-2 in upgrade\REDESIGN-BREAKPOINTS-AND-CONTRAST.md. AE-1 covers white
   TEXT on the brand blue at 2.97:1 and is argued partly on the pill being
   large and carrying a word. This control carries no word: its only visible
   affordance is a white magnifier glyph, so WCAG 1.4.11 asks 3:1 of the
   glyph itself and 2.97 misses it. Recorded rather than absorbed silently.

   Hover darkens to --c-cta-bg-hover, which measures 4.57:1 and conforms -
   same behaviour as the primary pill. */
body.cel-theme header .search-widget .search-field {
	display: flex;
	align-items: center;
	gap: var(--space-2);
}

body.cel-theme header .search-widget .search-field > a {
	position: static;
	transform: none;
	flex: none;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 38px;
	height: 38px;
	border-radius: var(--radius-pill);
	background: var(--c-cta-bg); /* same token as every other button */
	color: var(--fg-inverse); /* 2.97:1 - see AE-2 in the contrast doc */
	font-size: var(--fs-small);
	text-decoration: none;
	transition: background var(--duration-fast) var(--ease-out);
}

body.cel-theme header .search-widget .search-field > a:hover {
	background: var(--c-cta-bg-hover); /* white on it = 4.57:1  AA PASS */
	color: var(--fg-inverse);
}

/* Outside the header - the search results page - it stays an inline icon. */
body.cel-theme .search-widget .search-field > a {
	color: var(--c-navy-80);
	text-decoration: none;
	transition: color var(--duration-fast) var(--ease-out);
}

/* ---- Header links ---------------------------------------------------------
   NO PILLS. Revised 3 Sep: Anton asked for the whole top row to read as text
   links hovering like "Industries" on celebrus.com, not as bordered pills.
   The comp drew them as pills; live does not, and live wins.

   The hover is the same two-signal pattern as the nav bar below: the label
   goes blue AND a blue-to-magenta gradient bar appears underneath. Never the
   gradient alone, so the state does not depend on colour perception.
   -------------------------------------------------------------------------- */

body.cel-theme header .header-buttons {
	flex: none;
	display: flex;
	align-items: center;
	gap: var(--space-6);
	justify-content: flex-end;
}

/* ---------------------------------------------------------------------------
   ONE DEFINITION OF A TOP-ROW ITEM. Consolidated 4 Sep.

   The three links and the Ask Celebrus AI button are the same thing visually,
   so every property that makes them the same lives HERE - box metrics,
   typography, colour and the underline together. Only genuine differences
   stay in the individual rules below.

   WHY: the two had drifted. The links carried `padding: 0 0 4px` to reserve
   room for the rule; the button carried `padding: 0`. Same 34px box, but the
   link's text centred in 30px and the button's in 34px, so the button's
   baseline sat about 2px low and it did not read as part of the set. That is
   the third time a shared treatment has drifted because it was declared in
   two places (border-radius, then transition, now padding). Declaring it
   once is the only fix that stays fixed.

   border-radius: 0 has to be explicit and has to be here: a background image
   is clipped by the border box, so any radius rounds the ends of the rule,
   and the legacy sheet still sets 6px on the links from the old pill
   (stylesheet.css:468).

   The underline technique itself is from "Nav Hover Underline.dc.html" - see
   the note in section 5 for why it is a background-image rather than a
   pseudo-element.
   -------------------------------------------------------------------------- */

body.cel-theme header .header-buttons > a,
body.cel-theme header .header-ask-celebrus {
	position: relative;
	display: inline-flex;
	align-items: center;
	height: 34px;
	/* the 4px is the rule's lane - both items must reserve it or their
	   baselines part company */
	padding: 0 0 4px;
	border: 0;
	border-radius: 0;
	/* background-COLOR, never the `background` shorthand: the shorthand
	   resets background-image, which is where the underline lives. */
	background-color: transparent;
	background-image: var(--nav-underline);
	background-repeat: no-repeat;
	background-position: left bottom;
	background-size: 0% var(--border-w-2);
	color: var(--c-regal-navy); /* 11.16:1 on white */
	font-family: var(--font-sans);
	font-size: 11px;
	font-weight: var(--fw-bold);
	letter-spacing: var(--tracking-caps);
	line-height: 1;
	text-decoration: none;
	white-space: nowrap;
	transition: background-size var(--duration-slow) var(--ease-out),
	            color var(--duration-base) var(--ease-out);
}

/* Nothing of its own - see the shared rule above. Kept only as the anchor
   for the sibling-margin reset below. */

body.cel-theme header .header-buttons > a + a {
	margin-left: 0; /* the flex gap owns the spacing now */
}

body.cel-theme header .header-buttons > a:hover,
body.cel-theme header .header-buttons > a:focus-visible,
body.cel-theme header .header-buttons > a.active {
	background-size: 100% var(--border-w-2);
	color: var(--c-blue-aa);
}

body.cel-theme header .header-ask-celebrus-slot {
	flex: none;
	display: flex;
	align-items: center;
}

/* ---- Account block ---------------------------------------------------- */

body.cel-theme header .header-account {
	flex: none;
	padding-left: var(--space-5);
	border-left: var(--border-w-1) solid var(--c-mist-100);
}

/* The comp stacks the name over the company with the control to the right.
   The markup is three flat sibling spans with no wrapper, so a 2x2 grid does
   the stacking without a Razor edit: name top-left, company bottom-left,
   logout spanning both rows on the right.

   Two comp details are NOT reachable from CSS and are logged rather than
   faked. Both are one-line Razor changes when someone is in Header.cshtml:
     - the gradient avatar disc with the user's initials. There is no element
       to hang it on. --gradient-avatar is waiting in the token file.
     - the literal "User:" and "Company:" label text, which the comp drops.
       They are text nodes, and CSS cannot remove a text node. */
body.cel-theme header .header-account .account-items {
	display: grid;
	grid-template-columns: 1fr auto;
	grid-template-rows: auto auto;
	column-gap: var(--space-3);
	align-items: center;
	font-size: var(--fs-caption);
	line-height: var(--lh-caption);
}

body.cel-theme header .account-items > span {
	display: block;
	margin-right: 0;
	white-space: nowrap;
}

body.cel-theme header .account-items > span.account-name {
	grid-area: 1 / 1 / 2 / 2;
	font-size: 13px;
	font-weight: var(--fw-bold);
	color: var(--c-regal-navy);
}

body.cel-theme header .account-items > span.account-name > a,
body.cel-theme header .account-items > span.account-name > a:hover {
	color: var(--c-regal-navy);
	font-weight: var(--fw-bold);
	text-decoration: none;
}

body.cel-theme header .account-items > span.account-name > a:hover {
	color: var(--c-blue-aa);
	text-decoration: underline;
}

body.cel-theme header .account-items > span.account-company {
	grid-area: 2 / 1 / 3 / 2;
	font-size: 11px;
	font-weight: var(--fw-book);
	color: var(--fg-3);
}

body.cel-theme header .account-items > span.account-logout {
	grid-area: 1 / 2 / 3 / 3;
	margin-right: 0;
}

/* Flat too. It was a bordered disc; "no pills in the top row" applies to it
   as much as to the links, and the search magnifier next to it is now a bare
   glyph, so a ring here would have been the only one left. */
body.cel-theme header .account-items .account-logout a,
body.cel-theme header .account-items .account-login a {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 32px;
	height: 32px;
	border: 0;
	background: none;
	color: var(--c-regal-navy); /* 11.16:1 on white */
	font-size: var(--fs-body);
	text-decoration: none;
	transition: color var(--duration-fast) var(--ease-out);
}

body.cel-theme header .account-items .account-logout a:hover,
body.cel-theme header .account-items .account-login a:hover {
	color: var(--c-blue-aa);
}

/* ---- Header responsive ------------------------------------------------
   Derived, not designed - the comp is a fixed 1440px frame. Order of what
   goes first is by function, not by width: search and identity are why a
   logged-in user is here, so they survive longest; the promotional pills go
   first. Everything stays reachable, nothing is display:none'd without an
   alternative route to it, because the pills also exist in the footer or in
   the nav on every one of these screens.
   ---------------------------------------------------------------------- */

@media (max-width: 1199.98px) {
	body.cel-theme header {
		gap: var(--space-4);
		padding: 0 var(--space-4);
	}

	/* Support tickets / feedback / partner opportunity. Reachable from the
	   nav and the footer at these widths. */
	body.cel-theme header .header-buttons {
		display: none;
	}

	body.cel-theme header .header-mid-spacer {
		display: block;
	}
}

@media (max-width: 991.98px) {
	body.cel-theme header .header-search {
		width: 240px;
	}

	body.cel-theme header .header-ask-celebrus-slot {
		display: none;
	}
}

@media (max-width: 767.98px) {
	body.cel-theme header {
		flex-wrap: wrap;
		row-gap: var(--space-3);
		padding: var(--space-3) var(--space-4);
	}

	body.cel-theme header .header-logo img {
		width: 120px;
	}

	/* Company name and the stacked layout cost more than they are worth at
	   this width; the logout control must not disappear, so the grid
	   collapses to one row instead of the account block being hidden as the
	   legacy sheet did. */
	body.cel-theme header .header-account {
		padding-left: var(--space-4);
	}

	body.cel-theme header .header-account .account-items {
		grid-template-columns: auto auto;
		grid-template-rows: auto;
	}

	body.cel-theme header .account-items > span.account-name {
		grid-area: 1 / 1 / 2 / 2;
	}

	body.cel-theme header .account-items > span.account-company {
		display: none;
	}

	body.cel-theme header .account-items > span.account-logout {
		grid-area: 1 / 2 / 2 / 3;
	}

	/* Order 7 puts it AFTER the account block (6), so with flex-wrap on it
	   takes the whole second row. It was 3 before the desktop reorder above
	   existed, which would now push the account block onto row two instead. */
	body.cel-theme header .header-search {
		order: 7;
		width: 100%;
	}

	body.cel-theme header .header-search.header-search-collapsible {
		width: 100%;
	}

	/* At this width the field is worth more than the tap-to-open flourish. */
	body.cel-theme header .header-search-collapsible .search-widget,
	body.cel-theme header .header-search-collapsible.search-open .search-widget {
		width: 100%;
		overflow: visible;
	}

	body.cel-theme header .header-search-toggle {
		display: none;
	}

	body.cel-theme header .header-search.search-open .header-search-close {
		display: none;
	}
}

@media (max-width: 575.98px) {
	body.cel-theme header .account-items > span.account-name {
		max-width: 34vw;
		overflow: hidden;
		text-overflow: ellipsis;
	}
}


/* ==========================================================================
   4b. ASK CELEBRUS AI
   --------------------------------------------------------------------------
   The button already existed and already had a sparkle. AskCelebrusDrawer.cshtml
   renders <span class="acd-spark">&#10022;</span> and stylesheet.css already
   animated it. Three things were wrong with it rather than missing:

   1. OFF BRAND. The fill was #1b9dd9 - close to the Celebrus blue but not it -
      on --acd-font: 'Source Sans Pro'. Both are corrected here, and the font
      comes across free because section 1 repoints the legacy variables.
   2. THE HOVER MADE CONTRAST WORSE. White on #1b9dd9 is 3.06:1, and the
      pulse animation brightened the fill to #37b6ec mid-cycle, which is
      2.32:1 - so the button was least legible exactly when the pointer was
      on it. The hover now DARKENS instead.
   3. IT LOOPED FOREVER. An infinite pulsing glow on a header control reads
      as an unread-notification badge. It now plays once and settles.

   ON THE COLOUR: there isn't one. Revised again on 3 Sep - the pill is gone.
   Anton asked for no pills anywhere in the top row, Ask Celebrus AI
   included, leaving just the animated sparkle. That happens to dissolve the
   AE-2 question entirely: with no fill there is no white-on-blue to measure,
   so the label simply inherits the same navy as its neighbours at 11.16:1.
   The accessibility problem in the old button was never really the blue -
   it was that the hover BRIGHTENED a fill that was already too light.
   ========================================================================== */

/* Only what is genuinely different from a link. Everything shared - the box,
   the type, the colour, the underline, the transition - comes from the rule
   in section 4. Do not re-declare any of it here; that is what put the two
   out of alignment in the first place.

   The label stays Title Case, unlike the uppercase links. That is what the
   comp draws, and with the sparkle it is what marks this out as the AI
   entry point rather than one more nav item. One line if you want caps:
   text-transform: uppercase. */
body.cel-theme .header-ask-celebrus {
	gap: var(--space-2); /* space for the sparkle */
	overflow: visible; /* the sparkle scales past the box on hover */
	cursor: pointer; /* it is a <button>, not an <a> */
}

/* ---- The sparkle ----------------------------------------------------------
   This is the only thing left carrying the "AI" idea now the fill has gone,
   so it is always visible rather than only on hover, and it is the one place
   in the header allowed a bit of colour.

   Solid --c-blue-link at rest (6.45:1) and the fingerprint gradient on
   hover. The gradient is decorative and transient: the words "Ask Celebrus
   AI" carry the whole meaning, so nothing is lost if a user cannot resolve
   it. Doing it the other way round - gradient at rest - would have put a
   2.97:1 blue lobe on screen permanently for no informational gain.
   -------------------------------------------------------------------------- */

body.cel-theme .header-ask-celebrus .acd-spark {
	display: inline-block;
	font-size: 1.15em;
	line-height: 1;
	color: var(--c-blue-link);
	transform-origin: 50% 50%;
}

/* ---- Hover: the Industries treatment, plus the sparkle spins ---------- */

body.cel-theme .header-ask-celebrus:hover,
body.cel-theme .header-ask-celebrus:focus-visible {
	background-color: transparent;
	box-shadow: none;
	color: var(--c-blue-aa);
	animation: none; /* kills the legacy infinite acd-launcher-pulse */
}

body.cel-theme .header-ask-celebrus:hover,
body.cel-theme .header-ask-celebrus:focus-visible {
	background-size: 100% var(--border-w-2);
}

body.cel-theme .header-ask-celebrus:hover .acd-spark,
body.cel-theme .header-ask-celebrus:focus-visible .acd-spark {
	animation: cel-ai-spark 600ms var(--ease-out) 1 forwards;
	background: var(--gradient-fingerprint);
	-webkit-background-clip: text;
	background-clip: text;
	color: transparent;
}

@keyframes cel-ai-spark {
	0% {
		transform: rotate(0deg) scale(1);
	}

	60% {
		transform: rotate(120deg) scale(1.35);
	}

	100% {
		transform: rotate(180deg) scale(1.15);
	}
}

/* The global prefers-reduced-motion rule in section 3 collapses the spin to
   0.01ms, so the hover still recolours and underlines - it just does not
   move. The legacy sheet has its own reduced-motion block for the old pulse;
   both are satisfied. */

/* ---- Documentation by role ------------------------------------------------
   Added 6 Oct 2026. Reached through mode="roles"; the markup is in
   CelebrusSection.cshtml.

   Every role's panel is rendered server side and shown or hidden with a class,
   rather than fetched per click. The whole by-role file is about 100 documents,
   so one payload beats a round trip each time someone tries a different role,
   and switching stays instant.

   The columns reuse the multi-column idea from the card grid above, but as a
   plain grid: a role has at most three columns and they are known up front, so
   there is nothing to balance and grid keeps them equal width.
   -------------------------------------------------------------------------- */

body.cel-theme .role-intro {
	max-width: 70ch;
	margin: 0 0 var(--space-6);
	color: var(--fg-3);
}

body.cel-theme .role-browser {
	display: grid;
	grid-template-columns: minmax(200px, 260px) 1fr;
	gap: var(--space-6);
	align-items: start;
}

body.cel-theme .role-list {
	/* !important, and the ::before/::marker resets below, because a legacy sheet
	   styles bare li elements globally. celebrus-section.css already does exactly
	   this for the section nav; the plain list-style:none here was not winning. */
	list-style: none !important;
	margin: 0;
	padding: 0;
	border: var(--border-w-1) solid var(--border-1);
	border-radius: var(--radius-panel);
	overflow: hidden;
	background: var(--surface-panel);
}

body.cel-theme .role-list li {
	list-style: none !important;
	padding: 0;
	background: none !important;
}

body.cel-theme .role-list li::before,
body.cel-theme .role-list li::marker {
	content: none !important;
	display: none !important;
}

body.cel-theme .role-list li + li {
	border-top: var(--border-w-1) solid var(--border-1);
}

body.cel-theme .role-tab {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: var(--space-2);
	width: 100%;
	padding: var(--space-4) var(--space-5);
	border: 0;
	/* The selected state is carried by BOTH the fill and the left bar, never by
	   colour alone - 1.4.1. The bar also survives forced-colours mode, where a
	   background fill can be dropped. */
	border-left: var(--border-w-3, 3px) solid transparent;
	background: none;
	font: inherit;
	font-weight: var(--fw-bold);
	color: var(--fg-1);
	text-align: left;
	cursor: pointer;
}

body.cel-theme .role-tab:hover {
	background: var(--surface-hover, rgba(0, 0, 0, .03));
}

body.cel-theme .role-tab.is-current {
	border-left-color: var(--c-fuchsia-plum);
	background: var(--c-blue-aa);
	color: var(--fg-inverse);
}

body.cel-theme .role-panel {
	display: none;
}

body.cel-theme .role-panel.is-current {
	display: block;
}

body.cel-theme .role-panel-head {
	display: flex;
	align-items: baseline;
	gap: var(--space-3);
	margin: 0 0 var(--space-5);
}

body.cel-theme .role-panel-icon {
	color: var(--c-blue-aa);
}

body.cel-theme .role-panel-name {
	font-size: var(--fs-h3, 22px);
	font-weight: var(--fw-bold);
	color: var(--fg-1);
}

body.cel-theme .role-panel-count {
	font-weight: var(--fw-normal, 400);
	color: var(--fg-3);
}

/* MULTICOL, NOT GRID. These cards vary a lot in height (one role has a
   1-document column next to an 8-document one), and at widths where only two
   tracks fit, a grid wraps the third card to a NEW ROW - which starts below
   the tallest card of the row above, leaving a large void under the short
   card. Grid has no masonry packing yet; CSS multicol does exactly that:
   cards flow down each column and pack with no voids. Same 260px column
   sizing as the old grid, so wide screens still get three across. */
body.cel-theme .role-columns {
	columns: 260px;
	column-gap: var(--space-5);
}

body.cel-theme .role-column {
	break-inside: avoid; /* a card must never split across columns */
	margin-bottom: var(--space-5); /* vertical spacing; column-gap only covers horizontal */
	overflow: hidden; /* so the header block's corners follow the card's radius */
	padding: var(--space-5);
	background: var(--surface-panel);
	border: var(--border-w-1) solid var(--border-1);
	border-radius: var(--radius-panel);
}

/* The header is a TINTED BLOCK rather than a hairline, matching the Celebrus
   dashboard: icon, title, count, on a soft wash of the column's own colour.

   The colour is a VARIANT CLASS off the column title's slug, not an inline
   style, so the palette stays with the theme. A title with no rule falls back
   to the neutral block below - a new column type renders correctly, it just is
   not colour-coded until someone adds four lines here.

   Colour is never the only signal: the title is spelled out, the icon differs
   per column, and the count is a number. Someone who cannot distinguish the
   three washes loses nothing. */

body.cel-theme .role-column-head {
	display: flex;
	align-items: center;
	gap: var(--space-3);
	margin: calc(var(--space-5) * -1) calc(var(--space-5) * -1) var(--space-4);
	padding: var(--space-3) var(--space-4);
	border-radius: var(--radius-panel) var(--radius-panel) 0 0;
	/* Neutral default. The variants below only override the two custom
	   properties, so everything else here is stated once. */
	--role-col-wash: var(--c-grey-light, #E8EBF0);
	--role-col-ink: var(--fg-1);
	background: var(--role-col-wash);
	color: var(--role-col-ink);
	font-weight: var(--fw-bold);
}

body.cel-theme .role-column-head--quick-start-guides {
	--role-col-wash: #E3F1FA;
	--role-col-ink: #00618A; /* 6.83:1 on the wash */
}

body.cel-theme .role-column-head--playbooks {
	--role-col-wash: #E2F1EC;
	--role-col-ink: #1C6B52; /* 5.9:1 on the wash */
}

body.cel-theme .role-column-head--user-guides-and-references {
	--role-col-wash: #FCEDE2;
	--role-col-ink: #9A4A10; /* 5.6:1 on the wash */
}

body.cel-theme .role-column-icon {
	flex: 0 0 auto;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 28px;
	height: 28px;
	border-radius: 50%;
	background: var(--role-col-ink);
	color: var(--c-white);
	font-size: 13px;
}

body.cel-theme .role-column-title {
	flex: 1 1 auto;
	min-width: 0;
}

body.cel-theme .role-column-count {
	flex: 0 0 auto;
	min-width: 1.6em;
	padding: 0 var(--space-2);
	border-radius: var(--radius-pill);
	background: var(--role-col-ink);
	color: var(--fg-inverse);
	font-size: 12px;
	line-height: 20px;
	text-align: center;
}

body.cel-theme .role-doc {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: var(--space-3);
	padding: var(--space-2) 0;
}

body.cel-theme .role-doc + .role-doc {
	border-top: var(--border-w-1) solid var(--border-1);
}

body.cel-theme .role-doc-plain {
	color: var(--fg-3);
}

body.cel-theme .role-doc-pdf {
	flex: 0 0 auto;
	font-size: 11px;
	font-weight: var(--fw-bold);
	letter-spacing: var(--tracking-caps);
	color: var(--fg-accent);
}

@media (max-width: 767.98px) {
	body.cel-theme .role-browser {
		grid-template-columns: 1fr;
	}
}

/* ---- Section-nav icons ----------------------------------------------------
   Added 5 Oct 2026. The class string comes from "SectionIcons" in the layout
   JSON, so adding a section does not need a code change - see LayoutProvider.

   DECORATIVE ONLY. Every icon sits beside its own text label and carries
   aria-hidden="true" in the markup, so a screen reader announces the section
   once rather than twice. Nothing here may become the only indicator of
   anything: a section whose name is missing from SectionIcons renders with no
   icon at all, and must still read correctly.

   The link becomes a flex row so the icon and label align on their centres and
   a wrapping label indents under itself rather than under the icon. The icon
   gets a fixed width so labels line up whether or not their section has one -
   without it, Learning Paths and Playbooks would start at different x
   positions purely because one had an icon.
   -------------------------------------------------------------------------- */

/* REVISED the same day. The first pass made the link a flex row with the icon
   as a sibling of the label, and "User guides and references" immediately
   wrapped onto two lines in the sidebar.

   The cause was not the font size. .cdp-section-link already carries
   padding: 6px 10px 6px 28px from celebrus-section.css - a 28px indent that
   has always been there to sit the labels in from the section heading. Adding
   a flex icon spent the icon's width AND the gap ON TOP of that indent, so
   every label lost about 28px of the little width a sidebar has.

   So the icon goes INSIDE the existing indent instead of beside it: absolutely
   positioned into the space the padding already reserved. Net horizontal cost
   to the label is zero, and wrapping goes back to exactly what it was before
   icons existed.

   It also fixes two things the flex version got wrong. Labels now line up
   whether or not their section has an icon, because the indent is on the link
   rather than contributed by the icon - nothing jumps left when an entry is
   missing from SectionIcons. And top, not centre: with align-items: center a
   two-line label dragged the icon down to its vertical middle, which is what
   made it look detached from the first line. */

body.cel-theme .cdp-section-link {
	position: relative;
}

body.cel-theme .cdp-section-icon {
	position: absolute;
	/* 10px matches the link's own padding-left in the non-indented case, so the
	   icon sits in the same optical gutter the chevrons use elsewhere. */
	left: 10px;
	/* Equal to the link's padding-top, and line-height is inherited, so the
	   icon's line box overlays the FIRST line of the label exactly - including
	   when the label wraps. */
	top: 6px;
	line-height: inherit;
	width: 1em;
	text-align: center;
	/* Dimmer than the label: the icon is orientation, not content. Inherits
	   the link's colour on hover and when current, so it never looks detached
	   from its own label. */
	opacity: .75;
}

body.cel-theme .cdp-section-link:hover .cdp-section-icon,
body.cel-theme .cdp-section-link:focus-visible .cdp-section-icon {
	opacity: 1;
}

/* ---- The header launcher: BACK TO A FILLED PILL, IN BLUE ------------------
   Anton's call, 24 Sep 2026, to match the minimised chip.

   THIS REVERSES THE DE-FILL ABOVE, deliberately. The launcher had been
   stripped to a text link wearing the Industries underline, which is why the
   sparkle was given a permanent colour - it was the only thing left carrying
   the "AI" idea once the fill had gone. With the fill back the sparkle turns
   white, and the underline mechanism has to go: that hover is drawn as
   background-size on a background-image, and a background fill and a
   background-image underline cannot occupy the same element.

   NOT GROUPED WITH .ask-celebrus-restore, and that is not an oversight - the
   block below records what happened on 4 Sep when they were grouped. They
   share the sparkle markup and nothing else: one sits inline in the header
   row, the other is position:fixed over the footer.

   THE COLOUR, and why the chip's pink could not simply be swapped for the
   brand blue:
     The chip's pink is 4.15:1 against white and conforms ONLY because its
     label is 19px/700, which WCAG counts as large text. This button inherits
     11px/700 from the header-button rule above - small, normal-sized text by
     the 18.66px rule - so it needs the full 4.5:1. That rules out
     --c-blue-bell #009FE3, the Celebrus wordmark blue and the obvious guess,
     which is about 2.5:1 with white.

     rest   --c-blue-link   #00658F   white on it =  6.45:1
     hover  --c-regal-navy  #1A3B6B   white on it = 11.16:1

     --c-blue-aa #007DB4 was the first choice for the rest state at 4.57:1.
     It conforms, but with almost no margin at 11px, so the darker blue won.
     That then left no usefully darker blue for the hover: --c-blue-aa-hover
     #00618A is four hex digits from #00658F and would not read as a state
     change at all. Dropping to the brand navy gives a hover you can actually
     see, and it is still a darkening within the same hue family, which is
     what the chip does with its two pinks.

   GEOMETRY has to be restated here. The header-button rule above sets
   padding: 0 0 4px and border-radius: 0, because it is shaping a nav link
   with an underline lane beneath it. Inherit that and the fill hugs the
   text with no pill around it and the label sits 4px high in its own box.

   DISABLED returns to the text treatment rather than fading the pill. The
   legacy rule is opacity: 0.5, which on a filled pill washes a white label
   out against a white header and leaves it barely readable. Disabled
   controls are exempt from 1.4.3 so that is not a failure, but it looks
   broken. An unfilled, muted label reads as "not available" and stays
   legible - and it is what the button looked like before this change.
   -------------------------------------------------------------------------- */

body.cel-theme .header-ask-celebrus:not(:disabled) {
	padding: 0 var(--space-4);
	border-radius: var(--radius-pill);
	/* background-COLOR plus an explicit image reset, not the `background`
	   shorthand - same discipline as the rule above, just aimed the other
	   way: there the shorthand would have wiped the underline, here the
	   underline is what has to go. */
	background-color: var(--c-blue-link);
	background-image: none;
	background-size: auto;
	color: var(--fg-inverse);
	box-shadow: var(--shadow-sm);
}

body.cel-theme .header-ask-celebrus:not(:disabled) .acd-spark {
	color: var(--fg-inverse);
}

body.cel-theme .header-ask-celebrus:not(:disabled):hover,
body.cel-theme .header-ask-celebrus:not(:disabled):focus-visible {
	background-color: var(--c-regal-navy);
	background-image: none;
	background-size: auto; /* undoes the underline growth to 100% */
	color: var(--fg-inverse);
	box-shadow: var(--shadow-md);
}

/* The sparkle keeps its spin - that is the affordance, since a darkening
   fill is a quieter signal than an underline arriving - but loses the
   fingerprint gradient, which is clipped to the glyph and would go muddy
   against a blue fill instead of reading as colour. */
body.cel-theme .header-ask-celebrus:not(:disabled):hover .acd-spark,
body.cel-theme .header-ask-celebrus:not(:disabled):focus-visible .acd-spark {
	background: none;
	-webkit-background-clip: border-box;
	background-clip: border-box;
	color: var(--fg-inverse);
}

/* Disabled - no fill, muted label, still readable. Overrides the legacy
   opacity: 0.5, which was written for a button that no longer looks
   like this. --fg-3 is 5.50:1 on white. */
body.cel-theme .header-ask-celebrus:disabled {
	background-color: transparent;
	background-image: none;
	box-shadow: none;
	opacity: 1;
	color: var(--fg-3);
	cursor: default;
}

body.cel-theme .header-ask-celebrus:disabled .acd-spark {
	color: var(--fg-3);
}

/* ---- The minimised restore chip: PAINT ONLY -------------------------------
   BROKEN ON 4 SEP AND FIXED HERE. .ask-celebrus-restore was grouped with
   .header-ask-celebrus above, because the two share the sparkle markup. They
   are not the same component and they do not live in the same place:

     .header-ask-celebrus   a button in the header row
     .ask-celebrus-restore  a FIXED floating chip, right:20px bottom:20px,
                            z-index 1060, its own 22px radius and padding

   Stripping the header pill therefore stripped the chip as well - and worse,
   `position: relative` overrode its `position: fixed`, so on minimise it
   stopped floating and flowed back inline into the header, which is where
   AskCelebrusDrawer.cshtml actually renders it. That is the blue-purple
   rectangle sitting in the header row.

   LESSON: grouping selectors because they share markup is not the same as
   them sharing a layout. The sparkle was the only thing they had in common.

   SO THIS BLOCK CHANGES PAINT AND NOTHING ELSE. No position, no display, no
   border-radius, no padding, no height - all of that stays with the legacy
   sheet, which has it right. If a property here would move the chip, it does
   not belong here.

   THE FILL, THIRD TIME. History, because each step was for a different
   reason:
     legacy   linear-gradient(135deg,#1b9dd9,#7a5cff) - off-brand blue plus a
              purple that is in neither the brand palette nor the live theme.
              White on the blue end is 3.06:1.
     v2 (mine) flat navy. Contrast was excellent at 11.16:1 - and it VANISHED
              against the navy footer, which is exactly where a chip pinned
              to bottom:20px sits. A contrast ratio against your own label
              tells you nothing about whether the component is visible
              against the page.
     v3       --c-fuchsia-plum, the same pink as the Contact us pill on
              celebrus.com. Anton's call, and it is the right one: it is the
              brand's designated stand-out colour, which is what a floating
              action chip needs.

   AND IT CONFORMS WITHOUT A NEW EXCEPTION, which is worth spelling out.
   White on #D14893 is 4.15:1, under the 4.5 that AA wants for normal text -
   but over the 3.0 it wants for LARGE text, and WCAG defines large as 18.66px
   bold. So the label is set at 19px/700. That is not a trick to dodge the
   threshold: a floating action button is exactly the place a bigger, bolder
   label belongs, it enlarges the tap target, and it means AE-1 and AE-2 stay
   the only two accepted exceptions in the redesign.

   Hover goes to --c-pink-hover #A9206B, which is the live theme's own hover
   step and measures 6.76:1 - conforming at any size.
   -------------------------------------------------------------------------- */

body.cel-theme .ask-celebrus-restore {
	background: var(--c-fuchsia-plum); /* the Contact us pink */
	color: var(--fg-inverse);
	font-family: var(--font-sans);
	/* 19px/700 qualifies as WCAG large text, so white at 4.15:1 conforms.
	   Do not reduce either value without re-checking that. */
	font-size: 19px;
	font-weight: var(--fw-bold);
}

body.cel-theme .ask-celebrus-restore:hover {
	background: var(--c-pink-hover); /* #A9206B, live's own step - 6.76:1 */
}

/* The legacy shadow is rgba(0,0,0,0.2) - pure black, which the token layer
   explicitly avoids in favour of navy-tinted shadows. box-shadow is paint,
   not layout, so this stays within the paint-only rule above.

   ONE MEASUREMENT WORTH RECORDING RATHER THAN ENGINEERING AROUND: the pink
   fill against the navy footer is 2.69:1, under the 3.0 that 1.4.11 asks for
   a component boundary. It is not treated as a failure because the boundary
   is not what identifies this control - a 19px white label reading "Ask
   Celebrus" is, at 4.15:1 against the fill it sits on. Magenta against navy
   is also a large hue separation even where the luminance difference is
   modest. I considered adding a white ring to force the number up and did
   not: no design shows one, and inventing chrome to satisfy a metric that
   does not apply is the wrong trade. Against Paper it is 3.94, against white
   4.15, against the form panel 3.47 - the footer is the only weak case. */
body.cel-theme .ask-celebrus-restore {
	box-shadow: var(--shadow-lg);
}

body.cel-theme .ask-celebrus-restore .acd-spark {
	color: var(--fg-inverse); /* white, 4.15:1 - decorative beside a label */
}

body.cel-theme .ask-celebrus-restore:hover .acd-spark {
	animation: cel-ai-spark 600ms var(--ease-out) 1 forwards;
}

/* ---- Opening the search clears the row ------------------------------------
   On celebrus.com, clicking search REPLACES the nav row - the links vanish
   and the field takes their place. Matched here: the three header links are
   hidden while the field is open, which is also what gives it room to grow.

   Ask Celebrus AI stays, because on live the one thing that survives the
   swap is the Contact us CTA, and this is the portal's equivalent of it.

   The links are hidden with display:none rather than opacity, so they leave
   the tab order too - a keyboard user cannot land on an invisible link.
   -------------------------------------------------------------------------- */

body.cel-theme header:has(.header-search.search-open) .header-buttons {
	display: none;
}

body.cel-theme header .header-search-collapsible.search-open .search-widget {
	width: 420px;
}

/* ==========================================================================
   5. TOP NAVIGATION
   --------------------------------------------------------------------------
   Rendered by Master.cshtml for authenticated users, so it is part of the
   header/footer pass rather than a screen. The legacy active state is a 5px
   #1C2F4C underline; the comp's language is a thinner brand underline plus a
   weight change, so the state is carried by two signals, not one.
   ========================================================================== */

body.cel-theme nav {
	background: var(--bg-1);
	border-bottom: var(--border-w-1) solid var(--c-mist-100);
}

body.cel-theme nav .nav-items {
	display: flex;
	align-items: stretch;
	gap: var(--space-1);
	padding: 0 var(--space-6);
	border-top: 0;
	flex-wrap: wrap;
}

/* The underline on celebrus.com is the fingerprint gradient, not a flat
   colour, and a border cannot carry a gradient - so it is an ::after bar.
   The active and hover states also change the label colour and weight, so
   the state never rests on the gradient alone. */
body.cel-theme nav .nav-item {
	position: relative; /* still the anchor for .subnav-items */
	display: inline-flex;
	border-bottom: 0;
}

/* THE UNDERLINE, FOURTH AND FINAL VERSION - now taken from the design file
   rather than inferred. "Portal redesign alignment2\Nav Hover Underline.dc.html"
   specifies the technique exactly, and it is simpler than anything I tried:

     THE GRADIENT IS THE LINK'S OWN background-image, and the growth is one
     animated background-size. No pseudo-element, no absolute positioning,
     no positioned ancestor required, no extra markup.

   History, because the failures are instructive:
     v1  opacity 0 -> 1        the bar pops in at full width. Wrong gesture.
     v2  transform: scaleX()   grows leftward but squashes the gradient.
     v3  clip-path on ::after  correct gesture, but a pseudo-element that
                               depends on position:relative on its parent,
                               a resolved height, and clip-path support -
                               three ways to render nothing at all.
     v4  background-size       one property on the element itself. <- this

   The design's timings match the design-system tokens exactly, which is a
   good sign both were derived from the same brief: 260ms = --duration-slow,
   180ms = --duration-base, and cubic-bezier(.2,.8,.2,1) IS --ease-out.

   ONE HONEST NOTE. The design file's caption says the ramp "reads identically
   at every stage of the grow - it reveals left to right rather than
   squashing". That is not what the code does: with a percentage
   background-size the gradient is rendered AT that width, so the full
   blue-to-magenta ramp is compressed into however much is drawn. It squashes.
   A genuine reveal needs a second layer to clip, which is what v3 was. The
   design file's own code is what is implemented here, because that is what
   was asked for - but if the squash ever looks wrong, v3 is in git and the
   difference is only visible mid-animation.

   :focus-visible is in the design and was missing from my nav rules -
   a hover-only affordance is invisible from the keyboard. */
body.cel-theme nav .nav-item > a {
	/* Explicit for the same reason as the header links - the underline is a
	   background image and any inherited radius would round its ends. */
	border-radius: 0;
	background-image: var(--nav-underline);
	background-repeat: no-repeat;
	background-position: left bottom;
	background-size: 0% var(--border-w-2);
	transition: background-size var(--duration-slow) var(--ease-out),
	            color var(--duration-base) var(--ease-out);
}

/* ---- The underline: HOVER AND KEYBOARD FOCUS ONLY -------------------------
   Nothing else turns it on. It used to be pinned to .active and to
   .show-subnav too:
     .active       marks the CURRENT SECTION, so the underline sat under
                   "Other Software Downloads" for every page beneath it - and
                   a SECOND underline then appeared under whatever was
                   hovered. Two underlined items at once, reading as two open
                   menus.
     .show-subnav  is added by script.js on CLICK, and left the item
                   underlined after the pointer had gone.
   Both removed. There is now NO current-section styling in the nav at all -
   see the note further down; an earlier version of this comment claimed a
   weight-and-colour cue remained, which was true for about one revision.

   One selector list, deliberately: the previous version had grown a narrower
   duplicate (.has-subnav:hover > a) and a repeated :focus-visible, because I
   inserted into a list that already contained what I was adding. .nav-item
   covers every item including Portal Home, which has no submenu and should
   still underline on hover. */
body.cel-theme nav .nav-item:hover > a,
body.cel-theme nav .nav-item > a:focus-visible {
	background-size: 100% var(--border-w-2);
}

body.cel-theme nav .nav-item + .nav-item {
	margin-left: 0;
}

body.cel-theme nav .nav-item > a {
	display: inline-flex;
	align-items: center;
	gap: var(--space-2);
	/* Bottom padding trimmed from 16px to 14px and 2px given back to the
	   rule, so the gradient sits clear of the descenders as it does in the
	   design file. */
	padding: var(--space-4) var(--space-3) 14px;
	font-size: var(--fs-small);
	font-weight: var(--fw-book);
	line-height: 1.2;
	color: var(--fg-2);
	text-decoration: none;
	white-space: nowrap;
	/* Repeats background-size deliberately - see the note on the Ask Celebrus
	   button. A colour-only transition here would win on source order and
	   the underline would snap. */
	transition: background-size var(--duration-slow) var(--ease-out),
	            color var(--duration-base) var(--ease-out);
}

body.cel-theme nav .nav-item > a > i {
	color: var(--fg-3);
	font-size: inherit;
}

body.cel-theme nav .nav-item:hover > a {
	color: var(--c-blue-aa);
}

/* NO CURRENT-SECTION STYLING AT ALL. Anton, 4 Sep: "other software is bold".

   I had kept a weight-and-colour cue on .active after removing its
   underline, reasoning that a "you are here" marker was worth keeping. It was
   not wanted, and on reflection it was the same mistake in a quieter form:
   .active marks the current SECTION, so every page under Other Software
   Downloads left that item emphasised whether or not anything was happening
   there. The nav now shows state only on hover and keyboard focus, which is
   what live does.

   Anything added back here must be checked against a hovered sibling - two
   emphasised items at once is what started this. */

/* The home item keeps its icon colour; that is decoration, not state. */
body.cel-theme nav .nav-item > a > i.fa-home {
	color: var(--c-blue-aa);
}

/* ---- Sub-navigation --------------------------------------------------- */

/* ---------------------------------------------------------------------------
   THE DROPDOWN PANEL, styled after the celebrus.com mega-menu.
   Revised 4 Sep from Anton's screenshot of the live "Use Cases" menu.

   Live draws a wide white card with a generous soft shadow and NO border,
   generous internal padding, and items as a bold navy title over a lighter
   description line. Ours was a 240px box with a hard 1px mist border and a
   tight 8px of padding - it read as a utility dropdown rather than part of
   the site.

   ONE THING CSS CANNOT DO HERE, and it is the most visible difference.
   TopNavigation.cshtml emits each item as
       <a href="...">@subPage.Value("pageTitle")</a>
   - a title and nothing else. Live's second line ("Tag-free patented data
   capture for every channel" and so on) is a DESCRIPTION FIELD, and there is
   no description anywhere in the nav markup to style. It needs one line in
   the view:
       <a href="..."><span class="subnav-title">@subPage.Value("pageTitle")</span>
          <span class="subnav-desc">@subPage.Value("shortDescription")</span></a>
   The rules below are already written so that a two-line item works the
   moment those spans appear - see .subnav-title / .subnav-desc at the end of
   this block. Until then each item is the title alone.

   ALSO NOT MATCHED: live shows four columns with a vertical divider, because
   it has around twenty items. The portal's menus have one to three each
   (Other Software Downloads has exactly one, "Geolocation Data"), so a
   single column is the correct layout for the content that exists. The grid
   below will add columns on its own if a menu ever grows past about eight
   items - CSS cannot count children, so it keys off available width instead.
   -------------------------------------------------------------------------- */

body.cel-theme nav .subnav-items {
	left: 0;
	min-width: 288px;
	max-width: min(90vw, 760px);
	padding: var(--space-4);
	background: var(--surface-panel);
	border: 0;
	border-radius: var(--radius-lg);
	box-shadow: var(--shadow-xl);
	display: none; /* legacy owns the open/close; .show-subnav reveals it */
	grid-template-columns: repeat(auto-fill, minmax(264px, 1fr));
	gap: 2px var(--space-8);
}

/* ---- The parent item is NOT a link -----------------------------------------
   TopNavigation.cshtml renders every menu parent as <a href="#">, and
   script.js binds a click that adds .show-subnav. Anton: "Just remove the
   clickable part."

   pointer-events: none does that without touching Razor or the script. Two
   things make it safe here rather than blunt:
     - the href is literally "#", so no destination is lost;
     - hover still works, because the hover target is .nav-item, the parent
       DIV. The pointer passes through the <a> to the div underneath, so the
       panel still opens - which would NOT be true if the hover were bound to
       the <a> itself.
   Keyboard focus is unaffected by pointer-events, so :focus-within still
   opens the panel and the menu stays reachable without a mouse.
   -------------------------------------------------------------------------- */

body.cel-theme nav .nav-item.has-subnav > a {
	pointer-events: none;
	cursor: default;
}

/* ---- Opening it -----------------------------------------------------------
   HOVER ONLY. No chevron, no click - Anton's call, and it matches live: the
   "Industries" menu on celebrus.com has no arrow and opens on mouseover.

   *** AND THIS FIXES A BUG I INTRODUCED LAST ROUND. *** I had
   `.nav-item.active .subnav-items { display: grid }` in here. .active marks
   the CURRENT SECTION, not an open menu - TopNavigation.cshtml sets it from
   childPage.Id == activeMenu.Id - so that rule held the current section's
   panel permanently open, which is why two panels were on screen at once in
   Anton's screenshot. A state class that reads like an interaction state and
   is not one.

   .show-subnav is kept because script.js still adds it on click and removes
   it on mouseleave. Harmless alongside hover, and it means a click still
   works for anyone using one.

   The grid has to be re-asserted here: the legacy sheet opens the panel with
   `display: block` on .show-subnav, and block would beat a grid declared
   only on the closed state.
   -------------------------------------------------------------------------- */

/* *** THE CLICK-TO-OPEN HAD TO BE NEUTRALISED, NOT JUST DROPPED. ***
   stylesheet.css:670 still carries
       nav .nav-item.show-subnav .subnav-items { display: block }
   so removing .show-subnav from MY selector was not enough - the legacy rule
   kept opening the panel on click and leaving it open after the pointer left,
   because script.js binds its mouseleave cleanup only after the first click.
   That is the "selections are staying there" Anton saw.

   So the legacy rule is closed explicitly, and hover then reopens it at
   higher specificity (0,4,2 against 0,3,2), which is why the order and the
   :hover in the selector both matter. */
body.cel-theme nav .nav-item.show-subnav .subnav-items {
	display: none;
}

body.cel-theme nav .nav-item.has-subnav:hover .subnav-items,
body.cel-theme nav .nav-item.has-subnav:focus-within .subnav-items {
	display: grid;
}

/* Dropped clear of the nav bar, as live does. */
body.cel-theme nav .nav-item.has-subnav .subnav-items {
	top: calc(100% + var(--space-4));
}

/* THE GAP HAS TO BE BRIDGED OR HOVER BREAKS. A 16px dead zone between the
   trigger and the panel means the pointer leaves .nav-item on the way down
   and the panel closes before it can be reached. This transparent strip
   spans the gap so the pointer never leaves the hover target. Invisible, no
   pointer-events:none - it needs to CATCH the pointer, not ignore it. */
body.cel-theme nav .nav-item.has-subnav .subnav-items::before {
	content: "";
	position: absolute;
	left: 0;
	right: 0;
	top: calc(-1 * var(--space-4));
	height: var(--space-4);
}

body.cel-theme nav .subnav-items > a {
	display: flex;
	flex-direction: column;
	gap: 2px;
	padding: var(--space-3) var(--space-4);
	border-radius: var(--radius-sm);
	font-size: 15px;
	line-height: 20px;
	/* Live makes the item title bold navy, not grey body copy - it is a
	   heading for its own destination. */
	font-weight: var(--fw-bold);
	color: var(--fg-1); /* 11.16:1 */
	text-decoration: none;
	white-space: normal; /* was nowrap - a description line has to wrap */
	transition: background var(--duration-fast) var(--ease-out), color var(--duration-fast) var(--ease-out);
}

/* Ready for the two-line item the moment the view emits these spans. */
body.cel-theme nav .subnav-items > a > .subnav-title {
	font-weight: var(--fw-bold);
	color: var(--fg-1);
}

body.cel-theme nav .subnav-items > a > .subnav-desc {
	font-size: 13px;
	line-height: 18px;
	font-weight: var(--fw-book);
	color: var(--fg-3); /* 5.50:1 */
}

body.cel-theme nav .nav-item .subnav-items > a:hover,
body.cel-theme nav .nav-item .subnav-items > a:focus-visible {
	background: var(--bg-3);
	color: var(--fg-link); /* 6.45:1 on mist-100 is 5.39 - see the doc */
}

body.cel-theme nav .nav-item .subnav-items > a:hover > .subnav-title {
	color: var(--fg-link);
}

/* NO CHEVRON. script.js appends ' <i class="fas fa-chevron-down"></i>' to
   every parent item; live has no arrow on these menus and Anton does not want
   one, so it is hidden here rather than removed from the script - this is a
   CSS-only change and the glyph costs nothing once it is not drawn.

   The rotate-on-open rule that used to live here went with it: with the
   chevron hidden it was styling something invisible. */
body.cel-theme nav .nav-item.has-subnav > a > .fas.fa-chevron-down {
	display: none;
}

body.cel-theme nav .mobile-nav-item > a {
	color: var(--c-navy-80);
}

body.cel-theme nav .mobile-nav-item > a:hover {
	color: var(--c-blue-aa);
}

/* ---- Desktop nav / mobile nav switch --------------------------------------
   CAUGHT IN VERIFICATION, and worth writing down because it is exactly the
   silent kind of fault this project keeps hitting.

   script.js builds a second nav at runtime - it prepends
   nav > .nav-items.mobile (a cloned home link plus a hamburger) and appends
   body > .mobile-nav-panel (clones of .account-items, .nav-items and
   .header-buttons). Neither exists in any .cshtml, so neither turns up in a
   grep of the views.

   The legacy sheet swaps between the two at max-width 1279px. The base rules
   above set display on nav .nav-items, and they outrank the legacy media
   query on specificity, so without this block BOTH navs would have rendered
   at once below 1280px - the desktop bar and the hamburger, stacked. It
   would have looked like a redesign bug and been a cascade bug.

   So the switch is re-asserted explicitly, at the agreed 992px boundary
   rather than the retired 1279px one. Both halves are written out; neither
   relies on the legacy rule surviving.

   Note the panel clones are NOT restyled: every header rule above is scoped
   under "header", and the clones live in body > .mobile-nav-panel. That is
   deliberate - it is also what makes the "hidden but still reachable" claim
   in REDESIGN-BREAKPOINTS-AND-CONTRAST.md true, since the pills hidden from
   the header at 1200 are still in the panel. The panel itself keeps its
   legacy styling until a later pass.
   -------------------------------------------------------------------------- */

body.cel-theme nav .nav-items.mobile {
	display: none;
}

@media (max-width: 991.98px) {
	body.cel-theme nav .nav-items {
		display: none;
	}

	body.cel-theme nav .nav-items.mobile {
		display: flex;
		align-items: center;
		justify-content: space-between;
		gap: var(--space-4);
		padding: 0 var(--space-4);
	}

	body.cel-theme nav .nav-items.mobile .mobile-nav-item {
		position: static;
		right: auto;
		top: auto;
		display: inline-flex;
		align-items: center;
		font-size: var(--fs-sub);
	}

	body.cel-theme nav .nav-items.mobile .nav-item {
		border-bottom-color: transparent;
	}
}

@media (max-width: 767.98px) {
	body.cel-theme nav .nav-items {
		padding: 0 var(--space-4);
	}

	body.cel-theme nav .nav-item > a {
		padding: var(--space-3) var(--space-2);
	}
}


/* ==========================================================================
   6. FOOTER
   --------------------------------------------------------------------------
   Comp: PortalFooter.dc.html - navy band, white wordmark, pale blue links.
   The live site agrees (navy footer, celebrus-logo-white-with-r.svg), and
   "live wins", so navy it is.

   THE LOGO IS A KNOWN COMPROMISE. Footer.cshtml points at
   /images/celebrus-logo-colour.png, which is unreadable on navy. The filter
   below renders it as a white silhouette, which is correct to the eye and
   costs no markup change. The proper fix is a one-line src swap in
   Footer.cshtml to a white SVG - and note that the live site uses the
   REGISTERED-TRADEMARK variant in the footer, celebrus-logo-white-with-r,
   which is not currently in wwwroot\images\. Confirm with marketing which
   mark the portal should carry before shipping; the plan flags this too.
   ========================================================================== */

body.cel-theme footer {
	background: var(--bg-dark);
}

body.cel-theme footer .footer-items {
	display: flex;
	align-items: center;
	gap: var(--gutter-lg);
	padding: var(--space-7) var(--space-6);
}

body.cel-theme footer .footer-logo {
	flex: none;
}

body.cel-theme footer .footer-logo img {
	display: block;
	width: 132px;
	height: auto;
	filter: brightness(0) invert(1); /* see the note above - temporary */
}

body.cel-theme footer .footer-links {
	flex: 1 1 auto;
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: var(--space-7);
}

body.cel-theme footer .footer-links a {
	font-size: 13px;
	font-weight: var(--fw-book);
	color: var(--fg-on-navy-2); /* blue-20 on navy = 9.00:1 */
	text-decoration: none;
	transition: color var(--duration-fast) var(--ease-out);
}

body.cel-theme footer .footer-links a + a {
	margin-left: 0;
}

body.cel-theme footer .footer-links a:hover {
	color: var(--fg-on-navy);
	text-decoration: underline;
}

body.cel-theme footer .footer-copyright {
	flex: none;
	font-size: var(--fs-caption);
	font-weight: var(--fw-book);
	/* The comp uses navy-60 here, which is 3.15:1 on navy and fails AA. One
	   step up the same scale is 5.14:1 and reads as the same tier. */
	color: var(--fg-on-navy-meta);
}

@media (max-width: 991.98px) {
	body.cel-theme footer .footer-items {
		flex-wrap: wrap;
		gap: var(--space-5);
		padding: var(--space-6) var(--space-4);
	}

	body.cel-theme footer .footer-links {
		flex: 1 1 100%;
		gap: var(--space-5);
	}
}

@media (max-width: 575.98px) {
	body.cel-theme footer .footer-items {
		flex-direction: column;
		align-items: flex-start;
	}

	body.cel-theme footer .footer-links {
		flex-direction: column;
		align-items: flex-start;
		gap: var(--space-3);
	}
}


/* ==========================================================================
   7. THE HERO BAND
   --------------------------------------------------------------------------
   .generic-banner.image-banner is the login hero. Legacy paints it #F0F0F0
   with assets/generic-image-banner-bg.png; the comp replaces that with navy
   plus two soft brand glows and an 88x3 gradient rule under the headline.

   The rule bar has no element in the markup, so it is drawn as hgroup::after
   - decorative, aria-hidden by virtue of being generated content, and free.

   The headline text comes from the Introduction rich-text property, so its
   exact tag mix is content-managed and cannot be relied on. Every heading
   level and paragraph inside is therefore given a legible on-navy colour
   rather than styling h1 alone and hoping.
   ========================================================================== */

body.cel-theme .generic-banner {
	position: relative;
	overflow: hidden;
	padding: 44px var(--space-6) 48px;
	background-color: var(--bg-dark);
	background-image: var(--gradient-hero-glow);
	border-bottom: 0;
}

body.cel-theme .generic-banner hgroup {
	position: relative;
	max-width: var(--container-max);
	margin: 0 auto;
}

body.cel-theme .generic-banner hgroup::after {
	content: "";
	display: block;
	width: 88px;
	height: var(--border-w-3);
	margin-top: var(--space-4);
	border-radius: var(--radius-pill);
	background: var(--gradient-blue-fuchsia);
}

body.cel-theme .generic-banner h1 {
	margin: 0;
	padding: 0;
	font-family: var(--font-display);
	/* 40/46. Comp screens 03, 06 and 07 all draw this; only screen 01, the
	   login page, draws 44/50. One hero definition is worth more than
	   matching one comp screen by four pixels - and three separate hero
	   rules is exactly how the padding, radius and transition drifts
	   happened earlier today. */
	font-size: var(--fs-h2);
	line-height: 46px;
	font-weight: var(--fw-extrabold);
	letter-spacing: var(--tracking-tight-4);
	color: var(--fg-on-navy); /* 11.16:1 */
}

body.cel-theme .generic-banner h2,
body.cel-theme .generic-banner h3 {
	margin: var(--space-3) 0 0;
	padding: 0;
	font-size: var(--fs-sub);
	line-height: var(--lh-sub);
	font-weight: var(--fw-book);
	letter-spacing: var(--tracking-tight-2);
	color: var(--fg-on-navy-2); /* 9.00:1 */
}

body.cel-theme .generic-banner p {
	margin: var(--space-3) 0 0;
	max-width: 72ch;
	font-size: var(--fs-body);
	line-height: var(--lh-body);
	color: var(--fg-on-navy-2);
}

body.cel-theme .generic-banner a {
	color: var(--fg-on-navy);
	text-decoration: underline;
}

body.cel-theme .generic-banner a:hover {
	color: var(--fg-on-navy-eyebrow); /* blue-40 on navy = 7.22:1 */
	border-bottom: 0;
}

/* The comp's "WELCOME TO THE" eyebrow above the headline has no element in
   the markup. If the Introduction rich text is ever given a leading
   paragraph for it, this class is ready and measures 7.22:1 on navy. */
body.cel-theme .generic-banner .eyebrow {
	display: block;
	margin: 0 0 var(--space-2);
	font-size: 11px;
	line-height: 16px;
	font-weight: var(--fw-bold);
	letter-spacing: var(--tracking-caps);
	text-transform: uppercase;
	color: var(--fg-on-navy-eyebrow);
}

/* Legacy drops the background image below 767px. Nothing to drop now - the
   gradient is cheap - but the type has to come down. */
@media (max-width: 991.98px) {
	body.cel-theme .generic-banner h1 {
		font-size: 36px;
		line-height: 42px;
	}
}

@media (max-width: 767.98px) {
	body.cel-theme .generic-banner {
		padding: var(--space-8) var(--space-4) var(--space-8);
	}

	body.cel-theme .generic-banner h1 {
		font-size: 28px;
		line-height: 34px;
	}

	body.cel-theme .generic-banner h2,
	body.cel-theme .generic-banner h3 {
		font-size: var(--fs-body);
		line-height: var(--lh-body);
	}
}


/* ==========================================================================
   8. LOGIN SCREEN                    comp screens 01 and 02
   ==========================================================================
   SCOPED - de-scope on migration
   --------------------------------------------------------------------------
   Everything from here to the end of section 12 is deliberately fenced
   inside .login-page, .create-password and .forgotten-password. The patterns
   are general - form fields, pill CTAs, cards - and they belong to the whole
   portal eventually. They are fenced because .form-grid, .form-cta and
   .form-row also render on Feedback, Profile, Registration and the document
   pages, and two of those are still untested since the Umbraco 13 to 17
   upgrade. Restyling them now would mean the next defect on those screens
   could be the upgrade or the redesign, and this project has already lost
   days to exactly that ambiguity.

   TO MIGRATE A SCREEN: delete the container from the :is() list on the rules
   below, screen by screen, once that screen's function is verified. Do not
   duplicate these blocks - a second copy is how the 200-class legacy sheet
   came to exist.

   The zero-Razor-edit constraint shaped three things here, all of which are
   comp-accurate but arrived at sideways:
     - the field label sits ABOVE the input in the comp, but the markup emits
       the input first and the label second (it was built for a floating
       label). flex-direction: column-reverse reorders them visually with no
       markup change.
     - the comp puts Continue and Reset password on one row; the markup emits
       two sibling .form-cta blocks. inline-flex makes them share a line.
     - the two login columns are cards in the comp and share a 1px divider in
       the legacy grid. The divider is removed rather than restyled.
   ========================================================================== */

/* ---- The band the panels sit on -------------------------------------------
   THE BAND IS PAINTED ON <main>, NOT ON THE FORM CONTAINER. Corrected 4 Sep.

   It used to sit on .login-page itself - which is also the grid, and the grid
   carries max-width:960px and margin:0 auto at 768px and up. So the Paper
   only covered the 960px content column and left white gutters either side:
   the "another layer, different tone" Anton spotted. The comp has one Paper
   band running edge to edge with the cards centred inside it.

   Painting it on main fixes that and removes an inconsistency I had already
   introduced: the Profile screen was doing it the right way round
   (main:has(.user-profile-grid)) while every form screen did it the wrong
   way. ONE rule now covers all of them, which is what "one place" has to
   mean in practice - not just one token, but one rule using it.
   -------------------------------------------------------------------------- */

/* EVERY screen that sits on the Paper band is listed HERE and nowhere else.
   Adding a screen means adding a selector to this rule - NOT writing a second
   main:has() rule somewhere else in the file. I did exactly that for Portal
   home in section 15 and it took a guard to notice, two rounds after I had
   written down that "one place" has to mean one RULE. */
body.cel-theme main:has(.login-page),
body.cel-theme main:has(.create-password),
body.cel-theme main:has(.create-account),
body.cel-theme main:has(.account-created),
body.cel-theme main:has(.user-profile-grid),
body.cel-theme main:has(.support-home-tabs),
body.cel-theme main:has(.search-results) {
	background: var(--surface-panel-page);
}

body.cel-theme .login-page,
body.cel-theme .create-password,
body.cel-theme .create-account,
body.cel-theme .account-created {
	display: block;
	max-width: none;
	margin: 0;
	padding: 56px var(--space-6) 72px;
	background: transparent;
}

/* ---- THE FORM PANEL -------------------------------------------------------
   One definition for every form in the portal. Before this, Login was white
   cards on Paper, Feedback was a 430px column with NO panel at all, and the
   registration, signup and password-reset screens each did something
   slightly different. That inconsistency is what Anton was pointing at.

   The treatment is celebrus.com's "Meet with us" panel: the live theme's
   light grey, generously rounded, with WHITE fields inside it. White fields
   on grey rather than grey fields on white is what live does, and it keeps
   every input on the surface its contrast was measured against.

   Legacy caps .create-account and .create-password at 430px, which is why
   Feedback rendered as a narrow column. --panel-max replaces all of that
   with one number.
   -------------------------------------------------------------------------- */

body.cel-theme .login-page > .column-one,
body.cel-theme .login-page > .column-two,
body.cel-theme .create-password > .column-one,
body.cel-theme .create-account > .column-one,
body.cel-theme .account-created > .column-one,
body.cel-theme .account-created > .column-two {
	background: var(--surface-panel);
	border: var(--border-w-1) solid var(--border-1);
	border-radius: var(--radius-panel);
	padding: var(--panel-pad);
	box-shadow: var(--shadow-sm);
}

/* Kills the legacy 1px divider and the asymmetric 45px padding that went
   with it. Higher specificity than the legacy min-width:768px rules, so no
   media query is needed to undo them. */
body.cel-theme .login-page > .column-one {
	border-right: var(--border-w-1) solid var(--border-1);
}

/* Single-column forms: feedback, registration, signup, reset, error. */
body.cel-theme .create-account > .column-one,
body.cel-theme .account-created > .column-one {
	max-width: var(--panel-max);
	margin: 0 auto;
}

/* The password step is a short form and looks lost at the full width. */
body.cel-theme .create-password > .column-one {
	max-width: 460px;
	margin: 0 auto;
}

body.cel-theme .login-page > .column-three {
	align-self: start;
}

body.cel-theme .login-banner {
	width: auto;
	max-width: 250px;
	margin: 0 auto;
	overflow: hidden;
	border-radius: var(--radius-lg);
}

body.cel-theme .login-banner img {
	display: block;
	width: 100%;
	height: auto;
}

/* ---- Card headings ---------------------------------------------------- */

body.cel-theme :is(.login-page, .create-password, .create-account, .account-created, .forgotten-password) h2 {
	margin: 0 0 var(--space-5);
	font-family: var(--font-display);
	font-size: 22px;
	line-height: 28px;
	font-weight: var(--fw-bold);
	letter-spacing: var(--tracking-tight-2);
	color: var(--fg-1);
}

/* Login/Default.cshtml carries a small inline <style> block that sets
   .login-step h2 to 16px. It is later in the document but lower in
   specificity, so the rule above wins. That inline block should be deleted
   when someone next has Razor open - its three rules are all superseded
   here. */

body.cel-theme :is(.login-page, .create-password, .create-account, .account-created, .forgotten-password) form h2 {
	font-size: 22px;
}

/* ---- Fields ----------------------------------------------------------- */

body.cel-theme :is(.login-page, .create-password, .create-account, .account-created, .forgotten-password) .form-grid {
	display: grid;
	grid-template-columns: 1fr;
	gap: var(--space-5);
	padding: 0;
}

body.cel-theme :is(.login-page, .create-password, .create-account, .account-created, .forgotten-password) .form-grid .form-row {
	position: relative; /* kept - the error icon is absolutely placed in it */
	display: flex;
	flex-direction: column-reverse; /* label renders above the input */
	align-items: stretch;
	gap: var(--space-2);
}

/* Undo the floating-label positioning. The selector carries an attribute and
   a sibling combinator on purpose: the legacy float rules are
   .form-grid .form-row input[type=text]:focus ~ label and friends, which
   outrank a plain descendant selector. */
body.cel-theme :is(.login-page, .create-password, .create-account, .account-created, .forgotten-password) .form-grid .form-row label,
body.cel-theme :is(.login-page, .create-password, .create-account, .account-created, .forgotten-password) .form-grid .form-row input[type] ~ label,
body.cel-theme :is(.login-page, .create-password, .create-account, .account-created, .forgotten-password) .form-grid .form-row input[type]:focus ~ label {
	position: static;
	top: auto;
	left: auto;
	transform: none;
	transition: none;
	pointer-events: auto;
	cursor: pointer;
	margin: 0;
	padding: 0;
	font-family: var(--font-sans);
	font-size: var(--fs-caption);
	line-height: var(--lh-caption);
	font-weight: var(--fw-bold);
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: var(--c-navy-80); /* 6.20:1 on white */
}

/* The ONE legacy !important that reaches into this file's territory, found by
   scanning all 35 of them against every class here rather than assuming:
       .form-grid .form-row.has-error label { color: #ff0000 !important }
   It is DEAD. Nothing in the portal ever adds .has-error - the only hits
   anywhere in the solution are inside angular.js's own documentation
   comments, and the live validation path in script.js prepends a
   .form-row.error-message row instead. So the rule cannot fire, and it
   cannot fight the layout below.

   Left in place rather than removed, because it lives in the legacy sheet
   that is being deleted wholesale. Noted here so nobody re-discovers it and
   assumes it matters. Had it been live, #ff0000 on white is 4.00:1 and would
   have missed AA anyway. */
/* The comp marks required fields with a magenta asterisk. Legacy used pure
   red; magenta on white is 4.15:1 and passes, and it is the brand accent. */
body.cel-theme :is(.login-page, .create-password, .create-account, .account-created, .forgotten-password) .form-grid .form-row.mandatory label::after {
	content: " *";
	color: var(--fg-accent);
}

body.cel-theme :is(.login-page, .create-password, .create-account, .account-created, .forgotten-password) .form-grid .form-row input[type=text],
body.cel-theme :is(.login-page, .create-password, .create-account, .account-created, .forgotten-password) .form-grid .form-row input[type=password],
body.cel-theme :is(.login-page, .create-password, .create-account, .account-created, .forgotten-password) .form-grid .form-row input[type=email] {
	-webkit-appearance: none;
	-moz-appearance: none;
	appearance: none;
	box-sizing: border-box;
	width: 100%;
	height: var(--field-h);
	padding: 0 14px;
	background: var(--bg-1);
	/* WCAG 1.4.11: a control boundary needs 3:1. The comp's mist-200 is
	   1.36:1, which is fine for a card edge and not for an input edge. */
	border: var(--border-w-1) solid var(--border-control);
	border-radius: var(--radius-md);
	font-family: var(--font-sans);
	font-size: 15px;
	font-weight: var(--fw-book);
	color: var(--fg-1);
	outline: none;
	transition: border-color var(--duration-fast) var(--ease-out), box-shadow var(--duration-fast) var(--ease-out);
}

body.cel-theme :is(.login-page, .create-password, .create-account, .account-created, .forgotten-password) .form-grid .form-row input::placeholder {
	color: var(--fg-3);
	opacity: 1;
}

/* The comp draws the focused password field as a blue border plus a soft
   glow. That glow is rgba at 0.18 and nowhere near 3:1 on its own, so a real
   outline goes on top of it rather than instead of it. */
body.cel-theme :is(.login-page, .create-password, .create-account, .account-created, .forgotten-password) .form-grid .form-row input:focus-visible {
	border-color: var(--c-blue-aa);
	box-shadow: var(--shadow-glow-blue);
	outline: var(--focus-ring-width) solid var(--focus-ring);
	outline-offset: var(--focus-ring-offset);
}

/* Step 2 shows the email address back to the user, read-only. Read-only and
   disabled controls are exempt from the 3:1 boundary rule, so the comp's
   softer treatment stands. */
body.cel-theme :is(.login-page, .create-password, .create-account, .account-created, .forgotten-password) .form-grid .form-row input[readonly] {
	background: var(--bg-2);
	border-color: var(--c-mist-100);
	color: var(--c-navy-80);
	cursor: default;
}

body.cel-theme :is(.login-page, .create-password, .create-account, .account-created, .forgotten-password) .form-grid .form-row input:disabled {
	background: var(--bg-2);
	border-color: var(--c-mist-200);
	color: var(--fg-3);
}

/* ---- Error message --------------------------------------------------- */

body.cel-theme :is(.login-page, .create-password, .create-account, .account-created, .forgotten-password) .form-grid .form-row.error-message {
	flex-direction: row;
	align-items: center;
	gap: var(--space-2);
	padding: var(--space-3) var(--space-3) var(--space-3) 40px;
	background: var(--bg-danger-soft);
	border: var(--border-w-1) solid var(--border-danger);
	border-radius: var(--radius-md);
}

body.cel-theme :is(.login-page, .create-password, .create-account, .account-created, .forgotten-password) .form-grid .form-row.error-message > .fas {
	left: 12px;
	margin-top: -9px;
	font-size: 18px;
	color: var(--status-danger);
}

/* Message text stays --fg-2 at 7.53:1 rather than red-on-red-tint. */
body.cel-theme :is(.login-page, .create-password, .create-account, .account-created, .forgotten-password) .form-grid .form-row.error-message > span {
	font-size: var(--fs-small);
	line-height: var(--lh-small);
	color: var(--fg-2);
}

body.cel-theme :is(.login-page, .create-password, .create-account, .account-created, .forgotten-password) .form-grid .form-note {
	margin-top: 0;
	font-size: var(--fs-caption);
	color: var(--fg-3);
}


/* ==========================================================================
   9. CALLS TO ACTION
   --------------------------------------------------------------------------
   THE PRIMARY BUTTON CARRIES AN ACCEPTED WCAG AA EXCEPTION.
   Decision: Anton, 3 September 2026. The full record - the finding, what was
   rejected, the scope, and the residual risk - is in celebrus-tokens.css
   block B3. Read it before changing anything here.

   In short: the button is white on the Celebrus blue, exactly as
   celebrus.com and the comp draw it. That is 2.97:1, below AA's 4.5:1 and
   below the 3:1 large-text floor too, so no size or weight fixes it. Brand
   fidelity won. Two conforming alternatives were built and rejected -
   darkening the fill, and darkening the label - and both are documented.

   THE EXCEPTION IS SCOPED TO THIS ONE CONTROL. It does not license #009FE3
   for text, links, focus rings, underlines or any future control. If you are
   reaching for it somewhere else, you are misreading it.

   Hover DARKENS to --c-cta-bg-hover (#007DB4), which with a white label
   measures 4.57:1 - so the hover state conforms even though the resting
   state does not. That is a slightly odd property and it is intentional:
   there was no reason to make the hover fail as well.

   LINK TEXT IS A DIFFERENT PROBLEM and keeps --c-blue-aa. #009FE3 as text on
   white is the same 2.97:1, but a link has no fill underneath it and no
   button geometry to make it obvious - it is prose. Do not "correct"
   --fg-link to the brand blue for consistency with the button.
   ========================================================================== */

body.cel-theme :is(.login-page, .create-password, .create-account, .account-created, .forgotten-password) .form-cta {
	display: inline-flex;
	align-items: center;
	padding: var(--space-6) 0 0;
	text-align: left;
}

/* The comp puts the primary CTA and the secondary link on one row. The
   markup emits them as two sibling blocks, so inline-flex lets them share a
   line and the margin replaces the legacy stacked padding. */
body.cel-theme :is(.login-page, .create-password, .create-account, .account-created, .forgotten-password) .form-cta + .form-cta {
	padding-top: var(--space-6);
	margin-left: var(--space-5);
}

/* ---------------------------------------------------------------------------
   THE PILL ITSELF IS GLOBAL - decided with Anton, 3 Sep.
   .primary-cta and .secondary-cta also appear OUTSIDE the form containers:
   Profile's "Log out" and Search results' "Apply filters". Leaving those two
   as legacy text links was the exact inconsistency this pass is fixing, so
   the BUTTON APPEARANCE is unfenced.

   The .form-cta CONTAINER layout below stays fenced, though - making it
   inline-flex globally could shift the Search results filter row, and a
   pill cannot. Appearance global, layout fenced.
   -------------------------------------------------------------------------- */

body.cel-theme .primary-cta {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	height: var(--field-h);
	padding: 0 26px;
	border: 0;
	border-radius: var(--radius-pill);
	background: var(--c-cta-bg); /* #009FE3 - exact to celebrus.com */
	color: var(--c-cta-fg); /* #FFFFFF = 2.97:1 - ACCEPTED EXCEPTION */
	font-family: var(--font-sans);
	font-size: 15px;
	font-weight: var(--fw-bold);
	line-height: 1;
	text-decoration: none;
	cursor: pointer;
	transition: background var(--duration-fast) var(--ease-out), box-shadow var(--duration-fast) var(--ease-out);
}

body.cel-theme .primary-cta:hover {
	background: var(--c-cta-bg-hover); /* #007DB4 - darkens */
	color: var(--c-cta-fg); /* white on it = 4.57:1  AA PASS */
	box-shadow: var(--shadow-sm); /* second signal alongside the fill shift */
}

body.cel-theme .secondary-cta {
	font-size: var(--fs-small);
	font-weight: var(--fw-book);
	color: var(--c-navy-80); /* 6.20:1 on white */
	text-decoration: none;
}

body.cel-theme .secondary-cta:hover {
	color: var(--c-blue-aa);
	text-decoration: underline;
}

/* Step 2's "Change email address" is a bare link under the read-only field,
   not a CTA row. */
body.cel-theme .create-password #change-email-link {
	font-size: 13px;
	color: var(--c-navy-80);
}

/* Step 2's Sign in button is full width in the comp's single-column card. */
body.cel-theme .create-password .form-cta,
body.cel-theme .create-password .form-cta .primary-cta {
	display: flex;
	width: 100%;
}

body.cel-theme .create-password .form-cta + .form-cta {
	margin-left: 0;
	padding-top: var(--space-4);
	justify-content: center;
}

body.cel-theme :is(.login-page, .create-password, .create-account, .account-created, .forgotten-password) .form-disclaimer {
	margin: var(--space-5) 0 0;
	font-size: var(--fs-caption);
	line-height: 18px;
	/* The comp uses mist-400 here, at 12px, which is 3.04:1. This is the
	   privacy-consent text on a registration form; it is the last place to
	   accept a contrast near-miss. */
	color: var(--fg-3);
}

body.cel-theme :is(.login-page, .create-password, .create-account, .account-created, .forgotten-password) .form-disclaimer a {
	color: var(--fg-link);
	text-decoration: underline;
}


/* ==========================================================================
   10. MICROSOFT ENTRA SIGN-IN
   --------------------------------------------------------------------------
   .cel-btn-ghost already exists in stylesheet_v1.css and is applied by
   Login/Default.cshtml. It is brought onto the comp's dimensions here.

   Two notes for whoever next opens this:
   1. The comp draws Microsoft's four-square logo as an inline SVG in its
      brand colours (--ms-red / --ms-green / --ms-blue / --ms-yellow, in the
      token file). The portal renders a monochrome Font Awesome glyph
      instead, so those four values are currently unused. Swapping to the
      four-square SVG is a Razor change; until then the glyph inherits the
      button's navy, which is a safer wrong answer than a recoloured
      Microsoft mark.
   2. Microsoft's brand guidance governs that mark. If it is ever drawn in
      colour, it must be those exact values.
   ========================================================================== */

body.cel-theme .login-step .cel-btn-ghost,
body.cel-theme .create-password .cel-btn-ghost {
	box-sizing: border-box;
	width: 100%;
	height: var(--field-h);
	justify-content: center;
	gap: var(--space-3);
	padding: 0 var(--space-5);
	border: var(--border-w-1) solid var(--c-mist-200);
	border-radius: var(--radius-pill);
	background: var(--bg-1);
	color: var(--c-regal-navy); /* 11.16:1 */
	font-family: var(--font-sans);
	font-size: var(--fs-small);
	font-weight: var(--fw-bold);
}

body.cel-theme .login-step .cel-btn-ghost:hover,
body.cel-theme .create-password .cel-btn-ghost:hover {
	border-color: var(--c-blue-aa);
	color: var(--c-blue-aa);
}

body.cel-theme .login-step .login-entra-form {
	margin: var(--space-5) 0 0;
}

/* ---- The "or" divider -------------------------------------------------
   Overrides the inline <style> block in Login/Default.cshtml, which uses
   #D7D7D7 for the rules and navy-60 for the word. Navy-60 as 11px text on
   white is 3.55:1.
   ---------------------------------------------------------------------- */

body.cel-theme .login-step .login-divider {
	display: flex;
	align-items: center;
	gap: var(--space-4);
	margin: var(--space-5) 0;
}

body.cel-theme .login-step .login-divider::before,
body.cel-theme .login-step .login-divider::after {
	content: "";
	flex: 1 1 auto;
	height: var(--border-w-1);
	background: var(--c-mist-100);
}

body.cel-theme .login-step .login-divider span {
	font-size: 11px;
	font-weight: var(--fw-bold);
	letter-spacing: var(--tracking-caps);
	text-transform: uppercase;
	color: var(--fg-3); /* 5.18:1 */
}


/* ==========================================================================
   11. RESET-PASSWORD MODAL
   ========================================================================== */

body.cel-theme .forgotten-password {
	padding: var(--card-pad);
	background: var(--bg-1);
	border: var(--border-w-1) solid var(--border-1);
	border-radius: var(--radius-lg);
	box-shadow: var(--shadow-xl);
	width: calc(100vw - 48px);
	max-width: 460px;
}

body.cel-theme .forgotten-password .simplemodal-close {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 32px;
	height: 32px;
	float: right;
	border-radius: var(--radius-pill);
	color: var(--c-navy-80);
	cursor: pointer;
}

body.cel-theme .forgotten-password .simplemodal-close:hover {
	background: var(--c-mist-100);
	color: var(--c-regal-navy);
}


/* ==========================================================================
   12. LOGIN RESPONSIVE
   --------------------------------------------------------------------------
   Derived. The comp is a single 1440px frame with no media queries, so this
   is the documented derivation rather than a design.

   Below 768 the two cards stack, which is the only sensible reading of a
   two-up card layout. At 768 and up they sit side by side in a 960px
   container, matching the comp's max-width. The optional third column - the
   promotional banner, which only renders when ShowBannerAdd is set - widens
   the container to 1280 and takes its own 295px track.

   :has() is what makes that conditional without a Razor edit: the grid
   changes shape based on whether .column-three was rendered. Browsers
   without :has() fall back to the two-column rule, which is a correct
   layout, just not the widened one.
   ========================================================================== */

@media (min-width: 768px) {
	body.cel-theme .login-page {
		display: grid;
		grid-template-columns: 1fr 1fr;
		gap: 28px;
		/* NO align-items. The comp lets both cards stretch to the taller of
		   the two - "Create an account" carries the privacy paragraph, so
		   without this they end up visibly different heights, which is the
		   second thing Anton flagged. Grid default is stretch; declaring
		   `start` was the bug. .column-three opts out on its own below. */
		max-width: 960px;
		margin: 0 auto;
	}

	body.cel-theme .login-page:has(> .column-three) {
		grid-template-columns: 1fr 1fr 295px;
		max-width: var(--container-wide);
	}

	body.cel-theme .login-page > .column-one {
		grid-column: 1;
	}

	body.cel-theme .login-page > .column-two {
		grid-column: 2;
	}

	body.cel-theme .login-page > .column-three {
		grid-column: 3;
	}
}

@media (max-width: 991.98px) {
	body.cel-theme .login-page,
	body.cel-theme .create-password {
		padding: var(--space-10) var(--space-5) var(--space-12);
	}
}

@media (max-width: 767.98px) {
	body.cel-theme .login-page,
	body.cel-theme .create-password {
		padding: var(--space-8) var(--space-4) var(--space-10);
	}

	body.cel-theme .login-page > .column-one,
	body.cel-theme .login-page > .column-two,
	body.cel-theme .create-password > .column-one {
		padding: var(--space-6);
	}

	body.cel-theme .login-page > .column-one + .column-two {
		margin-top: var(--space-5);
	}

	/* At 375 the CTA row does not fit beside its secondary link. */
	body.cel-theme :is(.login-page, .create-password, .create-account, .account-created, .forgotten-password) .form-cta {
		display: flex;
		width: 100%;
	}

	body.cel-theme :is(.login-page, .create-password, .create-account, .account-created, .forgotten-password) .form-cta .primary-cta {
		width: 100%;
	}

	body.cel-theme :is(.login-page, .create-password, .create-account, .account-created, .forgotten-password) .form-cta + .form-cta {
		margin-left: 0;
		padding-top: var(--space-4);
		justify-content: center;
	}
}


/* ==========================================================================
   13. THE REST OF THE FORM VOCABULARY
   --------------------------------------------------------------------------
   Added 3 September 2026. The login pilot only ever needed text and password
   inputs. Extending the panel to Feedback, Registration and the password
   screens brought in three controls the pilot never touched, all three of
   which were still rendering on the legacy floating-label CSS:

     textarea            Feedback's Comments box
     .graphical-select   Feedback's and Registration's dropdowns - a real
                         <select> at opacity 0 over a styled div, with the
                         current value echoed into a .selected-value span
     checkbox row        .support-bulletin-subscribe

   The floating-label CSS is why "First name" and "Last name" were sitting
   half-clipped on the input borders on Feedback: the label is absolutely
   positioned at top:50% and only lifts clear when a sibling selector fires,
   and those selectors do not cover a readonly input with a value. Making the
   labels static, as section 8 does, fixes the whole class of that fault
   rather than the two fields it was visible on.

   FEEDBACK IS NOW VERIFIED. The plan flagged it as untested since the
   Umbraco 13 to 17 upgrade because FeedbackForm.cshtml casts
   ConfigurationObject to DropDownFlexibleConfiguration and can throw at
   runtime. Anton's 3 Sep screenshots show the "I'm telling you about"
   dropdown populated, so the cast resolves and the partial renders. That is
   what unblocked restyling it. The documentation reader is still unverified
   and is still untouched.
   ========================================================================== */

/* ---- Textarea --------------------------------------------------------- */

body.cel-theme :is(.login-page, .create-password, .create-account, .account-created, .forgotten-password) .form-grid .form-row textarea {
	-webkit-appearance: none;
	-moz-appearance: none;
	appearance: none;
	box-sizing: border-box;
	width: 100%;
	min-height: 140px;
	height: auto;
	padding: var(--space-3) 14px;
	background: var(--bg-1);
	border: var(--border-w-1) solid var(--border-control);
	border-radius: var(--radius-md);
	font-family: var(--font-sans);
	font-size: 15px;
	line-height: var(--lh-body);
	font-weight: var(--fw-book);
	color: var(--fg-1);
	outline: none;
	resize: vertical;
	transition: border-color var(--duration-fast) var(--ease-out), box-shadow var(--duration-fast) var(--ease-out);
}

body.cel-theme :is(.login-page, .create-password, .create-account, .account-created, .forgotten-password) .form-grid .form-row textarea:focus-visible {
	border-color: var(--c-blue-aa);
	box-shadow: var(--shadow-glow-blue);
	outline: var(--focus-ring-width) solid var(--focus-ring);
	outline-offset: var(--focus-ring-offset);
}

/* The legacy sheet positions a textarea's label with its own transform, at a
   higher specificity than the shared label reset in section 8. Undone here
   for the same reason and in the same way. */
body.cel-theme :is(.login-page, .create-password, .create-account, .account-created, .forgotten-password) .form-grid .form-row textarea + label,
body.cel-theme :is(.login-page, .create-password, .create-account, .account-created, .forgotten-password) .form-grid .form-row textarea:focus + label {
	position: static;
	top: auto;
	left: auto;
	transform: none;
	transition: none;
	pointer-events: auto;
}

/* ---- Select ----------------------------------------------------------------
   .graphical-select is a div carrying the visible box, with the real <select>
   stretched over it at opacity 0 and a .selected-value span showing the
   chosen text. It works, and the pattern is not worth rebuilding.

   The label is INSIDE the div rather than a sibling of the control, so the
   column-reverse trick from section 8 cannot reach it. It is lifted clear
   with absolute positioning against the box instead, which lands it in the
   same place as every other label on the panel - which is the point.
   -------------------------------------------------------------------------- */

body.cel-theme :is(.login-page, .create-password, .create-account, .account-created, .forgotten-password) .form-grid .form-row .graphical-select {
	box-sizing: border-box;
	position: relative;
	display: flex;
	align-items: center;
	height: var(--field-h);
	margin-top: calc(var(--lh-caption) + var(--space-2));
	padding: 0 40px 0 14px;
	background: var(--bg-1);
	border: var(--border-w-1) solid var(--border-control);
	border-radius: var(--radius-md);
	overflow: visible;
	cursor: pointer;
	font-family: var(--font-sans);
	font-size: 15px;
	font-weight: var(--fw-book);
	color: var(--fg-1);
}

body.cel-theme :is(.login-page, .create-password, .create-account, .account-created, .forgotten-password) .form-grid .form-row .graphical-select .selected-value {
	display: block;
	overflow: hidden;
	white-space: nowrap;
	text-overflow: ellipsis;
	color: var(--fg-1);
}

/* Lifted out of the box and onto the panel, level with every other label. */
body.cel-theme :is(.login-page, .create-password, .create-account, .account-created, .forgotten-password) .form-grid .form-row .graphical-select label,
body.cel-theme :is(.login-page, .create-password, .create-account, .account-created, .forgotten-password) .form-grid .form-row .graphical-select select.has-value ~ label {
	position: absolute;
	bottom: calc(100% + var(--space-2));
	top: auto;
	left: 0;
	transform: none;
	transition: none;
	font-size: var(--fs-caption);
	line-height: var(--lh-caption);
	font-weight: var(--fw-bold);
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: var(--c-navy-80);
}

/* The chevron is a Font Awesome glyph on ::before. Kept - it renders today.
   Recoloured off the legacy #2591DF and re-centred for the 44px box. */
body.cel-theme :is(.login-page, .create-password, .create-account, .account-created, .forgotten-password) .form-grid .form-row .graphical-select::before {
	right: 14px;
	top: 50%;
	transform: translateY(-50%);
	font-size: var(--fs-caption);
	color: var(--c-navy-80);
}

body.cel-theme :is(.login-page, .create-password, .create-account, .account-created, .forgotten-password) .form-grid .form-row .graphical-select:focus-within {
	border-color: var(--c-blue-aa);
	box-shadow: var(--shadow-glow-blue);
	outline: var(--focus-ring-width) solid var(--focus-ring);
	outline-offset: var(--focus-ring-offset);
}

/* ---- Checkbox row ----------------------------------------------------- */

body.cel-theme :is(.login-page, .create-password, .create-account, .account-created, .forgotten-password) .support-bulletin-subscribe {
	display: grid;
	grid-template-columns: auto 1fr;
	gap: var(--space-3);
	align-items: start;
	margin: var(--space-2) 0 0;
}

body.cel-theme :is(.login-page, .create-password, .create-account, .account-created, .forgotten-password) .support-bulletin-subscribe input[type=checkbox] {
	width: 18px;
	height: 18px;
	margin: 2px 0 0;
	accent-color: var(--c-cta-bg);
	cursor: pointer;
}

body.cel-theme :is(.login-page, .create-password, .create-account, .account-created, .forgotten-password) .support-bulletin-subscribe label {
	position: static;
	transform: none;
	font-size: var(--fs-small);
	line-height: var(--lh-small);
	font-weight: var(--fw-book);
	letter-spacing: normal;
	text-transform: none;
	color: var(--fg-2);
	cursor: pointer;
}

/* ---- Feedback: the intro paragraph ----------------------------------------
   FeedbackForm.cshtml wraps five sentences of body copy in an <h2>. It is a
   markup smell - it should be a <p> - but the text is hardcoded in the view,
   so changing the tag is a Razor edit.

   CORRECTED 4 SEP, TWICE OVER.

   1. IT WAS TOO HEAVY. I had it at --fw-bold in navy, which made a paragraph
      shout louder than the form it introduces. The comp is explicit:
          font-size:16px; line-height:26px; font-weight:350; color:#4A5568
      i.e. ordinary body copy. Now matched exactly.

   2. IT WAS SCOPED TO THE WRONG THING. The old rule was .create-account h2,
      and .create-account is ALSO used by RegistrationForm.cshtml - whose h2
      is a genuine heading, "Complete your registration". That rule would
      have shrunk a real heading to body text on a screen nobody had looked
      at yet. Now scoped by the form's own id, so it can only ever reach the
      Feedback intro.

   The lesson is the same one as the Ask Celebrus restore chip: a selector
   that happens to match is not a selector that means what you intend.
   -------------------------------------------------------------------------- */

body.cel-theme #frmFeedback h2 {
	margin: 0 0 var(--space-6);
	font-family: var(--font-sans);
	font-size: var(--fs-body); /* 16px, per the comp */
	line-height: 26px; /* comp - looser than --lh-body for a long paragraph */
	font-weight: var(--fw-book); /* 350. It was 700; that was the complaint. */
	letter-spacing: normal;
	color: var(--fg-2); /* #4A5568, per the comp. 6.30:1 on the panel. */
}

/* Registration keeps the panel-heading treatment its h2 actually deserves.
   :not(#frmFeedback) rather than naming #frmRegistration, so any future form
   dropped into .create-account inherits the heading style rather than the
   paragraph style. (I first wrote #frmSignupComplete here - an id that does
   not exist anywhere in the solution. The class-existence guard missed it
   because it only checked classes; it now checks ids too.) */
body.cel-theme .create-account form:not(#frmFeedback) h2 {
	font-size: 22px;
	line-height: 28px;
	font-weight: var(--fw-bold);
	color: var(--fg-1);
}

/* ---- Feedback: two-column field block ------------------------------------
   The comp runs the select and the comments box full width, then puts the
   five personal fields in a 2-up grid, then the checkbox full width again.
   The markup emits every one of them as a flat .form-row sibling inside one
   .form-grid, so the grouping is reconstructed with :has() - which reads the
   row's contents rather than counting positions. Counting would have broken
   the moment the conditional error row appeared.
   -------------------------------------------------------------------------- */

body.cel-theme #frmFeedback .form-grid {
	grid-template-columns: 1fr 1fr;
	gap: var(--space-4) var(--space-4);
}

body.cel-theme #frmFeedback .form-grid > .form-row.error-message,
body.cel-theme #frmFeedback .form-grid > .form-row:has(> .graphical-select),
body.cel-theme #frmFeedback .form-grid > .form-row:has(textarea),
body.cel-theme #frmFeedback .form-grid > .support-bulletin-subscribe {
	grid-column: 1 / -1;
}

/* The comp's card is wider than the shared 640px, and only here. */
body.cel-theme .create-account > .column-one:has(#frmFeedback) {
	max-width: 720px;
}

@media (max-width: 575.98px) {
	body.cel-theme #frmFeedback .form-grid {
		grid-template-columns: 1fr;
	}
}

body.cel-theme .create-account form > p:empty {
	display: none; /* FeedbackForm.cshtml emits a bare <p></p> as a spacer */
}

/* ---- "Change email address" -----------------------------------------------
   It sits in its own .form-cta between the read-only email field and the
   password field, which left it clamped against the PASSWORD label with no
   breathing room. The two are not siblings - an Umbraco form wraps the
   password half - so the space has to come from below this link, not above
   the next field.
   -------------------------------------------------------------------------- */

body.cel-theme .create-password .form-cta:has(#change-email-link) {
	display: block;
	width: auto;
	padding: var(--space-2) 0 var(--space-6);
}

/* ---- The reset-password modal stays white ----------------------------------
   Deliberately NOT on the panel grey. It is a dialog over a dimmed page, not
   a panel on a page, and a grey dialog on a dimmed backdrop loses its edge.
   Every field inside it still looks right because the field and text tokens
   are surface-independent by design - see celebrus-tokens.css block B3.
   -------------------------------------------------------------------------- */

/* ---- Panel responsive ------------------------------------------------- */

@media (max-width: 767.98px) {
	body.cel-theme .login-page,
	body.cel-theme .create-password,
	body.cel-theme .create-account,
	body.cel-theme .account-created {
		padding: var(--space-8) var(--space-4) var(--space-10);
	}

	body.cel-theme .login-page > .column-one,
	body.cel-theme .login-page > .column-two,
	body.cel-theme .create-password > .column-one,
	body.cel-theme .create-account > .column-one,
	body.cel-theme .account-created > .column-one,
	body.cel-theme .account-created > .column-two {
		padding: var(--space-5);
		/* radius intentionally NOT reduced here - it comes from
		   --radius-panel like everywhere else. */
	}
}

@media (max-width: 575.98px) {
	body.cel-theme .login-page,
	body.cel-theme .create-password,
	body.cel-theme .create-account,
	body.cel-theme .account-created {
		padding: var(--space-6) var(--space-3) var(--space-8);
	}
}

/* ==========================================================================
   END celebrus-portal.css
   ========================================================================== */


/* ==========================================================================
   14. USER PROFILE                              comp screen 06
   --------------------------------------------------------------------------
   Built 4 September 2026 from "Portal redesign alignment2\Portal
   Redesign.dc.html", screen 06, rather than from the earlier comp folder.

   SCREEN 06 IS VERIFIED. It renders correctly - Anton's 4 Sep screenshot
   shows the page populated with real member data - so restyling it cannot
   confuse an upgrade defect with a redesign one. That was the condition for
   coming out of the fence, and it is met. The documentation reader is still
   the only screen in scope that has never been confirmed.

   Everything here is scoped to .user-profile-grid or to the banner directly
   preceding it, so no other screen moves.
   ========================================================================== */

/* ---- The hero -------------------------------------------------------------
   Profile.cshtml uses a plain .generic-banner, NOT .generic-banner.image-banner
   like the login page, which is why it was still rendering as the legacy grey
   band while every other hero had moved to navy.

   Scoped with :has(+ .user-profile-grid) rather than by restyling
   .generic-banner outright - that class is used on screens still on the
   legacy sheet, and this pass is not supposed to touch them.
   -------------------------------------------------------------------------- */





/* The comp puts a "YOUR ACCOUNT" eyebrow above the headline. NOT IMPLEMENTED,
   deliberately: there is no element for it, and faking it with ::before
   content would put page copy in a stylesheet where it cannot be translated,
   edited or reliably read by assistive tech. It needs one line in
   Profile.cshtml:
       <p class="eyebrow">Your account</p>
   The .eyebrow class is already defined in section 7 and measures 7.22:1 on
   navy, so the markup is the only thing missing. */

/* ---- The Paper band and the card ------------------------------------------
   main stays white globally (see section 2), so the band is painted here via
   :has() rather than by changing main for every screen.
   -------------------------------------------------------------------------- */

/* Uses the SAME panel tokens as every other form card - see the control
   point in celebrus-tokens.css. It previously declared --bg-1 / --bg-2 /
   36px / --radius-lg directly, which meant a change to --surface-panel would
   have moved six screens and quietly left this one behind. That is the exact
   failure mode Anton asked to rule out. */
/* The band for this screen is declared with every other form screen in
   section 8 - see the note there about why it belongs on main. */
body.cel-theme .user-profile-grid {
	display: flex;
	flex-direction: column;
	gap: 28px;
	box-sizing: border-box;
	max-width: var(--panel-max);
	margin: 48px auto 80px;
	padding: var(--panel-pad);
	background: var(--surface-panel);
	border: var(--border-w-1) solid var(--border-1);
	border-radius: var(--radius-panel);
	box-shadow: var(--shadow-sm);
}

/* ---- Name, and the avatar disc --------------------------------------------
   The comp shows a 56px gradient disc carrying the member's initials next to
   the greeting. CSS cannot derive initials from "Welcome, Anton David", so
   the disc is drawn as pure decoration with no text - it reads as an avatar
   placeholder, which is the composition the comp wants, without inventing
   data.

   For the real thing with initials, Profile.cshtml needs one element; the
   --gradient-avatar token has been waiting in celebrus-tokens.css since the
   header pass for exactly this.
   -------------------------------------------------------------------------- */

body.cel-theme .user-profile-grid > h2 {
	display: flex;
	align-items: center;
	gap: var(--space-4);
	margin: 0;
	font-family: var(--font-display);
	font-size: 26px;
	line-height: 32px;
	font-weight: var(--fw-bold);
	letter-spacing: var(--tracking-tight-2);
	color: var(--fg-1); /* 11.16:1 */
}

body.cel-theme .user-profile-grid > h2::before {
	content: "";
	flex: none;
	width: 56px;
	height: 56px;
	border-radius: var(--radius-pill);
	background: var(--gradient-fingerprint);
}

/* ---- The detail rows ------------------------------------------------------
   Two columns, one hairline above every row and one below the last pair.
   -------------------------------------------------------------------------- */

body.cel-theme .user-profile-rows {
	display: grid;
	grid-template-columns: 120px 1fr;
	column-gap: var(--space-4);
	row-gap: 0;
}

body.cel-theme .user-profile-rows > span {
	display: block;
	padding: var(--space-3) 0;
	border-top: var(--border-w-1) solid var(--c-mist-100);
	margin: 0;
}

/* Closes the last row off. -n+2 catches the final label AND its value. */
body.cel-theme .user-profile-rows > span:nth-last-child(-n+2) {
	border-bottom: var(--border-w-1) solid var(--c-mist-100);
}

body.cel-theme .user-profile-rows > span.user-profile-label {
	font-size: var(--fs-caption);
	line-height: var(--lh-caption);
	font-weight: var(--fw-bold);
	letter-spacing: 0.04em;
	text-transform: uppercase;
	/* The comp uses --c-mist-400 here, which is 3.04:1 on white and fails AA
	   at 12px. --fg-3 is the surface-independent replacement: 5.50:1. Same
	   correction as the rest of the sheet, per the contrast doc. */
	color: var(--fg-3);
}

body.cel-theme .user-profile-rows > span.user-profile-value {
	font-size: 15px;
	line-height: var(--lh-body);
	font-weight: var(--fw-book);
	color: var(--fg-1);
}

/* The labels read "Email:", "Role:", "Company:" - the comp has no colons, and
   a colon is a text node that CSS cannot remove. Three characters to delete
   in Profile.cshtml. */

/* ---- Subscription checkbox ------------------------------------------------
   The comp wraps this in a soft panel. The markup is
   .support-bulletin-subscribe > form > input + span > label, so the FORM is
   the panel.
   -------------------------------------------------------------------------- */

body.cel-theme .user-profile-grid .support-bulletin-subscribe {
	display: block;
	margin: 0;
}

body.cel-theme .user-profile-grid .support-bulletin-subscribe form {
	display: flex;
	align-items: center;
	gap: var(--space-3);
	margin: 0;
	padding: var(--space-4);
	background: var(--bg-2);
	border: var(--border-w-1) solid var(--c-mist-100);
	border-radius: var(--radius-md);
}

body.cel-theme .user-profile-grid .support-bulletin-subscribe input[type=checkbox] {
	flex: none;
	width: 18px;
	height: 18px;
	margin: 0;
	accent-color: var(--c-cta-bg);
	cursor: pointer;
}

body.cel-theme .user-profile-grid .support-bulletin-subscribe label {
	position: static;
	transform: none;
	font-size: var(--fs-small);
	line-height: var(--lh-small);
	font-weight: var(--fw-book);
	letter-spacing: normal;
	text-transform: none;
	color: var(--fg-2); /* 7.14:1 on Paper */
	cursor: pointer;
}

/* ---- Log out -------------------------------------------------------------
   THE COMP DRAWS THIS AS A GHOST BUTTON, NOT THE FILLED PRIMARY, and the
   markup disagrees with the design: Profile.cshtml gives it
   class="primary-cta".

   The design is right. Logging out is a utility action - it should not carry
   the same weight as Continue or Sign in, and it is the only button on a page
   where nothing else competes with it. So it is overridden here rather than
   inheriting the global pill from section 9.

   THE MARKUP IS WHAT SHOULD CHANGE. class="primary-cta" -> class="cel-btn-ghost"
   in Profile.cshtml would delete this whole block, and .cel-btn-ghost already
   exists and already looks like this. Logged rather than left as a surprise
   for whoever wonders why one .primary-cta is not blue.
   -------------------------------------------------------------------------- */

body.cel-theme .user-profile-grid .form-cta {
	padding: 0;
	text-align: left;
}

body.cel-theme .user-profile-grid .form-cta .primary-cta {
	display: inline-flex;
	align-items: center;
	gap: var(--space-3);
	height: var(--field-h);
	padding: 0 var(--space-6);
	border: var(--border-w-1) solid var(--c-mist-200);
	border-radius: var(--radius-pill);
	background: var(--bg-1);
	color: var(--fg-1); /* navy on white = 11.16:1 */
	font-size: var(--fs-small);
	font-weight: var(--fw-bold);
	transition: border-color var(--duration-fast) var(--ease-out), color var(--duration-fast) var(--ease-out);
}

body.cel-theme .user-profile-grid .form-cta .primary-cta:hover {
	background: var(--bg-1);
	border-color: var(--c-blue-aa);
	color: var(--c-blue-aa);
}

/* The 1px mist border is 1.36:1 against white, which would matter under
   1.4.11 if it were the only thing identifying the control. It is not - the
   word "Log out" is right there. Same reasoning as the pill in AE-1, and it
   is why that exception is scoped to fills rather than to borders. */

/* ---- Not reachable from CSS, logged instead -------------------------------
   The comp's breadcrumb reads "Portal Home / User profile". TopNavigation
   renders only the home link; there is no crumb for the current page and no
   separator. Adding them is a markup change in TopNavigation.cshtml.
   -------------------------------------------------------------------------- */

@media (max-width: 767.98px) {
	body.cel-theme .user-profile-grid {
		margin: var(--space-8) var(--space-4) var(--space-10);
		padding: var(--space-6);
		gap: var(--space-5);
	}

	body.cel-theme .user-profile-grid > h2 {
		font-size: var(--fs-h4);
		line-height: var(--lh-h4);
	}

	body.cel-theme .user-profile-grid > h2::before {
		width: 44px;
		height: 44px;
	}

	/* Two columns do not fit at 375; label above value instead. */
	body.cel-theme .user-profile-rows {
		grid-template-columns: 1fr;
	}

	body.cel-theme .user-profile-rows > span.user-profile-value {
		padding-top: 0;
		border-top: 0;
	}

	body.cel-theme .user-profile-rows > span:nth-last-child(-n+2) {
		border-bottom: 0;
	}

	body.cel-theme .user-profile-rows > span:last-child {
		border-bottom: var(--border-w-1) solid var(--c-mist-100);
	}

	body.cel-theme .generic-banner:has(+ .user-profile-grid) {
		padding: var(--space-8) var(--space-4);
	}

	body.cel-theme .generic-banner:has(+ .user-profile-grid) h1 {
		font-size: 28px;
		line-height: 34px;
	}
}


/* ==========================================================================
   15. PORTAL HOME                               comp screen 03
   --------------------------------------------------------------------------
   Built 4 September 2026 from "Portal redesign alignment2\Portal
   Redesign.dc.html", screen 03. MainMenu.cshtml renders the tab row and the
   card grid; the hero is HomePage.cshtml and was already handled by the
   .generic-banner.image-banner rules in section 7.

   SCREEN 03 IS VERIFIED - Anton's screenshot shows it populated with real
   menu content from Umbraco.

   *** THIS PASS REQUIRED A JAVASCRIPT CHANGE. *** Masonry was initialised on
   .support-home-target .content-items and absolutely positioned every card,
   which would have collapsed any CSS grid here, and it cannot produce the
   comp's three equal-height cards - packing unequal heights is what masonry
   is FOR. It is removed in script.js; the reasoning is written up there.
   Nothing positions these cards from JavaScript any more.
   ========================================================================== */

/* The Paper band for this screen is declared with every other screen in the
   single main:has() rule in section 8. The tab row paints itself white on
   top of it. */

/* ---- Tab row --------------------------------------------------------------
   Legacy drew this as a dark navy strip with grey folder-tabs. The comp is a
   white bar with a hairline, the label in navy bold, and a 3px rule under the
   active one.
   -------------------------------------------------------------------------- */

/* The white bar spans the full width while the tabs themselves line up with
   the 1200px content column. There is no wrapper element to hang that on, so
   it is done with asymmetric padding rather than a wrapper:

       padding-inline: max(24px, (100% - 1200px) / 2)

   i.e. centre the content column, but never less than the 24px gutter on a
   narrow viewport. One declaration, no extra element, and nothing to keep in
   sync. My first attempt used box-shadow: 0 0 0 100vmax plus a clip-path to
   fake the full bleed - it worked, but it is the kind of trick that survives
   right up until someone needs a real shadow on this element. */
body.cel-theme .support-home-tabs {
	display: flex;
	gap: var(--space-5);
	align-items: stretch;
	margin: 0;
	max-width: none;
	padding: 0 max(var(--space-6), calc((100% - var(--container-max)) / 2));
	background: var(--surface-panel);
	border-bottom: var(--border-w-1) solid var(--c-mist-100);
}

body.cel-theme .support-home-tabs .support-home-tab {
	display: block;
}

body.cel-theme .support-home-tabs .support-home-tab + .support-home-tab {
	margin-left: 0; /* the flex gap owns the spacing; legacy set 10px here */
}

body.cel-theme .support-home-tabs .support-home-tab > a {
	display: inline-flex;
	align-items: center;
	height: auto;
	padding: 18px var(--space-1);
	border: 0;
	border-radius: 0;
	background-color: transparent;
	background-image: var(--nav-underline);
	background-repeat: no-repeat;
	background-position: left bottom;
	background-size: 0% var(--border-w-3);
	color: var(--fg-1); /* 11.16:1 on white */
	font-family: var(--font-sans);
	font-size: var(--fs-small);
	font-weight: var(--fw-bold);
	line-height: 1.2;
	text-decoration: none;
	transition: background-size var(--duration-slow) var(--ease-out),
	            color var(--duration-base) var(--ease-out);
}

/* MainMenu.cshtml splits a title beginning "Celebrus " into a <span> plus the
   remainder, and the legacy sheet shrank that span to 12px so the tab read at
   two different sizes. The comp has one size. */
body.cel-theme .support-home-tabs .support-home-tab > a > span {
	display: inline;
	font-size: inherit;
	font-weight: inherit;
}

body.cel-theme .support-home-tabs .support-home-tab > a:hover,
body.cel-theme .support-home-tabs .support-home-tab > a:focus-visible {
	background-size: 100% var(--border-w-3);
	background-color: transparent;
	color: var(--fg-1);
}

/* The current tab. transition:none so it is simply drawn on load rather than
   wiping in on every page view - same treatment as the nav bar. */
body.cel-theme .support-home-tabs .support-home-tab.active > a {
	background-size: 100% var(--border-w-3);
	background-color: transparent;
	color: var(--fg-1);
	transition: none;
}

/* ---- The card grid -------------------------------------------------------
   Three equal columns, equal heights. .content-items previously carried
   overflow:hidden (to contain the masonry float) and each .content-item was
   a fixed 230px - both are undone here.
   -------------------------------------------------------------------------- */

body.cel-theme .support-home-targets {
	padding: 44px var(--space-6) 72px;
}

body.cel-theme .support-home-targets .content-items {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: var(--space-6);
	max-width: var(--container-max);
	margin: 0 auto;
	overflow: visible; /* was hidden, for masonry */
}

/* ---- Defensive: survive Masonry if it ever runs again ---------------------
   THE ONLY !important IN THIS SHEET OUTSIDE THE REDUCED-MOTION BLOCK, AND
   IT IS EARNED. (That block uses `animation: none !important` to cancel a
   legacy keyframe animation - the other legitimate case.)

   Masonry writes INLINE styles - position/left/top on every .content-item and
   a fixed height on the container. Inline styles beat any selector, however
   specific, so !important is the only thing that can override them. This is
   the textbook case for it: a third-party script writing inline geometry.

   Why it is here at all: the init was removed from script.js in this same
   change-set, but CSS and JS are promoted as separate files and a stale
   script.js is enough to bring masonry back. When that happened, the symptom
   was NOT an obvious break - the cards kept their gradient caps, radii and
   shadows, so the styling looked applied, while the grid silently collapsed
   and the cards shrink-wrapped to their content and wrapped to a second row.
   Easy to misread as a CSS bug. This makes the layout correct whether or not
   the JS made it across.

   If masonry is genuinely gone these four declarations do nothing.
   -------------------------------------------------------------------------- */

body.cel-theme .support-home-targets .content-items {
	height: auto !important; /* masonry sets an inline pixel height */
}

body.cel-theme .support-home-targets .content-item {
	position: static !important; /* masonry sets position:absolute */
	left: auto !important;
	top: auto !important;
}

body.cel-theme .support-home-targets .content-item {
	display: flex;
	flex-direction: column;
	/* Equal heights across the row. Grid's default align-items IS stretch, so
	   this is already the behaviour - declared anyway because "the cards must
	   match height" is a design requirement, not an accident of a default,
	   and the last time I relied on the reverse (align-items:start on the
	   login grid) it produced two cards of different heights. */
	align-self: stretch;
	gap: var(--space-4);
	box-sizing: border-box;
	width: auto; /* was a fixed 230px */
	padding: 26px 28px 28px;
	border: var(--border-w-1) solid var(--border-1);
	border-radius: var(--radius-panel);
	box-shadow: var(--shadow-sm);
	/* The 4px gradient cap along the top edge. Drawn as a background layer
	   rather than a pseudo-element so it needs no positioning context and
	   cannot be knocked out by a stray `background: none`.
	   background-origin: border-box is REQUIRED - the default is padding-box,
	   which would inset the strip by the 28px side padding instead of running
	   it edge to edge. */
	background-color: var(--surface-panel);
	background-image: var(--nav-underline);
	background-repeat: no-repeat;
	background-position: top left;
	background-size: 100% 4px;
	background-origin: border-box;
}

body.cel-theme .support-home-targets .content-item h4 {
	margin: 0;
	padding: 0;
	min-height: 0;
	font-family: var(--font-display);
	font-size: 20px;
	line-height: 26px;
	font-weight: var(--fw-bold);
	letter-spacing: var(--tracking-tight-2);
	color: var(--fg-1);
}

body.cel-theme .support-home-targets .content-subitems {
	display: flex;
	flex-direction: column;
	gap: 2px;
}

/* The comp makes these navy body copy, not blue links - the card heading
   already signals the group, so the items do not need to shout. Each carries
   a hairline above it, which also draws the rule under the heading. */
body.cel-theme .support-home-targets .content-subitems > a {
	display: block;
	align-self: stretch;
	min-height: 0;
	padding: 9px 0;
	border-top: var(--border-w-1) solid var(--c-mist-100);
	font-size: 15px;
	line-height: var(--lh-body);
	font-weight: var(--fw-book);
	color: var(--fg-1); /* 11.16:1 */
	text-decoration: none;
	transition: color var(--duration-fast) var(--ease-out);
}

body.cel-theme .support-home-targets .content-subitems > a:hover,
body.cel-theme .support-home-targets .content-subitems > a:focus-visible {
	color: var(--fg-link); /* 6.45:1 */
	text-decoration: underline;
}

/* Menu tabs whose children have no sub-items render .nav-item instead of
   .content-item; keep them from inheriting the card treatment. */
body.cel-theme .support-home-targets .content-items > .nav-item {
	display: block;
	border: 0;
	background: none;
	box-shadow: none;
}

/* ---- Responsive ---------------------------------------------------------- */

@media (max-width: 991.98px) {
	body.cel-theme .support-home-targets .content-items {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media (max-width: 767.98px) {
	body.cel-theme .support-home-tabs {
		padding: 0 var(--space-4);
	}

	body.cel-theme .support-home-targets {
		padding: var(--space-8) var(--space-4) var(--space-10);
	}

	body.cel-theme .support-home-targets .content-items {
		grid-template-columns: 1fr;
		gap: var(--space-5);
	}

	body.cel-theme .support-home-targets .content-item {
		padding: var(--space-5) var(--space-6) var(--space-6);
	}
}


/* ==========================================================================
   16. DOCUMENTATION READER - sidebar only        comp screen 04
   --------------------------------------------------------------------------
   Built 4 September 2026. PARTIAL, DELIBERATELY - read the scope note.

   SCREEN 04 IS NOW VERIFIED, which closes the last outstanding item from
   REDESIGN-PLAN step 0. It was flagged as never confirmed since the Umbraco
   13 to 17 upgrade because of the 07.5 Nested Content to Block List
   conversion; Anton's 4 Sep screenshot shows it rendering a real document
   with its heading, version stamp, blockquote and numbered sections intact.
   All eight screens in scope have now been seen working.

   WHAT THIS SECTION DOES NOT DO, AND WHY.
   The comp draws three grid columns - sidebar 288 / table of contents 264 /
   content 1fr. The markup has TWO: .versions-sidebar and .versions-content
   inside .versions-grid. The table of contents is not rendered by any view,
   is not built by script.js, and has no class of its own in either
   stylesheet - it appears to come from the DOCUMENT'S OWN CONTENT, i.e. the
   converted Block List body of the Umbraco document.

   That matters: if the TOC is content, then giving .versions-content the
   comp's `padding: 40px 64px 64px` would indent the TOC by 64px as well and
   break a layout that currently looks correct. So the grid tracks and the
   content padding are LEFT ALONE pending confirmation of where the TOC comes
   from. Guessing here costs more than asking.

   What IS unambiguous is the sidebar: it is still the legacy #F0F0F0 grey at
   250px with 15px of padding, where the comp asks for Paper at 288px with
   28/24/48 and a hairline down its right edge. Self-contained, no dependency
   on the TOC question, so it is done.
   ========================================================================== */

body.cel-theme .versions-sidebar {
	box-sizing: border-box;
	width: 288px; /* comp; was 250px */
	padding: 28px var(--space-6) var(--space-12); /* comp: 28px 24px 48px */
	background-color: var(--surface-panel-page); /* comp #F7F9FC; was #F0F0F0 */
	border-right: var(--border-w-1) solid var(--c-mist-100);
}

/* The legacy sheet re-declares width:auto on .versions-sidebar inside its
   own media query, which is how the sidebar collapses on narrow screens.
   That behaviour is kept - this only restates the box at the agreed
   breakpoints rather than the retired 1279px one. */
@media (max-width: 991.98px) {
	body.cel-theme .versions-sidebar {
		width: auto;
		padding: var(--space-5) var(--space-4);
		border-right: 0;
		border-bottom: var(--border-w-1) solid var(--c-mist-100);
	}
}

/* The two sidebar field groups. The comp labels them in 11px uppercase
   navy-80 and gives both controls a 40px box with a mist-200 border and a
   10px radius - the same field treatment as everywhere else in the portal,
   which the sidebar had never picked up. */
body.cel-theme .versions-sidebar .label {
	display: block;
	margin: 0 0 var(--space-2);
	font-family: var(--font-sans);
	font-size: 11px;
	line-height: var(--lh-caption);
	font-weight: var(--fw-bold);
	letter-spacing: var(--tracking-caps);
	text-transform: uppercase;
	color: var(--c-navy-80); /* 5.87:1 on Paper */
}

body.cel-theme .versions-sidebar .sidebar-select {
	padding-bottom: 22px; /* comp gap between the two groups */
}

body.cel-theme .versions-sidebar .graphical-select {
	box-sizing: border-box;
	display: flex;
	align-items: center;
	height: 40px;
	padding: 0 34px 0 var(--space-3);
	background: var(--surface-panel);
	border: var(--border-w-1) solid var(--border-control);
	border-radius: var(--radius-md);
	font-family: var(--font-sans);
	font-size: var(--fs-small);
	font-weight: var(--fw-book);
	color: var(--fg-1);
}

body.cel-theme .versions-sidebar .graphical-select::before {
	right: var(--space-3);
	top: 50%;
	transform: translateY(-50%);
	font-size: var(--fs-caption);
	color: var(--fg-link);
}

body.cel-theme .versions-sidebar .sidebar-search .search-field {
	position: relative;
	display: block;
}

body.cel-theme .versions-sidebar .sidebar-search .search-field input[type=text] {
	box-sizing: border-box;
	width: 100%;
	height: 40px;
	padding: 0 36px 0 var(--space-3);
	background: var(--surface-panel);
	border: var(--border-w-1) solid var(--border-control);
	border-radius: var(--radius-md);
	font-family: var(--font-sans);
	font-size: var(--fs-small);
	font-weight: var(--fw-book);
	color: var(--fg-1);
	outline: none;
}

body.cel-theme .versions-sidebar .sidebar-search .search-field input[type=text]:focus-visible {
	border-color: var(--c-blue-aa);
	box-shadow: var(--shadow-glow-blue);
	outline: var(--focus-ring-width) solid var(--focus-ring);
	outline-offset: var(--focus-ring-offset);
}

/* This one is a plain inline icon, NOT the header's filled blue disc - the
   header rule is scoped under `header` precisely so it cannot reach here. */
body.cel-theme .versions-sidebar .sidebar-search .search-field > a {
	position: absolute;
	right: var(--space-3);
	top: 50%;
	transform: translateY(-50%);
	display: inline-flex;
	width: auto;
	height: auto;
	background: none;
	border-radius: 0;
	color: var(--fg-link); /* 6.11:1 on Paper */
	font-size: var(--fs-small);
	text-decoration: none;
}

body.cel-theme .versions-sidebar .sidebar-search .search-field > a:hover {
	background: none;
	color: var(--fg-link-hover);
}


/* ==========================================================================
   17. SEARCH RESULTS                            comp screen 07
   --------------------------------------------------------------------------
   Built 4 September 2026 from alignment2 screen 07.

   Screen 07's function was verified before this workstream began - and the
   plan carries a specific warning about it: this view "was excluded from
   compilation until recently - do not reintroduce that". Nothing here
   touches compilation, but it is worth repeating where someone will see it.

   ONE STRUCTURAL DEVIATION, AND IT IS THE MARKUP'S FAULT, NOT A CHOICE.
   The comp puts "Filtered by", the filter chips, "Change filters", "Results
   per page" and the select together in a single white card below the hero.
   The markup splits them: the chips and "Change filters" are inside the
   <hgroup> IN THE BANNER, while results-per-page lives in .pagination-grid
   further down. They cannot be merged without moving markup.

   So the chips stay in the hero and are styled for navy, and the first
   .pagination-grid becomes the white control card. It reads well - a filter
   summary belongs with the query it describes - but it is not what the comp
   draws, and the note is here so nobody assumes I missed it.
   ========================================================================== */

/* ---- The hero ------------------------------------------------------------
   .search-banner > .generic-banner, so scoped by the parent rather than by
   .image-banner, which this screen does not use.
   -------------------------------------------------------------------------- */




/* The h2 is the result summary line, not a heading - "Your search for X
   returned N results". Comp: 16/24 book in blue-20 with the term in white. */
body.cel-theme .search-banner .generic-banner h2 {
	margin: 0;
	padding: 0;
	font-family: var(--font-sans);
	font-size: var(--fs-body);
	line-height: var(--lh-body);
	font-weight: var(--fw-book);
	letter-spacing: normal;
	color: var(--fg-on-navy-2); /* 9.00:1 */
}

body.cel-theme .search-banner .generic-banner h2 strong {
	font-weight: var(--fw-bold);
	color: var(--fg-on-navy); /* 11.16:1 */
}

body.cel-theme .search-banner .generic-banner h2 a,
body.cel-theme .search-banner .generic-banner p a {
	color: var(--fg-on-navy-eyebrow); /* blue-40, 7.22:1 */
	text-decoration: underline;
}

body.cel-theme .search-banner .generic-banner p {
	margin: var(--space-3) 0 0;
	max-width: 90ch;
	font-size: var(--fs-small);
	line-height: var(--lh-small);
	color: var(--fg-on-navy-2);
}

/* ---- Filter chips, in the hero ------------------------------------------ */

body.cel-theme .search-banner .generic-banner .label {
	display: inline-block;
	margin-right: var(--space-3);
	font-size: 11px;
	font-weight: var(--fw-bold);
	letter-spacing: var(--tracking-caps);
	text-transform: uppercase;
	color: var(--fg-on-navy-2); /* 9.00:1 */
}

/* The comp's chip exactly - mist-100 with navy text, which reads 9.34:1 and
   works as well on the navy hero as it does on a white card. */
body.cel-theme .search-banner .generic-banner .filter-item {
	display: inline-flex;
	align-items: center;
	height: 28px;
	margin: 0 var(--space-2) var(--space-2) 0;
	padding: 0 var(--space-3);
	border-radius: var(--radius-pill);
	background: var(--bg-3);
	font-size: var(--fs-caption);
	font-weight: var(--fw-bold);
	color: var(--fg-1); /* 9.34:1 on mist-100 */
}

/* "Change filters" / "Filter results" are marked .primary-cta in the markup,
   which would inherit the global blue pill. On navy that is the wrong weight
   for a secondary control, so it becomes a white ghost pill - the same
   reasoning as Profile's Log out, and the same note applies: the markup
   should say .cel-btn-ghost. */
body.cel-theme .search-banner .generic-banner .primary-cta {
	display: inline-flex;
	align-items: center;
	height: 32px;
	padding: 0 var(--space-4);
	border: var(--border-w-1) solid var(--fg-on-navy);
	border-radius: var(--radius-pill);
	background: transparent;
	color: var(--fg-on-navy); /* 11.16:1 */
	font-size: var(--fs-caption);
	font-weight: var(--fw-bold);
}

body.cel-theme .search-banner .generic-banner .primary-cta:hover {
	background: var(--fg-on-navy);
	color: var(--fg-1); /* navy on white, 11.16:1 */
}

/* ---- The results column -------------------------------------------------- */

body.cel-theme .search-results {
	max-width: var(--container-max);
	margin: 0 auto;
	padding: 28px var(--space-6) 72px;
}

/* The FIRST .pagination-grid carries results-per-page, and becomes the comp's
   control card. :has() rather than :first-of-type - the markup renders a
   second one at the bottom and position is a weaker thing to depend on than
   contents. */
body.cel-theme .search-results .pagination-grid:has(.results-per-page) {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: var(--space-4);
	margin-bottom: var(--space-5);
	padding: var(--space-4) var(--space-5);
	background: var(--surface-panel);
	border: var(--border-w-1) solid var(--border-1);
	border-radius: var(--radius-panel);
	box-shadow: var(--shadow-xs);
}

body.cel-theme .search-results .results-per-page {
	display: flex;
	align-items: center;
	gap: var(--space-2);
	margin: 0;
	text-align: left;
	font-size: var(--fs-caption);
	font-weight: var(--fw-bold);
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: var(--fg-3); /* 5.50:1 - the comp uses mist-400 at 3.04 */
}

body.cel-theme .search-results .results-per-page select {
	height: 32px;
	padding: 0 var(--space-2);
	background: var(--surface-panel);
	border: var(--border-w-1) solid var(--border-control);
	border-radius: var(--radius-sm);
	font-family: var(--font-sans);
	font-size: 13px;
	font-weight: var(--fw-book);
	text-transform: none;
	letter-spacing: normal;
	color: var(--fg-1);
}

/* ---- Result cards -------------------------------------------------------- */

body.cel-theme .search-results .search-results-items {
	display: flex;
	flex-direction: column;
	gap: var(--space-3);
	font-size: inherit;
	line-height: inherit;
}

body.cel-theme .search-results .search-results-item {
	display: flex;
	flex-direction: column;
	gap: var(--space-2);
	padding: 22px var(--space-6);
	background: var(--surface-panel);
	border: var(--border-w-1) solid var(--border-1);
	border-radius: var(--radius-panel);
	box-shadow: var(--shadow-xs);
}

/* Kills the legacy #E9F4FC zebra stripe on odd rows. Separate cards carry the
   grouping now, so alternating fills would just be noise. */
body.cel-theme .search-results .search-results-item:nth-child(odd) {
	background: var(--surface-panel);
}

body.cel-theme .search-results .search-results-item .result-title > a {
	font-size: 18px;
	line-height: 24px;
	font-weight: var(--fw-bold);
	/* The comp uses the brand blue here, which is 2.97:1 as text. --fg-link
	   is the surface-independent replacement at 6.45:1. Same correction as
	   every other link in the portal. */
	color: var(--fg-link);
	text-decoration: none;
}

body.cel-theme .search-results .search-results-item .result-title > a:hover {
	color: var(--fg-link-hover);
	text-decoration: underline;
}

body.cel-theme .search-results .search-results-item .result-description {
	font-size: var(--fs-small);
	line-height: 21px;
	font-weight: var(--fw-book);
	color: var(--fg-2); /* 7.53:1 */
}

body.cel-theme .search-results .search-results-item .result-info {
	display: flex;
	flex-wrap: wrap;
	gap: var(--space-2) 18px;
}

body.cel-theme .search-results .search-results-item .result-info > span {
	font-size: 11px;
	line-height: var(--lh-caption);
	font-weight: var(--fw-bold);
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--fg-3); /* 5.50:1 - comp used mist-400 at 3.04 */
}

/* ---- Pagination ---------------------------------------------------------- */

body.cel-theme .search-results .pagination {
	display: flex;
	justify-content: center;
	flex-wrap: wrap;
	gap: 6px;
	margin: 0;
	padding: 0;
	list-style: none;
}

body.cel-theme .search-results .pagination .page-item {
	list-style: none;
	margin: 0;
	padding: 0;
	background: none;
}

body.cel-theme .search-results .pagination .page-link {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	box-sizing: border-box;
	width: 36px;
	height: 36px;
	padding: 0;
	border: var(--border-w-1) solid var(--border-1);
	border-radius: var(--radius-pill);
	background: var(--surface-panel);
	color: var(--fg-1); /* 11.16:1 */
	font-family: var(--font-sans);
	font-size: 13px;
	font-weight: var(--fw-bold);
	cursor: pointer;
	transition: border-color var(--duration-fast) var(--ease-out), color var(--duration-fast) var(--ease-out);
}

body.cel-theme .search-results .pagination button.page-link:hover {
	border-color: var(--c-blue-aa);
	color: var(--c-blue-aa);
}

body.cel-theme .search-results .pagination .page-link.current {
	border-color: var(--bg-dark);
	background: var(--bg-dark);
	color: var(--fg-inverse); /* white on navy, 11.16:1 */
}

/* The first/last and prev/next arrows render as <span> rather than <button>
   when they are unavailable. Greyed, and exempt from contrast requirements
   as a disabled control - which is also what the comp draws. */
body.cel-theme .search-results .pagination span.page-link {
	color: var(--c-mist-300);
	cursor: default;
}

/* The bottom .pagination-grid is pagination only - no card. */
body.cel-theme .search-results .pagination-grid:not(:has(.results-per-page)) {
	padding: var(--space-5) 0 0;
	background: none;
	border: 0;
	box-shadow: none;
}

/* ---- Responsive ---------------------------------------------------------- */

@media (max-width: 767.98px) {
	body.cel-theme .search-results {
		padding: var(--space-5) var(--space-4) var(--space-10);
	}

	body.cel-theme .search-results .search-results-item {
		padding: var(--space-5);
	}

	body.cel-theme .search-results .pagination-grid:has(.results-per-page) {
		flex-direction: column;
		align-items: flex-start;
	}
}


/* ==========================================================================
   18. ROW LISTS - one card treatment for every "list of items" screen
   --------------------------------------------------------------------------
   Built 4 September 2026, in answer to "do the same for other items".

   The portal has the SAME PATTERN under five different class names, each
   with its own zebra stripe in the legacy sheet:

     .versions-results-item   software downloads + documents (the Geolocation
                              page, "Other Software Downloads")
     .documents-item          DocumentCollection
     .bulletins-item          BulletinCollection - comp screen 08
     .search-results-item     handled in section 17

   Rather than write a fifth and sixth per-screen rule, they share one
   definition here. Adding a new list means adding its class to the selector
   list below - not writing another block. That is the same discipline as the
   single main:has() band rule, and for the same reason: I have had three
   separate drifts today from keeping "identical" rules in sync by hand.

   .release-note-item WAS in this list and has been removed: it exists in the
   legacy stylesheet and in NO view and NO script. A dead class, styled
   because I read the selector list out of stylesheet.css instead of checking
   the markup - the same mistake as the #frmSignupComplete id earlier today.
   The guard that checks every targeted class against the views is what
   caught it, which is the second dead selector it has found.

   ONE THING DELIBERATELY LEFT OUT: .faq-section. It also carries a stripe,
   but it is an accordion driven by faqParts() in script.js, with
   .faq-questions / .faq-answer children that slide. Giving it a card
   treatment without seeing it render is how you break a working widget - and
   it is the one remaining list I have not seen on screen.
   ========================================================================== */

/* THE CARD CHROME IS SHARED. THE INTERNAL LAYOUT IS NOT.
   Corrected 4 Sep. The first version set display:block and one padding on all
   three, which FLATTENED the support bulletin - that item is a THREE-COLUMN
   GRID (title+synopsis / release notes / downloads), not a stacked row, so a
   working 3-up layout became a vertical list.

   The consolidation was right about the card and wrong about the contents.
   Background, border, radius and shadow really are the same on every list;
   how each item arranges itself inside is not. See section 19 for the
   bulletin's own grid. */
body.cel-theme .versions-results-item,
body.cel-theme .documents-item,
body.cel-theme .bulletins-item {
	margin: 0;
	background: var(--surface-panel);
	border: var(--border-w-1) solid var(--border-1);
	border-radius: var(--radius-panel);
	box-shadow: var(--shadow-xs);
}

/* Stacked rows only. .documents-item is NOT one of these either - see
   section 20. By now three of the four lists have turned out to have their
   own internal structure, and only .versions-results-item is actually the
   stacked row I assumed they all were. */
body.cel-theme .versions-results-item {
	display: block;
	padding: 18px var(--space-6);
}

body.cel-theme .documents-item {
	display: block;
	padding: 0; /* the <a> carries the padding - it is the grid */
}

/* Kills the legacy zebra stripes on the CARD lists. There were five of them,
   on five different selectors, all in stylesheet.css - separate cards carry
   the grouping now, so alternating fills on top would just be noise.

   CORRECTED 7 Sep: this does NOT kill the one at stylesheet.css:5282, which
   is scoped to #versions-content and scores 1,3,0 against this rule's 0,3,1.
   The stripes on the documentation list have therefore been showing the whole
   time. Section 18b below now claims them deliberately. */
/* :not(.document) EXCLUDES THE TABLE DELIBERATELY. Without it this rule and
   the .document row rule in 18b both score 0,3,1 and both set background, so
   which one won came down to source order between two of my own rules. That
   is how the three "identical rule" drifts earlier in this project happened.
   :not(.document) never matches a table row, so there is no tie to resolve. */
body.cel-theme .versions-results-item:not(.document):nth-child(odd),
body.cel-theme .versions-results-item:not(.document):nth-child(even),
body.cel-theme .documents-item:nth-child(odd),
body.cel-theme .bulletins-item:nth-child(odd) {
	background: var(--surface-panel);
}

body.cel-theme .versions-results-item:nth-child(odd) > a,
body.cel-theme .documents-item:nth-child(odd) > a {
	background: none;
}

/* Spacing between cards, whatever the wrapper is called. */
body.cel-theme .versions-results-items,
body.cel-theme .documents-items,
body.cel-theme .bulletins-items {
	display: flex;
	flex-direction: column;
	gap: var(--space-3);
}

/* --------------------------------------------------------------------------
   18b. .versions-results-item.document - A TABLE, NOT A STACK OF CARDS
   Added 7 September 2026.

   Anton: "Current versions which are not using the layout is clutered. See
   the old one it has clear title desc and the download link to the right.
   Can format that plus margin/padding top/bottom need to be reduced. too
   much white space."

   I BROKE THIS IN SECTION 18 AND THE COMMENT ABOVE SAYS WHY I DID.
   It reads "only .versions-results-item is actually the stacked row I assumed
   they all were". That is wrong, and it is the same mistake as the bulletin
   and release-note consolidation: ONE CLASS, TWO STRUCTURES.

       .versions-results-item.download   spans wrapped in an <a> - a stack
       .versions-results-item.document   four sibling spans - a TABLE ROW
                                         (title, description, view, download)

   stylesheet.css:1736 gave .document a real grid, 30% 1fr auto auto. My
   blanket "display: block" at the top of section 18 destroyed it, so the four
   spans reverted to inline flow and ran together as one paragraph of text -
   exactly the clutter in Anton's screenshot. Restored here, scoped to
   .document so the .download rows and the other three lists are untouched.

   WHY THIS BECOMES A FLUSH TABLE AND NOT TIGHTER CARDS. The old screen Anton
   is holding up is a table: full-bleed rows, alternating fill, no gutters. On
   a list of thirty documents that beats cards, because a card's border,
   radius, shadow and 12px gutter are repeated thirty times and all of it is
   the white space he is objecting to. So the WRAPPER takes the panel chrome
   once and the rows sit flush inside it. Scoped with :has() so a wrapper
   holding .download rows keeps the card treatment it has now.

   THE LEGACY ZEBRA WAS NEVER ACTUALLY KILLED HERE, and the section 18 comment
   claiming it was is wrong. stylesheet.css:5282 is
       #versions-content .versions-results-items .versions-results-item:nth-child(even)
   which carries an ID and scores 1,3,0. The kill rule above is 0,3,1, so the
   legacy rule wins and the stripes have been showing all along. That is
   lucky rather than clever - Anton wants them - so the rule below claims them
   deliberately at 1,5,1 and points them at --surface-row-alt, the token the
   documentation index uses. The two paths through this screen now stripe from
   one value. (The legacy --cel-hover is bridged to --c-mist-100 in section 1,
   so the colour on screen does not change; only what controls it does.)

   THE TITLE IS NOT A LINK, AND STOPS LOOKING LIKE ONE. A .document row has no
   <a> wrapper - the title is a bare span, and the only links are View and
   Download PDF. Section 18 gave .result-title --fg-link, so every title on
   this screen was rendering as bold blue text that cannot be clicked. That is
   a false affordance, and at 18px it was also most of the visual noise. Now
   --fg-1 at 16px, which leaves the blue to the two things that are real
   links. Reverting is one line if the size reads too small.

   Vertical space: row padding 18px -> 10px, wrapper gap 12px -> 0.
   -------------------------------------------------------------------------- */

body.cel-theme .versions-results-items:has(.versions-results-item.document) {
	gap: 0;
	/* The panel chrome, once, instead of once per row. overflow clips the first
	   and last rows into the radius so the stripe cannot square off a corner. */
	overflow: hidden;
	background: var(--surface-panel);
	border: var(--border-w-1) solid var(--border-1);
	border-radius: var(--radius-panel);
	box-shadow: var(--shadow-xs);
}

body.cel-theme .versions-results-item.document {
	/* 30% for the title, 1fr for the description, then the two actions at their
	   natural width. The 1fr is what pins View and Download PDF to the right
	   edge on every row: it absorbs all the slack, so the auto columns are
	   always flush right even when the View span is empty - which it is
	   whenever a document has no HTML version. That is also why the empty span
	   is left in place rather than hidden; removing it would shift Download PDF
	   into the wrong column and break the alignment row to row. */
	display: grid;
	grid-template-columns: 30% 1fr auto auto;
	gap: var(--space-2) var(--space-6);
	align-items: center;
	padding: 10px var(--space-5);
	/* The wrapper carries all of this now. */
	border: 0;
	border-radius: 0;
	box-shadow: none;
	background: var(--surface-panel);
}

body.cel-theme #versions-content .versions-results-items .versions-results-item.document:nth-child(even) {
	background: var(--surface-row-alt);
}

/* Not a link - see the note above. --fg-1 is 11.16:1 on white and 10.53:1 on
   a striped row. */
body.cel-theme .versions-results-item.document .result-title {
	font-size: 16px;
	line-height: 22px;
	font-weight: var(--fw-bold);
	color: var(--fg-1);
}

/* These two ARE the links. The legacy sheet paints an icon on each via a
   background-image and 24px of left padding; nothing here touches background
   or padding, so those survive. */
body.cel-theme .versions-results-item.document .result-view,
body.cel-theme .versions-results-item.document .result-download {
	white-space: nowrap;
}

@media (max-width: 767.98px) {
	/* Four columns will not fit, so the row becomes three stacked bands with
	   the two actions side by side - the same shape the legacy mobile rule
	   produced. Named areas rather than auto-placement, because auto-placement
	   would put View and Download PDF on separate rows. */
	body.cel-theme .versions-results-item.document {
		grid-template-columns: auto auto 1fr;
		grid-template-areas:
			"title    title    title"
			"desc     desc     desc"
			"view     download .";
		gap: var(--space-2) var(--space-5);
		align-items: start;
		padding: var(--space-3) var(--space-4);
	}

	body.cel-theme .versions-results-item.document .result-title { grid-area: title; }
	body.cel-theme .versions-results-item.document .result-description { grid-area: desc; }
	body.cel-theme .versions-results-item.document .result-view { grid-area: view; }
	body.cel-theme .versions-results-item.document .result-download { grid-area: download; }
}

/* ---- Shared item typography ----------------------------------------------
   Each of these wraps its content in an <a>, with spans for the title, the
   description and the meta. The class names differ per screen; the treatment
   does not.
   -------------------------------------------------------------------------- */

/* --------------------------------------------------------------------------
    18c. .versions-results-item.download - A TABLE TOO

    Anton, 6 Oct 2026: "make the apps downloads similar to old one liner. App
    name left assigned. Version, date and the download button to right."

    Same correction as 18b, same reason. The stacked card put the file name,
    the version, the date and the glyph on four separate centred lines, so one
    installer filled the height of a paragraph and a page of six needed
    scrolling to count them. These rows are scanned, not read: you arrive
    knowing you want the Windows installer and you want to find it, check the
    build, and click.

    STRUCTURAL DIFFERENCE FROM 18b, and it matters. A .document row has four
    sibling spans directly on the row. A .download row wraps its spans in an
    <a> - the whole row is the link. So the grid goes on the <a>, and the row
    itself keeps only the stripe. Putting the grid on the row would leave the
    <a> as a single flex child and every column would collapse into it.

    1fr on the title is what pins the meta flush right regardless of how long
    the file name is - the same trick as 18b, which is why both end up looking
    like one table.

    The synopsis, when a file has one, spans the full width on its own line
    beneath. It is prose; it does not belong in a column.
   -------------------------------------------------------------------------- */

body.cel-theme .versions-results-items:has(.versions-results-item.download) {
	gap: 0;
	overflow: hidden;
	background: var(--surface-panel);
	border: var(--border-w-1) solid var(--border-1);
	border-radius: var(--radius-panel);
	box-shadow: var(--shadow-xs);
}

body.cel-theme .versions-results-item.download {
	/* The wrapper carries the chrome now, once, instead of once per row. */
	padding: 0;
	border: 0;
	border-radius: 0;
	box-shadow: none;
	background: var(--surface-panel);
}

body.cel-theme #versions-content .versions-results-items .versions-results-item.download:nth-child(even) {
	background: var(--surface-row-alt);
}

body.cel-theme .versions-results-item.download > a {
	display: grid;
	grid-template-columns: 1fr auto auto auto;
	gap: var(--space-1) var(--space-5);
	align-items: center;
	padding: 10px var(--space-5);
	/* THE STRIPE LIVES ON THE ROW, SO THE LINK MUST BE TRANSPARENT.
	   stylesheet.css:1710 paints every .download > a solid #ffffff, and the
	   redesign's reset at the top of this section only clears it on
	   :nth-child(odd). So an even row was striped correctly and then covered
	   by a white link sitting on top of it - the stripe was being drawn the
	   whole time and never seen. Clearing it for ALL download rows, not just
	   odd ones, is the fix.
	   The legacy rule also draws a 1px white border, which would read as a
	   gap between rows now that they share one panel, so that goes too. */
	background: none;
	border: 0;
}

/* Keeping the legacy hover intent - the row highlights - but as a fill rather
   than a border colour, since the border is now gone. */
body.cel-theme .versions-results-item.download > a:hover {
	background: var(--surface-hover, rgba(0, 0, 0, .03));
}

body.cel-theme .versions-results-item.download .result-title {
	/* 18px was card scale. At row scale it matches .document's title exactly,
	   so the two lists read as the same table. */
	font-size: 16px;
	line-height: 22px;
	min-width: 0; /* let a long installer name shrink rather than push the meta off */
}

body.cel-theme .versions-results-item.download .result-version,
body.cel-theme .versions-results-item.download .result-date {
	white-space: nowrap;
}

body.cel-theme .versions-results-item.download .result-icon {
	justify-self: end;
	white-space: nowrap;
}

body.cel-theme .versions-results-item.download .result-synopsis {
	grid-column: 1 / -1;
}

@media (max-width: 767.98px) {
	/* Four columns will not fit. Name on its own line, meta and glyph beneath
	   it - same shape 18b falls back to. */
	body.cel-theme .versions-results-item.download > a {
		grid-template-columns: 1fr auto;
	}

	body.cel-theme .versions-results-item.download .result-title {
		grid-column: 1 / -1;
	}

	body.cel-theme .versions-results-item.download .result-date {
		justify-self: end;
	}

	body.cel-theme .versions-results-item.download .result-icon {
		grid-column: 2;
	}
}

body.cel-theme .versions-results-item > a {
	display: flex;
	flex-direction: column;
	gap: var(--space-2);
	text-decoration: none;
}

body.cel-theme .versions-results-item .result-title {
	font-size: 18px;
	line-height: 24px;
	font-weight: var(--fw-bold);
	/* --fg-link, not the comp's #009FE3: 6.45:1 rather than 2.97:1. The same
	   correction as every other link in the portal. */
	color: var(--fg-link);
}

body.cel-theme .versions-results-item > a:hover .result-title {
	color: var(--fg-link-hover);
	text-decoration: underline;
}

body.cel-theme .versions-results-item .result-synopsis,
body.cel-theme .versions-results-item .result-description,
body.cel-theme .documents-item .document-description,
body.cel-theme .bulletins-item .bulletin-description {
	font-size: var(--fs-small);
	line-height: 21px;
	font-weight: var(--fw-book);
	color: var(--fg-2); /* 7.53:1 */
}

body.cel-theme .bulletins-item .bulletin-description p {
	margin: 0;
	max-width: none;
}

/* The meta line: version, date, category, section. */
body.cel-theme .versions-results-item .result-version,
body.cel-theme .versions-results-item .result-date {
	font-size: 11px;
	line-height: var(--lh-caption);
	font-weight: var(--fw-bold);
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--fg-3); /* 5.50:1 - the legacy value was mist-400 at 3.04 */
}

/* The download / document glyph. Decorative, beside a text label. */
body.cel-theme .versions-results-item .result-icon {
	color: var(--fg-link);
	font-size: var(--fs-small);
}

/* "Partner use only" and similar flags stay a warning colour, but on a
   readable one - --status-warning is the brand's orange. */
body.cel-theme .versions-results-item .partner-use-only {
	font-size: 11px;
	font-weight: var(--fw-bold);
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--fg-warning); /* not --status-warning: that is 3.71:1 here */
}

/* The "View" / "Download PDF" actions on a document row. */
body.cel-theme .versions-results-item .result-view > a,
body.cel-theme .versions-results-item .result-download > a {
	font-size: var(--fs-small);
	font-weight: var(--fw-bold);
	color: var(--fg-link);
	text-decoration: none;
}

body.cel-theme .versions-results-item .result-view > a:hover,
body.cel-theme .versions-results-item .result-download > a:hover {
	color: var(--fg-link-hover);
	text-decoration: underline;
}

@media (max-width: 767.98px) {
	body.cel-theme .versions-results-item,
	body.cel-theme .documents-item,
	body.cel-theme .bulletins-item {
		padding: var(--space-4) var(--space-5);
	}
}


/* ==========================================================================
   19. SUPPORT BULLETINS                         comp screen 08
   --------------------------------------------------------------------------
   Built 4 September 2026 from alignment2 screen 08, after section 18's shared
   row-card rule flattened this screen. The card chrome comes from section 18;
   everything below is this item's own three-column layout.

   BulletinCollection.cshtml renders three siblings inside .bulletins-item:
       .the-bulletin   the title link and the synopsis
       .release-notes  an <h3> label and a .links list
       .patches        an <h3> label and a .links list of version downloads
   The comp lays them out 1.6fr / 1fr / .8fr with a 32px gap, which is exactly
   what those three divs want - so no markup change is needed, only a grid.
   ========================================================================== */

body.cel-theme .bulletins-item {
	display: grid;
	grid-template-columns: 1.6fr 1fr 0.8fr;
	gap: var(--space-8);
	align-items: start;
	padding: 26px 28px;
}

body.cel-theme .bulletins-item .the-bulletin,
body.cel-theme .bulletins-item .release-notes,
body.cel-theme .bulletins-item .patches {
	display: flex;
	flex-direction: column;
	gap: var(--space-2);
	min-width: 0;
}

/* ---- Column 1: title and synopsis --------------------------------------- */

/* The comp makes the bulletin title NAVY, not the link blue used on every
   other list - it is the card's heading, and the blue is reserved for the
   release-note links beside it. */
body.cel-theme .bulletins-item .the-bulletin > a {
	/* A ROW. This <a> wraps <span class="document-type"> - the file-type
	   glyph - followed by the title text. Section 18 briefly forced it to
	   flex-direction: column, which put the PDF icon on its own line above
	   the title. */
	display: inline-flex;
	flex-direction: row;
	align-items: center;
	gap: var(--space-2);
	text-decoration: none;
	font-size: 18px;
	line-height: 24px;
	font-weight: var(--fw-bold);
	color: var(--fg-1); /* 11.16:1 */
}

body.cel-theme .bulletins-item .the-bulletin > a:hover {
	color: var(--fg-link);
	text-decoration: underline;
}

/* ---- Columns 2 and 3: the labels ----------------------------------------
   The markup uses <h3> for "Release notes:" and "Downloads:". They are column
   LABELS, not headings - left as h3 they inherited a heading size and became
   the largest thing on the card once the grid collapsed.

   The literal text carries a trailing colon and the comp has none. A colon is
   a text node, so it stays until someone edits BulletinCollection.cshtml.
   -------------------------------------------------------------------------- */

body.cel-theme .bulletins-item .release-notes > h3,
body.cel-theme .bulletins-item .patches > h3 {
	margin: 0;
	padding: 0;
	font-family: var(--font-sans);
	font-size: 11px;
	line-height: var(--lh-caption);
	font-weight: var(--fw-bold);
	letter-spacing: var(--tracking-caps);
	text-transform: uppercase;
	color: var(--fg-3); /* 5.50:1 - the comp uses mist-400 at 3.04 */
}

body.cel-theme .bulletins-item .release-notes .links,
body.cel-theme .bulletins-item .patches .links {
	display: flex;
	flex-direction: column;
	gap: var(--space-2);
}

/* Release-note links: the comp's blue, corrected for contrast as everywhere
   else in the portal. */
body.cel-theme .bulletins-item .release-notes .links > a {
	display: inline-flex;
	align-items: center;
	gap: var(--space-2);
	font-size: var(--fs-small);
	line-height: var(--lh-small);
	font-weight: var(--fw-book);
	color: var(--fg-link); /* 6.45:1; comp draws #009FE3 at 2.97 */
	text-decoration: none;
}

/* Download links: navy and bold in the comp, with the arrow in blue - the
   version number is the label, the icon is decoration beside it. */
body.cel-theme .bulletins-item .patches .links > a {
	display: inline-flex;
	align-items: center;
	gap: var(--space-2);
	font-size: var(--fs-small);
	line-height: var(--lh-small);
	font-weight: var(--fw-bold);
	color: var(--fg-1); /* 11.16:1 */
	text-decoration: none;
}

body.cel-theme .bulletins-item .patches .links > a > .fas {
	color: var(--fg-link);
	font-size: var(--fs-caption);
}

body.cel-theme .bulletins-item .release-notes .links > a:hover,
body.cel-theme .bulletins-item .patches .links > a:hover {
	color: var(--fg-link-hover);
	text-decoration: underline;
}

/* ---- Responsive ---------------------------------------------------------
   Three columns of links do not survive a phone. Below 992 the two link
   columns sit side by side under the synopsis; below 768 everything stacks.
   -------------------------------------------------------------------------- */

@media (max-width: 991.98px) {
	body.cel-theme .bulletins-item {
		grid-template-columns: 1fr 1fr;
		gap: var(--space-5) var(--space-6);
	}

	body.cel-theme .bulletins-item .the-bulletin {
		grid-column: 1 / -1;
	}
}

@media (max-width: 767.98px) {
	body.cel-theme .bulletins-item {
		grid-template-columns: 1fr;
		padding: var(--space-5);
	}

	body.cel-theme .bulletins-item .the-bulletin {
		grid-column: auto;
	}
}



/* ==========================================================================
   20. DOCUMENT COLLECTIONS - Release Notes, FAQs, guide lists
   --------------------------------------------------------------------------
   Built 4 September 2026 after section 18 broke this screen too. Anton asked
   the right question - "aren't they using the same template?" - and the
   answer is NO, and that is the whole story of this section.

   THREE LISTS, THREE DIFFERENT INTERNAL STRUCTURES:

     .bulletins-item        BulletinCollection.cshtml
                            three sibling DIVS, gridded on the ITEM
     .documents-item        DocumentsPage -> DocumentCollection.cshtml
                            ONE <a> holding FIVE SPANS, gridded on the <a>:
                            auto 30% 1fr auto auto
                            = icon | title | description | version | download
     .versions-results-item CelebrusSection.cshtml
                            an <a> with spans, genuinely stacked

   Only the last one is the stacked row I assumed all of them were. Section
   18 put display:flex/column on .documents-item > a, which destroyed that
   five-column grid and dropped the five spans into a vertical list - and
   because the spans then stretched full width, an inherited text-align
   centred every one of them. Hence the screenshot: icon, title, description,
   version and download arrow all centred, one per line.

   THE FAINT INNER BOX was the other half of it. The legacy sheet gives that
   <a> its own `background-color: #ffffff; border: 1px solid #ffffff`, which
   was invisible on a white page and became a visible inset rectangle once I
   put a bordered card around it. Both are cleared here.

   text-align: left is set EXPLICITLY. The centring is inherited from an
   ancestor I could not pin down cheaply - .documents-banner has
   text-align:center but that is the sidebar, so it is something else in the
   legacy sheet. Rather than hunt it, this states the intent, which is the
   right call for a value I cannot trace.
   ========================================================================== */

body.cel-theme .documents-items {
	display: flex;
	flex-direction: column;
	gap: var(--space-3);
	font-size: inherit;
}

body.cel-theme .documents-item > a {
	/* The legacy five-column grid, kept - it is the right layout and the
	   markup is built for it. Only the inner border and fill are removed. */
	display: grid;
	grid-template-columns: auto 30% 1fr auto auto;
	gap: var(--space-5);
	align-items: center;
	padding: 18px var(--space-6);
	background-color: transparent;
	border: 0;
	text-align: left;
	text-decoration: none;
	color: inherit;
}

body.cel-theme .documents-item:nth-child(odd) > a {
	background-color: transparent;
	border: 0;
}

body.cel-theme .documents-item > a:hover {
	border: 0;
	background-color: transparent;
}

body.cel-theme .documents-item .document-title {
	font-size: var(--fs-body);
	line-height: var(--lh-body);
	font-weight: var(--fw-bold);
	color: var(--fg-link); /* 6.45:1 */
}

body.cel-theme .documents-item > a:hover .document-title {
	color: var(--fg-link-hover);
	text-decoration: underline;
}

body.cel-theme .documents-item .document-description {
	font-size: var(--fs-small);
	line-height: 21px;
	font-weight: var(--fw-book);
	color: var(--fg-2); /* 7.53:1 */
}

body.cel-theme .documents-item .document-version {
	font-size: 11px;
	line-height: var(--lh-caption);
	font-weight: var(--fw-bold);
	letter-spacing: 0.06em;
	text-transform: uppercase;
	white-space: nowrap;
	color: var(--fg-3); /* 5.50:1 */
}

body.cel-theme .documents-item .document-icon {
	color: var(--fg-link);
	font-size: var(--fs-body);
}

/* The file-type glyph is a background-image on a fixed 22x26 box. Left as
   the legacy sheet has it - those SVGs are per-extension and switching them
   is not a redesign job. */
body.cel-theme .documents-item .document-type {
	flex: none;
}

/* The collection heading above each list - "Release Notes", "FAQs". */
body.cel-theme .documents-content > h3 {
	margin: 0 0 var(--space-4);
	font-family: var(--font-display);
	font-size: 20px;
	line-height: 26px;
	font-weight: var(--fw-bold);
	letter-spacing: var(--tracking-tight-2);
	color: var(--fg-1);
}

body.cel-theme .documents-content > h3:not(:first-child) {
	margin-top: var(--space-8);
}

/* ---- Responsive ----------------------------------------------------------
   Five columns will not fit a phone. Below 992 the description drops under
   the title; below 768 it becomes two columns with the meta beneath.
   -------------------------------------------------------------------------- */

@media (max-width: 991.98px) {
	body.cel-theme .documents-item > a {
		grid-template-columns: auto 1fr auto auto;
		gap: var(--space-3) var(--space-4);
	}

	body.cel-theme .documents-item .document-description {
		grid-column: 2 / -1;
	}
}

@media (max-width: 767.98px) {
	body.cel-theme .documents-item > a {
		grid-template-columns: auto 1fr;
		padding: var(--space-4) var(--space-5);
	}

	body.cel-theme .documents-item .document-description,
	body.cel-theme .documents-item .document-version {
		grid-column: 2 / -1;
	}
}


/* ==========================================================================
   21. DOCUMENTATION INDEX - category cards
   --------------------------------------------------------------------------
   Built 4 September 2026. Anton: make the User guides / Solution Guides
   columns into cards like the ones on celebrus.com/data-platform.

   WHICH CODE PATH THIS IS, because there are two and only one renders here.
   CelebrusSection.cshtml looks for a "Layout" folder in the media library
   and reads a layout JSON out of it. WITH that JSON it renders the grouped
   index styled below - .doc-columns / .doc-category / .doc-cat-heading /
   .doc-item. WITHOUT it, it falls back to the flat row list
   (.versions-results-item), which section 18 already cards.

   As Anton put it: not all versions generate this layout, only the ones that
   have the layout JSON. So BOTH paths now end up as cards - grouped
   categories here, flat rows in section 18 - which means a version without a
   layout JSON no longer looks like a different product.

   The live cards carry a description and a "Learn more" button. A doc
   category has neither - it is a heading and a list of links - so the card is
   heading plus list. Nothing is invented to fill it out.
   ========================================================================== */

/* MULTI-COLUMN, NOT GRID. Changed 5 Oct 2026 at Anton's request, to match the
   Celebrus dashboard: cards run TOP TO BOTTOM down a column, then start the
   next column, rather than left to right along a row.

   Grid cannot do this. Its default flow is row-first, and - the part that
   actually caused the complaint - every cell in a row shares that row's
   height, so a one-item card like FRAUD AND SECURITY was stretched to match
   a nine-item card like DEVELOPER. Both symptoms, the flow direction and the
   dead space beneath short cards, came from that single property.
   grid-auto-flow: column is not the answer either: it needs an explicit row
   count, which we cannot know.

   Multi-column balances the columns' heights on its own (column-fill:
   balance is the initial value), which is the "spread the space equally"
   half of the request, with nothing to hand-tune.

   300px is carried over from the old minmax, so the breakpoint behaviour is
   unchanged: roughly 3-4 columns on a desktop content pane.

   HONEST LIMIT: balancing is approximate when boxes cannot be split. One very
   tall card among short ones still leaves a ragged bottom edge. True masonry
   packing would need grid-template-rows: masonry, which is not reliably
   supported, or JavaScript. Neither is worth it here.
   -------------------------------------------------------------------------- */

body.cel-theme #versions-content .doc-columns {
	display: block;
	columns: 300px;
	column-gap: var(--space-6);
	/* align-items deliberately removed - it was a grid property and does
	   nothing in a multi-column container. */
}

/* --------------------------------------------------------------------------
   ROW DENSITY AND ZEBRA STRIPES - revised 7 September 2026
   Anton: "Distance between lines are too big. Can you check is it easy to
   change and can it make alternative row BG to identify them easily?"

   WHERE THE 48px CAME FROM. Three declarations stacked up, and none of them
   looked large on its own:
       .doc-item line-height   20px   (--lh-small)
       .doc-item padding        8px x 2   (--space-2)
       .doc-category gap       12px   (--space-3)
   20 + 16 + 12 = 48px of pitch for a 20px line. Two thirds of every row was
   empty. Measurable in Anton's screenshot: Welcome Pack sits at y=189 and
   Data Concepts at y=237.

   THE FIX, and why the gap had to go rather than shrink. A flex gap puts
   space BETWEEN rows, so a striped row can never reach its neighbour - the
   stripes would have read as a stack of floating chips rather than as a
   striped list. So the gap drops to 0 and the row's own padding carries the
   whole of its height. That makes the two requests one change: rows become
   flush, which is what lets the stripe work, and the pitch falls out at
       20 + 4 x 2 = 28px, down from 48px.

   REVISED 7 Sep, same day: 6px -> 4px, so 32px -> 28px, at Anton's request
   after seeing the first pass. Still clears the WCAG 2.2 SC 2.5.8 24px
   target minimum, and leaves 8px of gutter between one row's text and the
   next. Rows this tight only work BECAUSE the stripe is doing the
   separating - if the zebra is ever removed, put this back to 6px or the
   list will run together.

   TWO KNOBS, declared here on the card so they cascade to everything inside
   it. Row height is --doc-row-pad-y; the card's horizontal padding is
   --doc-card-pad, which the rows below negate to bleed their stripe out to
   the card edge. Changing either one is a single edit, and the mobile
   override further down only has to restate --doc-card-pad for the negative
   margins to follow it.

   Card bottom padding drops 28 -> 20. It was balancing a row that ended with
   8px of its own padding; the row now ends with 4, and 20px still reads
   correctly against that - the last row should not look like it is floating.
   -------------------------------------------------------------------------- */

body.cel-theme #versions-content .doc-category {
	--doc-card-pad: 28px;
	--doc-row-pad-y: 4px;
	display: flex;
	flex-direction: column;
	gap: 0;
	box-sizing: border-box;
	/* NOT OPTIONAL under multi-column. Without it the browser is free to break
	   a card at the column boundary - heading at the foot of one column, half
	   its links at the head of the next. That is the main failure mode of this
	   layout mode, and it only shows at certain widths, so it is easy to miss.
	   break-inside applies to the flex CONTAINER; the items inside are
	   unaffected. */
	break-inside: avoid;
	/* Vertical rhythm moves from the old grid `gap` to a margin, because
	   column-gap governs the horizontal gutters only. The last card in each
	   column carries a trailing margin; harmless, and removing it would need
	   a selector that cannot know where a column ends. */
	margin-bottom: var(--space-6);
	padding: var(--space-6) var(--doc-card-pad) var(--space-5);
	background: var(--surface-panel);
	border: var(--border-w-1) solid var(--border-1);
	border-radius: var(--radius-panel);
	box-shadow: var(--shadow-xs);
}

/* The category name. The hairline beneath it now runs the full width of the
   card, matching the stripes below it - an inset rule above full-bleed rows
   looked like two different systems. Same negative-margin trick as the rows.
   Its old 12px padding-bottom plus the dead 12px gap become 8px, because the
   first row supplies 4px of its own. */
body.cel-theme #versions-content .doc-cat-heading {
	margin: 0 calc(-1 * var(--doc-card-pad));
	padding: 0 var(--doc-card-pad) var(--space-2);
	border-bottom: var(--border-w-1) solid var(--c-mist-100);
	font-family: var(--font-sans);
	font-size: 11px;
	line-height: var(--lh-caption);
	font-weight: var(--fw-bold);
	letter-spacing: var(--tracking-caps);
	text-transform: uppercase;
	color: var(--fg-1); /* 11.16:1 */
}

body.cel-theme #versions-content .doc-item {
	display: flex;
	align-items: baseline;
	gap: var(--space-2);
	/* Negative inline margin cancels the card's padding so the stripe reaches
	   the card's inner edge, then the same value is added back as padding so
	   the text does not move. This also resets the legacy margin-left: -8px at
	   stylesheet.css:5195, which paired with a padding this rule replaces. */
	margin: 0 calc(-1 * var(--doc-card-pad));
	padding: var(--doc-row-pad-y) var(--doc-card-pad);
	/* Legacy declares --cel-radius-sm here; a rounded stripe in a flush stack
	   leaves a notch at every corner. */
	border-radius: 0;
	line-height: var(--lh-small);
	transition: none;
}

/* THE ZEBRA, and why it takes two selectors rather than one nth-child.
   The rows are not the only children of the card - the h4 heading is child 1
   when there is one, which shifts every row's index by one. And there is not
   always one: a section whose layout JSON holds a flat array instead of an
   object of named categories renders with heading null (CelebrusSection.cshtml
   emits the h4 only if Heading is non-empty), which is exactly the untitled
   Solution Guides card. A single nth-child rule would stripe the wrong
   alternate rows in one of the two cases, and would silently flip if someone
   later fixes that JSON.

   CSS has no "nth among elements of this class", so the parity is selected by
   asking whether the heading exists. Wanted: row 1 plain, row 2 tinted.
       with an h4    row N is child N+1, so even rows are ODD children
       without one   row N is child N,   so even rows are EVEN children
   :has() is already load-bearing in this sheet (the tone-band rule in
   section 8). If it were ever unsupported the whole selector is dropped and
   the list renders unstriped - no layout damage. */
body.cel-theme #versions-content .doc-category:has(.doc-cat-heading) .doc-item:nth-child(odd),
body.cel-theme #versions-content .doc-category:not(:has(.doc-cat-heading)) .doc-item:nth-child(even) {
	background: var(--surface-row-alt);
}

/* Hover is the SAME tint, not a stronger one, and not "none".
   It cannot be none: the legacy sheet sets .doc-item:hover to --cel-hover at
   stylesheet.css:5202 and something has to win. It should not be a stronger
   tint either - the obvious candidate, --c-mist-200, puts --fg-link at
   4.76:1, which passes only just, and borderline values have come back to
   bite this project repeatedly. Tinting to the stripe colour means a plain
   row lights up on hover while a striped row does not change; the asymmetry
   is deliberate, because on the striped row the link itself still darkens
   and underlines, so the affordance is never absent. */
body.cel-theme #versions-content .doc-item:hover {
	background: var(--surface-row-alt);
}

body.cel-theme #versions-content .doc-link {
	font-size: var(--fs-small);
	line-height: var(--lh-small);
	font-weight: var(--fw-book);
	color: var(--fg-link); /* 6.45:1 on white, 5.68:1 on a striped row */
	text-decoration: none;
}

/* This hover deliberately does NOT use --fg-link-hover.
   That token is --c-fuchsia-plum #D14893, which measures 4.15:1 on white -
   already short of the 4.5:1 needed for 14px text before any tint - and
   3.65:1 once a row is striped. A hover state has to meet contrast like any
   other text, so the doc links darken within the blue instead of switching
   hue: --c-blue-aa-hover #00618A is 6.83:1 on white and 6.01:1 on the
   stripe, so it holds on both parities. The underline still carries the
   state for anyone who cannot see the colour shift at all.

   The token itself is left alone - changing it would reach every link in the
   portal, which is a separate decision needing its own contrast pass. */
body.cel-theme #versions-content .doc-item:hover .doc-link {
	color: var(--c-blue-aa-hover); /* 6.83:1 white / 6.01:1 stripe */
	text-decoration: underline;
}

/* Entries with no document behind them - not a link, so not link-coloured. */
body.cel-theme #versions-content .doc-link-plain {
	color: var(--fg-2); /* 7.53:1 on white, 6.63:1 on a striped row */
}

/* The little "PDF" tag beside an entry.
   The legacy value is --c-fuchsia-plum #D14893, which is 4.15:1 on white -
   a FAIL for 10px uppercase text, and there is no large-text exemption at
   that size. --c-pink-hover #A9206B is the live theme's own darker pink and
   measures 6.76:1 on white, 5.95:1 on a striped row. */
body.cel-theme #versions-content .doc-pdf {
	/* Right-aligned, 7 Sep, at Anton's request - the tags used to sit directly
	   after the link text, so they landed at a different x on every row.
	   margin-left: auto rather than justify-content: space-between on the row,
	   for two reasons: it does nothing on the rows that have no PDF tag, and it
	   collapses to 0 when a link is long enough to fill the row, at which point
	   the row's gap still guarantees 8px of clearance so the tag can never
	   touch the text.

	   This is the change that makes the zebra earn its keep. A right-aligned
	   column leaves a wide gap between a short link and its tag, which would
	   read as unrelated on plain white; the stripe is what ties the two ends of
	   the row together. If the zebra is ever removed, move the tags back.

	   The row keeps align-items: baseline, so on a link that wraps to two lines
	   the tag stays on the FIRST line rather than centring against the block -
	   see "Data Collection for Android Sample App (legacy)". */
	margin-left: auto;
	flex: none;
	font-size: 10px;
	line-height: var(--lh-caption);
	font-weight: var(--fw-extrabold);
	letter-spacing: 0.06em;
	text-transform: uppercase;
	white-space: nowrap;
	color: var(--c-pink-hover); /* 6.76:1, was 4.15:1 */
	text-decoration: none;
}

body.cel-theme #versions-content .doc-pdf:hover {
	text-decoration: underline;
}

/* The section title above the grid - "User guides and references". */
body.cel-theme #versions-content h3 {
	margin: 0 0 var(--space-6);
	font-family: var(--font-display);
	font-size: var(--fs-h2);
	line-height: 46px;
	font-weight: var(--fw-extrabold);
	letter-spacing: var(--tracking-tight-4);
	color: var(--fg-1);
}

@media (max-width: 767.98px) {
	body.cel-theme #versions-content .doc-columns {
		/* Was grid-template-columns: 1fr, which is meaningless now the
		   container is not a grid. */
		columns: 1;
		column-gap: var(--space-4);
	}

	body.cel-theme #versions-content .doc-category {
		margin-bottom: var(--space-4);
	}

	/* Restating --doc-card-pad is the whole of the mobile change: the rows'
	   negative margins and the heading rule are all expressed in terms of it,
	   so they follow it down to 20px on their own. */
	body.cel-theme #versions-content .doc-category {
		--doc-card-pad: var(--space-5);
		padding: var(--space-5);
	}

	body.cel-theme #versions-content h3 {
		font-size: 28px;
		line-height: 34px;
	}
}
