:root {
	/* Fonts */
	--font-sans: "Inter", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	--font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;

	/* Typography scale (rem) */
	--text-xs: 0.75rem;
	--text-sm: 0.875rem;
	--text-base: 1rem;
	--text-lg: 1.125rem;
	--text-xl: 1.25rem;
	--text-2xl: 1.5rem;
	--text-3xl: 1.875rem;
	--text-4xl: 2.25rem;
	--text-5xl: 3rem;
	--text-6xl: 3.75rem;
	--text-7xl: 4.5rem;
	--text-8xl: 6rem;

	/* Line-height + tracking */
	--leading-tight: 1.25;
	--leading-snug: 1.375;
	--leading-relaxed: 1.625;
	--tracking-tight: -0.025em;
	--tracking-wide: 0.025em;
	--tracking-wider: 0.05em;
	--tracking-widest: 0.1em;

	/* Spacing */
	--spacing: 0.25rem;

	/* Radius */
	--radius-xs: 0.125rem;
	--radius-sm: 0.25rem;
	--radius-md: 0.375rem;
	--radius-lg: 0.5rem;
	--radius-xl: 0.75rem;
	--radius-2xl: 1rem;
	--radius-3xl: 1.5rem;

	/* Brand primary — Tailwind `primary` / `ring` (same hue as emerald-500) */
	--primary-oklch: oklch(69.6% 0.17 162.48);
	--primary-hover-oklch: oklch(58% 0.16 162.48);
	--primary-fg-oklch: oklch(100% 0 0);
	--primary-muted-oklch: oklch(94% 0.06 162.48);
	--primary-subtle-oklch: oklch(96.5% 0.04 162.48);
	--ring-oklch: oklch(55% 0.14 162.48);

	/* Neutrals: achromatic whites/grays (background, cards, sidebar, auth — primary only on accents) */
	--bg-oklch: oklch(97% 0 0);
	--surface-oklch: oklch(100% 0 0);
	--surface-2-oklch: oklch(96.5% 0 0);
	--surface-elevated-oklch: oklch(100% 0 0);
	--text-oklch: oklch(22% 0 0);
	--text-muted-oklch: oklch(48% 0 0);
	--border-oklch: oklch(91% 0 0);
	--border-strong-oklch: oklch(83% 0 0);

	/* Feedback (RGB — Tailwind danger utilities) */
	--danger: 220 38 38;
	--danger-foreground: 255 255 255;
	--danger-muted: 254 242 242;
	--danger-border: 252 165 165;

	/* Elevation — neutral (any primary works) */
	--elevation-xs: 0 1px 2px rgb(0 0 0 / 0.05);
	--elevation-sm: 0 1px 3px rgb(0 0 0 / 0.06), 0 1px 2px rgb(0 0 0 / 0.04);
	--elevation-md: 0 4px 6px -1px rgb(0 0 0 / 0.07), 0 2px 4px -2px rgb(0 0 0 / 0.05);
	--elevation-lg: 0 10px 15px -3px rgb(0 0 0 / 0.08), 0 4px 6px -4px rgb(0 0 0 / 0.05);
	--elevation-xl: 0 20px 25px -5px rgb(0 0 0 / 0.08), 0 8px 10px -6px rgb(0 0 0 / 0.05);
	--elevation-primary: 0 4px 14px color-mix(in oklch, var(--primary-oklch) 35%, transparent);

	color-scheme: light;
}

[data-theme="dark"] {
	/* Brand still follows --primary-oklch (swap primary freely) */
	--primary-oklch: oklch(72% 0.14 162.48);
	--primary-hover-oklch: oklch(78% 0.11 162.48);
	--primary-fg-oklch: oklch(14% 0 0);
	--primary-muted-oklch: oklch(26% 0.05 162.48);
	--primary-subtle-oklch: oklch(22% 0.04 162.48);
	--ring-oklch: oklch(70% 0.12 162.48);

	/* Neutrals: achromatic so any primary works (no green cast on chrome) */
	--bg-oklch: oklch(14.5% 0 0);
	--surface-oklch: oklch(18.5% 0 0);
	--surface-2-oklch: oklch(22.5% 0 0);
	--surface-elevated-oklch: oklch(27% 0 0);
	--text-oklch: oklch(96% 0 0);
	--text-muted-oklch: oklch(68% 0 0);
	--border-oklch: oklch(34% 0 0);
	--border-strong-oklch: oklch(44% 0 0);

	--danger: 248 113 113;
	--danger-foreground: 24 22 32;
	--danger-muted: 60 32 38;
	--danger-border: 127 55 67;

	--elevation-xs: 0 1px 2px rgb(0 0 0 / 0.35);
	--elevation-sm: 0 1px 3px rgb(0 0 0 / 0.4), 0 1px 2px rgb(0 0 0 / 0.3);
	--elevation-md: 0 4px 6px -1px rgb(0 0 0 / 0.45), 0 2px 4px -2px rgb(0 0 0 / 0.35);
	--elevation-lg: 0 10px 15px -3px rgb(0 0 0 / 0.45), 0 4px 6px -4px rgb(0 0 0 / 0.35);
	--elevation-xl: 0 20px 25px -5px rgb(0 0 0 / 0.5), 0 8px 10px -6px rgb(0 0 0 / 0.4);
	--elevation-primary: 0 4px 20px color-mix(in oklch, var(--primary-oklch) 28%, transparent);

	color-scheme: dark;
}

@media (prefers-color-scheme: dark) {
	:root:not([data-theme]) {
		--primary-oklch: oklch(72% 0.14 162.48);
		--primary-hover-oklch: oklch(78% 0.11 162.48);
		--primary-fg-oklch: oklch(14% 0 0);
		--primary-muted-oklch: oklch(26% 0.05 162.48);
		--primary-subtle-oklch: oklch(22% 0.04 162.48);
		--ring-oklch: oklch(70% 0.12 162.48);

		--bg-oklch: oklch(14.5% 0 0);
		--surface-oklch: oklch(18.5% 0 0);
		--surface-2-oklch: oklch(22.5% 0 0);
		--surface-elevated-oklch: oklch(27% 0 0);
		--text-oklch: oklch(96% 0 0);
		--text-muted-oklch: oklch(68% 0 0);
		--border-oklch: oklch(34% 0 0);
		--border-strong-oklch: oklch(44% 0 0);

		--danger: 248 113 113;
		--danger-foreground: 24 22 32;
		--danger-muted: 60 32 38;
		--danger-border: 127 55 67;

		--elevation-xs: 0 1px 2px rgb(0 0 0 / 0.35);
		--elevation-sm: 0 1px 3px rgb(0 0 0 / 0.4), 0 1px 2px rgb(0 0 0 / 0.3);
		--elevation-md: 0 4px 6px -1px rgb(0 0 0 / 0.45), 0 2px 4px -2px rgb(0 0 0 / 0.35);
		--elevation-lg: 0 10px 15px -3px rgb(0 0 0 / 0.45), 0 4px 6px -4px rgb(0 0 0 / 0.35);
		--elevation-xl: 0 20px 25px -5px rgb(0 0 0 / 0.5), 0 8px 10px -6px rgb(0 0 0 / 0.4);
		--elevation-primary: 0 4px 20px color-mix(in oklch, var(--primary-oklch) 28%, transparent);

		color-scheme: dark;
	}
}

html {
	font-family: var(--font-sans);
	background-color: var(--bg-oklch);
}

body {
	font-family: var(--font-sans);
	color: var(--text-oklch);
	background-color: var(--bg-oklch);
	background-image: radial-gradient(ellipse 100% 60% at 50% -15%, color-mix(in oklch, oklch(85% 0 0) 18%, transparent), transparent 52%);
	background-attachment: fixed;
	min-height: 100vh;
}

[data-theme="dark"] body {
	background-image: radial-gradient(ellipse 90% 55% at 50% -10%, color-mix(in oklch, oklch(26% 0 0) 22%, transparent), transparent 50%);
}

@media (prefers-color-scheme: dark) {
	:root:not([data-theme]) body {
		background-image: radial-gradient(ellipse 90% 55% at 50% -10%, color-mix(in oklch, oklch(26% 0 0) 22%, transparent), transparent 50%);
	}
}

/* Environment notices — explicit CSS so layout/color work even if Tailwind utilities are missing from the build.
 * K-0f2759a6: at the top right of the page, small, so they never sit on AIDE's
 * feedback button in the bottom-right corner. They scroll with the page, under
 * the menu bar and behind the menus and dialogs, and cover none of the page's
 * controls:
 *   signed out          the top-right corner, above the centred card;
 *   signed in, wide     a tab on the top edge, in the space above the page's
 *                       heading (the page starts 1.5rem down);
 *   signed in, small    just under the menu button, and the page starts below
 *                       it while it is shown (dismissed, the page moves back up).
 * Shown only outside the live service (views/partials/header.ejs). */
.env-floating-banner {
	position: absolute;
	top: max(0.75rem, env(safe-area-inset-top, 0px));
	right: max(0.75rem, env(safe-area-inset-right, 0px));
	left: auto;
	bottom: auto;
	z-index: 90;
	box-sizing: border-box;
	display: flex;
	align-items: center;
	gap: 0.25rem;
	height: 1.25rem;
	max-width: min(calc(100vw - 1.5rem), 20rem);
	border-radius: 0.375rem;
	padding: 0 0.125rem 0 0.5rem;
	font-size: 0.75rem;
	font-weight: 600;
	letter-spacing: 0.025em;
	line-height: 1;
	white-space: nowrap;
	box-shadow: 0 1px 3px rgb(0 0 0 / 0.12);
}

@media (width >= 40rem) {
	.env-floating-banner {
		top: max(1rem, env(safe-area-inset-top, 0px));
		right: max(1rem, env(safe-area-inset-right, 0px));
	}
}

/* Signed in on a small screen: under the menu button (the bar ends 3.125rem
   down, 3.375rem from 40rem), and the page starts under the notice. */
@media (width < 64rem) {
	.env-floating-banner--app {
		top: 3.5rem;
	}

	body:has(> .env-floating-banner--app) .main-with-sidebar {
		padding-top: 5.5rem;
	}
}

@media (40rem <= width < 64rem) {
	.env-floating-banner--app {
		top: 3.75rem;
	}

	body:has(> .env-floating-banner--app) .main-with-sidebar {
		padding-top: 5.75rem;
	}
}

/* Signed in on a wide screen: a tab on the top edge, above the page's heading. */
@media (width >= 64rem) {
	.env-floating-banner--app {
		top: 0;
		right: 1.5rem;
		border-top-width: 0;
		border-radius: 0 0 0.375rem 0.375rem;
	}
}

.env-floating-banner--staging {
	background-color: #fde047;
	color: #0f172a;
	border: 1px solid rgb(202 138 4 / 0.5);
}

.env-floating-banner--test {
	background-color: #dc2626;
	color: #ffffff;
	border: 1px solid rgb(185 28 28 / 0.8);
}

.env-floating-banner__label {
	min-width: 0;
	flex: 1 1 auto;
	overflow: hidden;
	text-overflow: ellipsis;
}

.env-floating-banner__dismiss {
	flex-shrink: 0;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border-radius: 0.25rem;
	padding: 0.125rem;
	margin: 0;
	background: transparent;
	border: none;
	cursor: pointer;
	line-height: 0;
}

.env-floating-banner__dismiss svg {
	width: 0.875rem;
	height: 0.875rem;
}

.env-floating-banner--staging .env-floating-banner__dismiss {
	color: rgb(15 23 42 / 0.9);
}

.env-floating-banner--staging .env-floating-banner__dismiss:hover {
	background-color: rgb(15 23 42 / 0.1);
}

.env-floating-banner--staging .env-floating-banner__dismiss:focus-visible {
	outline: 2px solid rgb(15 23 42 / 0.35);
	outline-offset: 1px;
}

.env-floating-banner--test .env-floating-banner__dismiss {
	color: rgb(255 255 255 / 0.9);
}

.env-floating-banner--test .env-floating-banner__dismiss:hover {
	background-color: rgb(255 255 255 / 0.15);
}

.env-floating-banner--test .env-floating-banner__dismiss:focus-visible {
	outline: 2px solid rgb(255 255 255 / 0.5);
	outline-offset: 1px;
}

/* Responsive shell helpers (avoid relying on Tailwind responsive extraction) */
.desktop-sidebar {
	display: none;
}

.mobile-sidebar-root {
	display: block;
}

.main-with-sidebar {
	margin-left: 0;
}

/* K-84fe8808: below 64rem the menu bar floats at the top of every signed-in
   page (views/partials/header.ejs): the page's name and the menu button. The
   page starts below it for as long as it is shown — 4rem down on a phone (the
   bar ends 3.125rem down), 4.25rem from 40rem (it ends 3.375rem down) — so it
   covers no heading or button on a tablet either. Each page's own `sm:pt-5`
   used to take that room away from 40rem while the bar stayed up to 64rem. */
@media (width < 40rem) {
	.main-with-sidebar {
		padding-top: 4rem;
	}
}

@media (40rem <= width < 64rem) {
	.main-with-sidebar {
		padding-top: 4.25rem;
	}
}

@media (width >= 64rem) {
	.desktop-sidebar {
		display: block;
		position: fixed;
		top: 0;
		left: 0;
		height: 100dvh;
		width: 16rem;
	}

	.mobile-sidebar-root {
		display: none;
	}

	.main-with-sidebar {
		margin-left: 16rem;
	}
}

/* K-3406ab78: the Messages page is exactly as tall as the window
   (views/messages.ejs). The list and the chat take all the height the heading
   leaves, in one row, and scroll inside themselves; the page never scrolls.
   On a phone the browser's own bars come and go, so the page is held to the
   window as it is now (100dvh), not to its tallest (100vh). */
body:has(.messages-chat-shell) {
	min-height: 100dvh;
}

.messages-chat-shell {
	flex: 1 1 0%;
	min-height: 0;
	grid-template-rows: minmax(0, 1fr);
}

/* While the test or staging notice sits in the bottom-right corner, the
   panels stop above it, so it never covers the message box and its Send
   button; once it is dismissed they reach the page's margin again. A notice
   placed at the top of a signed-in page (env-floating-banner--app) needs no
   room here. */
body:has(> .env-floating-banner:not(.env-floating-banner--app)) .messages-chat-shell {
	margin-bottom: 3.5rem;
}

@media (width < 64rem) {
	.messages-thread-pane--fullscreen {
		position: fixed;
		inset: 0;
		z-index: 160;
		margin: 0;
		border: 0;
		border-radius: 0;
		box-shadow: none;
		min-height: 100dvh;
		max-height: 100dvh;
		display: flex;
		flex-direction: column;
	}

	.messages-thread-pane--fullscreen .messages-thread {
		max-height: none;
	}

	.messages-thread-pane--fullscreen .messages-composer {
		padding-bottom: max(0.75rem, env(safe-area-inset-bottom, 0px));
	}
}

/* K-425fccfb: the Tools panel (Insights / Templates) beside the chat. It is
   the chat's third column from 80rem; narrower, the chat's "Insights" button
   opens it over the page from the right, above the full-screen thread. */
.messages-tools-pane {
	display: flex;
}

/* The nickname beside a fan's name in the chat list gives way first: it is
   cut short before the fan's own name is. */
.messages-conversation-nickname {
	flex-shrink: 1000;
}

@media (width < 80rem) {
	.messages-tools-pane {
		display: none;
	}

	.messages-tools-pane.messages-tools-pane--open {
		display: flex;
		position: fixed;
		top: 0;
		right: 0;
		bottom: 0;
		z-index: 170;
		width: min(100%, 24rem);
		max-height: 100dvh;
		border-radius: 0;
	}

	.messages-tools-pane--open .messages-tools-panel {
		max-height: none;
	}
}

/* K-fcff0c6f: the chat header's "Tools" button. On a tablet it opens the Tools
   over the page (as before); on a computer it puts them away beside the chat and
   brings them back (K-869b64bb, Sam's design of 28 Oct 2026: always there, dark
   while they are open); on a phone the Tools are a tab of the chat instead, so
   it is not there. */
.messages-tools-open {
	display: inline-flex;
}

@media (width < 64rem) {
	.messages-tools-open {
		display: none;
	}
}

@media (width >= 80rem) {
	/* Put away: the chat takes the Tools' column. */
	.messages-chat-shell.messages-chat-shell--tools-collapsed {
		grid-template-columns: 300px minmax(0, 1fr);
	}

	.messages-chat-shell--tools-collapsed > .messages-tools-pane {
		display: none;
	}
}

@media (width >= 96rem) {
	.messages-chat-shell.messages-chat-shell--tools-collapsed {
		grid-template-columns: 320px minmax(0, 1fr);
	}
}

/* K-fcff0c6f: on a phone the Tools panel sits inside the full-screen chat
   (messages-tools.js moves it there) and shows when its tab is chosen, in place
   of the conversation; the tab says what it is, so its own heading goes. */
.messages-tools-pane.messages-tools-pane--in-thread {
	display: none;
}

.messages-tools-pane.messages-tools-pane--in-thread.messages-tools-pane--tab-open {
	display: flex;
	position: static;
	flex: 1 1 0%;
	min-height: 0;
	width: auto;
	border: 0;
	border-radius: 0;
	box-shadow: none;
}

.messages-tools-pane--in-thread .messages-tools-head {
	display: none;
}

.messages-tools-pane--in-thread .messages-tools-panel {
	max-height: none;
}

/* A favourite note's star is filled in. */
.messages-insights-note-favourite[aria-pressed="true"] .messages-insights-note-star path {
	fill: currentColor;
}

/* Creator sidebar "More" — floating dropdown above the trigger */
.creator-sidebar-more {
	position: relative;
}

.creator-sidebar-more-summary::-webkit-details-marker {
	display: none;
}

.creator-sidebar-more-menu {
	position: absolute;
	bottom: calc(100% + 0.375rem);
	left: 0;
	right: 0;
	z-index: 20;
	border: 1px solid var(--border-oklch);
	border-radius: var(--radius-lg);
	background-color: var(--surface-oklch);
	padding: 0.25rem;
	box-shadow: var(--elevation-md);
}

.creator-sidebar-more[open] .creator-sidebar-more-chevron {
	transform: rotate(180deg);
}

/* K-0c848b68: the one date picker (date-picker.css, from shared/date-picker/)
   in this dashboard's colours — Kulcho's own look and a brand's, light and dark. */
.kdp-window {
	--kdp-surface: var(--surface-oklch);
	--kdp-text: var(--text-oklch);
	--kdp-muted: var(--text-muted-oklch);
	--kdp-border: var(--border-oklch);
	--kdp-fill: var(--surface-2-oklch);
	--kdp-brand: var(--primary-oklch);
	--kdp-brand-fg: var(--primary-fg-oklch);
	--kdp-brand-tint: var(--primary-subtle-oklch);
	--kdp-danger: rgb(var(--danger) / 1);
}

/*
 * K-853a612f: the creator side menu in a brand's look (Heduno), as in Sam's
 * design of 5 Oct 2026 — measured off his pictures at 1:1. Only a creator who
 * wears a brand gets it (partials/sidebar.ejs adds .creator-brand-menu);
 * Kulcho's own look is untouched. The pink is the brand's own colour
 * (--primary-oklch, set by join-brand-look.ejs); the greys are the design's,
 * with the Heduno design system's dark values in the dark look.
 */
.creator-brand-menu {
	/* K-8cb1d79f: Sam's 4 Dec 2026 frame (9a): the items' words #3A424C, their icons #8A929B. */
	--menu-text: #3a424c;
	--menu-row: #3a424c;
	--menu-icon: #8a929b;
	--menu-strong: #25272c;
	--menu-muted: #737c86;
	--menu-figure: #0e1116;
	--menu-line: #e8ebed;
	--menu-hover: #f7f8f9;
	--menu-danger: #c0392b;
	--menu-card: #ffffff;
	--menu-balance-fill: color-mix(in srgb, var(--primary-oklch) 9%, white);
	--menu-balance-icon: color-mix(in srgb, var(--primary-oklch) 18%, white);
}

[data-theme="dark"] .creator-brand-menu {
	--menu-text: #c4c4c2;
	--menu-row: #c4c4c2;
	--menu-icon: #9a9a98;
	--menu-strong: #f5f5f4;
	--menu-muted: #9a9a98;
	--menu-figure: #f5f5f4;
	--menu-line: #2a2a2a;
	--menu-hover: #222222;
	--menu-danger: #f97066;
	--menu-card: #161616;
	--menu-balance-fill: color-mix(in srgb, var(--primary-oklch) 14%, black);
	--menu-balance-icon: color-mix(in srgb, var(--primary-oklch) 28%, black);
}

@media (prefers-color-scheme: dark) {
	:root:not([data-theme]) .creator-brand-menu {
		--menu-text: #c4c4c2;
		--menu-row: #c4c4c2;
		--menu-icon: #9a9a98;
		--menu-strong: #f5f5f4;
		--menu-muted: #9a9a98;
		--menu-figure: #f5f5f4;
		--menu-line: #2a2a2a;
		--menu-hover: #222222;
		--menu-danger: #f97066;
		--menu-card: #161616;
		--menu-balance-fill: color-mix(in srgb, var(--primary-oklch) 14%, black);
		--menu-balance-icon: color-mix(in srgb, var(--primary-oklch) 28%, black);
	}
}

/* The design's menu is 215px wide; the page beside it moves over to match. A brand app's stays 215px, its fan app's side
   menu's width (K-144d0c71, Sam 19 Oct 2026); Heduno's is 212px, Sam's 4 Dec 2026 frame (K-8cb1d79f, 9a). */
@media (width >= 64rem) {
	.desktop-sidebar.creator-brand-menu {
		width: 215px;
	}

	body:has(.desktop-sidebar.creator-brand-menu) .main-with-sidebar {
		margin-left: 215px;
	}

	body.hd-dash:not(.brand-app) .desktop-sidebar.creator-brand-menu {
		width: 212px;
	}

	body.hd-dash:not(.brand-app):has(.desktop-sidebar.creator-brand-menu) .main-with-sidebar {
		margin-left: 212px;
	}
}

/* The logo: 40px high, 16px in from the edge and 24px from the top, the first item 22px under it (K-8cb1d79f, 9a);
   on Heduno Max the MAX badge under it at its right, the first item 16px under that (9d). */
.creator-brand-menu .creator-brand-menu-logo {
	display: flex;
	padding: 24px 16px 22px;
}

.creator-brand-menu .creator-brand-menu-logo.has-max-badge {
	padding-bottom: 16px;
}

/* K-144d0c71 (Sam, 19 Oct 2026): on a brand app's own address the brand's logo
   is the size its fan app shows it at in its side menu (white-label
   _layout.scss, `.sidebar .logo`): 8.3125rem wide, as high as the logo makes
   it. Heduno's logo keeps its 40px height (no brand-app on its pages).
   K-d3e3ea52: never taller than 4.5rem (a square or round logo, such as Shore Thang's, was 133px high), the same
   limit as the fan app's; a wide logo (Xsweet's) is unchanged. It keeps to the left, as before. */
body.brand-app .creator-brand-menu .sidebar-brand-logo,
body.brand-app .creator-brand-menu .sidebar-brand-logo-dark {
	width: 8.3125rem;
	height: auto;
	max-height: 4.5rem;
	object-fit: contain;
	object-position: left center;
}

/* The items (K-8cb1d79f, Sam's 9a): icon 26px in, 19px across, its words 13px after it at 14.5px, 4px apart. */
.creator-brand-menu .creator-brand-menu-nav {
	padding: 0 12px;
}

.creator-brand-menu .creator-brand-menu-nav > ul > li {
	margin: 0;
}

.creator-brand-menu .creator-brand-menu-nav > ul > li + li {
	margin-top: 4px;
}

.creator-brand-menu .creator-brand-menu-item {
	display: flex;
	align-items: center;
	gap: 13px;
	border-radius: 10px;
	padding: 9px 14px;
	font-size: 14.5px;
	line-height: 1.5;
	font-weight: 500;
	color: var(--menu-text);
	transition:
		background-color 0.15s,
		color 0.15s;
}

.creator-brand-menu .creator-brand-menu-item .creator-brand-menu-icon {
	width: 19px;
	height: 19px;
	stroke-width: 1.8;
	color: var(--menu-icon);
}

.creator-brand-menu .creator-brand-menu-item:hover {
	background-color: var(--menu-hover);
	color: var(--menu-strong);
}

/* The page that is open: in the brand's colour. */
.creator-brand-menu .creator-brand-menu-item[aria-current="page"],
.creator-brand-menu .creator-brand-menu-item[aria-current="page"] .creator-brand-menu-icon {
	color: var(--primary-oklch);
}

.creator-brand-menu .creator-brand-menu-item[aria-current="page"] {
	background-color: var(--primary-subtle-oklch);
	font-weight: 600;
}

/* K-8cb1d79f (Sam's 9a): in the Heduno look (Heduno and the brand apps) the open item is the look's ink on its soft tint
   (Heduno: #C31456 on its pink at 10%; a brand app: its readable shade, join-brand-look.ejs). */
.hd-dash .creator-brand-menu .creator-brand-menu-item[aria-current="page"],
.hd-dash .creator-brand-menu .creator-brand-menu-item[aria-current="page"] .creator-brand-menu-icon {
	color: var(--hd-brand-ink);
}

.hd-dash .creator-brand-menu .creator-brand-menu-item[aria-current="page"] {
	background-color: var(--hd-brand-soft);
}

/* The bottom: a line across the menu's inside, 12px in from each side (K-8cb1d79f, 9a). */
.creator-brand-menu .creator-brand-menu-foot {
	padding: 0 12px 20px;
}

.creator-brand-menu .creator-brand-menu-foot-inner {
	border-top: 1px solid var(--menu-line);
	padding-top: 12px;
}

/* The Balance box: the brand's pink outline and fill (the Heduno look: white with a grey edge, heduno-dashboard.css);
   K-8cb1d79f (9a): 13px corners, 14px 13px inside, no arrow; on Heduno Max the brushed metal (.frame-metal). */
.creator-brand-menu .creator-brand-menu-balance {
	position: relative;
	display: flex;
	align-items: center;
	gap: 12px;
	margin-bottom: 0;
	border: 1px solid var(--primary-oklch);
	border-radius: 13px;
	background-color: var(--menu-balance-fill);
	padding: 13px 28px 13px 13px;
	color: var(--menu-figure);
	transition: box-shadow 0.15s;
}

.hd-dash .creator-brand-menu .creator-brand-menu-balance {
	padding: 13px 12px;
}

.hd-dash .creator-brand-menu .creator-sidebar-balance-arrow {
	display: none;
}

.creator-brand-menu .creator-brand-menu-balance:hover,
.creator-brand-menu .creator-brand-menu-balance[aria-current="page"] {
	box-shadow: 0 0 0 1px var(--primary-oklch);
}

.creator-brand-menu .creator-brand-menu-balance-icon {
	display: flex;
	width: 38px;
	height: 38px;
	flex-shrink: 0;
	align-items: center;
	justify-content: center;
	border-radius: 10px;
	background-color: var(--menu-balance-icon);
	color: var(--primary-oklch);
}

.creator-brand-menu .creator-brand-menu-balance-icon .creator-brand-menu-icon {
	width: 22px;
	height: 22px;
}

.creator-brand-menu .creator-sidebar-balance-label {
	font-size: 11.5px;
	line-height: 1.3;
	font-weight: 600;
	color: var(--menu-muted);
}

.creator-brand-menu .creator-sidebar-balance-amount {
	font-size: 17px;
	line-height: 1.3;
	font-weight: 800;
	color: var(--menu-figure);
}

.creator-brand-menu .creator-sidebar-balance-arrow {
	position: absolute;
	top: 7px;
	right: 8px;
	width: 16px;
	height: 16px;
	color: var(--menu-muted);
}

/* More: its word and a small chevron, no icon (K-8cb1d79f, 9a: 40px high, 13px in, 13.5px). */
.creator-brand-menu .creator-sidebar-more-summary {
	display: flex;
	cursor: pointer;
	list-style: none;
	align-items: center;
	height: 40px;
	border-radius: 10px;
	padding: 0 13px;
	font-size: 13.5px;
	line-height: 1.25rem;
	font-weight: 500;
	color: var(--menu-text);
}

/* K-8cb1d79f (9a): Replay tour, a row of its own under the Balance box: 44px high, 6px under it, its icon 18px. */
.creator-brand-menu .creator-brand-menu-replay {
	display: flex;
	align-items: center;
	gap: 10px;
	height: 44px;
	margin-top: 6px;
	border-radius: 10px;
	padding: 0 13px;
	font-size: 13.5px;
	font-weight: 500;
	color: var(--menu-row);
}

.creator-brand-menu .creator-brand-menu-replay .creator-brand-menu-icon {
	width: 18px;
	height: 18px;
	stroke-width: 2;
}

.creator-brand-menu .creator-brand-menu-replay:hover,
.creator-brand-menu .creator-brand-menu-replay:focus-visible {
	background-color: var(--menu-hover);
	color: var(--menu-strong);
}

.creator-brand-menu .creator-sidebar-more-summary:hover {
	color: var(--menu-strong);
}

.creator-brand-menu .creator-sidebar-more-chevron {
	width: 14px;
	height: 14px;
	margin-left: 3px;
	color: var(--menu-text);
	transition: transform 0.15s;
}

/* The menu More opens: a white card floating 10px above it. */
.creator-brand-menu .creator-sidebar-more-menu {
	bottom: calc(100% + 10px);
	border: 1px solid var(--menu-line);
	border-radius: 14px;
	background-color: var(--menu-card);
	padding: 9px;
	box-shadow:
		0 12px 32px rgb(15 15 15 / 0.12),
		0 2px 6px rgb(15 15 15 / 0.06);
}

.creator-brand-menu .creator-sidebar-more-menu > ul > li + li {
	margin-top: 2px;
}

.creator-brand-menu .creator-brand-menu-row {
	display: flex;
	width: 100%;
	align-items: center;
	gap: 10px;
	border-radius: 10px;
	padding: 9px 12px;
	text-align: left;
	font-size: 0.875rem;
	line-height: 1.25rem;
	font-weight: 500;
	color: var(--menu-row);
}

.creator-brand-menu .creator-brand-menu-row .creator-brand-menu-icon {
	width: 18px;
	height: 18px;
	color: var(--menu-strong);
}

.creator-brand-menu .creator-brand-menu-row .creator-brand-menu-icon.hidden {
	display: none;
}

.creator-brand-menu .creator-brand-menu-row:hover,
.creator-brand-menu .creator-brand-menu-row:focus-visible {
	background-color: var(--menu-hover);
	color: var(--menu-strong);
}

/* The keyboard's place in the menu: a ring in the brand's pink, in both looks. */
.creator-brand-menu .creator-brand-menu-row:focus-visible {
	outline: 2px solid var(--primary-oklch);
	outline-offset: -2px;
}

.creator-brand-menu .creator-sidebar-more-divider {
	margin: 5px 3px 7px;
	height: 1px;
	background-color: var(--menu-line);
}

/* K-70c2d6c9: Switch to fan (K-d3e3ea52; was "Switch to fan mode"), a row of its own between the Balance box and More (a brand app's creators only). */
.creator-brand-menu .creator-brand-menu-switch {
	margin: 6px 0 2px;
}

.creator-brand-menu .creator-brand-menu-logout,
.creator-brand-menu .creator-brand-menu-logout .creator-brand-menu-icon,
.creator-brand-menu .creator-brand-menu-logout:hover {
	color: var(--menu-danger);
}

/*
 * K-aa733ee9 fold (Graham, #product, 6 Dec 2026: "you need to scroll slightly", his picture a window about 700px high):
 * Heduno's side menu beside the page fits a laptop's window with no scrolling. Sam's 9a spacing stays from 800px high
 * up; below it only the gaps close (words, icons, order and the boxes' sizes as drawn): the items 7px above and below
 * their words and 2px apart (9px, 4px), the logo 18px from the top and 16px over the first item (24px, 22px; on Heduno
 * Max 12px under the badge, was 16px), less room around the line, Replay tour and More. From 700px high down, a step
 * closer still. It fits down to a window 640px high, on Heduno Max too; shorter, the items scroll as before (the
 * Balance box, Replay tour and More stay in sight). A brand app's menu already fits (K-d3e3ea52's spacing, below).
 */
@media (width >= 64rem) and (height < 800px) {
	body:not(.brand-app) .desktop-sidebar.creator-brand-menu .creator-brand-menu-logo {
		padding: 18px 16px 16px;
	}

	body:not(.brand-app) .desktop-sidebar.creator-brand-menu .creator-brand-menu-logo.has-max-badge {
		padding-bottom: 12px;
	}

	body:not(.brand-app) .desktop-sidebar.creator-brand-menu .creator-brand-menu-nav > ul > li + li {
		margin-top: 2px;
	}

	body:not(.brand-app) .desktop-sidebar.creator-brand-menu .creator-brand-menu-item {
		padding-top: 7px;
		padding-bottom: 7px;
	}

	body:not(.brand-app) .desktop-sidebar.creator-brand-menu .creator-brand-menu-foot {
		padding-bottom: 12px;
	}

	body:not(.brand-app) .desktop-sidebar.creator-brand-menu .creator-brand-menu-foot-inner {
		padding-top: 10px;
	}

	body:not(.brand-app) .desktop-sidebar.creator-brand-menu .creator-brand-menu-replay {
		height: 38px;
		margin-top: 4px;
	}

	body:not(.brand-app) .desktop-sidebar.creator-brand-menu .creator-sidebar-more-summary {
		height: 36px;
	}
}

@media (width >= 64rem) and (height < 700px) {
	body:not(.brand-app) .desktop-sidebar.creator-brand-menu .creator-brand-menu-logo {
		padding: 14px 16px 12px;
	}

	body:not(.brand-app) .desktop-sidebar.creator-brand-menu .creator-brand-menu-logo.has-max-badge {
		padding-bottom: 10px;
	}

	body:not(.brand-app) .desktop-sidebar.creator-brand-menu .creator-brand-menu-nav > ul > li + li {
		margin-top: 1px;
	}

	body:not(.brand-app) .desktop-sidebar.creator-brand-menu .creator-brand-menu-item {
		padding-top: 6px;
		padding-bottom: 6px;
	}

	body:not(.brand-app) .desktop-sidebar.creator-brand-menu .creator-brand-menu-foot-inner {
		padding-top: 8px;
	}

	body:not(.brand-app) .desktop-sidebar.creator-brand-menu .creator-brand-menu-balance {
		padding-top: 10px;
		padding-bottom: 10px;
	}

	body:not(.brand-app) .desktop-sidebar.creator-brand-menu .creator-brand-menu-replay {
		height: 34px;
	}

	body:not(.brand-app) .desktop-sidebar.creator-brand-menu .creator-sidebar-more-summary {
		height: 34px;
	}
}

/*
 * K-d3e3ea52 (Graham, 4 Nov 2026, on Xsweet: "resize so that the menu doesn't need a slider"): on a brand app's
 * creator dashboard only (body.brand-app; Heduno's menu keeps Sam's 5 Oct spacing and its scroll bar), the side
 * menu beside the page fits a laptop's screen without scrolling: 14px around the logo (was 19px/23px), items 34px
 * high and 2px apart (36px, 5px; as Sam's phone menu's), a 54px Balance box (66px), Switch to fan and More
 * closer, less room under More. On a very short screen the items scroll with no scroll bar drawn. The phone's
 * menu is unchanged.
 */
body.brand-app .desktop-sidebar.creator-brand-menu .creator-brand-menu-logo {
	padding: 14px 18px;
}

body.brand-app .desktop-sidebar.creator-brand-menu .creator-brand-menu-nav {
	scrollbar-width: none;
}

body.brand-app .desktop-sidebar.creator-brand-menu .creator-brand-menu-nav::-webkit-scrollbar {
	display: none;
}

body.brand-app .desktop-sidebar.creator-brand-menu .creator-brand-menu-nav > ul > li + li {
	margin-top: 2px;
}

body.brand-app .desktop-sidebar.creator-brand-menu .creator-brand-menu-item {
	padding: 7px 12px;
	/* K-8cb1d79f: still 34px high with Sam's 14.5px words (9a), so the menu keeps fitting a laptop. */
	line-height: 1.25rem;
}

/* K-8cb1d79f: Replay tour, a row of its own now (9a), as compact as Switch to fan beside it. */
body.brand-app .desktop-sidebar.creator-brand-menu .creator-brand-menu-replay {
	height: 34px;
	margin-top: 4px;
}

body.brand-app .desktop-sidebar.creator-brand-menu .creator-brand-menu-foot {
	padding: 0 14px 12px;
}

body.brand-app .desktop-sidebar.creator-brand-menu .creator-brand-menu-foot-inner {
	padding-top: 8px;
}

body.brand-app .desktop-sidebar.creator-brand-menu .creator-brand-menu-balance {
	margin-bottom: 6px;
	padding: 9px 28px 9px 11px;
}

body.brand-app .desktop-sidebar.creator-brand-menu .creator-brand-menu-balance-icon {
	width: 34px;
	height: 34px;
}

body.brand-app .desktop-sidebar.creator-brand-menu .creator-sidebar-more-summary {
	padding: 4px 10px;
}

body.brand-app .desktop-sidebar.creator-brand-menu .creator-brand-menu-switch {
	margin: 0;
}

body.brand-app .desktop-sidebar.creator-brand-menu .creator-brand-menu-switch .creator-brand-menu-row {
	padding-top: 7px;
	padding-bottom: 7px;
}

/*
 * K-8cb1d79f (Dashboard redesign 1/34, Sam's 4 Dec 2026 frame: 9a-9e, M1, M6, M6b; flows signed off by Sam on 4 Dec):
 * the frame of a creator's pages in a brand's look (Heduno's and every brand app's /creator, body.hd-dash). Kulcho's own
 * look has none of these classes. Measured off his screens at 1:1.
 *
 * The one rule: the MAX badge (.frame-max-badge) and the brushed metal (.frame-metal) are drawn only for a creator on
 * Heduno Max (the templates add them, middleware/creatorFrame.ts). The metal is the brand's own colour: Heduno's
 * #D6195E (his screens), a brand app's main colour with its button words' colour (join-brand-look.ejs sets
 * --frame-metal-base, --frame-metal-on and --frame-metal-shade: a light brand colour is brushed towards white, so its
 * dark words keep reading).
 */
.hd-dash {
	--frame-metal-base: #d6195e;
	--frame-metal-on: #ffffff;
	--frame-metal-shade: #000000;
	--frame-line: #e8ebed;
	--frame-row-line: #f0f2f4;
	--frame-ink: #0e1116;
	--frame-ink-2: #3a424c;
	--frame-muted: #5f6771;
	--frame-faint: #8a929b;
	--frame-card: #ffffff;
}

[data-theme="dark"] .hd-dash {
	--frame-line: #2a2a2a;
	--frame-row-line: #222222;
	--frame-ink: #f5f5f4;
	--frame-ink-2: #c4c4c2;
	--frame-muted: #9a9a98;
	--frame-faint: #8a8a88;
	--frame-card: #161616;
}

@media (prefers-color-scheme: dark) {
	:root:not([data-theme]) .hd-dash {
		--frame-line: #2a2a2a;
		--frame-row-line: #222222;
		--frame-ink: #f5f5f4;
		--frame-ink-2: #c4c4c2;
		--frame-muted: #9a9a98;
		--frame-faint: #8a8a88;
		--frame-card: #161616;
	}
}

/* The brushed metal (9d, M6b): the brand's colour, deepened at both ends and lit across the middle, a sheen, a soft
   shade at the foot, fine horizontal brushing (an SVG grain at 10%) and a light line along the top edge. */
.frame-metal {
	position: relative;
	overflow: hidden;
	border-color: transparent;
	background-color: var(--frame-metal-base);
	background-image:
		linear-gradient(104deg, rgb(255 255 255 / 0) 40%, rgb(255 255 255 / 0.05) 50%, rgb(255 255 255 / 0.13) 56%, rgb(255 255 255 / 0.05) 62%, rgb(255 255 255 / 0) 72%),
		linear-gradient(rgb(255 255 255 / 0.08) 0%, rgb(255 255 255 / 0) 40%, rgb(0 0 0 / 0) 70%, rgb(0 0 0 / 0.12) 100%),
		linear-gradient(
			115deg,
			color-mix(in srgb, var(--frame-metal-base) 57%, var(--frame-metal-shade)) 0%,
			color-mix(in srgb, var(--frame-metal-base) 76%, var(--frame-metal-shade)) 18%,
			color-mix(in srgb, var(--frame-metal-base) 91%, var(--frame-metal-shade)) 34%,
			var(--frame-metal-base) 48%,
			color-mix(in srgb, var(--frame-metal-base) 92%, white) 56%,
			color-mix(in srgb, var(--frame-metal-base) 95%, var(--frame-metal-shade)) 66%,
			color-mix(in srgb, var(--frame-metal-base) 76%, var(--frame-metal-shade)) 82%,
			color-mix(in srgb, var(--frame-metal-base) 64.5%, var(--frame-metal-shade)) 100%
		);
	color: var(--frame-metal-on);
	box-shadow:
		inset 0 1px 0 rgb(255 255 255 / 0.3),
		inset 0 -1px 0 rgb(0 0 0 / 0.2),
		0 10px 22px -12px color-mix(in srgb, var(--frame-metal-base) 70%, transparent);
}

.frame-metal::before {
	content: "";
	position: absolute;
	inset: 0;
	pointer-events: none;
	opacity: 0.1;
	mix-blend-mode: overlay;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='120'%3E%3Cfilter id='b' x='0' y='0' width='100%25' height='100%25'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.004 1.1' numOctaves='3' seed='11'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3CfeComponentTransfer%3E%3CfeFuncR type='linear' slope='1.8' intercept='-0.4'/%3E%3CfeFuncG type='linear' slope='1.8' intercept='-0.4'/%3E%3CfeFuncB type='linear' slope='1.8' intercept='-0.4'/%3E%3C/feComponentTransfer%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23b)'/%3E%3C/svg%3E");
	background-size: 100% 100%;
}

.frame-metal::after {
	content: "";
	position: absolute;
	top: 0;
	left: 6%;
	right: 6%;
	height: 1px;
	pointer-events: none;
	background: linear-gradient(90deg, rgb(255 255 255 / 0), rgb(255 255 255 / 0.5) 55%, rgb(255 255 255 / 0));
}

.frame-metal > * {
	position: relative;
}

/* The MAX badge (9d: under the logo at its right; M6b: beside it): a small metal tab, a crown, MAX. */
.frame-max-badge {
	display: inline-flex;
	align-items: center;
	gap: 3px;
	height: 18px;
	padding: 0 7px;
	border-radius: 5px;
	background-image:
		linear-gradient(rgb(255 255 255 / 0.18) 0%, rgb(255 255 255 / 0) 50%, rgb(0 0 0 / 0.1) 100%),
		linear-gradient(
			100deg,
			color-mix(in srgb, var(--frame-metal-base) 76%, var(--frame-metal-shade)) 0%,
			var(--frame-metal-base) 40%,
			color-mix(in srgb, var(--frame-metal-base) 85%, white) 52%,
			var(--frame-metal-base) 64%,
			color-mix(in srgb, var(--frame-metal-base) 76%, var(--frame-metal-shade)) 100%
		);
	color: var(--frame-metal-on);
	font-size: 10.5px;
	font-weight: 800;
	letter-spacing: 0.1em;
	line-height: 1;
	white-space: nowrap;
	box-shadow:
		inset 0 1px 0 rgb(255 255 255 / 0.3),
		0 1px 2px color-mix(in srgb, var(--frame-metal-base) 25%, transparent);
}

.frame-max-badge::before,
.frame-max-badge::after {
	content: none;
}

.frame-max-badge .frame-max-badge-crown {
	width: 10px;
	height: 10px;
}

/* 9d: the logo 180 × 40 with the badge under it at its right (1px in, 1px up). */
.creator-brand-menu .frame-logo-with-badge {
	display: inline-flex;
	flex-direction: column;
	align-items: flex-end;
}

.creator-brand-menu .frame-logo-with-badge .frame-max-badge {
	margin: -1px 1px 0 0;
}

/* The phone and tablet menu (#mobile-sidebar-panel): the badge beside the logo, before the ×. */
#mobile-sidebar-panel .frame-max-badge {
	margin-right: auto;
	margin-left: 8px;
}

/* The side menu's Balance box on Heduno Max (9d): the metal, white words, the wallet on a white tile. */
body.hd-dash .creator-brand-menu .creator-brand-menu-balance.frame-metal[data-metal] {
	border-color: transparent;
	background-color: var(--frame-metal-base);
	padding: 14px 13px;
	color: var(--frame-metal-on);
}

body.hd-dash .creator-brand-menu .creator-brand-menu-balance.frame-metal[data-metal]:hover,
body.hd-dash .creator-brand-menu .creator-brand-menu-balance.frame-metal[data-metal][aria-current="page"] {
	border-color: transparent;
	box-shadow:
		inset 0 1px 0 rgb(255 255 255 / 0.3),
		0 0 0 2px color-mix(in srgb, var(--frame-metal-base) 40%, transparent);
}

body.hd-dash .creator-brand-menu .creator-brand-menu-balance.frame-metal[data-metal] .creator-brand-menu-balance-icon {
	background: linear-gradient(#ffffff 0%, color-mix(in srgb, var(--frame-metal-base) 7%, white) 55%, color-mix(in srgb, var(--frame-metal-base) 21%, white) 100%);
	color: color-mix(in srgb, var(--frame-metal-base) 76%, black);
	box-shadow:
		inset 0 1px 0 #ffffff,
		0 2px 6px rgb(0 0 0 / 0.25);
}

body.hd-dash .creator-brand-menu .creator-brand-menu-balance.frame-metal[data-metal] .creator-sidebar-balance-label {
	color: color-mix(in srgb, var(--frame-metal-on) 85%, transparent);
}

body.hd-dash .creator-brand-menu .creator-brand-menu-balance.frame-metal[data-metal] .creator-sidebar-balance-amount {
	color: var(--frame-metal-on);
	text-shadow: 0 1px 2px rgb(0 0 0 / 0.3);
}

/* The header (9a): at the right end of the page's title row. On a computer "Notifications" and its count, a white button
   with a grey edge; on a phone (M1) the bell alone; on a tablet (no design: kept) the bell and today's menu button. */
.hd-dash .hd-menubar.frame-head {
	display: flex;
	align-items: center;
	gap: 8px;
}

.hd-dash .frame-bell {
	position: relative;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
	/* Today's menu button's 40px on a tablet (beside it); on a phone Sam's M1 44px (below). */
	width: 40px;
	height: 40px;
	border-radius: 12px;
	color: var(--frame-ink-2);
	text-decoration: none;
}

.hd-dash .frame-bell:hover {
	background-color: var(--hd-surface-2);
	color: var(--frame-ink);
}

.hd-dash .frame-bell:focus-visible {
	outline: 2px solid var(--hd-brand-ink);
	outline-offset: 2px;
}

.hd-dash .frame-bell .frame-bell-icon {
	width: 22px;
	height: 22px;
	stroke-width: 1.8;
}

.hd-dash .frame-bell .frame-bell-word {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
}

/* M1: the count at the bell's top right, ringed in the bar's white. */
.hd-dash .frame-bell .frame-bell-count {
	position: absolute;
	top: 4px;
	right: 3px;
	box-sizing: border-box;
	display: flex;
	align-items: center;
	justify-content: center;
	min-width: 18px;
	height: 18px;
	padding: 0 5px;
	border: 2px solid var(--frame-card);
	border-radius: 999px;
	background-color: var(--frame-metal-base);
	color: var(--frame-metal-on);
	font-size: 11px;
	font-weight: 700;
	line-height: 1;
}

.hd-dash .frame-menu-button {
	display: none;
}

@media (40rem <= width < 64rem) {
	.hd-dash .frame-menu-button {
		display: inline-flex;
		align-items: center;
		justify-content: center;
		flex-shrink: 0;
	}

	/* The title row leaves room for both (heduno-dashboard.css leaves 52px for the menu button alone). Review r1: Message
	   settings' top row (message-settings.css) and a page whose title stands in a block of its own (Domains) too. Review
	   r2: a request's own page, its name with its status (custom-request-detail.ejs, .hd-reqpage-head). */
	body.hd-dash .dash-head,
	body.hd-dash .bp-head,
	body.hd-dash .max-set-head,
	body.hd-dash .sch-top,
	body.hd-dash .msx-top,
	body.hd-dash .hd-reqpage-head,
	body.hd-dash .main-with-sidebar > .mb-6:first-child:has(> h1.dashboard-title) {
		padding-right: 100px;
	}

	body.hd-dash .dash-head-actions {
		margin-right: -100px;
	}

	body.hd-dash .main-with-sidebar.nb-page {
		padding-top: 64px;
	}
}

@media (width >= 64rem) {
	.hd-dash .hd-menubar.frame-head {
		top: 30px;
		right: 36px;
	}

	.hd-dash .frame-bell {
		gap: 8px;
		width: auto;
		height: 40px;
		padding: 0 10px 0 13px;
		border: 1px solid var(--frame-line);
		border-radius: 10px;
		background-color: var(--frame-card);
		color: var(--frame-ink);
		font-size: 14px;
		font-weight: 600;
		box-shadow: 0 1px 2px rgb(16 24 40 / 0.04);
	}

	.hd-dash .frame-bell:hover {
		background-color: var(--hd-surface-2);
	}

	.hd-dash .frame-bell .frame-bell-icon {
		width: 17px;
		height: 17px;
	}

	.hd-dash .frame-bell .frame-bell-word {
		position: static;
		width: auto;
		height: auto;
		overflow: visible;
		clip: auto;
	}

	.hd-dash .frame-bell .frame-bell-count {
		position: static;
		min-width: 20px;
		height: 20px;
		padding: 0 6px;
		border: 0;
		font-size: 11.5px;
		font-weight: 800;
	}

	/* The title row ends where the header starts (its widest: "Notifications 99+"). Review r1 (MUST 1): Message settings'
	   top row too (message-settings.css .msx-top: the way back, and Messages' tabs pushed to its right end, which the
	   header covered), and a page whose title stands in a block of its own (Domains). Review r2: a request's own page (its
	   name and status under "Back to requests", level with the header). */
	body.hd-dash .dash-head,
	body.hd-dash .bp-head,
	body.hd-dash .max-set-head,
	body.hd-dash .sch-top,
	body.hd-dash .msx-top,
	body.hd-dash .hd-reqpage-head,
	body.hd-dash .main-with-sidebar > .mb-6:first-child:has(> h1.dashboard-title) {
		padding-right: 196px;
	}

	/* Messages' pages draw their title row 14px from the top and 18px from the right (broadcasts.css, K-a44c0bc4). */
	body.hd-dash:has(.main-with-sidebar > .bcx-head) .hd-menubar.frame-head {
		top: 14px;
		right: 18px;
	}

	/* With the staging or test notice (20px high) at the top edge: just under it. */
	body.hd-dash:has(> .env-floating-banner):has(.main-with-sidebar > .bcx-head) .hd-menubar.frame-head {
		top: 24px;
	}
}

/* Review r1 (MUST 3), the phone's header as Sam drew it (M1 .top and .ib): the page's title row is a white bar 56px high
   with a 1px line under it (#FFFFFF, #E8EBED: --frame-card and --frame-line, so a brand app's look and the dark look
   draw it in their own), the title in its middle, the page 16px under it (M1's .scr); the bell a 44 x 44 touch area in
   the bar's middle, 8px from its right, #3A424C, its count at 6px 5px. The bar is the page's own background at its top
   (drawn under the title and the bell, so both are read and pressed as before; it scrolls with the page, as the title
   row does). Not on the More page (its own logo bar, M6) nor on a page with no side menu (no header there). */
@media (width < 40rem) {
	body.hd-dash:has(.desktop-sidebar):not(:has([data-more-page])) .main-with-sidebar {
		--frame-bar-height: 56px;
		/* The title row (40px, heduno-dashboard.css) in the bar's middle: (56 - 40) / 2 from the top. */
		padding-top: 8px;
		background:
			linear-gradient(var(--frame-card), var(--frame-card)) 0 0 / 100% calc(var(--frame-bar-height) - 1px) no-repeat,
			linear-gradient(var(--frame-line), var(--frame-line)) 0 calc(var(--frame-bar-height) - 1px) / 100% 1px no-repeat;
	}

	/* The Notifications page (the bell's panel as a page, without the script) has no title row: it starts 16px under. */
	body.hd-dash:has(.desktop-sidebar):not(:has([data-more-page])) .main-with-sidebar.nb-page {
		padding-top: 72px;
	}

	/* The page's first row fills the bar (40px, its middle the bar's) and what follows starts 16px under the bar (M1's
	   .scr): a title row's own second row (its buttons, Messages' tabs) 24px under its first; a page that starts with
	   its way back (Settings' sections, Settings → Heduno Max, the web address) has the way back in the bar and its
	   title under it. */
	body.hd-dash:has(.desktop-sidebar):not(:has([data-more-page])) .main-with-sidebar > .dash-head:first-child {
		row-gap: 24px;
	}

	body.hd-dash:has(.desktop-sidebar):not(:has([data-more-page])) .main-with-sidebar > .dash-head:first-child > :first-child {
		min-height: 40px;
	}

	body.hd-dash:has(.desktop-sidebar):not(:has([data-more-page])) .main-with-sidebar > .dash-head:first-child > h1:first-child {
		display: flex;
		align-items: center;
	}

	body.hd-dash:has(.desktop-sidebar):not(:has([data-more-page])) .main-with-sidebar > :first-child a:is([data-settings-back], .dash-back):first-child {
		display: flex;
		width: fit-content;
		min-height: 40px;
		align-items: center;
		margin-bottom: 24px;
	}

	body.hd-dash:has(.desktop-sidebar):not(:has([data-more-page])) .main-with-sidebar > :first-child > .dash-back-row:first-child {
		margin-bottom: 0;
	}

	/* Message settings: the way back in the bar, Messages' tabs 16px under it. */
	body.hd-dash:has(.desktop-sidebar):not(:has([data-more-page])) .main-with-sidebar .msx-top {
		row-gap: 24px;
	}

	/* Schedule starts with Messages' tabs, which wrap: they start 16px under the bar (the bar has the bell only). */
	body.hd-dash:has(.desktop-sidebar):not(:has([data-more-page])) .main-with-sidebar:has(> .sch:first-child > .sch-top:first-of-type) {
		padding-top: 72px;
	}

	.hd-dash .hd-menubar.frame-head {
		top: 6px;
		right: 8px;
	}

	.hd-dash .frame-bell {
		width: 44px;
		height: 44px;
	}

	/* Review r2 (nit): from the bell's middle to the right, over its top right corner as M1 draws its count, so a long
	   count ("99+") grows away from the bell instead of across its top. */
	.hd-dash .frame-bell .frame-bell-count {
		top: 6px;
		right: auto;
		left: calc(50% - 3px);
		padding: 0 3px;
	}

	/* A page whose title stands in a block of its own (Domains) keeps clear of the bell, as the title rows do. */
	body.hd-dash .main-with-sidebar > .mb-6:first-child:has(> h1.dashboard-title) {
		padding-right: 52px;
	}

	/* With the staging or test notice (20px high) at the top edge: the bar takes it in, the title and the bell under it. */
	body.hd-dash:has(> .env-floating-banner--app):has(.desktop-sidebar):not(:has([data-more-page])) .main-with-sidebar {
		--frame-bar-height: 76px;
		padding-top: 28px;
	}

	body.hd-dash:has(> .env-floating-banner--app):has(.desktop-sidebar):not(:has([data-more-page])) .main-with-sidebar.nb-page {
		padding-top: 92px;
	}

	body.hd-dash:has(> .env-floating-banner--app) .hd-menubar.frame-head {
		top: 26px;
	}
}

/* The phone's tabs (M1, M1a): Overview, Requests, +, Messages, More, each named under its icon, on white with a line on
   top; the open one in the look's ink; + a 44 × 36 tile in the brand's colour (metal on Heduno Max). */
@media (width < 40rem) {
	:root:has(.pmb-tabs) {
		--pmb-height: calc(56px + env(safe-area-inset-bottom, 0px));
	}

	.hd-dash .pmb.pmb-tabs {
		display: grid;
		grid-auto-columns: minmax(0, 1fr);
		grid-auto-flow: column;
		align-items: start;
		padding: 6px 4px env(safe-area-inset-bottom, 0px);
		background: var(--frame-card);
		border-top: 1px solid var(--frame-line);
	}

	.hd-dash .pmb-tabs .pmb-tab {
		flex-direction: column;
		gap: 3px;
		height: 50px;
		opacity: 1;
		color: var(--frame-muted);
		font-size: 11.5px;
		font-weight: 600;
		line-height: 1.2;
		text-decoration: none;
	}

	body.hd-dash .pmb-tabs .pmb-tab .pmb-icon {
		width: 22px;
		height: 22px;
		stroke-width: 1.8;
		opacity: 1;
	}

	.hd-dash .pmb-tabs .pmb-tab.is-active {
		color: var(--hd-brand-ink);
	}

	.hd-dash .pmb-tabs .pmb-tab.is-active .pmb-icon {
		stroke-width: 2;
	}

	.hd-dash .pmb-tabs .pmb-tab.is-active::after {
		content: none;
	}

	.hd-dash .pmb-tabs .pmb-tab:hover {
		color: var(--frame-ink);
	}

	.hd-dash .pmb-tabs .pmb-tab.is-active:hover {
		color: var(--hd-brand-ink);
	}

	.hd-dash .pmb-tabs .pmb-plus {
		display: flex;
		align-items: center;
		justify-content: center;
		width: 44px;
		height: 36px;
		border-radius: 12px;
		background-color: var(--frame-metal-base);
		color: var(--frame-metal-on);
	}

	.hd-dash .pmb-tabs .pmb-plus .pmb-icon {
		width: 22px;
		height: 22px;
		stroke-width: 2.4;
	}

	.hd-dash .pmb-tabs .pmb-plus.frame-metal {
		box-shadow:
			inset 0 1px 0 rgb(255 255 255 / 0.45),
			inset 0 -1px 0 rgb(0 0 0 / 0.3),
			0 4px 12px color-mix(in srgb, var(--frame-metal-base) 40%, transparent);
	}

	.hd-dash .pmb-tabs .pmb-tab-plus {
		justify-content: center;
	}

	/* The unread mark on Messages sits on its icon. */
	.hd-dash .pmb-tabs .pmb-badge {
		top: 0;
	}

	/* The Notifications page (the bell's panel as a page, without the script) starts under the header. */
	body.hd-dash .main-with-sidebar.nb-page {
		padding-top: 64px;
	}

	/* Settings → Heduno Max's own title keeps clear of the bell, as the other title rows do of the menu button. */
	body.hd-dash .max-set-head {
		padding-right: 52px;
	}

	/* The menu button's work is More's: no button at the top on a phone (the bell takes its place, M1). */
	.hd-dash .frame-head .frame-menu-button {
		display: none;
	}

	/* M6: the More page has the logo bar at its top and no bell. */
	body.hd-dash:has([data-more-page]) .hd-menubar.frame-head {
		display: none;
	}
}

/* A page with no side menu (the joining steps, the Heduno Max offer at the end of joining) has no frame: no header, as
   before (its menu button had nothing to open there either), so nothing covers its own Skip. */
body.hd-dash:not(:has(.desktop-sidebar)) .hd-menubar.frame-head {
	display: none;
}

/* The More page (M6, M6b). On a phone: the logo on a white bar across the top, then cards 14px apart. */
.hd-dash .frame-more {
	display: flex;
	flex-direction: column;
	gap: 14px;
	max-width: 560px;
}

.hd-dash .frame-more-top {
	display: flex;
	align-items: center;
	gap: 8px;
	height: 56px;
	margin: -20px -16px 2px;
	padding: 0 16px;
	background: var(--frame-card);
	border-bottom: 1px solid var(--frame-line);
}

@media (width <= 560px) {
	.hd-dash .frame-more-top {
		margin: -18px -14px 2px;
	}
}

.hd-dash .frame-more-top .frame-more-logo-img {
	width: auto;
	height: 28px;
	max-width: 160px;
	object-fit: contain;
	object-position: left center;
}

.hd-dash .frame-more-top .frame-max-badge {
	height: 20px;
	margin-top: 2px;
}

@media (width >= 40rem) {
	.hd-dash .frame-more-top {
		display: none;
	}
}

.hd-dash .frame-more-card {
	display: flex;
	align-items: center;
	gap: 12px;
	box-sizing: border-box;
	padding: 14px;
	border: 1px solid var(--frame-line);
	border-radius: 16px;
	background-color: var(--frame-card);
	color: var(--frame-ink);
	text-decoration: none;
}

.hd-dash .frame-more-chevron {
	display: flex;
	flex-shrink: 0;
	width: 18px;
	height: 18px;
	color: var(--frame-faint);
	stroke-width: 2;
}

.hd-dash .frame-more-avatar {
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
	width: 48px;
	height: 48px;
	overflow: hidden;
	border-radius: 999px;
	background: linear-gradient(160deg, color-mix(in srgb, var(--frame-metal-base) 50%, white), color-mix(in srgb, var(--frame-metal-base) 72%, black));
	color: #ffffff;
	font-size: 18px;
	font-weight: 700;
}

.hd-dash .frame-more-avatar img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.hd-dash .frame-more-who {
	display: flex;
	flex: 1 1 auto;
	flex-direction: column;
	min-width: 0;
}

.hd-dash .frame-more-name {
	overflow: hidden;
	font-size: 16px;
	font-weight: 700;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.hd-dash .frame-more-address {
	overflow: hidden;
	font-size: 13px;
	color: var(--frame-muted);
	text-overflow: ellipsis;
	white-space: nowrap;
}

.hd-dash .frame-more-balance-icon {
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
	width: 40px;
	height: 40px;
	border-radius: 10px;
	background-color: var(--hd-brand-soft);
	color: var(--hd-brand-ink);
}

.hd-dash .frame-more-balance-icon .creator-brand-menu-icon {
	width: 20px;
	height: 20px;
	stroke-width: 1.9;
}

.hd-dash .frame-more-balance-words {
	display: flex;
	flex: 1 1 auto;
	flex-direction: column;
}

.hd-dash .frame-more-balance-label {
	font-size: 12.5px;
	color: var(--frame-muted);
}

.hd-dash .frame-more-balance-amount {
	font-size: 19px;
	font-weight: 700;
	line-height: 1.2;
}

/* M6b: Balance in the metal: no edge, 16px 14px inside, white words, the wallet on a white tile. */
.hd-dash .frame-more-balance.frame-metal {
	padding: 16px 14px;
	border-color: transparent;
	color: var(--frame-metal-on);
	box-shadow:
		inset 0 1px 0 rgb(255 255 255 / 0.3),
		inset 0 -1px 0 rgb(0 0 0 / 0.25),
		0 12px 28px -16px color-mix(in srgb, var(--frame-metal-base) 70%, transparent);
}

.hd-dash .frame-more-balance.frame-metal .frame-more-balance-icon {
	background: linear-gradient(#ffffff 0%, color-mix(in srgb, var(--frame-metal-base) 7%, white) 55%, color-mix(in srgb, var(--frame-metal-base) 21%, white) 100%);
	color: color-mix(in srgb, var(--frame-metal-base) 76%, black);
	box-shadow:
		inset 0 1px 0 #ffffff,
		0 2px 6px rgb(0 0 0 / 0.3);
}

.hd-dash .frame-more-balance.frame-metal .frame-more-balance-label,
.hd-dash .frame-more-balance.frame-metal .frame-more-chevron {
	color: color-mix(in srgb, var(--frame-metal-on) 85%, transparent);
}

.hd-dash .frame-more-balance.frame-metal .frame-more-balance-amount {
	font-size: 21px;
	font-weight: 800;
	text-shadow: 0 1px 2px rgb(0 0 0 / 0.35);
}

/* M6: the Heduno Max card: a metal edge, the crown on a metal tile, its line and Upgrade to Max in the metal. */
.hd-dash .frame-more-max {
	flex-direction: column;
	align-items: stretch;
	border: 1.5px solid transparent;
	background:
		linear-gradient(var(--frame-card), var(--frame-card)) padding-box,
		linear-gradient(
				115deg,
				color-mix(in srgb, var(--frame-metal-base) 76%, var(--frame-metal-shade)) 0%,
				color-mix(in srgb, var(--frame-metal-base) 38%, white) 35%,
				var(--frame-metal-base) 55%,
				color-mix(in srgb, var(--frame-metal-base) 26%, white) 75%,
				color-mix(in srgb, var(--frame-metal-base) 76%, var(--frame-metal-shade)) 100%
			)
			border-box;
	box-shadow: 0 10px 24px -18px color-mix(in srgb, var(--frame-metal-base) 70%, transparent);
}

.hd-dash .frame-more-max-head {
	display: flex;
	align-items: flex-start;
	gap: 12px;
}

.hd-dash .frame-more-max-tile {
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
	width: 40px;
	height: 40px;
	border-radius: 10px;
}

.hd-dash .frame-more-max-tile .frame-crown {
	width: 18px;
	height: 18px;
}

.hd-dash .frame-more-max-words {
	display: flex;
	flex: 1 1 auto;
	flex-direction: column;
	gap: 2px;
	min-width: 0;
}

.hd-dash .frame-more-max-title {
	font-size: 15px;
	font-weight: 700;
	line-height: 1.3;
}

.hd-dash .frame-more-max-line {
	font-size: 12.5px;
	line-height: 1.4;
	color: var(--frame-muted);
}

.hd-dash .frame-more-max-button {
	display: flex;
	align-items: center;
	justify-content: center;
	height: 42px;
	border-radius: 11px;
	font-size: 14.5px;
	font-weight: 700;
	text-shadow: 0 1px 2px rgb(0 0 0 / 0.35);
}

/* M6: the lists, rows 52px high, a faint line between them. */
.hd-dash .frame-more-list {
	display: block;
	padding: 4px 0;
	overflow: hidden;
}

.hd-dash .frame-more-list ul {
	margin: 0;
	padding: 0;
	list-style: none;
}

.hd-dash .frame-more-row,
.hd-dash .frame-more-list .creator-brand-menu-row {
	display: flex;
	align-items: center;
	gap: 14px;
	width: 100%;
	box-sizing: border-box;
	min-height: 52px;
	padding: 0 14px 0 16px;
	border-radius: 0;
	background: none;
	color: var(--frame-ink);
	font-size: 15px;
	font-weight: 500;
	text-align: left;
	text-decoration: none;
}

.hd-dash .frame-more-list :is(.frame-more-row, li:not([hidden]):not([role="separator"])) + :is(.frame-more-row, li:not([hidden])) {
	border-top: 1px solid var(--frame-row-line);
}

.hd-dash .frame-more-row:hover,
.hd-dash .frame-more-list .creator-brand-menu-row:hover {
	background-color: var(--hd-surface-2);
}

.hd-dash .frame-more-row .creator-brand-menu-icon,
.hd-dash .frame-more-list .creator-brand-menu-row .creator-brand-menu-icon:not(.hidden) {
	width: 20px;
	height: 20px;
	color: var(--frame-muted);
	stroke-width: 1.9;
}

.hd-dash .frame-more-row-words {
	flex: 1 1 auto;
}

.hd-dash .frame-more-list .creator-brand-menu-logout,
.hd-dash .frame-more-list .creator-brand-menu-logout .creator-brand-menu-icon {
	color: var(--menu-danger, #c0392b);
}

.hd-dash .frame-more-list form {
	margin: 0;
}

/* K-8d65a382: one of Kulcho's super admins in a partner's pages of today's dashboard: which partner they are in,
   a dark tab at the bottom of the screen, clear of AIDE's feedback button at the bottom right. */
.kulcho-viewing-bar {
	position: fixed;
	bottom: 12px;
	left: 50%;
	z-index: 120;
	max-width: calc(100vw - 32px);
	transform: translateX(-50%);
	border-radius: 999px;
	background-color: #0e1116;
	padding: 8px 16px;
	font-size: 0.875rem;
	line-height: 1.25rem;
	color: #ffffff;
	box-shadow: 0 8px 24px rgb(15 15 15 / 0.25);
	overflow-wrap: anywhere;
}

/* K-38b64d3b: Settings → Cookies (partials/cookie-choice.ejs), on the creator and partner dashboards. */
.cookie-choice {
	margin-top: 1.5rem;
	max-width: 42rem;
	border: 1px solid var(--border-oklch);
	border-radius: 0.75rem;
	background: var(--surface-oklch);
	padding: 1.25rem 1.5rem;
}
.cookie-choice[hidden] {
	display: none;
}
.cookie-choice-heading {
	font-size: 1rem;
	font-weight: 600;
	color: var(--text-oklch);
}
.cookie-choice-buttons {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	margin-top: 0.75rem;
}
.cookie-choice-button {
	flex: 1 1 8rem;
	min-height: 44px;
	border: 1px solid var(--border-strong-oklch, var(--border-oklch));
	border-radius: 999px;
	background: var(--surface-oklch);
	padding: 0.5rem 1rem;
	font-size: 0.875rem;
	font-weight: 600;
	color: var(--text-oklch);
	cursor: pointer;
}
.cookie-choice-button[aria-pressed="true"] {
	border-color: var(--primary-oklch);
	background: var(--primary-oklch);
	color: var(--primary-fg-oklch);
}
.cookie-choice-button:focus-visible {
	outline: 2px solid var(--ring-oklch, var(--primary-oklch));
	outline-offset: 2px;
}

/* K-47232ecd (Graham, 27 Oct 2026): the count on Settings in the creator's side menu and on Settings → Management while
   a partner's request waits for the creator's answer, like a chat's unread count. The brand's colour, its own text. */
.creator-nav-badge {
	display: inline-flex;
	flex: none;
	align-items: center;
	justify-content: center;
	min-width: 1.25rem;
	height: 1.25rem;
	margin-left: auto;
	padding: 0 0.375rem;
	border-radius: 999px;
	background: var(--color-primary);
	color: var(--color-primary-foreground);
	font-size: 0.75rem;
	font-weight: 700;
	line-height: 1;
}
.settings-row-badge {
	margin-left: 0;
}

/* K-a81c73c4 (Kulcho's answer A to question f9ce78ba, 5 Dec 2026): a Support reply's unread dot on Support and on More
   (partials/support-unread-dot.ejs). The dashboard's unread dot (the bell panel's .nb-dot: 8px, round, no number) in
   the look's own colour as it reads on its ground: Heduno's and a brand app's ink (light and dark), Kulcho's green
   for words on its look (#007A43 / #00CF74 dark: its #00CF74 itself is 2.06:1 on white). */
.support-unread-dot {
	display: inline-block;
	flex: none;
	width: 8px;
	height: 8px;
	border-radius: 999px;
	background: var(--hd-brand-ink, var(--kc-brand-text, var(--primary-oklch)));
}
/* At the end of the Support row (the side menu's More and the More page). */
.support-unread-dot.support-unread-dot-row {
	margin-left: auto;
}
/* Just after the word More (the side menu's closed More). */
.support-unread-dot.support-unread-dot-more {
	margin-left: 6px;
}
/* On More's icon in the phone's bar, at its top right, ringed in the bar's colour so it reads over the icon. */
.pmb-item .support-unread-dot.pmb-dot {
	position: absolute;
	top: 15px;
	left: calc(50% + 7px);
	box-shadow: 0 0 0 2px var(--frame-card, var(--surface-elevated-oklch));
}
.pmb-tabs .pmb-item .support-unread-dot.pmb-dot {
	top: 7px;
	left: calc(50% + 6px);
}
/* Review r1: on the menu button at the top (a tablet; Kulcho's own look on a tablet and a phone), at its top right,
   ringed in the button's own colour as the phone bar's is in the bar's. */
#mobile-sidebar-toggle:has(> .support-unread-dot) {
	position: relative;
}
#mobile-sidebar-toggle .support-unread-dot.support-unread-dot-button {
	position: absolute;
	top: 6px;
	right: 6px;
	box-shadow: 0 0 0 2px var(--color-surface, var(--surface-elevated-oklch));
}
.hd-dash #mobile-sidebar-toggle .support-unread-dot.support-unread-dot-button {
	box-shadow: 0 0 0 2px var(--hd-card);
}

/* K-47232ecd: the tip a ping was about, in its chat: ringed in the brand's colour. */
.messages-tip-highlight {
	outline: 2px solid var(--color-primary, #e0205f);
	outline-offset: 2px;
}

/* K-47232ecd: the row a ping was about (Payouts, that payout; Partner, Creators, that creator). */
.ping-highlight {
	background-color: color-mix(in srgb, var(--color-primary, #e0205f) 10%, transparent);
}

/*
 * K-e3499582 (Sam's dashboards feedback of 3 Nov 2026, item 5): the phone's menu bar at the bottom of the screen
 * (partials/phone-menu-bar.ejs), the brand apps' bar exactly (white-label Navbar.tsx, .footer.fanFooter): 3.75rem
 * high, one row of icons 1.6rem across, each a fifth of the width, at 75% until it is the open page's, which is in
 * the brand's own colour with a 0.3rem dot under it; the menu's own ground with a line on top. Phones only (under
 * 40rem): tablets and computers keep their menus. Every page keeps the bar's height free at its bottom, so the bar
 * covers nothing (the Messages page, the window's height, ends above it). Under the phone's menu and its shade
 * (z-index 140/150) and the bell's panel; over the page.
 */
.pmb {
	display: none;
}

@media (width < 40rem) {
	:root {
		--pmb-height: calc(3.75rem + env(safe-area-inset-bottom, 0px));
	}

	.pmb {
		position: fixed;
		inset: auto 0 0 0;
		z-index: 120;
		display: flex;
		align-items: stretch;
		height: var(--pmb-height);
		padding-bottom: env(safe-area-inset-bottom, 0px);
		background: var(--surface-elevated-oklch);
		border-top: 1px solid var(--border-oklch);
	}

	.pmb-item {
		position: relative;
		display: flex;
		flex: 1 1 0;
		align-items: center;
		justify-content: center;
		height: 3.75rem;
		padding: 0;
		border: 0;
		background: none;
		color: var(--text-oklch);
		opacity: 0.75;
		cursor: pointer;
		-webkit-tap-highlight-color: transparent;
	}

	.pmb-item .pmb-icon {
		width: 1.6rem;
		height: 1.6rem;
	}

	/* The brand's colour, as it reads on this ground (the Heduno look's ink: Heduno's pink, or a brand app's colour
	   darkened or lightened just enough, K-144d0c71), as the apps' bar keeps a pale brand colour readable. */
	.pmb-item.is-active,
	.pmb-more[aria-expanded="true"] {
		color: var(--hd-brand-ink, var(--primary-oklch));
		opacity: 1;
	}

	/* K-607f747d: an item carrying the new unread Messages number keeps its icon at 75% and the number at full
	   strength; every other item and badge (the bell's included) is exactly as before. */
	.pmb-item:not(.is-active):has(> .pmb-badge-unread) {
		opacity: 1;
	}

	.pmb-item:not(.is-active):has(> .pmb-badge-unread) .pmb-icon {
		opacity: 0.75;
	}

	.pmb-item.is-active::after {
		content: "";
		position: absolute;
		bottom: 0.4rem;
		left: 50%;
		width: 0.3rem;
		height: 0.3rem;
		margin-left: -0.15rem;
		border-radius: 50%;
		background: currentColor;
	}

	.pmb-item:focus-visible {
		outline: 2px solid var(--primary-oklch);
		outline-offset: -4px;
		border-radius: 0.75rem;
	}

	/* Staging only: AIDE's round feedback button sits 16px in from the bottom-right corner; More stays clear of it. */
	body.has-feedback-button .pmb {
		padding-right: 3.5rem;
	}

	/* K-9ee72985: the bell's unread count on Notifications (the Partner dashboard's bar), as on its menu item. */
	.pmb-badge {
		position: absolute;
		top: 0.55rem;
		left: calc(50% + 0.35rem);
		min-width: 1.15rem;
		height: 1.15rem;
		padding: 0 0.3rem;
		border-radius: 999px;
		background: var(--hd-brand-ink, var(--primary-oklch));
		color: #ffffff;
		font-size: 0.6875rem;
		font-weight: 700;
		line-height: 1.15rem;
		text-align: center;
	}

	/* K-607f747d: the unread mark on Messages, the brand apps' own (white-label Navbar.tsx .unreadNumber): white on
	   the red of their chat list's unread dots (4.7:1), whatever the brand's colour. */
	.pmb-badge-unread {
		background: #e11d48;
	}

	/* The page keeps the bar's height free at its bottom (on top of its own margin there). K-9ee72985: the Partner
	   dashboard's page too (.pf-main, its own 48px at the bottom). */
	html body:has(.pmb) .pf-main {
		padding-bottom: calc(var(--pmb-height) + 3rem);
	}

	html body:has(.pmb) .main-with-sidebar {
		padding-bottom: calc(var(--pmb-height) + 2.5rem);
	}

	html body:has(.pmb) .main-with-sidebar.h-dvh {
		padding-bottom: calc(var(--pmb-height) + 1rem);
	}

	/* A bar that sticks to the bottom of the screen as the page scrolls sticks above it, at its own gap from it:
	   Discoverability's Save, and New broadcast's Save draft and Send (broadcasts.css, 12px up). */
	html body:has(.pmb) [data-profile-tags-bar] {
		bottom: var(--pmb-height);
	}

	html body:has(.pmb) .bcx-footer {
		bottom: calc(var(--pmb-height) + 12px);
	}
}
