/* Homes By Design — Desk theme, design B "Builder pro" (loaded via app_include_css; also web_include_css
   for shared tokens). Navy chrome, gold accents, dense and high-contrast. Overrides Frappe v16 CSS variables
   and a few selectors only; no core edits. Client-facing pages (design C) live in hbd_portal.css. */

:root {
	--hbd-navy: #0d2237;
	--hbd-navy-hover: #1a3552;
	--hbd-navy-active: #081726;
	--hbd-navy-2: #1d3b5b;      /* raised surface on navy */
	--hbd-navy-line: #22405f;   /* hairline on navy */
	--hbd-gold: #ba8f4a;
	--hbd-gold-hover: #c99d57;
	--hbd-gold-bright: #e2b76c; /* gold on navy (AA for text) */
	--hbd-gold-ink: #7a571c;    /* gold text on white (AA) */
	--hbd-gold-bg: #f4ead8;
	--hbd-gold-soft: rgba(186, 143, 74, 0.14);
	--hbd-mist: #b8c5d3;        /* secondary text on navy */
	--hbd-radius-sm: 4px;
	--hbd-radius: 6px;
	--hbd-radius-lg: 8px;
	--hbd-shadow-1: 0 1px 0 rgba(13, 34, 55, 0.05);
	--hbd-shadow-2: 0 8px 22px rgba(13, 34, 55, 0.16);
	--hbd-focus: 0 0 0 2px #fff, 0 0 0 4px var(--hbd-gold);
}

/* ---------- Desk (light) ---------- */
:root,
[data-theme="light"] {
	--primary: var(--hbd-navy);
	--primary-color: var(--hbd-navy);
	--brand-color: var(--hbd-navy);
	--btn-primary: var(--hbd-navy);
	--ink-blue-link: var(--hbd-navy);
	--checkbox-gradient: linear-gradient(180deg, var(--hbd-navy) -124.51%, var(--hbd-navy) 100%);
	--focus-default: 0px 0px 0px 2px rgba(186, 143, 74, 0.75);
	--focus-outline-default: 2px solid var(--hbd-gold);
}

/* ---------- Desk (dark): navy disappears on dark surfaces, so gold leads ---------- */
[data-theme="dark"] {
	--primary: var(--hbd-gold);
	--primary-color: var(--hbd-gold);
	--brand-color: var(--hbd-gold);
	--btn-primary: var(--hbd-gold);
	--ink-blue-link: var(--hbd-gold-bright);
	--checkbox-gradient: linear-gradient(180deg, var(--hbd-gold) -124.51%, var(--hbd-gold) 100%);
	--hbd-focus: 0 0 0 2px #171717, 0 0 0 4px var(--hbd-gold-bright);
}

/* ---------- Sidebar: Liquid Glass rail ----------
   The panel floats: inset from the window edge on a quiet brand-tinted canvas (navy light from the
   top, a warm gold glow from the foot), drawn as a translucent material with a lit top edge and a
   layered shadow. Corners are concentric: 16px panel = 8px gutter + 8px row radius. Rows are pills;
   the row you are on is a raised tile with a short gold bar, the one loud mark on the panel.
   Espresso tokens are re-scoped on the panel (as before), so every core child follows them.
   Fallbacks: no backdrop-filter / reduced transparency / more contrast -> solid surface. */
:root {
	--hbd-gap: 8px;           /* panel inset from the window and the dock */
	--hbd-panel-radius: 16px;
	--hbd-canvas:
		radial-gradient(120% 55% at 0% 0%, rgba(29, 78, 137, 0.20), transparent 70%),
		radial-gradient(90% 45% at 0% 100%, rgba(186, 143, 74, 0.16), transparent 70%),
		linear-gradient(180deg, #e3ebf5, #dde6f1);
	/* emblem blue: a light wash of the HBD navy, cooler at the top */
	--hbd-glass: linear-gradient(180deg, rgba(232, 240, 250, 0.80), rgba(214, 227, 243, 0.68));
	--hbd-glass-solid: #e6eef8;
	--hbd-glass-edge: rgba(13, 34, 55, 0.09);
	--hbd-glass-shadow:
		inset 0 1px 0 rgba(255, 255, 255, 0.85),
		inset 0 0 0 1px rgba(255, 255, 255, 0.35),
		0 1px 2px rgba(13, 34, 55, 0.06),
		0 8px 24px -8px rgba(13, 34, 55, 0.16),
		0 24px 48px -16px rgba(13, 34, 55, 0.12);
	--hbd-blur: blur(24px) saturate(180%);
	--hbd-ease: cubic-bezier(0.32, 0.72, 0, 1);
}
[data-theme="dark"] {
	--hbd-canvas:
		radial-gradient(120% 55% at 0% 0%, rgba(43, 86, 128, 0.28), transparent 70%),
		radial-gradient(90% 45% at 0% 100%, rgba(186, 143, 74, 0.12), transparent 70%),
		linear-gradient(180deg, #141619, #121315);
	--hbd-glass: linear-gradient(180deg, rgba(44, 47, 52, 0.66), rgba(34, 36, 40, 0.58));
	--hbd-glass-solid: #212327;
	--hbd-glass-edge: rgba(255, 255, 255, 0.08);
	--hbd-glass-shadow:
		inset 0 1px 0 rgba(255, 255, 255, 0.09),
		0 1px 2px rgba(0, 0, 0, 0.4),
		0 12px 32px -10px rgba(0, 0, 0, 0.55);
}

/* Tokens the core panel reads, re-scoped to the glass (light) */
.body-sidebar {
	--desk-sidebar-bg: transparent;
	--radius: 8px;
	--text-color: #0d2237;
	--ink-gray-9: #0d2237;
	--ink-gray-8: #0d2237;
	--ink-gray-7: #23374c;
	--ink-gray-6: #34485c;   /* row labels and glyphs */
	--ink-gray-5: #46566a;   /* group headings (AA on the blue glass, top to foot) */
	--ink-gray-4: #536274;   /* counts, shortcut hints */
	--icon-stroke: #34485c;
	--surface-gray-1: rgba(13, 34, 55, 0.04);
	--surface-gray-2: rgba(13, 34, 55, 0.06);   /* row hover */
	--surface-gray-3: rgba(13, 34, 55, 0.09);   /* header hover */
	--surface-elevation-2: rgba(255, 255, 255, 0.86);
	--surface-elevation-3: #ffffff;              /* the row you are on */
	--outline-gray-1: rgba(13, 34, 55, 0.08);
	--outline-gray-2: rgba(13, 34, 55, 0.08);
	--shadow-sm: 0 0 0 0.5px rgba(13, 34, 55, 0.1), 0 1px 2px rgba(13, 34, 55, 0.08), 0 2px 6px -2px rgba(13, 34, 55, 0.1);
	--hbd-marker: #a67b3a;   /* brand gold one step deeper: 3.8:1 on the white tile */
	color: var(--text-color);
}
[data-theme="dark"] .body-sidebar {
	--text-color: #f3f5f7;
	--ink-gray-9: #ffffff;
	--ink-gray-8: #f3f5f7;
	--ink-gray-7: #dde2e7;
	--ink-gray-6: #c3cbd3;
	--ink-gray-5: #9ba6b1;
	--ink-gray-4: #97a2ad;
	--icon-stroke: #c3cbd3;
	--surface-gray-1: rgba(255, 255, 255, 0.04);
	--surface-gray-2: rgba(255, 255, 255, 0.07);
	--surface-gray-3: rgba(255, 255, 255, 0.1);
	--surface-elevation-2: rgba(255, 255, 255, 0.1);
	--surface-elevation-3: rgba(255, 255, 255, 0.12);
	--outline-gray-1: rgba(255, 255, 255, 0.08);
	--outline-gray-2: rgba(255, 255, 255, 0.08);
	--shadow-sm: inset 0 0.5px 0 rgba(255, 255, 255, 0.12), 0 1px 3px rgba(0, 0, 0, 0.35);
	--hbd-marker: var(--hbd-gold-bright);
}

/* The panel: a floating sheet of glass (desktop and tablet) */
@media (min-width: 768px) {
	.body-sidebar-container {
		background: var(--hbd-canvas);
		background-attachment: fixed;
	}
	/* A pinned dock stands on the same canvas, so dock and panel read as one chrome */
	body.dock-pinned .dock {
		background: var(--hbd-canvas);
		background-attachment: fixed;
		border-right-color: transparent;
	}
	.body-sidebar-container .body-sidebar {
		margin: var(--hbd-gap);
		height: calc(100vh - 2 * var(--hbd-gap));
		height: calc(100dvh - 2 * var(--hbd-gap));
		border: 1px solid var(--hbd-glass-edge);
		border-radius: var(--hbd-panel-radius);
		background: var(--hbd-glass);
		-webkit-backdrop-filter: var(--hbd-blur);
		backdrop-filter: var(--hbd-blur);
		box-shadow: var(--hbd-glass-shadow);
		overflow: hidden;
		transition: width 0.3s var(--hbd-ease), margin 0.3s var(--hbd-ease), box-shadow 0.2s ease,
			background-color 0.2s ease, opacity 0.2s ease;
	}
	/* Collapsed beside a pinned dock the core hides the panel (width 0): the inset goes with it */
	.body-sidebar-container.sidebar-hidden .body-sidebar {
		margin-left: 0;
		margin-right: 0;
		border-width: 0;
		box-shadow: none;
		opacity: 0;
	}
	/* Edge handle, arrow and the notification panel are placed off the panel's width: add the inset */
	.sidebar-edge {
		left: calc(var(--sidebar-width) + var(--hbd-gap) - 4px);
	}
	.body-sidebar-container:not(.expanded) .sidebar-edge {
		left: calc(var(--sidebar-collapsed-width) + var(--hbd-gap) - 4px);
	}
	.sidebar-edge::after {
		top: 24px;
		height: calc(100% - 48px);
		border-radius: 2px;
	}
	.sidebar-edge:hover::after {
		background: rgba(186, 143, 74, 0.55);
	}
	.sidebar-collapse-arrow {
		bottom: calc(16px + var(--hbd-gap));
		left: calc(var(--sidebar-width) + var(--hbd-gap) - 12px);
	}
	.body-sidebar-container:not(.expanded) .sidebar-collapse-arrow {
		left: calc(var(--sidebar-collapsed-width) + var(--hbd-gap) - 12px);
	}
	.body-sidebar-container.expanded .sidebar-panel {
		left: calc(var(--sidebar-width) + 2 * var(--hbd-gap));
	}
	.body-sidebar-container:not(.expanded) .sidebar-panel {
		left: calc(var(--sidebar-collapsed-width) + 2 * var(--hbd-gap));
	}
	.body-sidebar-container.sidebar-hidden .sidebar-edge {
		left: -4px;
	}
}

/* Rows: pills with a quiet hover, a press response, and colour-only transitions */
.body-sidebar .standard-sidebar-item {
	transition: background-color 0.16s ease, box-shadow 0.16s ease, transform 0.12s ease;
}
.body-sidebar .standard-sidebar-item .item-anchor {
	height: 30px;
	transition: color 0.16s ease;
}
.body-sidebar .standard-sidebar-item:not(.active-sidebar):has(> a.item-anchor:active) {
	transform: scale(0.985);
}
.body-sidebar .standard-sidebar-item .sidebar-item-label {
	font-weight: 460;
	letter-spacing: 0.01em;
	transition: color 0.16s ease, opacity 0.2s ease;
}
/* The row you are on: raised tile, navy ink, a short gold bar (light); gold ink (dark) */
.body-sidebar .standard-sidebar-item.active-sidebar::before,
.body-sidebar-container:not(.expanded) .sidebar-item-container:has(> .nested-container.hidden .active-sidebar) > .standard-sidebar-item::before {
	content: "";
	position: absolute;
	left: 3px;
	top: 50%;
	width: 3px;
	height: 14px;
	border-radius: 2px;
	background: var(--hbd-marker);
	transform: translateY(-50%);
	pointer-events: none;
}
.body-sidebar .standard-sidebar-item.active-sidebar .sidebar-item-label {
	font-weight: 600;
	letter-spacing: 0;
}
[data-theme="dark"] .body-sidebar .standard-sidebar-item.active-sidebar .sidebar-item-label,
[data-theme="dark"] .body-sidebar .standard-sidebar-item.active-sidebar .sidebar-item-icon {
	color: var(--hbd-gold-bright);
}
/* Group headings: small-caps, muted, a little tracking -- they name the rows, they are not rows */
.body-sidebar .standard-sidebar-item .item-anchor.section-break .sidebar-item-label {
	font-size: 13px;
	font-weight: 600;
	font-variant-caps: all-small-caps;
	letter-spacing: 0.06em;
	color: var(--ink-gray-5);
}
/* Header: the module title in navy at display weight; a logo sits on a white tile with a hairline */
.body-sidebar .sidebar-header .header-title {
	font-weight: 600;
	letter-spacing: -0.005em;
	color: var(--ink-gray-8);
}
.body-sidebar .shell-header .header-logo img {
	background-color: #ffffff;
	padding: 2px;
	border-radius: 8px;
	box-shadow: 0 0 0 1px rgba(13, 34, 55, 0.08), 0 1px 2px rgba(13, 34, 55, 0.1);
}
/* The user chip keeps the gutter off the panel's rounded foot */
.body-sidebar .body-sidebar-bottom {
	padding-bottom: var(--hbd-gap);
}
/* The scroll box fades out under the foot instead of cutting rows off at a hard line */
.body-sidebar .body-sidebar-top {
	-webkit-mask-image: linear-gradient(180deg, #000 calc(100% - 28px), transparent);
	mask-image: linear-gradient(180deg, #000 calc(100% - 28px), transparent);
	padding-bottom: 28px; /* the last row scrolls clear of the fade */
	scrollbar-width: thin;
	scrollbar-color: rgba(13, 34, 55, 0.18) transparent;
}
[data-theme="dark"] .body-sidebar .body-sidebar-top {
	scrollbar-color: rgba(255, 255, 255, 0.18) transparent;
}

/* Phone: a glass drawer that slides in from the edge it lives on, over a navy-tinted scrim */
@media (max-width: 767.98px) {
	.body-sidebar-container {
		--sidebar-width: min(288px, calc(100vw - 64px));
	}
	.body-sidebar-container .body-sidebar {
		top: var(--hbd-gap);
		left: var(--hbd-gap);
		bottom: auto;
		height: calc(100vh - 2 * var(--hbd-gap));
		height: calc(100dvh - 2 * var(--hbd-gap));
		z-index: 1022;
		border: 1px solid var(--hbd-glass-edge);
		border-radius: 20px;
		background: var(--hbd-glass), rgba(247, 248, 250, 0.55);
		-webkit-backdrop-filter: blur(30px) saturate(180%);
		backdrop-filter: blur(30px) saturate(180%);
		box-shadow: var(--hbd-glass-shadow);
		overflow: hidden;
		transition: transform 0.34s var(--hbd-ease), opacity 0.22s ease, visibility 0s linear 0s;
	}
	[data-theme="dark"] .body-sidebar-container .body-sidebar {
		background: var(--hbd-glass), rgba(28, 30, 34, 0.6);
	}
	.body-sidebar-container.expanded .body-sidebar {
		height: calc(100vh - 2 * var(--hbd-gap));
		height: calc(100dvh - 2 * var(--hbd-gap));
		top: var(--hbd-gap);
		bottom: auto;
	}
	.body-sidebar-container:not(.expanded) .body-sidebar {
		background: var(--hbd-glass);
		border-color: var(--hbd-glass-edge);
		opacity: 0;
		transform: translateX(calc(-100% - 2 * var(--hbd-gap)));
		box-shadow: none;
		/* closed drawer leaves the tab order (hidden after the slide-out finishes) */
		visibility: hidden;
		transition: transform 0.34s var(--hbd-ease), opacity 0.22s ease, visibility 0s linear 0.34s;
	}
	.body-sidebar-container.expanded .overlay {
		left: 0;
		width: 100vw;
		background-color: rgba(8, 23, 38, 0.36);
	}
	[data-theme="dark"] .body-sidebar-container.expanded .overlay {
		background-color: rgba(0, 0, 0, 0.55);
	}
	/* Touch targets: 44px rows in the drawer */
	.body-sidebar .standard-sidebar-item .item-anchor {
		height: 44px;
	}
	.body-sidebar .standard-sidebar-item .sidebar-item-label {
		font-size: 15px;
	}
}

/* Fallbacks: a solid surface wherever the material cannot be drawn or is not wanted */
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
	.body-sidebar-container .body-sidebar,
	.body-sidebar-container:not(.expanded) .body-sidebar,
	[data-theme="dark"] .body-sidebar-container .body-sidebar {
		background: var(--hbd-glass-solid);
	}
}
@media (prefers-reduced-transparency: reduce) {
	.body-sidebar-container .body-sidebar,
	.body-sidebar-container:not(.expanded) .body-sidebar,
	[data-theme="dark"] .body-sidebar-container .body-sidebar {
		background: var(--hbd-glass-solid);
		-webkit-backdrop-filter: none;
		backdrop-filter: none;
	}
}
@media (prefers-contrast: more) {
	.body-sidebar-container .body-sidebar,
	[data-theme="dark"] .body-sidebar-container .body-sidebar {
		background: var(--hbd-glass-solid);
		-webkit-backdrop-filter: none;
		backdrop-filter: none;
		border-color: currentColor;
	}
	.body-sidebar {
		--ink-gray-6: #0d2237;
		--ink-gray-5: #23374c;
		--ink-gray-4: #23374c;
	}
	[data-theme="dark"] .body-sidebar {
		--ink-gray-6: #ffffff;
		--ink-gray-5: #e3e8ec;
		--ink-gray-4: #e3e8ec;
	}
}

/* ---------- Page head: a 2px brand rule instead of a hairline ---------- */
.page-head {
	border-bottom: 2px solid var(--hbd-navy);
}
[data-theme="dark"] .page-head {
	border-bottom-color: var(--hbd-gold);
}

/* ---------- Buttons ---------- */
/* v16 "espresso" buttons (Save, Submit, primary actions) — solid variant in brand navy */
.es-button {
	--bt-solid-bg: var(--hbd-navy);
	--bt-solid-bg-hover: var(--hbd-navy-hover);
	--bt-solid-bg-active: var(--hbd-navy-active);
	--bt-solid-fg: #ffffff;
}
[data-theme="dark"] .es-button {
	--bt-solid-bg: var(--hbd-gold);
	--bt-solid-bg-hover: var(--hbd-gold-hover);
	--bt-solid-bg-active: #a67d3d;
	--bt-solid-fg: var(--hbd-navy);
}
/* Legacy bootstrap primary buttons: navy */
.btn-primary,
.btn.btn-primary {
	background-color: var(--btn-primary);
	border-color: var(--btn-primary);
	color: #ffffff;
}
.btn-primary:hover,
.btn.btn-primary:hover,
.btn-primary:focus-visible {
	background-color: var(--hbd-navy-hover);
	border-color: var(--hbd-navy-hover);
	color: #ffffff;
}
[data-theme="dark"] .btn-primary,
[data-theme="dark"] .btn.btn-primary {
	color: var(--hbd-navy);
}
[data-theme="dark"] .btn-primary:hover,
[data-theme="dark"] .btn.btn-primary:hover {
	background-color: var(--hbd-gold-hover);
	border-color: var(--hbd-gold-hover);
	color: var(--hbd-navy);
}

/* Danger (Reject, Delete): white text needs >= 4.5:1 in both themes */
.btn-danger,
.btn.btn-danger {
	background-color: #b42318;
	border-color: #b42318;
	color: #ffffff;
}
.btn-danger:hover,
.btn.btn-danger:hover,
.btn-danger:focus-visible {
	background-color: #912018;
	border-color: #912018;
	color: #ffffff;
}

/* ---------- Focus: always visible, gold ring (keyboard only) ---------- */
.btn:focus-visible,
.es-button:focus-visible,
a:focus-visible,
button:focus-visible,
.shell-header:focus-visible,
.widget:focus-visible {
	outline: none;
	box-shadow: var(--hbd-focus) !important;
}

/* ---------- Workspace (HBD) cards and shortcuts ---------- */
.layout-main-section .widget.shortcut-widget-box,
.layout-main-section .widget.links-widget-box {
	border-radius: var(--hbd-radius-lg);
	border: 1px solid #d3dae2;
	box-shadow: var(--hbd-shadow-1);
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.layout-main-section .widget.shortcut-widget-box {
	border-top: 3px solid var(--hbd-gold);
}
.layout-main-section .widget.shortcut-widget-box:hover {
	border-color: var(--hbd-navy);
	border-top-color: var(--hbd-gold);
	box-shadow: var(--hbd-shadow-2);
}
.layout-main-section .widget.shortcut-widget-box .widget-title,
.layout-main-section .widget.links-widget-box .widget-title {
	color: var(--hbd-navy);
	font-weight: 650;
}
.layout-main-section .ce-header {
	color: var(--hbd-navy);
}
[data-theme="dark"] .layout-main-section .widget.shortcut-widget-box,
[data-theme="dark"] .layout-main-section .widget.links-widget-box {
	border-color: #2d4459;
}
[data-theme="dark"] .layout-main-section .widget.shortcut-widget-box:hover {
	border-color: var(--hbd-gold);
	border-top-color: var(--hbd-gold);
}
[data-theme="dark"] .layout-main-section .widget.shortcut-widget-box .widget-title,
[data-theme="dark"] .layout-main-section .widget.links-widget-box .widget-title,
[data-theme="dark"] .layout-main-section .ce-header {
	color: #ffffff;
}

/* Role screens ("HBD …" workspaces, rtm_builder.screens): big tiles, one per task — also on a phone */
body[data-route^="Workspaces/HBD"] .layout-main-section .widget.shortcut-widget-box {
	min-height: 84px;
	justify-content: center;
}
body[data-route^="Workspaces/HBD"] .layout-main-section .widget.shortcut-widget-box .widget-title {
	font-size: 18px;
}

/* Shortcuts the role cannot open, and sections left empty by them (hbd_desk.js) */
.layout-main-section:not(.edit-mode) .ce-block.hbd-empty-block,
.layout-main-section:not(.edit-mode) .ce-block.hbd-empty-section {
	display: none;
}

/* ---------- Content details ---------- */
/* Links in forms / list views: navy, gold underline on hover */
.frappe-control a:not(.btn),
.list-row a.ellipsis:hover {
	color: var(--ink-blue-link);
}
.frappe-control a:not(.btn):hover,
.form-link-title:hover {
	text-decoration-color: var(--hbd-gold);
}
/* Indicators that use "blue" read as brand navy (gold-bright in dark) */
.indicator-pill.blue,
.indicator.blue {
	--indicator-color: var(--hbd-navy);
}
[data-theme="dark"] .indicator-pill.blue,
[data-theme="dark"] .indicator.blue {
	--indicator-color: var(--hbd-gold-bright);
}
/* Dark theme: page styles that hard-code navy text (yard board) — navy on near-black is unreadable */
[data-theme="dark"] .rtmy {
	--navy: var(--hbd-gold-bright);
}
[data-theme="dark"] .rtmy-count {
	color: var(--hbd-navy);
}
[data-theme="dark"] .rtmy-signoff {
	color: var(--hbd-gold-bright);
}
/* Phones (yard, crew, salespeople in the field): tap targets >= 44px on our own Desk pages */
@media (max-width: 767px) {
	.rtmc .btn,
	.rtmc .form-control,
	.rtmc .rtmc-chip,
	.rtmy .btn,
	.rtmw .btn,
	.rtmw .form-control,
	.rtmc .input-with-feedback,
	.rtmw .input-with-feedback,
	[data-page-route^="rtm-"] .page-form .input-with-feedback,
	[data-page-route^="rtm-"] .page-form .btn,
	.rtmw .rtmw-chip {
		min-height: 44px;
	}
	.rtmc .rtmc-chip,
	.rtmw .rtmw-chip {
		display: inline-flex;
		align-items: center;
	}
}
/* Brand logo: wide, keep it crisp and un-stretched */
.navbar-brand img,
.app-logo,
img.navbar-logo {
	object-fit: contain;
}
::selection {
	background: rgba(186, 143, 74, 0.3);
}

/* ---------- Motion: respect the OS setting ---------- */
@media (prefers-reduced-motion: reduce) {
	*,
	*::before,
	*::after {
		animation-duration: 0.01ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.01ms !important;
		scroll-behavior: auto !important;
	}
}

/* ---------- Hover flyout: point at an icon, the panel pulls out where it goes and what is inside ----------
   Built by hbd_desk.js on desktop pointers only; same glass as the rail. */
.hbd-flyout {
	position: fixed;
	z-index: 1040;
	width: 264px;
	max-height: min(70vh, 520px);
	overflow: auto;
	padding: 10px 6px 6px;
	border: 1px solid var(--hbd-glass-edge);
	border-radius: 14px;
	background: var(--hbd-glass), rgba(230, 238, 248, 0.94); /* near-opaque base: it floats over any page */
	-webkit-backdrop-filter: var(--hbd-blur);
	backdrop-filter: var(--hbd-blur);
	box-shadow: var(--hbd-glass-shadow);
	color: #0d2237;
	opacity: 0;
	visibility: hidden; /* closed = out of the Tab order and the accessibility tree */
	transform: translateX(-6px) scale(0.98);
	transform-origin: left top;
	transition: opacity 0.16s ease, transform 0.22s var(--hbd-ease), visibility 0s linear 0.22s;
	pointer-events: none;
}
.hbd-flyout.open {
	opacity: 1;
	visibility: visible;
	transform: none;
	transition: opacity 0.16s ease, transform 0.22s var(--hbd-ease), visibility 0s;
	pointer-events: auto;
}
[data-theme="dark"] .hbd-flyout {
	background: var(--hbd-glass), rgba(30, 33, 38, 0.94);
	color: #e8edf3;
}
.hbd-flyout-head {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 0 8px 8px;
	border-bottom: 1px solid var(--hbd-glass-edge);
	margin-bottom: 4px;
}
.hbd-flyout-head .icon {
	flex: none;
	width: 20px;
	height: 20px;
	color: var(--hbd-gold);
}
.hbd-flyout-head > div {
	flex: 1;
	min-width: 0;
	text-align: left;
}
.hbd-flyout-title {
	font-size: 14px;
	font-weight: 600;
	line-height: 1.2;
}
.hbd-flyout-where {
	font-size: 11.5px;
	color: #3f5064;
	margin-top: 1px;
}
[data-theme="dark"] .hbd-flyout-where {
	color: #a9b4c0;
}
.hbd-flyout a.hbd-flyout-link {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
	padding: 6px 8px;
	border-radius: 8px;
	font-size: 13px;
	color: inherit;
	text-decoration: none;
	transition: background-color 0.14s ease;
}
.hbd-flyout a.hbd-flyout-link:hover,
.hbd-flyout a.hbd-flyout-link:focus-visible {
	background: rgba(13, 34, 55, 0.07);
	outline: none;
}
[data-theme="dark"] .hbd-flyout a.hbd-flyout-link:hover {
	background: rgba(255, 255, 255, 0.08);
}
.hbd-flyout-group {
	padding: 8px 8px 2px;
	font-size: 11px;
	font-weight: 600;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: #3f5064;
}
[data-theme="dark"] .hbd-flyout-group,
[data-theme="dark"] .hbd-flyout-kind,
[data-theme="dark"] .hbd-flyout-empty {
	color: #a9b4c0;
}
.hbd-flyout-kind {
	font-size: 11px;
	color: #47576a;
	white-space: nowrap;
}
.hbd-flyout-empty {
	padding: 6px 8px;
	font-size: 12.5px;
	color: #3f5064;
}
/* the flyout already names the icon: the core's one-word tooltip would sit on top of it */
body.hbd-flyout-on .es-tooltip {
	display: none;
}
@media (prefers-reduced-motion: reduce) {
	.hbd-flyout {
		transition: none;
		transform: none;
	}
}
@media (prefers-reduced-transparency: reduce) {
	.hbd-flyout {
		background: var(--hbd-glass-solid);
		-webkit-backdrop-filter: none;
		backdrop-filter: none;
	}
}
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
	.hbd-flyout {
		background: var(--hbd-glass-solid);
	}
}

/* Folded rail opened by hover (hbd_desk.js): the panel floats over the page, so it casts a deeper shadow */
.body-sidebar-container.hbd-peek {
	z-index: 1035;
}
.body-sidebar-container.hbd-peek .body-sidebar {
	box-shadow: var(--hbd-glass-shadow), 0 28px 64px -16px rgba(13, 34, 55, 0.3);
}
