/* ============================================================
   BOLTON Signal — 04 COMPONENTS
   Buttons, nav, dropdown, drawer, cards, chips, badges, forms,
   signal-line primitives, staging badge.
   ============================================================ */
@layer components {

	/* ---------- Buttons ---------- */
	.btn {
		display: inline-flex; align-items: center; gap: 0.55em;
		padding: 0.8em 1.4em;
		font: 600 var(--bx-fs-base)/1 var(--bx-font-sans);
		border: 1px solid transparent; border-radius: var(--bx-radius);
		cursor: pointer; text-decoration: none;
		transition: background var(--bx-dur-1) var(--bx-ease), color var(--bx-dur-1) var(--bx-ease), transform var(--bx-dur-1) var(--bx-ease), box-shadow var(--bx-dur-2) var(--bx-ease);
	}
	.btn:active { transform: translateY(1px); }
	.btn__arrow { transition: transform var(--bx-dur-1) var(--bx-ease); }
	.btn:hover .btn__arrow { transform: translateX(3px); }

	.btn--gold { background: var(--bx-btn-primary-bg); color: var(--bx-btn-primary-fg); box-shadow: 0 0 0 1px rgba(200,162,76,0.30), 0 10px 34px -14px rgba(126,99,32,0.7); }
	.btn--gold:hover { background: var(--bx-btn-primary-hover-bg); color: var(--bx-btn-primary-fg); }
	.btn--gold:active { background: var(--bx-btn-primary-active-bg); }
	.btn--gold[disabled], .btn--gold[aria-disabled="true"] { opacity: 0.5; cursor: not-allowed; }
	.btn--gold .btn__arrow { color: inherit; }
	.btn--ghost { background: transparent; color: var(--bx-contrast); border-color: var(--bx-surface-border); }
	.btn--ghost:hover { border-color: var(--bx-accent-strong); color: var(--bx-accent-strong); }
	.btn--sm { padding: 0.55em 1em; font-size: var(--bx-fs-sm); }
	.btn--lg { padding: 1em 1.8em; font-size: var(--bx-fs-lg); }
	.btn--block { display: flex; width: 100%; justify-content: center; }
	.btn:disabled, .btn[disabled], .btn[aria-disabled="true"] { opacity: 0.5; cursor: not-allowed; box-shadow: none; pointer-events: none; }

	/* ---------- Primary nav + dropdown ---------- */
	.site-nav__list { list-style: none; display: flex; flex-wrap: nowrap; align-items: center; gap: clamp(0.5rem, 1.4vw, 1.5rem); margin: 0; padding: 0; }
	/* Each top-level item holds its natural width and never shrinks. With the default
	   `flex: 0 1 auto` + `min-width: auto`, WebKit/Safari shrinks these to min-content
	   and breaks "How We Work" / "Knowledge Centre" onto two lines under space
	   pressure (Chrome held them at preferred width). `flex: 0 0 auto` + the link
	   `white-space: nowrap` below make a two-line label impossible in every engine. */
	.site-nav__list > .menu-item { flex: 0 0 auto; }
	.site-nav__list a { color: var(--bx-contrast-midtone); text-decoration: none; font-size: var(--bx-fs-sm); letter-spacing: 0.01em; padding: 0.4rem 0; white-space: nowrap; }
	/* Narrow desktop band (matches 03-layout): tighten the nav gap so the rigid row
	   fits without compression; premium gap restored at ≥1141px. */
	@media (min-width: 992px) and (max-width: 1140px) { .site-nav__list { gap: 0.5rem; } }
	/* The header RFQ CTA stays a single rigid line — never shrink it into a two- or
	   three-line button when the actions cluster is under pressure (WebKit/Safari did
	   this at ~1024px). With the narrow-band relief above, it keeps full size. */
	.site-header__rfq { flex: 0 0 auto; white-space: nowrap; }
	.site-nav__list > .menu-item > a:hover,
	.site-nav__list > .menu-item.current-menu-item > a,
	.site-nav__list > .menu-item.current-menu-ancestor > a { color: var(--bx-cream); }
	/* Current-page wayfinding: a signal underline on the active top-level item
	   (box-shadow, so it never collides with the dropdown caret ::after). */
	.site-nav__list > .menu-item.current-menu-item > a,
	.site-nav__list > .menu-item.current-menu-ancestor > a {
		box-shadow: inset 0 -2px 0 -1px var(--bx-gold);
	}
	.site-nav__list .menu-item { position: relative; }

	.site-nav__list .menu-item-has-children > a::after {
		content: ""; display: inline-block; width: 0.4em; height: 0.4em; margin-left: 0.45em;
		border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor;
		transform: translateY(-2px) rotate(45deg); transition: transform var(--bx-dur-1) var(--bx-ease);
	}
	.site-nav__list .sub-menu {
		position: absolute; top: calc(100% + 0.5rem); left: 0; min-width: 320px;
		list-style: none; margin: 0; padding: 0.5rem;
		background: var(--bx-base-midtone); border: 1px solid var(--bx-navy-line); border-radius: var(--bx-radius-lg);
		box-shadow: var(--bx-shadow-2);
		opacity: 0; visibility: hidden; transform: translateY(6px);
		transition: opacity var(--bx-dur-2) var(--bx-ease), transform var(--bx-dur-2) var(--bx-ease), visibility var(--bx-dur-2);
		z-index: 60;
	}
	.site-nav__list .menu-item-has-children:hover > .sub-menu,
	.site-nav__list .menu-item-has-children:focus-within > .sub-menu,
	.site-nav__list .menu-item-has-children.is-open > .sub-menu {
		opacity: 1; visibility: visible; transform: translateY(0);
	}
	.site-nav__list .sub-menu a { display: block; padding: 0.6rem 0.8rem; border-radius: var(--bx-radius-sm); font-size: var(--bx-fs-sm); }
	.site-nav__list .sub-menu a:hover { background: var(--bx-surface); color: var(--bx-cream); }

	/* ---------- Nav toggle (hamburger) ---------- */
	.nav-toggle { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; background: transparent; border: 1px solid var(--bx-surface-border); border-radius: var(--bx-radius); cursor: pointer; }
	/* Hidden on desktop — the primary nav takes over ≥992px. MUST match the nav
	   breakpoint in 03-layout so the inline nav and the hamburger never both show or
	   both hide. This hide MUST live in @layer components alongside the base display
	   above: an identical min-width hide in @layer layout (03) is overridden by this
	   later layer regardless of media query or specificity, which is what left the
	   hamburger showing on desktop. */
	@media (min-width: 992px) { .nav-toggle { display: none; } }
	.nav-toggle__bars { display: grid; gap: 4px; }
	.nav-toggle__bars span { display: block; width: 20px; height: 2px; background: var(--bx-contrast); transition: transform var(--bx-dur-2) var(--bx-ease), opacity var(--bx-dur-1); }
	.nav-toggle[aria-expanded="true"] .nav-toggle__bars span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
	.nav-toggle[aria-expanded="true"] .nav-toggle__bars span:nth-child(2) { opacity: 0; }
	.nav-toggle[aria-expanded="true"] .nav-toggle__bars span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

	/* ---------- Colour-theme switcher (Light / Dark / System) ---------- */
	.theme-switch { display: none; align-items: center; gap: 2px; padding: 3px; background: var(--bx-surface); border: 1px solid var(--bx-surface-border); border-radius: var(--bx-radius-pill); }
	/* SW-01: only reveal once JS is present AND the group has been un-hidden by app.js
	   (the :not([hidden]) guard ties "visible" to "functional" — an author display rule
	   would otherwise override the UA [hidden] rule and flash an inert control). */
	@media (min-width: 768px) { html.js .site-header__actions .theme-switch:not([hidden]) { display: inline-flex; } }
	html.js .theme-switch--drawer:not([hidden]) { display: inline-flex; } /* shown inside the mobile drawer, JS only */
	.theme-switch__btn {
		display: inline-flex; align-items: center; justify-content: center;
		width: 34px; height: 34px; padding: 0; margin: 0;
		background: transparent; border: 0; border-radius: var(--bx-radius-pill);
		color: var(--bx-steel); cursor: pointer;
		transition: color var(--bx-dur-1) var(--bx-ease), background var(--bx-dur-1) var(--bx-ease);
	}
	.theme-switch__btn:hover { color: var(--bx-contrast); }
	.theme-switch__btn[aria-pressed="true"] { background: var(--bx-gold); color: var(--bx-btn-primary-fg); }
	.theme-switch__btn:focus-visible { outline: none; box-shadow: var(--bx-focus); }
	.theme-switch__icon { display: block; }
	.mobile-drawer__theme { display: flex; align-items: center; justify-content: space-between; gap: var(--bx-sp-30); margin-top: auto; padding-top: var(--bx-sp-30); border-top: var(--bx-border-hair); }
	.mobile-drawer__theme-label { color: var(--bx-steel); }

	/* ---------- Mobile drawer ---------- */
	.mobile-drawer { position: fixed; inset: 0; z-index: 100; }
	.mobile-drawer[hidden] { display: none; }
	.mobile-drawer::before { content: ""; position: absolute; inset: 0; background: var(--bx-overlay); backdrop-filter: blur(2px); opacity: 0; transition: opacity var(--bx-dur-2) var(--bx-ease); }
	.mobile-drawer.is-open::before { opacity: 1; }
	.mobile-drawer__panel {
		position: absolute; inset-block: 0; right: 0; width: min(420px, 88vw);
		background: var(--bx-base-midtone); border-left: 1px solid var(--bx-navy-line);
		padding: var(--bx-sp-40); overflow-y: auto;
		transform: translateX(100%); transition: transform var(--bx-dur-3) var(--bx-ease);
		display: flex; flex-direction: column; gap: var(--bx-sp-40);
	}
	.mobile-drawer.is-open .mobile-drawer__panel { transform: translateX(0); }
	.mobile-drawer__head { display: flex; align-items: center; justify-content: space-between; }
	.mobile-drawer__close { width: 44px; height: 44px; font-size: 1.6rem; background: transparent; border: 1px solid var(--bx-surface-border); border-radius: var(--bx-radius); color: var(--bx-contrast); cursor: pointer; }
	.mobile-drawer__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.25rem; }
	.mobile-drawer__list a { display: block; padding: 0.85rem 0.5rem; color: var(--bx-contrast); text-decoration: none; border-bottom: var(--bx-border-hair); font-size: var(--bx-fs-lg); }
	.mobile-drawer__list .sub-menu { list-style: none; margin: 0 0 0 1rem; padding: 0; }
	.mobile-drawer__list .sub-menu a { font-size: var(--bx-fs-base); color: var(--bx-contrast-midtone); }

	/* ---------- Brand lockup ---------- */
	.brand-lockup { display: inline-flex; flex-direction: column; line-height: 1; text-decoration: none; }
	.brand-lockup__name { font: 800 1.4rem/1 var(--bx-font-display); letter-spacing: 0.18em; color: var(--bx-cream); }
	.brand-lockup__tag { font: 500 0.68rem/1 var(--bx-font-mono); letter-spacing: 0.22em; text-transform: uppercase; color: var(--bx-accent-strong); margin-top: 0.35rem; }

	/* ---------- Chips & badges ---------- */
	.chip-row { display: flex; flex-wrap: wrap; gap: 0.5rem; }
	.chip { display: inline-flex; align-items: center; padding: 0.3rem 0.75rem; font: 600 var(--bx-fs-xs)/1 var(--bx-font-mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--bx-accent-strong); background: var(--bx-surface); border: 1px solid var(--bx-surface-border); border-radius: var(--bx-radius-pill); }
	.badge { display: inline-flex; align-items: center; gap: 0.4em; padding: 0.25rem 0.6rem; font-size: var(--bx-fs-xs); border-radius: var(--bx-radius-sm); background: var(--bx-surface); border: var(--bx-border-hair); }

	/* ---------- Cards (glass / dimensional) ---------- */
	.card {
		position: relative; display: flex; flex-direction: column; gap: var(--bx-sp-30);
		padding: var(--bx-sp-40);
		background: var(--bx-surface); border: 1px solid var(--bx-navy-line); border-radius: var(--bx-radius-lg);
		backdrop-filter: blur(var(--bx-glass-blur));
		transition: border-color var(--bx-dur-2) var(--bx-ease), transform var(--bx-dur-2) var(--bx-ease), box-shadow var(--bx-dur-2) var(--bx-ease);
		overflow: hidden;
	}
	.card:hover { border-color: var(--bx-surface-border); transform: translateY(-3px); box-shadow: var(--bx-shadow-2); }
	.card__kicker { font: 600 var(--bx-fs-xs)/1 var(--bx-font-mono); letter-spacing: 0.12em; text-transform: uppercase; color: var(--bx-accent-strong); }
	.card__title { font-size: var(--bx-fs-lg); }
	.card__body { color: var(--bx-contrast-midtone); }
	.card__link { margin-top: auto; color: var(--bx-accent-strong); font-weight: 600; }
	.card--feature::after { /* gold top edge */ content: ""; position: absolute; inset: 0 0 auto 0; height: 2px; background: linear-gradient(90deg, transparent, var(--bx-gold), transparent); opacity: .6; }

	.card-grid { display: grid; gap: var(--bx-sp-40); grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); }

	/* ---------- Signal-line primitives ---------- */
	.signal-rule { height: 1px; background: linear-gradient(90deg, transparent, var(--bx-navy-line) 12%, var(--bx-navy-line) 88%, transparent); border: 0; }
	.signal-grid-bg { position: absolute; inset: 0; background-image: linear-gradient(var(--bx-navy-line) 1px, transparent 1px), linear-gradient(90deg, var(--bx-navy-line) 1px, transparent 1px); background-size: 48px 48px; opacity: .07; pointer-events: none; -webkit-mask-image: radial-gradient(120% 80% at 50% 0, #000, transparent 75%); mask-image: radial-gradient(120% 80% at 50% 0, #000, transparent 75%); }

	/* Section-level signal backdrop (reusable): a masked, mode-aware grid behind a
	   section's content. Add `.section--signal` to the <section> and drop a
	   `<div class="section-grid" aria-hidden="true">` as its first child. */
	.section--signal { position: relative; isolation: isolate; overflow: hidden; }
	.section--signal > .container { position: relative; z-index: 1; }
	.section-grid {
		position: absolute; inset: 0; z-index: 0; pointer-events: none;
		background-image:
			linear-gradient(var(--bx-grid-line) 1px, transparent 1px),
			linear-gradient(90deg, var(--bx-grid-line) 1px, transparent 1px);
		background-size: 54px 54px;
		-webkit-mask-image: radial-gradient(135% 95% at 50% 0%, #000, transparent 74%);
		mask-image: radial-gradient(135% 95% at 50% 0%, #000, transparent 74%);
	}

	/* ---------- Spec / data table ---------- */
	.spec-table { width: 100%; border-collapse: collapse; font-size: var(--bx-fs-sm); }
	.spec-table th, .spec-table td { text-align: left; padding: 0.7rem 0.9rem; border-bottom: var(--bx-border-hair); vertical-align: top; }
	.spec-table th { color: var(--bx-steel); font-weight: 600; font-family: var(--bx-font-mono); font-size: var(--bx-fs-xs); letter-spacing: 0.06em; text-transform: uppercase; width: 38%; }

	/* ---------- Forms ---------- */
	.field { display: grid; gap: 0.4rem; margin-bottom: var(--bx-sp-30); }
	.field label { font-size: var(--bx-fs-sm); color: var(--bx-contrast-midtone); font-weight: 600; }
	.field input, .field select, .field textarea {
		width: 100%; padding: 0.7rem 0.85rem; font: inherit; color: var(--bx-field-text);
		background: var(--bx-field-bg); border: 1px solid var(--bx-field-border); border-radius: var(--bx-radius);
	}
	.field input::placeholder, .field textarea::placeholder { color: var(--bx-placeholder); opacity: 1; }
	.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--bx-accent-strong); box-shadow: var(--bx-focus); }

	/* ---------- RFQ form (bolton-rfq plugin) ----------
	   The plugin outputs bare inputs in p.bolton-rfq-field with no theme classes,
	   so they fell back to browser defaults. Theme them with the same dual-mode
	   field tokens as .field, on the primary conversion page. */
	.bolton-rfq-form .bolton-rfq-field { display: grid; gap: 0.4rem; margin-bottom: var(--bx-sp-30); }
	.bolton-rfq-form .bolton-rfq-field > label { font-size: var(--bx-fs-sm); color: var(--bx-contrast-midtone); font-weight: 600; }
	.bolton-rfq-form input:not([type="hidden"]):not([type="checkbox"]):not([type="radio"]):not([type="submit"]),
	.bolton-rfq-form textarea,
	.bolton-rfq-form select {
		width: 100%; padding: 0.7rem 0.85rem; font: inherit;
		color: var(--bx-field-text); background: var(--bx-field-bg);
		border: 1px solid var(--bx-field-border); border-radius: var(--bx-radius);
	}
	.bolton-rfq-form input::placeholder, .bolton-rfq-form textarea::placeholder { color: var(--bx-placeholder); opacity: 1; }
	.bolton-rfq-form input:focus, .bolton-rfq-form textarea:focus, .bolton-rfq-form select:focus { outline: none; border-color: var(--bx-accent-strong); box-shadow: var(--bx-focus); }
	/* keep the honeypot field hidden regardless of plugin markup */
	.bolton-rfq-form input[name="bolton_rfq_hp"], .bolton-rfq-form .bolton-rfq-hp { position: absolute !important; left: -9999px !important; width: 1px !important; height: 1px !important; overflow: hidden !important; }

	/* ---------- Staging badge ---------- */
	.bolton-staging-badge {
		position: fixed; bottom: 12px; left: 12px; z-index: 9999;
		padding: 0.3rem 0.7rem; font: 700 0.7rem/1 var(--bx-font-mono); letter-spacing: 0.18em;
		color: var(--bx-btn-primary-fg); background: var(--bx-warning); border-radius: var(--bx-radius-sm);
		box-shadow: var(--bx-shadow-1); pointer-events: none;
	}
	#wpadminbar .bolton-staging-node > .ab-item { color: #ffd87a !important; font-weight: 700; }

	/* ---------- Loading / empty / error states ---------- */
	.is-loading { position: relative; min-height: 120px; }
	.is-loading::after { content: ""; position: absolute; inset: 0; background: linear-gradient(100deg, transparent 20%, var(--bx-surface) 40%, transparent 60%); background-size: 200% 100%; animation: bx-shimmer 1.4s linear infinite; }
	@keyframes bx-shimmer { to { background-position: -200% 0; } }
	@media (prefers-reduced-motion: reduce) { .is-loading::after { animation: none; } }
	.state-empty, .state-error { padding: var(--bx-sp-50); text-align: center; color: var(--bx-steel); border: 1px dashed var(--bx-navy-line); border-radius: var(--bx-radius-lg); }

	/* ---------- Account control — v0.3.0 ----------
	   Header: one compact 44×44 trigger (<summary>) opening a dropdown of native
	   WooCommerce endpoints. Drawer: the full list, flat. The RFQ button stays the
	   dominant gold CTA — this control is quiet (surface + outline, never gold-filled).
	   Logical properties so it mirrors under RTL. */

	/* The header account control is a DESKTOP affordance: it shows from 992px up,
	   alongside the primary nav, where there is room beside the dominant RFQ CTA
	   (header priority order: appearance → account → RFQ → menu). It is a single
	   44×44 control. Below 992px the mobile drawer carries the full account list, so
	   the header never squashes or wraps on phones/tablets. (Breakpoint unchanged.) */
	.site-header__actions .site-account { display: none; }
	@media (min-width: 992px) {
		.site-header__actions .site-account--menu { display: block; }
		.site-header__actions .site-account--link { display: inline-flex; }
	}

	/* Header trigger (summary or single-action link): ONE clean 44×44 quiet pill,
	   its single face (initials or user icon) centred both axes. The <summary>
	   disclosure marker (the ▶ triangle that, left on, renders on its own line and
	   stacks ABOVE the initials) is removed across every engine: list-style:none +
	   appearance:none (Firefox/standards) and ::-webkit-details-marker + ::marker
	   display:none (Chrome/Safari). gap:0 + line-height:1 keep the face exactly
	   centred; overflow:hidden clips any residual marker glyph as a final backstop. */
	.site-account--menu { position: relative; }
	.site-account__trigger,
	.site-account--link {
		display: inline-flex; align-items: center; justify-content: center; gap: 0;
		width: 44px; height: 44px; padding: 0; flex: none; overflow: hidden;
		line-height: 1; -webkit-appearance: none; appearance: none;
		border: 1px solid var(--bx-surface-border); border-radius: var(--bx-radius-pill);
		background: var(--bx-surface); color: var(--bx-text-2);
		cursor: pointer; text-decoration: none; list-style: none;
		transition: color var(--bx-dur-1) var(--bx-ease), border-color var(--bx-dur-1) var(--bx-ease), background var(--bx-dur-1) var(--bx-ease);
	}
	.site-account__trigger::-webkit-details-marker { display: none; }
	.site-account__trigger::marker { content: ""; display: none; }
	.site-account__trigger:hover,
	.site-account--link:hover { color: var(--bx-text); border-color: var(--bx-accent); background: var(--bx-surface-elev); }
	.site-account__trigger:focus-visible,
	.site-account--link:focus-visible { outline: none; box-shadow: var(--bx-focus); }
	.site-account__icon { flex: none; }
	.site-account__initials { font-weight: 650; font-size: 0.82rem; letter-spacing: 0.02em; line-height: 1; color: var(--bx-text); }

	/* Dropdown panel — absolute so opening never resizes the header */
	.site-account__panel {
		position: absolute; inset-inline-end: 0; inset-block-start: calc(100% + 0.45rem);
		z-index: 200; display: flex; flex-direction: column;
		min-width: 210px; max-width: calc(100vw - 1.5rem); padding: 0.4rem;
		background: var(--bx-surface-elev); border: 1px solid var(--bx-surface-border);
		border-radius: var(--bx-radius-lg); box-shadow: var(--bx-shadow-2);
	}
	.site-account__item {
		display: block; padding: 0.6rem 0.7rem; border-radius: var(--bx-radius);
		color: var(--bx-text-2); font-weight: 600; font-size: var(--bx-fs-sm);
		text-decoration: none; white-space: nowrap;
		transition: background var(--bx-dur-1) var(--bx-ease), color var(--bx-dur-1) var(--bx-ease);
	}
	.site-account__item:hover { background: var(--bx-surface); color: var(--bx-text); }
	.site-account__item:focus-visible { outline: none; box-shadow: var(--bx-focus); }
	.site-account__item--sep { margin-block-start: 0.3rem; padding-block-start: 0.7rem; border-block-start: 1px solid var(--bx-line); color: var(--bx-text-muted); }

	/* Drawer: full visible list, ≥44px tap targets */
	.site-account--drawer { display: block; width: 100%; margin-block-start: 0.25rem; }
	.site-account__heading { display: block; margin-block-end: 0.4rem; color: var(--bx-text-muted); }
	.site-account__list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.1rem; }
	.site-account__rowlink { display: flex; align-items: center; min-height: 44px; padding: 0.6rem 0.2rem; color: var(--bx-text-2); font-weight: 600; font-size: var(--bx-fs-base); text-decoration: none; transition: color var(--bx-dur-1) var(--bx-ease); }
	.site-account__rowlink:hover { color: var(--bx-text); }
	.site-account__rowlink:focus-visible { outline: none; box-shadow: var(--bx-focus); border-radius: var(--bx-radius); }
	.site-account__row--sep { margin-block-start: 0.3rem; padding-block-start: 0.3rem; border-block-start: 1px solid var(--bx-line); }
	.site-account__row--sep .site-account__rowlink { color: var(--bx-text-muted); }

	/* ---------- Market selector (governed, theme-owned) — v0.3.0 ----------
	   Site-wide accessible dialog (app.js controls it) + footer "Change market"
	   trigger. Ships hidden ([hidden] wins → display:none) so no-JS never shows a
	   stuck overlay; appearance-aware via tokens; reduced-motion drops the transition. */
	.bx-market[hidden] { display: none; }
	.bx-market { position: fixed; inset: 0; z-index: 1000; display: flex; align-items: center; justify-content: center; padding: 1.25rem; background: var(--bx-overlay); opacity: 0; transition: opacity var(--bx-dur-2) var(--bx-ease); }
	.bx-market.is-open { opacity: 1; }
	.bx-market__panel { position: relative; width: 100%; max-width: 32rem; max-height: calc(100dvh - 2.5rem); overflow: auto; background: var(--bx-surface-elev); border: 1px solid var(--bx-surface-border); border-radius: var(--bx-radius-lg); box-shadow: var(--bx-shadow-2); padding: clamp(1.4rem, 3vw, 2rem); transform: translateY(8px) scale(0.985); transition: transform var(--bx-dur-2) var(--bx-ease); }
	.bx-market.is-open .bx-market__panel { transform: none; }
	.bx-market__close { position: absolute; inset-block-start: 0.5rem; inset-inline-end: 0.5rem; width: 40px; height: 40px; display: inline-flex; align-items: center; justify-content: center; border: 0; background: transparent; color: var(--bx-text-2); font-size: 1.6rem; line-height: 1; cursor: pointer; border-radius: var(--bx-radius); }
	.bx-market__close:hover { color: var(--bx-text); background: var(--bx-surface); }
	.bx-market__close:focus-visible { outline: none; box-shadow: var(--bx-focus); }
	.bx-market__title { font-size: var(--bx-fs-xl); line-height: var(--bx-lh-tight); margin: 0.2rem 0 0.45rem; color: var(--bx-text); max-width: 22ch; }
	.bx-market__lede { color: var(--bx-text-2); margin: 0 0 1.2rem; max-width: 50ch; }
	.bx-market__opts { list-style: none; margin: 0 0 1rem; padding: 0; display: grid; gap: 0.5rem; }
	@media (min-width: 440px) { .bx-market__opts { grid-template-columns: 1fr 1fr; } }
	.bx-market__opt { display: flex; align-items: center; width: 100%; min-height: 44px; padding: 0.75rem 1rem; text-align: start; background: var(--bx-surface); border: 1px solid var(--bx-surface-border); border-radius: var(--bx-radius); color: var(--bx-text); font: inherit; font-weight: 600; text-decoration: none; cursor: pointer; transition: border-color var(--bx-dur-1) var(--bx-ease), background var(--bx-dur-1) var(--bx-ease); }
	.bx-market__opt:hover { border-color: var(--bx-accent); background: var(--bx-surface-elev); }
	.bx-market__opt:focus-visible { outline: none; box-shadow: var(--bx-focus); border-color: var(--bx-accent); }
	.bx-market__notnow { background: none; border: 0; color: var(--bx-text-muted); font: inherit; font-weight: 600; cursor: pointer; padding: 0.4rem 0.2rem; }
	.bx-market__notnow:hover { color: var(--bx-text-2); }
	.bx-market__notnow:focus-visible { outline: none; box-shadow: var(--bx-focus); border-radius: var(--bx-radius); }

	/* Footer "Change market" trigger (JS-gated: hidden until app.js reveals it) */
	.bx-market-trigger[hidden] { display: none; }
	.bx-market-trigger { display: inline-flex; align-items: center; gap: 0.4rem; min-height: 32px; padding: 0.3rem 0.7rem; background: transparent; border: 1px solid var(--bx-surface-border); border-radius: var(--bx-radius-pill); color: var(--bx-text-2); font: inherit; font-size: var(--bx-fs-sm); cursor: pointer; transition: color var(--bx-dur-1) var(--bx-ease), border-color var(--bx-dur-1) var(--bx-ease); }
	.bx-market-trigger:hover { color: var(--bx-text); border-color: var(--bx-accent); }
	.bx-market-trigger:focus-visible { outline: none; box-shadow: var(--bx-focus); }
	.bx-market-trigger__icon { flex: none; opacity: 0.85; }

	@media (prefers-reduced-motion: reduce) {
		.bx-market, .bx-market__panel { transition: none; }
		.bx-market__panel { transform: none; }
	}
}
